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:
authorArystanbek Dyussenov <arystan.d@gmail.com>2009-09-15 22:01:18 +0400
committerArystanbek Dyussenov <arystan.d@gmail.com>2009-09-15 22:01:18 +0400
commit816377cc02fe5dd4be945c0f3d415861114b4980 (patch)
tree306e9d1363aa66bc919e43b80b3380fab9f60ea9
parentc8af263e5d8d9d41a757e8438cdcf3b64d57e0c0 (diff)
parentee768ada680ce0a8aa184c882005c0ef1c0140fb (diff)
Undo revision 23130 which was a merge with 2.5, a messy one because I did something wrong (`svn status` output: http://www.pasteall.org/7887).soc-2009-kazanbas
The command: svn merge -r 23130:23129 https://svn.blender.org/svnroot/bf-blender/branches/soc-2009-kazanbas
-rw-r--r--CMake/macros.cmake6
-rw-r--r--CMakeLists.txt766
-rw-r--r--SConstruct17
-rw-r--r--blenderplayer/CMakeLists.txt135
-rw-r--r--config/darwin-config.py13
-rw-r--r--config/linux2-config.py26
-rw-r--r--config/win32-mingw-config.py31
-rw-r--r--config/win32-vc-config.py31
-rw-r--r--config/win64-vc-config.py1
-rw-r--r--extern/CMakeLists.txt9
-rw-r--r--extern/Makefile8
-rw-r--r--extern/SConscript4
-rw-r--r--extern/binreloc/SConscript2
-rw-r--r--extern/bullet2/CMakeLists.txt20
-rw-r--r--extern/bullet2/src/BulletCollision/CMakeLists.txt4
-rw-r--r--extern/bullet2/src/BulletSoftBody/CMakeLists.txt2
-rw-r--r--extern/bullet2/src/SConscript16
-rw-r--r--extern/glew/CMakeLists.txt4
-rw-r--r--extern/glew/SConscript2
-rw-r--r--extern/libopenjpeg/SConscript4
-rw-r--r--extern/libredcode/SConscript4
-rw-r--r--extern/lzma/Alloc.c127
-rw-r--r--extern/lzma/Alloc.h32
-rw-r--r--extern/lzma/CMakeLists.txt34
-rw-r--r--extern/lzma/LzFind.c751
-rw-r--r--extern/lzma/LzFind.h107
-rw-r--r--extern/lzma/LzHash.h54
-rw-r--r--extern/lzma/LzmaDec.c1007
-rw-r--r--extern/lzma/LzmaDec.h223
-rw-r--r--extern/lzma/LzmaEnc.c2281
-rw-r--r--extern/lzma/LzmaEnc.h72
-rw-r--r--extern/lzma/LzmaLib.c46
-rw-r--r--extern/lzma/LzmaLib.h135
-rw-r--r--extern/lzma/Makefile46
-rw-r--r--extern/lzma/SConscript9
-rw-r--r--extern/lzma/Types.h208
-rw-r--r--extern/lzma/history.txt236
-rw-r--r--extern/lzma/lzma.txt594
-rw-r--r--extern/lzma/make/msvc_9_0/lzma.vcproj385
-rw-r--r--extern/lzo/CMakeLists.txt34
-rw-r--r--extern/lzo/SConscript9
-rw-r--r--extern/lzo/make/msvc_9_0/lzo.vcproj353
-rw-r--r--extern/lzo/minilzo/COPYING340
-rw-r--r--extern/lzo/minilzo/Makefile40
-rw-r--r--extern/lzo/minilzo/README.LZO123
-rw-r--r--extern/lzo/minilzo/lzoconf.h417
-rw-r--r--extern/lzo/minilzo/lzodefs.h1807
-rw-r--r--extern/lzo/minilzo/minilzo.c4112
-rw-r--r--extern/lzo/minilzo/minilzo.h112
-rw-r--r--intern/CMakeLists.txt2
-rw-r--r--intern/audaspace/CMakeLists.txt42
-rw-r--r--intern/audaspace/FX/AUD_DoubleReader.cpp2
-rw-r--r--intern/audaspace/FX/AUD_PingPongFactory.cpp2
-rw-r--r--intern/audaspace/Makefile48
-rw-r--r--intern/audaspace/OpenAL/AUD_OpenALDevice.cpp14
-rw-r--r--intern/audaspace/SConscript7
-rw-r--r--intern/audaspace/SDL/AUD_SDLMixerReader.cpp2
-rw-r--r--intern/audaspace/SDL/Makefile2
-rw-r--r--intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp49
-rw-r--r--intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h9
-rw-r--r--intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp18
-rw-r--r--intern/audaspace/ffmpeg/AUD_FFMPEGReader.h10
-rw-r--r--intern/audaspace/ffmpeg/Makefile2
-rw-r--r--intern/audaspace/intern/AUD_C-API.cpp62
-rw-r--r--intern/audaspace/intern/Makefile26
-rw-r--r--intern/audaspace/jack/AUD_JackDevice.cpp8
-rw-r--r--intern/audaspace/jack/AUD_JackDevice.h1
-rw-r--r--intern/audaspace/jack/Makefile4
-rw-r--r--intern/audaspace/make/msvc_9_0/audaspace.vcproj48
-rw-r--r--intern/audaspace/sndfile/AUD_SndFileFactory.cpp67
-rw-r--r--intern/audaspace/sndfile/AUD_SndFileFactory.h71
-rw-r--r--intern/audaspace/sndfile/AUD_SndFileReader.cpp233
-rw-r--r--intern/audaspace/sndfile/AUD_SndFileReader.h131
-rw-r--r--intern/audaspace/sndfile/Makefile40
-rw-r--r--intern/elbeem/CMakeLists.txt4
-rw-r--r--intern/ghost/CMakeLists.txt46
-rw-r--r--intern/ghost/SConscript2
-rw-r--r--intern/ghost/intern/GHOST_System.cpp4
-rw-r--r--intern/guardedalloc/CMakeLists.txt4
-rw-r--r--intern/guardedalloc/SConscript2
-rw-r--r--intern/iksolver/SConscript2
-rw-r--r--intern/iksolver/intern/TNT/tntmath.h4
-rw-r--r--intern/memutil/SConscript2
-rw-r--r--intern/moto/SConscript2
-rw-r--r--intern/smoke/CMakeLists.txt6
-rw-r--r--intern/smoke/extern/smoke_API.h13
-rw-r--r--intern/smoke/intern/FLUID_3D.cpp191
-rw-r--r--intern/smoke/intern/FLUID_3D.h17
-rw-r--r--intern/smoke/intern/FLUID_3D_SOLVERS.cpp24
-rw-r--r--intern/smoke/intern/FLUID_3D_STATIC.cpp158
-rw-r--r--intern/smoke/intern/WTURBULENCE.cpp259
-rw-r--r--intern/smoke/intern/WTURBULENCE.h48
-rw-r--r--intern/smoke/intern/smoke_API.cpp38
-rw-r--r--intern/smoke/intern/tnt/tnt_math_utils.h4
-rw-r--r--intern/string/SConscript2
-rw-r--r--intern/string/STR_String.h14
-rw-r--r--projectfiles_vc9/blender/BPY_python/BPY_python.vcproj4
-rw-r--r--projectfiles_vc9/blender/blender.sln53
-rw-r--r--projectfiles_vc9/blender/blender.vcproj12
-rw-r--r--projectfiles_vc9/blender/blenkernel/BKE_blenkernel.vcproj20
-rw-r--r--projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj14
-rw-r--r--projectfiles_vc9/blender/editors/ED_editors.vcproj100
-rw-r--r--projectfiles_vc9/blender/imbuf/BL_imbuf.vcproj12
-rw-r--r--projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj28
-rw-r--r--projectfiles_vc9/blender/makesrna/RNA_rna.vcproj4
-rw-r--r--projectfiles_vc9/blender/render/BRE_render.vcproj40
-rw-r--r--projectfiles_vc9/gameengine/videotexture/TEX_Video.vcproj4
-rw-r--r--release/datafiles/blenderbuttonsbin182512 -> 179274 bytes
-rw-r--r--release/datafiles/datatoc.c102
-rw-r--r--release/datafiles/splash.jpgbin197165 -> 197158 bytes
-rw-r--r--release/io/engine_render_pov.py224
-rw-r--r--release/io/export_ply.py11
-rw-r--r--release/io/netrender/__init__.py17
-rw-r--r--release/io/netrender/client.py204
-rw-r--r--release/io/netrender/master.py615
-rw-r--r--release/io/netrender/model.py162
-rw-r--r--release/io/netrender/operators.py236
-rw-r--r--release/io/netrender/slave.py169
-rw-r--r--release/io/netrender/ui.py283
-rw-r--r--release/io/netrender/utils.py61
-rw-r--r--release/scripts/export_map.py2
-rw-r--r--release/scripts/help_getting_started.py50
-rw-r--r--release/scripts/help_manual.py48
-rw-r--r--release/scripts/help_release_notes.py47
-rw-r--r--release/scripts/help_tutorials.py47
-rw-r--r--release/scripts/help_web_blender.py48
-rw-r--r--release/scripts/help_web_devcomm.py47
-rw-r--r--release/scripts/help_web_eshop.py47
-rw-r--r--release/scripts/help_web_usercomm.py47
-rw-r--r--release/test/rna_array.py279
-rw-r--r--release/ui/bpy_ops.py28
-rw-r--r--release/ui/buttons_data_armature.py31
-rw-r--r--release/ui/buttons_data_bone.py36
-rw-r--r--release/ui/buttons_data_camera.py8
-rw-r--r--release/ui/buttons_data_curve.py208
-rw-r--r--release/ui/buttons_data_empty.py8
-rw-r--r--release/ui/buttons_data_lamp.py21
-rw-r--r--release/ui/buttons_data_lattice.py6
-rw-r--r--release/ui/buttons_data_mesh.py67
-rw-r--r--release/ui/buttons_data_metaball.py4
-rw-r--r--release/ui/buttons_data_modifier.py114
-rw-r--r--release/ui/buttons_data_text.py119
-rw-r--r--release/ui/buttons_game.py42
-rw-r--r--release/ui/buttons_material.py371
-rw-r--r--release/ui/buttons_object.py8
-rw-r--r--release/ui/buttons_object_constraint.py22
-rw-r--r--release/ui/buttons_physics_cloth.py93
-rw-r--r--release/ui/buttons_physics_field.py16
-rw-r--r--release/ui/buttons_physics_fluid.py30
-rw-r--r--release/ui/buttons_physics_smoke.py115
-rw-r--r--release/ui/buttons_physics_softbody.py219
-rw-r--r--release/ui/buttons_scene.py63
-rw-r--r--release/ui/buttons_texture.py204
-rw-r--r--release/ui/buttons_world.py47
-rw-r--r--release/ui/space_buttons.py4
-rw-r--r--release/ui/space_console.py12
-rw-r--r--release/ui/space_filebrowser.py7
-rw-r--r--release/ui/space_image.py121
-rw-r--r--release/ui/space_info.py43
-rw-r--r--release/ui/space_logic.py24
-rw-r--r--release/ui/space_node.py21
-rw-r--r--release/ui/space_outliner.py4
-rw-r--r--release/ui/space_sequencer.py72
-rw-r--r--release/ui/space_text.py40
-rw-r--r--release/ui/space_time.py57
-rw-r--r--release/ui/space_userpref.py58
-rw-r--r--release/ui/space_view3d.py664
-rw-r--r--release/ui/space_view3d_toolbar.py172
-rw-r--r--release/windows/inno/blender.iss92
-rw-r--r--release/windows/inno/copyright.txt56
-rw-r--r--release/windows/inno/header.bmpbin25818 -> 0 bytes
-rw-r--r--release/windows/inno/installer.bmpbin154542 -> 0 bytes
-rw-r--r--release/windows/inno/installer.icobin25214 -> 0 bytes
-rw-r--r--source/CMakeLists.txt4
-rw-r--r--source/Makefile40
-rw-r--r--source/SConscript5
-rw-r--r--source/blender/CMakeLists.txt8
-rw-r--r--source/blender/avi/CMakeLists.txt4
-rw-r--r--source/blender/avi/SConscript3
-rw-r--r--source/blender/blenfont/CMakeLists.txt10
-rw-r--r--source/blender/blenfont/SConscript2
-rw-r--r--source/blender/blenfont/intern/blf_font.c91
-rw-r--r--source/blender/blenkernel/BKE_action.h2
-rw-r--r--source/blender/blenkernel/BKE_animsys.h3
-rw-r--r--source/blender/blenkernel/BKE_armature.h1
-rw-r--r--source/blender/blenkernel/BKE_blender.h2
-rw-r--r--source/blender/blenkernel/BKE_brush.h1
-rw-r--r--source/blender/blenkernel/BKE_constraint.h1
-rw-r--r--source/blender/blenkernel/BKE_curve.h2
-rw-r--r--source/blender/blenkernel/BKE_depsgraph.h7
-rw-r--r--source/blender/blenkernel/BKE_global.h1
-rw-r--r--source/blender/blenkernel/BKE_group.h1
-rw-r--r--source/blender/blenkernel/BKE_library.h3
-rw-r--r--source/blender/blenkernel/BKE_modifier.h5
-rw-r--r--source/blender/blenkernel/BKE_multires.h8
-rw-r--r--source/blender/blenkernel/BKE_node.h12
-rw-r--r--source/blender/blenkernel/BKE_object.h5
-rw-r--r--source/blender/blenkernel/BKE_paint.h46
-rw-r--r--source/blender/blenkernel/BKE_particle.h54
-rw-r--r--source/blender/blenkernel/BKE_pointcache.h86
-rw-r--r--source/blender/blenkernel/BKE_sca.h1
-rw-r--r--source/blender/blenkernel/BKE_scene.h2
-rw-r--r--source/blender/blenkernel/BKE_sculpt.h72
-rw-r--r--source/blender/blenkernel/BKE_shrinkwrap.h4
-rw-r--r--source/blender/blenkernel/BKE_smoke.h15
-rw-r--r--source/blender/blenkernel/BKE_sound.h4
-rw-r--r--source/blender/blenkernel/BKE_text.h2
-rw-r--r--source/blender/blenkernel/BKE_texture.h12
-rw-r--r--source/blender/blenkernel/CMakeLists.txt44
-rw-r--r--source/blender/blenkernel/SConscript8
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c2
-rw-r--r--source/blender/blenkernel/intern/Makefile5
-rw-r--r--source/blender/blenkernel/intern/action.c55
-rw-r--r--source/blender/blenkernel/intern/anim.c4
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c61
-rw-r--r--source/blender/blenkernel/intern/armature.c5
-rw-r--r--source/blender/blenkernel/intern/blender.c3
-rw-r--r--source/blender/blenkernel/intern/boids.c202
-rw-r--r--source/blender/blenkernel/intern/booleanops.c2
-rw-r--r--source/blender/blenkernel/intern/brush.c17
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c41
-rw-r--r--source/blender/blenkernel/intern/cloth.c29
-rw-r--r--source/blender/blenkernel/intern/constraint.c65
-rw-r--r--source/blender/blenkernel/intern/curve.c217
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c93
-rw-r--r--source/blender/blenkernel/intern/displist.c6
-rw-r--r--source/blender/blenkernel/intern/fcurve.c6
-rw-r--r--source/blender/blenkernel/intern/font.c3
-rw-r--r--source/blender/blenkernel/intern/gpencil.c7
-rw-r--r--source/blender/blenkernel/intern/group.c10
-rw-r--r--source/blender/blenkernel/intern/image.c5
-rw-r--r--source/blender/blenkernel/intern/library.c228
-rw-r--r--source/blender/blenkernel/intern/material.c68
-rw-r--r--source/blender/blenkernel/intern/mesh.c4
-rw-r--r--source/blender/blenkernel/intern/modifier.c98
-rw-r--r--source/blender/blenkernel/intern/multires.c25
-rw-r--r--source/blender/blenkernel/intern/nla.c2
-rw-r--r--source/blender/blenkernel/intern/node.c9
-rw-r--r--source/blender/blenkernel/intern/object.c121
-rw-r--r--source/blender/blenkernel/intern/packedFile.c10
-rw-r--r--source/blender/blenkernel/intern/paint.c12
-rw-r--r--source/blender/blenkernel/intern/particle.c569
-rw-r--r--source/blender/blenkernel/intern/particle_system.c428
-rw-r--r--source/blender/blenkernel/intern/pointcache.c445
-rw-r--r--source/blender/blenkernel/intern/sca.c26
-rw-r--r--source/blender/blenkernel/intern/scene.c24
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c6
-rw-r--r--source/blender/blenkernel/intern/sequence.c2
-rw-r--r--source/blender/blenkernel/intern/shrinkwrap.c2
-rw-r--r--source/blender/blenkernel/intern/smoke.c1219
-rw-r--r--source/blender/blenkernel/intern/softbody.c43
-rw-r--r--source/blender/blenkernel/intern/sound.c113
-rw-r--r--source/blender/blenkernel/intern/text.c93
-rw-r--r--source/blender/blenkernel/intern/texture.c119
-rw-r--r--source/blender/blenlib/BLI_arithb.h59
-rw-r--r--source/blender/blenlib/BLI_fileops.h2
-rw-r--r--source/blender/blenlib/BLI_kdopbvh.h6
-rw-r--r--source/blender/blenlib/BLI_voxel.h41
-rw-r--r--source/blender/blenlib/BLI_winstuff.h29
-rw-r--r--source/blender/blenlib/CMakeLists.txt12
-rw-r--r--source/blender/blenlib/MTC_matrixops.h162
-rw-r--r--source/blender/blenlib/MTC_vectorops.h (renamed from source/blender/render/intern/include/pointdensity.h)34
-rw-r--r--source/blender/blenlib/SConscript2
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c270
-rw-r--r--source/blender/blenlib/intern/arithb.c589
-rw-r--r--source/blender/blenlib/intern/bpath.c34
-rw-r--r--source/blender/blenlib/intern/fileops.c14
-rw-r--r--source/blender/blenlib/intern/freetypefont.c3
-rw-r--r--source/blender/blenlib/intern/matrixops.c438
-rw-r--r--source/blender/blenlib/intern/storage.c18
-rw-r--r--source/blender/blenlib/intern/threads.c19
-rw-r--r--source/blender/blenlib/intern/util.c7
-rw-r--r--source/blender/blenlib/intern/vectorops.c166
-rw-r--r--source/blender/blenlib/intern/voxel.c198
-rw-r--r--source/blender/blenloader/CMakeLists.txt10
-rw-r--r--source/blender/blenloader/SConscript2
-rw-r--r--source/blender/blenloader/intern/readblenentry.c24
-rw-r--r--source/blender/blenloader/intern/readfile.c192
-rw-r--r--source/blender/blenloader/intern/readfile.h2
-rw-r--r--source/blender/blenloader/intern/writefile.c47
-rw-r--r--source/blender/blenpluginapi/CMakeLists.txt6
-rw-r--r--source/blender/blenpluginapi/SConscript2
-rw-r--r--source/blender/editors/CMakeLists.txt52
-rw-r--r--source/blender/editors/Makefile1
-rw-r--r--source/blender/editors/SConscript1
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c144
-rw-r--r--source/blender/editors/animation/anim_filter.c2
-rw-r--r--source/blender/editors/animation/anim_intern.h30
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c5
-rw-r--r--source/blender/editors/animation/anim_ops.c11
-rw-r--r--source/blender/editors/animation/drivers.c38
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c52
-rw-r--r--source/blender/editors/animation/keyframes_draw.c37
-rw-r--r--source/blender/editors/animation/keyframes_edit.c31
-rw-r--r--source/blender/editors/animation/keyframes_general.c205
-rw-r--r--source/blender/editors/animation/keyframing.c113
-rw-r--r--source/blender/editors/animation/keyingsets.c272
-rw-r--r--source/blender/editors/armature/editarmature.c75
-rw-r--r--source/blender/editors/armature/editarmature_generate.c1
-rw-r--r--source/blender/editors/armature/editarmature_retarget.c4
-rw-r--r--source/blender/editors/armature/meshlaplacian.c24
-rw-r--r--source/blender/editors/armature/poselib.c6
-rw-r--r--source/blender/editors/armature/poseobject.c47
-rw-r--r--source/blender/editors/curve/curve_ops.c7
-rw-r--r--source/blender/editors/curve/editcurve.c311
-rw-r--r--source/blender/editors/curve/editfont.c14
-rw-r--r--source/blender/editors/datafiles/blenderbuttons.c11309
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c381
-rw-r--r--source/blender/editors/gpencil/gpencil_buttons.c281
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c1726
-rw-r--r--source/blender/editors/gpencil/gpencil_intern.h32
-rw-r--r--source/blender/editors/gpencil/gpencil_ops.c86
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c1434
-rw-r--r--source/blender/editors/include/ED_anim_api.h6
-rw-r--r--source/blender/editors/include/ED_armature.h4
-rw-r--r--source/blender/editors/include/ED_fileselect.h1
-rw-r--r--source/blender/editors/include/ED_gpencil.h36
-rw-r--r--source/blender/editors/include/ED_info.h32
-rw-r--r--source/blender/editors/include/ED_keyframes_draw.h6
-rw-r--r--source/blender/editors/include/ED_keyframes_edit.h4
-rw-r--r--source/blender/editors/include/ED_keyframing.h14
-rw-r--r--source/blender/editors/include/ED_mball.h6
-rw-r--r--source/blender/editors/include/ED_mesh.h22
-rw-r--r--source/blender/editors/include/ED_object.h7
-rw-r--r--source/blender/editors/include/ED_particle.h11
-rw-r--r--source/blender/editors/include/ED_screen.h3
-rw-r--r--source/blender/editors/include/ED_sound.h35
-rw-r--r--source/blender/editors/include/ED_view3d.h1
-rw-r--r--source/blender/editors/include/UI_icons.h14
-rw-r--r--source/blender/editors/include/UI_interface.h22
-rw-r--r--source/blender/editors/interface/interface.c43
-rw-r--r--source/blender/editors/interface/interface_anim.c30
-rw-r--r--source/blender/editors/interface/interface_handlers.c46
-rw-r--r--source/blender/editors/interface/interface_icons.c1
-rw-r--r--source/blender/editors/interface/interface_intern.h16
-rw-r--r--source/blender/editors/interface/interface_layout.c185
-rw-r--r--source/blender/editors/interface/interface_regions.c824
-rw-r--r--source/blender/editors/interface/interface_templates.c142
-rw-r--r--source/blender/editors/interface/interface_utils.c20
-rw-r--r--source/blender/editors/interface/interface_widgets.c22
-rw-r--r--source/blender/editors/interface/resources.c13
-rw-r--r--source/blender/editors/interface/view2d_ops.c13
-rw-r--r--source/blender/editors/mesh/editmesh.c164
-rw-r--r--source/blender/editors/mesh/editmesh_add.c78
-rw-r--r--source/blender/editors/mesh/editmesh_loop.c7
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c128
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c147
-rw-r--r--source/blender/editors/mesh/mesh_layers.c88
-rw-r--r--source/blender/editors/mesh/meshtools.c3
-rw-r--r--source/blender/editors/metaball/editmball.c (renamed from source/blender/editors/metaball/mball_edit.c)30
-rw-r--r--source/blender/editors/object/editconstraint.c (renamed from source/blender/editors/object/object_constraint.c)51
-rw-r--r--source/blender/editors/object/editgroup.c (renamed from source/blender/editors/object/object_group.c)189
-rw-r--r--source/blender/editors/object/editkey.c (renamed from source/blender/editors/object/object_shapekey.c)107
-rw-r--r--source/blender/editors/object/editlattice.c (renamed from source/blender/editors/object/object_lattice.c)15
-rw-r--r--source/blender/editors/object/object_add.c1451
-rw-r--r--source/blender/editors/object/object_edit.c5352
-rw-r--r--source/blender/editors/object/object_hook.c608
-rw-r--r--source/blender/editors/object/object_intern.h91
-rw-r--r--source/blender/editors/object/object_modifier.c386
-rw-r--r--source/blender/editors/object/object_ops.c68
-rw-r--r--source/blender/editors/object/object_relations.c1765
-rw-r--r--source/blender/editors/object/object_select.c974
-rw-r--r--source/blender/editors/object/object_transform.c926
-rw-r--r--source/blender/editors/object/object_vgroup.c1467
-rw-r--r--source/blender/editors/physics/ed_fluidsim.c22
-rw-r--r--source/blender/editors/physics/ed_pointcache.c31
-rw-r--r--source/blender/editors/physics/editparticle.c2287
-rw-r--r--source/blender/editors/preview/previewrender.c18
-rw-r--r--source/blender/editors/screen/CMakeLists.txt41
-rw-r--r--source/blender/editors/screen/area.c20
-rw-r--r--source/blender/editors/screen/screen_context.c6
-rw-r--r--source/blender/editors/screen/screen_ops.c25
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c13
-rw-r--r--source/blender/editors/sculpt_paint/paint_intern.h23
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c27
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c330
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c867
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c282
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h1
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_stroke.c274
-rw-r--r--source/blender/editors/sound/Makefile51
-rw-r--r--source/blender/editors/sound/SConscript14
-rw-r--r--source/blender/editors/sound/sound_intern.h37
-rw-r--r--source/blender/editors/sound/sound_ops.c293
-rw-r--r--source/blender/editors/space_action/action_draw.c336
-rw-r--r--source/blender/editors/space_action/action_edit.c138
-rw-r--r--source/blender/editors/space_action/action_header.c41
-rw-r--r--source/blender/editors/space_action/action_intern.h1
-rw-r--r--source/blender/editors/space_action/action_ops.c2
-rw-r--r--source/blender/editors/space_action/space_action.c7
-rw-r--r--source/blender/editors/space_api/spacetypes.c7
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c4
-rw-r--r--source/blender/editors/space_buttons/buttons_intern.h2
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c375
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c19
-rw-r--r--source/blender/editors/space_console/console_ops.c20
-rw-r--r--source/blender/editors/space_console/console_report.c8
-rw-r--r--source/blender/editors/space_console/space_console.c23
-rw-r--r--source/blender/editors/space_file/file_draw.c229
-rw-r--r--source/blender/editors/space_file/file_intern.h2
-rw-r--r--source/blender/editors/space_file/file_ops.c34
-rw-r--r--source/blender/editors/space_file/file_panels.c20
-rw-r--r--source/blender/editors/space_file/filesel.c1
-rw-r--r--source/blender/editors/space_file/space_file.c25
-rw-r--r--source/blender/editors/space_graph/graph_edit.c69
-rw-r--r--source/blender/editors/space_graph/graph_header.c18
-rw-r--r--source/blender/editors/space_graph/space_graph.c4
-rw-r--r--source/blender/editors/space_image/image_buttons.c15
-rw-r--r--source/blender/editors/space_image/image_draw.c39
-rw-r--r--source/blender/editors/space_image/image_intern.h1
-rw-r--r--source/blender/editors/space_image/image_ops.c12
-rw-r--r--source/blender/editors/space_image/space_image.c28
-rw-r--r--source/blender/editors/space_info/info_stats.c434
-rw-r--r--source/blender/editors/space_info/space_info.c7
-rw-r--r--source/blender/editors/space_logic/logic_window.c118
-rw-r--r--source/blender/editors/space_logic/space_logic.c7
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c51
-rw-r--r--source/blender/editors/space_nla/nla_channels.c7
-rw-r--r--source/blender/editors/space_nla/nla_draw.c2
-rw-r--r--source/blender/editors/space_nla/nla_edit.c2
-rw-r--r--source/blender/editors/space_nla/nla_header.c4
-rw-r--r--source/blender/editors/space_nla/space_nla.c4
-rw-r--r--source/blender/editors/space_node/drawnode.c223
-rw-r--r--source/blender/editors/space_node/node_edit.c5
-rw-r--r--source/blender/editors/space_node/space_node.c14
-rw-r--r--source/blender/editors/space_outliner/outliner.c20
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c8
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c6
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c106
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c9
-rw-r--r--source/blender/editors/space_text/space_text.c39
-rw-r--r--source/blender/editors/space_text/text_header.c1
-rw-r--r--source/blender/editors/space_text/text_intern.h2
-rw-r--r--source/blender/editors/space_text/text_ops.c92
-rw-r--r--source/blender/editors/space_time/space_time.c44
-rw-r--r--source/blender/editors/space_time/time_header.c476
-rw-r--r--source/blender/editors/space_view3d/SConscript1
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c4
-rw-r--r--source/blender/editors/space_view3d/drawobject.c573
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c350
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c49
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c62
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c16
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c7
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c1291
-rw-r--r--source/blender/editors/space_view3d/view3d_intern.h3
-rw-r--r--source/blender/editors/space_view3d/view3d_ops.c8
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c25
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c19
-rw-r--r--source/blender/editors/space_view3d/view3d_toolbar.c3
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c84
-rw-r--r--source/blender/editors/transform/transform.c46
-rw-r--r--source/blender/editors/transform/transform.h1
-rw-r--r--source/blender/editors/transform/transform_conversions.c222
-rw-r--r--source/blender/editors/transform/transform_generics.c25
-rw-r--r--source/blender/editors/transform/transform_manipulator.c22
-rw-r--r--source/blender/editors/transform/transform_ops.c40
-rw-r--r--source/blender/editors/transform/transform_orientations.c2
-rw-r--r--source/blender/editors/util/editmode_undo.c2
-rw-r--r--source/blender/editors/util/undo.c3
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c95
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c73
-rw-r--r--source/blender/gpu/CMakeLists.txt4
-rw-r--r--source/blender/gpu/GPU_draw.h5
-rw-r--r--source/blender/gpu/GPU_extensions.h1
-rw-r--r--source/blender/gpu/SConscript4
-rw-r--r--source/blender/gpu/intern/Makefile1
-rw-r--r--source/blender/gpu/intern/gpu_draw.c29
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c63
-rw-r--r--source/blender/imbuf/CMakeLists.txt28
-rw-r--r--source/blender/imbuf/SConscript2
-rw-r--r--source/blender/imbuf/intern/anim5.c16
-rw-r--r--source/blender/imbuf/intern/cineon/CMakeLists.txt16
-rw-r--r--source/blender/imbuf/intern/cineon/SConscript2
-rw-r--r--source/blender/imbuf/intern/dds/CMakeLists.txt18
-rw-r--r--source/blender/imbuf/intern/dds/SConscript2
-rw-r--r--source/blender/imbuf/intern/hamx.c10
-rw-r--r--source/blender/imbuf/intern/iff.c7
-rw-r--r--source/blender/imbuf/intern/openexr/CMakeLists.txt20
-rw-r--r--source/blender/imbuf/intern/openexr/Makefile3
-rw-r--r--source/blender/imbuf/intern/openexr/SConscript4
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp1
-rw-r--r--source/blender/imbuf/intern/thumbs.c20
-rw-r--r--source/blender/imbuf/intern/writeimage.c8
-rw-r--r--source/blender/makesdna/DNA_action_types.h64
-rw-r--r--source/blender/makesdna/DNA_brush_types.h10
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h9
-rw-r--r--source/blender/makesdna/DNA_curve_types.h40
-rw-r--r--source/blender/makesdna/DNA_gpencil_types.h4
-rw-r--r--source/blender/makesdna/DNA_material_types.h64
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h7
-rw-r--r--source/blender/makesdna/DNA_object_force.h9
-rw-r--r--source/blender/makesdna/DNA_object_types.h34
-rw-r--r--source/blender/makesdna/DNA_particle_types.h57
-rw-r--r--source/blender/makesdna/DNA_scene_types.h40
-rw-r--r--source/blender/makesdna/DNA_sensor_types.h3
-rw-r--r--source/blender/makesdna/DNA_smoke_types.h33
-rw-r--r--source/blender/makesdna/DNA_sound_types.h77
-rw-r--r--source/blender/makesdna/DNA_space_types.h1
-rw-r--r--source/blender/makesdna/DNA_texture_types.h112
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h2
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h4
-rw-r--r--source/blender/makesdna/SConscript2
-rw-r--r--source/blender/makesdna/intern/CMakeLists.txt6
-rw-r--r--source/blender/makesdna/intern/SConscript3
-rw-r--r--source/blender/makesrna/RNA_access.h13
-rw-r--r--source/blender/makesrna/RNA_define.h12
-rw-r--r--source/blender/makesrna/RNA_enum_types.h7
-rw-r--r--source/blender/makesrna/RNA_types.h18
-rw-r--r--source/blender/makesrna/SConscript5
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt48
-rw-r--r--source/blender/makesrna/intern/Makefile12
-rw-r--r--source/blender/makesrna/intern/SConscript18
-rw-r--r--source/blender/makesrna/intern/makesrna.c254
-rw-r--r--source/blender/makesrna/intern/rna_ID.c2
-rw-r--r--source/blender/makesrna/intern/rna_access.c275
-rw-r--r--source/blender/makesrna/intern/rna_action.c20
-rw-r--r--source/blender/makesrna/intern/rna_action_api.c9
-rw-r--r--source/blender/makesrna/intern/rna_animation.c23
-rw-r--r--source/blender/makesrna/intern/rna_animation_api.c89
-rw-r--r--source/blender/makesrna/intern/rna_armature.c24
-rw-r--r--source/blender/makesrna/intern/rna_boid.c103
-rw-r--r--source/blender/makesrna/intern/rna_brush.c22
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c63
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c21
-rw-r--r--source/blender/makesrna/intern/rna_curve.c221
-rw-r--r--source/blender/makesrna/intern/rna_define.c179
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c38
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c20
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c252
-rw-r--r--source/blender/makesrna/intern/rna_group.c2
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_internal.h6
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h18
-rw-r--r--source/blender/makesrna/intern/rna_key.c5
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c14
-rw-r--r--source/blender/makesrna/intern/rna_main.c33
-rw-r--r--source/blender/makesrna/intern/rna_material.c342
-rw-r--r--source/blender/makesrna/intern/rna_material_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c188
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c13
-rw-r--r--source/blender/makesrna/intern/rna_meta.c12
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c441
-rw-r--r--source/blender/makesrna/intern/rna_nla.c26
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c154
-rw-r--r--source/blender/makesrna/intern/rna_nodetree_types.h5
-rw-r--r--source/blender/makesrna/intern/rna_object.c55
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c8
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c90
-rw-r--r--source/blender/makesrna/intern/rna_packedfile.c7
-rw-r--r--source/blender/makesrna/intern/rna_particle.c463
-rw-r--r--source/blender/makesrna/intern/rna_pose.c288
-rw-r--r--source/blender/makesrna/intern/rna_pose_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_render.c62
-rw-r--r--source/blender/makesrna/intern/rna_rna.c4
-rw-r--r--source/blender/makesrna/intern/rna_scene.c152
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c50
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c154
-rw-r--r--source/blender/makesrna/intern/rna_sequence.c13
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c49
-rw-r--r--source/blender/makesrna/intern/rna_sound.c29
-rw-r--r--source/blender/makesrna/intern/rna_space.c243
-rw-r--r--source/blender/makesrna/intern/rna_test.c189
-rw-r--r--source/blender/makesrna/intern/rna_texture.c282
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c34
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c409
-rw-r--r--source/blender/makesrna/intern/rna_wm.c9
-rw-r--r--source/blender/makesrna/intern/rna_world.c2
-rw-r--r--source/blender/nodes/CMP_node.h7
-rw-r--r--source/blender/nodes/CMakeLists.txt26
-rw-r--r--source/blender/nodes/SConscript8
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c4
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c4
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c132
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c174
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c145
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_levels.c337
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c2
-rw-r--r--source/blender/nodes/intern/CMP_util.c26
-rw-r--r--source/blender/nodes/intern/CMP_util.h5
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_rotate.c8
-rw-r--r--source/blender/nodes/intern/TEX_util.c44
-rw-r--r--source/blender/nodes/intern/TEX_util.h3
-rw-r--r--source/blender/python/CMakeLists.txt16
-rw-r--r--source/blender/python/SConscript4
-rw-r--r--source/blender/python/epy_doc_gen.py212
-rw-r--r--source/blender/python/generic/bpy_internal_import.h9
-rw-r--r--source/blender/python/generic/matrix.c43
-rw-r--r--source/blender/python/generic/vector.c50
-rw-r--r--source/blender/python/intern/bpy_array.c515
-rw-r--r--source/blender/python/intern/bpy_interface.c43
-rw-r--r--source/blender/python/intern/bpy_operator.c35
-rw-r--r--source/blender/python/intern/bpy_operator_wrap.c4
-rw-r--r--source/blender/python/intern/bpy_rna.c526
-rw-r--r--source/blender/python/intern/bpy_rna.h12
-rw-r--r--source/blender/python/intern/bpy_util.c38
-rw-r--r--source/blender/python/intern/bpy_util.h2
-rw-r--r--source/blender/quicktime/CMakeLists.txt24
-rw-r--r--source/blender/quicktime/SConscript4
-rw-r--r--source/blender/readblenfile/CMakeLists.txt2
-rw-r--r--source/blender/readblenfile/SConscript2
-rw-r--r--source/blender/readblenfile/intern/BLO_readblenfile.c1
-rw-r--r--source/blender/render/CMakeLists.txt17
-rw-r--r--source/blender/render/SConscript2
-rw-r--r--source/blender/render/extern/include/RE_shader_ext.h3
-rw-r--r--source/blender/render/intern/include/render_types.h47
-rw-r--r--source/blender/render/intern/include/shading.h6
-rw-r--r--source/blender/render/intern/include/texture.h1
-rw-r--r--source/blender/render/intern/include/volume_precache.h33
-rw-r--r--source/blender/render/intern/include/volumetric.h47
-rw-r--r--source/blender/render/intern/include/voxeldata.h45
-rw-r--r--source/blender/render/intern/source/Makefile2
-rw-r--r--source/blender/render/intern/source/convertblender.c189
-rw-r--r--source/blender/render/intern/source/envmap.c80
-rw-r--r--source/blender/render/intern/source/initrender.c2
-rw-r--r--source/blender/render/intern/source/occlusion.c4
-rw-r--r--source/blender/render/intern/source/pixelshading.c12
-rw-r--r--source/blender/render/intern/source/pointdensity.c484
-rw-r--r--source/blender/render/intern/source/rayshade.c76
-rw-r--r--source/blender/render/intern/source/raytrace.c2
-rw-r--r--source/blender/render/intern/source/rendercore.c2
-rw-r--r--source/blender/render/intern/source/shadbuf.c16
-rw-r--r--source/blender/render/intern/source/shadeinput.c44
-rw-r--r--source/blender/render/intern/source/shadeoutput.c10
-rw-r--r--source/blender/render/intern/source/texture.c255
-rw-r--r--source/blender/render/intern/source/volume_precache.c746
-rw-r--r--source/blender/render/intern/source/volumetric.c752
-rw-r--r--source/blender/render/intern/source/voxeldata.c346
-rw-r--r--source/blender/render/intern/source/zbuf.c2
-rw-r--r--source/blender/windowmanager/CMakeLists.txt46
-rw-r--r--source/blender/windowmanager/WM_api.h3
-rw-r--r--source/blender/windowmanager/WM_types.h58
-rw-r--r--source/blender/windowmanager/intern/Makefile1
-rw-r--r--source/blender/windowmanager/intern/wm.c4
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c65
-rw-r--r--source/blender/windowmanager/intern/wm_files.c62
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c5
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c127
-rw-r--r--source/blender/windowmanager/intern/wm_window.c8
-rw-r--r--source/blenderplayer/CMakeLists.txt144
-rw-r--r--source/blenderplayer/bad_level_call_stubs/CMakeLists.txt40
-rw-r--r--source/blenderplayer/bad_level_call_stubs/Makefile45
-rw-r--r--source/blenderplayer/bad_level_call_stubs/SConscript13
-rw-r--r--source/blenderplayer/bad_level_call_stubs/stubs.c200
-rw-r--r--source/creator/CMakeLists.txt586
-rw-r--r--source/creator/Makefile1
-rw-r--r--source/creator/SConscript10
-rw-r--r--source/creator/creator.c1
-rw-r--r--source/gameengine/BlenderRoutines/CMakeLists.txt71
-rw-r--r--source/gameengine/BlenderRoutines/KX_BlenderGL.cpp34
-rw-r--r--source/gameengine/BlenderRoutines/KX_BlenderGL.h4
-rw-r--r--source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp8
-rw-r--r--source/gameengine/BlenderRoutines/SConscript8
-rw-r--r--source/gameengine/CMakeLists.txt2
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.cpp449
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.h25
-rw-r--r--source/gameengine/Converter/BL_ArmatureObject.cpp2
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp11
-rw-r--r--source/gameengine/Converter/BL_ShapeActionActuator.cpp396
-rw-r--r--source/gameengine/Converter/BL_ShapeActionActuator.h23
-rw-r--r--source/gameengine/Converter/BL_ShapeDeformer.cpp4
-rw-r--r--source/gameengine/Converter/CMakeLists.txt72
-rw-r--r--source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp2
-rw-r--r--source/gameengine/Converter/KX_BlenderScalarInterpolator.h2
-rw-r--r--source/gameengine/Converter/KX_BlenderSceneConverter.cpp6
-rw-r--r--source/gameengine/Converter/KX_ConvertActuators.cpp2
-rw-r--r--source/gameengine/Converter/KX_ConvertProperties.cpp10
-rw-r--r--source/gameengine/Converter/KX_ConvertSensors.cpp1
-rw-r--r--source/gameengine/Converter/KX_IpoConvert.cpp2
-rw-r--r--source/gameengine/Converter/SConscript2
-rw-r--r--source/gameengine/Expressions/CMakeLists.txt14
-rw-r--r--source/gameengine/Expressions/ListValue.cpp9
-rw-r--r--source/gameengine/Expressions/ListValue.h1
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.cpp77
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.h5
-rw-r--r--source/gameengine/Expressions/SConscript8
-rw-r--r--source/gameengine/Expressions/Value.cpp8
-rw-r--r--source/gameengine/Expressions/Value.h2
-rw-r--r--source/gameengine/GameLogic/CMakeLists.txt20
-rw-r--r--source/gameengine/GameLogic/SCA_ActuatorSensor.cpp41
-rw-r--r--source/gameengine/GameLogic/SCA_ActuatorSensor.h5
-rw-r--r--source/gameengine/GameLogic/SCA_DelaySensor.cpp97
-rw-r--r--source/gameengine/GameLogic/SCA_DelaySensor.h8
-rw-r--r--source/gameengine/GameLogic/SCA_IController.cpp86
-rw-r--r--source/gameengine/GameLogic/SCA_IController.h6
-rw-r--r--source/gameengine/GameLogic/SCA_ILogicBrick.cpp45
-rw-r--r--source/gameengine/GameLogic/SCA_ILogicBrick.h4
-rw-r--r--source/gameengine/GameLogic/SCA_ISensor.cpp191
-rw-r--r--source/gameengine/GameLogic/SCA_ISensor.h15
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickSensor.cpp242
-rw-r--r--source/gameengine/GameLogic/SCA_JoystickSensor.h21
-rw-r--r--source/gameengine/GameLogic/SCA_KeyboardSensor.cpp199
-rw-r--r--source/gameengine/GameLogic/SCA_KeyboardSensor.h21
-rw-r--r--source/gameengine/GameLogic/SCA_MouseSensor.cpp33
-rw-r--r--source/gameengine/GameLogic/SCA_MouseSensor.h8
-rw-r--r--source/gameengine/GameLogic/SCA_PropertyActuator.cpp73
-rw-r--r--source/gameengine/GameLogic/SCA_PropertyActuator.h8
-rw-r--r--source/gameengine/GameLogic/SCA_PropertyEventManager.h11
-rw-r--r--source/gameengine/GameLogic/SCA_PropertySensor.cpp115
-rw-r--r--source/gameengine/GameLogic/SCA_PropertySensor.h12
-rw-r--r--source/gameengine/GameLogic/SCA_PythonController.cpp52
-rw-r--r--source/gameengine/GameLogic/SCA_RandomActuator.cpp107
-rw-r--r--source/gameengine/GameLogic/SCA_RandomActuator.h10
-rw-r--r--source/gameengine/GameLogic/SCA_RandomSensor.cpp44
-rw-r--r--source/gameengine/GameLogic/SCA_RandomSensor.h7
-rw-r--r--source/gameengine/GameLogic/SConscript6
-rw-r--r--source/gameengine/GamePlayer/CMakeLists.txt2
-rw-r--r--source/gameengine/GamePlayer/common/CMakeLists.txt84
-rw-r--r--source/gameengine/GamePlayer/common/GPC_Engine.cpp11
-rw-r--r--source/gameengine/GamePlayer/common/GPC_Engine.h3
-rw-r--r--source/gameengine/GamePlayer/common/SConscript8
-rw-r--r--source/gameengine/GamePlayer/ghost/CMakeLists.txt77
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Application.cpp26
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Application.h3
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp11
-rw-r--r--source/gameengine/GamePlayer/ghost/SConscript12
-rw-r--r--source/gameengine/Ketsji/CMakeLists.txt73
-rw-r--r--source/gameengine/Ketsji/KXNetwork/CMakeLists.txt20
-rw-r--r--source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp85
-rw-r--r--source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h7
-rw-r--r--source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp90
-rw-r--r--source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h9
-rw-r--r--source/gameengine/Ketsji/KXNetwork/SConscript9
-rw-r--r--source/gameengine/Ketsji/KX_Camera.cpp92
-rw-r--r--source/gameengine/Ketsji/KX_Camera.h3
-rw-r--r--source/gameengine/Ketsji/KX_CameraActuator.cpp169
-rw-r--r--source/gameengine/Ketsji/KX_CameraActuator.h12
-rw-r--r--source/gameengine/Ketsji/KX_ConstraintActuator.cpp338
-rw-r--r--source/gameengine/Ketsji/KX_ConstraintActuator.h22
-rw-r--r--source/gameengine/Ketsji/KX_GameActuator.cpp37
-rw-r--r--source/gameengine/Ketsji/KX_GameActuator.h5
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp208
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.h13
-rw-r--r--source/gameengine/Ketsji/KX_IpoActuator.cpp276
-rw-r--r--source/gameengine/Ketsji/KX_IpoActuator.h31
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp10
-rw-r--r--source/gameengine/Ketsji/KX_MeshProxy.cpp20
-rw-r--r--source/gameengine/Ketsji/KX_MouseFocusSensor.cpp91
-rw-r--r--source/gameengine/Ketsji/KX_MouseFocusSensor.h17
-rw-r--r--source/gameengine/Ketsji/KX_ObjectActuator.cpp331
-rw-r--r--source/gameengine/Ketsji/KX_ObjectActuator.h23
-rw-r--r--source/gameengine/Ketsji/KX_ParentActuator.cpp55
-rw-r--r--source/gameengine/Ketsji/KX_ParentActuator.h5
-rw-r--r--source/gameengine/Ketsji/KX_PolyProxy.cpp10
-rw-r--r--source/gameengine/Ketsji/KX_PyMath.cpp8
-rw-r--r--source/gameengine/Ketsji/KX_PyMath.h9
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp60
-rw-r--r--source/gameengine/Ketsji/KX_PythonInitTypes.cpp3
-rw-r--r--source/gameengine/Ketsji/KX_PythonSeq.cpp40
-rw-r--r--source/gameengine/Ketsji/KX_RadarSensor.cpp54
-rw-r--r--source/gameengine/Ketsji/KX_RadarSensor.h5
-rw-r--r--source/gameengine/Ketsji/KX_RaySensor.cpp71
-rw-r--r--source/gameengine/Ketsji/KX_RaySensor.h6
-rw-r--r--source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp209
-rw-r--r--source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h19
-rw-r--r--source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp39
-rw-r--r--source/gameengine/Ketsji/KX_SCA_DynamicActuator.h5
-rw-r--r--source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp34
-rw-r--r--source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h9
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp161
-rw-r--r--source/gameengine/Ketsji/KX_Scene.h35
-rw-r--r--source/gameengine/Ketsji/KX_SceneActuator.cpp121
-rw-r--r--source/gameengine/Ketsji/KX_SceneActuator.h16
-rw-r--r--source/gameengine/Ketsji/KX_SoundActuator.cpp117
-rw-r--r--source/gameengine/Ketsji/KX_SoundActuator.h12
-rw-r--r--source/gameengine/Ketsji/KX_StateActuator.cpp55
-rw-r--r--source/gameengine/Ketsji/KX_StateActuator.h4
-rw-r--r--source/gameengine/Ketsji/KX_TouchSensor.cpp108
-rw-r--r--source/gameengine/Ketsji/KX_TouchSensor.h18
-rw-r--r--source/gameengine/Ketsji/KX_TrackToActuator.cpp127
-rw-r--r--source/gameengine/Ketsji/KX_TrackToActuator.h13
-rw-r--r--source/gameengine/Ketsji/KX_VisibilityActuator.cpp27
-rw-r--r--source/gameengine/Ketsji/KX_VisibilityActuator.h5
-rw-r--r--source/gameengine/Ketsji/SConscript6
-rw-r--r--source/gameengine/Network/CMakeLists.txt8
-rw-r--r--source/gameengine/Network/LoopBackNetwork/CMakeLists.txt8
-rw-r--r--source/gameengine/Network/LoopBackNetwork/SConscript2
-rw-r--r--source/gameengine/Network/SConscript2
-rw-r--r--source/gameengine/Physics/Bullet/CMakeLists.txt34
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.cpp4
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp4
-rw-r--r--source/gameengine/Physics/Bullet/SConscript8
-rw-r--r--source/gameengine/Physics/Dummy/CMakeLists.txt4
-rw-r--r--source/gameengine/Physics/Dummy/SConscript2
-rw-r--r--source/gameengine/Physics/common/CMakeLists.txt6
-rw-r--r--source/gameengine/Physics/common/SConscript8
-rw-r--r--source/gameengine/PyDoc/GameLogic.py8
-rw-r--r--source/gameengine/PyDoc/GameTypes.py28
-rw-r--r--source/gameengine/Rasterizer/CMakeLists.txt18
-rw-r--r--source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp4
-rw-r--r--source/gameengine/Rasterizer/RAS_MaterialBucket.h3
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt24
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript8
-rw-r--r--source/gameengine/Rasterizer/RAS_Polygon.cpp15
-rw-r--r--source/gameengine/Rasterizer/RAS_Polygon.h1
-rw-r--r--source/gameengine/Rasterizer/SConscript8
-rw-r--r--source/gameengine/SceneGraph/CMakeLists.txt4
-rw-r--r--source/gameengine/SceneGraph/SConscript8
-rw-r--r--source/gameengine/VideoTexture/CMakeLists.txt50
-rw-r--r--source/gameengine/VideoTexture/Exception.cpp8
-rw-r--r--source/gameengine/VideoTexture/ImageBase.cpp8
-rw-r--r--source/gameengine/VideoTexture/SConscript8
-rw-r--r--source/icons/SConscript2
-rw-r--r--source/kernel/CMakeLists.txt10
-rw-r--r--source/kernel/SConscript2
-rw-r--r--source/nan_definitions.mk25
-rw-r--r--tools/Blender.py19
-rwxr-xr-xtools/btools.py26
808 files changed, 36554 insertions, 57452 deletions
diff --git a/CMake/macros.cmake b/CMake/macros.cmake
index 6a337505c00..9ba33dfb158 100644
--- a/CMake/macros.cmake
+++ b/CMake/macros.cmake
@@ -70,9 +70,6 @@ MACRO(SETUP_LIBDIRS)
IF(WITH_JACK)
LINK_DIRECTORIES(${JACK_LIBPATH})
ENDIF(WITH_JACK)
- IF(WITH_SNDFILE)
- LINK_DIRECTORIES(${SNDFILE_LIBPATH})
- ENDIF(WITH_SNDFILE)
IF(WITH_FFTW3)
LINK_DIRECTORIES(${FFTW3_LIBPATH})
ENDIF(WITH_FFTW3)
@@ -121,9 +118,6 @@ MACRO(SETUP_LIBLINKS
IF(WITH_JACK)
TARGET_LINK_LIBRARIES(${target} ${JACK_LIB})
ENDIF(WITH_JACK)
- IF(WITH_SNDFILE)
- TARGET_LINK_LIBRARIES(${target} ${SNDFILE_LIB})
- ENDIF(WITH_SNDFILE)
IF(WITH_SDL)
TARGET_LINK_LIBRARIES(${target} ${SDL_LIBRARY})
ENDIF(WITH_SDL)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7196049f964..2f12d342726 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,11 +34,11 @@ IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
MESSAGE(FATAL_ERROR "CMake generation for blender is not allowed within the source directory!
Remove the CMakeCache.txt file and try again from another folder, e.g.:
- rm CMakeCache.txt
- cd ..
- mkdir cmake-make
- cd cmake-make
- cmake -G \"Unix Makefiles\" ../blender
+ rm CMakeCache.txt
+ cd ..
+ mkdir cmake-make
+ cd cmake-make
+ cmake -G \"Unix Makefiles\" ../blender
")
ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
@@ -70,13 +70,11 @@ OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)"
OPTION(WITH_WEBPLUGIN "Enable Web Plugin (Unix only)" OFF)
OPTION(WITH_FFTW3 "Enable FFTW3 support" OFF)
OPTION(WITH_JACK "Enable Jack Support (http://www.jackaudio.org)" OFF)
-OPTION(WITH_SNDFILE "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF)
-OPTION(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation" OFF)
-# OPTION(WITH_BUILDINFO "Include extra build details" ON)
+OPTION(WITH_CXX_GUARDEDALLOC "" OFF)
OPTION(WITH_INSTALL "Install accompanying scripts and language files needed to run blender" ON)
IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
- MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
+ MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
# For alternate Python locations the commandline can be used to override detected/default cache settings, e.g:
@@ -95,434 +93,398 @@ INCLUDE(CMake/macros.cmake)
#Platform specifics
IF(UNIX AND NOT APPLE)
- IF(WITH_OPENAL)
- FIND_PACKAGE(OpenAL)
- IF(OPENAL_FOUND)
- SET(WITH_OPENAL ON)
- ELSE(OPENAL_FOUND)
- SET(WITH_OPENAL OFF)
- ENDIF(OPENAL_FOUND)
- ENDIF(WITH_OPENAL)
-
- IF(WITH_JACK)
- SET(JACK /usr)
- SET(JACK_INC ${JACK}/include/jack)
- SET(JACK_LIB jack)
- SET(JACK_LIBPATH ${JACK}/lib)
- ENDIF(WITH_JACK)
-
- IF(WITH_SNDFILE)
- SET(SNDFILE /usr)
- SET(SNDFILE_INC ${SNDFILE}/include)
- SET(SNDFILE_LIB sndfile)
- SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
- ENDIF(WITH_SNDFILE)
-
- FIND_LIBRARY(INTL_LIBRARY
- NAMES intl
- PATHS
- /sw/lib
- )
- FIND_LIBRARY(ICONV_LIBRARY
- NAMES iconv
- PATHS
- /sw/lib
- )
+ IF(WITH_OPENAL)
+ FIND_PACKAGE(OpenAL)
+ IF(OPENAL_FOUND)
+ SET(WITH_OPENAL ON)
+ ELSE(OPENAL_FOUND)
+ SET(WITH_OPENAL OFF)
+ ENDIF(OPENAL_FOUND)
+ ENDIF(WITH_OPENAL)
+
+ IF(WITH_JACK)
+ SET(JACK /usr)
+ SET(JACK_INC ${JACK}/include/jack)
+ SET(JACK_LIB jack)
+ SET(JACK_LIBPATH ${JACK}/lib)
+ ENDIF(WITH_JACK)
+
+ FIND_LIBRARY(INTL_LIBRARY
+ NAMES intl
+ PATHS
+ /sw/lib
+ )
+ FIND_LIBRARY(ICONV_LIBRARY
+ NAMES iconv
+ PATHS
+ /sw/lib
+ )
- IF(INTL_LIBRARY AND ICONV_LIBRARY)
- SET(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
- ENDIF(INTL_LIBRARY AND ICONV_LIBRARY)
-
- FIND_PACKAGE(Freetype)
- # UNSET(FREETYPE_INCLUDE_DIRS CACHE) # cant use
-
- # No way to set py31. remove for now.
- # FIND_PACKAGE(PythonLibs)
- SET(PYTHON /usr)
- SET(PYTHON_VERSION 3.1)
- SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
- # SET(PYTHON_BINARY python) # not used yet
- SET(PYTHON_LIB python${PYTHON_VERSION} CACHE STRING "")
- SET(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "")
+ IF(INTL_LIBRARY AND ICONV_LIBRARY)
+ SET(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
+ ENDIF(INTL_LIBRARY AND ICONV_LIBRARY)
+
+ FIND_PACKAGE(Freetype)
+ # UNSET(FREETYPE_INCLUDE_DIRS CACHE) # cant use
+
+ # No way to set py31. remove for now.
+ # FIND_PACKAGE(PythonLibs)
+ SET(PYTHON /usr)
+ SET(PYTHON_VERSION 3.1)
+ SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
+ # SET(PYTHON_BINARY python) # not used yet
+ SET(PYTHON_LIB python${PYTHON_VERSION} CACHE STRING "")
+ SET(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "")
- # FIND_PACKAGE(PythonInterp) # not used yet
- # SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
+ # FIND_PACKAGE(PythonInterp) # not used yet
+ # SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
- SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
-
- IF(WITH_SDL)
- FIND_PACKAGE(SDL)
- # UNSET(SDLMAIN_LIBRARY CACHE)
- IF(NOT SDL_FOUND)
- SET(WITH_SDL OFF)
- ENDIF(NOT SDL_FOUND)
- ENDIF(WITH_SDL)
-
- FIND_PATH(OPENEXR_INC
- ImfXdr.h
- PATHS
- /usr/local/include/OpenEXR
- /usr/include/OpenEXR
- /sw/include/OpenEXR
- /opt/local/include/OpenEXR
- /opt/csw/include/OpenEXR
- /opt/include/OpenEXR
- )
- SET(OPENEXR_LIB Half IlmImf Iex Imath)
-
- SET(FFMPEG /usr)
- SET(FFMPEG_INC ${FFMPEG}/include)
- SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale)
- SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+ SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
+
+ IF(WITH_SDL)
+ FIND_PACKAGE(SDL)
+ # UNSET(SDLMAIN_LIBRARY CACHE)
+ IF(NOT SDL_FOUND)
+ SET(WITH_SDL OFF)
+ ENDIF(NOT SDL_FOUND)
+ ENDIF(WITH_SDL)
+
+ FIND_PATH(OPENEXR_INC
+ ImfXdr.h
+ PATHS
+ /usr/local/include/OpenEXR
+ /usr/include/OpenEXR
+ /sw/include/OpenEXR
+ /opt/local/include/OpenEXR
+ /opt/csw/include/OpenEXR
+ /opt/include/OpenEXR
+ )
+ SET(OPENEXR_LIB Half IlmImf Iex Imath)
+
+ SET(FFMPEG /usr)
+ SET(FFMPEG_INC ${FFMPEG}/include)
+ SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale)
+ SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
- IF(WITH_FFTW3)
- SET(FFTW3 /usr)
- SET(FFTW3_INC ${FFTW3}/include)
- SET(FFTW3_LIB fftw3)
- SET(FFTW3_LIBPATH ${FFTW3}/lib)
- ENDIF(WITH_FFTW3)
+ IF(WITH_FFTW3)
+ SET(FFTW3 /usr)
+ SET(FFTW3_INC ${FFTW3}/include)
+ SET(FFTW3_LIB fftw3)
+ SET(FFTW3_LIBPATH ${FFTW3}/lib)
+ ENDIF(WITH_FFTW3)
- SET(LIBSAMPLERATE /usr)
- SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
- SET(LIBSAMPLERATE_LIB samplerate)
- SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+ SET(LIBSAMPLERATE /usr)
+ SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
+ SET(LIBSAMPLERATE_LIB samplerate)
+ SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
- FIND_PACKAGE(JPEG REQUIRED)
+ FIND_PACKAGE(JPEG REQUIRED)
- FIND_PACKAGE(PNG REQUIRED)
+ FIND_PACKAGE(PNG REQUIRED)
- FIND_PACKAGE(ZLIB REQUIRED)
+ FIND_PACKAGE(ZLIB REQUIRED)
- # Could use ${X11_Xinput_LIB} ${X11_X11_LIB} too
- SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++ -lX11")
+ # Could use ${X11_Xinput_LIB} ${X11_X11_LIB} too
+ SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++ -lX11")
- IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
- # BSD's dont use libdl.so
- SET(LLIBS "${LLIBS} -ldl")
- ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ # BSD's dont use libdl.so
+ SET(LLIBS "${LLIBS} -ldl")
+ ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
- IF(WITH_OPENMP)
- SET(LLIBS "${LLIBS} -lgomp")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
- ENDIF(WITH_OPENMP)
+ IF(WITH_OPENMP)
+ SET(LLIBS "${LLIBS} -lgomp")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
+ ENDIF(WITH_OPENMP)
- SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -DXP_UNIX -Wno-char-subscripts")
+ SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -DXP_UNIX -Wno-char-subscripts")
- SET(PLATFORM_LINKFLAGS "-pthread")
+ SET(PLATFORM_LINKFLAGS "-pthread")
- # Better warnings
- SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement")
- SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
+ # Better warnings
+ SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wnested-externs -Wdeclaration-after-statement")
+ SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
- INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
+ INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
ENDIF(UNIX AND NOT APPLE)
IF(WIN32)
- # this file is included anyway when building under Windows with cl.exe
- # INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
+ # this file is included anyway when building under Windows with cl.exe
+ # INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
- SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
-
- # Setup 64bit and 64bit windows systems
- IF(CMAKE_CL_64)
- message("64 bit compiler detected.")
- SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
- ENDIF(CMAKE_CL_64)
-
- SET(PYTHON ${LIBDIR}/python)
- SET(PYTHON_VERSION 3.1)
- SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
- # SET(PYTHON_BINARY python) # not used yet
- SET(PYTHON_LIB python31)
- SET(PYTHON_LIBPATH ${PYTHON}/lib)
-
- IF(CMAKE_CL_64)
- SET(WITH_OPENAL OFF)
- ELSE(CMAKE_CL_64)
- #SET(WITH_OPENAL ON)
- SET(OPENAL ${LIBDIR}/openal)
- SET(OPENAL_INCLUDE_DIR ${OPENAL}/include)
- SET(OPENAL_LIBRARY wrap_oal)
- SET(OPENAL_LIBPATH ${OPENAL}/lib)
- ENDIF(CMAKE_CL_64)
-
- IF(WITH_JACK)
- SET(JACK ${LIBDIR}/jack)
- SET(JACK_INC ${JACK}/include/jack ${JACK}/include)
- SET(JACK_LIB libjack)
- SET(JACK_LIBPATH ${JACK}/lib)
- ENDIF(WITH_JACK)
-
- IF(WITH_SNDFILE)
- SET(SNDFILE ${LIBDIR}/sndfile)
- SET(SNDFILE_INC ${SNDFILE}/include)
- SET(SNDFILE_LIB libsndfile-1)
- SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
- ENDIF(WITH_SNDFILE)
-
- IF(CMAKE_CL_64)
- SET(PNG_LIBRARIES libpng)
- ELSE(CMAKE_CL_64)
- SET(PNG_LIBRARIES libpng_st)
- ENDIF(CMAKE_CL_64)
- SET(JPEG_LIBRARY libjpeg)
-
- SET(ZLIB ${LIBDIR}/zlib)
- SET(ZLIB_INC ${ZLIB}/include)
- IF(CMAKE_CL_64)
- SET(ZLIB_LIBRARIES libz)
- ELSE(CMAKE_CL_64)
- SET(ZLIB_LIBRARIES zlib)
- ENDIF(CMAKE_CL_64)
- SET(ZLIB_LIBPATH ${ZLIB}/lib)
+ SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
+
+ # Setup 64bit and 64bit windows systems
+ IF(CMAKE_CL_64)
+ message("64 bit compiler detected.")
+ SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
+ ENDIF(CMAKE_CL_64)
+
+ SET(PYTHON ${LIBDIR}/python)
+ SET(PYTHON_VERSION 3.1)
+ SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
+ # SET(PYTHON_BINARY python) # not used yet
+ SET(PYTHON_LIB python31)
+ SET(PYTHON_LIBPATH ${PYTHON}/lib)
+
+ IF(CMAKE_CL_64)
+ SET(WITH_OPENAL OFF)
+ ELSE(CMAKE_CL_64)
+ #SET(WITH_OPENAL ON)
+ SET(OPENAL ${LIBDIR}/openal)
+ SET(OPENAL_INCLUDE_DIR ${OPENAL}/include)
+ SET(OPENAL_LIBRARY wrap_oal)
+ SET(OPENAL_LIBPATH ${OPENAL}/lib)
+ ENDIF(CMAKE_CL_64)
+
+ IF(WITH_JACK)
+ SET(JACK ${LIBDIR}/jack)
+ SET(JACK_INC ${JACK}/include/jack)
+ SET(JACK_LIB jack)
+ SET(JACK_LIBPATH ${JACK}/lib)
+ ENDIF(WITH_JACK)
+
+ IF(CMAKE_CL_64)
+ SET(PNG_LIBRARIES libpng)
+ ELSE(CMAKE_CL_64)
+ SET(PNG_LIBRARIES libpng_st)
+ ENDIF(CMAKE_CL_64)
+ SET(JPEG_LIBRARY libjpeg)
+
+ SET(ZLIB ${LIBDIR}/zlib)
+ SET(ZLIB_INC ${ZLIB}/include)
+ SET(ZLIB_LIBRARIES zlib)
+ SET(ZLIB_LIBPATH ${ZLIB}/lib)
- SET(PTHREADS ${LIBDIR}/pthreads)
- SET(PTHREADS_INC ${PTHREADS}/include)
- SET(PTHREADS_LIB pthreadVC2)
- SET(PTHREADS_LIBPATH ${PTHREADS}/lib)
+ SET(PTHREADS ${LIBDIR}/pthreads)
+ SET(PTHREADS_INC ${PTHREADS}/include)
+ SET(PTHREADS_LIB pthreadVC2)
+ SET(PTHREADS_LIBPATH ${PTHREADS}/lib)
- SET(ICONV ${LIBDIR}/iconv)
- SET(ICONV_INC ${ICONV}/include)
- SET(ICONV_LIB iconv)
- SET(ICONV_LIBPATH ${ICONV}/lib)
+ SET(ICONV ${LIBDIR}/iconv)
+ SET(ICONV_INC ${ICONV}/include)
+ SET(ICONV_LIB iconv)
+ SET(ICONV_LIBPATH ${ICONV}/lib)
- IF(WITH_FFTW3)
- SET(FFTW3 ${LIBDIR}/fftw3)
- SET(FFTW3_INC ${FFTW3}/include)
- SET(FFTW3_LIB libfftw)
- SET(FFTW3_LIBPATH ${FFTW3}/lib)
- ENDIF(WITH_FFTW3)
+ IF(WITH_FFTW3)
+ SET(FFTW3 ${LIBDIR}/fftw3)
+ SET(FFTW3_INC ${FFTW3}/include)
+ SET(FFTW3_LIB libfftw)
+ SET(FFTW3_LIBPATH ${FFTW3}/lib)
+ ENDIF(WITH_FFTW3)
- SET(GETTEXT ${LIBDIR}/gettext)
- SET(GETTEXT_INC ${GETTEXT}/include)
- IF(CMAKE_CL_64)
- SET(GETTEXT_LIB gettext)
- ELSE(CMAKE_CL_64)
- SET(GETTEXT_LIB gnu_gettext)
- ENDIF(CMAKE_CL_64)
- SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
-
- SET(FREETYPE ${LIBDIR}/freetype)
- SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
- SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
- SET(FREETYPE_LIBRARY freetype2ST)
+ SET(GETTEXT ${LIBDIR}/gettext)
+ SET(GETTEXT_INC ${GETTEXT}/include)
+ IF(CMAKE_CL_64)
+ SET(GETTEXT_LIB gettextlib)
+ ELSE(CMAKE_CL_64)
+ SET(GETTEXT_LIB gnu_gettext)
+ ENDIF(CMAKE_CL_64)
+ SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
+
+ SET(FREETYPE ${LIBDIR}/freetype)
+ SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
+ SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
+ SET(FREETYPE_LIBRARY freetype2ST)
- SET(OPENEXR ${LIBDIR}/openexr)
- SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath)
- SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
- IF (MSVC80)
- SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005)
- ELSE (MSVC80)
- SET(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc)
- ENDIF(MSVC80)
- IF (MSVC90)
- SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008)
- ENDIF(MSVC90)
+ SET(OPENEXR ${LIBDIR}/openexr)
+ SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath)
+ SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
+ IF (MSVC80)
+ SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005)
+ ELSE (MSVC80)
+ SET(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc)
+ ENDIF(MSVC80)
+ IF (MSVC90)
+ SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008)
+ ENDIF(MSVC90)
- SET(QUICKTIME ${LIBDIR}/QTDevWin)
- SET(QUICKTIME_INC ${QUICKTIME}/CIncludes)
- SET(QUICKTIME_LIB qtmlClient)
- SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
-
- SET(FFMPEG ${LIBDIR}/ffmpeg)
- SET(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include/msvc)
- SET(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
- SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
-
- SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
- SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
- SET(LIBSAMPLERATE_LIB libsamplerate)
- SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
-
- IF(CMAKE_CL_64)
- SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
- ELSE(CMAKE_CL_64)
- SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
- ENDIF(CMAKE_CL_64)
-
- SET(CMAKE_CXX_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
- SET(CMAKE_CXX_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
- SET(CMAKE_CXX_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
- SET(CMAKE_C_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
- SET(CMAKE_C_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
- SET(CMAKE_C_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
-
- IF(WITH_OPENMP)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /openmp ")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp ")
- ENDIF(WITH_OPENMP)
-
- SET(SDL ${LIBDIR}/sdl)
- SET(SDL_INCLUDE_DIR ${SDL}/include)
- SET(SDL_LIBRARY SDL)
- SET(SDL_LIBPATH ${SDL}/lib)
-
- SET(PNG "${LIBDIR}/png")
- SET(PNG_INC "${PNG}/include")
- SET(PNG_LIBPATH ${PNG}/lib)
-
- SET(JPEG "${LIBDIR}/jpeg")
- SET(JPEG_INC "${JPEG}/include")
- SET(JPEG_LIBPATH ${JPEG}/lib)
-
- SET(TIFF ${LIBDIR}/tiff)
- SET(TIFF_INC ${TIFF}/include)
+ SET(QUICKTIME ${LIBDIR}/QTDevWin)
+ SET(QUICKTIME_INC ${QUICKTIME}/CIncludes)
+ SET(QUICKTIME_LIB qtmlClient)
+ SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
+
+ SET(FFMPEG ${LIBDIR}/ffmpeg)
+ SET(FFMPEG_INC ${FFMPEG}/include)
+ SET(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
+ SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+
+ SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
+ SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
+ SET(LIBSAMPLERATE_LIB libsamplerate)
+ SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+
+ IF(CMAKE_CL_64)
+ SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
+ ELSE(CMAKE_CL_64)
+ SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
+ ENDIF(CMAKE_CL_64)
+
+ SET(CMAKE_CXX_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
+ SET(CMAKE_CXX_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
+ SET(CMAKE_CXX_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
+ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
+ SET(CMAKE_C_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
+ SET(CMAKE_C_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
+ SET(CMAKE_C_FLAGS_MINSIZEREL "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
+ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
+
+ IF(WITH_OPENMP)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /openmp ")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp ")
+ ENDIF(WITH_OPENMP)
+
+ SET(SDL ${LIBDIR}/sdl)
+ SET(SDL_INCLUDE_DIR ${SDL}/include)
+ SET(SDL_LIBRARY SDL)
+ SET(SDL_LIBPATH ${SDL}/lib)
+
+ SET(PNG "${LIBDIR}/png")
+ SET(PNG_INC "${PNG}/include")
+ SET(PNG_LIBPATH ${PNG}/lib)
+
+ SET(JPEG "${LIBDIR}/jpeg")
+ SET(JPEG_INC "${JPEG}/include")
+ SET(JPEG_LIBPATH ${JPEG}/lib)
+
+ SET(TIFF ${LIBDIR}/tiff)
+ SET(TIFF_INC ${TIFF}/include)
- SET(WINTAB_INC ${LIBDIR}/wintab/include)
+ SET(WINTAB_INC ${LIBDIR}/wintab/include)
- IF(CMAKE_CL_64)
- SET(PLATFORM_LINKFLAGS "/MACHINE:X64 /NODEFAULTLIB:libc.lib;MSVCRT.lib ")
- ELSE(CMAKE_CL_64)
- SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ")
- ENDIF(CMAKE_CL_64)
+ IF(CMAKE_CL_64)
+ SET(PLATFORM_LINKFLAGS "/MANIFEST:NO /MANIFESTUAC:NO /MACHINE:X64 /NODEFAULTLIB:libc.lib;MSVCRT.lib ")
+ ELSE(CMAKE_CL_64)
+ SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ")
+ ENDIF(CMAKE_CL_64)
- SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
+ SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
ENDIF(WIN32)
IF(APPLE)
- IF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
- SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.x.i386)
- ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386)
- SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-6.1-powerpc)
- ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
-
- IF(WITH_OPENAL)
- FIND_PACKAGE(OpenAL)
- IF(OPENAL_FOUND)
- SET(WITH_OPENAL ON)
- ELSE(OPENAL_FOUND)
- SET(WITH_OPENAL OFF)
- ENDIF(OPENAL_FOUND)
- ENDIF(WITH_OPENAL)
-
- IF(WITH_JACK)
- SET(JACK /usr)
- SET(JACK_INC ${JACK}/include/jack)
- SET(JACK_LIB jack)
- SET(JACK_LIBPATH ${JACK}/lib)
- ENDIF(WITH_JACK)
-
- IF(WITH_SNDFILE)
- SET(SNDFILE /usr)
- SET(SNDFILE_INC ${SNDFILE}/include)
- SET(SNDFILE_LIB sndfile)
- SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
- ENDIF(WITH_SNDFILE)
-
- SET(PYTHON_VERSION 3.1)
-
- IF(PYTHON_VERSION MATCHES 3.1)
- # we use precompiled libraries for py 3.1 and up by default
-
- SET(PYTHON ${LIBDIR}/python)
- SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
- # SET(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}" CACHE STRING "") # not used yet
- SET(PYTHON_LIB python${PYTHON_VERSION})
- SET(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}" CACHE STRING "")
- # SET(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
- ELSE(PYTHON_VERSION MATCHES 3.1)
- # otherwise, use custom system framework
-
- SET(PYTHON /System/Library/Frameworks/Python.framework/Versions/)
- SET(PYTHON_VERSION 2.5)
- SET(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}" CACHE STRING "")
- # SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION} CACHE STRING "") # not used yet
- SET(PYTHON_LIB "")
- SET(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config CACHE STRING "")
- SET(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python")
- ENDIF(PYTHON_VERSION MATCHES 3.1)
-
- SET(GETTEXT ${LIBDIR}/gettext)
- SET(GETTEXT_INC "${GETTEXT}/include")
- SET(GETTEXT_LIB intl iconv)
- SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
+ IF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
+ SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.x.i386)
+ ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386)
+ SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-6.1-powerpc)
+ ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
+
+ IF(WITH_OPENAL)
+ FIND_PACKAGE(OpenAL)
+ IF(OPENAL_FOUND)
+ SET(WITH_OPENAL ON)
+ ELSE(OPENAL_FOUND)
+ SET(WITH_OPENAL OFF)
+ ENDIF(OPENAL_FOUND)
+ ENDIF(WITH_OPENAL)
+
+ IF(WITH_JACK)
+ SET(JACK /usr)
+ SET(JACK_INC ${JACK}/include/jack)
+ SET(JACK_LIB jack)
+ SET(JACK_LIBPATH ${JACK}/lib)
+ ENDIF(WITH_JACK)
+
+ SET(PYTHON_VERSION 3.1)
+
+ IF(PYTHON_VERSION MATCHES 3.1)
+ # we use precompiled libraries for py 3.1 and up by default
+
+ SET(PYTHON ${LIBDIR}/python)
+ SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
+ # SET(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}" CACHE STRING "") # not used yet
+ SET(PYTHON_LIB python${PYTHON_VERSION})
+ SET(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}" CACHE STRING "")
+ # SET(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
+ ELSE(PYTHON_VERSION MATCHES 3.1)
+ # otherwise, use custom system framework
+
+ SET(PYTHON /System/Library/Frameworks/Python.framework/Versions/)
+ SET(PYTHON_VERSION 2.5)
+ SET(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}" CACHE STRING "")
+ # SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION} CACHE STRING "") # not used yet
+ SET(PYTHON_LIB "")
+ SET(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config CACHE STRING "")
+ SET(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python")
+ ENDIF(PYTHON_VERSION MATCHES 3.1)
+
+ SET(GETTEXT ${LIBDIR}/gettext)
+ SET(GETTEXT_INC "${GETTEXT}/include")
+ SET(GETTEXT_LIB intl iconv)
+ SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
- IF(WITH_FFTW3)
- SET(FFTW3 ${LIBDIR}/fftw3)
- SET(FFTW3_INC ${FFTW3}/include)
- SET(FFTW3_LIB libfftw)
- SET(FFTW3_LIBPATH ${FFTW3}/lib)
- ENDIF(WITH_FFTW3)
-
- SET(PNG_LIBRARIES png)
- SET(JPEG_LIBRARY jpeg)
-
- SET(ZLIB /usr)
- SET(ZLIB_INC "${ZLIB}/include")
- SET(ZLIB_LIBRARIES z)
-
- SET(FREETYPE ${LIBDIR}/freetype)
- SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
- SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
- SET(FREETYPE_LIBRARY freetype)
-
- SET(OPENEXR ${LIBDIR}/openexr)
- SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include)
- SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
- SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
-
- SET(FFMPEG ${LIBDIR}/ffmpeg)
- SET(FFMPEG_INC ${CMAKE_SOURCE_DIR}/extern/ffmpeg)
- SET(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore)
- SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
-
- SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
- SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
- SET(LIBSAMPLERATE_LIB samplerate)
- SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
-
- SET(LLIBS stdc++ SystemStubs)
-
- SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
- SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
-
- IF(WITH_OPENMP)
- SET(LLIBS "${LLIBS} -lgomp ")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp ")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ")
- ENDIF(WITH_OPENMP)
-
- SET(SDL ${LIBDIR}/sdl)
- SET(SDL_INCLUDE_DIR ${SDL}/include)
- SET(SDL_LIBRARY SDL)
- SET(SDL_LIBPATH ${SDL}/lib)
-
- SET(PNG "${LIBDIR}/png")
- SET(PNG_INC "${PNG}/include")
- SET(PNG_LIBPATH ${PNG}/lib)
-
- SET(JPEG "${LIBDIR}/jpeg")
- SET(JPEG_INC "${JPEG}/include")
- SET(JPEG_LIBPATH ${JPEG}/lib)
-
- SET(TIFF ${LIBDIR}/tiff)
- SET(TIFF_INC ${TIFF}/include)
-
- SET(EXETYPE MACOSX_BUNDLE)
+ IF(WITH_FFTW3)
+ SET(FFTW3 ${LIBDIR}/fftw3)
+ SET(FFTW3_INC ${FFTW3}/include)
+ SET(FFTW3_LIB libfftw)
+ SET(FFTW3_LIBPATH ${FFTW3}/lib)
+ ENDIF(WITH_FFTW3)
+
+ SET(PNG_LIBRARIES png)
+ SET(JPEG_LIBRARY jpeg)
+
+ SET(ZLIB /usr)
+ SET(ZLIB_INC "${ZLIB}/include")
+ SET(ZLIB_LIBRARIES z)
+
+ SET(FREETYPE ${LIBDIR}/freetype)
+ SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
+ SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
+ SET(FREETYPE_LIBRARY freetype)
+
+ SET(OPENEXR ${LIBDIR}/openexr)
+ SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include)
+ SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
+ SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
+
+ SET(FFMPEG ${LIBDIR}/ffmpeg)
+ SET(FFMPEG_INC ${CMAKE_SOURCE_DIR}/extern/ffmpeg)
+ SET(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore)
+ SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+
+ SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
+ SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
+ SET(LIBSAMPLERATE_LIB samplerate)
+ SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+
+ SET(LLIBS stdc++ SystemStubs)
+
+ SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
+ SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
+
+ IF(WITH_OPENMP)
+ SET(LLIBS "${LLIBS} -lgomp ")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp ")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp ")
+ ENDIF(WITH_OPENMP)
+
+ SET(SDL ${LIBDIR}/sdl)
+ SET(SDL_INCLUDE_DIR ${SDL}/include)
+ SET(SDL_LIBRARY SDL)
+ SET(SDL_LIBPATH ${SDL}/lib)
+
+ SET(PNG "${LIBDIR}/png")
+ SET(PNG_INC "${PNG}/include")
+ SET(PNG_LIBPATH ${PNG}/lib)
+
+ SET(JPEG "${LIBDIR}/jpeg")
+ SET(JPEG_INC "${JPEG}/include")
+ SET(JPEG_LIBPATH ${JPEG}/lib)
+
+ SET(TIFF ${LIBDIR}/tiff)
+ SET(TIFF_INC ${TIFF}/include)
+
+ SET(EXETYPE MACOSX_BUNDLE)
ENDIF(APPLE)
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
- SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
- SET(BINRELOC_INC ${BINRELOC}/include)
+ SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
+ SET(BINRELOC_INC ${BINRELOC}/include)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-
-# TODO - buildinfo
-# IF(UNIX)
-# IF(WITH_BUILDINFO)
-# EXEC_PROGRAM("date \"+%Y-%m-%d\"" OUTPUT_VARIABLE BUILD_DATE)
-# EXEC_PROGRAM("date \"+%H:%M:%S\"" OUTPUT_VARIABLE BUILD_TIME)
-# EXEC_PROGRAM("svnversion ${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE BUILD_REV)
-# SET(BUILD_TYPE ${CMAKE_BUILD_TYPE})
-# ENDIF(WITH_BUILDINFO)
-# ENDIF(UNIX)
-
#-----------------------------------------------------------------------------
# Common.
@@ -534,10 +496,10 @@ set(OPENJPEG_LIb extern_libopenjpeg)
# Blender WebPlugin
IF(WITH_WEBPLUGIN)
- SET(GECKO_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path")
- SET(WEBPLUGIN_SANDBOX_MODE "apparmor" CACHE STRING "WEB Plugin sandbox mode, can be apparmor, privsep, none")
+ SET(GECKO_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path")
+ SET(WEBPLUGIN_SANDBOX_MODE "apparmor" CACHE STRING "WEB Plugin sandbox mode, can be apparmor, privsep, none")
- SET(WITH_PLAYER ON)
+ SET(WITH_PLAYER ON)
ENDIF(WITH_WEBPLUGIN)
@@ -555,7 +517,7 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}")
# better not define flags here but this is a debugging option thats off by default.
IF(WITH_CXX_GUARDEDALLOC)
- SET(CMAKE_CXX_FLAGS " -DWITH_CXX_GUARDEDALLOC -I${CMAKE_SOURCE_DIR}/intern/guardedalloc ${CMAKE_CXX_FLAGS}")
+ SET(CMAKE_CXX_FLAGS " -DWITH_CXX_GUARDEDALLOC -I${CMAKE_SOURCE_DIR}/intern/guardedalloc ${CMAKE_CXX_FLAGS}")
ENDIF(WITH_CXX_GUARDEDALLOC)
#-----------------------------------------------------------------------------
@@ -574,6 +536,6 @@ ADD_SUBDIRECTORY(source/creator)
#-----------------------------------------------------------------------------
# Blender Player
IF(WITH_PLAYER)
- ADD_SUBDIRECTORY(source/blenderplayer)
+ ADD_SUBDIRECTORY(blenderplayer)
ENDIF(WITH_PLAYER)
diff --git a/SConstruct b/SConstruct
index bacb158b291..a96cfc0567a 100644
--- a/SConstruct
+++ b/SConstruct
@@ -207,6 +207,7 @@ if env['WITH_BF_OPENMP'] == 1:
env.Append(CCFLAGS=['-fopenmp'])
env.Append(CPPFLAGS=['-fopenmp'])
env.Append(CXXFLAGS=['-fopenmp'])
+ # env.Append(LINKFLAGS=['-fprofile-generate'])
#check for additional debug libnames
@@ -300,6 +301,7 @@ if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-min
env['PLATFORM_LINKFLAGS'].append('/ENTRY:main')
# lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
+#B.root_build_dir = B.arguments.get('BF_BUILDDIR', '..'+os.sep+'build'+os.sep+platform+os.sep)
B.root_build_dir = env['BF_BUILDDIR']
B.doc_build_dir = env['BF_DOCDIR']
if not B.root_build_dir[-1]==os.sep:
@@ -390,7 +392,7 @@ SConscript(B.root_build_dir+'/source/SConscript')
# libraries to give as objects to linking phase
mainlist = []
for tp in B.possible_types:
- if not tp == 'player':
+ if not tp == 'player' and not tp == 'player2':
mainlist += B.create_blender_liblist(env, tp)
if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
@@ -400,13 +402,15 @@ dobj = B.buildinfo(env, "dynamic") + B.resources
thestatlibs, thelibincs = B.setup_staticlibs(env)
thesyslibs = B.setup_syslibs(env)
+if env['WITH_BF_PLAYER']:
+ print("Warning: Game player may not build on 2.5")
+
if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
+ #env.BlenderProg(B.root_build_dir, "blender", dobj , [], mainlist + thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
blen = env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
if env['WITH_BF_PLAYER']:
playerlist = B.create_blender_liblist(env, 'player')
- playerlist += B.create_blender_liblist(env, 'intern')
- playerlist += B.create_blender_liblist(env, 'extern')
env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
##### Now define some targets
@@ -572,13 +576,16 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc'):
if env['WITH_BF_OPENAL']:
dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
- if env['WITH_BF_SNDFILE']:
- dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
if env['WITH_BF_FFMPEG']:
dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-52.dll',
'${LCGDIR}/ffmpeg/lib/avformat-52.dll',
'${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
'${LCGDIR}/ffmpeg/lib/avutil-50.dll',
+ '${LCGDIR}/ffmpeg/lib/libfaad-2.dll',
+ '${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
+ '${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
+ '${LCGDIR}/ffmpeg/lib/libx264-67.dll',
+ '${LCGDIR}/ffmpeg/lib/xvidcore.dll',
'${LCGDIR}/ffmpeg/lib/swscale-0.dll']
if env['WITH_BF_JACK']:
dllsources += ['${LCGDIR}/jack/lib/libjack.dll']
diff --git a/blenderplayer/CMakeLists.txt b/blenderplayer/CMakeLists.txt
new file mode 100644
index 00000000000..77bc059a6a0
--- /dev/null
+++ b/blenderplayer/CMakeLists.txt
@@ -0,0 +1,135 @@
+# $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): Jacques Beaurain.
+#
+# ***** END GPL LICENSE BLOCK *****
+
+MESSAGE(STATUS "Configuring blenderplayer")
+
+SETUP_LIBDIRS()
+
+IF(WITH_QUICKTIME)
+ ADD_DEFINITIONS(-DWITH_QUICKTIME)
+ENDIF(WITH_QUICKTIME)
+
+IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ ADD_DEFINITIONS(-DWITH_BINRELOC)
+ INCLUDE_DIRECTORIES(${BINRELOC_INC})
+ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
+ COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/
+ DEPENDS ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna
+)
+
+IF(WIN32)
+ ADD_EXECUTABLE(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../source/icons/winblender.rc)
+ELSE(WIN32)
+ ADD_EXECUTABLE(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
+ENDIF(WIN32)
+
+ADD_DEPENDENCIES(blenderplayer makesdna)
+
+FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
+
+SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} gp_common gp_ghost blenkernel_blc)
+
+IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc)
+ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+
+IF(UNIX)
+ # Sort libraries
+ SET(BLENDER_SORTED_LIBS
+ gp_ghost
+ gp_common
+ bf_string
+ bf_ghost
+ bf_blenkernel
+ verse
+ bf_blenkernel
+ bf_blenloader
+ bf_blenpluginapi
+ bf_blroutines
+ bf_converter
+ bf_sumo
+ bf_ketsji
+ extern_solid
+ extern_qhull
+ bf_bullet
+ bf_common
+ bf_dummy
+ bf_logic
+ bf_rasterizer
+ bf_oglrasterizer
+ bf_expressions
+ bf_scenegraph
+ bf_IK
+ bf_moto
+ bf_kernel
+ bf_nodes
+ bf_gpu
+ bf_imbuf
+ bf_avi
+ kx_network
+ bf_ngnetwork
+ bf_loopbacknetwork
+ extern_bullet
+ bf_guardedalloc
+ bf_memutil
+ bf_blenlib
+ bf_cineon
+ bf_openexr
+ extern_libopenjpeg
+ bf_dds
+ bf_readblenfile
+ blenkernel_blc
+ bf_quicktime
+ extern_binreloc
+ extern_glew
+ )
+
+ IF(WITH_CXX_GUARDEDALLOC)
+ SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_guardedalloc_cpp)
+ ENDIF(WITH_CXX_GUARDEDALLOC)
+
+ FOREACH(SORTLIB ${BLENDER_SORTED_LIBS})
+ SET(REMLIB ${SORTLIB})
+ FOREACH(SEARCHLIB ${BLENDER_LINK_LIBS})
+ IF(${SEARCHLIB} STREQUAL ${SORTLIB})
+ SET(REMLIB "")
+ ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB})
+ ENDFOREACH(SEARCHLIB)
+ IF(REMLIB)
+ MESSAGE(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured")
+ LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
+ ENDIF(REMLIB)
+ ENDFOREACH(SORTLIB)
+
+ TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_SORTED_LIBS})
+ELSE(UNIX)
+ TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_LINK_LIBS})
+ENDIF(UNIX)
+
+SETUP_LIBLINKS(blenderplayer)
diff --git a/config/darwin-config.py b/config/darwin-config.py
index 92f70d716fc..5c0fa9a5086 100644
--- a/config/darwin-config.py
+++ b/config/darwin-config.py
@@ -1,3 +1,10 @@
+#
+# Note : if you want to alter this file
+# copy it as a whole in the upper folder
+# as user-config.py
+# dont create a new file with only some
+# vars changed.
+
import commands
# IMPORTANT NOTE : OFFICIAL BUILDS SHOULD BE DONE WITH SDKs
@@ -112,12 +119,6 @@ BF_JACK_INC = '${BF_JACK}/include/jack'
BF_JACK_LIB = 'jack'
BF_JACK_LIBPATH = '${BF_JACK}/lib'
-WITH_BF_SNDFILE = False
-BF_SNDFILE = LIBDIR + '/sndfile'
-BF_SNDFILE_INC = '${BF_SNDFILE}/include'
-BF_SNDFILE_LIB = 'sndfile'
-BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
-
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
diff --git a/config/linux2-config.py b/config/linux2-config.py
index 757b8210e49..b8e035c72fb 100644
--- a/config/linux2-config.py
+++ b/config/linux2-config.py
@@ -33,12 +33,6 @@ BF_JACK_INC = '${BF_JACK}/include/jack'
BF_JACK_LIB = 'jack'
BF_JACK_LIBPATH = '${BF_JACK}/lib'
-WITH_BF_SNDFILE = False
-BF_SNDFILE = '/usr'
-BF_SNDFILE_INC = '${BF_SNDFILE}/include/sndfile'
-BF_SNDFILE_LIB = 'sndfile'
-BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
-
WITH_BF_SDL = True
BF_SDL = '/usr' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
@@ -91,6 +85,23 @@ BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
+#WITH_BF_NSPR = True
+#BF_NSPR = $(LIBDIR)/nspr
+#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
+#BF_NSPR_LIB =
+
+# Uncomment the following line to use Mozilla inplace of netscape
+#CPPFLAGS += -DMOZ_NOT_NET
+# Location of MOZILLA/Netscape header files...
+#BF_MOZILLA = $(LIBDIR)/mozilla
+#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
+#BF_MOZILLA_LIB =
+# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
+# if this is not set.
+#
+# Be paranoid regarding library creation (do not update archives)
+#BF_PARANOID = True
+
# enable freetype2 support for text objects
BF_FREETYPE = '/usr'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
@@ -170,9 +181,8 @@ REL_CCFLAGS = ['-O2']
##ARFLAGSQUIET = ru
##
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement']
-CC_WARN = ['-Wall']
-CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
+CC_WARN = ['-Wall']
##FIX_STUBS_WARNINGS = -Wno-unused
diff --git a/config/win32-mingw-config.py b/config/win32-mingw-config.py
index e3834c41a81..a7de3f6111e 100644
--- a/config/win32-mingw-config.py
+++ b/config/win32-mingw-config.py
@@ -3,9 +3,14 @@ LIBDIR = "${LCGDIR}"
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.1'
+#BF_PYTHON_VERSION = '2.6'
+#BF_PYTHON_VERSION = '2.6'
WITH_BF_STATICPYTHON = False
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
+#BF_PYTHON_LIB = 'python25'
+#BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/lib25_vs2005'
+#BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/lib25_vs2005/libpython25.a'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}.a'
@@ -17,9 +22,9 @@ BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_FFMPEG = False
-BF_FFMPEG_LIB = 'avformat-52 avcodec-52 avdevice-52 avutil-50 swscale-0'
-BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
-BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
+BF_FFMPEG_LIB = 'avformat swscale avcodec avutil avdevice xvidcore x264'
+BF_FFMPEG_LIBPATH = LIBDIR + '/gcc/ffmpeg/lib'
+BF_FFMPEG_INC = LIBDIR + '/gcc/ffmpeg/include'
BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
@@ -32,12 +37,6 @@ BF_JACK_INC = '${BF_JACK}/include'
BF_JACK_LIB = 'libjack'
BF_JACK_LIBPATH = '${BF_JACK}/lib'
-WITH_BF_SNDFILE = False
-BF_SNDFILE = LIBDIR + '/sndfile'
-BF_SNDFILE_INC = '${BF_SNDFILE}/include'
-BF_SNDFILE_LIB = 'libsndfile-1'
-BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
-
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
@@ -100,6 +99,20 @@ BF_BULLET_LIB = 'extern_bullet'
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
+#WITH_BF_NSPR = True
+#BF_NSPR = $(LIBDIR)/nspr
+#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
+#BF_NSPR_LIB =
+
+# Uncomment the following line to use Mozilla inplace of netscape
+#CPPFLAGS += -DMOZ_NOT_NET
+# Location of MOZILLA/Netscape header files...
+#BF_MOZILLA = $(LIBDIR)/mozilla
+#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
+#BF_MOZILLA_LIB =
+# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
+# if this is not set.
+
# enable freetype2 support for text objects
BF_FREETYPE = LIBDIR + '/gcc/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
diff --git a/config/win32-vc-config.py b/config/win32-vc-config.py
index 1e993565e98..e9bbd42e915 100644
--- a/config/win32-vc-config.py
+++ b/config/win32-vc-config.py
@@ -4,7 +4,7 @@ LIBDIR = '${LCGDIR}'
# enable ffmpeg support
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = LIBDIR +'/ffmpeg'
-BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc'
+BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
BF_FFMPEG_LIB = 'avformat-52.lib avcodec-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib'
@@ -21,6 +21,11 @@ BF_OPENAL_INC = '${BF_OPENAL}/include '
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
+# TODO - are these useful on win32?
+# BF_CXX = '/usr'
+# WITH_BF_STATICCXX = False
+# BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
+
WITH_BF_ICONV = True
BF_ICONV = LIBDIR + '/iconv'
BF_ICONV_INC = '${BF_ICONV}/include'
@@ -38,12 +43,6 @@ BF_JACK_INC = '${BF_JACK}/include'
BF_JACK_LIB = 'libjack'
BF_JACK_LIBPATH = '${BF_JACK}/lib'
-WITH_BF_SNDFILE = False
-BF_SNDFILE = LIBDIR + '/sndfile'
-BF_SNDFILE_INC = '${BF_SNDFILE}/include'
-BF_SNDFILE_LIB = 'libsndfile-1'
-BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
-
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
@@ -109,6 +108,23 @@ BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
WITH_BF_BINRELOC = False
+#WITH_BF_NSPR = True
+#BF_NSPR = $(LIBDIR)/nspr
+#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
+#BF_NSPR_LIB =
+
+# Uncomment the following line to use Mozilla inplace of netscape
+#CPPFLAGS += -DMOZ_NOT_NET
+# Location of MOZILLA/Netscape header files...
+#BF_MOZILLA = $(LIBDIR)/mozilla
+#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
+#BF_MOZILLA_LIB =
+# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
+# if this is not set.
+#
+# Be paranoid regarding library creation (do not update archives)
+#BF_PARANOID = True
+
# enable freetype2 support for text objects
BF_WITH_FREETYPE = True
BF_FREETYPE = LIBDIR + '/freetype'
@@ -149,7 +165,6 @@ CXX = 'cl.exe'
CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
CXXFLAGS = ['/EHsc']
-BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE']
BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
diff --git a/config/win64-vc-config.py b/config/win64-vc-config.py
index ce2fd8cd405..ed08e578df8 100644
--- a/config/win64-vc-config.py
+++ b/config/win64-vc-config.py
@@ -163,7 +163,6 @@ CXX = 'cl.exe'
CFLAGS = []
CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
CXXFLAGS = ['/EHsc']
-BGE_CXXFLAGS = ['/O2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE2']
BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt
index 44e47aaf88d..b6cfe3b113e 100644
--- a/extern/CMakeLists.txt
+++ b/extern/CMakeLists.txt
@@ -25,18 +25,15 @@
# ***** END GPL LICENSE BLOCK *****
IF(WITH_BULLET)
- ADD_SUBDIRECTORY(bullet2)
+ ADD_SUBDIRECTORY(bullet2)
ENDIF(WITH_BULLET)
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
- ADD_SUBDIRECTORY(binreloc)
+ ADD_SUBDIRECTORY(binreloc)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
ADD_SUBDIRECTORY(glew)
IF(WITH_OPENJPEG)
- ADD_SUBDIRECTORY(libopenjpeg)
+ ADD_SUBDIRECTORY(libopenjpeg)
ENDIF(WITH_OPENJPEG)
-
-ADD_SUBDIRECTORY(lzo)
-ADD_SUBDIRECTORY(lzma)
diff --git a/extern/Makefile b/extern/Makefile
index 1bebf1e1994..61499da8743 100644
--- a/extern/Makefile
+++ b/extern/Makefile
@@ -54,14 +54,6 @@ ifeq ($(WITH_OPENJPEG), true)
DIRS += libopenjpeg
endif
-ifeq ($(WITH_LZO), true)
- DIRS += lzo/minilzo
-endif
-
-ifeq ($(WITH_LZMA), true)
- DIRS += lzma
-endif
-
TARGET = solid
all::
diff --git a/extern/SConscript b/extern/SConscript
index 20604d87e45..175613c3d2b 100644
--- a/extern/SConscript
+++ b/extern/SConscript
@@ -22,5 +22,5 @@ if env['WITH_BF_REDCODE'] and env['BF_REDCODE_LIB'] == '':
if env['OURPLATFORM'] == 'linux2':
SConscript(['binreloc/SConscript']);
-SConscript(['lzo/SConscript'])
-SConscript(['lzma/SConscript'])
+# FFTW not needed atm - dg
+# SConscript(['fftw/SConscript'])
diff --git a/extern/binreloc/SConscript b/extern/binreloc/SConscript
index 331b70a4ebc..98d7adb2d1e 100644
--- a/extern/binreloc/SConscript
+++ b/extern/binreloc/SConscript
@@ -9,5 +9,5 @@ cflags = []
sources = ['binreloc.c']
incs = 'include'
-env.BlenderLib ( 'extern_binreloc', sources, Split(incs), Split(defs), libtype=['extern','player'], priority=[36,225], compileflags = cflags)
+env.BlenderLib ( 'extern_binreloc', sources, Split(incs), Split(defs), libtype=['extern'], priority=[36], compileflags = cflags)
diff --git a/extern/bullet2/CMakeLists.txt b/extern/bullet2/CMakeLists.txt
index 2e2d8920781..edb6b9c525f 100644
--- a/extern/bullet2/CMakeLists.txt
+++ b/extern/bullet2/CMakeLists.txt
@@ -27,16 +27,16 @@
SET(INC . src)
FILE(GLOB SRC
- src/LinearMath/*.cpp
- src/BulletCollision/BroadphaseCollision/*.cpp
- src/BulletCollision/CollisionShapes/*.cpp
- src/BulletCollision/NarrowPhaseCollision/*.cpp
- src/BulletCollision/Gimpact/*.cpp
- src/BulletCollision//CollisionDispatch/*.cpp
- src/BulletDynamics/ConstraintSolver/*.cpp
- src/BulletDynamics/Vehicle/*.cpp
- src/BulletDynamics/Dynamics/*.cpp
- src/BulletSoftBody/*.cpp
+ src/LinearMath/*.cpp
+ src/BulletCollision/BroadphaseCollision/*.cpp
+ src/BulletCollision/CollisionShapes/*.cpp
+ src/BulletCollision/NarrowPhaseCollision/*.cpp
+ src/BulletCollision/Gimpact/*.cpp
+ src/BulletCollision//CollisionDispatch/*.cpp
+ src/BulletDynamics/ConstraintSolver/*.cpp
+ src/BulletDynamics/Vehicle/*.cpp
+ src/BulletDynamics/Dynamics/*.cpp
+ src/BulletSoftBody/*.cpp
)
ADD_DEFINITIONS(-D_LIB)
diff --git a/extern/bullet2/src/BulletCollision/CMakeLists.txt b/extern/bullet2/src/BulletCollision/CMakeLists.txt
index ddc806a3e6a..4b4304f43b0 100644
--- a/extern/bullet2/src/BulletCollision/CMakeLists.txt
+++ b/extern/bullet2/src/BulletCollision/CMakeLists.txt
@@ -211,13 +211,13 @@ ADD_LIBRARY(BulletCollision ${BulletCollision_SRCS} ${BulletCollision_HDRS})
SET_TARGET_PROPERTIES(BulletCollision PROPERTIES VERSION ${BULLET_VERSION})
SET_TARGET_PROPERTIES(BulletCollision PROPERTIES SOVERSION ${BULLET_VERSION})
IF (BUILD_SHARED_LIBS)
- TARGET_LINK_LIBRARIES(BulletCollision LinearMath)
+ TARGET_LINK_LIBRARIES(BulletCollision LinearMath)
ENDIF (BUILD_SHARED_LIBS)
#INSTALL of other files requires CMake 2.6
IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
INSTALL(TARGETS BulletCollision DESTINATION lib)
- INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
+ INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
diff --git a/extern/bullet2/src/BulletSoftBody/CMakeLists.txt b/extern/bullet2/src/BulletSoftBody/CMakeLists.txt
index fe31d2bee71..dbd87afea38 100644
--- a/extern/bullet2/src/BulletSoftBody/CMakeLists.txt
+++ b/extern/bullet2/src/BulletSoftBody/CMakeLists.txt
@@ -34,7 +34,7 @@ ENDIF (BUILD_SHARED_LIBS)
IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
INSTALL(TARGETS BulletSoftBody DESTINATION lib)
- INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
+ INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
diff --git a/extern/bullet2/src/SConscript b/extern/bullet2/src/SConscript
index 3d0c645e7a0..319cc57ce55 100644
--- a/extern/bullet2/src/SConscript
+++ b/extern/bullet2/src/SConscript
@@ -35,11 +35,11 @@ softbody_src = env.Glob("BulletSoftBody/*.cpp")
incs = '. BulletCollision BulletDynamics LinearMath BulletSoftBody'
-env.BlenderLib ( libname = 'extern_bullet2linmath', sources=linearmath_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,137], compileflags=cflags )
-env.BlenderLib ( libname = 'extern_bullet2dynamics', sources=bulletdyn_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[19,136], compileflags=cflags )
-env.BlenderLib ( libname = 'extern_bullet2collision_broadphase', sources=collision_broadphase_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[25,145], compileflags=cflags )
-env.BlenderLib ( libname = 'extern_bullet2collision_dispatch', sources=collision_dispatch_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,138], compileflags=cflags )
-env.BlenderLib ( libname = 'extern_bullet2collision_gimpact', sources=collision_gimpact_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,138], compileflags=cflags )
-env.BlenderLib ( libname = 'extern_bullet2collision_shapes', sources=collision_shapes_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,138], compileflags=cflags )
-env.BlenderLib ( libname = 'extern_bullet2collision_narrowphase', sources=collision_narrowphase_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[20,138], compileflags=cflags )
-env.BlenderLib ( libname = 'extern_bullet2softbody', sources=softbody_src, includes=Split(incs), defines=Split(defs), libtype=['extern','player'], priority=[18,135], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2linmath', sources=linearmath_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2dynamics', sources=bulletdyn_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[19], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2collision_broadphase', sources=collision_broadphase_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[25], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2collision_dispatch', sources=collision_dispatch_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2collision_gimpact', sources=collision_gimpact_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2collision_shapes', sources=collision_shapes_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2collision_narrowphase', sources=collision_narrowphase_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[20], compileflags=cflags )
+env.BlenderLib ( libname = 'extern_bullet2softbody', sources=softbody_src, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[18], compileflags=cflags )
diff --git a/extern/glew/CMakeLists.txt b/extern/glew/CMakeLists.txt
index 26d10a6ca9f..eea34488e17 100644
--- a/extern/glew/CMakeLists.txt
+++ b/extern/glew/CMakeLists.txt
@@ -27,11 +27,11 @@
SET(INC include src)
IF(UNIX)
- SET(INC ${INC} ${X11_X11_INCLUDE_PATH})
+ SET(INC ${INC} ${X11_X11_INCLUDE_PATH})
ENDIF(UNIX)
SET(SRC
- src/glew.c
+ src/glew.c
)
BLENDERLIB(extern_glew "${SRC}" "${INC}")
diff --git a/extern/glew/SConscript b/extern/glew/SConscript
index 81a2fc67ccc..b83525daffe 100644
--- a/extern/glew/SConscript
+++ b/extern/glew/SConscript
@@ -9,4 +9,4 @@ sources = ['src/glew.c']
defs = ''
incs = 'include'
-env.BlenderLib ( 'extern_glew', sources, Split(incs), Split(defs), libtype=['extern','player'], priority=[50,230])
+env.BlenderLib ( 'extern_glew', sources, Split(incs), Split(defs), libtype=['extern'], priority=[50])
diff --git a/extern/libopenjpeg/SConscript b/extern/libopenjpeg/SConscript
index da661739783..693fee15c91 100644
--- a/extern/libopenjpeg/SConscript
+++ b/extern/libopenjpeg/SConscript
@@ -24,5 +24,5 @@ if not env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
oj_env.BlenderLib ( libname='extern_openjpeg',
sources=sources, includes=Split(incs),
defines=defs,
- libtype=['extern','player'],
- priority=[10,185], compileflags = flags)
+ libtype=['extern'],
+ priority=[10], compileflags = flags)
diff --git a/extern/libredcode/SConscript b/extern/libredcode/SConscript
index 3fb78dbea0f..9fd25ad63c7 100644
--- a/extern/libredcode/SConscript
+++ b/extern/libredcode/SConscript
@@ -12,5 +12,5 @@ incs = '. ../libopenjpeg'
env.BlenderLib ( libname='extern_redcode',
sources=sources, includes=Split(incs),
defines=[],
- libtype=['core','intern'],
- priority=[5, 5], compileflags = [])
+ libtype=['core','intern','player'],
+ priority=[5, 5, 200], compileflags = [])
diff --git a/extern/lzma/Alloc.c b/extern/lzma/Alloc.c
deleted file mode 100644
index 358a7b52650..00000000000
--- a/extern/lzma/Alloc.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Alloc.c -- Memory allocation functions
-2008-09-24
-Igor Pavlov
-Public domain */
-
-#ifdef _WIN32
-#include <windows.h>
-#endif
-#include <stdlib.h>
-
-#include "Alloc.h"
-
-/* #define _SZ_ALLOC_DEBUG */
-
-/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */
-#ifdef _SZ_ALLOC_DEBUG
-#include <stdio.h>
-int g_allocCount = 0;
-int g_allocCountMid = 0;
-int g_allocCountBig = 0;
-#endif
-
-void *MyAlloc(size_t size)
-{
- if (size == 0)
- return 0;
- #ifdef _SZ_ALLOC_DEBUG
- {
- void *p = malloc(size);
- fprintf(stderr, "\nAlloc %10d bytes, count = %10d, addr = %8X", size, g_allocCount++, (unsigned)p);
- return p;
- }
- #else
- return malloc(size);
- #endif
-}
-
-void MyFree(void *address)
-{
- #ifdef _SZ_ALLOC_DEBUG
- if (address != 0)
- fprintf(stderr, "\nFree; count = %10d, addr = %8X", --g_allocCount, (unsigned)address);
- #endif
- free(address);
-}
-
-#ifdef _WIN32
-
-void *MidAlloc(size_t size)
-{
- if (size == 0)
- return 0;
- #ifdef _SZ_ALLOC_DEBUG
- fprintf(stderr, "\nAlloc_Mid %10d bytes; count = %10d", size, g_allocCountMid++);
- #endif
- return VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE);
-}
-
-void MidFree(void *address)
-{
- #ifdef _SZ_ALLOC_DEBUG
- if (address != 0)
- fprintf(stderr, "\nFree_Mid; count = %10d", --g_allocCountMid);
- #endif
- if (address == 0)
- return;
- VirtualFree(address, 0, MEM_RELEASE);
-}
-
-#ifndef MEM_LARGE_PAGES
-#undef _7ZIP_LARGE_PAGES
-#endif
-
-#ifdef _7ZIP_LARGE_PAGES
-SIZE_T g_LargePageSize = 0;
-typedef SIZE_T (WINAPI *GetLargePageMinimumP)();
-#endif
-
-void SetLargePageSize()
-{
- #ifdef _7ZIP_LARGE_PAGES
- SIZE_T size = 0;
- GetLargePageMinimumP largePageMinimum = (GetLargePageMinimumP)
- GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum");
- if (largePageMinimum == 0)
- return;
- size = largePageMinimum();
- if (size == 0 || (size & (size - 1)) != 0)
- return;
- g_LargePageSize = size;
- #endif
-}
-
-
-void *BigAlloc(size_t size)
-{
- if (size == 0)
- return 0;
- #ifdef _SZ_ALLOC_DEBUG
- fprintf(stderr, "\nAlloc_Big %10d bytes; count = %10d", size, g_allocCountBig++);
- #endif
-
- #ifdef _7ZIP_LARGE_PAGES
- if (g_LargePageSize != 0 && g_LargePageSize <= (1 << 30) && size >= (1 << 18))
- {
- void *res = VirtualAlloc(0, (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)),
- MEM_COMMIT | MEM_LARGE_PAGES, PAGE_READWRITE);
- if (res != 0)
- return res;
- }
- #endif
- return VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE);
-}
-
-void BigFree(void *address)
-{
- #ifdef _SZ_ALLOC_DEBUG
- if (address != 0)
- fprintf(stderr, "\nFree_Big; count = %10d", --g_allocCountBig);
- #endif
-
- if (address == 0)
- return;
- VirtualFree(address, 0, MEM_RELEASE);
-}
-
-#endif
diff --git a/extern/lzma/Alloc.h b/extern/lzma/Alloc.h
deleted file mode 100644
index ff0669cad8d..00000000000
--- a/extern/lzma/Alloc.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Alloc.h -- Memory allocation functions
-2008-03-13
-Igor Pavlov
-Public domain */
-
-#ifndef __COMMON_ALLOC_H
-#define __COMMON_ALLOC_H
-
-#include <stddef.h>
-
-void *MyAlloc(size_t size);
-void MyFree(void *address);
-
-#ifdef _WIN32
-
-void SetLargePageSize();
-
-void *MidAlloc(size_t size);
-void MidFree(void *address);
-void *BigAlloc(size_t size);
-void BigFree(void *address);
-
-#else
-
-#define MidAlloc(size) MyAlloc(size)
-#define MidFree(address) MyFree(address)
-#define BigAlloc(size) MyAlloc(size)
-#define BigFree(address) MyFree(address)
-
-#endif
-
-#endif
diff --git a/extern/lzma/CMakeLists.txt b/extern/lzma/CMakeLists.txt
deleted file mode 100644
index 235cd8c7f8e..00000000000
--- a/extern/lzma/CMakeLists.txt
+++ /dev/null
@@ -1,34 +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., 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 . )
-
-FILE(GLOB SRC ./*.c)
-
-
-
-BLENDERLIB(bf_lzma "${SRC}" "${INC}")
-#, libtype='blender', priority = 0 )
diff --git a/extern/lzma/LzFind.c b/extern/lzma/LzFind.c
deleted file mode 100644
index 34f4f09ea58..00000000000
--- a/extern/lzma/LzFind.c
+++ /dev/null
@@ -1,751 +0,0 @@
-/* LzFind.c -- Match finder for LZ algorithms
-2008-10-04 : Igor Pavlov : Public domain */
-
-#include <string.h>
-
-#include "LzFind.h"
-#include "LzHash.h"
-
-#define kEmptyHashValue 0
-#define kMaxValForNormalize ((UInt32)0xFFFFFFFF)
-#define kNormalizeStepMin (1 << 10) /* it must be power of 2 */
-#define kNormalizeMask (~(kNormalizeStepMin - 1))
-#define kMaxHistorySize ((UInt32)3 << 30)
-
-#define kStartMaxLen 3
-
-static void LzInWindow_Free(CMatchFinder *p, ISzAlloc *alloc)
-{
- if (!p->directInput)
- {
- alloc->Free(alloc, p->bufferBase);
- p->bufferBase = 0;
- }
-}
-
-/* keepSizeBefore + keepSizeAfter + keepSizeReserv must be < 4G) */
-
-static int LzInWindow_Create(CMatchFinder *p, UInt32 keepSizeReserv, ISzAlloc *alloc)
-{
- UInt32 blockSize = p->keepSizeBefore + p->keepSizeAfter + keepSizeReserv;
- if (p->directInput)
- {
- p->blockSize = blockSize;
- return 1;
- }
- if (p->bufferBase == 0 || p->blockSize != blockSize)
- {
- LzInWindow_Free(p, alloc);
- p->blockSize = blockSize;
- p->bufferBase = (Byte *)alloc->Alloc(alloc, (size_t)blockSize);
- }
- return (p->bufferBase != 0);
-}
-
-Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; }
-Byte MatchFinder_GetIndexByte(CMatchFinder *p, Int32 index) { return p->buffer[index]; }
-
-UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; }
-
-void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue)
-{
- p->posLimit -= subValue;
- p->pos -= subValue;
- p->streamPos -= subValue;
-}
-
-static void MatchFinder_ReadBlock(CMatchFinder *p)
-{
- if (p->streamEndWasReached || p->result != SZ_OK)
- return;
- for (;;)
- {
- Byte *dest = p->buffer + (p->streamPos - p->pos);
- size_t size = (p->bufferBase + p->blockSize - dest);
- if (size == 0)
- return;
- p->result = p->stream->Read(p->stream, dest, &size);
- if (p->result != SZ_OK)
- return;
- if (size == 0)
- {
- p->streamEndWasReached = 1;
- return;
- }
- p->streamPos += (UInt32)size;
- if (p->streamPos - p->pos > p->keepSizeAfter)
- return;
- }
-}
-
-void MatchFinder_MoveBlock(CMatchFinder *p)
-{
- memmove(p->bufferBase,
- p->buffer - p->keepSizeBefore,
- (size_t)(p->streamPos - p->pos + p->keepSizeBefore));
- p->buffer = p->bufferBase + p->keepSizeBefore;
-}
-
-int MatchFinder_NeedMove(CMatchFinder *p)
-{
- /* if (p->streamEndWasReached) return 0; */
- return ((size_t)(p->bufferBase + p->blockSize - p->buffer) <= p->keepSizeAfter);
-}
-
-void MatchFinder_ReadIfRequired(CMatchFinder *p)
-{
- if (p->streamEndWasReached)
- return;
- if (p->keepSizeAfter >= p->streamPos - p->pos)
- MatchFinder_ReadBlock(p);
-}
-
-static void MatchFinder_CheckAndMoveAndRead(CMatchFinder *p)
-{
- if (MatchFinder_NeedMove(p))
- MatchFinder_MoveBlock(p);
- MatchFinder_ReadBlock(p);
-}
-
-static void MatchFinder_SetDefaultSettings(CMatchFinder *p)
-{
- p->cutValue = 32;
- p->btMode = 1;
- p->numHashBytes = 4;
- /* p->skipModeBits = 0; */
- p->directInput = 0;
- p->bigHash = 0;
-}
-
-#define kCrcPoly 0xEDB88320
-
-void MatchFinder_Construct(CMatchFinder *p)
-{
- UInt32 i;
- p->bufferBase = 0;
- p->directInput = 0;
- p->hash = 0;
- MatchFinder_SetDefaultSettings(p);
-
- for (i = 0; i < 256; i++)
- {
- UInt32 r = i;
- int j;
- for (j = 0; j < 8; j++)
- r = (r >> 1) ^ (kCrcPoly & ~((r & 1) - 1));
- p->crc[i] = r;
- }
-}
-
-static void MatchFinder_FreeThisClassMemory(CMatchFinder *p, ISzAlloc *alloc)
-{
- alloc->Free(alloc, p->hash);
- p->hash = 0;
-}
-
-void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc)
-{
- MatchFinder_FreeThisClassMemory(p, alloc);
- LzInWindow_Free(p, alloc);
-}
-
-static CLzRef* AllocRefs(UInt32 num, ISzAlloc *alloc)
-{
- size_t sizeInBytes = (size_t)num * sizeof(CLzRef);
- if (sizeInBytes / sizeof(CLzRef) != num)
- return 0;
- return (CLzRef *)alloc->Alloc(alloc, sizeInBytes);
-}
-
-int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
- UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
- ISzAlloc *alloc)
-{
- UInt32 sizeReserv;
- if (historySize > kMaxHistorySize)
- {
- MatchFinder_Free(p, alloc);
- return 0;
- }
- sizeReserv = historySize >> 1;
- if (historySize > ((UInt32)2 << 30))
- sizeReserv = historySize >> 2;
- sizeReserv += (keepAddBufferBefore + matchMaxLen + keepAddBufferAfter) / 2 + (1 << 19);
-
- p->keepSizeBefore = historySize + keepAddBufferBefore + 1;
- p->keepSizeAfter = matchMaxLen + keepAddBufferAfter;
- /* we need one additional byte, since we use MoveBlock after pos++ and before dictionary using */
- if (LzInWindow_Create(p, sizeReserv, alloc))
- {
- UInt32 newCyclicBufferSize = (historySize /* >> p->skipModeBits */) + 1;
- UInt32 hs;
- p->matchMaxLen = matchMaxLen;
- {
- p->fixedHashSize = 0;
- if (p->numHashBytes == 2)
- hs = (1 << 16) - 1;
- else
- {
- hs = historySize - 1;
- hs |= (hs >> 1);
- hs |= (hs >> 2);
- hs |= (hs >> 4);
- hs |= (hs >> 8);
- hs >>= 1;
- /* hs >>= p->skipModeBits; */
- hs |= 0xFFFF; /* don't change it! It's required for Deflate */
- if (hs > (1 << 24))
- {
- if (p->numHashBytes == 3)
- hs = (1 << 24) - 1;
- else
- hs >>= 1;
- }
- }
- p->hashMask = hs;
- hs++;
- if (p->numHashBytes > 2) p->fixedHashSize += kHash2Size;
- if (p->numHashBytes > 3) p->fixedHashSize += kHash3Size;
- if (p->numHashBytes > 4) p->fixedHashSize += kHash4Size;
- hs += p->fixedHashSize;
- }
-
- {
- UInt32 prevSize = p->hashSizeSum + p->numSons;
- UInt32 newSize;
- p->historySize = historySize;
- p->hashSizeSum = hs;
- p->cyclicBufferSize = newCyclicBufferSize;
- p->numSons = (p->btMode ? newCyclicBufferSize * 2 : newCyclicBufferSize);
- newSize = p->hashSizeSum + p->numSons;
- if (p->hash != 0 && prevSize == newSize)
- return 1;
- MatchFinder_FreeThisClassMemory(p, alloc);
- p->hash = AllocRefs(newSize, alloc);
- if (p->hash != 0)
- {
- p->son = p->hash + p->hashSizeSum;
- return 1;
- }
- }
- }
- MatchFinder_Free(p, alloc);
- return 0;
-}
-
-static void MatchFinder_SetLimits(CMatchFinder *p)
-{
- UInt32 limit = kMaxValForNormalize - p->pos;
- UInt32 limit2 = p->cyclicBufferSize - p->cyclicBufferPos;
- if (limit2 < limit)
- limit = limit2;
- limit2 = p->streamPos - p->pos;
- if (limit2 <= p->keepSizeAfter)
- {
- if (limit2 > 0)
- limit2 = 1;
- }
- else
- limit2 -= p->keepSizeAfter;
- if (limit2 < limit)
- limit = limit2;
- {
- UInt32 lenLimit = p->streamPos - p->pos;
- if (lenLimit > p->matchMaxLen)
- lenLimit = p->matchMaxLen;
- p->lenLimit = lenLimit;
- }
- p->posLimit = p->pos + limit;
-}
-
-void MatchFinder_Init(CMatchFinder *p)
-{
- UInt32 i;
- for (i = 0; i < p->hashSizeSum; i++)
- p->hash[i] = kEmptyHashValue;
- p->cyclicBufferPos = 0;
- p->buffer = p->bufferBase;
- p->pos = p->streamPos = p->cyclicBufferSize;
- p->result = SZ_OK;
- p->streamEndWasReached = 0;
- MatchFinder_ReadBlock(p);
- MatchFinder_SetLimits(p);
-}
-
-static UInt32 MatchFinder_GetSubValue(CMatchFinder *p)
-{
- return (p->pos - p->historySize - 1) & kNormalizeMask;
-}
-
-void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems)
-{
- UInt32 i;
- for (i = 0; i < numItems; i++)
- {
- UInt32 value = items[i];
- if (value <= subValue)
- value = kEmptyHashValue;
- else
- value -= subValue;
- items[i] = value;
- }
-}
-
-static void MatchFinder_Normalize(CMatchFinder *p)
-{
- UInt32 subValue = MatchFinder_GetSubValue(p);
- MatchFinder_Normalize3(subValue, p->hash, p->hashSizeSum + p->numSons);
- MatchFinder_ReduceOffsets(p, subValue);
-}
-
-static void MatchFinder_CheckLimits(CMatchFinder *p)
-{
- if (p->pos == kMaxValForNormalize)
- MatchFinder_Normalize(p);
- if (!p->streamEndWasReached && p->keepSizeAfter == p->streamPos - p->pos)
- MatchFinder_CheckAndMoveAndRead(p);
- if (p->cyclicBufferPos == p->cyclicBufferSize)
- p->cyclicBufferPos = 0;
- MatchFinder_SetLimits(p);
-}
-
-static UInt32 * Hc_GetMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
- UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue,
- UInt32 *distances, UInt32 maxLen)
-{
- son[_cyclicBufferPos] = curMatch;
- for (;;)
- {
- UInt32 delta = pos - curMatch;
- if (cutValue-- == 0 || delta >= _cyclicBufferSize)
- return distances;
- {
- const Byte *pb = cur - delta;
- curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)];
- if (pb[maxLen] == cur[maxLen] && *pb == *cur)
- {
- UInt32 len = 0;
- while (++len != lenLimit)
- if (pb[len] != cur[len])
- break;
- if (maxLen < len)
- {
- *distances++ = maxLen = len;
- *distances++ = delta - 1;
- if (len == lenLimit)
- return distances;
- }
- }
- }
- }
-}
-
-UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
- UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue,
- UInt32 *distances, UInt32 maxLen)
-{
- CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1;
- CLzRef *ptr1 = son + (_cyclicBufferPos << 1);
- UInt32 len0 = 0, len1 = 0;
- for (;;)
- {
- UInt32 delta = pos - curMatch;
- if (cutValue-- == 0 || delta >= _cyclicBufferSize)
- {
- *ptr0 = *ptr1 = kEmptyHashValue;
- return distances;
- }
- {
- CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);
- const Byte *pb = cur - delta;
- UInt32 len = (len0 < len1 ? len0 : len1);
- if (pb[len] == cur[len])
- {
- if (++len != lenLimit && pb[len] == cur[len])
- while (++len != lenLimit)
- if (pb[len] != cur[len])
- break;
- if (maxLen < len)
- {
- *distances++ = maxLen = len;
- *distances++ = delta - 1;
- if (len == lenLimit)
- {
- *ptr1 = pair[0];
- *ptr0 = pair[1];
- return distances;
- }
- }
- }
- if (pb[len] < cur[len])
- {
- *ptr1 = curMatch;
- ptr1 = pair + 1;
- curMatch = *ptr1;
- len1 = len;
- }
- else
- {
- *ptr0 = curMatch;
- ptr0 = pair;
- curMatch = *ptr0;
- len0 = len;
- }
- }
- }
-}
-
-static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
- UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue)
-{
- CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1;
- CLzRef *ptr1 = son + (_cyclicBufferPos << 1);
- UInt32 len0 = 0, len1 = 0;
- for (;;)
- {
- UInt32 delta = pos - curMatch;
- if (cutValue-- == 0 || delta >= _cyclicBufferSize)
- {
- *ptr0 = *ptr1 = kEmptyHashValue;
- return;
- }
- {
- CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1);
- const Byte *pb = cur - delta;
- UInt32 len = (len0 < len1 ? len0 : len1);
- if (pb[len] == cur[len])
- {
- while (++len != lenLimit)
- if (pb[len] != cur[len])
- break;
- {
- if (len == lenLimit)
- {
- *ptr1 = pair[0];
- *ptr0 = pair[1];
- return;
- }
- }
- }
- if (pb[len] < cur[len])
- {
- *ptr1 = curMatch;
- ptr1 = pair + 1;
- curMatch = *ptr1;
- len1 = len;
- }
- else
- {
- *ptr0 = curMatch;
- ptr0 = pair;
- curMatch = *ptr0;
- len0 = len;
- }
- }
- }
-}
-
-#define MOVE_POS \
- ++p->cyclicBufferPos; \
- p->buffer++; \
- if (++p->pos == p->posLimit) MatchFinder_CheckLimits(p);
-
-#define MOVE_POS_RET MOVE_POS return offset;
-
-static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; }
-
-#define GET_MATCHES_HEADER2(minLen, ret_op) \
- UInt32 lenLimit; UInt32 hashValue; const Byte *cur; UInt32 curMatch; \
- lenLimit = p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \
- cur = p->buffer;
-
-#define GET_MATCHES_HEADER(minLen) GET_MATCHES_HEADER2(minLen, return 0)
-#define SKIP_HEADER(minLen) GET_MATCHES_HEADER2(minLen, continue)
-
-#define MF_PARAMS(p) p->pos, p->buffer, p->son, p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue
-
-#define GET_MATCHES_FOOTER(offset, maxLen) \
- offset = (UInt32)(GetMatchesSpec1(lenLimit, curMatch, MF_PARAMS(p), \
- distances + offset, maxLen) - distances); MOVE_POS_RET;
-
-#define SKIP_FOOTER \
- SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS;
-
-static UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
-{
- UInt32 offset;
- GET_MATCHES_HEADER(2)
- HASH2_CALC;
- curMatch = p->hash[hashValue];
- p->hash[hashValue] = p->pos;
- offset = 0;
- GET_MATCHES_FOOTER(offset, 1)
-}
-
-UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
-{
- UInt32 offset;
- GET_MATCHES_HEADER(3)
- HASH_ZIP_CALC;
- curMatch = p->hash[hashValue];
- p->hash[hashValue] = p->pos;
- offset = 0;
- GET_MATCHES_FOOTER(offset, 2)
-}
-
-static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
-{
- UInt32 hash2Value, delta2, maxLen, offset;
- GET_MATCHES_HEADER(3)
-
- HASH3_CALC;
-
- delta2 = p->pos - p->hash[hash2Value];
- curMatch = p->hash[kFix3HashSize + hashValue];
-
- p->hash[hash2Value] =
- p->hash[kFix3HashSize + hashValue] = p->pos;
-
-
- maxLen = 2;
- offset = 0;
- if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur)
- {
- for (; maxLen != lenLimit; maxLen++)
- if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen])
- break;
- distances[0] = maxLen;
- distances[1] = delta2 - 1;
- offset = 2;
- if (maxLen == lenLimit)
- {
- SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p));
- MOVE_POS_RET;
- }
- }
- GET_MATCHES_FOOTER(offset, maxLen)
-}
-
-static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
-{
- UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset;
- GET_MATCHES_HEADER(4)
-
- HASH4_CALC;
-
- delta2 = p->pos - p->hash[ hash2Value];
- delta3 = p->pos - p->hash[kFix3HashSize + hash3Value];
- curMatch = p->hash[kFix4HashSize + hashValue];
-
- p->hash[ hash2Value] =
- p->hash[kFix3HashSize + hash3Value] =
- p->hash[kFix4HashSize + hashValue] = p->pos;
-
- maxLen = 1;
- offset = 0;
- if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur)
- {
- distances[0] = maxLen = 2;
- distances[1] = delta2 - 1;
- offset = 2;
- }
- if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur)
- {
- maxLen = 3;
- distances[offset + 1] = delta3 - 1;
- offset += 2;
- delta2 = delta3;
- }
- if (offset != 0)
- {
- for (; maxLen != lenLimit; maxLen++)
- if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen])
- break;
- distances[offset - 2] = maxLen;
- if (maxLen == lenLimit)
- {
- SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p));
- MOVE_POS_RET;
- }
- }
- if (maxLen < 3)
- maxLen = 3;
- GET_MATCHES_FOOTER(offset, maxLen)
-}
-
-static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
-{
- UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset;
- GET_MATCHES_HEADER(4)
-
- HASH4_CALC;
-
- delta2 = p->pos - p->hash[ hash2Value];
- delta3 = p->pos - p->hash[kFix3HashSize + hash3Value];
- curMatch = p->hash[kFix4HashSize + hashValue];
-
- p->hash[ hash2Value] =
- p->hash[kFix3HashSize + hash3Value] =
- p->hash[kFix4HashSize + hashValue] = p->pos;
-
- maxLen = 1;
- offset = 0;
- if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur)
- {
- distances[0] = maxLen = 2;
- distances[1] = delta2 - 1;
- offset = 2;
- }
- if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur)
- {
- maxLen = 3;
- distances[offset + 1] = delta3 - 1;
- offset += 2;
- delta2 = delta3;
- }
- if (offset != 0)
- {
- for (; maxLen != lenLimit; maxLen++)
- if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen])
- break;
- distances[offset - 2] = maxLen;
- if (maxLen == lenLimit)
- {
- p->son[p->cyclicBufferPos] = curMatch;
- MOVE_POS_RET;
- }
- }
- if (maxLen < 3)
- maxLen = 3;
- offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
- distances + offset, maxLen) - (distances));
- MOVE_POS_RET
-}
-
-UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
-{
- UInt32 offset;
- GET_MATCHES_HEADER(3)
- HASH_ZIP_CALC;
- curMatch = p->hash[hashValue];
- p->hash[hashValue] = p->pos;
- offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p),
- distances, 2) - (distances));
- MOVE_POS_RET
-}
-
-static void Bt2_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
-{
- do
- {
- SKIP_HEADER(2)
- HASH2_CALC;
- curMatch = p->hash[hashValue];
- p->hash[hashValue] = p->pos;
- SKIP_FOOTER
- }
- while (--num != 0);
-}
-
-void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
-{
- do
- {
- SKIP_HEADER(3)
- HASH_ZIP_CALC;
- curMatch = p->hash[hashValue];
- p->hash[hashValue] = p->pos;
- SKIP_FOOTER
- }
- while (--num != 0);
-}
-
-static void Bt3_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
-{
- do
- {
- UInt32 hash2Value;
- SKIP_HEADER(3)
- HASH3_CALC;
- curMatch = p->hash[kFix3HashSize + hashValue];
- p->hash[hash2Value] =
- p->hash[kFix3HashSize + hashValue] = p->pos;
- SKIP_FOOTER
- }
- while (--num != 0);
-}
-
-static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
-{
- do
- {
- UInt32 hash2Value, hash3Value;
- SKIP_HEADER(4)
- HASH4_CALC;
- curMatch = p->hash[kFix4HashSize + hashValue];
- p->hash[ hash2Value] =
- p->hash[kFix3HashSize + hash3Value] = p->pos;
- p->hash[kFix4HashSize + hashValue] = p->pos;
- SKIP_FOOTER
- }
- while (--num != 0);
-}
-
-static void Hc4_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
-{
- do
- {
- UInt32 hash2Value, hash3Value;
- SKIP_HEADER(4)
- HASH4_CALC;
- curMatch = p->hash[kFix4HashSize + hashValue];
- p->hash[ hash2Value] =
- p->hash[kFix3HashSize + hash3Value] =
- p->hash[kFix4HashSize + hashValue] = p->pos;
- p->son[p->cyclicBufferPos] = curMatch;
- MOVE_POS
- }
- while (--num != 0);
-}
-
-void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
-{
- do
- {
- SKIP_HEADER(3)
- HASH_ZIP_CALC;
- curMatch = p->hash[hashValue];
- p->hash[hashValue] = p->pos;
- p->son[p->cyclicBufferPos] = curMatch;
- MOVE_POS
- }
- while (--num != 0);
-}
-
-void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable)
-{
- vTable->Init = (Mf_Init_Func)MatchFinder_Init;
- vTable->GetIndexByte = (Mf_GetIndexByte_Func)MatchFinder_GetIndexByte;
- vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinder_GetNumAvailableBytes;
- vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinder_GetPointerToCurrentPos;
- if (!p->btMode)
- {
- vTable->GetMatches = (Mf_GetMatches_Func)Hc4_MatchFinder_GetMatches;
- vTable->Skip = (Mf_Skip_Func)Hc4_MatchFinder_Skip;
- }
- else if (p->numHashBytes == 2)
- {
- vTable->GetMatches = (Mf_GetMatches_Func)Bt2_MatchFinder_GetMatches;
- vTable->Skip = (Mf_Skip_Func)Bt2_MatchFinder_Skip;
- }
- else if (p->numHashBytes == 3)
- {
- vTable->GetMatches = (Mf_GetMatches_Func)Bt3_MatchFinder_GetMatches;
- vTable->Skip = (Mf_Skip_Func)Bt3_MatchFinder_Skip;
- }
- else
- {
- vTable->GetMatches = (Mf_GetMatches_Func)Bt4_MatchFinder_GetMatches;
- vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip;
- }
-}
diff --git a/extern/lzma/LzFind.h b/extern/lzma/LzFind.h
deleted file mode 100644
index 5b9cebfdffe..00000000000
--- a/extern/lzma/LzFind.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* LzFind.h -- Match finder for LZ algorithms
-2008-10-04 : Igor Pavlov : Public domain */
-
-#ifndef __LZFIND_H
-#define __LZFIND_H
-
-#include "Types.h"
-
-typedef UInt32 CLzRef;
-
-typedef struct _CMatchFinder
-{
- Byte *buffer;
- UInt32 pos;
- UInt32 posLimit;
- UInt32 streamPos;
- UInt32 lenLimit;
-
- UInt32 cyclicBufferPos;
- UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */
-
- UInt32 matchMaxLen;
- CLzRef *hash;
- CLzRef *son;
- UInt32 hashMask;
- UInt32 cutValue;
-
- Byte *bufferBase;
- ISeqInStream *stream;
- int streamEndWasReached;
-
- UInt32 blockSize;
- UInt32 keepSizeBefore;
- UInt32 keepSizeAfter;
-
- UInt32 numHashBytes;
- int directInput;
- int btMode;
- /* int skipModeBits; */
- int bigHash;
- UInt32 historySize;
- UInt32 fixedHashSize;
- UInt32 hashSizeSum;
- UInt32 numSons;
- SRes result;
- UInt32 crc[256];
-} CMatchFinder;
-
-#define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer)
-#define Inline_MatchFinder_GetIndexByte(p, index) ((p)->buffer[(Int32)(index)])
-
-#define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos)
-
-int MatchFinder_NeedMove(CMatchFinder *p);
-Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p);
-void MatchFinder_MoveBlock(CMatchFinder *p);
-void MatchFinder_ReadIfRequired(CMatchFinder *p);
-
-void MatchFinder_Construct(CMatchFinder *p);
-
-/* Conditions:
- historySize <= 3 GB
- keepAddBufferBefore + matchMaxLen + keepAddBufferAfter < 511MB
-*/
-int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
- UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
- ISzAlloc *alloc);
-void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc);
-void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems);
-void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue);
-
-UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *buffer, CLzRef *son,
- UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue,
- UInt32 *distances, UInt32 maxLen);
-
-/*
-Conditions:
- Mf_GetNumAvailableBytes_Func must be called before each Mf_GetMatchLen_Func.
- Mf_GetPointerToCurrentPos_Func's result must be used only before any other function
-*/
-
-typedef void (*Mf_Init_Func)(void *object);
-typedef Byte (*Mf_GetIndexByte_Func)(void *object, Int32 index);
-typedef UInt32 (*Mf_GetNumAvailableBytes_Func)(void *object);
-typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(void *object);
-typedef UInt32 (*Mf_GetMatches_Func)(void *object, UInt32 *distances);
-typedef void (*Mf_Skip_Func)(void *object, UInt32);
-
-typedef struct _IMatchFinder
-{
- Mf_Init_Func Init;
- Mf_GetIndexByte_Func GetIndexByte;
- Mf_GetNumAvailableBytes_Func GetNumAvailableBytes;
- Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos;
- Mf_GetMatches_Func GetMatches;
- Mf_Skip_Func Skip;
-} IMatchFinder;
-
-void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable);
-
-void MatchFinder_Init(CMatchFinder *p);
-UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);
-UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);
-void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);
-void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);
-
-#endif
diff --git a/extern/lzma/LzHash.h b/extern/lzma/LzHash.h
deleted file mode 100644
index 9f4173e7e33..00000000000
--- a/extern/lzma/LzHash.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* LzHash.h -- HASH functions for LZ algorithms
-2008-10-04 : Igor Pavlov : Public domain */
-
-#ifndef __LZHASH_H
-#define __LZHASH_H
-
-#define kHash2Size (1 << 10)
-#define kHash3Size (1 << 16)
-#define kHash4Size (1 << 20)
-
-#define kFix3HashSize (kHash2Size)
-#define kFix4HashSize (kHash2Size + kHash3Size)
-#define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size)
-
-#define HASH2_CALC hashValue = cur[0] | ((UInt32)cur[1] << 8);
-
-#define HASH3_CALC { \
- UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
- hash2Value = temp & (kHash2Size - 1); \
- hashValue = (temp ^ ((UInt32)cur[2] << 8)) & p->hashMask; }
-
-#define HASH4_CALC { \
- UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
- hash2Value = temp & (kHash2Size - 1); \
- hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \
- hashValue = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & p->hashMask; }
-
-#define HASH5_CALC { \
- UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
- hash2Value = temp & (kHash2Size - 1); \
- hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \
- hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)); \
- hashValue = (hash4Value ^ (p->crc[cur[4]] << 3)) & p->hashMask; \
- hash4Value &= (kHash4Size - 1); }
-
-/* #define HASH_ZIP_CALC hashValue = ((cur[0] | ((UInt32)cur[1] << 8)) ^ p->crc[cur[2]]) & 0xFFFF; */
-#define HASH_ZIP_CALC hashValue = ((cur[2] | ((UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF;
-
-
-#define MT_HASH2_CALC \
- hash2Value = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1);
-
-#define MT_HASH3_CALC { \
- UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
- hash2Value = temp & (kHash2Size - 1); \
- hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); }
-
-#define MT_HASH4_CALC { \
- UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
- hash2Value = temp & (kHash2Size - 1); \
- hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \
- hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); }
-
-#endif
diff --git a/extern/lzma/LzmaDec.c b/extern/lzma/LzmaDec.c
deleted file mode 100644
index d87eb1914ea..00000000000
--- a/extern/lzma/LzmaDec.c
+++ /dev/null
@@ -1,1007 +0,0 @@
-/* LzmaDec.c -- LZMA Decoder
-2008-11-06 : Igor Pavlov : Public domain */
-
-#include "LzmaDec.h"
-
-#include <string.h>
-
-#define kNumTopBits 24
-#define kTopValue ((UInt32)1 << kNumTopBits)
-
-#define kNumBitModelTotalBits 11
-#define kBitModelTotal (1 << kNumBitModelTotalBits)
-#define kNumMoveBits 5
-
-#define RC_INIT_SIZE 5
-
-#define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); }
-
-#define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound)
-#define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits));
-#define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits));
-#define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \
- { UPDATE_0(p); i = (i + i); A0; } else \
- { UPDATE_1(p); i = (i + i) + 1; A1; }
-#define GET_BIT(p, i) GET_BIT2(p, i, ; , ;)
-
-#define TREE_GET_BIT(probs, i) { GET_BIT((probs + i), i); }
-#define TREE_DECODE(probs, limit, i) \
- { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; }
-
-/* #define _LZMA_SIZE_OPT */
-
-#ifdef _LZMA_SIZE_OPT
-#define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i)
-#else
-#define TREE_6_DECODE(probs, i) \
- { i = 1; \
- TREE_GET_BIT(probs, i); \
- TREE_GET_BIT(probs, i); \
- TREE_GET_BIT(probs, i); \
- TREE_GET_BIT(probs, i); \
- TREE_GET_BIT(probs, i); \
- TREE_GET_BIT(probs, i); \
- i -= 0x40; }
-#endif
-
-#define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); }
-
-#define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound)
-#define UPDATE_0_CHECK range = bound;
-#define UPDATE_1_CHECK range -= bound; code -= bound;
-#define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \
- { UPDATE_0_CHECK; i = (i + i); A0; } else \
- { UPDATE_1_CHECK; i = (i + i) + 1; A1; }
-#define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;)
-#define TREE_DECODE_CHECK(probs, limit, i) \
- { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; }
-
-
-#define kNumPosBitsMax 4
-#define kNumPosStatesMax (1 << kNumPosBitsMax)
-
-#define kLenNumLowBits 3
-#define kLenNumLowSymbols (1 << kLenNumLowBits)
-#define kLenNumMidBits 3
-#define kLenNumMidSymbols (1 << kLenNumMidBits)
-#define kLenNumHighBits 8
-#define kLenNumHighSymbols (1 << kLenNumHighBits)
-
-#define LenChoice 0
-#define LenChoice2 (LenChoice + 1)
-#define LenLow (LenChoice2 + 1)
-#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
-#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
-#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
-
-
-#define kNumStates 12
-#define kNumLitStates 7
-
-#define kStartPosModelIndex 4
-#define kEndPosModelIndex 14
-#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
-
-#define kNumPosSlotBits 6
-#define kNumLenToPosStates 4
-
-#define kNumAlignBits 4
-#define kAlignTableSize (1 << kNumAlignBits)
-
-#define kMatchMinLen 2
-#define kMatchSpecLenStart (kMatchMinLen + kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols)
-
-#define IsMatch 0
-#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
-#define IsRepG0 (IsRep + kNumStates)
-#define IsRepG1 (IsRepG0 + kNumStates)
-#define IsRepG2 (IsRepG1 + kNumStates)
-#define IsRep0Long (IsRepG2 + kNumStates)
-#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
-#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
-#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
-#define LenCoder (Align + kAlignTableSize)
-#define RepLenCoder (LenCoder + kNumLenProbs)
-#define Literal (RepLenCoder + kNumLenProbs)
-
-#define LZMA_BASE_SIZE 1846
-#define LZMA_LIT_SIZE 768
-
-#define LzmaProps_GetNumProbs(p) ((UInt32)LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((p)->lc + (p)->lp)))
-
-#if Literal != LZMA_BASE_SIZE
-StopCompilingDueBUG
-#endif
-
-static const Byte kLiteralNextStates[kNumStates * 2] =
-{
- 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5,
- 7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10
-};
-
-#define LZMA_DIC_MIN (1 << 12)
-
-/* First LZMA-symbol is always decoded.
-And it decodes new LZMA-symbols while (buf < bufLimit), but "buf" is without last normalization
-Out:
- Result:
- SZ_OK - OK
- SZ_ERROR_DATA - Error
- p->remainLen:
- < kMatchSpecLenStart : normal remain
- = kMatchSpecLenStart : finished
- = kMatchSpecLenStart + 1 : Flush marker
- = kMatchSpecLenStart + 2 : State Init Marker
-*/
-
-static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte *bufLimit)
-{
- CLzmaProb *probs = p->probs;
-
- unsigned state = p->state;
- UInt32 rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2], rep3 = p->reps[3];
- unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1;
- unsigned lpMask = ((unsigned)1 << (p->prop.lp)) - 1;
- unsigned lc = p->prop.lc;
-
- Byte *dic = p->dic;
- SizeT dicBufSize = p->dicBufSize;
- SizeT dicPos = p->dicPos;
-
- UInt32 processedPos = p->processedPos;
- UInt32 checkDicSize = p->checkDicSize;
- unsigned len = 0;
-
- const Byte *buf = p->buf;
- UInt32 range = p->range;
- UInt32 code = p->code;
-
- do
- {
- CLzmaProb *prob;
- UInt32 bound;
- unsigned ttt;
- unsigned posState = processedPos & pbMask;
-
- prob = probs + IsMatch + (state << kNumPosBitsMax) + posState;
- IF_BIT_0(prob)
- {
- unsigned symbol;
- UPDATE_0(prob);
- prob = probs + Literal;
- if (checkDicSize != 0 || processedPos != 0)
- prob += (LZMA_LIT_SIZE * (((processedPos & lpMask) << lc) +
- (dic[(dicPos == 0 ? dicBufSize : dicPos) - 1] >> (8 - lc))));
-
- if (state < kNumLitStates)
- {
- symbol = 1;
- do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100);
- }
- else
- {
- unsigned matchByte = p->dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)];
- unsigned offs = 0x100;
- symbol = 1;
- do
- {
- unsigned bit;
- CLzmaProb *probLit;
- matchByte <<= 1;
- bit = (matchByte & offs);
- probLit = prob + offs + bit + symbol;
- GET_BIT2(probLit, symbol, offs &= ~bit, offs &= bit)
- }
- while (symbol < 0x100);
- }
- dic[dicPos++] = (Byte)symbol;
- processedPos++;
-
- state = kLiteralNextStates[state];
- /* if (state < 4) state = 0; else if (state < 10) state -= 3; else state -= 6; */
- continue;
- }
- else
- {
- UPDATE_1(prob);
- prob = probs + IsRep + state;
- IF_BIT_0(prob)
- {
- UPDATE_0(prob);
- state += kNumStates;
- prob = probs + LenCoder;
- }
- else
- {
- UPDATE_1(prob);
- if (checkDicSize == 0 && processedPos == 0)
- return SZ_ERROR_DATA;
- prob = probs + IsRepG0 + state;
- IF_BIT_0(prob)
- {
- UPDATE_0(prob);
- prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState;
- IF_BIT_0(prob)
- {
- UPDATE_0(prob);
- dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)];
- dicPos++;
- processedPos++;
- state = state < kNumLitStates ? 9 : 11;
- continue;
- }
- UPDATE_1(prob);
- }
- else
- {
- UInt32 distance;
- UPDATE_1(prob);
- prob = probs + IsRepG1 + state;
- IF_BIT_0(prob)
- {
- UPDATE_0(prob);
- distance = rep1;
- }
- else
- {
- UPDATE_1(prob);
- prob = probs + IsRepG2 + state;
- IF_BIT_0(prob)
- {
- UPDATE_0(prob);
- distance = rep2;
- }
- else
- {
- UPDATE_1(prob);
- distance = rep3;
- rep3 = rep2;
- }
- rep2 = rep1;
- }
- rep1 = rep0;
- rep0 = distance;
- }
- state = state < kNumLitStates ? 8 : 11;
- prob = probs + RepLenCoder;
- }
- {
- unsigned limit, offset;
- CLzmaProb *probLen = prob + LenChoice;
- IF_BIT_0(probLen)
- {
- UPDATE_0(probLen);
- probLen = prob + LenLow + (posState << kLenNumLowBits);
- offset = 0;
- limit = (1 << kLenNumLowBits);
- }
- else
- {
- UPDATE_1(probLen);
- probLen = prob + LenChoice2;
- IF_BIT_0(probLen)
- {
- UPDATE_0(probLen);
- probLen = prob + LenMid + (posState << kLenNumMidBits);
- offset = kLenNumLowSymbols;
- limit = (1 << kLenNumMidBits);
- }
- else
- {
- UPDATE_1(probLen);
- probLen = prob + LenHigh;
- offset = kLenNumLowSymbols + kLenNumMidSymbols;
- limit = (1 << kLenNumHighBits);
- }
- }
- TREE_DECODE(probLen, limit, len);
- len += offset;
- }
-
- if (state >= kNumStates)
- {
- UInt32 distance;
- prob = probs + PosSlot +
- ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits);
- TREE_6_DECODE(prob, distance);
- if (distance >= kStartPosModelIndex)
- {
- unsigned posSlot = (unsigned)distance;
- int numDirectBits = (int)(((distance >> 1) - 1));
- distance = (2 | (distance & 1));
- if (posSlot < kEndPosModelIndex)
- {
- distance <<= numDirectBits;
- prob = probs + SpecPos + distance - posSlot - 1;
- {
- UInt32 mask = 1;
- unsigned i = 1;
- do
- {
- GET_BIT2(prob + i, i, ; , distance |= mask);
- mask <<= 1;
- }
- while (--numDirectBits != 0);
- }
- }
- else
- {
- numDirectBits -= kNumAlignBits;
- do
- {
- NORMALIZE
- range >>= 1;
-
- {
- UInt32 t;
- code -= range;
- t = (0 - ((UInt32)code >> 31)); /* (UInt32)((Int32)code >> 31) */
- distance = (distance << 1) + (t + 1);
- code += range & t;
- }
- /*
- distance <<= 1;
- if (code >= range)
- {
- code -= range;
- distance |= 1;
- }
- */
- }
- while (--numDirectBits != 0);
- prob = probs + Align;
- distance <<= kNumAlignBits;
- {
- unsigned i = 1;
- GET_BIT2(prob + i, i, ; , distance |= 1);
- GET_BIT2(prob + i, i, ; , distance |= 2);
- GET_BIT2(prob + i, i, ; , distance |= 4);
- GET_BIT2(prob + i, i, ; , distance |= 8);
- }
- if (distance == (UInt32)0xFFFFFFFF)
- {
- len += kMatchSpecLenStart;
- state -= kNumStates;
- break;
- }
- }
- }
- rep3 = rep2;
- rep2 = rep1;
- rep1 = rep0;
- rep0 = distance + 1;
- if (checkDicSize == 0)
- {
- if (distance >= processedPos)
- return SZ_ERROR_DATA;
- }
- else if (distance >= checkDicSize)
- return SZ_ERROR_DATA;
- state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3;
- /* state = kLiteralNextStates[state]; */
- }
-
- len += kMatchMinLen;
-
- if (limit == dicPos)
- return SZ_ERROR_DATA;
- {
- SizeT rem = limit - dicPos;
- unsigned curLen = ((rem < len) ? (unsigned)rem : len);
- SizeT pos = (dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0);
-
- processedPos += curLen;
-
- len -= curLen;
- if (pos + curLen <= dicBufSize)
- {
- Byte *dest = dic + dicPos;
- ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos;
- const Byte *lim = dest + curLen;
- dicPos += curLen;
- do
- *(dest) = (Byte)*(dest + src);
- while (++dest != lim);
- }
- else
- {
- do
- {
- dic[dicPos++] = dic[pos];
- if (++pos == dicBufSize)
- pos = 0;
- }
- while (--curLen != 0);
- }
- }
- }
- }
- while (dicPos < limit && buf < bufLimit);
- NORMALIZE;
- p->buf = buf;
- p->range = range;
- p->code = code;
- p->remainLen = len;
- p->dicPos = dicPos;
- p->processedPos = processedPos;
- p->reps[0] = rep0;
- p->reps[1] = rep1;
- p->reps[2] = rep2;
- p->reps[3] = rep3;
- p->state = state;
-
- return SZ_OK;
-}
-
-static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit)
-{
- if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart)
- {
- Byte *dic = p->dic;
- SizeT dicPos = p->dicPos;
- SizeT dicBufSize = p->dicBufSize;
- unsigned len = p->remainLen;
- UInt32 rep0 = p->reps[0];
- if (limit - dicPos < len)
- len = (unsigned)(limit - dicPos);
-
- if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len)
- p->checkDicSize = p->prop.dicSize;
-
- p->processedPos += len;
- p->remainLen -= len;
- while (len-- != 0)
- {
- dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)];
- dicPos++;
- }
- p->dicPos = dicPos;
- }
-}
-
-static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit)
-{
- do
- {
- SizeT limit2 = limit;
- if (p->checkDicSize == 0)
- {
- UInt32 rem = p->prop.dicSize - p->processedPos;
- if (limit - p->dicPos > rem)
- limit2 = p->dicPos + rem;
- }
- RINOK(LzmaDec_DecodeReal(p, limit2, bufLimit));
- if (p->processedPos >= p->prop.dicSize)
- p->checkDicSize = p->prop.dicSize;
- LzmaDec_WriteRem(p, limit);
- }
- while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart);
-
- if (p->remainLen > kMatchSpecLenStart)
- {
- p->remainLen = kMatchSpecLenStart;
- }
- return 0;
-}
-
-typedef enum
-{
- DUMMY_ERROR, /* unexpected end of input stream */
- DUMMY_LIT,
- DUMMY_MATCH,
- DUMMY_REP
-} ELzmaDummy;
-
-static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inSize)
-{
- UInt32 range = p->range;
- UInt32 code = p->code;
- const Byte *bufLimit = buf + inSize;
- CLzmaProb *probs = p->probs;
- unsigned state = p->state;
- ELzmaDummy res;
-
- {
- CLzmaProb *prob;
- UInt32 bound;
- unsigned ttt;
- unsigned posState = (p->processedPos) & ((1 << p->prop.pb) - 1);
-
- prob = probs + IsMatch + (state << kNumPosBitsMax) + posState;
- IF_BIT_0_CHECK(prob)
- {
- UPDATE_0_CHECK
-
- /* if (bufLimit - buf >= 7) return DUMMY_LIT; */
-
- prob = probs + Literal;
- if (p->checkDicSize != 0 || p->processedPos != 0)
- prob += (LZMA_LIT_SIZE *
- ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) +
- (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc))));
-
- if (state < kNumLitStates)
- {
- unsigned symbol = 1;
- do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100);
- }
- else
- {
- unsigned matchByte = p->dic[p->dicPos - p->reps[0] +
- ((p->dicPos < p->reps[0]) ? p->dicBufSize : 0)];
- unsigned offs = 0x100;
- unsigned symbol = 1;
- do
- {
- unsigned bit;
- CLzmaProb *probLit;
- matchByte <<= 1;
- bit = (matchByte & offs);
- probLit = prob + offs + bit + symbol;
- GET_BIT2_CHECK(probLit, symbol, offs &= ~bit, offs &= bit)
- }
- while (symbol < 0x100);
- }
- res = DUMMY_LIT;
- }
- else
- {
- unsigned len;
- UPDATE_1_CHECK;
-
- prob = probs + IsRep + state;
- IF_BIT_0_CHECK(prob)
- {
- UPDATE_0_CHECK;
- state = 0;
- prob = probs + LenCoder;
- res = DUMMY_MATCH;
- }
- else
- {
- UPDATE_1_CHECK;
- res = DUMMY_REP;
- prob = probs + IsRepG0 + state;
- IF_BIT_0_CHECK(prob)
- {
- UPDATE_0_CHECK;
- prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState;
- IF_BIT_0_CHECK(prob)
- {
- UPDATE_0_CHECK;
- NORMALIZE_CHECK;
- return DUMMY_REP;
- }
- else
- {
- UPDATE_1_CHECK;
- }
- }
- else
- {
- UPDATE_1_CHECK;
- prob = probs + IsRepG1 + state;
- IF_BIT_0_CHECK(prob)
- {
- UPDATE_0_CHECK;
- }
- else
- {
- UPDATE_1_CHECK;
- prob = probs + IsRepG2 + state;
- IF_BIT_0_CHECK(prob)
- {
- UPDATE_0_CHECK;
- }
- else
- {
- UPDATE_1_CHECK;
- }
- }
- }
- state = kNumStates;
- prob = probs + RepLenCoder;
- }
- {
- unsigned limit, offset;
- CLzmaProb *probLen = prob + LenChoice;
- IF_BIT_0_CHECK(probLen)
- {
- UPDATE_0_CHECK;
- probLen = prob + LenLow + (posState << kLenNumLowBits);
- offset = 0;
- limit = 1 << kLenNumLowBits;
- }
- else
- {
- UPDATE_1_CHECK;
- probLen = prob + LenChoice2;
- IF_BIT_0_CHECK(probLen)
- {
- UPDATE_0_CHECK;
- probLen = prob + LenMid + (posState << kLenNumMidBits);
- offset = kLenNumLowSymbols;
- limit = 1 << kLenNumMidBits;
- }
- else
- {
- UPDATE_1_CHECK;
- probLen = prob + LenHigh;
- offset = kLenNumLowSymbols + kLenNumMidSymbols;
- limit = 1 << kLenNumHighBits;
- }
- }
- TREE_DECODE_CHECK(probLen, limit, len);
- len += offset;
- }
-
- if (state < 4)
- {
- unsigned posSlot;
- prob = probs + PosSlot +
- ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
- kNumPosSlotBits);
- TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot);
- if (posSlot >= kStartPosModelIndex)
- {
- int numDirectBits = ((posSlot >> 1) - 1);
-
- /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */
-
- if (posSlot < kEndPosModelIndex)
- {
- prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits) - posSlot - 1;
- }
- else
- {
- numDirectBits -= kNumAlignBits;
- do
- {
- NORMALIZE_CHECK
- range >>= 1;
- code -= range & (((code - range) >> 31) - 1);
- /* if (code >= range) code -= range; */
- }
- while (--numDirectBits != 0);
- prob = probs + Align;
- numDirectBits = kNumAlignBits;
- }
- {
- unsigned i = 1;
- do
- {
- GET_BIT_CHECK(prob + i, i);
- }
- while (--numDirectBits != 0);
- }
- }
- }
- }
- }
- NORMALIZE_CHECK;
- return res;
-}
-
-
-static void LzmaDec_InitRc(CLzmaDec *p, const Byte *data)
-{
- p->code = ((UInt32)data[1] << 24) | ((UInt32)data[2] << 16) | ((UInt32)data[3] << 8) | ((UInt32)data[4]);
- p->range = 0xFFFFFFFF;
- p->needFlush = 0;
-}
-
-void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)
-{
- p->needFlush = 1;
- p->remainLen = 0;
- p->tempBufSize = 0;
-
- if (initDic)
- {
- p->processedPos = 0;
- p->checkDicSize = 0;
- p->needInitState = 1;
- }
- if (initState)
- p->needInitState = 1;
-}
-
-void LzmaDec_Init(CLzmaDec *p)
-{
- p->dicPos = 0;
- LzmaDec_InitDicAndState(p, True, True);
-}
-
-static void LzmaDec_InitStateReal(CLzmaDec *p)
-{
- UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (p->prop.lc + p->prop.lp));
- UInt32 i;
- CLzmaProb *probs = p->probs;
- for (i = 0; i < numProbs; i++)
- probs[i] = kBitModelTotal >> 1;
- p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1;
- p->state = 0;
- p->needInitState = 0;
-}
-
-SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen,
- ELzmaFinishMode finishMode, ELzmaStatus *status)
-{
- SizeT inSize = *srcLen;
- (*srcLen) = 0;
- LzmaDec_WriteRem(p, dicLimit);
-
- *status = LZMA_STATUS_NOT_SPECIFIED;
-
- while (p->remainLen != kMatchSpecLenStart)
- {
- int checkEndMarkNow;
-
- if (p->needFlush != 0)
- {
- for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--)
- p->tempBuf[p->tempBufSize++] = *src++;
- if (p->tempBufSize < RC_INIT_SIZE)
- {
- *status = LZMA_STATUS_NEEDS_MORE_INPUT;
- return SZ_OK;
- }
- if (p->tempBuf[0] != 0)
- return SZ_ERROR_DATA;
-
- LzmaDec_InitRc(p, p->tempBuf);
- p->tempBufSize = 0;
- }
-
- checkEndMarkNow = 0;
- if (p->dicPos >= dicLimit)
- {
- if (p->remainLen == 0 && p->code == 0)
- {
- *status = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK;
- return SZ_OK;
- }
- if (finishMode == LZMA_FINISH_ANY)
- {
- *status = LZMA_STATUS_NOT_FINISHED;
- return SZ_OK;
- }
- if (p->remainLen != 0)
- {
- *status = LZMA_STATUS_NOT_FINISHED;
- return SZ_ERROR_DATA;
- }
- checkEndMarkNow = 1;
- }
-
- if (p->needInitState)
- LzmaDec_InitStateReal(p);
-
- if (p->tempBufSize == 0)
- {
- SizeT processed;
- const Byte *bufLimit;
- if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow)
- {
- int dummyRes = LzmaDec_TryDummy(p, src, inSize);
- if (dummyRes == DUMMY_ERROR)
- {
- memcpy(p->tempBuf, src, inSize);
- p->tempBufSize = (unsigned)inSize;
- (*srcLen) += inSize;
- *status = LZMA_STATUS_NEEDS_MORE_INPUT;
- return SZ_OK;
- }
- if (checkEndMarkNow && dummyRes != DUMMY_MATCH)
- {
- *status = LZMA_STATUS_NOT_FINISHED;
- return SZ_ERROR_DATA;
- }
- bufLimit = src;
- }
- else
- bufLimit = src + inSize - LZMA_REQUIRED_INPUT_MAX;
- p->buf = src;
- if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0)
- return SZ_ERROR_DATA;
- processed = (SizeT)(p->buf - src);
- (*srcLen) += processed;
- src += processed;
- inSize -= processed;
- }
- else
- {
- unsigned rem = p->tempBufSize, lookAhead = 0;
- while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize)
- p->tempBuf[rem++] = src[lookAhead++];
- p->tempBufSize = rem;
- if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow)
- {
- int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, rem);
- if (dummyRes == DUMMY_ERROR)
- {
- (*srcLen) += lookAhead;
- *status = LZMA_STATUS_NEEDS_MORE_INPUT;
- return SZ_OK;
- }
- if (checkEndMarkNow && dummyRes != DUMMY_MATCH)
- {
- *status = LZMA_STATUS_NOT_FINISHED;
- return SZ_ERROR_DATA;
- }
- }
- p->buf = p->tempBuf;
- if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0)
- return SZ_ERROR_DATA;
- lookAhead -= (rem - (unsigned)(p->buf - p->tempBuf));
- (*srcLen) += lookAhead;
- src += lookAhead;
- inSize -= lookAhead;
- p->tempBufSize = 0;
- }
- }
- if (p->code == 0)
- *status = LZMA_STATUS_FINISHED_WITH_MARK;
- return (p->code == 0) ? SZ_OK : SZ_ERROR_DATA;
-}
-
-SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status)
-{
- SizeT outSize = *destLen;
- SizeT inSize = *srcLen;
- *srcLen = *destLen = 0;
- for (;;)
- {
- SizeT inSizeCur = inSize, outSizeCur, dicPos;
- ELzmaFinishMode curFinishMode;
- SRes res;
- if (p->dicPos == p->dicBufSize)
- p->dicPos = 0;
- dicPos = p->dicPos;
- if (outSize > p->dicBufSize - dicPos)
- {
- outSizeCur = p->dicBufSize;
- curFinishMode = LZMA_FINISH_ANY;
- }
- else
- {
- outSizeCur = dicPos + outSize;
- curFinishMode = finishMode;
- }
-
- res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status);
- src += inSizeCur;
- inSize -= inSizeCur;
- *srcLen += inSizeCur;
- outSizeCur = p->dicPos - dicPos;
- memcpy(dest, p->dic + dicPos, outSizeCur);
- dest += outSizeCur;
- outSize -= outSizeCur;
- *destLen += outSizeCur;
- if (res != 0)
- return res;
- if (outSizeCur == 0 || outSize == 0)
- return SZ_OK;
- }
-}
-
-void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc)
-{
- alloc->Free(alloc, p->probs);
- p->probs = 0;
-}
-
-static void LzmaDec_FreeDict(CLzmaDec *p, ISzAlloc *alloc)
-{
- alloc->Free(alloc, p->dic);
- p->dic = 0;
-}
-
-void LzmaDec_Free(CLzmaDec *p, ISzAlloc *alloc)
-{
- LzmaDec_FreeProbs(p, alloc);
- LzmaDec_FreeDict(p, alloc);
-}
-
-SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size)
-{
- UInt32 dicSize;
- Byte d;
-
- if (size < LZMA_PROPS_SIZE)
- return SZ_ERROR_UNSUPPORTED;
- else
- dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24);
-
- if (dicSize < LZMA_DIC_MIN)
- dicSize = LZMA_DIC_MIN;
- p->dicSize = dicSize;
-
- d = data[0];
- if (d >= (9 * 5 * 5))
- return SZ_ERROR_UNSUPPORTED;
-
- p->lc = d % 9;
- d /= 9;
- p->pb = d / 5;
- p->lp = d % 5;
-
- return SZ_OK;
-}
-
-static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc)
-{
- UInt32 numProbs = LzmaProps_GetNumProbs(propNew);
- if (p->probs == 0 || numProbs != p->numProbs)
- {
- LzmaDec_FreeProbs(p, alloc);
- p->probs = (CLzmaProb *)alloc->Alloc(alloc, numProbs * sizeof(CLzmaProb));
- p->numProbs = numProbs;
- if (p->probs == 0)
- return SZ_ERROR_MEM;
- }
- return SZ_OK;
-}
-
-SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc)
-{
- CLzmaProps propNew;
- RINOK(LzmaProps_Decode(&propNew, props, propsSize));
- RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc));
- p->prop = propNew;
- return SZ_OK;
-}
-
-SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc)
-{
- CLzmaProps propNew;
- SizeT dicBufSize;
- RINOK(LzmaProps_Decode(&propNew, props, propsSize));
- RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc));
- dicBufSize = propNew.dicSize;
- if (p->dic == 0 || dicBufSize != p->dicBufSize)
- {
- LzmaDec_FreeDict(p, alloc);
- p->dic = (Byte *)alloc->Alloc(alloc, dicBufSize);
- if (p->dic == 0)
- {
- LzmaDec_FreeProbs(p, alloc);
- return SZ_ERROR_MEM;
- }
- }
- p->dicBufSize = dicBufSize;
- p->prop = propNew;
- return SZ_OK;
-}
-
-SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
- const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
- ELzmaStatus *status, ISzAlloc *alloc)
-{
- CLzmaDec p;
- SRes res;
- SizeT inSize = *srcLen;
- SizeT outSize = *destLen;
- *srcLen = *destLen = 0;
- if (inSize < RC_INIT_SIZE)
- return SZ_ERROR_INPUT_EOF;
-
- LzmaDec_Construct(&p);
- res = LzmaDec_AllocateProbs(&p, propData, propSize, alloc);
- if (res != 0)
- return res;
- p.dic = dest;
- p.dicBufSize = outSize;
-
- LzmaDec_Init(&p);
-
- *srcLen = inSize;
- res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status);
-
- if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT)
- res = SZ_ERROR_INPUT_EOF;
-
- (*destLen) = p.dicPos;
- LzmaDec_FreeProbs(&p, alloc);
- return res;
-}
diff --git a/extern/lzma/LzmaDec.h b/extern/lzma/LzmaDec.h
deleted file mode 100644
index 98cdbe94949..00000000000
--- a/extern/lzma/LzmaDec.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/* LzmaDec.h -- LZMA Decoder
-2008-10-04 : Igor Pavlov : Public domain */
-
-#ifndef __LZMADEC_H
-#define __LZMADEC_H
-
-#include "Types.h"
-
-/* #define _LZMA_PROB32 */
-/* _LZMA_PROB32 can increase the speed on some CPUs,
- but memory usage for CLzmaDec::probs will be doubled in that case */
-
-#ifdef _LZMA_PROB32
-#define CLzmaProb UInt32
-#else
-#define CLzmaProb UInt16
-#endif
-
-
-/* ---------- LZMA Properties ---------- */
-
-#define LZMA_PROPS_SIZE 5
-
-typedef struct _CLzmaProps
-{
- unsigned lc, lp, pb;
- UInt32 dicSize;
-} CLzmaProps;
-
-/* LzmaProps_Decode - decodes properties
-Returns:
- SZ_OK
- SZ_ERROR_UNSUPPORTED - Unsupported properties
-*/
-
-SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size);
-
-
-/* ---------- LZMA Decoder state ---------- */
-
-/* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case.
- Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */
-
-#define LZMA_REQUIRED_INPUT_MAX 20
-
-typedef struct
-{
- CLzmaProps prop;
- CLzmaProb *probs;
- Byte *dic;
- const Byte *buf;
- UInt32 range, code;
- SizeT dicPos;
- SizeT dicBufSize;
- UInt32 processedPos;
- UInt32 checkDicSize;
- unsigned state;
- UInt32 reps[4];
- unsigned remainLen;
- int needFlush;
- int needInitState;
- UInt32 numProbs;
- unsigned tempBufSize;
- Byte tempBuf[LZMA_REQUIRED_INPUT_MAX];
-} CLzmaDec;
-
-#define LzmaDec_Construct(p) { (p)->dic = 0; (p)->probs = 0; }
-
-void LzmaDec_Init(CLzmaDec *p);
-
-/* There are two types of LZMA streams:
- 0) Stream with end mark. That end mark adds about 6 bytes to compressed size.
- 1) Stream without end mark. You must know exact uncompressed size to decompress such stream. */
-
-typedef enum
-{
- LZMA_FINISH_ANY, /* finish at any point */
- LZMA_FINISH_END /* block must be finished at the end */
-} ELzmaFinishMode;
-
-/* ELzmaFinishMode has meaning only if the decoding reaches output limit !!!
-
- You must use LZMA_FINISH_END, when you know that current output buffer
- covers last bytes of block. In other cases you must use LZMA_FINISH_ANY.
-
- If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK,
- and output value of destLen will be less than output buffer size limit.
- You can check status result also.
-
- You can use multiple checks to test data integrity after full decompression:
- 1) Check Result and "status" variable.
- 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize.
- 3) Check that output(srcLen) = compressedSize, if you know real compressedSize.
- You must use correct finish mode in that case. */
-
-typedef enum
-{
- LZMA_STATUS_NOT_SPECIFIED, /* use main error code instead */
- LZMA_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */
- LZMA_STATUS_NOT_FINISHED, /* stream was not finished */
- LZMA_STATUS_NEEDS_MORE_INPUT, /* you must provide more input bytes */
- LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK /* there is probability that stream was finished without end mark */
-} ELzmaStatus;
-
-/* ELzmaStatus is used only as output value for function call */
-
-
-/* ---------- Interfaces ---------- */
-
-/* There are 3 levels of interfaces:
- 1) Dictionary Interface
- 2) Buffer Interface
- 3) One Call Interface
- You can select any of these interfaces, but don't mix functions from different
- groups for same object. */
-
-
-/* There are two variants to allocate state for Dictionary Interface:
- 1) LzmaDec_Allocate / LzmaDec_Free
- 2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs
- You can use variant 2, if you set dictionary buffer manually.
- For Buffer Interface you must always use variant 1.
-
-LzmaDec_Allocate* can return:
- SZ_OK
- SZ_ERROR_MEM - Memory allocation error
- SZ_ERROR_UNSUPPORTED - Unsupported properties
-*/
-
-SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc);
-void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc);
-
-SRes LzmaDec_Allocate(CLzmaDec *state, const Byte *prop, unsigned propsSize, ISzAlloc *alloc);
-void LzmaDec_Free(CLzmaDec *state, ISzAlloc *alloc);
-
-/* ---------- Dictionary Interface ---------- */
-
-/* You can use it, if you want to eliminate the overhead for data copying from
- dictionary to some other external buffer.
- You must work with CLzmaDec variables directly in this interface.
-
- STEPS:
- LzmaDec_Constr()
- LzmaDec_Allocate()
- for (each new stream)
- {
- LzmaDec_Init()
- while (it needs more decompression)
- {
- LzmaDec_DecodeToDic()
- use data from CLzmaDec::dic and update CLzmaDec::dicPos
- }
- }
- LzmaDec_Free()
-*/
-
-/* LzmaDec_DecodeToDic
-
- The decoding to internal dictionary buffer (CLzmaDec::dic).
- You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!!
-
-finishMode:
- It has meaning only if the decoding reaches output limit (dicLimit).
- LZMA_FINISH_ANY - Decode just dicLimit bytes.
- LZMA_FINISH_END - Stream must be finished after dicLimit.
-
-Returns:
- SZ_OK
- status:
- LZMA_STATUS_FINISHED_WITH_MARK
- LZMA_STATUS_NOT_FINISHED
- LZMA_STATUS_NEEDS_MORE_INPUT
- LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
- SZ_ERROR_DATA - Data error
-*/
-
-SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit,
- const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
-
-
-/* ---------- Buffer Interface ---------- */
-
-/* It's zlib-like interface.
- See LzmaDec_DecodeToDic description for information about STEPS and return results,
- but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need
- to work with CLzmaDec variables manually.
-
-finishMode:
- It has meaning only if the decoding reaches output limit (*destLen).
- LZMA_FINISH_ANY - Decode just destLen bytes.
- LZMA_FINISH_END - Stream must be finished after (*destLen).
-*/
-
-SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen,
- const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
-
-
-/* ---------- One Call Interface ---------- */
-
-/* LzmaDecode
-
-finishMode:
- It has meaning only if the decoding reaches output limit (*destLen).
- LZMA_FINISH_ANY - Decode just destLen bytes.
- LZMA_FINISH_END - Stream must be finished after (*destLen).
-
-Returns:
- SZ_OK
- status:
- LZMA_STATUS_FINISHED_WITH_MARK
- LZMA_STATUS_NOT_FINISHED
- LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
- SZ_ERROR_DATA - Data error
- SZ_ERROR_MEM - Memory allocation error
- SZ_ERROR_UNSUPPORTED - Unsupported properties
- SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
-*/
-
-SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
- const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
- ELzmaStatus *status, ISzAlloc *alloc);
-
-#endif
diff --git a/extern/lzma/LzmaEnc.c b/extern/lzma/LzmaEnc.c
deleted file mode 100644
index 9196c43f64b..00000000000
--- a/extern/lzma/LzmaEnc.c
+++ /dev/null
@@ -1,2281 +0,0 @@
-/* LzmaEnc.c -- LZMA Encoder
-2009-02-02 : Igor Pavlov : Public domain */
-
-#include <string.h>
-
-/* #define SHOW_STAT */
-/* #define SHOW_STAT2 */
-
-#if defined(SHOW_STAT) || defined(SHOW_STAT2)
-#include <stdio.h>
-#endif
-
-#include "LzmaEnc.h"
-
-#include "LzFind.h"
-#ifdef COMPRESS_MF_MT
-#include "LzFindMt.h"
-#endif
-
-#ifdef SHOW_STAT
-static int ttt = 0;
-#endif
-
-#define kBlockSizeMax ((1 << LZMA_NUM_BLOCK_SIZE_BITS) - 1)
-
-#define kBlockSize (9 << 10)
-#define kUnpackBlockSize (1 << 18)
-#define kMatchArraySize (1 << 21)
-#define kMatchRecordMaxSize ((LZMA_MATCH_LEN_MAX * 2 + 3) * LZMA_MATCH_LEN_MAX)
-
-#define kNumMaxDirectBits (31)
-
-#define kNumTopBits 24
-#define kTopValue ((UInt32)1 << kNumTopBits)
-
-#define kNumBitModelTotalBits 11
-#define kBitModelTotal (1 << kNumBitModelTotalBits)
-#define kNumMoveBits 5
-#define kProbInitValue (kBitModelTotal >> 1)
-
-#define kNumMoveReducingBits 4
-#define kNumBitPriceShiftBits 4
-#define kBitPrice (1 << kNumBitPriceShiftBits)
-
-void LzmaEncProps_Init(CLzmaEncProps *p)
-{
- p->level = 5;
- p->dictSize = p->mc = 0;
- p->lc = p->lp = p->pb = p->algo = p->fb = p->btMode = p->numHashBytes = p->numThreads = -1;
- p->writeEndMark = 0;
-}
-
-void LzmaEncProps_Normalize(CLzmaEncProps *p)
-{
- int level = p->level;
- if (level < 0) level = 5;
- p->level = level;
- if (p->dictSize == 0) p->dictSize = (level <= 5 ? (1 << (level * 2 + 14)) : (level == 6 ? (1 << 25) : (1 << 26)));
- if (p->lc < 0) p->lc = 3;
- if (p->lp < 0) p->lp = 0;
- if (p->pb < 0) p->pb = 2;
- if (p->algo < 0) p->algo = (level < 5 ? 0 : 1);
- if (p->fb < 0) p->fb = (level < 7 ? 32 : 64);
- if (p->btMode < 0) p->btMode = (p->algo == 0 ? 0 : 1);
- if (p->numHashBytes < 0) p->numHashBytes = 4;
- if (p->mc == 0) p->mc = (16 + (p->fb >> 1)) >> (p->btMode ? 0 : 1);
- if (p->numThreads < 0)
- p->numThreads =
- #ifdef COMPRESS_MF_MT
- ((p->btMode && p->algo) ? 2 : 1);
- #else
- 1;
- #endif
-}
-
-UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2)
-{
- CLzmaEncProps props = *props2;
- LzmaEncProps_Normalize(&props);
- return props.dictSize;
-}
-
-/* #define LZMA_LOG_BSR */
-/* Define it for Intel's CPU */
-
-
-#ifdef LZMA_LOG_BSR
-
-#define kDicLogSizeMaxCompress 30
-
-#define BSR2_RET(pos, res) { unsigned long i; _BitScanReverse(&i, (pos)); res = (i + i) + ((pos >> (i - 1)) & 1); }
-
-UInt32 GetPosSlot1(UInt32 pos)
-{
- UInt32 res;
- BSR2_RET(pos, res);
- return res;
-}
-#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); }
-#define GetPosSlot(pos, res) { if (pos < 2) res = pos; else BSR2_RET(pos, res); }
-
-#else
-
-#define kNumLogBits (9 + (int)sizeof(size_t) / 2)
-#define kDicLogSizeMaxCompress ((kNumLogBits - 1) * 2 + 7)
-
-void LzmaEnc_FastPosInit(Byte *g_FastPos)
-{
- int c = 2, slotFast;
- g_FastPos[0] = 0;
- g_FastPos[1] = 1;
-
- for (slotFast = 2; slotFast < kNumLogBits * 2; slotFast++)
- {
- UInt32 k = (1 << ((slotFast >> 1) - 1));
- UInt32 j;
- for (j = 0; j < k; j++, c++)
- g_FastPos[c] = (Byte)slotFast;
- }
-}
-
-#define BSR2_RET(pos, res) { UInt32 i = 6 + ((kNumLogBits - 1) & \
- (0 - (((((UInt32)1 << (kNumLogBits + 6)) - 1) - pos) >> 31))); \
- res = p->g_FastPos[pos >> i] + (i * 2); }
-/*
-#define BSR2_RET(pos, res) { res = (pos < (1 << (kNumLogBits + 6))) ? \
- p->g_FastPos[pos >> 6] + 12 : \
- p->g_FastPos[pos >> (6 + kNumLogBits - 1)] + (6 + (kNumLogBits - 1)) * 2; }
-*/
-
-#define GetPosSlot1(pos) p->g_FastPos[pos]
-#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); }
-#define GetPosSlot(pos, res) { if (pos < kNumFullDistances) res = p->g_FastPos[pos]; else BSR2_RET(pos, res); }
-
-#endif
-
-
-#define LZMA_NUM_REPS 4
-
-typedef unsigned CState;
-
-typedef struct _COptimal
-{
- UInt32 price;
-
- CState state;
- int prev1IsChar;
- int prev2;
-
- UInt32 posPrev2;
- UInt32 backPrev2;
-
- UInt32 posPrev;
- UInt32 backPrev;
- UInt32 backs[LZMA_NUM_REPS];
-} COptimal;
-
-#define kNumOpts (1 << 12)
-
-#define kNumLenToPosStates 4
-#define kNumPosSlotBits 6
-#define kDicLogSizeMin 0
-#define kDicLogSizeMax 32
-#define kDistTableSizeMax (kDicLogSizeMax * 2)
-
-
-#define kNumAlignBits 4
-#define kAlignTableSize (1 << kNumAlignBits)
-#define kAlignMask (kAlignTableSize - 1)
-
-#define kStartPosModelIndex 4
-#define kEndPosModelIndex 14
-#define kNumPosModels (kEndPosModelIndex - kStartPosModelIndex)
-
-#define kNumFullDistances (1 << (kEndPosModelIndex / 2))
-
-#ifdef _LZMA_PROB32
-#define CLzmaProb UInt32
-#else
-#define CLzmaProb UInt16
-#endif
-
-#define LZMA_PB_MAX 4
-#define LZMA_LC_MAX 8
-#define LZMA_LP_MAX 4
-
-#define LZMA_NUM_PB_STATES_MAX (1 << LZMA_PB_MAX)
-
-
-#define kLenNumLowBits 3
-#define kLenNumLowSymbols (1 << kLenNumLowBits)
-#define kLenNumMidBits 3
-#define kLenNumMidSymbols (1 << kLenNumMidBits)
-#define kLenNumHighBits 8
-#define kLenNumHighSymbols (1 << kLenNumHighBits)
-
-#define kLenNumSymbolsTotal (kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols)
-
-#define LZMA_MATCH_LEN_MIN 2
-#define LZMA_MATCH_LEN_MAX (LZMA_MATCH_LEN_MIN + kLenNumSymbolsTotal - 1)
-
-#define kNumStates 12
-
-typedef struct
-{
- CLzmaProb choice;
- CLzmaProb choice2;
- CLzmaProb low[LZMA_NUM_PB_STATES_MAX << kLenNumLowBits];
- CLzmaProb mid[LZMA_NUM_PB_STATES_MAX << kLenNumMidBits];
- CLzmaProb high[kLenNumHighSymbols];
-} CLenEnc;
-
-typedef struct
-{
- CLenEnc p;
- UInt32 prices[LZMA_NUM_PB_STATES_MAX][kLenNumSymbolsTotal];
- UInt32 tableSize;
- UInt32 counters[LZMA_NUM_PB_STATES_MAX];
-} CLenPriceEnc;
-
-typedef struct _CRangeEnc
-{
- UInt32 range;
- Byte cache;
- UInt64 low;
- UInt64 cacheSize;
- Byte *buf;
- Byte *bufLim;
- Byte *bufBase;
- ISeqOutStream *outStream;
- UInt64 processed;
- SRes res;
-} CRangeEnc;
-
-typedef struct _CSeqInStreamBuf
-{
- ISeqInStream funcTable;
- const Byte *data;
- SizeT rem;
-} CSeqInStreamBuf;
-
-static SRes MyRead(void *pp, void *data, size_t *size)
-{
- size_t curSize = *size;
- CSeqInStreamBuf *p = (CSeqInStreamBuf *)pp;
- if (p->rem < curSize)
- curSize = p->rem;
- memcpy(data, p->data, curSize);
- p->rem -= curSize;
- p->data += curSize;
- *size = curSize;
- return SZ_OK;
-}
-
-typedef struct
-{
- CLzmaProb *litProbs;
-
- CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX];
- CLzmaProb isRep[kNumStates];
- CLzmaProb isRepG0[kNumStates];
- CLzmaProb isRepG1[kNumStates];
- CLzmaProb isRepG2[kNumStates];
- CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX];
-
- CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits];
- CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex];
- CLzmaProb posAlignEncoder[1 << kNumAlignBits];
-
- CLenPriceEnc lenEnc;
- CLenPriceEnc repLenEnc;
-
- UInt32 reps[LZMA_NUM_REPS];
- UInt32 state;
-} CSaveState;
-
-typedef struct _CLzmaEnc
-{
- IMatchFinder matchFinder;
- void *matchFinderObj;
-
- #ifdef COMPRESS_MF_MT
- Bool mtMode;
- CMatchFinderMt matchFinderMt;
- #endif
-
- CMatchFinder matchFinderBase;
-
- #ifdef COMPRESS_MF_MT
- Byte pad[128];
- #endif
-
- UInt32 optimumEndIndex;
- UInt32 optimumCurrentIndex;
-
- UInt32 longestMatchLength;
- UInt32 numPairs;
- UInt32 numAvail;
- COptimal opt[kNumOpts];
-
- #ifndef LZMA_LOG_BSR
- Byte g_FastPos[1 << kNumLogBits];
- #endif
-
- UInt32 ProbPrices[kBitModelTotal >> kNumMoveReducingBits];
- UInt32 matches[LZMA_MATCH_LEN_MAX * 2 + 2 + 1];
- UInt32 numFastBytes;
- UInt32 additionalOffset;
- UInt32 reps[LZMA_NUM_REPS];
- UInt32 state;
-
- UInt32 posSlotPrices[kNumLenToPosStates][kDistTableSizeMax];
- UInt32 distancesPrices[kNumLenToPosStates][kNumFullDistances];
- UInt32 alignPrices[kAlignTableSize];
- UInt32 alignPriceCount;
-
- UInt32 distTableSize;
-
- unsigned lc, lp, pb;
- unsigned lpMask, pbMask;
-
- CLzmaProb *litProbs;
-
- CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX];
- CLzmaProb isRep[kNumStates];
- CLzmaProb isRepG0[kNumStates];
- CLzmaProb isRepG1[kNumStates];
- CLzmaProb isRepG2[kNumStates];
- CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX];
-
- CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits];
- CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex];
- CLzmaProb posAlignEncoder[1 << kNumAlignBits];
-
- CLenPriceEnc lenEnc;
- CLenPriceEnc repLenEnc;
-
- unsigned lclp;
-
- Bool fastMode;
-
- CRangeEnc rc;
-
- Bool writeEndMark;
- UInt64 nowPos64;
- UInt32 matchPriceCount;
- Bool finished;
- Bool multiThread;
-
- SRes result;
- UInt32 dictSize;
- UInt32 matchFinderCycles;
-
- ISeqInStream *inStream;
- CSeqInStreamBuf seqBufInStream;
-
- CSaveState saveState;
-} CLzmaEnc;
-
-void LzmaEnc_SaveState(CLzmaEncHandle pp)
-{
- CLzmaEnc *p = (CLzmaEnc *)pp;
- CSaveState *dest = &p->saveState;
- int i;
- dest->lenEnc = p->lenEnc;
- dest->repLenEnc = p->repLenEnc;
- dest->state = p->state;
-
- for (i = 0; i < kNumStates; i++)
- {
- memcpy(dest->isMatch[i], p->isMatch[i], sizeof(p->isMatch[i]));
- memcpy(dest->isRep0Long[i], p->isRep0Long[i], sizeof(p->isRep0Long[i]));
- }
- for (i = 0; i < kNumLenToPosStates; i++)
- memcpy(dest->posSlotEncoder[i], p->posSlotEncoder[i], sizeof(p->posSlotEncoder[i]));
- memcpy(dest->isRep, p->isRep, sizeof(p->isRep));
- memcpy(dest->isRepG0, p->isRepG0, sizeof(p->isRepG0));
- memcpy(dest->isRepG1, p->isRepG1, sizeof(p->isRepG1));
- memcpy(dest->isRepG2, p->isRepG2, sizeof(p->isRepG2));
- memcpy(dest->posEncoders, p->posEncoders, sizeof(p->posEncoders));
- memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder));
- memcpy(dest->reps, p->reps, sizeof(p->reps));
- memcpy(dest->litProbs, p->litProbs, (0x300 << p->lclp) * sizeof(CLzmaProb));
-}
-
-void LzmaEnc_RestoreState(CLzmaEncHandle pp)
-{
- CLzmaEnc *dest = (CLzmaEnc *)pp;
- const CSaveState *p = &dest->saveState;
- int i;
- dest->lenEnc = p->lenEnc;
- dest->repLenEnc = p->repLenEnc;
- dest->state = p->state;
-
- for (i = 0; i < kNumStates; i++)
- {
- memcpy(dest->isMatch[i], p->isMatch[i], sizeof(p->isMatch[i]));
- memcpy(dest->isRep0Long[i], p->isRep0Long[i], sizeof(p->isRep0Long[i]));
- }
- for (i = 0; i < kNumLenToPosStates; i++)
- memcpy(dest->posSlotEncoder[i], p->posSlotEncoder[i], sizeof(p->posSlotEncoder[i]));
- memcpy(dest->isRep, p->isRep, sizeof(p->isRep));
- memcpy(dest->isRepG0, p->isRepG0, sizeof(p->isRepG0));
- memcpy(dest->isRepG1, p->isRepG1, sizeof(p->isRepG1));
- memcpy(dest->isRepG2, p->isRepG2, sizeof(p->isRepG2));
- memcpy(dest->posEncoders, p->posEncoders, sizeof(p->posEncoders));
- memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder));
- memcpy(dest->reps, p->reps, sizeof(p->reps));
- memcpy(dest->litProbs, p->litProbs, (0x300 << dest->lclp) * sizeof(CLzmaProb));
-}
-
-SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2)
-{
- CLzmaEnc *p = (CLzmaEnc *)pp;
- CLzmaEncProps props = *props2;
- LzmaEncProps_Normalize(&props);
-
- if (props.lc > LZMA_LC_MAX || props.lp > LZMA_LP_MAX || props.pb > LZMA_PB_MAX ||
- props.dictSize > (1 << kDicLogSizeMaxCompress) || props.dictSize > (1 << 30))
- return SZ_ERROR_PARAM;
- p->dictSize = props.dictSize;
- p->matchFinderCycles = props.mc;
- {
- unsigned fb = props.fb;
- if (fb < 5)
- fb = 5;
- if (fb > LZMA_MATCH_LEN_MAX)
- fb = LZMA_MATCH_LEN_MAX;
- p->numFastBytes = fb;
- }
- p->lc = props.lc;
- p->lp = props.lp;
- p->pb = props.pb;
- p->fastMode = (props.algo == 0);
- p->matchFinderBase.btMode = props.btMode;
- {
- UInt32 numHashBytes = 4;
- if (props.btMode)
- {
- if (props.numHashBytes < 2)
- numHashBytes = 2;
- else if (props.numHashBytes < 4)
- numHashBytes = props.numHashBytes;
- }
- p->matchFinderBase.numHashBytes = numHashBytes;
- }
-
- p->matchFinderBase.cutValue = props.mc;
-
- p->writeEndMark = props.writeEndMark;
-
- #ifdef COMPRESS_MF_MT
- /*
- if (newMultiThread != _multiThread)
- {
- ReleaseMatchFinder();
- _multiThread = newMultiThread;
- }
- */
- p->multiThread = (props.numThreads > 1);
- #endif
-
- return SZ_OK;
-}
-
-static const int kLiteralNextStates[kNumStates] = {0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5};
-static const int kMatchNextStates[kNumStates] = {7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10};
-static const int kRepNextStates[kNumStates] = {8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11};
-static const int kShortRepNextStates[kNumStates]= {9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11};
-
-#define IsCharState(s) ((s) < 7)
-
-#define GetLenToPosState(len) (((len) < kNumLenToPosStates + 1) ? (len) - 2 : kNumLenToPosStates - 1)
-
-#define kInfinityPrice (1 << 30)
-
-static void RangeEnc_Construct(CRangeEnc *p)
-{
- p->outStream = 0;
- p->bufBase = 0;
-}
-
-#define RangeEnc_GetProcessed(p) ((p)->processed + ((p)->buf - (p)->bufBase) + (p)->cacheSize)
-
-#define RC_BUF_SIZE (1 << 16)
-static int RangeEnc_Alloc(CRangeEnc *p, ISzAlloc *alloc)
-{
- if (p->bufBase == 0)
- {
- p->bufBase = (Byte *)alloc->Alloc(alloc, RC_BUF_SIZE);
- if (p->bufBase == 0)
- return 0;
- p->bufLim = p->bufBase + RC_BUF_SIZE;
- }
- return 1;
-}
-
-static void RangeEnc_Free(CRangeEnc *p, ISzAlloc *alloc)
-{
- alloc->Free(alloc, p->bufBase);
- p->bufBase = 0;
-}
-
-static void RangeEnc_Init(CRangeEnc *p)
-{
- /* Stream.Init(); */
- p->low = 0;
- p->range = 0xFFFFFFFF;
- p->cacheSize = 1;
- p->cache = 0;
-
- p->buf = p->bufBase;
-
- p->processed = 0;
- p->res = SZ_OK;
-}
-
-static void RangeEnc_FlushStream(CRangeEnc *p)
-{
- size_t num;
- if (p->res != SZ_OK)
- return;
- num = p->buf - p->bufBase;
- if (num != p->outStream->Write(p->outStream, p->bufBase, num))
- p->res = SZ_ERROR_WRITE;
- p->processed += num;
- p->buf = p->bufBase;
-}
-
-static void MY_FAST_CALL RangeEnc_ShiftLow(CRangeEnc *p)
-{
- if ((UInt32)p->low < (UInt32)0xFF000000 || (int)(p->low >> 32) != 0)
- {
- Byte temp = p->cache;
- do
- {
- Byte *buf = p->buf;
- *buf++ = (Byte)(temp + (Byte)(p->low >> 32));
- p->buf = buf;
- if (buf == p->bufLim)
- RangeEnc_FlushStream(p);
- temp = 0xFF;
- }
- while (--p->cacheSize != 0);
- p->cache = (Byte)((UInt32)p->low >> 24);
- }
- p->cacheSize++;
- p->low = (UInt32)p->low << 8;
-}
-
-static void RangeEnc_FlushData(CRangeEnc *p)
-{
- int i;
- for (i = 0; i < 5; i++)
- RangeEnc_ShiftLow(p);
-}
-
-static void RangeEnc_EncodeDirectBits(CRangeEnc *p, UInt32 value, int numBits)
-{
- do
- {
- p->range >>= 1;
- p->low += p->range & (0 - ((value >> --numBits) & 1));
- if (p->range < kTopValue)
- {
- p->range <<= 8;
- RangeEnc_ShiftLow(p);
- }
- }
- while (numBits != 0);
-}
-
-static void RangeEnc_EncodeBit(CRangeEnc *p, CLzmaProb *prob, UInt32 symbol)
-{
- UInt32 ttt = *prob;
- UInt32 newBound = (p->range >> kNumBitModelTotalBits) * ttt;
- if (symbol == 0)
- {
- p->range = newBound;
- ttt += (kBitModelTotal - ttt) >> kNumMoveBits;
- }
- else
- {
- p->low += newBound;
- p->range -= newBound;
- ttt -= ttt >> kNumMoveBits;
- }
- *prob = (CLzmaProb)ttt;
- if (p->range < kTopValue)
- {
- p->range <<= 8;
- RangeEnc_ShiftLow(p);
- }
-}
-
-static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol)
-{
- symbol |= 0x100;
- do
- {
- RangeEnc_EncodeBit(p, probs + (symbol >> 8), (symbol >> 7) & 1);
- symbol <<= 1;
- }
- while (symbol < 0x10000);
-}
-
-static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol, UInt32 matchByte)
-{
- UInt32 offs = 0x100;
- symbol |= 0x100;
- do
- {
- matchByte <<= 1;
- RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (symbol >> 8)), (symbol >> 7) & 1);
- symbol <<= 1;
- offs &= ~(matchByte ^ symbol);
- }
- while (symbol < 0x10000);
-}
-
-void LzmaEnc_InitPriceTables(UInt32 *ProbPrices)
-{
- UInt32 i;
- for (i = (1 << kNumMoveReducingBits) / 2; i < kBitModelTotal; i += (1 << kNumMoveReducingBits))
- {
- const int kCyclesBits = kNumBitPriceShiftBits;
- UInt32 w = i;
- UInt32 bitCount = 0;
- int j;
- for (j = 0; j < kCyclesBits; j++)
- {
- w = w * w;
- bitCount <<= 1;
- while (w >= ((UInt32)1 << 16))
- {
- w >>= 1;
- bitCount++;
- }
- }
- ProbPrices[i >> kNumMoveReducingBits] = ((kNumBitModelTotalBits << kCyclesBits) - 15 - bitCount);
- }
-}
-
-
-#define GET_PRICE(prob, symbol) \
- p->ProbPrices[((prob) ^ (((-(int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits];
-
-#define GET_PRICEa(prob, symbol) \
- ProbPrices[((prob) ^ ((-((int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits];
-
-#define GET_PRICE_0(prob) p->ProbPrices[(prob) >> kNumMoveReducingBits]
-#define GET_PRICE_1(prob) p->ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits]
-
-#define GET_PRICE_0a(prob) ProbPrices[(prob) >> kNumMoveReducingBits]
-#define GET_PRICE_1a(prob) ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits]
-
-static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 symbol, UInt32 *ProbPrices)
-{
- UInt32 price = 0;
- symbol |= 0x100;
- do
- {
- price += GET_PRICEa(probs[symbol >> 8], (symbol >> 7) & 1);
- symbol <<= 1;
- }
- while (symbol < 0x10000);
- return price;
-}
-
-static UInt32 LitEnc_GetPriceMatched(const CLzmaProb *probs, UInt32 symbol, UInt32 matchByte, UInt32 *ProbPrices)
-{
- UInt32 price = 0;
- UInt32 offs = 0x100;
- symbol |= 0x100;
- do
- {
- matchByte <<= 1;
- price += GET_PRICEa(probs[offs + (matchByte & offs) + (symbol >> 8)], (symbol >> 7) & 1);
- symbol <<= 1;
- offs &= ~(matchByte ^ symbol);
- }
- while (symbol < 0x10000);
- return price;
-}
-
-
-static void RcTree_Encode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol)
-{
- UInt32 m = 1;
- int i;
- for (i = numBitLevels; i != 0;)
- {
- UInt32 bit;
- i--;
- bit = (symbol >> i) & 1;
- RangeEnc_EncodeBit(rc, probs + m, bit);
- m = (m << 1) | bit;
- }
-}
-
-static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol)
-{
- UInt32 m = 1;
- int i;
- for (i = 0; i < numBitLevels; i++)
- {
- UInt32 bit = symbol & 1;
- RangeEnc_EncodeBit(rc, probs + m, bit);
- m = (m << 1) | bit;
- symbol >>= 1;
- }
-}
-
-static UInt32 RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt32 *ProbPrices)
-{
- UInt32 price = 0;
- symbol |= (1 << numBitLevels);
- while (symbol != 1)
- {
- price += GET_PRICEa(probs[symbol >> 1], symbol & 1);
- symbol >>= 1;
- }
- return price;
-}
-
-static UInt32 RcTree_ReverseGetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt32 *ProbPrices)
-{
- UInt32 price = 0;
- UInt32 m = 1;
- int i;
- for (i = numBitLevels; i != 0; i--)
- {
- UInt32 bit = symbol & 1;
- symbol >>= 1;
- price += GET_PRICEa(probs[m], bit);
- m = (m << 1) | bit;
- }
- return price;
-}
-
-
-static void LenEnc_Init(CLenEnc *p)
-{
- unsigned i;
- p->choice = p->choice2 = kProbInitValue;
- for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumLowBits); i++)
- p->low[i] = kProbInitValue;
- for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumMidBits); i++)
- p->mid[i] = kProbInitValue;
- for (i = 0; i < kLenNumHighSymbols; i++)
- p->high[i] = kProbInitValue;
-}
-
-static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState)
-{
- if (symbol < kLenNumLowSymbols)
- {
- RangeEnc_EncodeBit(rc, &p->choice, 0);
- RcTree_Encode(rc, p->low + (posState << kLenNumLowBits), kLenNumLowBits, symbol);
- }
- else
- {
- RangeEnc_EncodeBit(rc, &p->choice, 1);
- if (symbol < kLenNumLowSymbols + kLenNumMidSymbols)
- {
- RangeEnc_EncodeBit(rc, &p->choice2, 0);
- RcTree_Encode(rc, p->mid + (posState << kLenNumMidBits), kLenNumMidBits, symbol - kLenNumLowSymbols);
- }
- else
- {
- RangeEnc_EncodeBit(rc, &p->choice2, 1);
- RcTree_Encode(rc, p->high, kLenNumHighBits, symbol - kLenNumLowSymbols - kLenNumMidSymbols);
- }
- }
-}
-
-static void LenEnc_SetPrices(CLenEnc *p, UInt32 posState, UInt32 numSymbols, UInt32 *prices, UInt32 *ProbPrices)
-{
- UInt32 a0 = GET_PRICE_0a(p->choice);
- UInt32 a1 = GET_PRICE_1a(p->choice);
- UInt32 b0 = a1 + GET_PRICE_0a(p->choice2);
- UInt32 b1 = a1 + GET_PRICE_1a(p->choice2);
- UInt32 i = 0;
- for (i = 0; i < kLenNumLowSymbols; i++)
- {
- if (i >= numSymbols)
- return;
- prices[i] = a0 + RcTree_GetPrice(p->low + (posState << kLenNumLowBits), kLenNumLowBits, i, ProbPrices);
- }
- for (; i < kLenNumLowSymbols + kLenNumMidSymbols; i++)
- {
- if (i >= numSymbols)
- return;
- prices[i] = b0 + RcTree_GetPrice(p->mid + (posState << kLenNumMidBits), kLenNumMidBits, i - kLenNumLowSymbols, ProbPrices);
- }
- for (; i < numSymbols; i++)
- prices[i] = b1 + RcTree_GetPrice(p->high, kLenNumHighBits, i - kLenNumLowSymbols - kLenNumMidSymbols, ProbPrices);
-}
-
-static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, UInt32 posState, UInt32 *ProbPrices)
-{
- LenEnc_SetPrices(&p->p, posState, p->tableSize, p->prices[posState], ProbPrices);
- p->counters[posState] = p->tableSize;
-}
-
-static void LenPriceEnc_UpdateTables(CLenPriceEnc *p, UInt32 numPosStates, UInt32 *ProbPrices)
-{
- UInt32 posState;
- for (posState = 0; posState < numPosStates; posState++)
- LenPriceEnc_UpdateTable(p, posState, ProbPrices);
-}
-
-static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState, Bool updatePrice, UInt32 *ProbPrices)
-{
- LenEnc_Encode(&p->p, rc, symbol, posState);
- if (updatePrice)
- if (--p->counters[posState] == 0)
- LenPriceEnc_UpdateTable(p, posState, ProbPrices);
-}
-
-
-
-
-static void MovePos(CLzmaEnc *p, UInt32 num)
-{
- #ifdef SHOW_STAT
- ttt += num;
- printf("\n MovePos %d", num);
- #endif
- if (num != 0)
- {
- p->additionalOffset += num;
- p->matchFinder.Skip(p->matchFinderObj, num);
- }
-}
-
-static UInt32 ReadMatchDistances(CLzmaEnc *p, UInt32 *numDistancePairsRes)
-{
- UInt32 lenRes = 0, numPairs;
- p->numAvail = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
- numPairs = p->matchFinder.GetMatches(p->matchFinderObj, p->matches);
- #ifdef SHOW_STAT
- printf("\n i = %d numPairs = %d ", ttt, numPairs / 2);
- ttt++;
- {
- UInt32 i;
- for (i = 0; i < numPairs; i += 2)
- printf("%2d %6d | ", p->matches[i], p->matches[i + 1]);
- }
- #endif
- if (numPairs > 0)
- {
- lenRes = p->matches[numPairs - 2];
- if (lenRes == p->numFastBytes)
- {
- const Byte *pby = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
- UInt32 distance = p->matches[numPairs - 1] + 1;
- UInt32 numAvail = p->numAvail;
- if (numAvail > LZMA_MATCH_LEN_MAX)
- numAvail = LZMA_MATCH_LEN_MAX;
- {
- const Byte *pby2 = pby - distance;
- for (; lenRes < numAvail && pby[lenRes] == pby2[lenRes]; lenRes++);
- }
- }
- }
- p->additionalOffset++;
- *numDistancePairsRes = numPairs;
- return lenRes;
-}
-
-
-#define MakeAsChar(p) (p)->backPrev = (UInt32)(-1); (p)->prev1IsChar = False;
-#define MakeAsShortRep(p) (p)->backPrev = 0; (p)->prev1IsChar = False;
-#define IsShortRep(p) ((p)->backPrev == 0)
-
-static UInt32 GetRepLen1Price(CLzmaEnc *p, UInt32 state, UInt32 posState)
-{
- return
- GET_PRICE_0(p->isRepG0[state]) +
- GET_PRICE_0(p->isRep0Long[state][posState]);
-}
-
-static UInt32 GetPureRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 state, UInt32 posState)
-{
- UInt32 price;
- if (repIndex == 0)
- {
- price = GET_PRICE_0(p->isRepG0[state]);
- price += GET_PRICE_1(p->isRep0Long[state][posState]);
- }
- else
- {
- price = GET_PRICE_1(p->isRepG0[state]);
- if (repIndex == 1)
- price += GET_PRICE_0(p->isRepG1[state]);
- else
- {
- price += GET_PRICE_1(p->isRepG1[state]);
- price += GET_PRICE(p->isRepG2[state], repIndex - 2);
- }
- }
- return price;
-}
-
-static UInt32 GetRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 len, UInt32 state, UInt32 posState)
-{
- return p->repLenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN] +
- GetPureRepPrice(p, repIndex, state, posState);
-}
-
-static UInt32 Backward(CLzmaEnc *p, UInt32 *backRes, UInt32 cur)
-{
- UInt32 posMem = p->opt[cur].posPrev;
- UInt32 backMem = p->opt[cur].backPrev;
- p->optimumEndIndex = cur;
- do
- {
- if (p->opt[cur].prev1IsChar)
- {
- MakeAsChar(&p->opt[posMem])
- p->opt[posMem].posPrev = posMem - 1;
- if (p->opt[cur].prev2)
- {
- p->opt[posMem - 1].prev1IsChar = False;
- p->opt[posMem - 1].posPrev = p->opt[cur].posPrev2;
- p->opt[posMem - 1].backPrev = p->opt[cur].backPrev2;
- }
- }
- {
- UInt32 posPrev = posMem;
- UInt32 backCur = backMem;
-
- backMem = p->opt[posPrev].backPrev;
- posMem = p->opt[posPrev].posPrev;
-
- p->opt[posPrev].backPrev = backCur;
- p->opt[posPrev].posPrev = cur;
- cur = posPrev;
- }
- }
- while (cur != 0);
- *backRes = p->opt[0].backPrev;
- p->optimumCurrentIndex = p->opt[0].posPrev;
- return p->optimumCurrentIndex;
-}
-
-#define LIT_PROBS(pos, prevByte) (p->litProbs + ((((pos) & p->lpMask) << p->lc) + ((prevByte) >> (8 - p->lc))) * 0x300)
-
-static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes)
-{
- UInt32 numAvail, mainLen, numPairs, repMaxIndex, i, posState, lenEnd, len, cur;
- UInt32 matchPrice, repMatchPrice, normalMatchPrice;
- UInt32 reps[LZMA_NUM_REPS], repLens[LZMA_NUM_REPS];
- UInt32 *matches;
- const Byte *data;
- Byte curByte, matchByte;
- if (p->optimumEndIndex != p->optimumCurrentIndex)
- {
- const COptimal *opt = &p->opt[p->optimumCurrentIndex];
- UInt32 lenRes = opt->posPrev - p->optimumCurrentIndex;
- *backRes = opt->backPrev;
- p->optimumCurrentIndex = opt->posPrev;
- return lenRes;
- }
- p->optimumCurrentIndex = p->optimumEndIndex = 0;
-
- if (p->additionalOffset == 0)
- mainLen = ReadMatchDistances(p, &numPairs);
- else
- {
- mainLen = p->longestMatchLength;
- numPairs = p->numPairs;
- }
-
- numAvail = p->numAvail;
- if (numAvail < 2)
- {
- *backRes = (UInt32)(-1);
- return 1;
- }
- if (numAvail > LZMA_MATCH_LEN_MAX)
- numAvail = LZMA_MATCH_LEN_MAX;
-
- data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
- repMaxIndex = 0;
- for (i = 0; i < LZMA_NUM_REPS; i++)
- {
- UInt32 lenTest;
- const Byte *data2;
- reps[i] = p->reps[i];
- data2 = data - (reps[i] + 1);
- if (data[0] != data2[0] || data[1] != data2[1])
- {
- repLens[i] = 0;
- continue;
- }
- for (lenTest = 2; lenTest < numAvail && data[lenTest] == data2[lenTest]; lenTest++);
- repLens[i] = lenTest;
- if (lenTest > repLens[repMaxIndex])
- repMaxIndex = i;
- }
- if (repLens[repMaxIndex] >= p->numFastBytes)
- {
- UInt32 lenRes;
- *backRes = repMaxIndex;
- lenRes = repLens[repMaxIndex];
- MovePos(p, lenRes - 1);
- return lenRes;
- }
-
- matches = p->matches;
- if (mainLen >= p->numFastBytes)
- {
- *backRes = matches[numPairs - 1] + LZMA_NUM_REPS;
- MovePos(p, mainLen - 1);
- return mainLen;
- }
- curByte = *data;
- matchByte = *(data - (reps[0] + 1));
-
- if (mainLen < 2 && curByte != matchByte && repLens[repMaxIndex] < 2)
- {
- *backRes = (UInt32)-1;
- return 1;
- }
-
- p->opt[0].state = (CState)p->state;
-
- posState = (position & p->pbMask);
-
- {
- const CLzmaProb *probs = LIT_PROBS(position, *(data - 1));
- p->opt[1].price = GET_PRICE_0(p->isMatch[p->state][posState]) +
- (!IsCharState(p->state) ?
- LitEnc_GetPriceMatched(probs, curByte, matchByte, p->ProbPrices) :
- LitEnc_GetPrice(probs, curByte, p->ProbPrices));
- }
-
- MakeAsChar(&p->opt[1]);
-
- matchPrice = GET_PRICE_1(p->isMatch[p->state][posState]);
- repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[p->state]);
-
- if (matchByte == curByte)
- {
- UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, p->state, posState);
- if (shortRepPrice < p->opt[1].price)
- {
- p->opt[1].price = shortRepPrice;
- MakeAsShortRep(&p->opt[1]);
- }
- }
- lenEnd = ((mainLen >= repLens[repMaxIndex]) ? mainLen : repLens[repMaxIndex]);
-
- if (lenEnd < 2)
- {
- *backRes = p->opt[1].backPrev;
- return 1;
- }
-
- p->opt[1].posPrev = 0;
- for (i = 0; i < LZMA_NUM_REPS; i++)
- p->opt[0].backs[i] = reps[i];
-
- len = lenEnd;
- do
- p->opt[len--].price = kInfinityPrice;
- while (len >= 2);
-
- for (i = 0; i < LZMA_NUM_REPS; i++)
- {
- UInt32 repLen = repLens[i];
- UInt32 price;
- if (repLen < 2)
- continue;
- price = repMatchPrice + GetPureRepPrice(p, i, p->state, posState);
- do
- {
- UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][repLen - 2];
- COptimal *opt = &p->opt[repLen];
- if (curAndLenPrice < opt->price)
- {
- opt->price = curAndLenPrice;
- opt->posPrev = 0;
- opt->backPrev = i;
- opt->prev1IsChar = False;
- }
- }
- while (--repLen >= 2);
- }
-
- normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[p->state]);
-
- len = ((repLens[0] >= 2) ? repLens[0] + 1 : 2);
- if (len <= mainLen)
- {
- UInt32 offs = 0;
- while (len > matches[offs])
- offs += 2;
- for (; ; len++)
- {
- COptimal *opt;
- UInt32 distance = matches[offs + 1];
-
- UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN];
- UInt32 lenToPosState = GetLenToPosState(len);
- if (distance < kNumFullDistances)
- curAndLenPrice += p->distancesPrices[lenToPosState][distance];
- else
- {
- UInt32 slot;
- GetPosSlot2(distance, slot);
- curAndLenPrice += p->alignPrices[distance & kAlignMask] + p->posSlotPrices[lenToPosState][slot];
- }
- opt = &p->opt[len];
- if (curAndLenPrice < opt->price)
- {
- opt->price = curAndLenPrice;
- opt->posPrev = 0;
- opt->backPrev = distance + LZMA_NUM_REPS;
- opt->prev1IsChar = False;
- }
- if (len == matches[offs])
- {
- offs += 2;
- if (offs == numPairs)
- break;
- }
- }
- }
-
- cur = 0;
-
- #ifdef SHOW_STAT2
- if (position >= 0)
- {
- unsigned i;
- printf("\n pos = %4X", position);
- for (i = cur; i <= lenEnd; i++)
- printf("\nprice[%4X] = %d", position - cur + i, p->opt[i].price);
- }
- #endif
-
- for (;;)
- {
- UInt32 numAvailFull, newLen, numPairs, posPrev, state, posState, startLen;
- UInt32 curPrice, curAnd1Price, matchPrice, repMatchPrice;
- Bool nextIsChar;
- Byte curByte, matchByte;
- const Byte *data;
- COptimal *curOpt;
- COptimal *nextOpt;
-
- cur++;
- if (cur == lenEnd)
- return Backward(p, backRes, cur);
-
- newLen = ReadMatchDistances(p, &numPairs);
- if (newLen >= p->numFastBytes)
- {
- p->numPairs = numPairs;
- p->longestMatchLength = newLen;
- return Backward(p, backRes, cur);
- }
- position++;
- curOpt = &p->opt[cur];
- posPrev = curOpt->posPrev;
- if (curOpt->prev1IsChar)
- {
- posPrev--;
- if (curOpt->prev2)
- {
- state = p->opt[curOpt->posPrev2].state;
- if (curOpt->backPrev2 < LZMA_NUM_REPS)
- state = kRepNextStates[state];
- else
- state = kMatchNextStates[state];
- }
- else
- state = p->opt[posPrev].state;
- state = kLiteralNextStates[state];
- }
- else
- state = p->opt[posPrev].state;
- if (posPrev == cur - 1)
- {
- if (IsShortRep(curOpt))
- state = kShortRepNextStates[state];
- else
- state = kLiteralNextStates[state];
- }
- else
- {
- UInt32 pos;
- const COptimal *prevOpt;
- if (curOpt->prev1IsChar && curOpt->prev2)
- {
- posPrev = curOpt->posPrev2;
- pos = curOpt->backPrev2;
- state = kRepNextStates[state];
- }
- else
- {
- pos = curOpt->backPrev;
- if (pos < LZMA_NUM_REPS)
- state = kRepNextStates[state];
- else
- state = kMatchNextStates[state];
- }
- prevOpt = &p->opt[posPrev];
- if (pos < LZMA_NUM_REPS)
- {
- UInt32 i;
- reps[0] = prevOpt->backs[pos];
- for (i = 1; i <= pos; i++)
- reps[i] = prevOpt->backs[i - 1];
- for (; i < LZMA_NUM_REPS; i++)
- reps[i] = prevOpt->backs[i];
- }
- else
- {
- UInt32 i;
- reps[0] = (pos - LZMA_NUM_REPS);
- for (i = 1; i < LZMA_NUM_REPS; i++)
- reps[i] = prevOpt->backs[i - 1];
- }
- }
- curOpt->state = (CState)state;
-
- curOpt->backs[0] = reps[0];
- curOpt->backs[1] = reps[1];
- curOpt->backs[2] = reps[2];
- curOpt->backs[3] = reps[3];
-
- curPrice = curOpt->price;
- nextIsChar = False;
- data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
- curByte = *data;
- matchByte = *(data - (reps[0] + 1));
-
- posState = (position & p->pbMask);
-
- curAnd1Price = curPrice + GET_PRICE_0(p->isMatch[state][posState]);
- {
- const CLzmaProb *probs = LIT_PROBS(position, *(data - 1));
- curAnd1Price +=
- (!IsCharState(state) ?
- LitEnc_GetPriceMatched(probs, curByte, matchByte, p->ProbPrices) :
- LitEnc_GetPrice(probs, curByte, p->ProbPrices));
- }
-
- nextOpt = &p->opt[cur + 1];
-
- if (curAnd1Price < nextOpt->price)
- {
- nextOpt->price = curAnd1Price;
- nextOpt->posPrev = cur;
- MakeAsChar(nextOpt);
- nextIsChar = True;
- }
-
- matchPrice = curPrice + GET_PRICE_1(p->isMatch[state][posState]);
- repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[state]);
-
- if (matchByte == curByte && !(nextOpt->posPrev < cur && nextOpt->backPrev == 0))
- {
- UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, state, posState);
- if (shortRepPrice <= nextOpt->price)
- {
- nextOpt->price = shortRepPrice;
- nextOpt->posPrev = cur;
- MakeAsShortRep(nextOpt);
- nextIsChar = True;
- }
- }
- numAvailFull = p->numAvail;
- {
- UInt32 temp = kNumOpts - 1 - cur;
- if (temp < numAvailFull)
- numAvailFull = temp;
- }
-
- if (numAvailFull < 2)
- continue;
- numAvail = (numAvailFull <= p->numFastBytes ? numAvailFull : p->numFastBytes);
-
- if (!nextIsChar && matchByte != curByte) /* speed optimization */
- {
- /* try Literal + rep0 */
- UInt32 temp;
- UInt32 lenTest2;
- const Byte *data2 = data - (reps[0] + 1);
- UInt32 limit = p->numFastBytes + 1;
- if (limit > numAvailFull)
- limit = numAvailFull;
-
- for (temp = 1; temp < limit && data[temp] == data2[temp]; temp++);
- lenTest2 = temp - 1;
- if (lenTest2 >= 2)
- {
- UInt32 state2 = kLiteralNextStates[state];
- UInt32 posStateNext = (position + 1) & p->pbMask;
- UInt32 nextRepMatchPrice = curAnd1Price +
- GET_PRICE_1(p->isMatch[state2][posStateNext]) +
- GET_PRICE_1(p->isRep[state2]);
- /* for (; lenTest2 >= 2; lenTest2--) */
- {
- UInt32 curAndLenPrice;
- COptimal *opt;
- UInt32 offset = cur + 1 + lenTest2;
- while (lenEnd < offset)
- p->opt[++lenEnd].price = kInfinityPrice;
- curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext);
- opt = &p->opt[offset];
- if (curAndLenPrice < opt->price)
- {
- opt->price = curAndLenPrice;
- opt->posPrev = cur + 1;
- opt->backPrev = 0;
- opt->prev1IsChar = True;
- opt->prev2 = False;
- }
- }
- }
- }
-
- startLen = 2; /* speed optimization */
- {
- UInt32 repIndex;
- for (repIndex = 0; repIndex < LZMA_NUM_REPS; repIndex++)
- {
- UInt32 lenTest;
- UInt32 lenTestTemp;
- UInt32 price;
- const Byte *data2 = data - (reps[repIndex] + 1);
- if (data[0] != data2[0] || data[1] != data2[1])
- continue;
- for (lenTest = 2; lenTest < numAvail && data[lenTest] == data2[lenTest]; lenTest++);
- while (lenEnd < cur + lenTest)
- p->opt[++lenEnd].price = kInfinityPrice;
- lenTestTemp = lenTest;
- price = repMatchPrice + GetPureRepPrice(p, repIndex, state, posState);
- do
- {
- UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][lenTest - 2];
- COptimal *opt = &p->opt[cur + lenTest];
- if (curAndLenPrice < opt->price)
- {
- opt->price = curAndLenPrice;
- opt->posPrev = cur;
- opt->backPrev = repIndex;
- opt->prev1IsChar = False;
- }
- }
- while (--lenTest >= 2);
- lenTest = lenTestTemp;
-
- if (repIndex == 0)
- startLen = lenTest + 1;
-
- /* if (_maxMode) */
- {
- UInt32 lenTest2 = lenTest + 1;
- UInt32 limit = lenTest2 + p->numFastBytes;
- UInt32 nextRepMatchPrice;
- if (limit > numAvailFull)
- limit = numAvailFull;
- for (; lenTest2 < limit && data[lenTest2] == data2[lenTest2]; lenTest2++);
- lenTest2 -= lenTest + 1;
- if (lenTest2 >= 2)
- {
- UInt32 state2 = kRepNextStates[state];
- UInt32 posStateNext = (position + lenTest) & p->pbMask;
- UInt32 curAndLenCharPrice =
- price + p->repLenEnc.prices[posState][lenTest - 2] +
- GET_PRICE_0(p->isMatch[state2][posStateNext]) +
- LitEnc_GetPriceMatched(LIT_PROBS(position + lenTest, data[lenTest - 1]),
- data[lenTest], data2[lenTest], p->ProbPrices);
- state2 = kLiteralNextStates[state2];
- posStateNext = (position + lenTest + 1) & p->pbMask;
- nextRepMatchPrice = curAndLenCharPrice +
- GET_PRICE_1(p->isMatch[state2][posStateNext]) +
- GET_PRICE_1(p->isRep[state2]);
-
- /* for (; lenTest2 >= 2; lenTest2--) */
- {
- UInt32 curAndLenPrice;
- COptimal *opt;
- UInt32 offset = cur + lenTest + 1 + lenTest2;
- while (lenEnd < offset)
- p->opt[++lenEnd].price = kInfinityPrice;
- curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext);
- opt = &p->opt[offset];
- if (curAndLenPrice < opt->price)
- {
- opt->price = curAndLenPrice;
- opt->posPrev = cur + lenTest + 1;
- opt->backPrev = 0;
- opt->prev1IsChar = True;
- opt->prev2 = True;
- opt->posPrev2 = cur;
- opt->backPrev2 = repIndex;
- }
- }
- }
- }
- }
- }
- /* for (UInt32 lenTest = 2; lenTest <= newLen; lenTest++) */
- if (newLen > numAvail)
- {
- newLen = numAvail;
- for (numPairs = 0; newLen > matches[numPairs]; numPairs += 2);
- matches[numPairs] = newLen;
- numPairs += 2;
- }
- if (newLen >= startLen)
- {
- UInt32 normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[state]);
- UInt32 offs, curBack, posSlot;
- UInt32 lenTest;
- while (lenEnd < cur + newLen)
- p->opt[++lenEnd].price = kInfinityPrice;
-
- offs = 0;
- while (startLen > matches[offs])
- offs += 2;
- curBack = matches[offs + 1];
- GetPosSlot2(curBack, posSlot);
- for (lenTest = /*2*/ startLen; ; lenTest++)
- {
- UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][lenTest - LZMA_MATCH_LEN_MIN];
- UInt32 lenToPosState = GetLenToPosState(lenTest);
- COptimal *opt;
- if (curBack < kNumFullDistances)
- curAndLenPrice += p->distancesPrices[lenToPosState][curBack];
- else
- curAndLenPrice += p->posSlotPrices[lenToPosState][posSlot] + p->alignPrices[curBack & kAlignMask];
-
- opt = &p->opt[cur + lenTest];
- if (curAndLenPrice < opt->price)
- {
- opt->price = curAndLenPrice;
- opt->posPrev = cur;
- opt->backPrev = curBack + LZMA_NUM_REPS;
- opt->prev1IsChar = False;
- }
-
- if (/*_maxMode && */lenTest == matches[offs])
- {
- /* Try Match + Literal + Rep0 */
- const Byte *data2 = data - (curBack + 1);
- UInt32 lenTest2 = lenTest + 1;
- UInt32 limit = lenTest2 + p->numFastBytes;
- UInt32 nextRepMatchPrice;
- if (limit > numAvailFull)
- limit = numAvailFull;
- for (; lenTest2 < limit && data[lenTest2] == data2[lenTest2]; lenTest2++);
- lenTest2 -= lenTest + 1;
- if (lenTest2 >= 2)
- {
- UInt32 state2 = kMatchNextStates[state];
- UInt32 posStateNext = (position + lenTest) & p->pbMask;
- UInt32 curAndLenCharPrice = curAndLenPrice +
- GET_PRICE_0(p->isMatch[state2][posStateNext]) +
- LitEnc_GetPriceMatched(LIT_PROBS(position + lenTest, data[lenTest - 1]),
- data[lenTest], data2[lenTest], p->ProbPrices);
- state2 = kLiteralNextStates[state2];
- posStateNext = (posStateNext + 1) & p->pbMask;
- nextRepMatchPrice = curAndLenCharPrice +
- GET_PRICE_1(p->isMatch[state2][posStateNext]) +
- GET_PRICE_1(p->isRep[state2]);
-
- /* for (; lenTest2 >= 2; lenTest2--) */
- {
- UInt32 offset = cur + lenTest + 1 + lenTest2;
- UInt32 curAndLenPrice;
- COptimal *opt;
- while (lenEnd < offset)
- p->opt[++lenEnd].price = kInfinityPrice;
- curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext);
- opt = &p->opt[offset];
- if (curAndLenPrice < opt->price)
- {
- opt->price = curAndLenPrice;
- opt->posPrev = cur + lenTest + 1;
- opt->backPrev = 0;
- opt->prev1IsChar = True;
- opt->prev2 = True;
- opt->posPrev2 = cur;
- opt->backPrev2 = curBack + LZMA_NUM_REPS;
- }
- }
- }
- offs += 2;
- if (offs == numPairs)
- break;
- curBack = matches[offs + 1];
- if (curBack >= kNumFullDistances)
- GetPosSlot2(curBack, posSlot);
- }
- }
- }
- }
-}
-
-#define ChangePair(smallDist, bigDist) (((bigDist) >> 7) > (smallDist))
-
-static UInt32 GetOptimumFast(CLzmaEnc *p, UInt32 *backRes)
-{
- UInt32 numAvail, mainLen, mainDist, numPairs, repIndex, repLen, i;
- const Byte *data;
- const UInt32 *matches;
-
- if (p->additionalOffset == 0)
- mainLen = ReadMatchDistances(p, &numPairs);
- else
- {
- mainLen = p->longestMatchLength;
- numPairs = p->numPairs;
- }
-
- numAvail = p->numAvail;
- *backRes = (UInt32)-1;
- if (numAvail < 2)
- return 1;
- if (numAvail > LZMA_MATCH_LEN_MAX)
- numAvail = LZMA_MATCH_LEN_MAX;
- data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
-
- repLen = repIndex = 0;
- for (i = 0; i < LZMA_NUM_REPS; i++)
- {
- UInt32 len;
- const Byte *data2 = data - (p->reps[i] + 1);
- if (data[0] != data2[0] || data[1] != data2[1])
- continue;
- for (len = 2; len < numAvail && data[len] == data2[len]; len++);
- if (len >= p->numFastBytes)
- {
- *backRes = i;
- MovePos(p, len - 1);
- return len;
- }
- if (len > repLen)
- {
- repIndex = i;
- repLen = len;
- }
- }
-
- matches = p->matches;
- if (mainLen >= p->numFastBytes)
- {
- *backRes = matches[numPairs - 1] + LZMA_NUM_REPS;
- MovePos(p, mainLen - 1);
- return mainLen;
- }
-
- mainDist = 0; /* for GCC */
- if (mainLen >= 2)
- {
- mainDist = matches[numPairs - 1];
- while (numPairs > 2 && mainLen == matches[numPairs - 4] + 1)
- {
- if (!ChangePair(matches[numPairs - 3], mainDist))
- break;
- numPairs -= 2;
- mainLen = matches[numPairs - 2];
- mainDist = matches[numPairs - 1];
- }
- if (mainLen == 2 && mainDist >= 0x80)
- mainLen = 1;
- }
-
- if (repLen >= 2 && (
- (repLen + 1 >= mainLen) ||
- (repLen + 2 >= mainLen && mainDist >= (1 << 9)) ||
- (repLen + 3 >= mainLen && mainDist >= (1 << 15))))
- {
- *backRes = repIndex;
- MovePos(p, repLen - 1);
- return repLen;
- }
-
- if (mainLen < 2 || numAvail <= 2)
- return 1;
-
- p->longestMatchLength = ReadMatchDistances(p, &p->numPairs);
- if (p->longestMatchLength >= 2)
- {
- UInt32 newDistance = matches[p->numPairs - 1];
- if ((p->longestMatchLength >= mainLen && newDistance < mainDist) ||
- (p->longestMatchLength == mainLen + 1 && !ChangePair(mainDist, newDistance)) ||
- (p->longestMatchLength > mainLen + 1) ||
- (p->longestMatchLength + 1 >= mainLen && mainLen >= 3 && ChangePair(newDistance, mainDist)))
- return 1;
- }
-
- data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1;
- for (i = 0; i < LZMA_NUM_REPS; i++)
- {
- UInt32 len, limit;
- const Byte *data2 = data - (p->reps[i] + 1);
- if (data[0] != data2[0] || data[1] != data2[1])
- continue;
- limit = mainLen - 1;
- for (len = 2; len < limit && data[len] == data2[len]; len++);
- if (len >= limit)
- return 1;
- }
- *backRes = mainDist + LZMA_NUM_REPS;
- MovePos(p, mainLen - 2);
- return mainLen;
-}
-
-static void WriteEndMarker(CLzmaEnc *p, UInt32 posState)
-{
- UInt32 len;
- RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1);
- RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0);
- p->state = kMatchNextStates[p->state];
- len = LZMA_MATCH_LEN_MIN;
- LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices);
- RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, (1 << kNumPosSlotBits) - 1);
- RangeEnc_EncodeDirectBits(&p->rc, (((UInt32)1 << 30) - 1) >> kNumAlignBits, 30 - kNumAlignBits);
- RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, kAlignMask);
-}
-
-static SRes CheckErrors(CLzmaEnc *p)
-{
- if (p->result != SZ_OK)
- return p->result;
- if (p->rc.res != SZ_OK)
- p->result = SZ_ERROR_WRITE;
- if (p->matchFinderBase.result != SZ_OK)
- p->result = SZ_ERROR_READ;
- if (p->result != SZ_OK)
- p->finished = True;
- return p->result;
-}
-
-static SRes Flush(CLzmaEnc *p, UInt32 nowPos)
-{
- /* ReleaseMFStream(); */
- p->finished = True;
- if (p->writeEndMark)
- WriteEndMarker(p, nowPos & p->pbMask);
- RangeEnc_FlushData(&p->rc);
- RangeEnc_FlushStream(&p->rc);
- return CheckErrors(p);
-}
-
-static void FillAlignPrices(CLzmaEnc *p)
-{
- UInt32 i;
- for (i = 0; i < kAlignTableSize; i++)
- p->alignPrices[i] = RcTree_ReverseGetPrice(p->posAlignEncoder, kNumAlignBits, i, p->ProbPrices);
- p->alignPriceCount = 0;
-}
-
-static void FillDistancesPrices(CLzmaEnc *p)
-{
- UInt32 tempPrices[kNumFullDistances];
- UInt32 i, lenToPosState;
- for (i = kStartPosModelIndex; i < kNumFullDistances; i++)
- {
- UInt32 posSlot = GetPosSlot1(i);
- UInt32 footerBits = ((posSlot >> 1) - 1);
- UInt32 base = ((2 | (posSlot & 1)) << footerBits);
- tempPrices[i] = RcTree_ReverseGetPrice(p->posEncoders + base - posSlot - 1, footerBits, i - base, p->ProbPrices);
- }
-
- for (lenToPosState = 0; lenToPosState < kNumLenToPosStates; lenToPosState++)
- {
- UInt32 posSlot;
- const CLzmaProb *encoder = p->posSlotEncoder[lenToPosState];
- UInt32 *posSlotPrices = p->posSlotPrices[lenToPosState];
- for (posSlot = 0; posSlot < p->distTableSize; posSlot++)
- posSlotPrices[posSlot] = RcTree_GetPrice(encoder, kNumPosSlotBits, posSlot, p->ProbPrices);
- for (posSlot = kEndPosModelIndex; posSlot < p->distTableSize; posSlot++)
- posSlotPrices[posSlot] += ((((posSlot >> 1) - 1) - kNumAlignBits) << kNumBitPriceShiftBits);
-
- {
- UInt32 *distancesPrices = p->distancesPrices[lenToPosState];
- UInt32 i;
- for (i = 0; i < kStartPosModelIndex; i++)
- distancesPrices[i] = posSlotPrices[i];
- for (; i < kNumFullDistances; i++)
- distancesPrices[i] = posSlotPrices[GetPosSlot1(i)] + tempPrices[i];
- }
- }
- p->matchPriceCount = 0;
-}
-
-void LzmaEnc_Construct(CLzmaEnc *p)
-{
- RangeEnc_Construct(&p->rc);
- MatchFinder_Construct(&p->matchFinderBase);
- #ifdef COMPRESS_MF_MT
- MatchFinderMt_Construct(&p->matchFinderMt);
- p->matchFinderMt.MatchFinder = &p->matchFinderBase;
- #endif
-
- {
- CLzmaEncProps props;
- LzmaEncProps_Init(&props);
- LzmaEnc_SetProps(p, &props);
- }
-
- #ifndef LZMA_LOG_BSR
- LzmaEnc_FastPosInit(p->g_FastPos);
- #endif
-
- LzmaEnc_InitPriceTables(p->ProbPrices);
- p->litProbs = 0;
- p->saveState.litProbs = 0;
-}
-
-CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc)
-{
- void *p;
- p = alloc->Alloc(alloc, sizeof(CLzmaEnc));
- if (p != 0)
- LzmaEnc_Construct((CLzmaEnc *)p);
- return p;
-}
-
-void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAlloc *alloc)
-{
- alloc->Free(alloc, p->litProbs);
- alloc->Free(alloc, p->saveState.litProbs);
- p->litProbs = 0;
- p->saveState.litProbs = 0;
-}
-
-void LzmaEnc_Destruct(CLzmaEnc *p, ISzAlloc *alloc, ISzAlloc *allocBig)
-{
- #ifdef COMPRESS_MF_MT
- MatchFinderMt_Destruct(&p->matchFinderMt, allocBig);
- #endif
- MatchFinder_Free(&p->matchFinderBase, allocBig);
- LzmaEnc_FreeLits(p, alloc);
- RangeEnc_Free(&p->rc, alloc);
-}
-
-void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig)
-{
- LzmaEnc_Destruct((CLzmaEnc *)p, alloc, allocBig);
- alloc->Free(alloc, p);
-}
-
-static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize, UInt32 maxUnpackSize)
-{
- UInt32 nowPos32, startPos32;
- if (p->inStream != 0)
- {
- p->matchFinderBase.stream = p->inStream;
- p->matchFinder.Init(p->matchFinderObj);
- p->inStream = 0;
- }
-
- if (p->finished)
- return p->result;
- RINOK(CheckErrors(p));
-
- nowPos32 = (UInt32)p->nowPos64;
- startPos32 = nowPos32;
-
- if (p->nowPos64 == 0)
- {
- UInt32 numPairs;
- Byte curByte;
- if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0)
- return Flush(p, nowPos32);
- ReadMatchDistances(p, &numPairs);
- RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][0], 0);
- p->state = kLiteralNextStates[p->state];
- curByte = p->matchFinder.GetIndexByte(p->matchFinderObj, 0 - p->additionalOffset);
- LitEnc_Encode(&p->rc, p->litProbs, curByte);
- p->additionalOffset--;
- nowPos32++;
- }
-
- if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) != 0)
- for (;;)
- {
- UInt32 pos, len, posState;
-
- if (p->fastMode)
- len = GetOptimumFast(p, &pos);
- else
- len = GetOptimum(p, nowPos32, &pos);
-
- #ifdef SHOW_STAT2
- printf("\n pos = %4X, len = %d pos = %d", nowPos32, len, pos);
- #endif
-
- posState = nowPos32 & p->pbMask;
- if (len == 1 && pos == (UInt32)-1)
- {
- Byte curByte;
- CLzmaProb *probs;
- const Byte *data;
-
- RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 0);
- data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset;
- curByte = *data;
- probs = LIT_PROBS(nowPos32, *(data - 1));
- if (IsCharState(p->state))
- LitEnc_Encode(&p->rc, probs, curByte);
- else
- LitEnc_EncodeMatched(&p->rc, probs, curByte, *(data - p->reps[0] - 1));
- p->state = kLiteralNextStates[p->state];
- }
- else
- {
- RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1);
- if (pos < LZMA_NUM_REPS)
- {
- RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 1);
- if (pos == 0)
- {
- RangeEnc_EncodeBit(&p->rc, &p->isRepG0[p->state], 0);
- RangeEnc_EncodeBit(&p->rc, &p->isRep0Long[p->state][posState], ((len == 1) ? 0 : 1));
- }
- else
- {
- UInt32 distance = p->reps[pos];
- RangeEnc_EncodeBit(&p->rc, &p->isRepG0[p->state], 1);
- if (pos == 1)
- RangeEnc_EncodeBit(&p->rc, &p->isRepG1[p->state], 0);
- else
- {
- RangeEnc_EncodeBit(&p->rc, &p->isRepG1[p->state], 1);
- RangeEnc_EncodeBit(&p->rc, &p->isRepG2[p->state], pos - 2);
- if (pos == 3)
- p->reps[3] = p->reps[2];
- p->reps[2] = p->reps[1];
- }
- p->reps[1] = p->reps[0];
- p->reps[0] = distance;
- }
- if (len == 1)
- p->state = kShortRepNextStates[p->state];
- else
- {
- LenEnc_Encode2(&p->repLenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices);
- p->state = kRepNextStates[p->state];
- }
- }
- else
- {
- UInt32 posSlot;
- RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0);
- p->state = kMatchNextStates[p->state];
- LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices);
- pos -= LZMA_NUM_REPS;
- GetPosSlot(pos, posSlot);
- RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, posSlot);
-
- if (posSlot >= kStartPosModelIndex)
- {
- UInt32 footerBits = ((posSlot >> 1) - 1);
- UInt32 base = ((2 | (posSlot & 1)) << footerBits);
- UInt32 posReduced = pos - base;
-
- if (posSlot < kEndPosModelIndex)
- RcTree_ReverseEncode(&p->rc, p->posEncoders + base - posSlot - 1, footerBits, posReduced);
- else
- {
- RangeEnc_EncodeDirectBits(&p->rc, posReduced >> kNumAlignBits, footerBits - kNumAlignBits);
- RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, posReduced & kAlignMask);
- p->alignPriceCount++;
- }
- }
- p->reps[3] = p->reps[2];
- p->reps[2] = p->reps[1];
- p->reps[1] = p->reps[0];
- p->reps[0] = pos;
- p->matchPriceCount++;
- }
- }
- p->additionalOffset -= len;
- nowPos32 += len;
- if (p->additionalOffset == 0)
- {
- UInt32 processed;
- if (!p->fastMode)
- {
- if (p->matchPriceCount >= (1 << 7))
- FillDistancesPrices(p);
- if (p->alignPriceCount >= kAlignTableSize)
- FillAlignPrices(p);
- }
- if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0)
- break;
- processed = nowPos32 - startPos32;
- if (useLimits)
- {
- if (processed + kNumOpts + 300 >= maxUnpackSize ||
- RangeEnc_GetProcessed(&p->rc) + kNumOpts * 2 >= maxPackSize)
- break;
- }
- else if (processed >= (1 << 15))
- {
- p->nowPos64 += nowPos32 - startPos32;
- return CheckErrors(p);
- }
- }
- }
- p->nowPos64 += nowPos32 - startPos32;
- return Flush(p, nowPos32);
-}
-
-#define kBigHashDicLimit ((UInt32)1 << 24)
-
-static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig)
-{
- UInt32 beforeSize = kNumOpts;
- Bool btMode;
- if (!RangeEnc_Alloc(&p->rc, alloc))
- return SZ_ERROR_MEM;
- btMode = (p->matchFinderBase.btMode != 0);
- #ifdef COMPRESS_MF_MT
- p->mtMode = (p->multiThread && !p->fastMode && btMode);
- #endif
-
- {
- unsigned lclp = p->lc + p->lp;
- if (p->litProbs == 0 || p->saveState.litProbs == 0 || p->lclp != lclp)
- {
- LzmaEnc_FreeLits(p, alloc);
- p->litProbs = (CLzmaProb *)alloc->Alloc(alloc, (0x300 << lclp) * sizeof(CLzmaProb));
- p->saveState.litProbs = (CLzmaProb *)alloc->Alloc(alloc, (0x300 << lclp) * sizeof(CLzmaProb));
- if (p->litProbs == 0 || p->saveState.litProbs == 0)
- {
- LzmaEnc_FreeLits(p, alloc);
- return SZ_ERROR_MEM;
- }
- p->lclp = lclp;
- }
- }
-
- p->matchFinderBase.bigHash = (p->dictSize > kBigHashDicLimit);
-
- if (beforeSize + p->dictSize < keepWindowSize)
- beforeSize = keepWindowSize - p->dictSize;
-
- #ifdef COMPRESS_MF_MT
- if (p->mtMode)
- {
- RINOK(MatchFinderMt_Create(&p->matchFinderMt, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig));
- p->matchFinderObj = &p->matchFinderMt;
- MatchFinderMt_CreateVTable(&p->matchFinderMt, &p->matchFinder);
- }
- else
- #endif
- {
- if (!MatchFinder_Create(&p->matchFinderBase, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig))
- return SZ_ERROR_MEM;
- p->matchFinderObj = &p->matchFinderBase;
- MatchFinder_CreateVTable(&p->matchFinderBase, &p->matchFinder);
- }
- return SZ_OK;
-}
-
-void LzmaEnc_Init(CLzmaEnc *p)
-{
- UInt32 i;
- p->state = 0;
- for (i = 0 ; i < LZMA_NUM_REPS; i++)
- p->reps[i] = 0;
-
- RangeEnc_Init(&p->rc);
-
-
- for (i = 0; i < kNumStates; i++)
- {
- UInt32 j;
- for (j = 0; j < LZMA_NUM_PB_STATES_MAX; j++)
- {
- p->isMatch[i][j] = kProbInitValue;
- p->isRep0Long[i][j] = kProbInitValue;
- }
- p->isRep[i] = kProbInitValue;
- p->isRepG0[i] = kProbInitValue;
- p->isRepG1[i] = kProbInitValue;
- p->isRepG2[i] = kProbInitValue;
- }
-
- {
- UInt32 num = 0x300 << (p->lp + p->lc);
- for (i = 0; i < num; i++)
- p->litProbs[i] = kProbInitValue;
- }
-
- {
- for (i = 0; i < kNumLenToPosStates; i++)
- {
- CLzmaProb *probs = p->posSlotEncoder[i];
- UInt32 j;
- for (j = 0; j < (1 << kNumPosSlotBits); j++)
- probs[j] = kProbInitValue;
- }
- }
- {
- for (i = 0; i < kNumFullDistances - kEndPosModelIndex; i++)
- p->posEncoders[i] = kProbInitValue;
- }
-
- LenEnc_Init(&p->lenEnc.p);
- LenEnc_Init(&p->repLenEnc.p);
-
- for (i = 0; i < (1 << kNumAlignBits); i++)
- p->posAlignEncoder[i] = kProbInitValue;
-
- p->optimumEndIndex = 0;
- p->optimumCurrentIndex = 0;
- p->additionalOffset = 0;
-
- p->pbMask = (1 << p->pb) - 1;
- p->lpMask = (1 << p->lp) - 1;
-}
-
-void LzmaEnc_InitPrices(CLzmaEnc *p)
-{
- if (!p->fastMode)
- {
- FillDistancesPrices(p);
- FillAlignPrices(p);
- }
-
- p->lenEnc.tableSize =
- p->repLenEnc.tableSize =
- p->numFastBytes + 1 - LZMA_MATCH_LEN_MIN;
- LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, p->ProbPrices);
- LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, p->ProbPrices);
-}
-
-static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig)
-{
- UInt32 i;
- for (i = 0; i < (UInt32)kDicLogSizeMaxCompress; i++)
- if (p->dictSize <= ((UInt32)1 << i))
- break;
- p->distTableSize = i * 2;
-
- p->finished = False;
- p->result = SZ_OK;
- RINOK(LzmaEnc_Alloc(p, keepWindowSize, alloc, allocBig));
- LzmaEnc_Init(p);
- LzmaEnc_InitPrices(p);
- p->nowPos64 = 0;
- return SZ_OK;
-}
-
-static SRes LzmaEnc_Prepare(CLzmaEncHandle pp, ISeqInStream *inStream, ISeqOutStream *outStream,
- ISzAlloc *alloc, ISzAlloc *allocBig)
-{
- CLzmaEnc *p = (CLzmaEnc *)pp;
- p->inStream = inStream;
- p->rc.outStream = outStream;
- return LzmaEnc_AllocAndInit(p, 0, alloc, allocBig);
-}
-
-SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp,
- ISeqInStream *inStream, UInt32 keepWindowSize,
- ISzAlloc *alloc, ISzAlloc *allocBig)
-{
- CLzmaEnc *p = (CLzmaEnc *)pp;
- p->inStream = inStream;
- return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig);
-}
-
-static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const Byte *src, SizeT srcLen)
-{
- p->seqBufInStream.funcTable.Read = MyRead;
- p->seqBufInStream.data = src;
- p->seqBufInStream.rem = srcLen;
-}
-
-SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen,
- UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig)
-{
- CLzmaEnc *p = (CLzmaEnc *)pp;
- LzmaEnc_SetInputBuf(p, src, srcLen);
- p->inStream = &p->seqBufInStream.funcTable;
- return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig);
-}
-
-void LzmaEnc_Finish(CLzmaEncHandle pp)
-{
- #ifdef COMPRESS_MF_MT
- CLzmaEnc *p = (CLzmaEnc *)pp;
- if (p->mtMode)
- MatchFinderMt_ReleaseStream(&p->matchFinderMt);
- #else
- pp = pp;
- #endif
-}
-
-typedef struct _CSeqOutStreamBuf
-{
- ISeqOutStream funcTable;
- Byte *data;
- SizeT rem;
- Bool overflow;
-} CSeqOutStreamBuf;
-
-static size_t MyWrite(void *pp, const void *data, size_t size)
-{
- CSeqOutStreamBuf *p = (CSeqOutStreamBuf *)pp;
- if (p->rem < size)
- {
- size = p->rem;
- p->overflow = True;
- }
- memcpy(p->data, data, size);
- p->rem -= size;
- p->data += size;
- return size;
-}
-
-
-UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp)
-{
- const CLzmaEnc *p = (CLzmaEnc *)pp;
- return p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
-}
-
-const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp)
-{
- const CLzmaEnc *p = (CLzmaEnc *)pp;
- return p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset;
-}
-
-SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool reInit,
- Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize)
-{
- CLzmaEnc *p = (CLzmaEnc *)pp;
- UInt64 nowPos64;
- SRes res;
- CSeqOutStreamBuf outStream;
-
- outStream.funcTable.Write = MyWrite;
- outStream.data = dest;
- outStream.rem = *destLen;
- outStream.overflow = False;
-
- p->writeEndMark = False;
- p->finished = False;
- p->result = SZ_OK;
-
- if (reInit)
- LzmaEnc_Init(p);
- LzmaEnc_InitPrices(p);
- nowPos64 = p->nowPos64;
- RangeEnc_Init(&p->rc);
- p->rc.outStream = &outStream.funcTable;
-
- res = LzmaEnc_CodeOneBlock(p, True, desiredPackSize, *unpackSize);
-
- *unpackSize = (UInt32)(p->nowPos64 - nowPos64);
- *destLen -= outStream.rem;
- if (outStream.overflow)
- return SZ_ERROR_OUTPUT_EOF;
-
- return res;
-}
-
-SRes LzmaEnc_Encode(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress,
- ISzAlloc *alloc, ISzAlloc *allocBig)
-{
- CLzmaEnc *p = (CLzmaEnc *)pp;
- SRes res = SZ_OK;
-
- #ifdef COMPRESS_MF_MT
- Byte allocaDummy[0x300];
- int i = 0;
- for (i = 0; i < 16; i++)
- allocaDummy[i] = (Byte)i;
- #endif
-
- RINOK(LzmaEnc_Prepare(pp, inStream, outStream, alloc, allocBig));
-
- for (;;)
- {
- res = LzmaEnc_CodeOneBlock(p, False, 0, 0);
- if (res != SZ_OK || p->finished != 0)
- break;
- if (progress != 0)
- {
- res = progress->Progress(progress, p->nowPos64, RangeEnc_GetProcessed(&p->rc));
- if (res != SZ_OK)
- {
- res = SZ_ERROR_PROGRESS;
- break;
- }
- }
- }
- LzmaEnc_Finish(pp);
- return res;
-}
-
-SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, Byte *props, SizeT *size)
-{
- CLzmaEnc *p = (CLzmaEnc *)pp;
- int i;
- UInt32 dictSize = p->dictSize;
- if (*size < LZMA_PROPS_SIZE)
- return SZ_ERROR_PARAM;
- *size = LZMA_PROPS_SIZE;
- props[0] = (Byte)((p->pb * 5 + p->lp) * 9 + p->lc);
-
- for (i = 11; i <= 30; i++)
- {
- if (dictSize <= ((UInt32)2 << i))
- {
- dictSize = (2 << i);
- break;
- }
- if (dictSize <= ((UInt32)3 << i))
- {
- dictSize = (3 << i);
- break;
- }
- }
-
- for (i = 0; i < 4; i++)
- props[1 + i] = (Byte)(dictSize >> (8 * i));
- return SZ_OK;
-}
-
-SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
- int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig)
-{
- SRes res;
- CLzmaEnc *p = (CLzmaEnc *)pp;
-
- CSeqOutStreamBuf outStream;
-
- LzmaEnc_SetInputBuf(p, src, srcLen);
-
- outStream.funcTable.Write = MyWrite;
- outStream.data = dest;
- outStream.rem = *destLen;
- outStream.overflow = False;
-
- p->writeEndMark = writeEndMark;
- res = LzmaEnc_Encode(pp, &outStream.funcTable, &p->seqBufInStream.funcTable,
- progress, alloc, allocBig);
-
- *destLen -= outStream.rem;
- if (outStream.overflow)
- return SZ_ERROR_OUTPUT_EOF;
- return res;
-}
-
-SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
- const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
- ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig)
-{
- CLzmaEnc *p = (CLzmaEnc *)LzmaEnc_Create(alloc);
- SRes res;
- if (p == 0)
- return SZ_ERROR_MEM;
-
- res = LzmaEnc_SetProps(p, props);
- if (res == SZ_OK)
- {
- res = LzmaEnc_WriteProperties(p, propsEncoded, propsSize);
- if (res == SZ_OK)
- res = LzmaEnc_MemEncode(p, dest, destLen, src, srcLen,
- writeEndMark, progress, alloc, allocBig);
- }
-
- LzmaEnc_Destroy(p, alloc, allocBig);
- return res;
-}
diff --git a/extern/lzma/LzmaEnc.h b/extern/lzma/LzmaEnc.h
deleted file mode 100644
index bfbc7d2b9c3..00000000000
--- a/extern/lzma/LzmaEnc.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* LzmaEnc.h -- LZMA Encoder
-2008-10-04 : Igor Pavlov : Public domain */
-
-#ifndef __LZMAENC_H
-#define __LZMAENC_H
-
-#include "Types.h"
-
-#define LZMA_PROPS_SIZE 5
-
-typedef struct _CLzmaEncProps
-{
- int level; /* 0 <= level <= 9 */
- UInt32 dictSize; /* (1 << 12) <= dictSize <= (1 << 27) for 32-bit version
- (1 << 12) <= dictSize <= (1 << 30) for 64-bit version
- default = (1 << 24) */
- int lc; /* 0 <= lc <= 8, default = 3 */
- int lp; /* 0 <= lp <= 4, default = 0 */
- int pb; /* 0 <= pb <= 4, default = 2 */
- int algo; /* 0 - fast, 1 - normal, default = 1 */
- int fb; /* 5 <= fb <= 273, default = 32 */
- int btMode; /* 0 - hashChain Mode, 1 - binTree mode - normal, default = 1 */
- int numHashBytes; /* 2, 3 or 4, default = 4 */
- UInt32 mc; /* 1 <= mc <= (1 << 30), default = 32 */
- unsigned writeEndMark; /* 0 - do not write EOPM, 1 - write EOPM, default = 0 */
- int numThreads; /* 1 or 2, default = 2 */
-} CLzmaEncProps;
-
-void LzmaEncProps_Init(CLzmaEncProps *p);
-void LzmaEncProps_Normalize(CLzmaEncProps *p);
-UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2);
-
-
-/* ---------- CLzmaEncHandle Interface ---------- */
-
-/* LzmaEnc_* functions can return the following exit codes:
-Returns:
- SZ_OK - OK
- SZ_ERROR_MEM - Memory allocation error
- SZ_ERROR_PARAM - Incorrect paramater in props
- SZ_ERROR_WRITE - Write callback error.
- SZ_ERROR_PROGRESS - some break from progress callback
- SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version)
-*/
-
-typedef void * CLzmaEncHandle;
-
-CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc);
-void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig);
-SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props);
-SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *properties, SizeT *size);
-SRes LzmaEnc_Encode(CLzmaEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream,
- ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
-SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
- int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
-
-/* ---------- One Call Interface ---------- */
-
-/* LzmaEncode
-Return code:
- SZ_OK - OK
- SZ_ERROR_MEM - Memory allocation error
- SZ_ERROR_PARAM - Incorrect paramater
- SZ_ERROR_OUTPUT_EOF - output buffer overflow
- SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version)
-*/
-
-SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
- const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
- ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
-
-#endif
diff --git a/extern/lzma/LzmaLib.c b/extern/lzma/LzmaLib.c
deleted file mode 100644
index 02a511857c9..00000000000
--- a/extern/lzma/LzmaLib.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* LzmaLib.c -- LZMA library wrapper
-2008-08-05
-Igor Pavlov
-Public domain */
-
-#include "LzmaEnc.h"
-#include "LzmaDec.h"
-#include "Alloc.h"
-#include "LzmaLib.h"
-
-static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
-static void SzFree(void *p, void *address) { p = p; MyFree(address); }
-static ISzAlloc g_Alloc = { SzAlloc, SzFree };
-
-MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen,
- unsigned char *outProps, size_t *outPropsSize,
- int level, /* 0 <= level <= 9, default = 5 */
- unsigned dictSize, /* use (1 << N) or (3 << N). 4 KB < dictSize <= 128 MB */
- int lc, /* 0 <= lc <= 8, default = 3 */
- int lp, /* 0 <= lp <= 4, default = 0 */
- int pb, /* 0 <= pb <= 4, default = 2 */
- int fb, /* 5 <= fb <= 273, default = 32 */
- int numThreads /* 1 or 2, default = 2 */
-)
-{
- CLzmaEncProps props;
- LzmaEncProps_Init(&props);
- props.level = level;
- props.dictSize = dictSize;
- props.lc = lc;
- props.lp = lp;
- props.pb = pb;
- props.fb = fb;
- props.numThreads = numThreads;
-
- return LzmaEncode(dest, destLen, src, srcLen, &props, outProps, outPropsSize, 0,
- NULL, &g_Alloc, &g_Alloc);
-}
-
-
-MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t *srcLen,
- const unsigned char *props, size_t propsSize)
-{
- ELzmaStatus status;
- return LzmaDecode(dest, destLen, src, srcLen, props, (unsigned)propsSize, LZMA_FINISH_ANY, &status, &g_Alloc);
-}
diff --git a/extern/lzma/LzmaLib.h b/extern/lzma/LzmaLib.h
deleted file mode 100644
index 5c9eeec73ca..00000000000
--- a/extern/lzma/LzmaLib.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/* LzmaLib.h -- LZMA library interface
-2008-08-05
-Igor Pavlov
-Public domain */
-
-#ifndef __LZMALIB_H
-#define __LZMALIB_H
-
-#include "Types.h"
-
-#ifdef __cplusplus
- #define MY_EXTERN_C extern "C"
-#else
- #define MY_EXTERN_C extern
-#endif
-
-#define MY_STDAPI MY_EXTERN_C int MY_STD_CALL
-
-#define LZMA_PROPS_SIZE 5
-
-/*
-RAM requirements for LZMA:
- for compression: (dictSize * 11.5 + 6 MB) + state_size
- for decompression: dictSize + state_size
- state_size = (4 + (1.5 << (lc + lp))) KB
- by default (lc=3, lp=0), state_size = 16 KB.
-
-LZMA properties (5 bytes) format
- Offset Size Description
- 0 1 lc, lp and pb in encoded form.
- 1 4 dictSize (little endian).
-*/
-
-/*
-LzmaCompress
-------------
-
-outPropsSize -
- In: the pointer to the size of outProps buffer; *outPropsSize = LZMA_PROPS_SIZE = 5.
- Out: the pointer to the size of written properties in outProps buffer; *outPropsSize = LZMA_PROPS_SIZE = 5.
-
- LZMA Encoder will use defult values for any parameter, if it is
- -1 for any from: level, loc, lp, pb, fb, numThreads
- 0 for dictSize
-
-level - compression level: 0 <= level <= 9;
-
- level dictSize algo fb
- 0: 16 KB 0 32
- 1: 64 KB 0 32
- 2: 256 KB 0 32
- 3: 1 MB 0 32
- 4: 4 MB 0 32
- 5: 16 MB 1 32
- 6: 32 MB 1 32
- 7+: 64 MB 1 64
-
- The default value for "level" is 5.
-
- algo = 0 means fast method
- algo = 1 means normal method
-
-dictSize - The dictionary size in bytes. The maximum value is
- 128 MB = (1 << 27) bytes for 32-bit version
- 1 GB = (1 << 30) bytes for 64-bit version
- The default value is 16 MB = (1 << 24) bytes.
- It's recommended to use the dictionary that is larger than 4 KB and
- that can be calculated as (1 << N) or (3 << N) sizes.
-
-lc - The number of literal context bits (high bits of previous literal).
- It can be in the range from 0 to 8. The default value is 3.
- Sometimes lc=4 gives the gain for big files.
-
-lp - The number of literal pos bits (low bits of current position for literals).
- It can be in the range from 0 to 4. The default value is 0.
- The lp switch is intended for periodical data when the period is equal to 2^lp.
- For example, for 32-bit (4 bytes) periodical data you can use lp=2. Often it's
- better to set lc=0, if you change lp switch.
-
-pb - The number of pos bits (low bits of current position).
- It can be in the range from 0 to 4. The default value is 2.
- The pb switch is intended for periodical data when the period is equal 2^pb.
-
-fb - Word size (the number of fast bytes).
- It can be in the range from 5 to 273. The default value is 32.
- Usually, a big number gives a little bit better compression ratio and
- slower compression process.
-
-numThreads - The number of thereads. 1 or 2. The default value is 2.
- Fast mode (algo = 0) can use only 1 thread.
-
-Out:
- destLen - processed output size
-Returns:
- SZ_OK - OK
- SZ_ERROR_MEM - Memory allocation error
- SZ_ERROR_PARAM - Incorrect paramater
- SZ_ERROR_OUTPUT_EOF - output buffer overflow
- SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version)
-*/
-
-MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen,
- unsigned char *outProps, size_t *outPropsSize, /* *outPropsSize must be = 5 */
- int level, /* 0 <= level <= 9, default = 5 */
- unsigned dictSize, /* default = (1 << 24) */
- int lc, /* 0 <= lc <= 8, default = 3 */
- int lp, /* 0 <= lp <= 4, default = 0 */
- int pb, /* 0 <= pb <= 4, default = 2 */
- int fb, /* 5 <= fb <= 273, default = 32 */
- int numThreads /* 1 or 2, default = 2 */
- );
-
-/*
-LzmaUncompress
---------------
-In:
- dest - output data
- destLen - output data size
- src - input data
- srcLen - input data size
-Out:
- destLen - processed output size
- srcLen - processed input size
-Returns:
- SZ_OK - OK
- SZ_ERROR_DATA - Data error
- SZ_ERROR_MEM - Memory allocation arror
- SZ_ERROR_UNSUPPORTED - Unsupported properties
- SZ_ERROR_INPUT_EOF - it needs more bytes in input buffer (src)
-*/
-
-MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, SizeT *srcLen,
- const unsigned char *props, size_t propsSize);
-
-#endif
diff --git a/extern/lzma/Makefile b/extern/lzma/Makefile
deleted file mode 100644
index 11d70dc7847..00000000000
--- a/extern/lzma/Makefile
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# $Id$
-#
-# ***** BEGIN GPL/BL DUAL 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., 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):
-#
-# ***** END GPL/BL DUAL LICENSE BLOCK *****
-#
-#
-
-LIBNAME = lzma
-DIR = $(OCGDIR)/extern/$(LIBNAME)
-
-include nan_compile.mk
-
-install: $(ALL_OR_DEBUG)
- @[ -d $(NAN_LZMA) ] || mkdir -p $(NAN_LZMA)
- @[ -d $(NAN_LZMA)/lib/$(DEBUG_DIR) ] || mkdir -p $(NAN_LZMA)/lib/$(DEBUG_DIR)
- @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)lib$(LIBNAME).a $(NAN_LZMA)/lib/$(DEBUG_DIR)
-ifeq ($(OS),darwin)
- ranlib $(NAN_LZMA)/lib/$(DEBUG_DIR)lib$(LIBNAME).a
-endif
- @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh *.h $(NAN_LZMA)
diff --git a/extern/lzma/SConscript b/extern/lzma/SConscript
deleted file mode 100644
index 015cdfe339f..00000000000
--- a/extern/lzma/SConscript
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/python
-Import ('env')
-
-sources = env.Glob('./*.c')
-
-defs = ''
-incs = ' . '
-
-env.BlenderLib ('bf_lzma', sources, Split(incs), Split(defs), libtype=['intern'], priority=[40] )
diff --git a/extern/lzma/Types.h b/extern/lzma/Types.h
deleted file mode 100644
index 1af5cfc4d86..00000000000
--- a/extern/lzma/Types.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/* Types.h -- Basic types
-2008-11-23 : Igor Pavlov : Public domain */
-
-#ifndef __7Z_TYPES_H
-#define __7Z_TYPES_H
-
-#include <stddef.h>
-
-#ifdef _WIN32
-#include <windows.h>
-#endif
-
-#define SZ_OK 0
-
-#define SZ_ERROR_DATA 1
-#define SZ_ERROR_MEM 2
-#define SZ_ERROR_CRC 3
-#define SZ_ERROR_UNSUPPORTED 4
-#define SZ_ERROR_PARAM 5
-#define SZ_ERROR_INPUT_EOF 6
-#define SZ_ERROR_OUTPUT_EOF 7
-#define SZ_ERROR_READ 8
-#define SZ_ERROR_WRITE 9
-#define SZ_ERROR_PROGRESS 10
-#define SZ_ERROR_FAIL 11
-#define SZ_ERROR_THREAD 12
-
-#define SZ_ERROR_ARCHIVE 16
-#define SZ_ERROR_NO_ARCHIVE 17
-
-typedef int SRes;
-
-#ifdef _WIN32
-typedef DWORD WRes;
-#else
-typedef int WRes;
-#endif
-
-#ifndef RINOK
-#define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; }
-#endif
-
-typedef unsigned char Byte;
-typedef short Int16;
-typedef unsigned short UInt16;
-
-#ifdef _LZMA_UINT32_IS_ULONG
-typedef long Int32;
-typedef unsigned long UInt32;
-#else
-typedef int Int32;
-typedef unsigned int UInt32;
-#endif
-
-#ifdef _SZ_NO_INT_64
-
-/* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers.
- NOTES: Some code will work incorrectly in that case! */
-
-typedef long Int64;
-typedef unsigned long UInt64;
-
-#else
-
-#if defined(_MSC_VER) || defined(__BORLANDC__)
-typedef __int64 Int64;
-typedef unsigned __int64 UInt64;
-#else
-typedef long long int Int64;
-typedef unsigned long long int UInt64;
-#endif
-
-#endif
-
-#ifdef _LZMA_NO_SYSTEM_SIZE_T
-typedef UInt32 SizeT;
-#else
-typedef size_t SizeT;
-#endif
-
-typedef int Bool;
-#define True 1
-#define False 0
-
-
-#ifdef _MSC_VER
-
-#if _MSC_VER >= 1300
-#define MY_NO_INLINE __declspec(noinline)
-#else
-#define MY_NO_INLINE
-#endif
-
-#define MY_CDECL __cdecl
-#define MY_STD_CALL __stdcall
-#define MY_FAST_CALL MY_NO_INLINE __fastcall
-
-#else
-
-#define MY_CDECL
-#define MY_STD_CALL
-#define MY_FAST_CALL
-
-#endif
-
-
-/* The following interfaces use first parameter as pointer to structure */
-
-typedef struct
-{
- SRes (*Read)(void *p, void *buf, size_t *size);
- /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
- (output(*size) < input(*size)) is allowed */
-} ISeqInStream;
-
-/* it can return SZ_ERROR_INPUT_EOF */
-SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size);
-SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType);
-SRes SeqInStream_ReadByte(ISeqInStream *stream, Byte *buf);
-
-typedef struct
-{
- size_t (*Write)(void *p, const void *buf, size_t size);
- /* Returns: result - the number of actually written bytes.
- (result < size) means error */
-} ISeqOutStream;
-
-typedef enum
-{
- SZ_SEEK_SET = 0,
- SZ_SEEK_CUR = 1,
- SZ_SEEK_END = 2
-} ESzSeek;
-
-typedef struct
-{
- SRes (*Read)(void *p, void *buf, size_t *size); /* same as ISeqInStream::Read */
- SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin);
-} ISeekInStream;
-
-typedef struct
-{
- SRes (*Look)(void *p, void **buf, size_t *size);
- /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
- (output(*size) > input(*size)) is not allowed
- (output(*size) < input(*size)) is allowed */
- SRes (*Skip)(void *p, size_t offset);
- /* offset must be <= output(*size) of Look */
-
- SRes (*Read)(void *p, void *buf, size_t *size);
- /* reads directly (without buffer). It's same as ISeqInStream::Read */
- SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin);
-} ILookInStream;
-
-SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size);
-SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset);
-
-/* reads via ILookInStream::Read */
-SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType);
-SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size);
-
-#define LookToRead_BUF_SIZE (1 << 14)
-
-typedef struct
-{
- ILookInStream s;
- ISeekInStream *realStream;
- size_t pos;
- size_t size;
- Byte buf[LookToRead_BUF_SIZE];
-} CLookToRead;
-
-void LookToRead_CreateVTable(CLookToRead *p, int lookahead);
-void LookToRead_Init(CLookToRead *p);
-
-typedef struct
-{
- ISeqInStream s;
- ILookInStream *realStream;
-} CSecToLook;
-
-void SecToLook_CreateVTable(CSecToLook *p);
-
-typedef struct
-{
- ISeqInStream s;
- ILookInStream *realStream;
-} CSecToRead;
-
-void SecToRead_CreateVTable(CSecToRead *p);
-
-typedef struct
-{
- SRes (*Progress)(void *p, UInt64 inSize, UInt64 outSize);
- /* Returns: result. (result != SZ_OK) means break.
- Value (UInt64)(Int64)-1 for size means unknown value. */
-} ICompressProgress;
-
-typedef struct
-{
- void *(*Alloc)(void *p, size_t size);
- void (*Free)(void *p, void *address); /* address can be 0 */
-} ISzAlloc;
-
-#define IAlloc_Alloc(p, size) (p)->Alloc((p), size)
-#define IAlloc_Free(p, a) (p)->Free((p), a)
-
-#endif
diff --git a/extern/lzma/history.txt b/extern/lzma/history.txt
deleted file mode 100644
index 014186717da..00000000000
--- a/extern/lzma/history.txt
+++ /dev/null
@@ -1,236 +0,0 @@
-HISTORY of the LZMA SDK
------------------------
-
-4.65 2009-02-03
--------------------------
-- Some minor fixes
-
-
-4.63 2008-12-31
--------------------------
-- Some minor fixes
-
-
-4.61 beta 2008-11-23
--------------------------
-- The bug in ANSI-C LZMA Decoder was fixed:
- If encoded stream was corrupted, decoder could access memory
- outside of allocated range.
-- Some changes in ANSI-C 7z Decoder interfaces.
-- LZMA SDK is placed in the public domain.
-
-
-4.60 beta 2008-08-19
--------------------------
-- Some minor fixes.
-
-
-4.59 beta 2008-08-13
--------------------------
-- The bug was fixed:
- LZMA Encoder in fast compression mode could access memory outside of
- allocated range in some rare cases.
-
-
-4.58 beta 2008-05-05
--------------------------
-- ANSI-C LZMA Decoder was rewritten for speed optimizations.
-- ANSI-C LZMA Encoder was included to LZMA SDK.
-- C++ LZMA code now is just wrapper over ANSI-C code.
-
-
-4.57 2007-12-12
--------------------------
-- Speed optimizations in Ñ++ LZMA Decoder.
-- Small changes for more compatibility with some C/C++ compilers.
-
-
-4.49 beta 2007-07-05
--------------------------
-- .7z ANSI-C Decoder:
- - now it supports BCJ and BCJ2 filters
- - now it supports files larger than 4 GB.
- - now it supports "Last Write Time" field for files.
-- C++ code for .7z archives compressing/decompressing from 7-zip
- was included to LZMA SDK.
-
-
-4.43 2006-06-04
--------------------------
-- Small changes for more compatibility with some C/C++ compilers.
-
-
-4.42 2006-05-15
--------------------------
-- Small changes in .h files in ANSI-C version.
-
-
-4.39 beta 2006-04-14
--------------------------
-- The bug in versions 4.33b:4.38b was fixed:
- C++ version of LZMA encoder could not correctly compress
- files larger than 2 GB with HC4 match finder (-mfhc4).
-
-
-4.37 beta 2005-04-06
--------------------------
-- Fixes in C++ code: code could no be compiled if _NO_EXCEPTIONS was defined.
-
-
-4.35 beta 2005-03-02
--------------------------
-- The bug was fixed in C++ version of LZMA Decoder:
- If encoded stream was corrupted, decoder could access memory
- outside of allocated range.
-
-
-4.34 beta 2006-02-27
--------------------------
-- Compressing speed and memory requirements for compressing were increased
-- LZMA now can use only these match finders: HC4, BT2, BT3, BT4
-
-
-4.32 2005-12-09
--------------------------
-- Java version of LZMA SDK was included
-
-
-4.30 2005-11-20
--------------------------
-- Compression ratio was improved in -a2 mode
-- Speed optimizations for compressing in -a2 mode
-- -fb switch now supports values up to 273
-- The bug in 7z_C (7zIn.c) was fixed:
- It used Alloc/Free functions from different memory pools.
- So if program used two memory pools, it worked incorrectly.
-- 7z_C: .7z format supporting was improved
-- LZMA# SDK (C#.NET version) was included
-
-
-4.27 (Updated) 2005-09-21
--------------------------
-- Some GUIDs/interfaces in C++ were changed.
- IStream.h:
- ISequentialInStream::Read now works as old ReadPart
- ISequentialOutStream::Write now works as old WritePart
-
-
-4.27 2005-08-07
--------------------------
-- The bug in LzmaDecodeSize.c was fixed:
- if _LZMA_IN_CB and _LZMA_OUT_READ were defined,
- decompressing worked incorrectly.
-
-
-4.26 2005-08-05
--------------------------
-- Fixes in 7z_C code and LzmaTest.c:
- previous versions could work incorrectly,
- if malloc(0) returns 0
-
-
-4.23 2005-06-29
--------------------------
-- Small fixes in C++ code
-
-
-4.22 2005-06-10
--------------------------
-- Small fixes
-
-
-4.21 2005-06-08
--------------------------
-- Interfaces for ANSI-C LZMA Decoder (LzmaDecode.c) were changed
-- New additional version of ANSI-C LZMA Decoder with zlib-like interface:
- - LzmaStateDecode.h
- - LzmaStateDecode.c
- - LzmaStateTest.c
-- ANSI-C LZMA Decoder now can decompress files larger than 4 GB
-
-
-4.17 2005-04-18
--------------------------
-- New example for RAM->RAM compressing/decompressing:
- LZMA + BCJ (filter for x86 code):
- - LzmaRam.h
- - LzmaRam.cpp
- - LzmaRamDecode.h
- - LzmaRamDecode.c
- - -f86 switch for lzma.exe
-
-
-4.16 2005-03-29
--------------------------
-- The bug was fixed in LzmaDecode.c (ANSI-C LZMA Decoder):
- If _LZMA_OUT_READ was defined, and if encoded stream was corrupted,
- decoder could access memory outside of allocated range.
-- Speed optimization of ANSI-C LZMA Decoder (now it's about 20% faster).
- Old version of LZMA Decoder now is in file LzmaDecodeSize.c.
- LzmaDecodeSize.c can provide slightly smaller code than LzmaDecode.c
-- Small speed optimization in LZMA C++ code
-- filter for SPARC's code was added
-- Simplified version of .7z ANSI-C Decoder was included
-
-
-4.06 2004-09-05
--------------------------
-- The bug in v4.05 was fixed:
- LZMA-Encoder didn't release output stream in some cases.
-
-
-4.05 2004-08-25
--------------------------
-- Source code of filters for x86, IA-64, ARM, ARM-Thumb
- and PowerPC code was included to SDK
-- Some internal minor changes
-
-
-4.04 2004-07-28
--------------------------
-- More compatibility with some C++ compilers
-
-
-4.03 2004-06-18
--------------------------
-- "Benchmark" command was added. It measures compressing
- and decompressing speed and shows rating values.
- Also it checks hardware errors.
-
-
-4.02 2004-06-10
--------------------------
-- C++ LZMA Encoder/Decoder code now is more portable
- and it can be compiled by GCC on Linux.
-
-
-4.01 2004-02-15
--------------------------
-- Some detection of data corruption was enabled.
- LzmaDecode.c / RangeDecoderReadByte
- .....
- {
- rd->ExtraBytes = 1;
- return 0xFF;
- }
-
-
-4.00 2004-02-13
--------------------------
-- Original version of LZMA SDK
-
-
-
-HISTORY of the LZMA
--------------------
- 2001-2008: Improvements to LZMA compressing/decompressing code,
- keeping compatibility with original LZMA format
- 1996-2001: Development of LZMA compression format
-
- Some milestones:
-
- 2001-08-30: LZMA compression was added to 7-Zip
- 1999-01-02: First version of 7-Zip was released
-
-
-End of document
diff --git a/extern/lzma/lzma.txt b/extern/lzma/lzma.txt
deleted file mode 100644
index 715792d6c17..00000000000
--- a/extern/lzma/lzma.txt
+++ /dev/null
@@ -1,594 +0,0 @@
-LZMA SDK 4.65
--------------
-
-LZMA SDK provides the documentation, samples, header files, libraries,
-and tools you need to develop applications that use LZMA compression.
-
-LZMA is default and general compression method of 7z format
-in 7-Zip compression program (www.7-zip.org). LZMA provides high
-compression ratio and very fast decompression.
-
-LZMA is an improved version of famous LZ77 compression algorithm.
-It was improved in way of maximum increasing of compression ratio,
-keeping high decompression speed and low memory requirements for
-decompressing.
-
-
-
-LICENSE
--------
-
-LZMA SDK is written and placed in the public domain by Igor Pavlov.
-
-
-LZMA SDK Contents
------------------
-
-LZMA SDK includes:
-
- - ANSI-C/C++/C#/Java source code for LZMA compressing and decompressing
- - Compiled file->file LZMA compressing/decompressing program for Windows system
-
-
-UNIX/Linux version
-------------------
-To compile C++ version of file->file LZMA encoding, go to directory
-C++/7zip/Compress/LZMA_Alone
-and call make to recompile it:
- make -f makefile.gcc clean all
-
-In some UNIX/Linux versions you must compile LZMA with static libraries.
-To compile with static libraries, you can use
-LIB = -lm -static
-
-
-Files
----------------------
-lzma.txt - LZMA SDK description (this file)
-7zFormat.txt - 7z Format description
-7zC.txt - 7z ANSI-C Decoder description
-methods.txt - Compression method IDs for .7z
-lzma.exe - Compiled file->file LZMA encoder/decoder for Windows
-history.txt - history of the LZMA SDK
-
-
-Source code structure
----------------------
-
-C/ - C files
- 7zCrc*.* - CRC code
- Alloc.* - Memory allocation functions
- Bra*.* - Filters for x86, IA-64, ARM, ARM-Thumb, PowerPC and SPARC code
- LzFind.* - Match finder for LZ (LZMA) encoders
- LzFindMt.* - Match finder for LZ (LZMA) encoders for multithreading encoding
- LzHash.h - Additional file for LZ match finder
- LzmaDec.* - LZMA decoding
- LzmaEnc.* - LZMA encoding
- LzmaLib.* - LZMA Library for DLL calling
- Types.h - Basic types for another .c files
- Threads.* - The code for multithreading.
-
- LzmaLib - LZMA Library (.DLL for Windows)
-
- LzmaUtil - LZMA Utility (file->file LZMA encoder/decoder).
-
- Archive - files related to archiving
- 7z - 7z ANSI-C Decoder
-
-CPP/ -- CPP files
-
- Common - common files for C++ projects
- Windows - common files for Windows related code
-
- 7zip - files related to 7-Zip Project
-
- Common - common files for 7-Zip
-
- Compress - files related to compression/decompression
-
- Copy - Copy coder
- RangeCoder - Range Coder (special code of compression/decompression)
- LZMA - LZMA compression/decompression on C++
- LZMA_Alone - file->file LZMA compression/decompression
- Branch - Filters for x86, IA-64, ARM, ARM-Thumb, PowerPC and SPARC code
-
- Archive - files related to archiving
-
- Common - common files for archive handling
- 7z - 7z C++ Encoder/Decoder
-
- Bundles - Modules that are bundles of other modules
-
- Alone7z - 7zr.exe: Standalone version of 7z.exe that supports only 7z/LZMA/BCJ/BCJ2
- Format7zR - 7zr.dll: Reduced version of 7za.dll: extracting/compressing to 7z/LZMA/BCJ/BCJ2
- Format7zExtractR - 7zxr.dll: Reduced version of 7zxa.dll: extracting from 7z/LZMA/BCJ/BCJ2.
-
- UI - User Interface files
-
- Client7z - Test application for 7za.dll, 7zr.dll, 7zxr.dll
- Common - Common UI files
- Console - Code for console archiver
-
-
-
-CS/ - C# files
- 7zip
- Common - some common files for 7-Zip
- Compress - files related to compression/decompression
- LZ - files related to LZ (Lempel-Ziv) compression algorithm
- LZMA - LZMA compression/decompression
- LzmaAlone - file->file LZMA compression/decompression
- RangeCoder - Range Coder (special code of compression/decompression)
-
-Java/ - Java files
- SevenZip
- Compression - files related to compression/decompression
- LZ - files related to LZ (Lempel-Ziv) compression algorithm
- LZMA - LZMA compression/decompression
- RangeCoder - Range Coder (special code of compression/decompression)
-
-
-C/C++ source code of LZMA SDK is part of 7-Zip project.
-7-Zip source code can be downloaded from 7-Zip's SourceForge page:
-
- http://sourceforge.net/projects/sevenzip/
-
-
-
-LZMA features
--------------
- - Variable dictionary size (up to 1 GB)
- - Estimated compressing speed: about 2 MB/s on 2 GHz CPU
- - Estimated decompressing speed:
- - 20-30 MB/s on 2 GHz Core 2 or AMD Athlon 64
- - 1-2 MB/s on 200 MHz ARM, MIPS, PowerPC or other simple RISC
- - Small memory requirements for decompressing (16 KB + DictionarySize)
- - Small code size for decompressing: 5-8 KB
-
-LZMA decoder uses only integer operations and can be
-implemented in any modern 32-bit CPU (or on 16-bit CPU with some conditions).
-
-Some critical operations that affect the speed of LZMA decompression:
- 1) 32*16 bit integer multiply
- 2) Misspredicted branches (penalty mostly depends from pipeline length)
- 3) 32-bit shift and arithmetic operations
-
-The speed of LZMA decompressing mostly depends from CPU speed.
-Memory speed has no big meaning. But if your CPU has small data cache,
-overall weight of memory speed will slightly increase.
-
-
-How To Use
-----------
-
-Using LZMA encoder/decoder executable
---------------------------------------
-
-Usage: LZMA <e|d> inputFile outputFile [<switches>...]
-
- e: encode file
-
- d: decode file
-
- b: Benchmark. There are two tests: compressing and decompressing
- with LZMA method. Benchmark shows rating in MIPS (million
- instructions per second). Rating value is calculated from
- measured speed and it is normalized with Intel's Core 2 results.
- Also Benchmark checks possible hardware errors (RAM
- errors in most cases). Benchmark uses these settings:
- (-a1, -d21, -fb32, -mfbt4). You can change only -d parameter.
- Also you can change the number of iterations. Example for 30 iterations:
- LZMA b 30
- Default number of iterations is 10.
-
-<Switches>
-
-
- -a{N}: set compression mode 0 = fast, 1 = normal
- default: 1 (normal)
-
- d{N}: Sets Dictionary size - [0, 30], default: 23 (8MB)
- The maximum value for dictionary size is 1 GB = 2^30 bytes.
- Dictionary size is calculated as DictionarySize = 2^N bytes.
- For decompressing file compressed by LZMA method with dictionary
- size D = 2^N you need about D bytes of memory (RAM).
-
- -fb{N}: set number of fast bytes - [5, 273], default: 128
- Usually big number gives a little bit better compression ratio
- and slower compression process.
-
- -lc{N}: set number of literal context bits - [0, 8], default: 3
- Sometimes lc=4 gives gain for big files.
-
- -lp{N}: set number of literal pos bits - [0, 4], default: 0
- lp switch is intended for periodical data when period is
- equal 2^N. For example, for 32-bit (4 bytes)
- periodical data you can use lp=2. Often it's better to set lc0,
- if you change lp switch.
-
- -pb{N}: set number of pos bits - [0, 4], default: 2
- pb switch is intended for periodical data
- when period is equal 2^N.
-
- -mf{MF_ID}: set Match Finder. Default: bt4.
- Algorithms from hc* group doesn't provide good compression
- ratio, but they often works pretty fast in combination with
- fast mode (-a0).
-
- Memory requirements depend from dictionary size
- (parameter "d" in table below).
-
- MF_ID Memory Description
-
- bt2 d * 9.5 + 4MB Binary Tree with 2 bytes hashing.
- bt3 d * 11.5 + 4MB Binary Tree with 3 bytes hashing.
- bt4 d * 11.5 + 4MB Binary Tree with 4 bytes hashing.
- hc4 d * 7.5 + 4MB Hash Chain with 4 bytes hashing.
-
- -eos: write End Of Stream marker. By default LZMA doesn't write
- eos marker, since LZMA decoder knows uncompressed size
- stored in .lzma file header.
-
- -si: Read data from stdin (it will write End Of Stream marker).
- -so: Write data to stdout
-
-
-Examples:
-
-1) LZMA e file.bin file.lzma -d16 -lc0
-
-compresses file.bin to file.lzma with 64 KB dictionary (2^16=64K)
-and 0 literal context bits. -lc0 allows to reduce memory requirements
-for decompression.
-
-
-2) LZMA e file.bin file.lzma -lc0 -lp2
-
-compresses file.bin to file.lzma with settings suitable
-for 32-bit periodical data (for example, ARM or MIPS code).
-
-3) LZMA d file.lzma file.bin
-
-decompresses file.lzma to file.bin.
-
-
-Compression ratio hints
------------------------
-
-Recommendations
----------------
-
-To increase the compression ratio for LZMA compressing it's desirable
-to have aligned data (if it's possible) and also it's desirable to locate
-data in such order, where code is grouped in one place and data is
-grouped in other place (it's better than such mixing: code, data, code,
-data, ...).
-
-
-Filters
--------
-You can increase the compression ratio for some data types, using
-special filters before compressing. For example, it's possible to
-increase the compression ratio on 5-10% for code for those CPU ISAs:
-x86, IA-64, ARM, ARM-Thumb, PowerPC, SPARC.
-
-You can find C source code of such filters in C/Bra*.* files
-
-You can check the compression ratio gain of these filters with such
-7-Zip commands (example for ARM code):
-No filter:
- 7z a a1.7z a.bin -m0=lzma
-
-With filter for little-endian ARM code:
- 7z a a2.7z a.bin -m0=arm -m1=lzma
-
-It works in such manner:
-Compressing = Filter_encoding + LZMA_encoding
-Decompressing = LZMA_decoding + Filter_decoding
-
-Compressing and decompressing speed of such filters is very high,
-so it will not increase decompressing time too much.
-Moreover, it reduces decompression time for LZMA_decoding,
-since compression ratio with filtering is higher.
-
-These filters convert CALL (calling procedure) instructions
-from relative offsets to absolute addresses, so such data becomes more
-compressible.
-
-For some ISAs (for example, for MIPS) it's impossible to get gain from such filter.
-
-
-LZMA compressed file format
----------------------------
-Offset Size Description
- 0 1 Special LZMA properties (lc,lp, pb in encoded form)
- 1 4 Dictionary size (little endian)
- 5 8 Uncompressed size (little endian). -1 means unknown size
- 13 Compressed data
-
-
-ANSI-C LZMA Decoder
-~~~~~~~~~~~~~~~~~~~
-
-Please note that interfaces for ANSI-C code were changed in LZMA SDK 4.58.
-If you want to use old interfaces you can download previous version of LZMA SDK
-from sourceforge.net site.
-
-To use ANSI-C LZMA Decoder you need the following files:
-1) LzmaDec.h + LzmaDec.c + Types.h
-LzmaUtil/LzmaUtil.c is example application that uses these files.
-
-
-Memory requirements for LZMA decoding
--------------------------------------
-
-Stack usage of LZMA decoding function for local variables is not
-larger than 200-400 bytes.
-
-LZMA Decoder uses dictionary buffer and internal state structure.
-Internal state structure consumes
- state_size = (4 + (1.5 << (lc + lp))) KB
-by default (lc=3, lp=0), state_size = 16 KB.
-
-
-How To decompress data
-----------------------
-
-LZMA Decoder (ANSI-C version) now supports 2 interfaces:
-1) Single-call Decompressing
-2) Multi-call State Decompressing (zlib-like interface)
-
-You must use external allocator:
-Example:
-void *SzAlloc(void *p, size_t size) { p = p; return malloc(size); }
-void SzFree(void *p, void *address) { p = p; free(address); }
-ISzAlloc alloc = { SzAlloc, SzFree };
-
-You can use p = p; operator to disable compiler warnings.
-
-
-Single-call Decompressing
--------------------------
-When to use: RAM->RAM decompressing
-Compile files: LzmaDec.h + LzmaDec.c + Types.h
-Compile defines: no defines
-Memory Requirements:
- - Input buffer: compressed size
- - Output buffer: uncompressed size
- - LZMA Internal Structures: state_size (16 KB for default settings)
-
-Interface:
- int LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
- const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
- ELzmaStatus *status, ISzAlloc *alloc);
- In:
- dest - output data
- destLen - output data size
- src - input data
- srcLen - input data size
- propData - LZMA properties (5 bytes)
- propSize - size of propData buffer (5 bytes)
- finishMode - It has meaning only if the decoding reaches output limit (*destLen).
- LZMA_FINISH_ANY - Decode just destLen bytes.
- LZMA_FINISH_END - Stream must be finished after (*destLen).
- You can use LZMA_FINISH_END, when you know that
- current output buffer covers last bytes of stream.
- alloc - Memory allocator.
-
- Out:
- destLen - processed output size
- srcLen - processed input size
-
- Output:
- SZ_OK
- status:
- LZMA_STATUS_FINISHED_WITH_MARK
- LZMA_STATUS_NOT_FINISHED
- LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
- SZ_ERROR_DATA - Data error
- SZ_ERROR_MEM - Memory allocation error
- SZ_ERROR_UNSUPPORTED - Unsupported properties
- SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
-
- If LZMA decoder sees end_marker before reaching output limit, it returns OK result,
- and output value of destLen will be less than output buffer size limit.
-
- You can use multiple checks to test data integrity after full decompression:
- 1) Check Result and "status" variable.
- 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize.
- 3) Check that output(srcLen) = compressedSize, if you know real compressedSize.
- You must use correct finish mode in that case. */
-
-
-Multi-call State Decompressing (zlib-like interface)
-----------------------------------------------------
-
-When to use: file->file decompressing
-Compile files: LzmaDec.h + LzmaDec.c + Types.h
-
-Memory Requirements:
- - Buffer for input stream: any size (for example, 16 KB)
- - Buffer for output stream: any size (for example, 16 KB)
- - LZMA Internal Structures: state_size (16 KB for default settings)
- - LZMA dictionary (dictionary size is encoded in LZMA properties header)
-
-1) read LZMA properties (5 bytes) and uncompressed size (8 bytes, little-endian) to header:
- unsigned char header[LZMA_PROPS_SIZE + 8];
- ReadFile(inFile, header, sizeof(header)
-
-2) Allocate CLzmaDec structures (state + dictionary) using LZMA properties
-
- CLzmaDec state;
- LzmaDec_Constr(&state);
- res = LzmaDec_Allocate(&state, header, LZMA_PROPS_SIZE, &g_Alloc);
- if (res != SZ_OK)
- return res;
-
-3) Init LzmaDec structure before any new LZMA stream. And call LzmaDec_DecodeToBuf in loop
-
- LzmaDec_Init(&state);
- for (;;)
- {
- ...
- int res = LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen,
- const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode);
- ...
- }
-
-
-4) Free all allocated structures
- LzmaDec_Free(&state, &g_Alloc);
-
-For full code example, look at C/LzmaUtil/LzmaUtil.c code.
-
-
-How To compress data
---------------------
-
-Compile files: LzmaEnc.h + LzmaEnc.c + Types.h +
-LzFind.c + LzFind.h + LzFindMt.c + LzFindMt.h + LzHash.h
-
-Memory Requirements:
- - (dictSize * 11.5 + 6 MB) + state_size
-
-Lzma Encoder can use two memory allocators:
-1) alloc - for small arrays.
-2) allocBig - for big arrays.
-
-For example, you can use Large RAM Pages (2 MB) in allocBig allocator for
-better compression speed. Note that Windows has bad implementation for
-Large RAM Pages.
-It's OK to use same allocator for alloc and allocBig.
-
-
-Single-call Compression with callbacks
---------------------------------------
-
-Check C/LzmaUtil/LzmaUtil.c as example,
-
-When to use: file->file decompressing
-
-1) you must implement callback structures for interfaces:
-ISeqInStream
-ISeqOutStream
-ICompressProgress
-ISzAlloc
-
-static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
-static void SzFree(void *p, void *address) { p = p; MyFree(address); }
-static ISzAlloc g_Alloc = { SzAlloc, SzFree };
-
- CFileSeqInStream inStream;
- CFileSeqOutStream outStream;
-
- inStream.funcTable.Read = MyRead;
- inStream.file = inFile;
- outStream.funcTable.Write = MyWrite;
- outStream.file = outFile;
-
-
-2) Create CLzmaEncHandle object;
-
- CLzmaEncHandle enc;
-
- enc = LzmaEnc_Create(&g_Alloc);
- if (enc == 0)
- return SZ_ERROR_MEM;
-
-
-3) initialize CLzmaEncProps properties;
-
- LzmaEncProps_Init(&props);
-
- Then you can change some properties in that structure.
-
-4) Send LZMA properties to LZMA Encoder
-
- res = LzmaEnc_SetProps(enc, &props);
-
-5) Write encoded properties to header
-
- Byte header[LZMA_PROPS_SIZE + 8];
- size_t headerSize = LZMA_PROPS_SIZE;
- UInt64 fileSize;
- int i;
-
- res = LzmaEnc_WriteProperties(enc, header, &headerSize);
- fileSize = MyGetFileLength(inFile);
- for (i = 0; i < 8; i++)
- header[headerSize++] = (Byte)(fileSize >> (8 * i));
- MyWriteFileAndCheck(outFile, header, headerSize)
-
-6) Call encoding function:
- res = LzmaEnc_Encode(enc, &outStream.funcTable, &inStream.funcTable,
- NULL, &g_Alloc, &g_Alloc);
-
-7) Destroy LZMA Encoder Object
- LzmaEnc_Destroy(enc, &g_Alloc, &g_Alloc);
-
-
-If callback function return some error code, LzmaEnc_Encode also returns that code.
-
-
-Single-call RAM->RAM Compression
---------------------------------
-
-Single-call RAM->RAM Compression is similar to Compression with callbacks,
-but you provide pointers to buffers instead of pointers to stream callbacks:
-
-HRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
- CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
- ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
-
-Return code:
- SZ_OK - OK
- SZ_ERROR_MEM - Memory allocation error
- SZ_ERROR_PARAM - Incorrect paramater
- SZ_ERROR_OUTPUT_EOF - output buffer overflow
- SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version)
-
-
-
-LZMA Defines
-------------
-
-_LZMA_SIZE_OPT - Enable some optimizations in LZMA Decoder to get smaller executable code.
-
-_LZMA_PROB32 - It can increase the speed on some 32-bit CPUs, but memory usage for
- some structures will be doubled in that case.
-
-_LZMA_UINT32_IS_ULONG - Define it if int is 16-bit on your compiler and long is 32-bit.
-
-_LZMA_NO_SYSTEM_SIZE_T - Define it if you don't want to use size_t type.
-
-
-C++ LZMA Encoder/Decoder
-~~~~~~~~~~~~~~~~~~~~~~~~
-C++ LZMA code use COM-like interfaces. So if you want to use it,
-you can study basics of COM/OLE.
-C++ LZMA code is just wrapper over ANSI-C code.
-
-
-C++ Notes
-~~~~~~~~~~~~~~~~~~~~~~~~
-If you use some C++ code folders in 7-Zip (for example, C++ code for .7z handling),
-you must check that you correctly work with "new" operator.
-7-Zip can be compiled with MSVC 6.0 that doesn't throw "exception" from "new" operator.
-So 7-Zip uses "CPP\Common\NewHandler.cpp" that redefines "new" operator:
-operator new(size_t size)
-{
- void *p = ::malloc(size);
- if (p == 0)
- throw CNewException();
- return p;
-}
-If you use MSCV that throws exception for "new" operator, you can compile without
-"NewHandler.cpp". So standard exception will be used. Actually some code of
-7-Zip catches any exception in internal code and converts it to HRESULT code.
-So you don't need to catch CNewException, if you call COM interfaces of 7-Zip.
-
----
-
-http://www.7-zip.org
-http://www.7-zip.org/sdk.html
-http://www.7-zip.org/support.html
diff --git a/extern/lzma/make/msvc_9_0/lzma.vcproj b/extern/lzma/make/msvc_9_0/lzma.vcproj
deleted file mode 100644
index ec0676f6ca6..00000000000
--- a/extern/lzma/make/msvc_9_0/lzma.vcproj
+++ /dev/null
@@ -1,385 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="EXT_lzma"
- ProjectGUID="{79D0B232-208C-F208-DA71-79B4AC088602}"
- RootNamespace="lzma"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Blender Debug|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\lzma\debug"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\lzma\debug"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_DEBUG;_LIB;WIN32"
- ExceptionHandling="1"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\lzma\debug\lzma.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\lzma\debug\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\lzma\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\lzma\debug\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="4"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\debug\lzma.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Blender Release|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\lzma"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\lzma"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="NDEBUG;_LIB;WIN32"
- StringPooling="true"
- ExceptionHandling="0"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\lzma\lzma.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\lzma\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\lzma\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\lzma\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="1"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\lzma.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="3D Plugin Debug|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\debug"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\debug"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_DEBUG;_LIB;WIN32"
- ExceptionHandling="0"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\debug\lzma.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\debug\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\debug\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="4"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\mtdll\debug\lzma.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="3D Plugin Release|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="NDEBUG;_LIB;WIN32"
- StringPooling="true"
- ExceptionHandling="0"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\lzma.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\lzma\mtdll\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="1"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\mtdll\lzma.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Alloc.c"
- >
- </File>
- <File
- RelativePath="..\..\LzFind.c"
- >
- </File>
- <File
- RelativePath="..\..\LzmaDec.c"
- >
- </File>
- <File
- RelativePath="..\..\LzmaEnc.c"
- >
- </File>
- <File
- RelativePath="..\..\LzmaLib.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- >
- <File
- RelativePath="..\..\Alloc.h"
- >
- </File>
- <File
- RelativePath="..\..\LzFind.h"
- >
- </File>
- <File
- RelativePath="..\..\LzHash.h"
- >
- </File>
- <File
- RelativePath="..\..\LzmaDec.h"
- >
- </File>
- <File
- RelativePath="..\..\LzmaEnc.h"
- >
- </File>
- <File
- RelativePath="..\..\LzmaLib.h"
- >
- </File>
- <File
- RelativePath="..\..\Types.h"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/extern/lzo/CMakeLists.txt b/extern/lzo/CMakeLists.txt
deleted file mode 100644
index b640cf658da..00000000000
--- a/extern/lzo/CMakeLists.txt
+++ /dev/null
@@ -1,34 +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., 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 include)
-
-FILE(GLOB SRC minilzo/*.c)
-
-
-
-BLENDERLIB(bf_minilzo "${SRC}" "${INC}")
-#, libtype='blender', priority = 0 )
diff --git a/extern/lzo/SConscript b/extern/lzo/SConscript
deleted file mode 100644
index 81bedad25d8..00000000000
--- a/extern/lzo/SConscript
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/python
-Import ('env')
-
-sources = env.Glob('minilzo/*.c')
-
-defs = ''
-incs = ' include '
-
-env.BlenderLib ('bf_minilzo', sources, Split(incs), Split(defs), libtype=['intern'], priority=[40] )
diff --git a/extern/lzo/make/msvc_9_0/lzo.vcproj b/extern/lzo/make/msvc_9_0/lzo.vcproj
deleted file mode 100644
index 80516ef964e..00000000000
--- a/extern/lzo/make/msvc_9_0/lzo.vcproj
+++ /dev/null
@@ -1,353 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="EXT_lzo"
- ProjectGUID="{8BFA4082-773B-D100-BC24-659083BA023F}"
- RootNamespace="lzo"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Blender Debug|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\lzo\debug"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\lzo\debug"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_DEBUG;_LIB;WIN32"
- ExceptionHandling="1"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\lzo\debug\lzo.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\lzo\debug\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\lzo\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\lzo\debug\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="4"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\debug\lzo.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Blender Release|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\lzo"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\lzo"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="NDEBUG;_LIB;WIN32"
- StringPooling="true"
- ExceptionHandling="0"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\lzo\lzo.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\lzo\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\lzo\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\lzo\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="1"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\lzo.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="3D Plugin Debug|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\debug"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\debug"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_DEBUG;_LIB;WIN32"
- ExceptionHandling="0"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\debug\lzo.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\debug\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\debug\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="4"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\mtdll\debug\lzo.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="3D Plugin Release|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="NDEBUG;_LIB;WIN32"
- StringPooling="true"
- ExceptionHandling="0"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\lzo.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\lzo\mtdll\"
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="1"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\mtdll\lzo.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\minilzo\minilzo.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- >
- <File
- RelativePath="..\..\minilzo\lzoconf.h"
- >
- </File>
- <File
- RelativePath="..\..\minilzo\lzodefs.h"
- >
- </File>
- <File
- RelativePath="..\..\minilzo\minilzo.h"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/extern/lzo/minilzo/COPYING b/extern/lzo/minilzo/COPYING
deleted file mode 100644
index 5ee49f42e91..00000000000
--- a/extern/lzo/minilzo/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- 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
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/extern/lzo/minilzo/Makefile b/extern/lzo/minilzo/Makefile
deleted file mode 100644
index 8f3d5042579..00000000000
--- a/extern/lzo/minilzo/Makefile
+++ /dev/null
@@ -1,40 +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# The Original Code is Copyright (C) 2009 Blender Foundation
-# All rights reserved.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-
-LIBNAME = minilzo
-DIR = $(OCGDIR)/extern/$(LIBNAME)
-
-include nan_compile.mk
-
-install: $(ALL_OR_DEBUG)
- @[ -d $(NAN_LZO) ] || mkdir -p $(NAN_LZO)
- @[ -d $(NAN_LZO)/minilzo ] || mkdir -p $(NAN_LZO)/minilzo
- @[ -d $(NAN_LZO)/lib/$(DEBUG_DIR) ] || mkdir -p $(NAN_LZO)/lib/$(DEBUG_DIR)
- @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)lib$(LIBNAME).a $(NAN_LZO)/lib/$(DEBUG_DIR)
-ifeq ($(OS),darwin)
- ranlib $(NAN_LZO)/lib/$(DEBUG_DIR)lib$(LIBNAME).a
-endif
- @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh *.h $(NAN_LZO)/minilzo
diff --git a/extern/lzo/minilzo/README.LZO b/extern/lzo/minilzo/README.LZO
deleted file mode 100644
index 3700f28e310..00000000000
--- a/extern/lzo/minilzo/README.LZO
+++ /dev/null
@@ -1,123 +0,0 @@
-
- ============================================================================
- miniLZO -- mini subset of the LZO real-time data compression library
- ============================================================================
-
- Author : Markus Franz Xaver Johannes Oberhumer
- <markus@oberhumer.com>
- http://www.oberhumer.com/opensource/lzo/
- Version : 2.03
- Date : 30 Apr 2008
-
- I've created miniLZO for projects where it is inconvenient to
- include (or require) the full LZO source code just because you
- want to add a little bit of data compression to your application.
-
- miniLZO implements the LZO1X-1 compressor and both the standard and
- safe LZO1X decompressor. Apart from fast compression it also useful
- for situations where you want to use pre-compressed data files (which
- must have been compressed with LZO1X-999).
-
- miniLZO consists of one C source file and three header files:
- minilzo.c
- minilzo.h, lzoconf.h, lzodefs.h
-
- To use miniLZO just copy these files into your source directory, add
- minilzo.c to your Makefile and #include minilzo.h from your program.
- Note: you also must distribute this file (`README.LZO') with your project.
-
- minilzo.o compiles to about 6 kB (using gcc or Visual C on a i386), and
- the sources are about 30 kB when packed with zip - so there's no more
- excuse that your application doesn't support data compression :-)
-
- For more information, documentation, example programs and other support
- files (like Makefiles and build scripts) please download the full LZO
- package from
- http://www.oberhumer.com/opensource/lzo/
-
- Have fun,
- Markus
-
-
- P.S. minilzo.c is generated automatically from the LZO sources and
- therefore functionality is completely identical
-
-
- Appendix A: building miniLZO
- ----------------------------
- miniLZO is written such a way that it should compile and run
- out-of-the-box on most machines.
-
- If you are running on a very unusual architecture and lzo_init() fails then
- you should first recompile with `-DLZO_DEBUG' to see what causes the failure.
- The most probable case is something like `sizeof(char *) != sizeof(long)'.
- After identifying the problem you can compile by adding some defines
- like `-DSIZEOF_CHAR_P=8' to your Makefile.
-
- The best solution is (of course) using Autoconf - if your project uses
- Autoconf anyway just add `-DMINILZO_HAVE_CONFIG_H' to your compiler
- flags when compiling minilzo.c. See the LZO distribution for an example
- how to set up configure.in.
-
-
- Appendix B: list of public functions available in miniLZO
- ---------------------------------------------------------
- Library initialization
- lzo_init()
-
- Compression
- lzo1x_1_compress()
-
- Decompression
- lzo1x_decompress()
- lzo1x_decompress_safe()
-
- Checksum functions
- lzo_adler32()
-
- Version functions
- lzo_version()
- lzo_version_string()
- lzo_version_date()
-
- Portable (but slow) string functions
- lzo_memcmp()
- lzo_memcpy()
- lzo_memmove()
- lzo_memset()
-
-
- Appendix C: suggested macros for `configure.in' when using Autoconf
- -------------------------------------------------------------------
- Checks for typedefs and structures
- AC_CHECK_TYPE(ptrdiff_t,long)
- AC_TYPE_SIZE_T
- AC_CHECK_SIZEOF(short)
- AC_CHECK_SIZEOF(int)
- AC_CHECK_SIZEOF(long)
- AC_CHECK_SIZEOF(long long)
- AC_CHECK_SIZEOF(__int64)
- AC_CHECK_SIZEOF(void *)
- AC_CHECK_SIZEOF(size_t)
- AC_CHECK_SIZEOF(ptrdiff_t)
-
- Checks for compiler characteristics
- AC_C_CONST
-
- Checks for library functions
- AC_CHECK_FUNCS(memcmp memcpy memmove memset)
-
-
- Appendix D: Copyright
- ---------------------
- LZO and miniLZO are Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008 Markus Franz Xaver Johannes Oberhumer
-
- LZO and miniLZO are distributed under the terms of the GNU General
- Public License (GPL). See the file COPYING.
-
- Special licenses for commercial and other applications which
- are not willing to accept the GNU General Public License
- are available by contacting the author.
-
-
diff --git a/extern/lzo/minilzo/lzoconf.h b/extern/lzo/minilzo/lzoconf.h
deleted file mode 100644
index cc437f1ebfe..00000000000
--- a/extern/lzo/minilzo/lzoconf.h
+++ /dev/null
@@ -1,417 +0,0 @@
-/* lzoconf.h -- configuration for the LZO real-time data compression library
-
- This file is part of the LZO real-time data compression library.
-
- Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
- All Rights Reserved.
-
- The LZO library 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 LZO library 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 the LZO library; see the file COPYING.
- If not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- Markus F.X.J. Oberhumer
- <markus@oberhumer.com>
- http://www.oberhumer.com/opensource/lzo/
- */
-
-
-#ifndef __LZOCONF_H_INCLUDED
-#define __LZOCONF_H_INCLUDED
-
-#define LZO_VERSION 0x2030
-#define LZO_VERSION_STRING "2.03"
-#define LZO_VERSION_DATE "Apr 30 2008"
-
-/* internal Autoconf configuration file - only used when building LZO */
-#if defined(LZO_HAVE_CONFIG_H)
-# include <config.h>
-#endif
-#include <limits.h>
-#include <stddef.h>
-
-
-/***********************************************************************
-// LZO requires a conforming <limits.h>
-************************************************************************/
-
-#if !defined(CHAR_BIT) || (CHAR_BIT != 8)
-# error "invalid CHAR_BIT"
-#endif
-#if !defined(UCHAR_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX)
-# error "check your compiler installation"
-#endif
-#if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1)
-# error "your limits.h macros are broken"
-#endif
-
-/* get OS and architecture defines */
-#ifndef __LZODEFS_H_INCLUDED
-#include "lzodefs.h"
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/***********************************************************************
-// some core defines
-************************************************************************/
-
-#if !defined(LZO_UINT32_C)
-# if (UINT_MAX < LZO_0xffffffffL)
-# define LZO_UINT32_C(c) c ## UL
-# else
-# define LZO_UINT32_C(c) ((c) + 0U)
-# endif
-#endif
-
-/* memory checkers */
-#if !defined(__LZO_CHECKER)
-# if defined(__BOUNDS_CHECKING_ON)
-# define __LZO_CHECKER 1
-# elif defined(__CHECKER__)
-# define __LZO_CHECKER 1
-# elif defined(__INSURE__)
-# define __LZO_CHECKER 1
-# elif defined(__PURIFY__)
-# define __LZO_CHECKER 1
-# endif
-#endif
-
-
-/***********************************************************************
-// integral and pointer types
-************************************************************************/
-
-/* lzo_uint should match size_t */
-#if !defined(LZO_UINT_MAX)
-# if defined(LZO_ABI_LLP64) /* WIN64 */
-# if defined(LZO_OS_WIN64)
- typedef unsigned __int64 lzo_uint;
- typedef __int64 lzo_int;
-# else
- typedef unsigned long long lzo_uint;
- typedef long long lzo_int;
-# endif
-# define LZO_UINT_MAX 0xffffffffffffffffull
-# define LZO_INT_MAX 9223372036854775807LL
-# define LZO_INT_MIN (-1LL - LZO_INT_MAX)
-# elif defined(LZO_ABI_IP32L64) /* MIPS R5900 */
- typedef unsigned int lzo_uint;
- typedef int lzo_int;
-# define LZO_UINT_MAX UINT_MAX
-# define LZO_INT_MAX INT_MAX
-# define LZO_INT_MIN INT_MIN
-# elif (ULONG_MAX >= LZO_0xffffffffL)
- typedef unsigned long lzo_uint;
- typedef long lzo_int;
-# define LZO_UINT_MAX ULONG_MAX
-# define LZO_INT_MAX LONG_MAX
-# define LZO_INT_MIN LONG_MIN
-# else
-# error "lzo_uint"
-# endif
-#endif
-
-/* Integral types with 32 bits or more. */
-#if !defined(LZO_UINT32_MAX)
-# if (UINT_MAX >= LZO_0xffffffffL)
- typedef unsigned int lzo_uint32;
- typedef int lzo_int32;
-# define LZO_UINT32_MAX UINT_MAX
-# define LZO_INT32_MAX INT_MAX
-# define LZO_INT32_MIN INT_MIN
-# elif (ULONG_MAX >= LZO_0xffffffffL)
- typedef unsigned long lzo_uint32;
- typedef long lzo_int32;
-# define LZO_UINT32_MAX ULONG_MAX
-# define LZO_INT32_MAX LONG_MAX
-# define LZO_INT32_MIN LONG_MIN
-# else
-# error "lzo_uint32"
-# endif
-#endif
-
-/* The larger type of lzo_uint and lzo_uint32. */
-#if (LZO_UINT_MAX >= LZO_UINT32_MAX)
-# define lzo_xint lzo_uint
-#else
-# define lzo_xint lzo_uint32
-#endif
-
-/* Memory model that allows to access memory at offsets of lzo_uint. */
-#if !defined(__LZO_MMODEL)
-# if (LZO_UINT_MAX <= UINT_MAX)
-# define __LZO_MMODEL
-# elif defined(LZO_HAVE_MM_HUGE_PTR)
-# define __LZO_MMODEL_HUGE 1
-# define __LZO_MMODEL __huge
-# else
-# define __LZO_MMODEL
-# endif
-#endif
-
-/* no typedef here because of const-pointer issues */
-#define lzo_bytep unsigned char __LZO_MMODEL *
-#define lzo_charp char __LZO_MMODEL *
-#define lzo_voidp void __LZO_MMODEL *
-#define lzo_shortp short __LZO_MMODEL *
-#define lzo_ushortp unsigned short __LZO_MMODEL *
-#define lzo_uint32p lzo_uint32 __LZO_MMODEL *
-#define lzo_int32p lzo_int32 __LZO_MMODEL *
-#define lzo_uintp lzo_uint __LZO_MMODEL *
-#define lzo_intp lzo_int __LZO_MMODEL *
-#define lzo_xintp lzo_xint __LZO_MMODEL *
-#define lzo_voidpp lzo_voidp __LZO_MMODEL *
-#define lzo_bytepp lzo_bytep __LZO_MMODEL *
-/* deprecated - use `lzo_bytep' instead of `lzo_byte *' */
-#define lzo_byte unsigned char __LZO_MMODEL
-
-typedef int lzo_bool;
-
-
-/***********************************************************************
-// function types
-************************************************************************/
-
-/* name mangling */
-#if !defined(__LZO_EXTERN_C)
-# ifdef __cplusplus
-# define __LZO_EXTERN_C extern "C"
-# else
-# define __LZO_EXTERN_C extern
-# endif
-#endif
-
-/* calling convention */
-#if !defined(__LZO_CDECL)
-# define __LZO_CDECL __lzo_cdecl
-#endif
-
-/* DLL export information */
-#if !defined(__LZO_EXPORT1)
-# define __LZO_EXPORT1
-#endif
-#if !defined(__LZO_EXPORT2)
-# define __LZO_EXPORT2
-#endif
-
-/* __cdecl calling convention for public C and assembly functions */
-#if !defined(LZO_PUBLIC)
-# define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL
-#endif
-#if !defined(LZO_EXTERN)
-# define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype)
-#endif
-#if !defined(LZO_PRIVATE)
-# define LZO_PRIVATE(_rettype) static _rettype __LZO_CDECL
-#endif
-
-/* function types */
-typedef int
-(__LZO_CDECL *lzo_compress_t) ( const lzo_bytep src, lzo_uint src_len,
- lzo_bytep dst, lzo_uintp dst_len,
- lzo_voidp wrkmem );
-
-typedef int
-(__LZO_CDECL *lzo_decompress_t) ( const lzo_bytep src, lzo_uint src_len,
- lzo_bytep dst, lzo_uintp dst_len,
- lzo_voidp wrkmem );
-
-typedef int
-(__LZO_CDECL *lzo_optimize_t) ( lzo_bytep src, lzo_uint src_len,
- lzo_bytep dst, lzo_uintp dst_len,
- lzo_voidp wrkmem );
-
-typedef int
-(__LZO_CDECL *lzo_compress_dict_t)(const lzo_bytep src, lzo_uint src_len,
- lzo_bytep dst, lzo_uintp dst_len,
- lzo_voidp wrkmem,
- const lzo_bytep dict, lzo_uint dict_len );
-
-typedef int
-(__LZO_CDECL *lzo_decompress_dict_t)(const lzo_bytep src, lzo_uint src_len,
- lzo_bytep dst, lzo_uintp dst_len,
- lzo_voidp wrkmem,
- const lzo_bytep dict, lzo_uint dict_len );
-
-
-/* Callback interface. Currently only the progress indicator ("nprogress")
- * is used, but this may change in a future release. */
-
-struct lzo_callback_t;
-typedef struct lzo_callback_t lzo_callback_t;
-#define lzo_callback_p lzo_callback_t __LZO_MMODEL *
-
-/* malloc & free function types */
-typedef lzo_voidp (__LZO_CDECL *lzo_alloc_func_t)
- (lzo_callback_p self, lzo_uint items, lzo_uint size);
-typedef void (__LZO_CDECL *lzo_free_func_t)
- (lzo_callback_p self, lzo_voidp ptr);
-
-/* a progress indicator callback function */
-typedef void (__LZO_CDECL *lzo_progress_func_t)
- (lzo_callback_p, lzo_uint, lzo_uint, int);
-
-struct lzo_callback_t
-{
- /* custom allocators (set to 0 to disable) */
- lzo_alloc_func_t nalloc; /* [not used right now] */
- lzo_free_func_t nfree; /* [not used right now] */
-
- /* a progress indicator callback function (set to 0 to disable) */
- lzo_progress_func_t nprogress;
-
- /* NOTE: the first parameter "self" of the nalloc/nfree/nprogress
- * callbacks points back to this struct, so you are free to store
- * some extra info in the following variables. */
- lzo_voidp user1;
- lzo_xint user2;
- lzo_xint user3;
-};
-
-
-/***********************************************************************
-// error codes and prototypes
-************************************************************************/
-
-/* Error codes for the compression/decompression functions. Negative
- * values are errors, positive values will be used for special but
- * normal events.
- */
-#define LZO_E_OK 0
-#define LZO_E_ERROR (-1)
-#define LZO_E_OUT_OF_MEMORY (-2) /* [not used right now] */
-#define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */
-#define LZO_E_INPUT_OVERRUN (-4)
-#define LZO_E_OUTPUT_OVERRUN (-5)
-#define LZO_E_LOOKBEHIND_OVERRUN (-6)
-#define LZO_E_EOF_NOT_FOUND (-7)
-#define LZO_E_INPUT_NOT_CONSUMED (-8)
-#define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */
-
-
-#ifndef lzo_sizeof_dict_t
-# define lzo_sizeof_dict_t ((unsigned)sizeof(lzo_bytep))
-#endif
-
-/* lzo_init() should be the first function you call.
- * Check the return code !
- *
- * lzo_init() is a macro to allow checking that the library and the
- * compiler's view of various types are consistent.
- */
-#define lzo_init() __lzo_init_v2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\
- (int)sizeof(long),(int)sizeof(lzo_uint32),(int)sizeof(lzo_uint),\
- (int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\
- (int)sizeof(lzo_callback_t))
-LZO_EXTERN(int) __lzo_init_v2(unsigned,int,int,int,int,int,int,int,int,int);
-
-/* version functions (useful for shared libraries) */
-LZO_EXTERN(unsigned) lzo_version(void);
-LZO_EXTERN(const char *) lzo_version_string(void);
-LZO_EXTERN(const char *) lzo_version_date(void);
-LZO_EXTERN(const lzo_charp) _lzo_version_string(void);
-LZO_EXTERN(const lzo_charp) _lzo_version_date(void);
-
-/* string functions */
-LZO_EXTERN(int)
-lzo_memcmp(const lzo_voidp _s1, const lzo_voidp _s2, lzo_uint _len);
-LZO_EXTERN(lzo_voidp)
-lzo_memcpy(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len);
-LZO_EXTERN(lzo_voidp)
-lzo_memmove(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len);
-LZO_EXTERN(lzo_voidp)
-lzo_memset(lzo_voidp _s, int _c, lzo_uint _len);
-
-/* checksum functions */
-LZO_EXTERN(lzo_uint32)
-lzo_adler32(lzo_uint32 _adler, const lzo_bytep _buf, lzo_uint _len);
-LZO_EXTERN(lzo_uint32)
-lzo_crc32(lzo_uint32 _c, const lzo_bytep _buf, lzo_uint _len);
-LZO_EXTERN(const lzo_uint32p)
-lzo_get_crc32_table(void);
-
-/* misc. */
-LZO_EXTERN(int) _lzo_config_check(void);
-typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u;
-typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u;
-typedef union { void *vp; lzo_bytep bp; lzo_uint32 u32; long l; } lzo_align_t;
-
-/* align a char pointer on a boundary that is a multiple of `size' */
-LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size);
-#define LZO_PTR_ALIGN_UP(_ptr,_size) \
- ((_ptr) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(_ptr),(lzo_uint)(_size)))
-
-
-/***********************************************************************
-// deprecated macros - only for backward compatibility with LZO v1.xx
-************************************************************************/
-
-#if defined(LZO_CFG_COMPAT)
-
-#define __LZOCONF_H 1
-
-#if defined(LZO_ARCH_I086)
-# define __LZO_i386 1
-#elif defined(LZO_ARCH_I386)
-# define __LZO_i386 1
-#endif
-
-#if defined(LZO_OS_DOS16)
-# define __LZO_DOS 1
-# define __LZO_DOS16 1
-#elif defined(LZO_OS_DOS32)
-# define __LZO_DOS 1
-#elif defined(LZO_OS_WIN16)
-# define __LZO_WIN 1
-# define __LZO_WIN16 1
-#elif defined(LZO_OS_WIN32)
-# define __LZO_WIN 1
-#endif
-
-#define __LZO_CMODEL
-#define __LZO_DMODEL
-#define __LZO_ENTRY __LZO_CDECL
-#define LZO_EXTERN_CDECL LZO_EXTERN
-#define LZO_ALIGN LZO_PTR_ALIGN_UP
-
-#define lzo_compress_asm_t lzo_compress_t
-#define lzo_decompress_asm_t lzo_decompress_t
-
-#endif /* LZO_CFG_COMPAT */
-
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* already included */
-
-
-/* vim:set ts=4 et: */
diff --git a/extern/lzo/minilzo/lzodefs.h b/extern/lzo/minilzo/lzodefs.h
deleted file mode 100644
index 180563723e5..00000000000
--- a/extern/lzo/minilzo/lzodefs.h
+++ /dev/null
@@ -1,1807 +0,0 @@
-/* lzodefs.h -- architecture, OS and compiler specific defines
-
- This file is part of the LZO real-time data compression library.
-
- Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
- All Rights Reserved.
-
- The LZO library 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 LZO library 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 the LZO library; see the file COPYING.
- If not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- Markus F.X.J. Oberhumer
- <markus@oberhumer.com>
- http://www.oberhumer.com/opensource/lzo/
- */
-
-
-#ifndef __LZODEFS_H_INCLUDED
-#define __LZODEFS_H_INCLUDED 1
-
-#if defined(__CYGWIN32__) && !defined(__CYGWIN__)
-# define __CYGWIN__ __CYGWIN32__
-#endif
-#if defined(__IBMCPP__) && !defined(__IBMC__)
-# define __IBMC__ __IBMCPP__
-#endif
-#if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER)
-# define __INTEL_COMPILER __ICL
-#endif
-#if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE)
-# define _ALL_SOURCE 1
-#endif
-#if defined(__mips__) && defined(__R5900__)
-# if !defined(__LONG_MAX__)
-# define __LONG_MAX__ 9223372036854775807L
-# endif
-#endif
-#if defined(__INTEL_COMPILER) && defined(__linux__)
-# pragma warning(disable: 193)
-#endif
-#if defined(__KEIL__) && defined(__C166__)
-# pragma warning disable = 322
-#elif 0 && defined(__C251__)
-# pragma warning disable = 322
-#endif
-#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__)
-# if (_MSC_VER >= 1300)
-# pragma warning(disable: 4668)
-# endif
-#endif
-#if 0 && defined(__WATCOMC__)
-# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060)
-# pragma warning 203 9
-# endif
-#endif
-#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__)
-# pragma option -h
-#endif
-#if 0
-#define LZO_0xffffL 0xfffful
-#define LZO_0xffffffffL 0xfffffffful
-#else
-#define LZO_0xffffL 65535ul
-#define LZO_0xffffffffL 4294967295ul
-#endif
-#if (LZO_0xffffL == LZO_0xffffffffL)
-# error "your preprocessor is broken 1"
-#endif
-#if (16ul * 16384ul != 262144ul)
-# error "your preprocessor is broken 2"
-#endif
-#if 0
-#if (32767 >= 4294967295ul)
-# error "your preprocessor is broken 3"
-#endif
-#if (65535u >= 4294967295ul)
-# error "your preprocessor is broken 4"
-#endif
-#endif
-#if (UINT_MAX == LZO_0xffffL)
-#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__)
-# if !defined(MSDOS)
-# define MSDOS 1
-# endif
-# if !defined(_MSDOS)
-# define _MSDOS 1
-# endif
-#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX)
-# if (__VERSION == 520) && (MB_LEN_MAX == 1)
-# if !defined(__AZTEC_C__)
-# define __AZTEC_C__ __VERSION
-# endif
-# if !defined(__DOS__)
-# define __DOS__ 1
-# endif
-# endif
-#endif
-#endif
-#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL)
-# define ptrdiff_t long
-# define _PTRDIFF_T_DEFINED
-#endif
-#if (UINT_MAX == LZO_0xffffL)
-# undef __LZO_RENAME_A
-# undef __LZO_RENAME_B
-# if defined(__AZTEC_C__) && defined(__DOS__)
-# define __LZO_RENAME_A 1
-# elif defined(_MSC_VER) && defined(MSDOS)
-# if (_MSC_VER < 600)
-# define __LZO_RENAME_A 1
-# elif (_MSC_VER < 700)
-# define __LZO_RENAME_B 1
-# endif
-# elif defined(__TSC__) && defined(__OS2__)
-# define __LZO_RENAME_A 1
-# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410)
-# define __LZO_RENAME_A 1
-# elif defined(__PACIFIC__) && defined(DOS)
-# if !defined(__far)
-# define __far far
-# endif
-# if !defined(__near)
-# define __near near
-# endif
-# endif
-# if defined(__LZO_RENAME_A)
-# if !defined(__cdecl)
-# define __cdecl cdecl
-# endif
-# if !defined(__far)
-# define __far far
-# endif
-# if !defined(__huge)
-# define __huge huge
-# endif
-# if !defined(__near)
-# define __near near
-# endif
-# if !defined(__pascal)
-# define __pascal pascal
-# endif
-# if !defined(__huge)
-# define __huge huge
-# endif
-# elif defined(__LZO_RENAME_B)
-# if !defined(__cdecl)
-# define __cdecl _cdecl
-# endif
-# if !defined(__far)
-# define __far _far
-# endif
-# if !defined(__huge)
-# define __huge _huge
-# endif
-# if !defined(__near)
-# define __near _near
-# endif
-# if !defined(__pascal)
-# define __pascal _pascal
-# endif
-# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
-# if !defined(__cdecl)
-# define __cdecl cdecl
-# endif
-# if !defined(__pascal)
-# define __pascal pascal
-# endif
-# endif
-# undef __LZO_RENAME_A
-# undef __LZO_RENAME_B
-#endif
-#if (UINT_MAX == LZO_0xffffL)
-#if defined(__AZTEC_C__) && defined(__DOS__)
-# define LZO_BROKEN_CDECL_ALT_SYNTAX 1
-#elif defined(_MSC_VER) && defined(MSDOS)
-# if (_MSC_VER < 600)
-# define LZO_BROKEN_INTEGRAL_CONSTANTS 1
-# endif
-# if (_MSC_VER < 700)
-# define LZO_BROKEN_INTEGRAL_PROMOTION 1
-# define LZO_BROKEN_SIZEOF 1
-# endif
-#elif defined(__PACIFIC__) && defined(DOS)
-# define LZO_BROKEN_INTEGRAL_CONSTANTS 1
-#elif defined(__TURBOC__) && defined(__MSDOS__)
-# if (__TURBOC__ < 0x0150)
-# define LZO_BROKEN_CDECL_ALT_SYNTAX 1
-# define LZO_BROKEN_INTEGRAL_CONSTANTS 1
-# define LZO_BROKEN_INTEGRAL_PROMOTION 1
-# endif
-# if (__TURBOC__ < 0x0200)
-# define LZO_BROKEN_SIZEOF 1
-# endif
-# if (__TURBOC__ < 0x0400) && defined(__cplusplus)
-# define LZO_BROKEN_CDECL_ALT_SYNTAX 1
-# endif
-#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
-# define LZO_BROKEN_CDECL_ALT_SYNTAX 1
-# define LZO_BROKEN_SIZEOF 1
-#endif
-#endif
-#if defined(__WATCOMC__) && (__WATCOMC__ < 900)
-# define LZO_BROKEN_INTEGRAL_CONSTANTS 1
-#endif
-#if defined(_CRAY) && defined(_CRAY1)
-# define LZO_BROKEN_SIGNED_RIGHT_SHIFT 1
-#endif
-#define LZO_PP_STRINGIZE(x) #x
-#define LZO_PP_MACRO_EXPAND(x) LZO_PP_STRINGIZE(x)
-#define LZO_PP_CONCAT2(a,b) a ## b
-#define LZO_PP_CONCAT3(a,b,c) a ## b ## c
-#define LZO_PP_CONCAT4(a,b,c,d) a ## b ## c ## d
-#define LZO_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e
-#define LZO_PP_ECONCAT2(a,b) LZO_PP_CONCAT2(a,b)
-#define LZO_PP_ECONCAT3(a,b,c) LZO_PP_CONCAT3(a,b,c)
-#define LZO_PP_ECONCAT4(a,b,c,d) LZO_PP_CONCAT4(a,b,c,d)
-#define LZO_PP_ECONCAT5(a,b,c,d,e) LZO_PP_CONCAT5(a,b,c,d,e)
-#if 1
-#define LZO_CPP_STRINGIZE(x) #x
-#define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x)
-#define LZO_CPP_CONCAT2(a,b) a ## b
-#define LZO_CPP_CONCAT3(a,b,c) a ## b ## c
-#define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d
-#define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e
-#define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b)
-#define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c)
-#define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d)
-#define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e)
-#endif
-#define __LZO_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o))
-#if 1 && defined(__cplusplus)
-# if !defined(__STDC_CONSTANT_MACROS)
-# define __STDC_CONSTANT_MACROS 1
-# endif
-# if !defined(__STDC_LIMIT_MACROS)
-# define __STDC_LIMIT_MACROS 1
-# endif
-#endif
-#if defined(__cplusplus)
-# define LZO_EXTERN_C extern "C"
-#else
-# define LZO_EXTERN_C extern
-#endif
-#if !defined(__LZO_OS_OVERRIDE)
-#if defined(LZO_OS_FREESTANDING)
-# define LZO_INFO_OS "freestanding"
-#elif defined(LZO_OS_EMBEDDED)
-# define LZO_INFO_OS "embedded"
-#elif 1 && defined(__IAR_SYSTEMS_ICC__)
-# define LZO_OS_EMBEDDED 1
-# define LZO_INFO_OS "embedded"
-#elif defined(__CYGWIN__) && defined(__GNUC__)
-# define LZO_OS_CYGWIN 1
-# define LZO_INFO_OS "cygwin"
-#elif defined(__EMX__) && defined(__GNUC__)
-# define LZO_OS_EMX 1
-# define LZO_INFO_OS "emx"
-#elif defined(__BEOS__)
-# define LZO_OS_BEOS 1
-# define LZO_INFO_OS "beos"
-#elif defined(__Lynx__)
-# define LZO_OS_LYNXOS 1
-# define LZO_INFO_OS "lynxos"
-#elif defined(__OS400__)
-# define LZO_OS_OS400 1
-# define LZO_INFO_OS "os400"
-#elif defined(__QNX__)
-# define LZO_OS_QNX 1
-# define LZO_INFO_OS "qnx"
-#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460)
-# define LZO_OS_DOS32 1
-# define LZO_INFO_OS "dos32"
-#elif defined(__BORLANDC__) && defined(__DPMI16__)
-# define LZO_OS_DOS16 1
-# define LZO_INFO_OS "dos16"
-#elif defined(__ZTC__) && defined(DOS386)
-# define LZO_OS_DOS32 1
-# define LZO_INFO_OS "dos32"
-#elif defined(__OS2__) || defined(__OS2V2__)
-# if (UINT_MAX == LZO_0xffffL)
-# define LZO_OS_OS216 1
-# define LZO_INFO_OS "os216"
-# elif (UINT_MAX == LZO_0xffffffffL)
-# define LZO_OS_OS2 1
-# define LZO_INFO_OS "os2"
-# else
-# error "check your limits.h header"
-# endif
-#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64)
-# define LZO_OS_WIN64 1
-# define LZO_INFO_OS "win64"
-#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__)
-# define LZO_OS_WIN32 1
-# define LZO_INFO_OS "win32"
-#elif defined(__MWERKS__) && defined(__INTEL__)
-# define LZO_OS_WIN32 1
-# define LZO_INFO_OS "win32"
-#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows)
-# if (UINT_MAX == LZO_0xffffL)
-# define LZO_OS_WIN16 1
-# define LZO_INFO_OS "win16"
-# elif (UINT_MAX == LZO_0xffffffffL)
-# define LZO_OS_WIN32 1
-# define LZO_INFO_OS "win32"
-# else
-# error "check your limits.h header"
-# endif
-#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS))
-# if (UINT_MAX == LZO_0xffffL)
-# define LZO_OS_DOS16 1
-# define LZO_INFO_OS "dos16"
-# elif (UINT_MAX == LZO_0xffffffffL)
-# define LZO_OS_DOS32 1
-# define LZO_INFO_OS "dos32"
-# else
-# error "check your limits.h header"
-# endif
-#elif defined(__WATCOMC__)
-# if defined(__NT__) && (UINT_MAX == LZO_0xffffL)
-# define LZO_OS_DOS16 1
-# define LZO_INFO_OS "dos16"
-# elif defined(__NT__) && (__WATCOMC__ < 1100)
-# define LZO_OS_WIN32 1
-# define LZO_INFO_OS "win32"
-# elif defined(__linux__) || defined(__LINUX__)
-# define LZO_OS_POSIX 1
-# define LZO_INFO_OS "posix"
-# else
-# error "please specify a target using the -bt compiler option"
-# endif
-#elif defined(__palmos__)
-# define LZO_OS_PALMOS 1
-# define LZO_INFO_OS "palmos"
-#elif defined(__TOS__) || defined(__atarist__)
-# define LZO_OS_TOS 1
-# define LZO_INFO_OS "tos"
-#elif defined(macintosh) && !defined(__ppc__)
-# define LZO_OS_MACCLASSIC 1
-# define LZO_INFO_OS "macclassic"
-#elif defined(__VMS)
-# define LZO_OS_VMS 1
-# define LZO_INFO_OS "vms"
-#elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
-# define LZO_OS_CONSOLE 1
-# define LZO_OS_CONSOLE_PS2 1
-# define LZO_INFO_OS "console"
-# define LZO_INFO_OS_CONSOLE "ps2"
-#elif (defined(__mips__) && defined(__psp__))
-# define LZO_OS_CONSOLE 1
-# define LZO_OS_CONSOLE_PSP 1
-# define LZO_INFO_OS "console"
-# define LZO_INFO_OS_CONSOLE "psp"
-#else
-# define LZO_OS_POSIX 1
-# define LZO_INFO_OS "posix"
-#endif
-#if (LZO_OS_POSIX)
-# if defined(_AIX) || defined(__AIX__) || defined(__aix__)
-# define LZO_OS_POSIX_AIX 1
-# define LZO_INFO_OS_POSIX "aix"
-# elif defined(__FreeBSD__)
-# define LZO_OS_POSIX_FREEBSD 1
-# define LZO_INFO_OS_POSIX "freebsd"
-# elif defined(__hpux__) || defined(__hpux)
-# define LZO_OS_POSIX_HPUX 1
-# define LZO_INFO_OS_POSIX "hpux"
-# elif defined(__INTERIX)
-# define LZO_OS_POSIX_INTERIX 1
-# define LZO_INFO_OS_POSIX "interix"
-# elif defined(__IRIX__) || defined(__irix__)
-# define LZO_OS_POSIX_IRIX 1
-# define LZO_INFO_OS_POSIX "irix"
-# elif defined(__linux__) || defined(__linux) || defined(__LINUX__)
-# define LZO_OS_POSIX_LINUX 1
-# define LZO_INFO_OS_POSIX "linux"
-# elif defined(__APPLE__) || defined(__MACOS__)
-# define LZO_OS_POSIX_MACOSX 1
-# define LZO_INFO_OS_POSIX "macosx"
-# elif defined(__minix__) || defined(__minix)
-# define LZO_OS_POSIX_MINIX 1
-# define LZO_INFO_OS_POSIX "minix"
-# elif defined(__NetBSD__)
-# define LZO_OS_POSIX_NETBSD 1
-# define LZO_INFO_OS_POSIX "netbsd"
-# elif defined(__OpenBSD__)
-# define LZO_OS_POSIX_OPENBSD 1
-# define LZO_INFO_OS_POSIX "openbsd"
-# elif defined(__osf__)
-# define LZO_OS_POSIX_OSF 1
-# define LZO_INFO_OS_POSIX "osf"
-# elif defined(__solaris__) || defined(__sun)
-# if defined(__SVR4) || defined(__svr4__)
-# define LZO_OS_POSIX_SOLARIS 1
-# define LZO_INFO_OS_POSIX "solaris"
-# else
-# define LZO_OS_POSIX_SUNOS 1
-# define LZO_INFO_OS_POSIX "sunos"
-# endif
-# elif defined(__ultrix__) || defined(__ultrix)
-# define LZO_OS_POSIX_ULTRIX 1
-# define LZO_INFO_OS_POSIX "ultrix"
-# elif defined(_UNICOS)
-# define LZO_OS_POSIX_UNICOS 1
-# define LZO_INFO_OS_POSIX "unicos"
-# else
-# define LZO_OS_POSIX_UNKNOWN 1
-# define LZO_INFO_OS_POSIX "unknown"
-# endif
-#endif
-#endif
-#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
-# if (UINT_MAX != LZO_0xffffL)
-# error "this should not happen"
-# endif
-# if (ULONG_MAX != LZO_0xffffffffL)
-# error "this should not happen"
-# endif
-#endif
-#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64)
-# if (UINT_MAX != LZO_0xffffffffL)
-# error "this should not happen"
-# endif
-# if (ULONG_MAX != LZO_0xffffffffL)
-# error "this should not happen"
-# endif
-#endif
-#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__)
-# define LZO_CC_CILLY 1
-# define LZO_INFO_CC "Cilly"
-# if defined(__CILLY__)
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CILLY__)
-# else
-# define LZO_INFO_CCVER "unknown"
-# endif
-#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__)
-# define LZO_CC_SDCC 1
-# define LZO_INFO_CC "sdcc"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(SDCC)
-#elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__)
-# define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__)
-# define LZO_INFO_CC "Pathscale C"
-# define LZO_INFO_CCVER __PATHSCALE__
-#elif defined(__INTEL_COMPILER)
-# define LZO_CC_INTELC 1
-# define LZO_INFO_CC "Intel C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__INTEL_COMPILER)
-# if defined(_WIN32) || defined(_WIN64)
-# define LZO_CC_SYNTAX_MSC 1
-# else
-# define LZO_CC_SYNTAX_GNUC 1
-# endif
-#elif defined(__POCC__) && defined(_WIN32)
-# define LZO_CC_PELLESC 1
-# define LZO_INFO_CC "Pelles C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__)
-#elif defined(__llvm__) && defined(__GNUC__) && defined(__VERSION__)
-# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
-# define LZO_CC_LLVM (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
-# else
-# define LZO_CC_LLVM (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
-# endif
-# define LZO_INFO_CC "llvm-gcc"
-# define LZO_INFO_CCVER __VERSION__
-#elif defined(__GNUC__) && defined(__VERSION__)
-# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
-# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
-# elif defined(__GNUC_MINOR__)
-# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
-# else
-# define LZO_CC_GNUC (__GNUC__ * 0x10000L)
-# endif
-# define LZO_INFO_CC "gcc"
-# define LZO_INFO_CCVER __VERSION__
-#elif defined(__ACK__) && defined(_ACK)
-# define LZO_CC_ACK 1
-# define LZO_INFO_CC "Amsterdam Compiler Kit C"
-# define LZO_INFO_CCVER "unknown"
-#elif defined(__AZTEC_C__)
-# define LZO_CC_AZTECC 1
-# define LZO_INFO_CC "Aztec C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__)
-#elif defined(__BORLANDC__)
-# define LZO_CC_BORLANDC 1
-# define LZO_INFO_CC "Borland C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__BORLANDC__)
-#elif defined(_CRAYC) && defined(_RELEASE)
-# define LZO_CC_CRAYC 1
-# define LZO_INFO_CC "Cray C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_RELEASE)
-#elif defined(__DMC__) && defined(__SC__)
-# define LZO_CC_DMC 1
-# define LZO_INFO_CC "Digital Mars C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DMC__)
-#elif defined(__DECC)
-# define LZO_CC_DECC 1
-# define LZO_INFO_CC "DEC C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DECC)
-#elif defined(__HIGHC__)
-# define LZO_CC_HIGHC 1
-# define LZO_INFO_CC "MetaWare High C"
-# define LZO_INFO_CCVER "unknown"
-#elif defined(__IAR_SYSTEMS_ICC__)
-# define LZO_CC_IARC 1
-# define LZO_INFO_CC "IAR C"
-# if defined(__VER__)
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__VER__)
-# else
-# define LZO_INFO_CCVER "unknown"
-# endif
-#elif defined(__IBMC__)
-# define LZO_CC_IBMC 1
-# define LZO_INFO_CC "IBM C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMC__)
-#elif defined(__KEIL__) && defined(__C166__)
-# define LZO_CC_KEILC 1
-# define LZO_INFO_CC "Keil C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__C166__)
-#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL)
-# define LZO_CC_LCCWIN32 1
-# define LZO_INFO_CC "lcc-win32"
-# define LZO_INFO_CCVER "unknown"
-#elif defined(__LCC__)
-# define LZO_CC_LCC 1
-# define LZO_INFO_CC "lcc"
-# if defined(__LCC_VERSION__)
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__LCC_VERSION__)
-# else
-# define LZO_INFO_CCVER "unknown"
-# endif
-#elif defined(_MSC_VER)
-# define LZO_CC_MSC 1
-# define LZO_INFO_CC "Microsoft C"
-# if defined(_MSC_FULL_VER)
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER)
-# else
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER)
-# endif
-#elif defined(__MWERKS__)
-# define LZO_CC_MWERKS 1
-# define LZO_INFO_CC "Metrowerks C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__MWERKS__)
-#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386)
-# define LZO_CC_NDPC 1
-# define LZO_INFO_CC "Microway NDP C"
-# define LZO_INFO_CCVER "unknown"
-#elif defined(__PACIFIC__)
-# define LZO_CC_PACIFICC 1
-# define LZO_INFO_CC "Pacific C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PACIFIC__)
-#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__))
-# define LZO_CC_PGI 1
-# define LZO_INFO_CC "Portland Group PGI C"
-# define LZO_INFO_CCVER "unknown"
-#elif defined(__PUREC__) && defined(__TOS__)
-# define LZO_CC_PUREC 1
-# define LZO_INFO_CC "Pure C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PUREC__)
-#elif defined(__SC__) && defined(__ZTC__)
-# define LZO_CC_SYMANTECC 1
-# define LZO_INFO_CC "Symantec C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SC__)
-#elif defined(__SUNPRO_C)
-# define LZO_INFO_CC "SunPro C"
-# if ((__SUNPRO_C)+0 > 0)
-# define LZO_CC_SUNPROC __SUNPRO_C
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_C)
-# else
-# define LZO_CC_SUNPROC 1
-# define LZO_INFO_CCVER "unknown"
-# endif
-#elif defined(__SUNPRO_CC)
-# define LZO_INFO_CC "SunPro C"
-# if ((__SUNPRO_CC)+0 > 0)
-# define LZO_CC_SUNPROC __SUNPRO_CC
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_CC)
-# else
-# define LZO_CC_SUNPROC 1
-# define LZO_INFO_CCVER "unknown"
-# endif
-#elif defined(__TINYC__)
-# define LZO_CC_TINYC 1
-# define LZO_INFO_CC "Tiny C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TINYC__)
-#elif defined(__TSC__)
-# define LZO_CC_TOPSPEEDC 1
-# define LZO_INFO_CC "TopSpeed C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TSC__)
-#elif defined(__WATCOMC__)
-# define LZO_CC_WATCOMC 1
-# define LZO_INFO_CC "Watcom C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__WATCOMC__)
-#elif defined(__TURBOC__)
-# define LZO_CC_TURBOC 1
-# define LZO_INFO_CC "Turbo C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TURBOC__)
-#elif defined(__ZTC__)
-# define LZO_CC_ZORTECHC 1
-# define LZO_INFO_CC "Zortech C"
-# if (__ZTC__ == 0x310)
-# define LZO_INFO_CCVER "0x310"
-# else
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ZTC__)
-# endif
-#else
-# define LZO_CC_UNKNOWN 1
-# define LZO_INFO_CC "unknown"
-# define LZO_INFO_CCVER "unknown"
-#endif
-#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER)
-# error "LZO_CC_MSC: _MSC_FULL_VER is not defined"
-#endif
-#if !defined(__LZO_ARCH_OVERRIDE) && !defined(LZO_ARCH_GENERIC) && defined(_CRAY)
-# if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY)
-# if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E)
-# define LZO_ARCH_CRAY_MPP 1
-# elif defined(_CRAY1)
-# define LZO_ARCH_CRAY_PVP 1
-# endif
-# endif
-#endif
-#if !defined(__LZO_ARCH_OVERRIDE)
-#if defined(LZO_ARCH_GENERIC)
-# define LZO_INFO_ARCH "generic"
-#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
-# define LZO_ARCH_I086 1
-# define LZO_ARCH_IA16 1
-# define LZO_INFO_ARCH "i086"
-#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA)
-# define LZO_ARCH_ALPHA 1
-# define LZO_INFO_ARCH "alpha"
-#elif (LZO_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E))
-# define LZO_ARCH_ALPHA 1
-# define LZO_INFO_ARCH "alpha"
-#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)
-# define LZO_ARCH_AMD64 1
-# define LZO_INFO_ARCH "amd64"
-#elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB))
-# define LZO_ARCH_ARM 1
-# define LZO_ARCH_ARM_THUMB 1
-# define LZO_INFO_ARCH "arm_thumb"
-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__)
-# define LZO_ARCH_ARM 1
-# if defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 1)
-# define LZO_ARCH_ARM_THUMB 1
-# define LZO_INFO_ARCH "arm_thumb"
-# elif defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 2)
-# define LZO_INFO_ARCH "arm"
-# else
-# define LZO_INFO_ARCH "arm"
-# endif
-#elif defined(__arm__) || defined(_M_ARM)
-# define LZO_ARCH_ARM 1
-# define LZO_INFO_ARCH "arm"
-#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__)
-# define LZO_ARCH_AVR 1
-# define LZO_INFO_ARCH "avr"
-#elif defined(__bfin__)
-# define LZO_ARCH_BLACKFIN 1
-# define LZO_INFO_ARCH "blackfin"
-#elif (UINT_MAX == LZO_0xffffL) && defined(__C166__)
-# define LZO_ARCH_C166 1
-# define LZO_INFO_ARCH "c166"
-#elif defined(__cris__)
-# define LZO_ARCH_CRIS 1
-# define LZO_INFO_ARCH "cris"
-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__)
-# define LZO_ARCH_EZ80 1
-# define LZO_INFO_ARCH "ez80"
-#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
-# define LZO_ARCH_H8300 1
-# define LZO_INFO_ARCH "h8300"
-#elif defined(__hppa__) || defined(__hppa)
-# define LZO_ARCH_HPPA 1
-# define LZO_INFO_ARCH "hppa"
-#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386)
-# define LZO_ARCH_I386 1
-# define LZO_ARCH_IA32 1
-# define LZO_INFO_ARCH "i386"
-#elif (LZO_CC_ZORTECHC && defined(__I86__))
-# define LZO_ARCH_I386 1
-# define LZO_ARCH_IA32 1
-# define LZO_INFO_ARCH "i386"
-#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386)
-# define LZO_ARCH_I386 1
-# define LZO_ARCH_IA32 1
-# define LZO_INFO_ARCH "i386"
-#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64)
-# define LZO_ARCH_IA64 1
-# define LZO_INFO_ARCH "ia64"
-#elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__)
-# define LZO_ARCH_M16C 1
-# define LZO_INFO_ARCH "m16c"
-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__)
-# define LZO_ARCH_M16C 1
-# define LZO_INFO_ARCH "m16c"
-#elif defined(__m32r__)
-# define LZO_ARCH_M32R 1
-# define LZO_INFO_ARCH "m32r"
-#elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K)
-# define LZO_ARCH_M68K 1
-# define LZO_INFO_ARCH "m68k"
-#elif (UINT_MAX == LZO_0xffffL) && defined(__C251__)
-# define LZO_ARCH_MCS251 1
-# define LZO_INFO_ARCH "mcs251"
-#elif (UINT_MAX == LZO_0xffffL) && defined(__C51__)
-# define LZO_ARCH_MCS51 1
-# define LZO_INFO_ARCH "mcs51"
-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__)
-# define LZO_ARCH_MCS51 1
-# define LZO_INFO_ARCH "mcs51"
-#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000)
-# define LZO_ARCH_MIPS 1
-# define LZO_INFO_ARCH "mips"
-#elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__)
-# define LZO_ARCH_MSP430 1
-# define LZO_INFO_ARCH "msp430"
-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__)
-# define LZO_ARCH_MSP430 1
-# define LZO_INFO_ARCH "msp430"
-#elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR)
-# define LZO_ARCH_POWERPC 1
-# define LZO_INFO_ARCH "powerpc"
-#elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x)
-# define LZO_ARCH_S390 1
-# define LZO_INFO_ARCH "s390"
-#elif defined(__sh__) || defined(_M_SH)
-# define LZO_ARCH_SH 1
-# define LZO_INFO_ARCH "sh"
-#elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8)
-# define LZO_ARCH_SPARC 1
-# define LZO_INFO_ARCH "sparc"
-#elif defined(__SPU__)
-# define LZO_ARCH_SPU 1
-# define LZO_INFO_ARCH "spu"
-#elif (UINT_MAX == LZO_0xffffL) && defined(__z80)
-# define LZO_ARCH_Z80 1
-# define LZO_INFO_ARCH "z80"
-#elif (LZO_ARCH_CRAY_PVP)
-# if defined(_CRAYSV1)
-# define LZO_ARCH_CRAY_SV1 1
-# define LZO_INFO_ARCH "cray_sv1"
-# elif (_ADDR64)
-# define LZO_ARCH_CRAY_T90 1
-# define LZO_INFO_ARCH "cray_t90"
-# elif (_ADDR32)
-# define LZO_ARCH_CRAY_YMP 1
-# define LZO_INFO_ARCH "cray_ymp"
-# else
-# define LZO_ARCH_CRAY_XMP 1
-# define LZO_INFO_ARCH "cray_xmp"
-# endif
-#else
-# define LZO_ARCH_UNKNOWN 1
-# define LZO_INFO_ARCH "unknown"
-#endif
-#endif
-#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2)
-# error "FIXME - missing define for CPU architecture"
-#endif
-#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32)
-# error "FIXME - missing WIN32 define for CPU architecture"
-#endif
-#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64)
-# error "FIXME - missing WIN64 define for CPU architecture"
-#endif
-#if (LZO_OS_OS216 || LZO_OS_WIN16)
-# define LZO_ARCH_I086PM 1
-# define LZO_ARCH_IA16PM 1
-#elif 1 && (LZO_OS_DOS16 && defined(BLX286))
-# define LZO_ARCH_I086PM 1
-# define LZO_ARCH_IA16PM 1
-#elif 1 && (LZO_OS_DOS16 && defined(DOSX286))
-# define LZO_ARCH_I086PM 1
-# define LZO_ARCH_IA16PM 1
-#elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__))
-# define LZO_ARCH_I086PM 1
-# define LZO_ARCH_IA16PM 1
-#endif
-#if defined(LZO_ARCH_ARM_THUMB) && !defined(LZO_ARCH_ARM)
-# error "this should not happen"
-#endif
-#if defined(LZO_ARCH_I086PM) && !defined(LZO_ARCH_I086)
-# error "this should not happen"
-#endif
-#if (LZO_ARCH_I086)
-# if (UINT_MAX != LZO_0xffffL)
-# error "this should not happen"
-# endif
-# if (ULONG_MAX != LZO_0xffffffffL)
-# error "this should not happen"
-# endif
-#endif
-#if (LZO_ARCH_I386)
-# if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__)
-# error "this should not happen"
-# endif
-# if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__)
-# error "this should not happen"
-# endif
-# if (ULONG_MAX != LZO_0xffffffffL)
-# error "this should not happen"
-# endif
-#endif
-#if !defined(__LZO_MM_OVERRIDE)
-#if (LZO_ARCH_I086)
-#if (UINT_MAX != LZO_0xffffL)
-# error "this should not happen"
-#endif
-#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM)
-# define LZO_MM_TINY 1
-#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM)
-# define LZO_MM_HUGE 1
-#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL)
-# define LZO_MM_SMALL 1
-#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM)
-# define LZO_MM_MEDIUM 1
-#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM)
-# define LZO_MM_COMPACT 1
-#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL)
-# define LZO_MM_LARGE 1
-#elif (LZO_CC_AZTECC)
-# if defined(_LARGE_CODE) && defined(_LARGE_DATA)
-# define LZO_MM_LARGE 1
-# elif defined(_LARGE_CODE)
-# define LZO_MM_MEDIUM 1
-# elif defined(_LARGE_DATA)
-# define LZO_MM_COMPACT 1
-# else
-# define LZO_MM_SMALL 1
-# endif
-#elif (LZO_CC_ZORTECHC && defined(__VCM__))
-# define LZO_MM_LARGE 1
-#else
-# error "unknown memory model"
-#endif
-#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
-#define LZO_HAVE_MM_HUGE_PTR 1
-#define LZO_HAVE_MM_HUGE_ARRAY 1
-#if (LZO_MM_TINY)
-# undef LZO_HAVE_MM_HUGE_ARRAY
-#endif
-#if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC)
-# undef LZO_HAVE_MM_HUGE_PTR
-# undef LZO_HAVE_MM_HUGE_ARRAY
-#elif (LZO_CC_DMC || LZO_CC_SYMANTECC)
-# undef LZO_HAVE_MM_HUGE_ARRAY
-#elif (LZO_CC_MSC && defined(_QC))
-# undef LZO_HAVE_MM_HUGE_ARRAY
-# if (_MSC_VER < 600)
-# undef LZO_HAVE_MM_HUGE_PTR
-# endif
-#elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295))
-# undef LZO_HAVE_MM_HUGE_ARRAY
-#endif
-#if (LZO_ARCH_I086PM) && !defined(LZO_HAVE_MM_HUGE_PTR)
-# if (LZO_OS_DOS16)
-# error "this should not happen"
-# elif (LZO_CC_ZORTECHC)
-# else
-# error "this should not happen"
-# endif
-#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200))
- extern void __near __cdecl _AHSHIFT(void);
-# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT)
-#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC)
- extern void __near __cdecl _AHSHIFT(void);
-# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT)
-#elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC)
- extern void __near __cdecl _AHSHIFT(void);
-# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT)
-#elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295))
- extern void __near __cdecl _AHSHIFT(void);
-# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT)
-#elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16)
-# define LZO_MM_AHSHIFT 12
-#elif (LZO_CC_WATCOMC)
- extern unsigned char _HShift;
-# define LZO_MM_AHSHIFT ((unsigned) _HShift)
-#else
-# error "FIXME - implement LZO_MM_AHSHIFT"
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-#elif (LZO_ARCH_C166)
-#if !defined(__MODEL__)
-# error "FIXME - C166 __MODEL__"
-#elif ((__MODEL__) == 0)
-# define LZO_MM_SMALL 1
-#elif ((__MODEL__) == 1)
-# define LZO_MM_SMALL 1
-#elif ((__MODEL__) == 2)
-# define LZO_MM_LARGE 1
-#elif ((__MODEL__) == 3)
-# define LZO_MM_TINY 1
-#elif ((__MODEL__) == 4)
-# define LZO_MM_XTINY 1
-#elif ((__MODEL__) == 5)
-# define LZO_MM_XSMALL 1
-#else
-# error "FIXME - C166 __MODEL__"
-#endif
-#elif (LZO_ARCH_MCS251)
-#if !defined(__MODEL__)
-# error "FIXME - MCS251 __MODEL__"
-#elif ((__MODEL__) == 0)
-# define LZO_MM_SMALL 1
-#elif ((__MODEL__) == 2)
-# define LZO_MM_LARGE 1
-#elif ((__MODEL__) == 3)
-# define LZO_MM_TINY 1
-#elif ((__MODEL__) == 4)
-# define LZO_MM_XTINY 1
-#elif ((__MODEL__) == 5)
-# define LZO_MM_XSMALL 1
-#else
-# error "FIXME - MCS251 __MODEL__"
-#endif
-#elif (LZO_ARCH_MCS51)
-#if !defined(__MODEL__)
-# error "FIXME - MCS51 __MODEL__"
-#elif ((__MODEL__) == 1)
-# define LZO_MM_SMALL 1
-#elif ((__MODEL__) == 2)
-# define LZO_MM_LARGE 1
-#elif ((__MODEL__) == 3)
-# define LZO_MM_TINY 1
-#elif ((__MODEL__) == 4)
-# define LZO_MM_XTINY 1
-#elif ((__MODEL__) == 5)
-# define LZO_MM_XSMALL 1
-#else
-# error "FIXME - MCS51 __MODEL__"
-#endif
-#elif (LZO_ARCH_CRAY_PVP)
-# define LZO_MM_PVP 1
-#else
-# define LZO_MM_FLAT 1
-#endif
-#if (LZO_MM_COMPACT)
-# define LZO_INFO_MM "compact"
-#elif (LZO_MM_FLAT)
-# define LZO_INFO_MM "flat"
-#elif (LZO_MM_HUGE)
-# define LZO_INFO_MM "huge"
-#elif (LZO_MM_LARGE)
-# define LZO_INFO_MM "large"
-#elif (LZO_MM_MEDIUM)
-# define LZO_INFO_MM "medium"
-#elif (LZO_MM_PVP)
-# define LZO_INFO_MM "pvp"
-#elif (LZO_MM_SMALL)
-# define LZO_INFO_MM "small"
-#elif (LZO_MM_TINY)
-# define LZO_INFO_MM "tiny"
-#else
-# error "unknown memory model"
-#endif
-#endif
-#if defined(SIZEOF_SHORT)
-# define LZO_SIZEOF_SHORT (SIZEOF_SHORT)
-#endif
-#if defined(SIZEOF_INT)
-# define LZO_SIZEOF_INT (SIZEOF_INT)
-#endif
-#if defined(SIZEOF_LONG)
-# define LZO_SIZEOF_LONG (SIZEOF_LONG)
-#endif
-#if defined(SIZEOF_LONG_LONG)
-# define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG)
-#endif
-#if defined(SIZEOF___INT16)
-# define LZO_SIZEOF___INT16 (SIZEOF___INT16)
-#endif
-#if defined(SIZEOF___INT32)
-# define LZO_SIZEOF___INT32 (SIZEOF___INT32)
-#endif
-#if defined(SIZEOF___INT64)
-# define LZO_SIZEOF___INT64 (SIZEOF___INT64)
-#endif
-#if defined(SIZEOF_VOID_P)
-# define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P)
-#endif
-#if defined(SIZEOF_SIZE_T)
-# define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T)
-#endif
-#if defined(SIZEOF_PTRDIFF_T)
-# define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T)
-#endif
-#define __LZO_LSR(x,b) (((x)+0ul) >> (b))
-#if !defined(LZO_SIZEOF_SHORT)
-# if (LZO_ARCH_CRAY_PVP)
-# define LZO_SIZEOF_SHORT 8
-# elif (USHRT_MAX == LZO_0xffffL)
-# define LZO_SIZEOF_SHORT 2
-# elif (__LZO_LSR(USHRT_MAX,7) == 1)
-# define LZO_SIZEOF_SHORT 1
-# elif (__LZO_LSR(USHRT_MAX,15) == 1)
-# define LZO_SIZEOF_SHORT 2
-# elif (__LZO_LSR(USHRT_MAX,31) == 1)
-# define LZO_SIZEOF_SHORT 4
-# elif (__LZO_LSR(USHRT_MAX,63) == 1)
-# define LZO_SIZEOF_SHORT 8
-# elif (__LZO_LSR(USHRT_MAX,127) == 1)
-# define LZO_SIZEOF_SHORT 16
-# else
-# error "LZO_SIZEOF_SHORT"
-# endif
-#endif
-#if !defined(LZO_SIZEOF_INT)
-# if (LZO_ARCH_CRAY_PVP)
-# define LZO_SIZEOF_INT 8
-# elif (UINT_MAX == LZO_0xffffL)
-# define LZO_SIZEOF_INT 2
-# elif (UINT_MAX == LZO_0xffffffffL)
-# define LZO_SIZEOF_INT 4
-# elif (__LZO_LSR(UINT_MAX,7) == 1)
-# define LZO_SIZEOF_INT 1
-# elif (__LZO_LSR(UINT_MAX,15) == 1)
-# define LZO_SIZEOF_INT 2
-# elif (__LZO_LSR(UINT_MAX,31) == 1)
-# define LZO_SIZEOF_INT 4
-# elif (__LZO_LSR(UINT_MAX,63) == 1)
-# define LZO_SIZEOF_INT 8
-# elif (__LZO_LSR(UINT_MAX,127) == 1)
-# define LZO_SIZEOF_INT 16
-# else
-# error "LZO_SIZEOF_INT"
-# endif
-#endif
-#if !defined(LZO_SIZEOF_LONG)
-# if (ULONG_MAX == LZO_0xffffffffL)
-# define LZO_SIZEOF_LONG 4
-# elif (__LZO_LSR(ULONG_MAX,7) == 1)
-# define LZO_SIZEOF_LONG 1
-# elif (__LZO_LSR(ULONG_MAX,15) == 1)
-# define LZO_SIZEOF_LONG 2
-# elif (__LZO_LSR(ULONG_MAX,31) == 1)
-# define LZO_SIZEOF_LONG 4
-# elif (__LZO_LSR(ULONG_MAX,63) == 1)
-# define LZO_SIZEOF_LONG 8
-# elif (__LZO_LSR(ULONG_MAX,127) == 1)
-# define LZO_SIZEOF_LONG 16
-# else
-# error "LZO_SIZEOF_LONG"
-# endif
-#endif
-#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64)
-#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8)
-# if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__)
-# if (LZO_CC_GNUC >= 0x030300ul)
-# if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0)
-# define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG
-# elif (__LZO_LSR(__LONG_LONG_MAX__,30) == 1)
-# define LZO_SIZEOF_LONG_LONG 4
-# endif
-# endif
-# endif
-#endif
-#endif
-#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64)
-#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8)
-#if (LZO_ARCH_I086 && LZO_CC_DMC)
-#elif (LZO_CC_CILLY) && defined(__GNUC__)
-# define LZO_SIZEOF_LONG_LONG 8
-#elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define LZO_SIZEOF_LONG_LONG 8
-#elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400))
-# define LZO_SIZEOF_LONG_LONG 8
-#elif (LZO_OS_WIN64 || defined(_WIN64))
-# define LZO_SIZEOF___INT64 8
-#elif (LZO_ARCH_I386 && (LZO_CC_DMC))
-# define LZO_SIZEOF_LONG_LONG 8
-#elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700)))
-# define LZO_SIZEOF_LONG_LONG 8
-#elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__)))
-# define LZO_SIZEOF_LONG_LONG 8
-#elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI || LZO_CC_SUNPROC))
-# define LZO_SIZEOF_LONG_LONG 8
-#elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC))
-# define LZO_SIZEOF___INT64 8
-#elif ((LZO_OS_WIN32 || defined(_WIN32)) && (LZO_CC_MSC))
-# define LZO_SIZEOF___INT64 8
-#elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520)))
-# define LZO_SIZEOF___INT64 8
-#elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100)))
-# define LZO_SIZEOF___INT64 8
-#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64))
-# define LZO_SIZEOF___INT64 8
-#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__)
-# define LZO_SIZEOF_LONG_LONG 8
-#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
-# define LZO_SIZEOF_LONG_LONG 8
-#elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2)
-#elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
-# define LZO_SIZEOF_LONG_LONG 8
-#endif
-#endif
-#endif
-#if defined(__cplusplus) && defined(LZO_CC_GNUC)
-# if (LZO_CC_GNUC < 0x020800ul)
-# undef LZO_SIZEOF_LONG_LONG
-# endif
-#endif
-#if defined(LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG)
-# undef LZO_SIZEOF_LONG_LONG
-#endif
-#if !defined(LZO_SIZEOF_VOID_P)
-#if (LZO_ARCH_I086)
-# define __LZO_WORDSIZE 2
-# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM)
-# define LZO_SIZEOF_VOID_P 2
-# elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE)
-# define LZO_SIZEOF_VOID_P 4
-# else
-# error "LZO_MM"
-# endif
-#elif (LZO_ARCH_AVR || LZO_ARCH_Z80)
-# define __LZO_WORDSIZE 1
-# define LZO_SIZEOF_VOID_P 2
-#elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430)
-# define LZO_SIZEOF_VOID_P 2
-#elif (LZO_ARCH_H8300)
-# if defined(__NORMAL_MODE__)
-# define __LZO_WORDSIZE 4
-# define LZO_SIZEOF_VOID_P 2
-# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
-# define __LZO_WORDSIZE 4
-# define LZO_SIZEOF_VOID_P 4
-# else
-# define __LZO_WORDSIZE 2
-# define LZO_SIZEOF_VOID_P 2
-# endif
-# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4)
-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT
-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT
-# endif
-#elif (LZO_ARCH_M16C)
-# define __LZO_WORDSIZE 2
-# if defined(__m32c_cpu__) || defined(__m32cm_cpu__)
-# define LZO_SIZEOF_VOID_P 4
-# else
-# define LZO_SIZEOF_VOID_P 2
-# endif
-#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
-# define __LZO_WORDSIZE 8
-# define LZO_SIZEOF_VOID_P 4
-#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64)
-# define __LZO_WORDSIZE 8
-# define LZO_SIZEOF_VOID_P 8
-#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__)
-# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG
-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG
-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG
-#elif (LZO_OS_OS400 || defined(__OS400__))
-# define __LZO_WORDSIZE LZO_SIZEOF_LONG
-# define LZO_SIZEOF_VOID_P 16
-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG
-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG
-#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
-# define LZO_SIZEOF_VOID_P 8
-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG
-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG
-#elif (LZO_ARCH_SPU)
-# if 0
-# define __LZO_WORDSIZE 16
-# endif
-# define LZO_SIZEOF_VOID_P 4
-#else
-# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG
-#endif
-#endif
-#if !defined(LZO_WORDSIZE)
-# if defined(__LZO_WORDSIZE)
-# define LZO_WORDSIZE __LZO_WORDSIZE
-# else
-# define LZO_WORDSIZE LZO_SIZEOF_VOID_P
-# endif
-#endif
-#if !defined(LZO_SIZEOF_SIZE_T)
-#if (LZO_ARCH_I086 || LZO_ARCH_M16C)
-# define LZO_SIZEOF_SIZE_T 2
-#else
-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P
-#endif
-#endif
-#if !defined(LZO_SIZEOF_PTRDIFF_T)
-#if (LZO_ARCH_I086)
-# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE)
-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P
-# elif (LZO_MM_COMPACT || LZO_MM_LARGE)
-# if (LZO_CC_BORLANDC || LZO_CC_TURBOC)
-# define LZO_SIZEOF_PTRDIFF_T 4
-# else
-# define LZO_SIZEOF_PTRDIFF_T 2
-# endif
-# else
-# error "LZO_MM"
-# endif
-#else
-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T
-#endif
-#endif
-#if defined(LZO_ABI_NEUTRAL_ENDIAN)
-# undef LZO_ABI_BIG_ENDIAN
-# undef LZO_ABI_LITTLE_ENDIAN
-#elif !defined(LZO_ABI_BIG_ENDIAN) && !defined(LZO_ABI_LITTLE_ENDIAN)
-#if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP)
-# define LZO_ABI_BIG_ENDIAN 1
-#elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430)
-# define LZO_ABI_LITTLE_ENDIAN 1
-#elif (LZO_ARCH_M68K || LZO_ARCH_S390)
-# define LZO_ABI_BIG_ENDIAN 1
-#elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__)
-# if (__LITTLE_ENDIAN__ == 1)
-# define LZO_ABI_LITTLE_ENDIAN 1
-# else
-# define LZO_ABI_BIG_ENDIAN 1
-# endif
-#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
-# define LZO_ABI_BIG_ENDIAN 1
-#elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
-# define LZO_ABI_LITTLE_ENDIAN 1
-#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__)
-# define LZO_ABI_BIG_ENDIAN 1
-#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__)
-# define LZO_ABI_LITTLE_ENDIAN 1
-#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__)
-# define LZO_ABI_BIG_ENDIAN 1
-#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__)
-# define LZO_ABI_LITTLE_ENDIAN 1
-#endif
-#endif
-#if defined(LZO_ABI_BIG_ENDIAN) && defined(LZO_ABI_LITTLE_ENDIAN)
-# error "this should not happen"
-#endif
-#if defined(LZO_ABI_BIG_ENDIAN)
-# define LZO_INFO_ABI_ENDIAN "be"
-#elif defined(LZO_ABI_LITTLE_ENDIAN)
-# define LZO_INFO_ABI_ENDIAN "le"
-#elif defined(LZO_ABI_NEUTRAL_ENDIAN)
-# define LZO_INFO_ABI_ENDIAN "neutral"
-#endif
-#if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2)
-# define LZO_ABI_I8LP16 1
-# define LZO_INFO_ABI_PM "i8lp16"
-#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2)
-# define LZO_ABI_ILP16 1
-# define LZO_INFO_ABI_PM "ilp16"
-#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4)
-# define LZO_ABI_ILP32 1
-# define LZO_INFO_ABI_PM "ilp32"
-#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8)
-# define LZO_ABI_LLP64 1
-# define LZO_INFO_ABI_PM "llp64"
-#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8)
-# define LZO_ABI_LP64 1
-# define LZO_INFO_ABI_PM "lp64"
-#elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8)
-# define LZO_ABI_ILP64 1
-# define LZO_INFO_ABI_PM "ilp64"
-#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4)
-# define LZO_ABI_IP32L64 1
-# define LZO_INFO_ABI_PM "ip32l64"
-#endif
-#if !defined(__LZO_LIBC_OVERRIDE)
-#if defined(LZO_LIBC_NAKED)
-# define LZO_INFO_LIBC "naked"
-#elif defined(LZO_LIBC_FREESTANDING)
-# define LZO_INFO_LIBC "freestanding"
-#elif defined(LZO_LIBC_MOSTLY_FREESTANDING)
-# define LZO_INFO_LIBC "mfreestanding"
-#elif defined(LZO_LIBC_ISOC90)
-# define LZO_INFO_LIBC "isoc90"
-#elif defined(LZO_LIBC_ISOC99)
-# define LZO_INFO_LIBC "isoc99"
-#elif defined(__dietlibc__)
-# define LZO_LIBC_DIETLIBC 1
-# define LZO_INFO_LIBC "dietlibc"
-#elif defined(_NEWLIB_VERSION)
-# define LZO_LIBC_NEWLIB 1
-# define LZO_INFO_LIBC "newlib"
-#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__)
-# if defined(__UCLIBC_SUBLEVEL__)
-# define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__)
-# else
-# define LZO_LIBC_UCLIBC 0x00090bL
-# endif
-# define LZO_INFO_LIBC "uclibc"
-#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__)
-# define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100)
-# define LZO_INFO_LIBC "glibc"
-#elif (LZO_CC_MWERKS) && defined(__MSL__)
-# define LZO_LIBC_MSL __MSL__
-# define LZO_INFO_LIBC "msl"
-#elif 1 && defined(__IAR_SYSTEMS_ICC__)
-# define LZO_LIBC_ISOC90 1
-# define LZO_INFO_LIBC "isoc90"
-#else
-# define LZO_LIBC_DEFAULT 1
-# define LZO_INFO_LIBC "default"
-#endif
-#endif
-#if !defined(__lzo_gnuc_extension__)
-#if (LZO_CC_GNUC >= 0x020800ul)
-# define __lzo_gnuc_extension__ __extension__
-#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define __lzo_gnuc_extension__ __extension__
-#else
-# define __lzo_gnuc_extension__
-#endif
-#endif
-#if !defined(__lzo_ua_volatile)
-# define __lzo_ua_volatile volatile
-#endif
-#if !defined(__lzo_alignof)
-#if (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI)
-# define __lzo_alignof(e) __alignof__(e)
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700))
-# define __lzo_alignof(e) __alignof__(e)
-#elif (LZO_CC_MSC && (_MSC_VER >= 1300))
-# define __lzo_alignof(e) __alignof(e)
-#endif
-#endif
-#if defined(__lzo_alignof)
-# define __lzo_HAVE_alignof 1
-#endif
-#if !defined(__lzo_constructor)
-#if (LZO_CC_GNUC >= 0x030400ul)
-# define __lzo_constructor __attribute__((__constructor__,__used__))
-#elif (LZO_CC_GNUC >= 0x020700ul)
-# define __lzo_constructor __attribute__((__constructor__))
-#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define __lzo_constructor __attribute__((__constructor__))
-#endif
-#endif
-#if defined(__lzo_constructor)
-# define __lzo_HAVE_constructor 1
-#endif
-#if !defined(__lzo_destructor)
-#if (LZO_CC_GNUC >= 0x030400ul)
-# define __lzo_destructor __attribute__((__destructor__,__used__))
-#elif (LZO_CC_GNUC >= 0x020700ul)
-# define __lzo_destructor __attribute__((__destructor__))
-#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define __lzo_destructor __attribute__((__destructor__))
-#endif
-#endif
-#if defined(__lzo_destructor)
-# define __lzo_HAVE_destructor 1
-#endif
-#if defined(__lzo_HAVE_destructor) && !defined(__lzo_HAVE_constructor)
-# error "this should not happen"
-#endif
-#if !defined(__lzo_inline)
-#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295))
-#elif defined(__cplusplus)
-# define __lzo_inline inline
-#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550))
-# define __lzo_inline __inline
-#elif (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI)
-# define __lzo_inline __inline__
-#elif (LZO_CC_DMC)
-# define __lzo_inline __inline
-#elif (LZO_CC_INTELC)
-# define __lzo_inline __inline
-#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405))
-# define __lzo_inline __inline
-#elif (LZO_CC_MSC && (_MSC_VER >= 900))
-# define __lzo_inline __inline
-#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
-# define __lzo_inline inline
-#endif
-#endif
-#if defined(__lzo_inline)
-# define __lzo_HAVE_inline 1
-#else
-# define __lzo_inline
-#endif
-#if !defined(__lzo_forceinline)
-#if (LZO_CC_GNUC >= 0x030200ul)
-# define __lzo_forceinline __inline__ __attribute__((__always_inline__))
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC)
-# define __lzo_forceinline __forceinline
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC)
-# define __lzo_forceinline __inline__ __attribute__((__always_inline__))
-#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define __lzo_forceinline __inline__ __attribute__((__always_inline__))
-#elif (LZO_CC_MSC && (_MSC_VER >= 1200))
-# define __lzo_forceinline __forceinline
-#endif
-#endif
-#if defined(__lzo_forceinline)
-# define __lzo_HAVE_forceinline 1
-#else
-# define __lzo_forceinline
-#endif
-#if !defined(__lzo_noinline)
-#if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul)
-# define __lzo_noinline __attribute__((__noinline__,__used__))
-#elif (LZO_CC_GNUC >= 0x030200ul)
-# define __lzo_noinline __attribute__((__noinline__))
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_MSC)
-# define __lzo_noinline __declspec(noinline)
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC)
-# define __lzo_noinline __attribute__((__noinline__))
-#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define __lzo_noinline __attribute__((__noinline__))
-#elif (LZO_CC_MSC && (_MSC_VER >= 1300))
-# define __lzo_noinline __declspec(noinline)
-#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64))
-# if defined(__cplusplus)
-# else
-# define __lzo_noinline __declspec(noinline)
-# endif
-#endif
-#endif
-#if defined(__lzo_noinline)
-# define __lzo_HAVE_noinline 1
-#else
-# define __lzo_noinline
-#endif
-#if (defined(__lzo_HAVE_forceinline) || defined(__lzo_HAVE_noinline)) && !defined(__lzo_HAVE_inline)
-# error "this should not happen"
-#endif
-#if !defined(__lzo_noreturn)
-#if (LZO_CC_GNUC >= 0x020700ul)
-# define __lzo_noreturn __attribute__((__noreturn__))
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC)
-# define __lzo_noreturn __declspec(noreturn)
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC)
-# define __lzo_noreturn __attribute__((__noreturn__))
-#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define __lzo_noreturn __attribute__((__noreturn__))
-#elif (LZO_CC_MSC && (_MSC_VER >= 1200))
-# define __lzo_noreturn __declspec(noreturn)
-#endif
-#endif
-#if defined(__lzo_noreturn)
-# define __lzo_HAVE_noreturn 1
-#else
-# define __lzo_noreturn
-#endif
-#if !defined(__lzo_nothrow)
-#if (LZO_CC_GNUC >= 0x030300ul)
-# define __lzo_nothrow __attribute__((__nothrow__))
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) && defined(__cplusplus)
-# define __lzo_nothrow __declspec(nothrow)
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC)
-# define __lzo_nothrow __attribute__((__nothrow__))
-#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define __lzo_nothrow __attribute__((__nothrow__))
-#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus)
-# define __lzo_nothrow __declspec(nothrow)
-#endif
-#endif
-#if defined(__lzo_nothrow)
-# define __lzo_HAVE_nothrow 1
-#else
-# define __lzo_nothrow
-#endif
-#if !defined(__lzo_restrict)
-#if (LZO_CC_GNUC >= 0x030400ul)
-# define __lzo_restrict __restrict__
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC)
-# define __lzo_restrict __restrict__
-#elif (LZO_CC_LLVM)
-# define __lzo_restrict __restrict__
-#elif (LZO_CC_MSC && (_MSC_VER >= 1400))
-# define __lzo_restrict __restrict
-#endif
-#endif
-#if defined(__lzo_restrict)
-# define __lzo_HAVE_restrict 1
-#else
-# define __lzo_restrict
-#endif
-#if !defined(__lzo_likely) && !defined(__lzo_unlikely)
-#if (LZO_CC_GNUC >= 0x030200ul)
-# define __lzo_likely(e) (__builtin_expect(!!(e),1))
-# define __lzo_unlikely(e) (__builtin_expect(!!(e),0))
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800))
-# define __lzo_likely(e) (__builtin_expect(!!(e),1))
-# define __lzo_unlikely(e) (__builtin_expect(!!(e),0))
-#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define __lzo_likely(e) (__builtin_expect(!!(e),1))
-# define __lzo_unlikely(e) (__builtin_expect(!!(e),0))
-#endif
-#endif
-#if defined(__lzo_likely)
-# define __lzo_HAVE_likely 1
-#else
-# define __lzo_likely(e) (e)
-#endif
-#if defined(__lzo_unlikely)
-# define __lzo_HAVE_unlikely 1
-#else
-# define __lzo_unlikely(e) (e)
-#endif
-#if !defined(LZO_UNUSED)
-# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
-# define LZO_UNUSED(var) ((void) &var)
-# elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC)
-# define LZO_UNUSED(var) if (&var) ; else
-# elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define LZO_UNUSED(var) ((void) var)
-# elif (LZO_CC_MSC && (_MSC_VER < 900))
-# define LZO_UNUSED(var) if (&var) ; else
-# elif (LZO_CC_KEILC)
-# define LZO_UNUSED(var) {extern int __lzo_unused[1-2*!(sizeof(var)>0)];}
-# elif (LZO_CC_PACIFICC)
-# define LZO_UNUSED(var) ((void) sizeof(var))
-# elif (LZO_CC_WATCOMC) && defined(__cplusplus)
-# define LZO_UNUSED(var) ((void) var)
-# else
-# define LZO_UNUSED(var) ((void) &var)
-# endif
-#endif
-#if !defined(LZO_UNUSED_FUNC)
-# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
-# define LZO_UNUSED_FUNC(func) ((void) func)
-# elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC)
-# define LZO_UNUSED_FUNC(func) if (func) ; else
-# elif (LZO_CC_LLVM)
-# define LZO_UNUSED_FUNC(func) ((void) &func)
-# elif (LZO_CC_MSC && (_MSC_VER < 900))
-# define LZO_UNUSED_FUNC(func) if (func) ; else
-# elif (LZO_CC_MSC)
-# define LZO_UNUSED_FUNC(func) ((void) &func)
-# elif (LZO_CC_KEILC || LZO_CC_PELLESC)
-# define LZO_UNUSED_FUNC(func) {extern int __lzo_unused[1-2*!(sizeof((int)func)>0)];}
-# else
-# define LZO_UNUSED_FUNC(func) ((void) func)
-# endif
-#endif
-#if !defined(LZO_UNUSED_LABEL)
-# if (LZO_CC_WATCOMC) && defined(__cplusplus)
-# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l
-# elif (LZO_CC_INTELC || LZO_CC_WATCOMC)
-# define LZO_UNUSED_LABEL(l) if (0) goto l
-# else
-# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l
-# endif
-#endif
-#if !defined(LZO_DEFINE_UNINITIALIZED_VAR)
-# if 0
-# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var
-# elif 0 && (LZO_CC_GNUC)
-# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var
-# else
-# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init
-# endif
-#endif
-#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER)
-# if (LZO_CC_AZTECC || LZO_CC_ZORTECHC)
-# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)];
-# elif (LZO_CC_DMC || LZO_CC_SYMANTECC)
-# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1u-2*!(e)];
-# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295))
-# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)];
-# else
-# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-2*!(e)];
-# endif
-#endif
-#if !defined(LZO_COMPILE_TIME_ASSERT)
-# if (LZO_CC_AZTECC)
-# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-!(e)];}
-# elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC)
-# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
-# elif (LZO_CC_MSC && (_MSC_VER < 900))
-# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
-# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295))
-# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
-# else
-# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-2*!(e)];}
-# endif
-#endif
-#if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64)
-# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC)
-# elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC)
-# define __lzo_cdecl __cdecl
-# define __lzo_cdecl_atexit
-# define __lzo_cdecl_main __cdecl
-# if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC))
-# define __lzo_cdecl_qsort __pascal
-# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC))
-# define __lzo_cdecl_qsort _stdcall
-# else
-# define __lzo_cdecl_qsort __cdecl
-# endif
-# elif (LZO_CC_WATCOMC)
-# define __lzo_cdecl __cdecl
-# else
-# define __lzo_cdecl __cdecl
-# define __lzo_cdecl_atexit __cdecl
-# define __lzo_cdecl_main __cdecl
-# define __lzo_cdecl_qsort __cdecl
-# endif
-# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC)
-# elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC))
-# define __lzo_cdecl_sighandler __pascal
-# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC))
-# define __lzo_cdecl_sighandler _stdcall
-# elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE)
-# define __lzo_cdecl_sighandler __clrcall
-# elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700))
-# if defined(_DLL)
-# define __lzo_cdecl_sighandler _far _cdecl _loadds
-# elif defined(_MT)
-# define __lzo_cdecl_sighandler _far _cdecl
-# else
-# define __lzo_cdecl_sighandler _cdecl
-# endif
-# else
-# define __lzo_cdecl_sighandler __cdecl
-# endif
-#elif (LZO_ARCH_I386) && (LZO_CC_WATCOMC)
-# define __lzo_cdecl __cdecl
-#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC))
-# define __lzo_cdecl cdecl
-#endif
-#if !defined(__lzo_cdecl)
-# define __lzo_cdecl
-#endif
-#if !defined(__lzo_cdecl_atexit)
-# define __lzo_cdecl_atexit
-#endif
-#if !defined(__lzo_cdecl_main)
-# define __lzo_cdecl_main
-#endif
-#if !defined(__lzo_cdecl_qsort)
-# define __lzo_cdecl_qsort
-#endif
-#if !defined(__lzo_cdecl_sighandler)
-# define __lzo_cdecl_sighandler
-#endif
-#if !defined(__lzo_cdecl_va)
-# define __lzo_cdecl_va __lzo_cdecl
-#endif
-#if !defined(LZO_CFG_NO_WINDOWS_H)
-#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64)
-# if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000))
-# elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__)
-# elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul)))
-# else
-# define LZO_HAVE_WINDOWS_H 1
-# endif
-#endif
-#endif
-#if (LZO_ARCH_ALPHA)
-# define LZO_OPT_AVOID_UINT_INDEX 1
-# define LZO_OPT_AVOID_SHORT 1
-# define LZO_OPT_AVOID_USHORT 1
-#elif (LZO_ARCH_AMD64)
-# define LZO_OPT_AVOID_INT_INDEX 1
-# define LZO_OPT_AVOID_UINT_INDEX 1
-# define LZO_OPT_UNALIGNED16 1
-# define LZO_OPT_UNALIGNED32 1
-# define LZO_OPT_UNALIGNED64 1
-#elif (LZO_ARCH_ARM && LZO_ARCH_ARM_THUMB)
-#elif (LZO_ARCH_ARM)
-# define LZO_OPT_AVOID_SHORT 1
-# define LZO_OPT_AVOID_USHORT 1
-#elif (LZO_ARCH_CRIS)
-# define LZO_OPT_UNALIGNED16 1
-# define LZO_OPT_UNALIGNED32 1
-#elif (LZO_ARCH_I386)
-# define LZO_OPT_UNALIGNED16 1
-# define LZO_OPT_UNALIGNED32 1
-#elif (LZO_ARCH_IA64)
-# define LZO_OPT_AVOID_INT_INDEX 1
-# define LZO_OPT_AVOID_UINT_INDEX 1
-# define LZO_OPT_PREFER_POSTINC 1
-#elif (LZO_ARCH_M68K)
-# define LZO_OPT_PREFER_POSTINC 1
-# define LZO_OPT_PREFER_PREDEC 1
-# if defined(__mc68020__) && !defined(__mcoldfire__)
-# define LZO_OPT_UNALIGNED16 1
-# define LZO_OPT_UNALIGNED32 1
-# endif
-#elif (LZO_ARCH_MIPS)
-# define LZO_OPT_AVOID_UINT_INDEX 1
-#elif (LZO_ARCH_POWERPC)
-# define LZO_OPT_PREFER_PREINC 1
-# define LZO_OPT_PREFER_PREDEC 1
-# if defined(LZO_ABI_BIG_ENDIAN)
-# define LZO_OPT_UNALIGNED16 1
-# define LZO_OPT_UNALIGNED32 1
-# endif
-#elif (LZO_ARCH_S390)
-# define LZO_OPT_UNALIGNED16 1
-# define LZO_OPT_UNALIGNED32 1
-# if (LZO_SIZEOF_SIZE_T == 8)
-# define LZO_OPT_UNALIGNED64 1
-# endif
-#elif (LZO_ARCH_SH)
-# define LZO_OPT_PREFER_POSTINC 1
-# define LZO_OPT_PREFER_PREDEC 1
-#endif
-#if !defined(LZO_CFG_NO_INLINE_ASM)
-#if defined(LZO_CC_LLVM)
-# define LZO_CFG_NO_INLINE_ASM 1
-#endif
-#endif
-#if !defined(LZO_CFG_NO_UNALIGNED)
-#if defined(LZO_ABI_NEUTRAL_ENDIAN) || defined(LZO_ARCH_GENERIC)
-# define LZO_CFG_NO_UNALIGNED 1
-#endif
-#endif
-#if defined(LZO_CFG_NO_UNALIGNED)
-# undef LZO_OPT_UNALIGNED16
-# undef LZO_OPT_UNALIGNED32
-# undef LZO_OPT_UNALIGNED64
-#endif
-#if defined(LZO_CFG_NO_INLINE_ASM)
-#elif (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC))
-# define LZO_ASM_SYNTAX_MSC 1
-#elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC))
-#elif (LZO_ARCH_I386 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE))
-# define LZO_ASM_SYNTAX_GNUC 1
-#elif (LZO_ARCH_AMD64 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE))
-# define LZO_ASM_SYNTAX_GNUC 1
-#endif
-#if (LZO_ASM_SYNTAX_GNUC)
-#if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul))
-# define __LZO_ASM_CLOBBER "ax"
-#elif (LZO_CC_INTELC)
-# define __LZO_ASM_CLOBBER "memory"
-#else
-# define __LZO_ASM_CLOBBER "cc", "memory"
-#endif
-#endif
-#if defined(__LZO_INFOSTR_MM)
-#elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM))
-# define __LZO_INFOSTR_MM ""
-#elif defined(LZO_INFO_MM)
-# define __LZO_INFOSTR_MM "." LZO_INFO_MM
-#else
-# define __LZO_INFOSTR_MM ""
-#endif
-#if defined(__LZO_INFOSTR_PM)
-#elif defined(LZO_INFO_ABI_PM)
-# define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM
-#else
-# define __LZO_INFOSTR_PM ""
-#endif
-#if defined(__LZO_INFOSTR_ENDIAN)
-#elif defined(LZO_INFO_ABI_ENDIAN)
-# define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN
-#else
-# define __LZO_INFOSTR_ENDIAN ""
-#endif
-#if defined(__LZO_INFOSTR_OSNAME)
-#elif defined(LZO_INFO_OS_CONSOLE)
-# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE
-#elif defined(LZO_INFO_OS_POSIX)
-# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX
-#else
-# define __LZO_INFOSTR_OSNAME LZO_INFO_OS
-#endif
-#if defined(__LZO_INFOSTR_LIBC)
-#elif defined(LZO_INFO_LIBC)
-# define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC
-#else
-# define __LZO_INFOSTR_LIBC ""
-#endif
-#if defined(__LZO_INFOSTR_CCVER)
-#elif defined(LZO_INFO_CCVER)
-# define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER
-#else
-# define __LZO_INFOSTR_CCVER ""
-#endif
-#define LZO_INFO_STRING \
- LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \
- " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER
-
-#endif /* already included */
-
-/* vim:set ts=4 et: */
diff --git a/extern/lzo/minilzo/minilzo.c b/extern/lzo/minilzo/minilzo.c
deleted file mode 100644
index 6a62b31b94a..00000000000
--- a/extern/lzo/minilzo/minilzo.c
+++ /dev/null
@@ -1,4112 +0,0 @@
-/* minilzo.c -- mini subset of the LZO real-time data compression library
-
- This file is part of the LZO real-time data compression library.
-
- Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
- All Rights Reserved.
-
- The LZO library 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 LZO library 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 the LZO library; see the file COPYING.
- If not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- Markus F.X.J. Oberhumer
- <markus@oberhumer.com>
- http://www.oberhumer.com/opensource/lzo/
- */
-
-/*
- * NOTE:
- * the full LZO package can be found at
- * http://www.oberhumer.com/opensource/lzo/
- */
-
-#define __LZO_IN_MINILZO
-#define LZO_BUILD
-
-#if defined(LZO_CFG_FREESTANDING)
-# undef MINILZO_HAVE_CONFIG_H
-# define LZO_LIBC_FREESTANDING 1
-# define LZO_OS_FREESTANDING 1
-#endif
-
-#ifdef MINILZO_HAVE_CONFIG_H
-# include <config.h>
-#endif
-#include <limits.h>
-#include <stddef.h>
-#if defined(MINILZO_CFG_USE_INTERNAL_LZODEFS)
-
-#ifndef __LZODEFS_H_INCLUDED
-#define __LZODEFS_H_INCLUDED 1
-
-#if defined(__CYGWIN32__) && !defined(__CYGWIN__)
-# define __CYGWIN__ __CYGWIN32__
-#endif
-#if defined(__IBMCPP__) && !defined(__IBMC__)
-# define __IBMC__ __IBMCPP__
-#endif
-#if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER)
-# define __INTEL_COMPILER __ICL
-#endif
-#if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE)
-# define _ALL_SOURCE 1
-#endif
-#if defined(__mips__) && defined(__R5900__)
-# if !defined(__LONG_MAX__)
-# define __LONG_MAX__ 9223372036854775807L
-# endif
-#endif
-#if defined(__INTEL_COMPILER) && defined(__linux__)
-# pragma warning(disable: 193)
-#endif
-#if defined(__KEIL__) && defined(__C166__)
-# pragma warning disable = 322
-#elif 0 && defined(__C251__)
-# pragma warning disable = 322
-#endif
-#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__)
-# if (_MSC_VER >= 1300)
-# pragma warning(disable: 4668)
-# endif
-#endif
-#if 0 && defined(__WATCOMC__)
-# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060)
-# pragma warning 203 9
-# endif
-#endif
-#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__)
-# pragma option -h
-#endif
-#if 0
-#define LZO_0xffffL 0xfffful
-#define LZO_0xffffffffL 0xfffffffful
-#else
-#define LZO_0xffffL 65535ul
-#define LZO_0xffffffffL 4294967295ul
-#endif
-#if (LZO_0xffffL == LZO_0xffffffffL)
-# error "your preprocessor is broken 1"
-#endif
-#if (16ul * 16384ul != 262144ul)
-# error "your preprocessor is broken 2"
-#endif
-#if 0
-#if (32767 >= 4294967295ul)
-# error "your preprocessor is broken 3"
-#endif
-#if (65535u >= 4294967295ul)
-# error "your preprocessor is broken 4"
-#endif
-#endif
-#if (UINT_MAX == LZO_0xffffL)
-#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__)
-# if !defined(MSDOS)
-# define MSDOS 1
-# endif
-# if !defined(_MSDOS)
-# define _MSDOS 1
-# endif
-#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX)
-# if (__VERSION == 520) && (MB_LEN_MAX == 1)
-# if !defined(__AZTEC_C__)
-# define __AZTEC_C__ __VERSION
-# endif
-# if !defined(__DOS__)
-# define __DOS__ 1
-# endif
-# endif
-#endif
-#endif
-#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL)
-# define ptrdiff_t long
-# define _PTRDIFF_T_DEFINED
-#endif
-#if (UINT_MAX == LZO_0xffffL)
-# undef __LZO_RENAME_A
-# undef __LZO_RENAME_B
-# if defined(__AZTEC_C__) && defined(__DOS__)
-# define __LZO_RENAME_A 1
-# elif defined(_MSC_VER) && defined(MSDOS)
-# if (_MSC_VER < 600)
-# define __LZO_RENAME_A 1
-# elif (_MSC_VER < 700)
-# define __LZO_RENAME_B 1
-# endif
-# elif defined(__TSC__) && defined(__OS2__)
-# define __LZO_RENAME_A 1
-# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410)
-# define __LZO_RENAME_A 1
-# elif defined(__PACIFIC__) && defined(DOS)
-# if !defined(__far)
-# define __far far
-# endif
-# if !defined(__near)
-# define __near near
-# endif
-# endif
-# if defined(__LZO_RENAME_A)
-# if !defined(__cdecl)
-# define __cdecl cdecl
-# endif
-# if !defined(__far)
-# define __far far
-# endif
-# if !defined(__huge)
-# define __huge huge
-# endif
-# if !defined(__near)
-# define __near near
-# endif
-# if !defined(__pascal)
-# define __pascal pascal
-# endif
-# if !defined(__huge)
-# define __huge huge
-# endif
-# elif defined(__LZO_RENAME_B)
-# if !defined(__cdecl)
-# define __cdecl _cdecl
-# endif
-# if !defined(__far)
-# define __far _far
-# endif
-# if !defined(__huge)
-# define __huge _huge
-# endif
-# if !defined(__near)
-# define __near _near
-# endif
-# if !defined(__pascal)
-# define __pascal _pascal
-# endif
-# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
-# if !defined(__cdecl)
-# define __cdecl cdecl
-# endif
-# if !defined(__pascal)
-# define __pascal pascal
-# endif
-# endif
-# undef __LZO_RENAME_A
-# undef __LZO_RENAME_B
-#endif
-#if (UINT_MAX == LZO_0xffffL)
-#if defined(__AZTEC_C__) && defined(__DOS__)
-# define LZO_BROKEN_CDECL_ALT_SYNTAX 1
-#elif defined(_MSC_VER) && defined(MSDOS)
-# if (_MSC_VER < 600)
-# define LZO_BROKEN_INTEGRAL_CONSTANTS 1
-# endif
-# if (_MSC_VER < 700)
-# define LZO_BROKEN_INTEGRAL_PROMOTION 1
-# define LZO_BROKEN_SIZEOF 1
-# endif
-#elif defined(__PACIFIC__) && defined(DOS)
-# define LZO_BROKEN_INTEGRAL_CONSTANTS 1
-#elif defined(__TURBOC__) && defined(__MSDOS__)
-# if (__TURBOC__ < 0x0150)
-# define LZO_BROKEN_CDECL_ALT_SYNTAX 1
-# define LZO_BROKEN_INTEGRAL_CONSTANTS 1
-# define LZO_BROKEN_INTEGRAL_PROMOTION 1
-# endif
-# if (__TURBOC__ < 0x0200)
-# define LZO_BROKEN_SIZEOF 1
-# endif
-# if (__TURBOC__ < 0x0400) && defined(__cplusplus)
-# define LZO_BROKEN_CDECL_ALT_SYNTAX 1
-# endif
-#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
-# define LZO_BROKEN_CDECL_ALT_SYNTAX 1
-# define LZO_BROKEN_SIZEOF 1
-#endif
-#endif
-#if defined(__WATCOMC__) && (__WATCOMC__ < 900)
-# define LZO_BROKEN_INTEGRAL_CONSTANTS 1
-#endif
-#if defined(_CRAY) && defined(_CRAY1)
-# define LZO_BROKEN_SIGNED_RIGHT_SHIFT 1
-#endif
-#define LZO_PP_STRINGIZE(x) #x
-#define LZO_PP_MACRO_EXPAND(x) LZO_PP_STRINGIZE(x)
-#define LZO_PP_CONCAT2(a,b) a ## b
-#define LZO_PP_CONCAT3(a,b,c) a ## b ## c
-#define LZO_PP_CONCAT4(a,b,c,d) a ## b ## c ## d
-#define LZO_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e
-#define LZO_PP_ECONCAT2(a,b) LZO_PP_CONCAT2(a,b)
-#define LZO_PP_ECONCAT3(a,b,c) LZO_PP_CONCAT3(a,b,c)
-#define LZO_PP_ECONCAT4(a,b,c,d) LZO_PP_CONCAT4(a,b,c,d)
-#define LZO_PP_ECONCAT5(a,b,c,d,e) LZO_PP_CONCAT5(a,b,c,d,e)
-#if 1
-#define LZO_CPP_STRINGIZE(x) #x
-#define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x)
-#define LZO_CPP_CONCAT2(a,b) a ## b
-#define LZO_CPP_CONCAT3(a,b,c) a ## b ## c
-#define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d
-#define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e
-#define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b)
-#define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c)
-#define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d)
-#define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e)
-#endif
-#define __LZO_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o))
-#if 1 && defined(__cplusplus)
-# if !defined(__STDC_CONSTANT_MACROS)
-# define __STDC_CONSTANT_MACROS 1
-# endif
-# if !defined(__STDC_LIMIT_MACROS)
-# define __STDC_LIMIT_MACROS 1
-# endif
-#endif
-#if defined(__cplusplus)
-# define LZO_EXTERN_C extern "C"
-#else
-# define LZO_EXTERN_C extern
-#endif
-#if !defined(__LZO_OS_OVERRIDE)
-#if defined(LZO_OS_FREESTANDING)
-# define LZO_INFO_OS "freestanding"
-#elif defined(LZO_OS_EMBEDDED)
-# define LZO_INFO_OS "embedded"
-#elif 1 && defined(__IAR_SYSTEMS_ICC__)
-# define LZO_OS_EMBEDDED 1
-# define LZO_INFO_OS "embedded"
-#elif defined(__CYGWIN__) && defined(__GNUC__)
-# define LZO_OS_CYGWIN 1
-# define LZO_INFO_OS "cygwin"
-#elif defined(__EMX__) && defined(__GNUC__)
-# define LZO_OS_EMX 1
-# define LZO_INFO_OS "emx"
-#elif defined(__BEOS__)
-# define LZO_OS_BEOS 1
-# define LZO_INFO_OS "beos"
-#elif defined(__Lynx__)
-# define LZO_OS_LYNXOS 1
-# define LZO_INFO_OS "lynxos"
-#elif defined(__OS400__)
-# define LZO_OS_OS400 1
-# define LZO_INFO_OS "os400"
-#elif defined(__QNX__)
-# define LZO_OS_QNX 1
-# define LZO_INFO_OS "qnx"
-#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460)
-# define LZO_OS_DOS32 1
-# define LZO_INFO_OS "dos32"
-#elif defined(__BORLANDC__) && defined(__DPMI16__)
-# define LZO_OS_DOS16 1
-# define LZO_INFO_OS "dos16"
-#elif defined(__ZTC__) && defined(DOS386)
-# define LZO_OS_DOS32 1
-# define LZO_INFO_OS "dos32"
-#elif defined(__OS2__) || defined(__OS2V2__)
-# if (UINT_MAX == LZO_0xffffL)
-# define LZO_OS_OS216 1
-# define LZO_INFO_OS "os216"
-# elif (UINT_MAX == LZO_0xffffffffL)
-# define LZO_OS_OS2 1
-# define LZO_INFO_OS "os2"
-# else
-# error "check your limits.h header"
-# endif
-#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64)
-# define LZO_OS_WIN64 1
-# define LZO_INFO_OS "win64"
-#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__)
-# define LZO_OS_WIN32 1
-# define LZO_INFO_OS "win32"
-#elif defined(__MWERKS__) && defined(__INTEL__)
-# define LZO_OS_WIN32 1
-# define LZO_INFO_OS "win32"
-#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows)
-# if (UINT_MAX == LZO_0xffffL)
-# define LZO_OS_WIN16 1
-# define LZO_INFO_OS "win16"
-# elif (UINT_MAX == LZO_0xffffffffL)
-# define LZO_OS_WIN32 1
-# define LZO_INFO_OS "win32"
-# else
-# error "check your limits.h header"
-# endif
-#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS))
-# if (UINT_MAX == LZO_0xffffL)
-# define LZO_OS_DOS16 1
-# define LZO_INFO_OS "dos16"
-# elif (UINT_MAX == LZO_0xffffffffL)
-# define LZO_OS_DOS32 1
-# define LZO_INFO_OS "dos32"
-# else
-# error "check your limits.h header"
-# endif
-#elif defined(__WATCOMC__)
-# if defined(__NT__) && (UINT_MAX == LZO_0xffffL)
-# define LZO_OS_DOS16 1
-# define LZO_INFO_OS "dos16"
-# elif defined(__NT__) && (__WATCOMC__ < 1100)
-# define LZO_OS_WIN32 1
-# define LZO_INFO_OS "win32"
-# elif defined(__linux__) || defined(__LINUX__)
-# define LZO_OS_POSIX 1
-# define LZO_INFO_OS "posix"
-# else
-# error "please specify a target using the -bt compiler option"
-# endif
-#elif defined(__palmos__)
-# define LZO_OS_PALMOS 1
-# define LZO_INFO_OS "palmos"
-#elif defined(__TOS__) || defined(__atarist__)
-# define LZO_OS_TOS 1
-# define LZO_INFO_OS "tos"
-#elif defined(macintosh) && !defined(__ppc__)
-# define LZO_OS_MACCLASSIC 1
-# define LZO_INFO_OS "macclassic"
-#elif defined(__VMS)
-# define LZO_OS_VMS 1
-# define LZO_INFO_OS "vms"
-#elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
-# define LZO_OS_CONSOLE 1
-# define LZO_OS_CONSOLE_PS2 1
-# define LZO_INFO_OS "console"
-# define LZO_INFO_OS_CONSOLE "ps2"
-#elif (defined(__mips__) && defined(__psp__))
-# define LZO_OS_CONSOLE 1
-# define LZO_OS_CONSOLE_PSP 1
-# define LZO_INFO_OS "console"
-# define LZO_INFO_OS_CONSOLE "psp"
-#else
-# define LZO_OS_POSIX 1
-# define LZO_INFO_OS "posix"
-#endif
-#if (LZO_OS_POSIX)
-# if defined(_AIX) || defined(__AIX__) || defined(__aix__)
-# define LZO_OS_POSIX_AIX 1
-# define LZO_INFO_OS_POSIX "aix"
-# elif defined(__FreeBSD__)
-# define LZO_OS_POSIX_FREEBSD 1
-# define LZO_INFO_OS_POSIX "freebsd"
-# elif defined(__hpux__) || defined(__hpux)
-# define LZO_OS_POSIX_HPUX 1
-# define LZO_INFO_OS_POSIX "hpux"
-# elif defined(__INTERIX)
-# define LZO_OS_POSIX_INTERIX 1
-# define LZO_INFO_OS_POSIX "interix"
-# elif defined(__IRIX__) || defined(__irix__)
-# define LZO_OS_POSIX_IRIX 1
-# define LZO_INFO_OS_POSIX "irix"
-# elif defined(__linux__) || defined(__linux) || defined(__LINUX__)
-# define LZO_OS_POSIX_LINUX 1
-# define LZO_INFO_OS_POSIX "linux"
-# elif defined(__APPLE__) || defined(__MACOS__)
-# define LZO_OS_POSIX_MACOSX 1
-# define LZO_INFO_OS_POSIX "macosx"
-# elif defined(__minix__) || defined(__minix)
-# define LZO_OS_POSIX_MINIX 1
-# define LZO_INFO_OS_POSIX "minix"
-# elif defined(__NetBSD__)
-# define LZO_OS_POSIX_NETBSD 1
-# define LZO_INFO_OS_POSIX "netbsd"
-# elif defined(__OpenBSD__)
-# define LZO_OS_POSIX_OPENBSD 1
-# define LZO_INFO_OS_POSIX "openbsd"
-# elif defined(__osf__)
-# define LZO_OS_POSIX_OSF 1
-# define LZO_INFO_OS_POSIX "osf"
-# elif defined(__solaris__) || defined(__sun)
-# if defined(__SVR4) || defined(__svr4__)
-# define LZO_OS_POSIX_SOLARIS 1
-# define LZO_INFO_OS_POSIX "solaris"
-# else
-# define LZO_OS_POSIX_SUNOS 1
-# define LZO_INFO_OS_POSIX "sunos"
-# endif
-# elif defined(__ultrix__) || defined(__ultrix)
-# define LZO_OS_POSIX_ULTRIX 1
-# define LZO_INFO_OS_POSIX "ultrix"
-# elif defined(_UNICOS)
-# define LZO_OS_POSIX_UNICOS 1
-# define LZO_INFO_OS_POSIX "unicos"
-# else
-# define LZO_OS_POSIX_UNKNOWN 1
-# define LZO_INFO_OS_POSIX "unknown"
-# endif
-#endif
-#endif
-#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
-# if (UINT_MAX != LZO_0xffffL)
-# error "this should not happen"
-# endif
-# if (ULONG_MAX != LZO_0xffffffffL)
-# error "this should not happen"
-# endif
-#endif
-#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64)
-# if (UINT_MAX != LZO_0xffffffffL)
-# error "this should not happen"
-# endif
-# if (ULONG_MAX != LZO_0xffffffffL)
-# error "this should not happen"
-# endif
-#endif
-#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__)
-# define LZO_CC_CILLY 1
-# define LZO_INFO_CC "Cilly"
-# if defined(__CILLY__)
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CILLY__)
-# else
-# define LZO_INFO_CCVER "unknown"
-# endif
-#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__)
-# define LZO_CC_SDCC 1
-# define LZO_INFO_CC "sdcc"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(SDCC)
-#elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__)
-# define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__)
-# define LZO_INFO_CC "Pathscale C"
-# define LZO_INFO_CCVER __PATHSCALE__
-#elif defined(__INTEL_COMPILER)
-# define LZO_CC_INTELC 1
-# define LZO_INFO_CC "Intel C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__INTEL_COMPILER)
-# if defined(_WIN32) || defined(_WIN64)
-# define LZO_CC_SYNTAX_MSC 1
-# else
-# define LZO_CC_SYNTAX_GNUC 1
-# endif
-#elif defined(__POCC__) && defined(_WIN32)
-# define LZO_CC_PELLESC 1
-# define LZO_INFO_CC "Pelles C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__)
-#elif defined(__llvm__) && defined(__GNUC__) && defined(__VERSION__)
-# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
-# define LZO_CC_LLVM (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
-# else
-# define LZO_CC_LLVM (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
-# endif
-# define LZO_INFO_CC "llvm-gcc"
-# define LZO_INFO_CCVER __VERSION__
-#elif defined(__GNUC__) && defined(__VERSION__)
-# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
-# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
-# elif defined(__GNUC_MINOR__)
-# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
-# else
-# define LZO_CC_GNUC (__GNUC__ * 0x10000L)
-# endif
-# define LZO_INFO_CC "gcc"
-# define LZO_INFO_CCVER __VERSION__
-#elif defined(__ACK__) && defined(_ACK)
-# define LZO_CC_ACK 1
-# define LZO_INFO_CC "Amsterdam Compiler Kit C"
-# define LZO_INFO_CCVER "unknown"
-#elif defined(__AZTEC_C__)
-# define LZO_CC_AZTECC 1
-# define LZO_INFO_CC "Aztec C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__)
-#elif defined(__BORLANDC__)
-# define LZO_CC_BORLANDC 1
-# define LZO_INFO_CC "Borland C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__BORLANDC__)
-#elif defined(_CRAYC) && defined(_RELEASE)
-# define LZO_CC_CRAYC 1
-# define LZO_INFO_CC "Cray C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_RELEASE)
-#elif defined(__DMC__) && defined(__SC__)
-# define LZO_CC_DMC 1
-# define LZO_INFO_CC "Digital Mars C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DMC__)
-#elif defined(__DECC)
-# define LZO_CC_DECC 1
-# define LZO_INFO_CC "DEC C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DECC)
-#elif defined(__HIGHC__)
-# define LZO_CC_HIGHC 1
-# define LZO_INFO_CC "MetaWare High C"
-# define LZO_INFO_CCVER "unknown"
-#elif defined(__IAR_SYSTEMS_ICC__)
-# define LZO_CC_IARC 1
-# define LZO_INFO_CC "IAR C"
-# if defined(__VER__)
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__VER__)
-# else
-# define LZO_INFO_CCVER "unknown"
-# endif
-#elif defined(__IBMC__)
-# define LZO_CC_IBMC 1
-# define LZO_INFO_CC "IBM C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMC__)
-#elif defined(__KEIL__) && defined(__C166__)
-# define LZO_CC_KEILC 1
-# define LZO_INFO_CC "Keil C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__C166__)
-#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL)
-# define LZO_CC_LCCWIN32 1
-# define LZO_INFO_CC "lcc-win32"
-# define LZO_INFO_CCVER "unknown"
-#elif defined(__LCC__)
-# define LZO_CC_LCC 1
-# define LZO_INFO_CC "lcc"
-# if defined(__LCC_VERSION__)
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__LCC_VERSION__)
-# else
-# define LZO_INFO_CCVER "unknown"
-# endif
-#elif defined(_MSC_VER)
-# define LZO_CC_MSC 1
-# define LZO_INFO_CC "Microsoft C"
-# if defined(_MSC_FULL_VER)
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER)
-# else
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER)
-# endif
-#elif defined(__MWERKS__)
-# define LZO_CC_MWERKS 1
-# define LZO_INFO_CC "Metrowerks C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__MWERKS__)
-#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386)
-# define LZO_CC_NDPC 1
-# define LZO_INFO_CC "Microway NDP C"
-# define LZO_INFO_CCVER "unknown"
-#elif defined(__PACIFIC__)
-# define LZO_CC_PACIFICC 1
-# define LZO_INFO_CC "Pacific C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PACIFIC__)
-#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__))
-# define LZO_CC_PGI 1
-# define LZO_INFO_CC "Portland Group PGI C"
-# define LZO_INFO_CCVER "unknown"
-#elif defined(__PUREC__) && defined(__TOS__)
-# define LZO_CC_PUREC 1
-# define LZO_INFO_CC "Pure C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PUREC__)
-#elif defined(__SC__) && defined(__ZTC__)
-# define LZO_CC_SYMANTECC 1
-# define LZO_INFO_CC "Symantec C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SC__)
-#elif defined(__SUNPRO_C)
-# define LZO_INFO_CC "SunPro C"
-# if ((__SUNPRO_C)+0 > 0)
-# define LZO_CC_SUNPROC __SUNPRO_C
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_C)
-# else
-# define LZO_CC_SUNPROC 1
-# define LZO_INFO_CCVER "unknown"
-# endif
-#elif defined(__SUNPRO_CC)
-# define LZO_INFO_CC "SunPro C"
-# if ((__SUNPRO_CC)+0 > 0)
-# define LZO_CC_SUNPROC __SUNPRO_CC
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_CC)
-# else
-# define LZO_CC_SUNPROC 1
-# define LZO_INFO_CCVER "unknown"
-# endif
-#elif defined(__TINYC__)
-# define LZO_CC_TINYC 1
-# define LZO_INFO_CC "Tiny C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TINYC__)
-#elif defined(__TSC__)
-# define LZO_CC_TOPSPEEDC 1
-# define LZO_INFO_CC "TopSpeed C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TSC__)
-#elif defined(__WATCOMC__)
-# define LZO_CC_WATCOMC 1
-# define LZO_INFO_CC "Watcom C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__WATCOMC__)
-#elif defined(__TURBOC__)
-# define LZO_CC_TURBOC 1
-# define LZO_INFO_CC "Turbo C"
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TURBOC__)
-#elif defined(__ZTC__)
-# define LZO_CC_ZORTECHC 1
-# define LZO_INFO_CC "Zortech C"
-# if (__ZTC__ == 0x310)
-# define LZO_INFO_CCVER "0x310"
-# else
-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ZTC__)
-# endif
-#else
-# define LZO_CC_UNKNOWN 1
-# define LZO_INFO_CC "unknown"
-# define LZO_INFO_CCVER "unknown"
-#endif
-#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER)
-# error "LZO_CC_MSC: _MSC_FULL_VER is not defined"
-#endif
-#if !defined(__LZO_ARCH_OVERRIDE) && !defined(LZO_ARCH_GENERIC) && defined(_CRAY)
-# if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY)
-# if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E)
-# define LZO_ARCH_CRAY_MPP 1
-# elif defined(_CRAY1)
-# define LZO_ARCH_CRAY_PVP 1
-# endif
-# endif
-#endif
-#if !defined(__LZO_ARCH_OVERRIDE)
-#if defined(LZO_ARCH_GENERIC)
-# define LZO_INFO_ARCH "generic"
-#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
-# define LZO_ARCH_I086 1
-# define LZO_ARCH_IA16 1
-# define LZO_INFO_ARCH "i086"
-#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA)
-# define LZO_ARCH_ALPHA 1
-# define LZO_INFO_ARCH "alpha"
-#elif (LZO_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E))
-# define LZO_ARCH_ALPHA 1
-# define LZO_INFO_ARCH "alpha"
-#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)
-# define LZO_ARCH_AMD64 1
-# define LZO_INFO_ARCH "amd64"
-#elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB))
-# define LZO_ARCH_ARM 1
-# define LZO_ARCH_ARM_THUMB 1
-# define LZO_INFO_ARCH "arm_thumb"
-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__)
-# define LZO_ARCH_ARM 1
-# if defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 1)
-# define LZO_ARCH_ARM_THUMB 1
-# define LZO_INFO_ARCH "arm_thumb"
-# elif defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 2)
-# define LZO_INFO_ARCH "arm"
-# else
-# define LZO_INFO_ARCH "arm"
-# endif
-#elif defined(__arm__) || defined(_M_ARM)
-# define LZO_ARCH_ARM 1
-# define LZO_INFO_ARCH "arm"
-#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__)
-# define LZO_ARCH_AVR 1
-# define LZO_INFO_ARCH "avr"
-#elif defined(__bfin__)
-# define LZO_ARCH_BLACKFIN 1
-# define LZO_INFO_ARCH "blackfin"
-#elif (UINT_MAX == LZO_0xffffL) && defined(__C166__)
-# define LZO_ARCH_C166 1
-# define LZO_INFO_ARCH "c166"
-#elif defined(__cris__)
-# define LZO_ARCH_CRIS 1
-# define LZO_INFO_ARCH "cris"
-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__)
-# define LZO_ARCH_EZ80 1
-# define LZO_INFO_ARCH "ez80"
-#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
-# define LZO_ARCH_H8300 1
-# define LZO_INFO_ARCH "h8300"
-#elif defined(__hppa__) || defined(__hppa)
-# define LZO_ARCH_HPPA 1
-# define LZO_INFO_ARCH "hppa"
-#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386)
-# define LZO_ARCH_I386 1
-# define LZO_ARCH_IA32 1
-# define LZO_INFO_ARCH "i386"
-#elif (LZO_CC_ZORTECHC && defined(__I86__))
-# define LZO_ARCH_I386 1
-# define LZO_ARCH_IA32 1
-# define LZO_INFO_ARCH "i386"
-#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386)
-# define LZO_ARCH_I386 1
-# define LZO_ARCH_IA32 1
-# define LZO_INFO_ARCH "i386"
-#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64)
-# define LZO_ARCH_IA64 1
-# define LZO_INFO_ARCH "ia64"
-#elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__)
-# define LZO_ARCH_M16C 1
-# define LZO_INFO_ARCH "m16c"
-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__)
-# define LZO_ARCH_M16C 1
-# define LZO_INFO_ARCH "m16c"
-#elif defined(__m32r__)
-# define LZO_ARCH_M32R 1
-# define LZO_INFO_ARCH "m32r"
-#elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K)
-# define LZO_ARCH_M68K 1
-# define LZO_INFO_ARCH "m68k"
-#elif (UINT_MAX == LZO_0xffffL) && defined(__C251__)
-# define LZO_ARCH_MCS251 1
-# define LZO_INFO_ARCH "mcs251"
-#elif (UINT_MAX == LZO_0xffffL) && defined(__C51__)
-# define LZO_ARCH_MCS51 1
-# define LZO_INFO_ARCH "mcs51"
-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__)
-# define LZO_ARCH_MCS51 1
-# define LZO_INFO_ARCH "mcs51"
-#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000)
-# define LZO_ARCH_MIPS 1
-# define LZO_INFO_ARCH "mips"
-#elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__)
-# define LZO_ARCH_MSP430 1
-# define LZO_INFO_ARCH "msp430"
-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__)
-# define LZO_ARCH_MSP430 1
-# define LZO_INFO_ARCH "msp430"
-#elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR)
-# define LZO_ARCH_POWERPC 1
-# define LZO_INFO_ARCH "powerpc"
-#elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x)
-# define LZO_ARCH_S390 1
-# define LZO_INFO_ARCH "s390"
-#elif defined(__sh__) || defined(_M_SH)
-# define LZO_ARCH_SH 1
-# define LZO_INFO_ARCH "sh"
-#elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8)
-# define LZO_ARCH_SPARC 1
-# define LZO_INFO_ARCH "sparc"
-#elif defined(__SPU__)
-# define LZO_ARCH_SPU 1
-# define LZO_INFO_ARCH "spu"
-#elif (UINT_MAX == LZO_0xffffL) && defined(__z80)
-# define LZO_ARCH_Z80 1
-# define LZO_INFO_ARCH "z80"
-#elif (LZO_ARCH_CRAY_PVP)
-# if defined(_CRAYSV1)
-# define LZO_ARCH_CRAY_SV1 1
-# define LZO_INFO_ARCH "cray_sv1"
-# elif (_ADDR64)
-# define LZO_ARCH_CRAY_T90 1
-# define LZO_INFO_ARCH "cray_t90"
-# elif (_ADDR32)
-# define LZO_ARCH_CRAY_YMP 1
-# define LZO_INFO_ARCH "cray_ymp"
-# else
-# define LZO_ARCH_CRAY_XMP 1
-# define LZO_INFO_ARCH "cray_xmp"
-# endif
-#else
-# define LZO_ARCH_UNKNOWN 1
-# define LZO_INFO_ARCH "unknown"
-#endif
-#endif
-#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2)
-# error "FIXME - missing define for CPU architecture"
-#endif
-#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32)
-# error "FIXME - missing WIN32 define for CPU architecture"
-#endif
-#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64)
-# error "FIXME - missing WIN64 define for CPU architecture"
-#endif
-#if (LZO_OS_OS216 || LZO_OS_WIN16)
-# define LZO_ARCH_I086PM 1
-# define LZO_ARCH_IA16PM 1
-#elif 1 && (LZO_OS_DOS16 && defined(BLX286))
-# define LZO_ARCH_I086PM 1
-# define LZO_ARCH_IA16PM 1
-#elif 1 && (LZO_OS_DOS16 && defined(DOSX286))
-# define LZO_ARCH_I086PM 1
-# define LZO_ARCH_IA16PM 1
-#elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__))
-# define LZO_ARCH_I086PM 1
-# define LZO_ARCH_IA16PM 1
-#endif
-#if defined(LZO_ARCH_ARM_THUMB) && !defined(LZO_ARCH_ARM)
-# error "this should not happen"
-#endif
-#if defined(LZO_ARCH_I086PM) && !defined(LZO_ARCH_I086)
-# error "this should not happen"
-#endif
-#if (LZO_ARCH_I086)
-# if (UINT_MAX != LZO_0xffffL)
-# error "this should not happen"
-# endif
-# if (ULONG_MAX != LZO_0xffffffffL)
-# error "this should not happen"
-# endif
-#endif
-#if (LZO_ARCH_I386)
-# if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__)
-# error "this should not happen"
-# endif
-# if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__)
-# error "this should not happen"
-# endif
-# if (ULONG_MAX != LZO_0xffffffffL)
-# error "this should not happen"
-# endif
-#endif
-#if !defined(__LZO_MM_OVERRIDE)
-#if (LZO_ARCH_I086)
-#if (UINT_MAX != LZO_0xffffL)
-# error "this should not happen"
-#endif
-#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM)
-# define LZO_MM_TINY 1
-#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM)
-# define LZO_MM_HUGE 1
-#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL)
-# define LZO_MM_SMALL 1
-#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM)
-# define LZO_MM_MEDIUM 1
-#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM)
-# define LZO_MM_COMPACT 1
-#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL)
-# define LZO_MM_LARGE 1
-#elif (LZO_CC_AZTECC)
-# if defined(_LARGE_CODE) && defined(_LARGE_DATA)
-# define LZO_MM_LARGE 1
-# elif defined(_LARGE_CODE)
-# define LZO_MM_MEDIUM 1
-# elif defined(_LARGE_DATA)
-# define LZO_MM_COMPACT 1
-# else
-# define LZO_MM_SMALL 1
-# endif
-#elif (LZO_CC_ZORTECHC && defined(__VCM__))
-# define LZO_MM_LARGE 1
-#else
-# error "unknown memory model"
-#endif
-#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
-#define LZO_HAVE_MM_HUGE_PTR 1
-#define LZO_HAVE_MM_HUGE_ARRAY 1
-#if (LZO_MM_TINY)
-# undef LZO_HAVE_MM_HUGE_ARRAY
-#endif
-#if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC)
-# undef LZO_HAVE_MM_HUGE_PTR
-# undef LZO_HAVE_MM_HUGE_ARRAY
-#elif (LZO_CC_DMC || LZO_CC_SYMANTECC)
-# undef LZO_HAVE_MM_HUGE_ARRAY
-#elif (LZO_CC_MSC && defined(_QC))
-# undef LZO_HAVE_MM_HUGE_ARRAY
-# if (_MSC_VER < 600)
-# undef LZO_HAVE_MM_HUGE_PTR
-# endif
-#elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295))
-# undef LZO_HAVE_MM_HUGE_ARRAY
-#endif
-#if (LZO_ARCH_I086PM) && !defined(LZO_HAVE_MM_HUGE_PTR)
-# if (LZO_OS_DOS16)
-# error "this should not happen"
-# elif (LZO_CC_ZORTECHC)
-# else
-# error "this should not happen"
-# endif
-#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
-#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200))
- extern void __near __cdecl _AHSHIFT(void);
-# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT)
-#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC)
- extern void __near __cdecl _AHSHIFT(void);
-# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT)
-#elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC)
- extern void __near __cdecl _AHSHIFT(void);
-# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT)
-#elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295))
- extern void __near __cdecl _AHSHIFT(void);
-# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT)
-#elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16)
-# define LZO_MM_AHSHIFT 12
-#elif (LZO_CC_WATCOMC)
- extern unsigned char _HShift;
-# define LZO_MM_AHSHIFT ((unsigned) _HShift)
-#else
-# error "FIXME - implement LZO_MM_AHSHIFT"
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
-#elif (LZO_ARCH_C166)
-#if !defined(__MODEL__)
-# error "FIXME - C166 __MODEL__"
-#elif ((__MODEL__) == 0)
-# define LZO_MM_SMALL 1
-#elif ((__MODEL__) == 1)
-# define LZO_MM_SMALL 1
-#elif ((__MODEL__) == 2)
-# define LZO_MM_LARGE 1
-#elif ((__MODEL__) == 3)
-# define LZO_MM_TINY 1
-#elif ((__MODEL__) == 4)
-# define LZO_MM_XTINY 1
-#elif ((__MODEL__) == 5)
-# define LZO_MM_XSMALL 1
-#else
-# error "FIXME - C166 __MODEL__"
-#endif
-#elif (LZO_ARCH_MCS251)
-#if !defined(__MODEL__)
-# error "FIXME - MCS251 __MODEL__"
-#elif ((__MODEL__) == 0)
-# define LZO_MM_SMALL 1
-#elif ((__MODEL__) == 2)
-# define LZO_MM_LARGE 1
-#elif ((__MODEL__) == 3)
-# define LZO_MM_TINY 1
-#elif ((__MODEL__) == 4)
-# define LZO_MM_XTINY 1
-#elif ((__MODEL__) == 5)
-# define LZO_MM_XSMALL 1
-#else
-# error "FIXME - MCS251 __MODEL__"
-#endif
-#elif (LZO_ARCH_MCS51)
-#if !defined(__MODEL__)
-# error "FIXME - MCS51 __MODEL__"
-#elif ((__MODEL__) == 1)
-# define LZO_MM_SMALL 1
-#elif ((__MODEL__) == 2)
-# define LZO_MM_LARGE 1
-#elif ((__MODEL__) == 3)
-# define LZO_MM_TINY 1
-#elif ((__MODEL__) == 4)
-# define LZO_MM_XTINY 1
-#elif ((__MODEL__) == 5)
-# define LZO_MM_XSMALL 1
-#else
-# error "FIXME - MCS51 __MODEL__"
-#endif
-#elif (LZO_ARCH_CRAY_PVP)
-# define LZO_MM_PVP 1
-#else
-# define LZO_MM_FLAT 1
-#endif
-#if (LZO_MM_COMPACT)
-# define LZO_INFO_MM "compact"
-#elif (LZO_MM_FLAT)
-# define LZO_INFO_MM "flat"
-#elif (LZO_MM_HUGE)
-# define LZO_INFO_MM "huge"
-#elif (LZO_MM_LARGE)
-# define LZO_INFO_MM "large"
-#elif (LZO_MM_MEDIUM)
-# define LZO_INFO_MM "medium"
-#elif (LZO_MM_PVP)
-# define LZO_INFO_MM "pvp"
-#elif (LZO_MM_SMALL)
-# define LZO_INFO_MM "small"
-#elif (LZO_MM_TINY)
-# define LZO_INFO_MM "tiny"
-#else
-# error "unknown memory model"
-#endif
-#endif
-#if defined(SIZEOF_SHORT)
-# define LZO_SIZEOF_SHORT (SIZEOF_SHORT)
-#endif
-#if defined(SIZEOF_INT)
-# define LZO_SIZEOF_INT (SIZEOF_INT)
-#endif
-#if defined(SIZEOF_LONG)
-# define LZO_SIZEOF_LONG (SIZEOF_LONG)
-#endif
-#if defined(SIZEOF_LONG_LONG)
-# define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG)
-#endif
-#if defined(SIZEOF___INT16)
-# define LZO_SIZEOF___INT16 (SIZEOF___INT16)
-#endif
-#if defined(SIZEOF___INT32)
-# define LZO_SIZEOF___INT32 (SIZEOF___INT32)
-#endif
-#if defined(SIZEOF___INT64)
-# define LZO_SIZEOF___INT64 (SIZEOF___INT64)
-#endif
-#if defined(SIZEOF_VOID_P)
-# define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P)
-#endif
-#if defined(SIZEOF_SIZE_T)
-# define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T)
-#endif
-#if defined(SIZEOF_PTRDIFF_T)
-# define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T)
-#endif
-#define __LZO_LSR(x,b) (((x)+0ul) >> (b))
-#if !defined(LZO_SIZEOF_SHORT)
-# if (LZO_ARCH_CRAY_PVP)
-# define LZO_SIZEOF_SHORT 8
-# elif (USHRT_MAX == LZO_0xffffL)
-# define LZO_SIZEOF_SHORT 2
-# elif (__LZO_LSR(USHRT_MAX,7) == 1)
-# define LZO_SIZEOF_SHORT 1
-# elif (__LZO_LSR(USHRT_MAX,15) == 1)
-# define LZO_SIZEOF_SHORT 2
-# elif (__LZO_LSR(USHRT_MAX,31) == 1)
-# define LZO_SIZEOF_SHORT 4
-# elif (__LZO_LSR(USHRT_MAX,63) == 1)
-# define LZO_SIZEOF_SHORT 8
-# elif (__LZO_LSR(USHRT_MAX,127) == 1)
-# define LZO_SIZEOF_SHORT 16
-# else
-# error "LZO_SIZEOF_SHORT"
-# endif
-#endif
-#if !defined(LZO_SIZEOF_INT)
-# if (LZO_ARCH_CRAY_PVP)
-# define LZO_SIZEOF_INT 8
-# elif (UINT_MAX == LZO_0xffffL)
-# define LZO_SIZEOF_INT 2
-# elif (UINT_MAX == LZO_0xffffffffL)
-# define LZO_SIZEOF_INT 4
-# elif (__LZO_LSR(UINT_MAX,7) == 1)
-# define LZO_SIZEOF_INT 1
-# elif (__LZO_LSR(UINT_MAX,15) == 1)
-# define LZO_SIZEOF_INT 2
-# elif (__LZO_LSR(UINT_MAX,31) == 1)
-# define LZO_SIZEOF_INT 4
-# elif (__LZO_LSR(UINT_MAX,63) == 1)
-# define LZO_SIZEOF_INT 8
-# elif (__LZO_LSR(UINT_MAX,127) == 1)
-# define LZO_SIZEOF_INT 16
-# else
-# error "LZO_SIZEOF_INT"
-# endif
-#endif
-#if !defined(LZO_SIZEOF_LONG)
-# if (ULONG_MAX == LZO_0xffffffffL)
-# define LZO_SIZEOF_LONG 4
-# elif (__LZO_LSR(ULONG_MAX,7) == 1)
-# define LZO_SIZEOF_LONG 1
-# elif (__LZO_LSR(ULONG_MAX,15) == 1)
-# define LZO_SIZEOF_LONG 2
-# elif (__LZO_LSR(ULONG_MAX,31) == 1)
-# define LZO_SIZEOF_LONG 4
-# elif (__LZO_LSR(ULONG_MAX,63) == 1)
-# define LZO_SIZEOF_LONG 8
-# elif (__LZO_LSR(ULONG_MAX,127) == 1)
-# define LZO_SIZEOF_LONG 16
-# else
-# error "LZO_SIZEOF_LONG"
-# endif
-#endif
-#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64)
-#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8)
-# if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__)
-# if (LZO_CC_GNUC >= 0x030300ul)
-# if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0)
-# define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG
-# elif (__LZO_LSR(__LONG_LONG_MAX__,30) == 1)
-# define LZO_SIZEOF_LONG_LONG 4
-# endif
-# endif
-# endif
-#endif
-#endif
-#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64)
-#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8)
-#if (LZO_ARCH_I086 && LZO_CC_DMC)
-#elif (LZO_CC_CILLY) && defined(__GNUC__)
-# define LZO_SIZEOF_LONG_LONG 8
-#elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define LZO_SIZEOF_LONG_LONG 8
-#elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400))
-# define LZO_SIZEOF_LONG_LONG 8
-#elif (LZO_OS_WIN64 || defined(_WIN64))
-# define LZO_SIZEOF___INT64 8
-#elif (LZO_ARCH_I386 && (LZO_CC_DMC))
-# define LZO_SIZEOF_LONG_LONG 8
-#elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700)))
-# define LZO_SIZEOF_LONG_LONG 8
-#elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__)))
-# define LZO_SIZEOF_LONG_LONG 8
-#elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI || LZO_CC_SUNPROC))
-# define LZO_SIZEOF_LONG_LONG 8
-#elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC))
-# define LZO_SIZEOF___INT64 8
-#elif ((LZO_OS_WIN32 || defined(_WIN32)) && (LZO_CC_MSC))
-# define LZO_SIZEOF___INT64 8
-#elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520)))
-# define LZO_SIZEOF___INT64 8
-#elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100)))
-# define LZO_SIZEOF___INT64 8
-#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64))
-# define LZO_SIZEOF___INT64 8
-#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__)
-# define LZO_SIZEOF_LONG_LONG 8
-#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
-# define LZO_SIZEOF_LONG_LONG 8
-#elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2)
-#elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
-# define LZO_SIZEOF_LONG_LONG 8
-#endif
-#endif
-#endif
-#if defined(__cplusplus) && defined(LZO_CC_GNUC)
-# if (LZO_CC_GNUC < 0x020800ul)
-# undef LZO_SIZEOF_LONG_LONG
-# endif
-#endif
-#if defined(LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG)
-# undef LZO_SIZEOF_LONG_LONG
-#endif
-#if !defined(LZO_SIZEOF_VOID_P)
-#if (LZO_ARCH_I086)
-# define __LZO_WORDSIZE 2
-# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM)
-# define LZO_SIZEOF_VOID_P 2
-# elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE)
-# define LZO_SIZEOF_VOID_P 4
-# else
-# error "LZO_MM"
-# endif
-#elif (LZO_ARCH_AVR || LZO_ARCH_Z80)
-# define __LZO_WORDSIZE 1
-# define LZO_SIZEOF_VOID_P 2
-#elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430)
-# define LZO_SIZEOF_VOID_P 2
-#elif (LZO_ARCH_H8300)
-# if defined(__NORMAL_MODE__)
-# define __LZO_WORDSIZE 4
-# define LZO_SIZEOF_VOID_P 2
-# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
-# define __LZO_WORDSIZE 4
-# define LZO_SIZEOF_VOID_P 4
-# else
-# define __LZO_WORDSIZE 2
-# define LZO_SIZEOF_VOID_P 2
-# endif
-# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4)
-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT
-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT
-# endif
-#elif (LZO_ARCH_M16C)
-# define __LZO_WORDSIZE 2
-# if defined(__m32c_cpu__) || defined(__m32cm_cpu__)
-# define LZO_SIZEOF_VOID_P 4
-# else
-# define LZO_SIZEOF_VOID_P 2
-# endif
-#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
-# define __LZO_WORDSIZE 8
-# define LZO_SIZEOF_VOID_P 4
-#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64)
-# define __LZO_WORDSIZE 8
-# define LZO_SIZEOF_VOID_P 8
-#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__)
-# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG
-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG
-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG
-#elif (LZO_OS_OS400 || defined(__OS400__))
-# define __LZO_WORDSIZE LZO_SIZEOF_LONG
-# define LZO_SIZEOF_VOID_P 16
-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG
-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG
-#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
-# define LZO_SIZEOF_VOID_P 8
-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG
-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG
-#elif (LZO_ARCH_SPU)
-# if 0
-# define __LZO_WORDSIZE 16
-# endif
-# define LZO_SIZEOF_VOID_P 4
-#else
-# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG
-#endif
-#endif
-#if !defined(LZO_WORDSIZE)
-# if defined(__LZO_WORDSIZE)
-# define LZO_WORDSIZE __LZO_WORDSIZE
-# else
-# define LZO_WORDSIZE LZO_SIZEOF_VOID_P
-# endif
-#endif
-#if !defined(LZO_SIZEOF_SIZE_T)
-#if (LZO_ARCH_I086 || LZO_ARCH_M16C)
-# define LZO_SIZEOF_SIZE_T 2
-#else
-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P
-#endif
-#endif
-#if !defined(LZO_SIZEOF_PTRDIFF_T)
-#if (LZO_ARCH_I086)
-# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE)
-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P
-# elif (LZO_MM_COMPACT || LZO_MM_LARGE)
-# if (LZO_CC_BORLANDC || LZO_CC_TURBOC)
-# define LZO_SIZEOF_PTRDIFF_T 4
-# else
-# define LZO_SIZEOF_PTRDIFF_T 2
-# endif
-# else
-# error "LZO_MM"
-# endif
-#else
-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T
-#endif
-#endif
-#if defined(LZO_ABI_NEUTRAL_ENDIAN)
-# undef LZO_ABI_BIG_ENDIAN
-# undef LZO_ABI_LITTLE_ENDIAN
-#elif !defined(LZO_ABI_BIG_ENDIAN) && !defined(LZO_ABI_LITTLE_ENDIAN)
-#if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP)
-# define LZO_ABI_BIG_ENDIAN 1
-#elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430)
-# define LZO_ABI_LITTLE_ENDIAN 1
-#elif (LZO_ARCH_M68K || LZO_ARCH_S390)
-# define LZO_ABI_BIG_ENDIAN 1
-#elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__)
-# if (__LITTLE_ENDIAN__ == 1)
-# define LZO_ABI_LITTLE_ENDIAN 1
-# else
-# define LZO_ABI_BIG_ENDIAN 1
-# endif
-#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
-# define LZO_ABI_BIG_ENDIAN 1
-#elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
-# define LZO_ABI_LITTLE_ENDIAN 1
-#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__)
-# define LZO_ABI_BIG_ENDIAN 1
-#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__)
-# define LZO_ABI_LITTLE_ENDIAN 1
-#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__)
-# define LZO_ABI_BIG_ENDIAN 1
-#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__)
-# define LZO_ABI_LITTLE_ENDIAN 1
-#endif
-#endif
-#if defined(LZO_ABI_BIG_ENDIAN) && defined(LZO_ABI_LITTLE_ENDIAN)
-# error "this should not happen"
-#endif
-#if defined(LZO_ABI_BIG_ENDIAN)
-# define LZO_INFO_ABI_ENDIAN "be"
-#elif defined(LZO_ABI_LITTLE_ENDIAN)
-# define LZO_INFO_ABI_ENDIAN "le"
-#elif defined(LZO_ABI_NEUTRAL_ENDIAN)
-# define LZO_INFO_ABI_ENDIAN "neutral"
-#endif
-#if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2)
-# define LZO_ABI_I8LP16 1
-# define LZO_INFO_ABI_PM "i8lp16"
-#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2)
-# define LZO_ABI_ILP16 1
-# define LZO_INFO_ABI_PM "ilp16"
-#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4)
-# define LZO_ABI_ILP32 1
-# define LZO_INFO_ABI_PM "ilp32"
-#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8)
-# define LZO_ABI_LLP64 1
-# define LZO_INFO_ABI_PM "llp64"
-#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8)
-# define LZO_ABI_LP64 1
-# define LZO_INFO_ABI_PM "lp64"
-#elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8)
-# define LZO_ABI_ILP64 1
-# define LZO_INFO_ABI_PM "ilp64"
-#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4)
-# define LZO_ABI_IP32L64 1
-# define LZO_INFO_ABI_PM "ip32l64"
-#endif
-#if !defined(__LZO_LIBC_OVERRIDE)
-#if defined(LZO_LIBC_NAKED)
-# define LZO_INFO_LIBC "naked"
-#elif defined(LZO_LIBC_FREESTANDING)
-# define LZO_INFO_LIBC "freestanding"
-#elif defined(LZO_LIBC_MOSTLY_FREESTANDING)
-# define LZO_INFO_LIBC "mfreestanding"
-#elif defined(LZO_LIBC_ISOC90)
-# define LZO_INFO_LIBC "isoc90"
-#elif defined(LZO_LIBC_ISOC99)
-# define LZO_INFO_LIBC "isoc99"
-#elif defined(__dietlibc__)
-# define LZO_LIBC_DIETLIBC 1
-# define LZO_INFO_LIBC "dietlibc"
-#elif defined(_NEWLIB_VERSION)
-# define LZO_LIBC_NEWLIB 1
-# define LZO_INFO_LIBC "newlib"
-#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__)
-# if defined(__UCLIBC_SUBLEVEL__)
-# define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__)
-# else
-# define LZO_LIBC_UCLIBC 0x00090bL
-# endif
-# define LZO_INFO_LIBC "uclibc"
-#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__)
-# define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100)
-# define LZO_INFO_LIBC "glibc"
-#elif (LZO_CC_MWERKS) && defined(__MSL__)
-# define LZO_LIBC_MSL __MSL__
-# define LZO_INFO_LIBC "msl"
-#elif 1 && defined(__IAR_SYSTEMS_ICC__)
-# define LZO_LIBC_ISOC90 1
-# define LZO_INFO_LIBC "isoc90"
-#else
-# define LZO_LIBC_DEFAULT 1
-# define LZO_INFO_LIBC "default"
-#endif
-#endif
-#if !defined(__lzo_gnuc_extension__)
-#if (LZO_CC_GNUC >= 0x020800ul)
-# define __lzo_gnuc_extension__ __extension__
-#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define __lzo_gnuc_extension__ __extension__
-#else
-# define __lzo_gnuc_extension__
-#endif
-#endif
-#if !defined(__lzo_ua_volatile)
-# define __lzo_ua_volatile volatile
-#endif
-#if !defined(__lzo_alignof)
-#if (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI)
-# define __lzo_alignof(e) __alignof__(e)
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700))
-# define __lzo_alignof(e) __alignof__(e)
-#elif (LZO_CC_MSC && (_MSC_VER >= 1300))
-# define __lzo_alignof(e) __alignof(e)
-#endif
-#endif
-#if defined(__lzo_alignof)
-# define __lzo_HAVE_alignof 1
-#endif
-#if !defined(__lzo_constructor)
-#if (LZO_CC_GNUC >= 0x030400ul)
-# define __lzo_constructor __attribute__((__constructor__,__used__))
-#elif (LZO_CC_GNUC >= 0x020700ul)
-# define __lzo_constructor __attribute__((__constructor__))
-#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define __lzo_constructor __attribute__((__constructor__))
-#endif
-#endif
-#if defined(__lzo_constructor)
-# define __lzo_HAVE_constructor 1
-#endif
-#if !defined(__lzo_destructor)
-#if (LZO_CC_GNUC >= 0x030400ul)
-# define __lzo_destructor __attribute__((__destructor__,__used__))
-#elif (LZO_CC_GNUC >= 0x020700ul)
-# define __lzo_destructor __attribute__((__destructor__))
-#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define __lzo_destructor __attribute__((__destructor__))
-#endif
-#endif
-#if defined(__lzo_destructor)
-# define __lzo_HAVE_destructor 1
-#endif
-#if defined(__lzo_HAVE_destructor) && !defined(__lzo_HAVE_constructor)
-# error "this should not happen"
-#endif
-#if !defined(__lzo_inline)
-#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295))
-#elif defined(__cplusplus)
-# define __lzo_inline inline
-#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550))
-# define __lzo_inline __inline
-#elif (LZO_CC_CILLY || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI)
-# define __lzo_inline __inline__
-#elif (LZO_CC_DMC)
-# define __lzo_inline __inline
-#elif (LZO_CC_INTELC)
-# define __lzo_inline __inline
-#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405))
-# define __lzo_inline __inline
-#elif (LZO_CC_MSC && (_MSC_VER >= 900))
-# define __lzo_inline __inline
-#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
-# define __lzo_inline inline
-#endif
-#endif
-#if defined(__lzo_inline)
-# define __lzo_HAVE_inline 1
-#else
-# define __lzo_inline
-#endif
-#if !defined(__lzo_forceinline)
-#if (LZO_CC_GNUC >= 0x030200ul)
-# define __lzo_forceinline __inline__ __attribute__((__always_inline__))
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC)
-# define __lzo_forceinline __forceinline
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC)
-# define __lzo_forceinline __inline__ __attribute__((__always_inline__))
-#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define __lzo_forceinline __inline__ __attribute__((__always_inline__))
-#elif (LZO_CC_MSC && (_MSC_VER >= 1200))
-# define __lzo_forceinline __forceinline
-#endif
-#endif
-#if defined(__lzo_forceinline)
-# define __lzo_HAVE_forceinline 1
-#else
-# define __lzo_forceinline
-#endif
-#if !defined(__lzo_noinline)
-#if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul)
-# define __lzo_noinline __attribute__((__noinline__,__used__))
-#elif (LZO_CC_GNUC >= 0x030200ul)
-# define __lzo_noinline __attribute__((__noinline__))
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_MSC)
-# define __lzo_noinline __declspec(noinline)
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC)
-# define __lzo_noinline __attribute__((__noinline__))
-#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define __lzo_noinline __attribute__((__noinline__))
-#elif (LZO_CC_MSC && (_MSC_VER >= 1300))
-# define __lzo_noinline __declspec(noinline)
-#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64))
-# if defined(__cplusplus)
-# else
-# define __lzo_noinline __declspec(noinline)
-# endif
-#endif
-#endif
-#if defined(__lzo_noinline)
-# define __lzo_HAVE_noinline 1
-#else
-# define __lzo_noinline
-#endif
-#if (defined(__lzo_HAVE_forceinline) || defined(__lzo_HAVE_noinline)) && !defined(__lzo_HAVE_inline)
-# error "this should not happen"
-#endif
-#if !defined(__lzo_noreturn)
-#if (LZO_CC_GNUC >= 0x020700ul)
-# define __lzo_noreturn __attribute__((__noreturn__))
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC)
-# define __lzo_noreturn __declspec(noreturn)
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC)
-# define __lzo_noreturn __attribute__((__noreturn__))
-#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define __lzo_noreturn __attribute__((__noreturn__))
-#elif (LZO_CC_MSC && (_MSC_VER >= 1200))
-# define __lzo_noreturn __declspec(noreturn)
-#endif
-#endif
-#if defined(__lzo_noreturn)
-# define __lzo_HAVE_noreturn 1
-#else
-# define __lzo_noreturn
-#endif
-#if !defined(__lzo_nothrow)
-#if (LZO_CC_GNUC >= 0x030300ul)
-# define __lzo_nothrow __attribute__((__nothrow__))
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) && defined(__cplusplus)
-# define __lzo_nothrow __declspec(nothrow)
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC)
-# define __lzo_nothrow __attribute__((__nothrow__))
-#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define __lzo_nothrow __attribute__((__nothrow__))
-#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus)
-# define __lzo_nothrow __declspec(nothrow)
-#endif
-#endif
-#if defined(__lzo_nothrow)
-# define __lzo_HAVE_nothrow 1
-#else
-# define __lzo_nothrow
-#endif
-#if !defined(__lzo_restrict)
-#if (LZO_CC_GNUC >= 0x030400ul)
-# define __lzo_restrict __restrict__
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC)
-# define __lzo_restrict __restrict__
-#elif (LZO_CC_LLVM)
-# define __lzo_restrict __restrict__
-#elif (LZO_CC_MSC && (_MSC_VER >= 1400))
-# define __lzo_restrict __restrict
-#endif
-#endif
-#if defined(__lzo_restrict)
-# define __lzo_HAVE_restrict 1
-#else
-# define __lzo_restrict
-#endif
-#if !defined(__lzo_likely) && !defined(__lzo_unlikely)
-#if (LZO_CC_GNUC >= 0x030200ul)
-# define __lzo_likely(e) (__builtin_expect(!!(e),1))
-# define __lzo_unlikely(e) (__builtin_expect(!!(e),0))
-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800))
-# define __lzo_likely(e) (__builtin_expect(!!(e),1))
-# define __lzo_unlikely(e) (__builtin_expect(!!(e),0))
-#elif (LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define __lzo_likely(e) (__builtin_expect(!!(e),1))
-# define __lzo_unlikely(e) (__builtin_expect(!!(e),0))
-#endif
-#endif
-#if defined(__lzo_likely)
-# define __lzo_HAVE_likely 1
-#else
-# define __lzo_likely(e) (e)
-#endif
-#if defined(__lzo_unlikely)
-# define __lzo_HAVE_unlikely 1
-#else
-# define __lzo_unlikely(e) (e)
-#endif
-#if !defined(LZO_UNUSED)
-# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
-# define LZO_UNUSED(var) ((void) &var)
-# elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC)
-# define LZO_UNUSED(var) if (&var) ; else
-# elif (LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE)
-# define LZO_UNUSED(var) ((void) var)
-# elif (LZO_CC_MSC && (_MSC_VER < 900))
-# define LZO_UNUSED(var) if (&var) ; else
-# elif (LZO_CC_KEILC)
-# define LZO_UNUSED(var) {extern int __lzo_unused[1-2*!(sizeof(var)>0)];}
-# elif (LZO_CC_PACIFICC)
-# define LZO_UNUSED(var) ((void) sizeof(var))
-# elif (LZO_CC_WATCOMC) && defined(__cplusplus)
-# define LZO_UNUSED(var) ((void) var)
-# else
-# define LZO_UNUSED(var) ((void) &var)
-# endif
-#endif
-#if !defined(LZO_UNUSED_FUNC)
-# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
-# define LZO_UNUSED_FUNC(func) ((void) func)
-# elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC)
-# define LZO_UNUSED_FUNC(func) if (func) ; else
-# elif (LZO_CC_LLVM)
-# define LZO_UNUSED_FUNC(func) ((void) &func)
-# elif (LZO_CC_MSC && (_MSC_VER < 900))
-# define LZO_UNUSED_FUNC(func) if (func) ; else
-# elif (LZO_CC_MSC)
-# define LZO_UNUSED_FUNC(func) ((void) &func)
-# elif (LZO_CC_KEILC || LZO_CC_PELLESC)
-# define LZO_UNUSED_FUNC(func) {extern int __lzo_unused[1-2*!(sizeof((int)func)>0)];}
-# else
-# define LZO_UNUSED_FUNC(func) ((void) func)
-# endif
-#endif
-#if !defined(LZO_UNUSED_LABEL)
-# if (LZO_CC_WATCOMC) && defined(__cplusplus)
-# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l
-# elif (LZO_CC_INTELC || LZO_CC_WATCOMC)
-# define LZO_UNUSED_LABEL(l) if (0) goto l
-# else
-# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l
-# endif
-#endif
-#if !defined(LZO_DEFINE_UNINITIALIZED_VAR)
-# if 0
-# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var
-# elif 0 && (LZO_CC_GNUC)
-# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var
-# else
-# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init
-# endif
-#endif
-#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER)
-# if (LZO_CC_AZTECC || LZO_CC_ZORTECHC)
-# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)];
-# elif (LZO_CC_DMC || LZO_CC_SYMANTECC)
-# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1u-2*!(e)];
-# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295))
-# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)];
-# else
-# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-2*!(e)];
-# endif
-#endif
-#if !defined(LZO_COMPILE_TIME_ASSERT)
-# if (LZO_CC_AZTECC)
-# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-!(e)];}
-# elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC)
-# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
-# elif (LZO_CC_MSC && (_MSC_VER < 900))
-# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
-# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295))
-# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
-# else
-# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-2*!(e)];}
-# endif
-#endif
-#if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64)
-# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC)
-# elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC)
-# define __lzo_cdecl __cdecl
-# define __lzo_cdecl_atexit
-# define __lzo_cdecl_main __cdecl
-# if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC))
-# define __lzo_cdecl_qsort __pascal
-# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC))
-# define __lzo_cdecl_qsort _stdcall
-# else
-# define __lzo_cdecl_qsort __cdecl
-# endif
-# elif (LZO_CC_WATCOMC)
-# define __lzo_cdecl __cdecl
-# else
-# define __lzo_cdecl __cdecl
-# define __lzo_cdecl_atexit __cdecl
-# define __lzo_cdecl_main __cdecl
-# define __lzo_cdecl_qsort __cdecl
-# endif
-# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC)
-# elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC))
-# define __lzo_cdecl_sighandler __pascal
-# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC))
-# define __lzo_cdecl_sighandler _stdcall
-# elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE)
-# define __lzo_cdecl_sighandler __clrcall
-# elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700))
-# if defined(_DLL)
-# define __lzo_cdecl_sighandler _far _cdecl _loadds
-# elif defined(_MT)
-# define __lzo_cdecl_sighandler _far _cdecl
-# else
-# define __lzo_cdecl_sighandler _cdecl
-# endif
-# else
-# define __lzo_cdecl_sighandler __cdecl
-# endif
-#elif (LZO_ARCH_I386) && (LZO_CC_WATCOMC)
-# define __lzo_cdecl __cdecl
-#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC))
-# define __lzo_cdecl cdecl
-#endif
-#if !defined(__lzo_cdecl)
-# define __lzo_cdecl
-#endif
-#if !defined(__lzo_cdecl_atexit)
-# define __lzo_cdecl_atexit
-#endif
-#if !defined(__lzo_cdecl_main)
-# define __lzo_cdecl_main
-#endif
-#if !defined(__lzo_cdecl_qsort)
-# define __lzo_cdecl_qsort
-#endif
-#if !defined(__lzo_cdecl_sighandler)
-# define __lzo_cdecl_sighandler
-#endif
-#if !defined(__lzo_cdecl_va)
-# define __lzo_cdecl_va __lzo_cdecl
-#endif
-#if !defined(LZO_CFG_NO_WINDOWS_H)
-#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64)
-# if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000))
-# elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__)
-# elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul)))
-# else
-# define LZO_HAVE_WINDOWS_H 1
-# endif
-#endif
-#endif
-#if (LZO_ARCH_ALPHA)
-# define LZO_OPT_AVOID_UINT_INDEX 1
-# define LZO_OPT_AVOID_SHORT 1
-# define LZO_OPT_AVOID_USHORT 1
-#elif (LZO_ARCH_AMD64)
-# define LZO_OPT_AVOID_INT_INDEX 1
-# define LZO_OPT_AVOID_UINT_INDEX 1
-# define LZO_OPT_UNALIGNED16 1
-# define LZO_OPT_UNALIGNED32 1
-# define LZO_OPT_UNALIGNED64 1
-#elif (LZO_ARCH_ARM && LZO_ARCH_ARM_THUMB)
-#elif (LZO_ARCH_ARM)
-# define LZO_OPT_AVOID_SHORT 1
-# define LZO_OPT_AVOID_USHORT 1
-#elif (LZO_ARCH_CRIS)
-# define LZO_OPT_UNALIGNED16 1
-# define LZO_OPT_UNALIGNED32 1
-#elif (LZO_ARCH_I386)
-# define LZO_OPT_UNALIGNED16 1
-# define LZO_OPT_UNALIGNED32 1
-#elif (LZO_ARCH_IA64)
-# define LZO_OPT_AVOID_INT_INDEX 1
-# define LZO_OPT_AVOID_UINT_INDEX 1
-# define LZO_OPT_PREFER_POSTINC 1
-#elif (LZO_ARCH_M68K)
-# define LZO_OPT_PREFER_POSTINC 1
-# define LZO_OPT_PREFER_PREDEC 1
-# if defined(__mc68020__) && !defined(__mcoldfire__)
-# define LZO_OPT_UNALIGNED16 1
-# define LZO_OPT_UNALIGNED32 1
-# endif
-#elif (LZO_ARCH_MIPS)
-# define LZO_OPT_AVOID_UINT_INDEX 1
-#elif (LZO_ARCH_POWERPC)
-# define LZO_OPT_PREFER_PREINC 1
-# define LZO_OPT_PREFER_PREDEC 1
-# if defined(LZO_ABI_BIG_ENDIAN)
-# define LZO_OPT_UNALIGNED16 1
-# define LZO_OPT_UNALIGNED32 1
-# endif
-#elif (LZO_ARCH_S390)
-# define LZO_OPT_UNALIGNED16 1
-# define LZO_OPT_UNALIGNED32 1
-# if (LZO_SIZEOF_SIZE_T == 8)
-# define LZO_OPT_UNALIGNED64 1
-# endif
-#elif (LZO_ARCH_SH)
-# define LZO_OPT_PREFER_POSTINC 1
-# define LZO_OPT_PREFER_PREDEC 1
-#endif
-#if !defined(LZO_CFG_NO_INLINE_ASM)
-#if defined(LZO_CC_LLVM)
-# define LZO_CFG_NO_INLINE_ASM 1
-#endif
-#endif
-#if !defined(LZO_CFG_NO_UNALIGNED)
-#if defined(LZO_ABI_NEUTRAL_ENDIAN) || defined(LZO_ARCH_GENERIC)
-# define LZO_CFG_NO_UNALIGNED 1
-#endif
-#endif
-#if defined(LZO_CFG_NO_UNALIGNED)
-# undef LZO_OPT_UNALIGNED16
-# undef LZO_OPT_UNALIGNED32
-# undef LZO_OPT_UNALIGNED64
-#endif
-#if defined(LZO_CFG_NO_INLINE_ASM)
-#elif (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC))
-# define LZO_ASM_SYNTAX_MSC 1
-#elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC))
-#elif (LZO_ARCH_I386 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE))
-# define LZO_ASM_SYNTAX_GNUC 1
-#elif (LZO_ARCH_AMD64 && (LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE))
-# define LZO_ASM_SYNTAX_GNUC 1
-#endif
-#if (LZO_ASM_SYNTAX_GNUC)
-#if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul))
-# define __LZO_ASM_CLOBBER "ax"
-#elif (LZO_CC_INTELC)
-# define __LZO_ASM_CLOBBER "memory"
-#else
-# define __LZO_ASM_CLOBBER "cc", "memory"
-#endif
-#endif
-#if defined(__LZO_INFOSTR_MM)
-#elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM))
-# define __LZO_INFOSTR_MM ""
-#elif defined(LZO_INFO_MM)
-# define __LZO_INFOSTR_MM "." LZO_INFO_MM
-#else
-# define __LZO_INFOSTR_MM ""
-#endif
-#if defined(__LZO_INFOSTR_PM)
-#elif defined(LZO_INFO_ABI_PM)
-# define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM
-#else
-# define __LZO_INFOSTR_PM ""
-#endif
-#if defined(__LZO_INFOSTR_ENDIAN)
-#elif defined(LZO_INFO_ABI_ENDIAN)
-# define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN
-#else
-# define __LZO_INFOSTR_ENDIAN ""
-#endif
-#if defined(__LZO_INFOSTR_OSNAME)
-#elif defined(LZO_INFO_OS_CONSOLE)
-# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE
-#elif defined(LZO_INFO_OS_POSIX)
-# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX
-#else
-# define __LZO_INFOSTR_OSNAME LZO_INFO_OS
-#endif
-#if defined(__LZO_INFOSTR_LIBC)
-#elif defined(LZO_INFO_LIBC)
-# define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC
-#else
-# define __LZO_INFOSTR_LIBC ""
-#endif
-#if defined(__LZO_INFOSTR_CCVER)
-#elif defined(LZO_INFO_CCVER)
-# define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER
-#else
-# define __LZO_INFOSTR_CCVER ""
-#endif
-#define LZO_INFO_STRING \
- LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \
- " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER
-
-#endif
-
-#endif
-
-#undef LZO_HAVE_CONFIG_H
-#include "minilzo.h"
-
-#if !defined(MINILZO_VERSION) || (MINILZO_VERSION != 0x2030)
-# error "version mismatch in miniLZO source files"
-#endif
-
-#ifdef MINILZO_HAVE_CONFIG_H
-# define LZO_HAVE_CONFIG_H
-#endif
-
-#ifndef __LZO_CONF_H
-#define __LZO_CONF_H
-
-#if !defined(__LZO_IN_MINILZO)
-#if defined(LZO_CFG_FREESTANDING)
-# define LZO_LIBC_FREESTANDING 1
-# define LZO_OS_FREESTANDING 1
-# define ACC_LIBC_FREESTANDING 1
-# define ACC_OS_FREESTANDING 1
-#endif
-#if defined(LZO_CFG_NO_UNALIGNED)
-# define ACC_CFG_NO_UNALIGNED 1
-#endif
-#if defined(LZO_ARCH_GENERIC)
-# define ACC_ARCH_GENERIC 1
-#endif
-#if defined(LZO_ABI_NEUTRAL_ENDIAN)
-# define ACC_ABI_NEUTRAL_ENDIAN 1
-#endif
-#if defined(LZO_HAVE_CONFIG_H)
-# define ACC_CONFIG_NO_HEADER 1
-#endif
-#if defined(LZO_CFG_EXTRA_CONFIG_HEADER)
-# include LZO_CFG_EXTRA_CONFIG_HEADER
-#endif
-#if defined(__LZOCONF_H) || defined(__LZOCONF_H_INCLUDED)
-# error "include this file first"
-#endif
-#include "lzo/lzoconf.h"
-#endif
-
-#if (LZO_VERSION < 0x02000) || !defined(__LZOCONF_H_INCLUDED)
-# error "version mismatch"
-#endif
-
-#if (LZO_CC_BORLANDC && LZO_ARCH_I086)
-# pragma option -h
-#endif
-
-#if (LZO_CC_MSC && (_MSC_VER >= 1000))
-# pragma warning(disable: 4127 4701)
-#endif
-#if (LZO_CC_MSC && (_MSC_VER >= 1300))
-# pragma warning(disable: 4820)
-# pragma warning(disable: 4514 4710 4711)
-#endif
-
-#if (LZO_CC_SUNPROC)
-# pragma error_messages(off,E_END_OF_LOOP_CODE_NOT_REACHED)
-# pragma error_messages(off,E_LOOP_NOT_ENTERED_AT_TOP)
-#endif
-
-#if defined(__LZO_MMODEL_HUGE) && (!LZO_HAVE_MM_HUGE_PTR)
-# error "this should not happen - check defines for __huge"
-#endif
-
-#if defined(__LZO_IN_MINILZO) || defined(LZO_CFG_FREESTANDING)
-#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16)
-# define ACC_WANT_ACC_INCD_H 1
-# define ACC_WANT_ACC_INCE_H 1
-# define ACC_WANT_ACC_INCI_H 1
-#elif 1
-# include <string.h>
-#else
-# define ACC_WANT_ACC_INCD_H 1
-#endif
-
-#if (LZO_ARCH_I086)
-# define ACC_MM_AHSHIFT LZO_MM_AHSHIFT
-# define ACC_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0])
-# define ACC_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1])
-# define ACC_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o)))
-#endif
-
-#if !defined(lzo_uintptr_t)
-# if defined(__LZO_MMODEL_HUGE)
-# define lzo_uintptr_t unsigned long
-# elif 1 && defined(LZO_OS_OS400) && (LZO_SIZEOF_VOID_P == 16)
-# define __LZO_UINTPTR_T_IS_POINTER 1
- typedef char* lzo_uintptr_t;
-# define lzo_uintptr_t lzo_uintptr_t
-# elif (LZO_SIZEOF_SIZE_T == LZO_SIZEOF_VOID_P)
-# define lzo_uintptr_t size_t
-# elif (LZO_SIZEOF_LONG == LZO_SIZEOF_VOID_P)
-# define lzo_uintptr_t unsigned long
-# elif (LZO_SIZEOF_INT == LZO_SIZEOF_VOID_P)
-# define lzo_uintptr_t unsigned int
-# elif (LZO_SIZEOF_LONG_LONG == LZO_SIZEOF_VOID_P)
-# define lzo_uintptr_t unsigned long long
-# else
-# define lzo_uintptr_t size_t
-# endif
-#endif
-LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uintptr_t) >= sizeof(lzo_voidp))
-
-#if 1 && !defined(LZO_CFG_FREESTANDING)
-#if 1 && !defined(HAVE_STRING_H)
-#define HAVE_STRING_H 1
-#endif
-#if 1 && !defined(HAVE_MEMCMP)
-#define HAVE_MEMCMP 1
-#endif
-#if 1 && !defined(HAVE_MEMCPY)
-#define HAVE_MEMCPY 1
-#endif
-#if 1 && !defined(HAVE_MEMMOVE)
-#define HAVE_MEMMOVE 1
-#endif
-#if 1 && !defined(HAVE_MEMSET)
-#define HAVE_MEMSET 1
-#endif
-#endif
-
-#if 1 && defined(HAVE_STRING_H)
-#include <string.h>
-#endif
-
-#if defined(LZO_CFG_FREESTANDING)
-# undef HAVE_MEMCMP
-# undef HAVE_MEMCPY
-# undef HAVE_MEMMOVE
-# undef HAVE_MEMSET
-#endif
-
-#if !defined(HAVE_MEMCMP)
-# undef memcmp
-# define memcmp(a,b,c) lzo_memcmp(a,b,c)
-#elif !defined(__LZO_MMODEL_HUGE)
-# define lzo_memcmp(a,b,c) memcmp(a,b,c)
-#endif
-#if !defined(HAVE_MEMCPY)
-# undef memcpy
-# define memcpy(a,b,c) lzo_memcpy(a,b,c)
-#elif !defined(__LZO_MMODEL_HUGE)
-# define lzo_memcpy(a,b,c) memcpy(a,b,c)
-#endif
-#if !defined(HAVE_MEMMOVE)
-# undef memmove
-# define memmove(a,b,c) lzo_memmove(a,b,c)
-#elif !defined(__LZO_MMODEL_HUGE)
-# define lzo_memmove(a,b,c) memmove(a,b,c)
-#endif
-#if !defined(HAVE_MEMSET)
-# undef memset
-# define memset(a,b,c) lzo_memset(a,b,c)
-#elif !defined(__LZO_MMODEL_HUGE)
-# define lzo_memset(a,b,c) memset(a,b,c)
-#endif
-
-#undef NDEBUG
-#if defined(LZO_CFG_FREESTANDING)
-# undef LZO_DEBUG
-# define NDEBUG 1
-# undef assert
-# define assert(e) ((void)0)
-#else
-# if !defined(LZO_DEBUG)
-# define NDEBUG 1
-# endif
-# include <assert.h>
-#endif
-
-#if 0 && defined(__BOUNDS_CHECKING_ON)
-# include <unchecked.h>
-#else
-# define BOUNDS_CHECKING_OFF_DURING(stmt) stmt
-# define BOUNDS_CHECKING_OFF_IN_EXPR(expr) (expr)
-#endif
-
-#if !defined(__lzo_inline)
-# define __lzo_inline
-#endif
-#if !defined(__lzo_forceinline)
-# define __lzo_forceinline
-#endif
-#if !defined(__lzo_noinline)
-# define __lzo_noinline
-#endif
-
-#if 1
-# define LZO_BYTE(x) ((unsigned char) (x))
-#else
-# define LZO_BYTE(x) ((unsigned char) ((x) & 0xff))
-#endif
-
-#define LZO_MAX(a,b) ((a) >= (b) ? (a) : (b))
-#define LZO_MIN(a,b) ((a) <= (b) ? (a) : (b))
-#define LZO_MAX3(a,b,c) ((a) >= (b) ? LZO_MAX(a,c) : LZO_MAX(b,c))
-#define LZO_MIN3(a,b,c) ((a) <= (b) ? LZO_MIN(a,c) : LZO_MIN(b,c))
-
-#define lzo_sizeof(type) ((lzo_uint) (sizeof(type)))
-
-#define LZO_HIGH(array) ((lzo_uint) (sizeof(array)/sizeof(*(array))))
-
-#define LZO_SIZE(bits) (1u << (bits))
-#define LZO_MASK(bits) (LZO_SIZE(bits) - 1)
-
-#define LZO_LSIZE(bits) (1ul << (bits))
-#define LZO_LMASK(bits) (LZO_LSIZE(bits) - 1)
-
-#define LZO_USIZE(bits) ((lzo_uint) 1 << (bits))
-#define LZO_UMASK(bits) (LZO_USIZE(bits) - 1)
-
-#if !defined(DMUL)
-#if 0
-
-# define DMUL(a,b) ((lzo_xint) ((lzo_uint32)(a) * (lzo_uint32)(b)))
-#else
-# define DMUL(a,b) ((lzo_xint) ((a) * (b)))
-#endif
-#endif
-
-#if 1 && !defined(LZO_CFG_NO_UNALIGNED)
-#if 1 && (LZO_ARCH_AMD64 || LZO_ARCH_I386)
-# if (LZO_SIZEOF_SHORT == 2)
-# define LZO_UNALIGNED_OK_2
-# endif
-# if (LZO_SIZEOF_INT == 4)
-# define LZO_UNALIGNED_OK_4
-# endif
-#endif
-#endif
-
-#if defined(LZO_UNALIGNED_OK_2)
- LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(short) == 2)
-#endif
-#if defined(LZO_UNALIGNED_OK_4)
- LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32) == 4)
-#elif defined(LZO_ALIGNED_OK_4)
- LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32) == 4)
-#endif
-
-#define MEMCPY8_DS(dest,src,len) \
- lzo_memcpy(dest,src,len); dest += len; src += len
-
-#define BZERO8_PTR(s,l,n) \
- lzo_memset((lzo_voidp)(s),0,(lzo_uint)(l)*(n))
-
-#define MEMCPY_DS(dest,src,len) \
- do *dest++ = *src++; while (--len > 0)
-
-__LZO_EXTERN_C int __lzo_init_done;
-__LZO_EXTERN_C const char __lzo_copyright[];
-LZO_EXTERN(const lzo_bytep) lzo_copyright(void);
-
-#ifndef __LZO_PTR_H
-#define __LZO_PTR_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(lzo_uintptr_t)
-# if defined(__LZO_MMODEL_HUGE)
-# define lzo_uintptr_t unsigned long
-# else
-# define lzo_uintptr_t acc_uintptr_t
-# ifdef __ACC_INTPTR_T_IS_POINTER
-# define __LZO_UINTPTR_T_IS_POINTER 1
-# endif
-# endif
-#endif
-
-#if (LZO_ARCH_I086)
-#define PTR(a) ((lzo_bytep) (a))
-#define PTR_ALIGNED_4(a) ((ACC_PTR_FP_OFF(a) & 3) == 0)
-#define PTR_ALIGNED2_4(a,b) (((ACC_PTR_FP_OFF(a) | ACC_PTR_FP_OFF(b)) & 3) == 0)
-#elif (LZO_MM_PVP)
-#define PTR(a) ((lzo_bytep) (a))
-#define PTR_ALIGNED_8(a) ((((lzo_uintptr_t)(a)) >> 61) == 0)
-#define PTR_ALIGNED2_8(a,b) ((((lzo_uintptr_t)(a)|(lzo_uintptr_t)(b)) >> 61) == 0)
-#else
-#define PTR(a) ((lzo_uintptr_t) (a))
-#define PTR_LINEAR(a) PTR(a)
-#define PTR_ALIGNED_4(a) ((PTR_LINEAR(a) & 3) == 0)
-#define PTR_ALIGNED_8(a) ((PTR_LINEAR(a) & 7) == 0)
-#define PTR_ALIGNED2_4(a,b) (((PTR_LINEAR(a) | PTR_LINEAR(b)) & 3) == 0)
-#define PTR_ALIGNED2_8(a,b) (((PTR_LINEAR(a) | PTR_LINEAR(b)) & 7) == 0)
-#endif
-
-#define PTR_LT(a,b) (PTR(a) < PTR(b))
-#define PTR_GE(a,b) (PTR(a) >= PTR(b))
-#define PTR_DIFF(a,b) (PTR(a) - PTR(b))
-#define pd(a,b) ((lzo_uint) ((a)-(b)))
-
-LZO_EXTERN(lzo_uintptr_t)
-__lzo_ptr_linear(const lzo_voidp ptr);
-
-typedef union
-{
- char a_char;
- unsigned char a_uchar;
- short a_short;
- unsigned short a_ushort;
- int a_int;
- unsigned int a_uint;
- long a_long;
- unsigned long a_ulong;
- lzo_int a_lzo_int;
- lzo_uint a_lzo_uint;
- lzo_int32 a_lzo_int32;
- lzo_uint32 a_lzo_uint32;
- ptrdiff_t a_ptrdiff_t;
- lzo_uintptr_t a_lzo_uintptr_t;
- lzo_voidp a_lzo_voidp;
- void * a_void_p;
- lzo_bytep a_lzo_bytep;
- lzo_bytepp a_lzo_bytepp;
- lzo_uintp a_lzo_uintp;
- lzo_uint * a_lzo_uint_p;
- lzo_uint32p a_lzo_uint32p;
- lzo_uint32 * a_lzo_uint32_p;
- unsigned char * a_uchar_p;
- char * a_char_p;
-}
-lzo_full_align_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-#define LZO_DETERMINISTIC
-
-#define LZO_DICT_USE_PTR
-#if 0 && (LZO_ARCH_I086)
-# undef LZO_DICT_USE_PTR
-#endif
-
-#if defined(LZO_DICT_USE_PTR)
-# define lzo_dict_t const lzo_bytep
-# define lzo_dict_p lzo_dict_t __LZO_MMODEL *
-#else
-# define lzo_dict_t lzo_uint
-# define lzo_dict_p lzo_dict_t __LZO_MMODEL *
-#endif
-
-#endif
-
-#if !defined(MINILZO_CFG_SKIP_LZO_PTR)
-
-LZO_PUBLIC(lzo_uintptr_t)
-__lzo_ptr_linear(const lzo_voidp ptr)
-{
- lzo_uintptr_t p;
-
-#if (LZO_ARCH_I086)
- p = (((lzo_uintptr_t)(ACC_PTR_FP_SEG(ptr))) << (16 - ACC_MM_AHSHIFT)) + (ACC_PTR_FP_OFF(ptr));
-#elif (LZO_MM_PVP)
- p = (lzo_uintptr_t) (ptr);
- p = (p << 3) | (p >> 61);
-#else
- p = (lzo_uintptr_t) PTR_LINEAR(ptr);
-#endif
-
- return p;
-}
-
-LZO_PUBLIC(unsigned)
-__lzo_align_gap(const lzo_voidp ptr, lzo_uint size)
-{
-#if defined(__LZO_UINTPTR_T_IS_POINTER)
- size_t n = (size_t) ptr;
- n = (((n + size - 1) / size) * size) - n;
-#else
- lzo_uintptr_t p, n;
- p = __lzo_ptr_linear(ptr);
- n = (((p + size - 1) / size) * size) - p;
-#endif
-
- assert(size > 0);
- assert((long)n >= 0);
- assert(n <= size);
- return (unsigned)n;
-}
-
-#endif
-
-/* If you use the LZO library in a product, I would appreciate that you
- * keep this copyright string in the executable of your product.
- */
-
-const char __lzo_copyright[] =
-#if !defined(__LZO_IN_MINLZO)
- LZO_VERSION_STRING;
-#else
- "\r\n\n"
- "LZO data compression library.\n"
- "$Copyright: LZO (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Markus Franz Xaver Johannes Oberhumer\n"
- "<markus@oberhumer.com>\n"
- "http://www.oberhumer.com $\n\n"
- "$Id: LZO version: v" LZO_VERSION_STRING ", " LZO_VERSION_DATE " $\n"
- "$Built: " __DATE__ " " __TIME__ " $\n"
- "$Info: " LZO_INFO_STRING " $\n";
-#endif
-
-LZO_PUBLIC(const lzo_bytep)
-lzo_copyright(void)
-{
-#if (LZO_OS_DOS16 && LZO_CC_TURBOC)
- return (lzo_voidp) __lzo_copyright;
-#else
- return (const lzo_bytep) __lzo_copyright;
-#endif
-}
-
-LZO_PUBLIC(unsigned)
-lzo_version(void)
-{
- return LZO_VERSION;
-}
-
-LZO_PUBLIC(const char *)
-lzo_version_string(void)
-{
- return LZO_VERSION_STRING;
-}
-
-LZO_PUBLIC(const char *)
-lzo_version_date(void)
-{
- return LZO_VERSION_DATE;
-}
-
-LZO_PUBLIC(const lzo_charp)
-_lzo_version_string(void)
-{
- return LZO_VERSION_STRING;
-}
-
-LZO_PUBLIC(const lzo_charp)
-_lzo_version_date(void)
-{
- return LZO_VERSION_DATE;
-}
-
-#define LZO_BASE 65521u
-#define LZO_NMAX 5552
-
-#define LZO_DO1(buf,i) s1 += buf[i]; s2 += s1
-#define LZO_DO2(buf,i) LZO_DO1(buf,i); LZO_DO1(buf,i+1);
-#define LZO_DO4(buf,i) LZO_DO2(buf,i); LZO_DO2(buf,i+2);
-#define LZO_DO8(buf,i) LZO_DO4(buf,i); LZO_DO4(buf,i+4);
-#define LZO_DO16(buf,i) LZO_DO8(buf,i); LZO_DO8(buf,i+8);
-
-LZO_PUBLIC(lzo_uint32)
-lzo_adler32(lzo_uint32 adler, const lzo_bytep buf, lzo_uint len)
-{
- lzo_uint32 s1 = adler & 0xffff;
- lzo_uint32 s2 = (adler >> 16) & 0xffff;
- unsigned k;
-
- if (buf == NULL)
- return 1;
-
- while (len > 0)
- {
- k = len < LZO_NMAX ? (unsigned) len : LZO_NMAX;
- len -= k;
- if (k >= 16) do
- {
- LZO_DO16(buf,0);
- buf += 16;
- k -= 16;
- } while (k >= 16);
- if (k != 0) do
- {
- s1 += *buf++;
- s2 += s1;
- } while (--k > 0);
- s1 %= LZO_BASE;
- s2 %= LZO_BASE;
- }
- return (s2 << 16) | s1;
-}
-
-#undef LZO_DO1
-#undef LZO_DO2
-#undef LZO_DO4
-#undef LZO_DO8
-#undef LZO_DO16
-
-#if !defined(MINILZO_CFG_SKIP_LZO_STRING)
-#undef lzo_memcmp
-#undef lzo_memcpy
-#undef lzo_memmove
-#undef lzo_memset
-#if !defined(__LZO_MMODEL_HUGE)
-# undef LZO_HAVE_MM_HUGE_PTR
-#endif
-#define lzo_hsize_t lzo_uint
-#define lzo_hvoid_p lzo_voidp
-#define lzo_hbyte_p lzo_bytep
-#define LZOLIB_PUBLIC(r,f) LZO_PUBLIC(r) f
-#define lzo_hmemcmp lzo_memcmp
-#define lzo_hmemcpy lzo_memcpy
-#define lzo_hmemmove lzo_memmove
-#define lzo_hmemset lzo_memset
-#define __LZOLIB_HMEMCPY_CH_INCLUDED 1
-#if !defined(LZOLIB_PUBLIC)
-# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f)
-#endif
-LZOLIB_PUBLIC(int, lzo_hmemcmp) (const lzo_hvoid_p s1, const lzo_hvoid_p s2, lzo_hsize_t len)
-{
-#if (LZO_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMCMP)
- const lzo_hbyte_p p1 = (const lzo_hbyte_p) s1;
- const lzo_hbyte_p p2 = (const lzo_hbyte_p) s2;
- if __lzo_likely(len > 0) do
- {
- int d = *p1 - *p2;
- if (d != 0)
- return d;
- p1++; p2++;
- } while __lzo_likely(--len > 0);
- return 0;
-#else
- return memcmp(s1, s2, len);
-#endif
-}
-LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemcpy) (lzo_hvoid_p dest, const lzo_hvoid_p src, lzo_hsize_t len)
-{
-#if (LZO_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMCPY)
- lzo_hbyte_p p1 = (lzo_hbyte_p) dest;
- const lzo_hbyte_p p2 = (const lzo_hbyte_p) src;
- if (!(len > 0) || p1 == p2)
- return dest;
- do
- *p1++ = *p2++;
- while __lzo_likely(--len > 0);
- return dest;
-#else
- return memcpy(dest, src, len);
-#endif
-}
-LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemmove) (lzo_hvoid_p dest, const lzo_hvoid_p src, lzo_hsize_t len)
-{
-#if (LZO_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMMOVE)
- lzo_hbyte_p p1 = (lzo_hbyte_p) dest;
- const lzo_hbyte_p p2 = (const lzo_hbyte_p) src;
- if (!(len > 0) || p1 == p2)
- return dest;
- if (p1 < p2)
- {
- do
- *p1++ = *p2++;
- while __lzo_likely(--len > 0);
- }
- else
- {
- p1 += len;
- p2 += len;
- do
- *--p1 = *--p2;
- while __lzo_likely(--len > 0);
- }
- return dest;
-#else
- return memmove(dest, src, len);
-#endif
-}
-LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemset) (lzo_hvoid_p s, int c, lzo_hsize_t len)
-{
-#if (LZO_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMSET)
- lzo_hbyte_p p = (lzo_hbyte_p) s;
- if __lzo_likely(len > 0) do
- *p++ = (unsigned char) c;
- while __lzo_likely(--len > 0);
- return s;
-#else
- return memset(s, c, len);
-#endif
-}
-#undef LZOLIB_PUBLIC
-#endif
-
-#if !defined(__LZO_IN_MINILZO)
-
-#define ACC_WANT_ACC_CHK_CH 1
-#undef ACCCHK_ASSERT
-
- ACCCHK_ASSERT_IS_SIGNED_T(lzo_int)
- ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uint)
-
- ACCCHK_ASSERT_IS_SIGNED_T(lzo_int32)
- ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uint32)
- ACCCHK_ASSERT((LZO_UINT32_C(1) << (int)(8*sizeof(LZO_UINT32_C(1))-1)) > 0)
- ACCCHK_ASSERT(sizeof(lzo_uint32) >= 4)
-
-#if !defined(__LZO_UINTPTR_T_IS_POINTER)
- ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uintptr_t)
-#endif
- ACCCHK_ASSERT(sizeof(lzo_uintptr_t) >= sizeof(lzo_voidp))
-
- ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_xint)
- ACCCHK_ASSERT(sizeof(lzo_xint) >= sizeof(lzo_uint32))
- ACCCHK_ASSERT(sizeof(lzo_xint) >= sizeof(lzo_uint))
- ACCCHK_ASSERT(sizeof(lzo_xint) == sizeof(lzo_uint32) || sizeof(lzo_xint) == sizeof(lzo_uint))
-
-#endif
-#undef ACCCHK_ASSERT
-
-LZO_PUBLIC(int)
-_lzo_config_check(void)
-{
- lzo_bool r = 1;
- union { unsigned char c[2*sizeof(lzo_xint)]; lzo_xint l[2]; } u;
- lzo_uintptr_t p;
-
-#if !defined(LZO_CFG_NO_CONFIG_CHECK)
-#if defined(LZO_ABI_BIG_ENDIAN)
- u.l[0] = u.l[1] = 0; u.c[sizeof(lzo_xint) - 1] = 128;
- r &= (u.l[0] == 128);
-#endif
-#if defined(LZO_ABI_LITTLE_ENDIAN)
- u.l[0] = u.l[1] = 0; u.c[0] = 128;
- r &= (u.l[0] == 128);
-#endif
-#if defined(LZO_UNALIGNED_OK_2)
- p = (lzo_uintptr_t) (const lzo_voidp) &u.c[0];
- u.l[0] = u.l[1] = 0;
- r &= ((* (const lzo_ushortp) (p+1)) == 0);
-#endif
-#if defined(LZO_UNALIGNED_OK_4)
- p = (lzo_uintptr_t) (const lzo_voidp) &u.c[0];
- u.l[0] = u.l[1] = 0;
- r &= ((* (const lzo_uint32p) (p+1)) == 0);
-#endif
-#endif
-
- LZO_UNUSED(u); LZO_UNUSED(p);
- return r == 1 ? LZO_E_OK : LZO_E_ERROR;
-}
-
-int __lzo_init_done = 0;
-
-LZO_PUBLIC(int)
-__lzo_init_v2(unsigned v, int s1, int s2, int s3, int s4, int s5,
- int s6, int s7, int s8, int s9)
-{
- int r;
-
-#if defined(__LZO_IN_MINILZO)
-#elif (LZO_CC_MSC && ((_MSC_VER) < 700))
-#else
-#define ACC_WANT_ACC_CHK_CH 1
-#undef ACCCHK_ASSERT
-#define ACCCHK_ASSERT(expr) LZO_COMPILE_TIME_ASSERT(expr)
-#endif
-#undef ACCCHK_ASSERT
-
- __lzo_init_done = 1;
-
- if (v == 0)
- return LZO_E_ERROR;
-
- r = (s1 == -1 || s1 == (int) sizeof(short)) &&
- (s2 == -1 || s2 == (int) sizeof(int)) &&
- (s3 == -1 || s3 == (int) sizeof(long)) &&
- (s4 == -1 || s4 == (int) sizeof(lzo_uint32)) &&
- (s5 == -1 || s5 == (int) sizeof(lzo_uint)) &&
- (s6 == -1 || s6 == (int) lzo_sizeof_dict_t) &&
- (s7 == -1 || s7 == (int) sizeof(char *)) &&
- (s8 == -1 || s8 == (int) sizeof(lzo_voidp)) &&
- (s9 == -1 || s9 == (int) sizeof(lzo_callback_t));
- if (!r)
- return LZO_E_ERROR;
-
- r = _lzo_config_check();
- if (r != LZO_E_OK)
- return r;
-
- return r;
-}
-
-#if !defined(__LZO_IN_MINILZO)
-
-#if (LZO_OS_WIN16 && LZO_CC_WATCOMC) && defined(__SW_BD)
-
-#if 0
-BOOL FAR PASCAL LibMain ( HANDLE hInstance, WORD wDataSegment,
- WORD wHeapSize, LPSTR lpszCmdLine )
-#else
-int __far __pascal LibMain ( int a, short b, short c, long d )
-#endif
-{
- LZO_UNUSED(a); LZO_UNUSED(b); LZO_UNUSED(c); LZO_UNUSED(d);
- return 1;
-}
-
-#endif
-
-#endif
-
-#define do_compress _lzo1x_1_do_compress
-
-#if !defined(MINILZO_CFG_SKIP_LZO1X_1_COMPRESS)
-
-#define LZO_NEED_DICT_H
-#define D_BITS 14
-#define D_INDEX1(d,p) d = DM(DMUL(0x21,DX3(p,5,5,6)) >> 5)
-#define D_INDEX2(d,p) d = (d & (D_MASK & 0x7ff)) ^ (D_HIGH | 0x1f)
-
-#ifndef __LZO_CONFIG1X_H
-#define __LZO_CONFIG1X_H
-
-#if !defined(LZO1X) && !defined(LZO1Y) && !defined(LZO1Z)
-# define LZO1X
-#endif
-
-#if !defined(__LZO_IN_MINILZO)
-#include "lzo/lzo1x.h"
-#endif
-
-#define LZO_EOF_CODE
-#undef LZO_DETERMINISTIC
-
-#define M1_MAX_OFFSET 0x0400
-#ifndef M2_MAX_OFFSET
-#define M2_MAX_OFFSET 0x0800
-#endif
-#define M3_MAX_OFFSET 0x4000
-#define M4_MAX_OFFSET 0xbfff
-
-#define MX_MAX_OFFSET (M1_MAX_OFFSET + M2_MAX_OFFSET)
-
-#define M1_MIN_LEN 2
-#define M1_MAX_LEN 2
-#define M2_MIN_LEN 3
-#ifndef M2_MAX_LEN
-#define M2_MAX_LEN 8
-#endif
-#define M3_MIN_LEN 3
-#define M3_MAX_LEN 33
-#define M4_MIN_LEN 3
-#define M4_MAX_LEN 9
-
-#define M1_MARKER 0
-#define M2_MARKER 64
-#define M3_MARKER 32
-#define M4_MARKER 16
-
-#ifndef MIN_LOOKAHEAD
-#define MIN_LOOKAHEAD (M2_MAX_LEN + 1)
-#endif
-
-#if defined(LZO_NEED_DICT_H)
-
-#ifndef LZO_HASH
-#define LZO_HASH LZO_HASH_LZO_INCREMENTAL_B
-#endif
-#define DL_MIN_LEN M2_MIN_LEN
-
-#ifndef __LZO_DICT_H
-#define __LZO_DICT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(D_BITS) && defined(DBITS)
-# define D_BITS DBITS
-#endif
-#if !defined(D_BITS)
-# error "D_BITS is not defined"
-#endif
-#if (D_BITS < 16)
-# define D_SIZE LZO_SIZE(D_BITS)
-# define D_MASK LZO_MASK(D_BITS)
-#else
-# define D_SIZE LZO_USIZE(D_BITS)
-# define D_MASK LZO_UMASK(D_BITS)
-#endif
-#define D_HIGH ((D_MASK >> 1) + 1)
-
-#if !defined(DD_BITS)
-# define DD_BITS 0
-#endif
-#define DD_SIZE LZO_SIZE(DD_BITS)
-#define DD_MASK LZO_MASK(DD_BITS)
-
-#if !defined(DL_BITS)
-# define DL_BITS (D_BITS - DD_BITS)
-#endif
-#if (DL_BITS < 16)
-# define DL_SIZE LZO_SIZE(DL_BITS)
-# define DL_MASK LZO_MASK(DL_BITS)
-#else
-# define DL_SIZE LZO_USIZE(DL_BITS)
-# define DL_MASK LZO_UMASK(DL_BITS)
-#endif
-
-#if (D_BITS != DL_BITS + DD_BITS)
-# error "D_BITS does not match"
-#endif
-#if (D_BITS < 8 || D_BITS > 18)
-# error "invalid D_BITS"
-#endif
-#if (DL_BITS < 8 || DL_BITS > 20)
-# error "invalid DL_BITS"
-#endif
-#if (DD_BITS < 0 || DD_BITS > 6)
-# error "invalid DD_BITS"
-#endif
-
-#if !defined(DL_MIN_LEN)
-# define DL_MIN_LEN 3
-#endif
-#if !defined(DL_SHIFT)
-# define DL_SHIFT ((DL_BITS + (DL_MIN_LEN - 1)) / DL_MIN_LEN)
-#endif
-
-#define LZO_HASH_GZIP 1
-#define LZO_HASH_GZIP_INCREMENTAL 2
-#define LZO_HASH_LZO_INCREMENTAL_A 3
-#define LZO_HASH_LZO_INCREMENTAL_B 4
-
-#if !defined(LZO_HASH)
-# error "choose a hashing strategy"
-#endif
-
-#undef DM
-#undef DX
-
-#if (DL_MIN_LEN == 3)
-# define _DV2_A(p,shift1,shift2) \
- (((( (lzo_xint)((p)[0]) << shift1) ^ (p)[1]) << shift2) ^ (p)[2])
-# define _DV2_B(p,shift1,shift2) \
- (((( (lzo_xint)((p)[2]) << shift1) ^ (p)[1]) << shift2) ^ (p)[0])
-# define _DV3_B(p,shift1,shift2,shift3) \
- ((_DV2_B((p)+1,shift1,shift2) << (shift3)) ^ (p)[0])
-#elif (DL_MIN_LEN == 2)
-# define _DV2_A(p,shift1,shift2) \
- (( (lzo_xint)(p[0]) << shift1) ^ p[1])
-# define _DV2_B(p,shift1,shift2) \
- (( (lzo_xint)(p[1]) << shift1) ^ p[2])
-#else
-# error "invalid DL_MIN_LEN"
-#endif
-#define _DV_A(p,shift) _DV2_A(p,shift,shift)
-#define _DV_B(p,shift) _DV2_B(p,shift,shift)
-#define DA2(p,s1,s2) \
- (((((lzo_xint)((p)[2]) << (s2)) + (p)[1]) << (s1)) + (p)[0])
-#define DS2(p,s1,s2) \
- (((((lzo_xint)((p)[2]) << (s2)) - (p)[1]) << (s1)) - (p)[0])
-#define DX2(p,s1,s2) \
- (((((lzo_xint)((p)[2]) << (s2)) ^ (p)[1]) << (s1)) ^ (p)[0])
-#define DA3(p,s1,s2,s3) ((DA2((p)+1,s2,s3) << (s1)) + (p)[0])
-#define DS3(p,s1,s2,s3) ((DS2((p)+1,s2,s3) << (s1)) - (p)[0])
-#define DX3(p,s1,s2,s3) ((DX2((p)+1,s2,s3) << (s1)) ^ (p)[0])
-#define DMS(v,s) ((lzo_uint) (((v) & (D_MASK >> (s))) << (s)))
-#define DM(v) DMS(v,0)
-
-#if (LZO_HASH == LZO_HASH_GZIP)
-# define _DINDEX(dv,p) (_DV_A((p),DL_SHIFT))
-
-#elif (LZO_HASH == LZO_HASH_GZIP_INCREMENTAL)
-# define __LZO_HASH_INCREMENTAL
-# define DVAL_FIRST(dv,p) dv = _DV_A((p),DL_SHIFT)
-# define DVAL_NEXT(dv,p) dv = (((dv) << DL_SHIFT) ^ p[2])
-# define _DINDEX(dv,p) (dv)
-# define DVAL_LOOKAHEAD DL_MIN_LEN
-
-#elif (LZO_HASH == LZO_HASH_LZO_INCREMENTAL_A)
-# define __LZO_HASH_INCREMENTAL
-# define DVAL_FIRST(dv,p) dv = _DV_A((p),5)
-# define DVAL_NEXT(dv,p) \
- dv ^= (lzo_xint)(p[-1]) << (2*5); dv = (((dv) << 5) ^ p[2])
-# define _DINDEX(dv,p) ((DMUL(0x9f5f,dv)) >> 5)
-# define DVAL_LOOKAHEAD DL_MIN_LEN
-
-#elif (LZO_HASH == LZO_HASH_LZO_INCREMENTAL_B)
-# define __LZO_HASH_INCREMENTAL
-# define DVAL_FIRST(dv,p) dv = _DV_B((p),5)
-# define DVAL_NEXT(dv,p) \
- dv ^= p[-1]; dv = (((dv) >> 5) ^ ((lzo_xint)(p[2]) << (2*5)))
-# define _DINDEX(dv,p) ((DMUL(0x9f5f,dv)) >> 5)
-# define DVAL_LOOKAHEAD DL_MIN_LEN
-
-#else
-# error "choose a hashing strategy"
-#endif
-
-#ifndef DINDEX
-#define DINDEX(dv,p) ((lzo_uint)((_DINDEX(dv,p)) & DL_MASK) << DD_BITS)
-#endif
-#if !defined(DINDEX1) && defined(D_INDEX1)
-#define DINDEX1 D_INDEX1
-#endif
-#if !defined(DINDEX2) && defined(D_INDEX2)
-#define DINDEX2 D_INDEX2
-#endif
-
-#if !defined(__LZO_HASH_INCREMENTAL)
-# define DVAL_FIRST(dv,p) ((void) 0)
-# define DVAL_NEXT(dv,p) ((void) 0)
-# define DVAL_LOOKAHEAD 0
-#endif
-
-#if !defined(DVAL_ASSERT)
-#if defined(__LZO_HASH_INCREMENTAL) && !defined(NDEBUG)
-static void DVAL_ASSERT(lzo_xint dv, const lzo_bytep p)
-{
- lzo_xint df;
- DVAL_FIRST(df,(p));
- assert(DINDEX(dv,p) == DINDEX(df,p));
-}
-#else
-# define DVAL_ASSERT(dv,p) ((void) 0)
-#endif
-#endif
-
-#if defined(LZO_DICT_USE_PTR)
-# define DENTRY(p,in) (p)
-# define GINDEX(m_pos,m_off,dict,dindex,in) m_pos = dict[dindex]
-#else
-# define DENTRY(p,in) ((lzo_uint) ((p)-(in)))
-# define GINDEX(m_pos,m_off,dict,dindex,in) m_off = dict[dindex]
-#endif
-
-#if (DD_BITS == 0)
-
-# define UPDATE_D(dict,drun,dv,p,in) dict[ DINDEX(dv,p) ] = DENTRY(p,in)
-# define UPDATE_I(dict,drun,index,p,in) dict[index] = DENTRY(p,in)
-# define UPDATE_P(ptr,drun,p,in) (ptr)[0] = DENTRY(p,in)
-
-#else
-
-# define UPDATE_D(dict,drun,dv,p,in) \
- dict[ DINDEX(dv,p) + drun++ ] = DENTRY(p,in); drun &= DD_MASK
-# define UPDATE_I(dict,drun,index,p,in) \
- dict[ (index) + drun++ ] = DENTRY(p,in); drun &= DD_MASK
-# define UPDATE_P(ptr,drun,p,in) \
- (ptr) [ drun++ ] = DENTRY(p,in); drun &= DD_MASK
-
-#endif
-
-#if defined(LZO_DICT_USE_PTR)
-
-#define LZO_CHECK_MPOS_DET(m_pos,m_off,in,ip,max_offset) \
- (m_pos == NULL || (m_off = pd(ip, m_pos)) > max_offset)
-
-#define LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,max_offset) \
- (BOUNDS_CHECKING_OFF_IN_EXPR(( \
- m_pos = ip - (lzo_uint) PTR_DIFF(ip,m_pos), \
- PTR_LT(m_pos,in) || \
- (m_off = (lzo_uint) PTR_DIFF(ip,m_pos)) <= 0 || \
- m_off > max_offset )))
-
-#else
-
-#define LZO_CHECK_MPOS_DET(m_pos,m_off,in,ip,max_offset) \
- (m_off == 0 || \
- ((m_off = pd(ip, in) - m_off) > max_offset) || \
- (m_pos = (ip) - (m_off), 0) )
-
-#define LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,max_offset) \
- (pd(ip, in) <= m_off || \
- ((m_off = pd(ip, in) - m_off) > max_offset) || \
- (m_pos = (ip) - (m_off), 0) )
-
-#endif
-
-#if defined(LZO_DETERMINISTIC)
-# define LZO_CHECK_MPOS LZO_CHECK_MPOS_DET
-#else
-# define LZO_CHECK_MPOS LZO_CHECK_MPOS_NON_DET
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-#endif
-
-#endif
-
-#define DO_COMPRESS lzo1x_1_compress
-
-static __lzo_noinline lzo_uint
-do_compress ( const lzo_bytep in , lzo_uint in_len,
- lzo_bytep out, lzo_uintp out_len,
- lzo_voidp wrkmem )
-{
- register const lzo_bytep ip;
- lzo_bytep op;
- const lzo_bytep const in_end = in + in_len;
- const lzo_bytep const ip_end = in + in_len - M2_MAX_LEN - 5;
- const lzo_bytep ii;
- lzo_dict_p const dict = (lzo_dict_p) wrkmem;
-
- op = out;
- ip = in;
- ii = ip;
-
- ip += 4;
- for (;;)
- {
- register const lzo_bytep m_pos;
- lzo_uint m_off;
- lzo_uint m_len;
- lzo_uint dindex;
-
- DINDEX1(dindex,ip);
- GINDEX(m_pos,m_off,dict,dindex,in);
- if (LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,M4_MAX_OFFSET))
- goto literal;
-#if 1
- if (m_off <= M2_MAX_OFFSET || m_pos[3] == ip[3])
- goto try_match;
- DINDEX2(dindex,ip);
-#endif
- GINDEX(m_pos,m_off,dict,dindex,in);
- if (LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,M4_MAX_OFFSET))
- goto literal;
- if (m_off <= M2_MAX_OFFSET || m_pos[3] == ip[3])
- goto try_match;
- goto literal;
-
-try_match:
-#if 1 && defined(LZO_UNALIGNED_OK_2)
- if (* (const lzo_ushortp) m_pos != * (const lzo_ushortp) ip)
-#else
- if (m_pos[0] != ip[0] || m_pos[1] != ip[1])
-#endif
- {
- }
- else
- {
- if __lzo_likely(m_pos[2] == ip[2])
- {
-#if 0
- if (m_off <= M2_MAX_OFFSET)
- goto match;
- if (lit <= 3)
- goto match;
- if (lit == 3)
- {
- assert(op - 2 > out); op[-2] |= LZO_BYTE(3);
- *op++ = *ii++; *op++ = *ii++; *op++ = *ii++;
- goto code_match;
- }
- if (m_pos[3] == ip[3])
-#endif
- goto match;
- }
- else
- {
-#if 0
-#if 0
- if (m_off <= M1_MAX_OFFSET && lit > 0 && lit <= 3)
-#else
- if (m_off <= M1_MAX_OFFSET && lit == 3)
-#endif
- {
- register lzo_uint t;
-
- t = lit;
- assert(op - 2 > out); op[-2] |= LZO_BYTE(t);
- do *op++ = *ii++; while (--t > 0);
- assert(ii == ip);
- m_off -= 1;
- *op++ = LZO_BYTE(M1_MARKER | ((m_off & 3) << 2));
- *op++ = LZO_BYTE(m_off >> 2);
- ip += 2;
- goto match_done;
- }
-#endif
- }
- }
-
-literal:
- UPDATE_I(dict,0,dindex,ip,in);
- ++ip;
- if __lzo_unlikely(ip >= ip_end)
- break;
- continue;
-
-match:
- UPDATE_I(dict,0,dindex,ip,in);
- if (pd(ip,ii) > 0)
- {
- register lzo_uint t = pd(ip,ii);
-
- if (t <= 3)
- {
- assert(op - 2 > out);
- op[-2] |= LZO_BYTE(t);
- }
- else if (t <= 18)
- *op++ = LZO_BYTE(t - 3);
- else
- {
- register lzo_uint tt = t - 18;
-
- *op++ = 0;
- while (tt > 255)
- {
- tt -= 255;
- *op++ = 0;
- }
- assert(tt > 0);
- *op++ = LZO_BYTE(tt);
- }
- do *op++ = *ii++; while (--t > 0);
- }
-
- assert(ii == ip);
- ip += 3;
- if (m_pos[3] != *ip++ || m_pos[4] != *ip++ || m_pos[5] != *ip++ ||
- m_pos[6] != *ip++ || m_pos[7] != *ip++ || m_pos[8] != *ip++
-#ifdef LZO1Y
- || m_pos[ 9] != *ip++ || m_pos[10] != *ip++ || m_pos[11] != *ip++
- || m_pos[12] != *ip++ || m_pos[13] != *ip++ || m_pos[14] != *ip++
-#endif
- )
- {
- --ip;
- m_len = pd(ip, ii);
- assert(m_len >= 3); assert(m_len <= M2_MAX_LEN);
-
- if (m_off <= M2_MAX_OFFSET)
- {
- m_off -= 1;
-#if defined(LZO1X)
- *op++ = LZO_BYTE(((m_len - 1) << 5) | ((m_off & 7) << 2));
- *op++ = LZO_BYTE(m_off >> 3);
-#elif defined(LZO1Y)
- *op++ = LZO_BYTE(((m_len + 1) << 4) | ((m_off & 3) << 2));
- *op++ = LZO_BYTE(m_off >> 2);
-#endif
- }
- else if (m_off <= M3_MAX_OFFSET)
- {
- m_off -= 1;
- *op++ = LZO_BYTE(M3_MARKER | (m_len - 2));
- goto m3_m4_offset;
- }
- else
-#if defined(LZO1X)
- {
- m_off -= 0x4000;
- assert(m_off > 0); assert(m_off <= 0x7fff);
- *op++ = LZO_BYTE(M4_MARKER |
- ((m_off & 0x4000) >> 11) | (m_len - 2));
- goto m3_m4_offset;
- }
-#elif defined(LZO1Y)
- goto m4_match;
-#endif
- }
- else
- {
- {
- const lzo_bytep end = in_end;
- const lzo_bytep m = m_pos + M2_MAX_LEN + 1;
- while (ip < end && *m == *ip)
- m++, ip++;
- m_len = pd(ip, ii);
- }
- assert(m_len > M2_MAX_LEN);
-
- if (m_off <= M3_MAX_OFFSET)
- {
- m_off -= 1;
- if (m_len <= 33)
- *op++ = LZO_BYTE(M3_MARKER | (m_len - 2));
- else
- {
- m_len -= 33;
- *op++ = M3_MARKER | 0;
- goto m3_m4_len;
- }
- }
- else
- {
-#if defined(LZO1Y)
-m4_match:
-#endif
- m_off -= 0x4000;
- assert(m_off > 0); assert(m_off <= 0x7fff);
- if (m_len <= M4_MAX_LEN)
- *op++ = LZO_BYTE(M4_MARKER |
- ((m_off & 0x4000) >> 11) | (m_len - 2));
- else
- {
- m_len -= M4_MAX_LEN;
- *op++ = LZO_BYTE(M4_MARKER | ((m_off & 0x4000) >> 11));
-m3_m4_len:
- while (m_len > 255)
- {
- m_len -= 255;
- *op++ = 0;
- }
- assert(m_len > 0);
- *op++ = LZO_BYTE(m_len);
- }
- }
-
-m3_m4_offset:
- *op++ = LZO_BYTE((m_off & 63) << 2);
- *op++ = LZO_BYTE(m_off >> 6);
- }
-
-#if 0
-match_done:
-#endif
- ii = ip;
- if __lzo_unlikely(ip >= ip_end)
- break;
- }
-
- *out_len = pd(op, out);
- return pd(in_end,ii);
-}
-
-LZO_PUBLIC(int)
-DO_COMPRESS ( const lzo_bytep in , lzo_uint in_len,
- lzo_bytep out, lzo_uintp out_len,
- lzo_voidp wrkmem )
-{
- lzo_bytep op = out;
- lzo_uint t;
-
- if __lzo_unlikely(in_len <= M2_MAX_LEN + 5)
- t = in_len;
- else
- {
- t = do_compress(in,in_len,op,out_len,wrkmem);
- op += *out_len;
- }
-
- if (t > 0)
- {
- const lzo_bytep ii = in + in_len - t;
-
- if (op == out && t <= 238)
- *op++ = LZO_BYTE(17 + t);
- else if (t <= 3)
- op[-2] |= LZO_BYTE(t);
- else if (t <= 18)
- *op++ = LZO_BYTE(t - 3);
- else
- {
- lzo_uint tt = t - 18;
-
- *op++ = 0;
- while (tt > 255)
- {
- tt -= 255;
- *op++ = 0;
- }
- assert(tt > 0);
- *op++ = LZO_BYTE(tt);
- }
- do *op++ = *ii++; while (--t > 0);
- }
-
- *op++ = M4_MARKER | 1;
- *op++ = 0;
- *op++ = 0;
-
- *out_len = pd(op, out);
- return LZO_E_OK;
-}
-
-#endif
-
-#undef do_compress
-#undef DO_COMPRESS
-#undef LZO_HASH
-
-#undef LZO_TEST_OVERRUN
-#undef DO_DECOMPRESS
-#define DO_DECOMPRESS lzo1x_decompress
-
-#if !defined(MINILZO_CFG_SKIP_LZO1X_DECOMPRESS)
-
-#if defined(LZO_TEST_OVERRUN)
-# if !defined(LZO_TEST_OVERRUN_INPUT)
-# define LZO_TEST_OVERRUN_INPUT 2
-# endif
-# if !defined(LZO_TEST_OVERRUN_OUTPUT)
-# define LZO_TEST_OVERRUN_OUTPUT 2
-# endif
-# if !defined(LZO_TEST_OVERRUN_LOOKBEHIND)
-# define LZO_TEST_OVERRUN_LOOKBEHIND
-# endif
-#endif
-
-#undef TEST_IP
-#undef TEST_OP
-#undef TEST_LB
-#undef TEST_LBO
-#undef NEED_IP
-#undef NEED_OP
-#undef HAVE_TEST_IP
-#undef HAVE_TEST_OP
-#undef HAVE_NEED_IP
-#undef HAVE_NEED_OP
-#undef HAVE_ANY_IP
-#undef HAVE_ANY_OP
-
-#if defined(LZO_TEST_OVERRUN_INPUT)
-# if (LZO_TEST_OVERRUN_INPUT >= 1)
-# define TEST_IP (ip < ip_end)
-# endif
-# if (LZO_TEST_OVERRUN_INPUT >= 2)
-# define NEED_IP(x) \
- if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun
-# endif
-#endif
-
-#if defined(LZO_TEST_OVERRUN_OUTPUT)
-# if (LZO_TEST_OVERRUN_OUTPUT >= 1)
-# define TEST_OP (op <= op_end)
-# endif
-# if (LZO_TEST_OVERRUN_OUTPUT >= 2)
-# undef TEST_OP
-# define NEED_OP(x) \
- if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun
-# endif
-#endif
-
-#if defined(LZO_TEST_OVERRUN_LOOKBEHIND)
-# define TEST_LB(m_pos) if (m_pos < out || m_pos >= op) goto lookbehind_overrun
-# define TEST_LBO(m_pos,o) if (m_pos < out || m_pos >= op - (o)) goto lookbehind_overrun
-#else
-# define TEST_LB(m_pos) ((void) 0)
-# define TEST_LBO(m_pos,o) ((void) 0)
-#endif
-
-#if !defined(LZO_EOF_CODE) && !defined(TEST_IP)
-# define TEST_IP (ip < ip_end)
-#endif
-
-#if defined(TEST_IP)
-# define HAVE_TEST_IP
-#else
-# define TEST_IP 1
-#endif
-#if defined(TEST_OP)
-# define HAVE_TEST_OP
-#else
-# define TEST_OP 1
-#endif
-
-#if defined(NEED_IP)
-# define HAVE_NEED_IP
-#else
-# define NEED_IP(x) ((void) 0)
-#endif
-#if defined(NEED_OP)
-# define HAVE_NEED_OP
-#else
-# define NEED_OP(x) ((void) 0)
-#endif
-
-#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP)
-# define HAVE_ANY_IP
-#endif
-#if defined(HAVE_TEST_OP) || defined(HAVE_NEED_OP)
-# define HAVE_ANY_OP
-#endif
-
-#undef __COPY4
-#define __COPY4(dst,src) * (lzo_uint32p)(dst) = * (const lzo_uint32p)(src)
-
-#undef COPY4
-#if defined(LZO_UNALIGNED_OK_4)
-# define COPY4(dst,src) __COPY4(dst,src)
-#elif defined(LZO_ALIGNED_OK_4)
-# define COPY4(dst,src) __COPY4((lzo_uintptr_t)(dst),(lzo_uintptr_t)(src))
-#endif
-
-#if defined(DO_DECOMPRESS)
-LZO_PUBLIC(int)
-DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len,
- lzo_bytep out, lzo_uintp out_len,
- lzo_voidp wrkmem )
-#endif
-{
- register lzo_bytep op;
- register const lzo_bytep ip;
- register lzo_uint t;
-#if defined(COPY_DICT)
- lzo_uint m_off;
- const lzo_bytep dict_end;
-#else
- register const lzo_bytep m_pos;
-#endif
-
- const lzo_bytep const ip_end = in + in_len;
-#if defined(HAVE_ANY_OP)
- lzo_bytep const op_end = out + *out_len;
-#endif
-#if defined(LZO1Z)
- lzo_uint last_m_off = 0;
-#endif
-
- LZO_UNUSED(wrkmem);
-
-#if defined(COPY_DICT)
- if (dict)
- {
- if (dict_len > M4_MAX_OFFSET)
- {
- dict += dict_len - M4_MAX_OFFSET;
- dict_len = M4_MAX_OFFSET;
- }
- dict_end = dict + dict_len;
- }
- else
- {
- dict_len = 0;
- dict_end = NULL;
- }
-#endif
-
- *out_len = 0;
-
- op = out;
- ip = in;
-
- if (*ip > 17)
- {
- t = *ip++ - 17;
- if (t < 4)
- goto match_next;
- assert(t > 0); NEED_OP(t); NEED_IP(t+1);
- do *op++ = *ip++; while (--t > 0);
- goto first_literal_run;
- }
-
- while (TEST_IP && TEST_OP)
- {
- t = *ip++;
- if (t >= 16)
- goto match;
- if (t == 0)
- {
- NEED_IP(1);
- while (*ip == 0)
- {
- t += 255;
- ip++;
- NEED_IP(1);
- }
- t += 15 + *ip++;
- }
- assert(t > 0); NEED_OP(t+3); NEED_IP(t+4);
-#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4)
-#if !defined(LZO_UNALIGNED_OK_4)
- if (PTR_ALIGNED2_4(op,ip))
- {
-#endif
- COPY4(op,ip);
- op += 4; ip += 4;
- if (--t > 0)
- {
- if (t >= 4)
- {
- do {
- COPY4(op,ip);
- op += 4; ip += 4; t -= 4;
- } while (t >= 4);
- if (t > 0) do *op++ = *ip++; while (--t > 0);
- }
- else
- do *op++ = *ip++; while (--t > 0);
- }
-#if !defined(LZO_UNALIGNED_OK_4)
- }
- else
-#endif
-#endif
-#if !defined(LZO_UNALIGNED_OK_4)
- {
- *op++ = *ip++; *op++ = *ip++; *op++ = *ip++;
- do *op++ = *ip++; while (--t > 0);
- }
-#endif
-
-first_literal_run:
-
- t = *ip++;
- if (t >= 16)
- goto match;
-#if defined(COPY_DICT)
-#if defined(LZO1Z)
- m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2);
- last_m_off = m_off;
-#else
- m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2);
-#endif
- NEED_OP(3);
- t = 3; COPY_DICT(t,m_off)
-#else
-#if defined(LZO1Z)
- t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2);
- m_pos = op - t;
- last_m_off = t;
-#else
- m_pos = op - (1 + M2_MAX_OFFSET);
- m_pos -= t >> 2;
- m_pos -= *ip++ << 2;
-#endif
- TEST_LB(m_pos); NEED_OP(3);
- *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos;
-#endif
- goto match_done;
-
- do {
-match:
- if (t >= 64)
- {
-#if defined(COPY_DICT)
-#if defined(LZO1X)
- m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3);
- t = (t >> 5) - 1;
-#elif defined(LZO1Y)
- m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2);
- t = (t >> 4) - 3;
-#elif defined(LZO1Z)
- m_off = t & 0x1f;
- if (m_off >= 0x1c)
- m_off = last_m_off;
- else
- {
- m_off = 1 + (m_off << 6) + (*ip++ >> 2);
- last_m_off = m_off;
- }
- t = (t >> 5) - 1;
-#endif
-#else
-#if defined(LZO1X)
- m_pos = op - 1;
- m_pos -= (t >> 2) & 7;
- m_pos -= *ip++ << 3;
- t = (t >> 5) - 1;
-#elif defined(LZO1Y)
- m_pos = op - 1;
- m_pos -= (t >> 2) & 3;
- m_pos -= *ip++ << 2;
- t = (t >> 4) - 3;
-#elif defined(LZO1Z)
- {
- lzo_uint off = t & 0x1f;
- m_pos = op;
- if (off >= 0x1c)
- {
- assert(last_m_off > 0);
- m_pos -= last_m_off;
- }
- else
- {
- off = 1 + (off << 6) + (*ip++ >> 2);
- m_pos -= off;
- last_m_off = off;
- }
- }
- t = (t >> 5) - 1;
-#endif
- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1);
- goto copy_match;
-#endif
- }
- else if (t >= 32)
- {
- t &= 31;
- if (t == 0)
- {
- NEED_IP(1);
- while (*ip == 0)
- {
- t += 255;
- ip++;
- NEED_IP(1);
- }
- t += 31 + *ip++;
- }
-#if defined(COPY_DICT)
-#if defined(LZO1Z)
- m_off = 1 + (ip[0] << 6) + (ip[1] >> 2);
- last_m_off = m_off;
-#else
- m_off = 1 + (ip[0] >> 2) + (ip[1] << 6);
-#endif
-#else
-#if defined(LZO1Z)
- {
- lzo_uint off = 1 + (ip[0] << 6) + (ip[1] >> 2);
- m_pos = op - off;
- last_m_off = off;
- }
-#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN)
- m_pos = op - 1;
- m_pos -= (* (const lzo_ushortp) ip) >> 2;
-#else
- m_pos = op - 1;
- m_pos -= (ip[0] >> 2) + (ip[1] << 6);
-#endif
-#endif
- ip += 2;
- }
- else if (t >= 16)
- {
-#if defined(COPY_DICT)
- m_off = (t & 8) << 11;
-#else
- m_pos = op;
- m_pos -= (t & 8) << 11;
-#endif
- t &= 7;
- if (t == 0)
- {
- NEED_IP(1);
- while (*ip == 0)
- {
- t += 255;
- ip++;
- NEED_IP(1);
- }
- t += 7 + *ip++;
- }
-#if defined(COPY_DICT)
-#if defined(LZO1Z)
- m_off += (ip[0] << 6) + (ip[1] >> 2);
-#else
- m_off += (ip[0] >> 2) + (ip[1] << 6);
-#endif
- ip += 2;
- if (m_off == 0)
- goto eof_found;
- m_off += 0x4000;
-#if defined(LZO1Z)
- last_m_off = m_off;
-#endif
-#else
-#if defined(LZO1Z)
- m_pos -= (ip[0] << 6) + (ip[1] >> 2);
-#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN)
- m_pos -= (* (const lzo_ushortp) ip) >> 2;
-#else
- m_pos -= (ip[0] >> 2) + (ip[1] << 6);
-#endif
- ip += 2;
- if (m_pos == op)
- goto eof_found;
- m_pos -= 0x4000;
-#if defined(LZO1Z)
- last_m_off = pd((const lzo_bytep)op, m_pos);
-#endif
-#endif
- }
- else
- {
-#if defined(COPY_DICT)
-#if defined(LZO1Z)
- m_off = 1 + (t << 6) + (*ip++ >> 2);
- last_m_off = m_off;
-#else
- m_off = 1 + (t >> 2) + (*ip++ << 2);
-#endif
- NEED_OP(2);
- t = 2; COPY_DICT(t,m_off)
-#else
-#if defined(LZO1Z)
- t = 1 + (t << 6) + (*ip++ >> 2);
- m_pos = op - t;
- last_m_off = t;
-#else
- m_pos = op - 1;
- m_pos -= t >> 2;
- m_pos -= *ip++ << 2;
-#endif
- TEST_LB(m_pos); NEED_OP(2);
- *op++ = *m_pos++; *op++ = *m_pos;
-#endif
- goto match_done;
- }
-
-#if defined(COPY_DICT)
-
- NEED_OP(t+3-1);
- t += 3-1; COPY_DICT(t,m_off)
-
-#else
-
- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1);
-#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4)
-#if !defined(LZO_UNALIGNED_OK_4)
- if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos))
- {
- assert((op - m_pos) >= 4);
-#else
- if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4)
- {
-#endif
- COPY4(op,m_pos);
- op += 4; m_pos += 4; t -= 4 - (3 - 1);
- do {
- COPY4(op,m_pos);
- op += 4; m_pos += 4; t -= 4;
- } while (t >= 4);
- if (t > 0) do *op++ = *m_pos++; while (--t > 0);
- }
- else
-#endif
- {
-copy_match:
- *op++ = *m_pos++; *op++ = *m_pos++;
- do *op++ = *m_pos++; while (--t > 0);
- }
-
-#endif
-
-match_done:
-#if defined(LZO1Z)
- t = ip[-1] & 3;
-#else
- t = ip[-2] & 3;
-#endif
- if (t == 0)
- break;
-
-match_next:
- assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1);
-#if 0
- do *op++ = *ip++; while (--t > 0);
-#else
- *op++ = *ip++;
- if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } }
-#endif
- t = *ip++;
- } while (TEST_IP && TEST_OP);
- }
-
-#if defined(HAVE_TEST_IP) || defined(HAVE_TEST_OP)
- *out_len = pd(op, out);
- return LZO_E_EOF_NOT_FOUND;
-#endif
-
-eof_found:
- assert(t == 1);
- *out_len = pd(op, out);
- return (ip == ip_end ? LZO_E_OK :
- (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN));
-
-#if defined(HAVE_NEED_IP)
-input_overrun:
- *out_len = pd(op, out);
- return LZO_E_INPUT_OVERRUN;
-#endif
-
-#if defined(HAVE_NEED_OP)
-output_overrun:
- *out_len = pd(op, out);
- return LZO_E_OUTPUT_OVERRUN;
-#endif
-
-#if defined(LZO_TEST_OVERRUN_LOOKBEHIND)
-lookbehind_overrun:
- *out_len = pd(op, out);
- return LZO_E_LOOKBEHIND_OVERRUN;
-#endif
-}
-
-#endif
-
-#define LZO_TEST_OVERRUN
-#undef DO_DECOMPRESS
-#define DO_DECOMPRESS lzo1x_decompress_safe
-
-#if !defined(MINILZO_CFG_SKIP_LZO1X_DECOMPRESS_SAFE)
-
-#if defined(LZO_TEST_OVERRUN)
-# if !defined(LZO_TEST_OVERRUN_INPUT)
-# define LZO_TEST_OVERRUN_INPUT 2
-# endif
-# if !defined(LZO_TEST_OVERRUN_OUTPUT)
-# define LZO_TEST_OVERRUN_OUTPUT 2
-# endif
-# if !defined(LZO_TEST_OVERRUN_LOOKBEHIND)
-# define LZO_TEST_OVERRUN_LOOKBEHIND
-# endif
-#endif
-
-#undef TEST_IP
-#undef TEST_OP
-#undef TEST_LB
-#undef TEST_LBO
-#undef NEED_IP
-#undef NEED_OP
-#undef HAVE_TEST_IP
-#undef HAVE_TEST_OP
-#undef HAVE_NEED_IP
-#undef HAVE_NEED_OP
-#undef HAVE_ANY_IP
-#undef HAVE_ANY_OP
-
-#if defined(LZO_TEST_OVERRUN_INPUT)
-# if (LZO_TEST_OVERRUN_INPUT >= 1)
-# define TEST_IP (ip < ip_end)
-# endif
-# if (LZO_TEST_OVERRUN_INPUT >= 2)
-# define NEED_IP(x) \
- if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun
-# endif
-#endif
-
-#if defined(LZO_TEST_OVERRUN_OUTPUT)
-# if (LZO_TEST_OVERRUN_OUTPUT >= 1)
-# define TEST_OP (op <= op_end)
-# endif
-# if (LZO_TEST_OVERRUN_OUTPUT >= 2)
-# undef TEST_OP
-# define NEED_OP(x) \
- if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun
-# endif
-#endif
-
-#if defined(LZO_TEST_OVERRUN_LOOKBEHIND)
-# define TEST_LB(m_pos) if (m_pos < out || m_pos >= op) goto lookbehind_overrun
-# define TEST_LBO(m_pos,o) if (m_pos < out || m_pos >= op - (o)) goto lookbehind_overrun
-#else
-# define TEST_LB(m_pos) ((void) 0)
-# define TEST_LBO(m_pos,o) ((void) 0)
-#endif
-
-#if !defined(LZO_EOF_CODE) && !defined(TEST_IP)
-# define TEST_IP (ip < ip_end)
-#endif
-
-#if defined(TEST_IP)
-# define HAVE_TEST_IP
-#else
-# define TEST_IP 1
-#endif
-#if defined(TEST_OP)
-# define HAVE_TEST_OP
-#else
-# define TEST_OP 1
-#endif
-
-#if defined(NEED_IP)
-# define HAVE_NEED_IP
-#else
-# define NEED_IP(x) ((void) 0)
-#endif
-#if defined(NEED_OP)
-# define HAVE_NEED_OP
-#else
-# define NEED_OP(x) ((void) 0)
-#endif
-
-#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP)
-# define HAVE_ANY_IP
-#endif
-#if defined(HAVE_TEST_OP) || defined(HAVE_NEED_OP)
-# define HAVE_ANY_OP
-#endif
-
-#undef __COPY4
-#define __COPY4(dst,src) * (lzo_uint32p)(dst) = * (const lzo_uint32p)(src)
-
-#undef COPY4
-#if defined(LZO_UNALIGNED_OK_4)
-# define COPY4(dst,src) __COPY4(dst,src)
-#elif defined(LZO_ALIGNED_OK_4)
-# define COPY4(dst,src) __COPY4((lzo_uintptr_t)(dst),(lzo_uintptr_t)(src))
-#endif
-
-#if defined(DO_DECOMPRESS)
-LZO_PUBLIC(int)
-DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len,
- lzo_bytep out, lzo_uintp out_len,
- lzo_voidp wrkmem )
-#endif
-{
- register lzo_bytep op;
- register const lzo_bytep ip;
- register lzo_uint t;
-#if defined(COPY_DICT)
- lzo_uint m_off;
- const lzo_bytep dict_end;
-#else
- register const lzo_bytep m_pos;
-#endif
-
- const lzo_bytep const ip_end = in + in_len;
-#if defined(HAVE_ANY_OP)
- lzo_bytep const op_end = out + *out_len;
-#endif
-#if defined(LZO1Z)
- lzo_uint last_m_off = 0;
-#endif
-
- LZO_UNUSED(wrkmem);
-
-#if defined(COPY_DICT)
- if (dict)
- {
- if (dict_len > M4_MAX_OFFSET)
- {
- dict += dict_len - M4_MAX_OFFSET;
- dict_len = M4_MAX_OFFSET;
- }
- dict_end = dict + dict_len;
- }
- else
- {
- dict_len = 0;
- dict_end = NULL;
- }
-#endif
-
- *out_len = 0;
-
- op = out;
- ip = in;
-
- if (*ip > 17)
- {
- t = *ip++ - 17;
- if (t < 4)
- goto match_next;
- assert(t > 0); NEED_OP(t); NEED_IP(t+1);
- do *op++ = *ip++; while (--t > 0);
- goto first_literal_run;
- }
-
- while (TEST_IP && TEST_OP)
- {
- t = *ip++;
- if (t >= 16)
- goto match;
- if (t == 0)
- {
- NEED_IP(1);
- while (*ip == 0)
- {
- t += 255;
- ip++;
- NEED_IP(1);
- }
- t += 15 + *ip++;
- }
- assert(t > 0); NEED_OP(t+3); NEED_IP(t+4);
-#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4)
-#if !defined(LZO_UNALIGNED_OK_4)
- if (PTR_ALIGNED2_4(op,ip))
- {
-#endif
- COPY4(op,ip);
- op += 4; ip += 4;
- if (--t > 0)
- {
- if (t >= 4)
- {
- do {
- COPY4(op,ip);
- op += 4; ip += 4; t -= 4;
- } while (t >= 4);
- if (t > 0) do *op++ = *ip++; while (--t > 0);
- }
- else
- do *op++ = *ip++; while (--t > 0);
- }
-#if !defined(LZO_UNALIGNED_OK_4)
- }
- else
-#endif
-#endif
-#if !defined(LZO_UNALIGNED_OK_4)
- {
- *op++ = *ip++; *op++ = *ip++; *op++ = *ip++;
- do *op++ = *ip++; while (--t > 0);
- }
-#endif
-
-first_literal_run:
-
- t = *ip++;
- if (t >= 16)
- goto match;
-#if defined(COPY_DICT)
-#if defined(LZO1Z)
- m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2);
- last_m_off = m_off;
-#else
- m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2);
-#endif
- NEED_OP(3);
- t = 3; COPY_DICT(t,m_off)
-#else
-#if defined(LZO1Z)
- t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2);
- m_pos = op - t;
- last_m_off = t;
-#else
- m_pos = op - (1 + M2_MAX_OFFSET);
- m_pos -= t >> 2;
- m_pos -= *ip++ << 2;
-#endif
- TEST_LB(m_pos); NEED_OP(3);
- *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos;
-#endif
- goto match_done;
-
- do {
-match:
- if (t >= 64)
- {
-#if defined(COPY_DICT)
-#if defined(LZO1X)
- m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3);
- t = (t >> 5) - 1;
-#elif defined(LZO1Y)
- m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2);
- t = (t >> 4) - 3;
-#elif defined(LZO1Z)
- m_off = t & 0x1f;
- if (m_off >= 0x1c)
- m_off = last_m_off;
- else
- {
- m_off = 1 + (m_off << 6) + (*ip++ >> 2);
- last_m_off = m_off;
- }
- t = (t >> 5) - 1;
-#endif
-#else
-#if defined(LZO1X)
- m_pos = op - 1;
- m_pos -= (t >> 2) & 7;
- m_pos -= *ip++ << 3;
- t = (t >> 5) - 1;
-#elif defined(LZO1Y)
- m_pos = op - 1;
- m_pos -= (t >> 2) & 3;
- m_pos -= *ip++ << 2;
- t = (t >> 4) - 3;
-#elif defined(LZO1Z)
- {
- lzo_uint off = t & 0x1f;
- m_pos = op;
- if (off >= 0x1c)
- {
- assert(last_m_off > 0);
- m_pos -= last_m_off;
- }
- else
- {
- off = 1 + (off << 6) + (*ip++ >> 2);
- m_pos -= off;
- last_m_off = off;
- }
- }
- t = (t >> 5) - 1;
-#endif
- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1);
- goto copy_match;
-#endif
- }
- else if (t >= 32)
- {
- t &= 31;
- if (t == 0)
- {
- NEED_IP(1);
- while (*ip == 0)
- {
- t += 255;
- ip++;
- NEED_IP(1);
- }
- t += 31 + *ip++;
- }
-#if defined(COPY_DICT)
-#if defined(LZO1Z)
- m_off = 1 + (ip[0] << 6) + (ip[1] >> 2);
- last_m_off = m_off;
-#else
- m_off = 1 + (ip[0] >> 2) + (ip[1] << 6);
-#endif
-#else
-#if defined(LZO1Z)
- {
- lzo_uint off = 1 + (ip[0] << 6) + (ip[1] >> 2);
- m_pos = op - off;
- last_m_off = off;
- }
-#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN)
- m_pos = op - 1;
- m_pos -= (* (const lzo_ushortp) ip) >> 2;
-#else
- m_pos = op - 1;
- m_pos -= (ip[0] >> 2) + (ip[1] << 6);
-#endif
-#endif
- ip += 2;
- }
- else if (t >= 16)
- {
-#if defined(COPY_DICT)
- m_off = (t & 8) << 11;
-#else
- m_pos = op;
- m_pos -= (t & 8) << 11;
-#endif
- t &= 7;
- if (t == 0)
- {
- NEED_IP(1);
- while (*ip == 0)
- {
- t += 255;
- ip++;
- NEED_IP(1);
- }
- t += 7 + *ip++;
- }
-#if defined(COPY_DICT)
-#if defined(LZO1Z)
- m_off += (ip[0] << 6) + (ip[1] >> 2);
-#else
- m_off += (ip[0] >> 2) + (ip[1] << 6);
-#endif
- ip += 2;
- if (m_off == 0)
- goto eof_found;
- m_off += 0x4000;
-#if defined(LZO1Z)
- last_m_off = m_off;
-#endif
-#else
-#if defined(LZO1Z)
- m_pos -= (ip[0] << 6) + (ip[1] >> 2);
-#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN)
- m_pos -= (* (const lzo_ushortp) ip) >> 2;
-#else
- m_pos -= (ip[0] >> 2) + (ip[1] << 6);
-#endif
- ip += 2;
- if (m_pos == op)
- goto eof_found;
- m_pos -= 0x4000;
-#if defined(LZO1Z)
- last_m_off = pd((const lzo_bytep)op, m_pos);
-#endif
-#endif
- }
- else
- {
-#if defined(COPY_DICT)
-#if defined(LZO1Z)
- m_off = 1 + (t << 6) + (*ip++ >> 2);
- last_m_off = m_off;
-#else
- m_off = 1 + (t >> 2) + (*ip++ << 2);
-#endif
- NEED_OP(2);
- t = 2; COPY_DICT(t,m_off)
-#else
-#if defined(LZO1Z)
- t = 1 + (t << 6) + (*ip++ >> 2);
- m_pos = op - t;
- last_m_off = t;
-#else
- m_pos = op - 1;
- m_pos -= t >> 2;
- m_pos -= *ip++ << 2;
-#endif
- TEST_LB(m_pos); NEED_OP(2);
- *op++ = *m_pos++; *op++ = *m_pos;
-#endif
- goto match_done;
- }
-
-#if defined(COPY_DICT)
-
- NEED_OP(t+3-1);
- t += 3-1; COPY_DICT(t,m_off)
-
-#else
-
- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1);
-#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4)
-#if !defined(LZO_UNALIGNED_OK_4)
- if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos))
- {
- assert((op - m_pos) >= 4);
-#else
- if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4)
- {
-#endif
- COPY4(op,m_pos);
- op += 4; m_pos += 4; t -= 4 - (3 - 1);
- do {
- COPY4(op,m_pos);
- op += 4; m_pos += 4; t -= 4;
- } while (t >= 4);
- if (t > 0) do *op++ = *m_pos++; while (--t > 0);
- }
- else
-#endif
- {
-copy_match:
- *op++ = *m_pos++; *op++ = *m_pos++;
- do *op++ = *m_pos++; while (--t > 0);
- }
-
-#endif
-
-match_done:
-#if defined(LZO1Z)
- t = ip[-1] & 3;
-#else
- t = ip[-2] & 3;
-#endif
- if (t == 0)
- break;
-
-match_next:
- assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1);
-#if 0
- do *op++ = *ip++; while (--t > 0);
-#else
- *op++ = *ip++;
- if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } }
-#endif
- t = *ip++;
- } while (TEST_IP && TEST_OP);
- }
-
-#if defined(HAVE_TEST_IP) || defined(HAVE_TEST_OP)
- *out_len = pd(op, out);
- return LZO_E_EOF_NOT_FOUND;
-#endif
-
-eof_found:
- assert(t == 1);
- *out_len = pd(op, out);
- return (ip == ip_end ? LZO_E_OK :
- (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN));
-
-#if defined(HAVE_NEED_IP)
-input_overrun:
- *out_len = pd(op, out);
- return LZO_E_INPUT_OVERRUN;
-#endif
-
-#if defined(HAVE_NEED_OP)
-output_overrun:
- *out_len = pd(op, out);
- return LZO_E_OUTPUT_OVERRUN;
-#endif
-
-#if defined(LZO_TEST_OVERRUN_LOOKBEHIND)
-lookbehind_overrun:
- *out_len = pd(op, out);
- return LZO_E_LOOKBEHIND_OVERRUN;
-#endif
-}
-
-#endif
-
-/***** End of minilzo.c *****/
-
diff --git a/extern/lzo/minilzo/minilzo.h b/extern/lzo/minilzo/minilzo.h
deleted file mode 100644
index 93916bc89b2..00000000000
--- a/extern/lzo/minilzo/minilzo.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* minilzo.h -- mini subset of the LZO real-time data compression library
-
- This file is part of the LZO real-time data compression library.
-
- Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
- All Rights Reserved.
-
- The LZO library 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 LZO library 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 the LZO library; see the file COPYING.
- If not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- Markus F.X.J. Oberhumer
- <markus@oberhumer.com>
- http://www.oberhumer.com/opensource/lzo/
- */
-
-/*
- * NOTE:
- * the full LZO package can be found at
- * http://www.oberhumer.com/opensource/lzo/
- */
-
-
-#ifndef __MINILZO_H
-#define __MINILZO_H
-
-#define MINILZO_VERSION 0x2030
-
-#ifdef __LZOCONF_H
-# error "you cannot use both LZO and miniLZO"
-#endif
-
-#undef LZO_HAVE_CONFIG_H
-#include "lzoconf.h"
-
-#if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION)
-# error "version mismatch in header files"
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/***********************************************************************
-//
-************************************************************************/
-
-/* Memory required for the wrkmem parameter.
- * When the required size is 0, you can also pass a NULL pointer.
- */
-
-#define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS
-#define LZO1X_1_MEM_COMPRESS ((lzo_uint32) (16384L * lzo_sizeof_dict_t))
-#define LZO1X_MEM_DECOMPRESS (0)
-
-
-/* compression */
-LZO_EXTERN(int)
-lzo1x_1_compress ( const lzo_bytep src, lzo_uint src_len,
- lzo_bytep dst, lzo_uintp dst_len,
- lzo_voidp wrkmem );
-
-/* decompression */
-LZO_EXTERN(int)
-lzo1x_decompress ( const lzo_bytep src, lzo_uint src_len,
- lzo_bytep dst, lzo_uintp dst_len,
- lzo_voidp wrkmem /* NOT USED */ );
-
-/* safe decompression with overrun testing */
-LZO_EXTERN(int)
-lzo1x_decompress_safe ( const lzo_bytep src, lzo_uint src_len,
- lzo_bytep dst, lzo_uintp dst_len,
- lzo_voidp wrkmem /* NOT USED */ );
-
-
-#define LZO_OUT_LEN(size) ((size) + (size) / 16 + 64 + 3)
-
-#define LZO_HEAP_ALLOC(var,size) \
- lzo_align_t __LZO_MMODEL var [ ((size) + (sizeof(lzo_align_t) - 1)) / sizeof(lzo_align_t) ]
-
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* already included */
-
diff --git a/intern/CMakeLists.txt b/intern/CMakeLists.txt
index 9efd1a6ee7c..f33ce6a893c 100644
--- a/intern/CMakeLists.txt
+++ b/intern/CMakeLists.txt
@@ -38,7 +38,7 @@ ADD_SUBDIRECTORY(opennl)
ADD_SUBDIRECTORY(smoke)
IF(WITH_ELBEEM)
- ADD_SUBDIRECTORY(elbeem)
+ ADD_SUBDIRECTORY(elbeem)
ENDIF(WITH_ELBEEM)
ADD_SUBDIRECTORY(bsp)
diff --git a/intern/audaspace/CMakeLists.txt b/intern/audaspace/CMakeLists.txt
index 587ef30979b..940a4b2bedc 100644
--- a/intern/audaspace/CMakeLists.txt
+++ b/intern/audaspace/CMakeLists.txt
@@ -25,40 +25,34 @@ SET(INC . intern FX SRC ${PTHREADS_INC} ${LIBSAMPLERATE_INC})
FILE(GLOB SRC intern/*.cpp intern/*.h FX/*.cpp SRC/*.cpp)
IF(WITH_FFMPEG)
- SET(INC ${INC} ffmpeg ${FFMPEG_INC})
- FILE(GLOB FFMPEGSRC ffmpeg/*.cpp)
- ADD_DEFINITIONS(-DWITH_FFMPEG)
+ SET(INC ${INC} ffmpeg ${FFMPEG_INC})
+ FILE(GLOB FFMPEGSRC ffmpeg/*.cpp)
+ ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
IF(WITH_SDL)
- SET(INC ${INC} SDL ${SDL_INCLUDE_DIR})
- FILE(GLOB SDLSRC SDL/*.cpp)
- ADD_DEFINITIONS(-DWITH_SDL)
+ SET(INC ${INC} SDL ${SDL_INCLUDE_DIR})
+ FILE(GLOB SDLSRC SDL/*.cpp)
+ ADD_DEFINITIONS(-DWITH_SDL)
ENDIF(WITH_SDL)
IF(WITH_OPENAL)
- SET(INC ${INC} OpenAL ${OPENAL_INCLUDE_DIR})
- FILE(GLOB OPENALSRC OpenAL/*.cpp)
- ADD_DEFINITIONS(-DWITH_OPENAL)
-
- STRING(REGEX MATCH ".*ramework.*" FRAMEWORK ${OPENAL_INCLUDE_DIR})
- IF(FRAMEWORK)
- ADD_DEFINITIONS(-DAPPLE_FRAMEWORK_FIX)
- ENDIF(FRAMEWORK)
+ SET(INC ${INC} OpenAL ${OPENAL_INCLUDE_DIR})
+ FILE(GLOB OPENALSRC OpenAL/*.cpp)
+ ADD_DEFINITIONS(-DWITH_OPENAL)
+
+ STRING(REGEX MATCH ".*ramework.*" FRAMEWORK ${OPENAL_INCLUDE_DIR})
+ IF(FRAMEWORK)
+ ADD_DEFINITIONS(-DAPPLE_FRAMEWORK_FIX)
+ ENDIF(FRAMEWORK)
ENDIF(WITH_OPENAL)
IF(WITH_JACK)
- SET(INC ${INC} jack ${JACK_INC})
- FILE(GLOB JACKSRC jack/*.cpp)
- ADD_DEFINITIONS(-DWITH_JACK)
+ SET(INC ${INC} jack ${JACK_INC})
+ FILE(GLOB JACKSRC jack/*.cpp)
+ ADD_DEFINITIONS(-DWITH_JACK)
ENDIF(WITH_JACK)
-IF(WITH_SNDFILE)
- SET(INC ${INC} sndfile ${SNDFILE_INC})
- FILE(GLOB SNDFILESRC sndfile/*.cpp)
- ADD_DEFINITIONS(-DWITH_SNDFILE)
-ENDIF(WITH_SNDFILE)
-
-SET(SRC ${SRC} ${FFMPEGSRC} ${SNDFILESRC} ${SDLSRC} ${OPENALSRC} ${JACKSRC})
+SET(SRC ${SRC} ${FFMPEGSRC} ${SDLSRC} ${OPENALSRC} ${JACKSRC})
BLENDERLIB(bf_audaspace "${SRC}" "${INC}")
diff --git a/intern/audaspace/FX/AUD_DoubleReader.cpp b/intern/audaspace/FX/AUD_DoubleReader.cpp
index 8d3afbf2f1d..181e394da98 100644
--- a/intern/audaspace/FX/AUD_DoubleReader.cpp
+++ b/intern/audaspace/FX/AUD_DoubleReader.cpp
@@ -47,7 +47,7 @@ AUD_DoubleReader::AUD_DoubleReader(AUD_IReader* reader1,
AUD_THROW(AUD_ERROR_READER);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
if(reader1)
{
diff --git a/intern/audaspace/FX/AUD_PingPongFactory.cpp b/intern/audaspace/FX/AUD_PingPongFactory.cpp
index 8b72afe05e7..a030d581b1a 100644
--- a/intern/audaspace/FX/AUD_PingPongFactory.cpp
+++ b/intern/audaspace/FX/AUD_PingPongFactory.cpp
@@ -46,7 +46,7 @@ AUD_IReader* AUD_PingPongFactory::createReader()
{
reader2 = factory.createReader();
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
reader2 = 0;
}
diff --git a/intern/audaspace/Makefile b/intern/audaspace/Makefile
index 474f53f0e0f..2d66dcf67fa 100644
--- a/intern/audaspace/Makefile
+++ b/intern/audaspace/Makefile
@@ -44,63 +44,19 @@ ifeq ($(WITH_FFMPEG),true)
DIRS += ffmpeg
endif
-ifeq ($(WITH_OPENAL),true)
- DIRS += OpenAL
-endif
-
-ifeq ($(WITH_JACK),true)
- DIRS += jack
-endif
-
-ifeq ($(WITH_SNDFILE),true)
- DIRS += sndfile
-endif
-
include nan_subdirs.mk
install: $(ALL_OR_DEBUG)
@[ -d $(NAN_AUDASPACE) ] || mkdir $(NAN_AUDASPACE)
@[ -d $(NAN_AUDASPACE)/include ] || mkdir $(NAN_AUDASPACE)/include
@[ -d $(NAN_AUDASPACE)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)
- @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaudaspace.a $(DIR)/$(DEBUG_DIR)libaud_sdl.a $(DIR)/$(DEBUG_DIR)libaud_fx.a $(DIR)/$(DEBUG_DIR)libaud_src.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)
-
-ifeq ($(WITH_FFMPEG),true)
- @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaud_ffmpeg.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)
-endif
-
-ifeq ($(WITH_OPENAL),true)
- @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaud_openal.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)
-endif
-
-ifeq ($(WITH_JACK),true)
- @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaud_jack.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)
-endif
-
-ifeq ($(WITH_SNDFILE),true)
- @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaud_sndfile.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)
-endif
+ @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaudaspace.a $(DIR)/$(DEBUG_DIR)libaud_fx.a $(DIR)/$(DEBUG_DIR)libaud_src.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)
ifeq ($(OS),darwin)
ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaudaspace.a
ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_src.a
ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_fx.a
- ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_sdl.a
-
-ifeq ($(WITH_FFMPEG),true)
- ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_ffmpeg.a
-endif
-
-ifeq ($(WITH_OPENAL),true)
- ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_openal.a
-endif
-
-ifeq ($(WITH_JACK),true)
- ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_jack.a
endif
+ @../tools/cpifdiff.sh intern/*.h $(NAN_AUDASPACE)/include/
-ifeq ($(WITH_SNDFILE),true)
- ranlib $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_sndfile.a
-endif
-endif
- @../tools/cpifdiff.sh intern/*.h $(NAN_AUDASPACE)/include/
diff --git a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
index b33afa2b955..f94b11a11b8 100644
--- a/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
+++ b/intern/audaspace/OpenAL/AUD_OpenALDevice.cpp
@@ -544,13 +544,13 @@ AUD_Handle* AUD_OpenALDevice::play(AUD_IFactory* factory, bool keep)
if(alGetError() != AL_NO_ERROR)
AUD_THROW(AUD_ERROR_OPENAL);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
alDeleteSources(1, &sound->source);
throw;
}
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
delete sound; AUD_DELETE("handle")
alcProcessContext(m_context);
@@ -648,19 +648,19 @@ AUD_Handle* AUD_OpenALDevice::play(AUD_IFactory* factory, bool keep)
if(alGetError() != AL_NO_ERROR)
AUD_THROW(AUD_ERROR_OPENAL);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
alDeleteSources(1, &sound->source);
throw;
}
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
alDeleteBuffers(AUD_OPENAL_CYCLE_BUFFERS, sound->buffers);
throw;
}
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
delete sound; AUD_DELETE("handle")
delete reader; AUD_DELETE("reader")
@@ -1051,13 +1051,13 @@ bool AUD_OpenALDevice::setCapability(int capability, void *value)
if(alGetError() != AL_NO_ERROR)
AUD_THROW(AUD_ERROR_OPENAL);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
alDeleteBuffers(1, &bf->buffer);
throw;
}
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
delete bf; AUD_DELETE("bufferedfactory")
delete reader; AUD_DELETE("reader")
diff --git a/intern/audaspace/SConscript b/intern/audaspace/SConscript
index 025fa5a2379..caae070359a 100644
--- a/intern/audaspace/SConscript
+++ b/intern/audaspace/SConscript
@@ -26,9 +26,4 @@ if env['WITH_BF_JACK']:
incs += ' jack ' + env['BF_JACK_INC']
defs.append('WITH_JACK')
-if env['WITH_BF_SNDFILE']:
- sources += env.Glob('sndfile/*.cpp')
- incs += ' sndfile ' + env['BF_SNDFILE_INC']
- defs.append('WITH_SNDFILE')
-
-env.BlenderLib ('bf_audaspace', sources, Split(incs), defs, libtype=['intern','player'], priority = [25,215] )
+env.BlenderLib ('bf_audaspace', sources, Split(incs), defs, libtype=['intern'], priority = [25] )
diff --git a/intern/audaspace/SDL/AUD_SDLMixerReader.cpp b/intern/audaspace/SDL/AUD_SDLMixerReader.cpp
index 0a47e36533a..ec61f99f02d 100644
--- a/intern/audaspace/SDL/AUD_SDLMixerReader.cpp
+++ b/intern/audaspace/SDL/AUD_SDLMixerReader.cpp
@@ -87,7 +87,7 @@ AUD_SDLMixerReader::AUD_SDLMixerReader(AUD_IReader* reader,
specs.rate) == -1)
AUD_THROW(AUD_ERROR_SDL);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
delete m_reader; AUD_DELETE("reader")
throw;
diff --git a/intern/audaspace/SDL/Makefile b/intern/audaspace/SDL/Makefile
index 02a4068f3dc..e36b2de41fe 100644
--- a/intern/audaspace/SDL/Makefile
+++ b/intern/audaspace/SDL/Makefile
@@ -29,7 +29,7 @@
#
LIBNAME = aud_sdl
-DIR = $(OCGDIR)/intern/audaspace
+DIR = $(OCGDIR)/intern/$(LIBNAME)
include nan_compile.mk
diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp
index f67c819ff10..5f9006b0ec0 100644
--- a/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp
+++ b/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.cpp
@@ -25,24 +25,31 @@
#include "AUD_FFMPEGFactory.h"
#include "AUD_FFMPEGReader.h"
-#include "AUD_Buffer.h"
+#include "AUD_Space.h"
+
+extern "C" {
+#include <libavformat/avformat.h>
+}
AUD_FFMPEGFactory::AUD_FFMPEGFactory(const char* filename)
{
- if(filename != NULL)
+ if(filename != 0)
{
m_filename = new char[strlen(filename)+1]; AUD_NEW("string")
strcpy(m_filename, filename);
}
else
- m_filename = NULL;
+ m_filename = 0;
+ m_buffer = 0;
+ m_size = 0;
}
AUD_FFMPEGFactory::AUD_FFMPEGFactory(unsigned char* buffer, int size)
{
- m_filename = NULL;
- m_buffer = AUD_Reference<AUD_Buffer>(new AUD_Buffer(size));
- memcpy(m_buffer.get()->getBuffer(), buffer, size);
+ m_filename = 0;
+ m_buffer = (unsigned char*)av_malloc(size); AUD_NEW("buffer")
+ m_size = size;
+ memcpy(m_buffer, buffer, size);
}
AUD_FFMPEGFactory::~AUD_FFMPEGFactory()
@@ -51,15 +58,31 @@ AUD_FFMPEGFactory::~AUD_FFMPEGFactory()
{
delete[] m_filename; AUD_DELETE("string")
}
+ if(m_buffer)
+ {
+ av_free(m_buffer); AUD_DELETE("buffer")
+ }
}
AUD_IReader* AUD_FFMPEGFactory::createReader()
{
- AUD_IReader* reader;
- if(m_filename)
- reader = new AUD_FFMPEGReader(m_filename);
- else
- reader = new AUD_FFMPEGReader(m_buffer);
- AUD_NEW("reader")
- return reader;
+ try
+ {
+ AUD_IReader* reader;
+ if(m_filename)
+ reader = new AUD_FFMPEGReader(m_filename);
+ else
+ reader = new AUD_FFMPEGReader(m_buffer, m_size);
+ AUD_NEW("reader")
+ return reader;
+ }
+ catch(AUD_Exception e)
+ {
+ // return 0 if ffmpeg cannot read the file
+ if(e.error == AUD_ERROR_FFMPEG)
+ return 0;
+ // but throw an exception if the file doesn't exist
+ else
+ throw;
+ }
}
diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h b/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h
index 22560303a73..0a9fcc22c8b 100644
--- a/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h
+++ b/intern/audaspace/ffmpeg/AUD_FFMPEGFactory.h
@@ -27,8 +27,6 @@
#define AUD_FFMPEGFACTORY
#include "AUD_IFactory.h"
-#include "AUD_Reference.h"
-class AUD_Buffer;
/**
* This factory reads a sound file via ffmpeg.
@@ -46,7 +44,12 @@ private:
/**
* The buffer to read from.
*/
- AUD_Reference<AUD_Buffer> m_buffer;
+ unsigned char* m_buffer;
+
+ /**
+ * The size of the buffer.
+ */
+ int m_size;
public:
/**
diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
index 0384ba5e0e6..b79375c2dc5 100644
--- a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
+++ b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
@@ -119,7 +119,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(const char* filename)
// find audio stream and codec
m_stream = -1;
- for(unsigned int i = 0; i < m_formatCtx->nb_streams; i++)
+ for(int i = 0; i < m_formatCtx->nb_streams; i++)
if((m_formatCtx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO)
&& (m_stream < 0))
{
@@ -146,7 +146,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(const char* filename)
m_specs.format = FFMPEG_TO_AUD(m_codecCtx->sample_fmt);
m_specs.rate = (AUD_SampleRate) m_codecCtx->sample_rate;
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
av_close_input_file(m_formatCtx);
throw;
@@ -158,22 +158,21 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(const char* filename)
AUD_NEW("buffer")
}
-AUD_FFMPEGReader::AUD_FFMPEGReader(AUD_Reference<AUD_Buffer> buffer)
+AUD_FFMPEGReader::AUD_FFMPEGReader(unsigned char* buffer, int size)
{
m_position = 0;
m_pkgbuf_left = 0;
m_byteiocontext = (ByteIOContext*)av_mallocz(sizeof(ByteIOContext));
AUD_NEW("byteiocontext")
- m_membuffer = buffer;
- if(init_put_byte(m_byteiocontext, buffer.get()->getBuffer(), buffer.get()->getSize(), 0,
+ if(init_put_byte(m_byteiocontext, buffer, size, 0,
NULL, NULL, NULL, NULL) != 0)
AUD_THROW(AUD_ERROR_FILE);
AVProbeData probe_data;
probe_data.filename = "";
- probe_data.buf = buffer.get()->getBuffer();
- probe_data.buf_size = buffer.get()->getSize();
+ probe_data.buf = buffer;
+ probe_data.buf_size = size;
AVInputFormat* fmt = av_probe_input_format(&probe_data, 1);
// open stream
@@ -188,7 +187,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(AUD_Reference<AUD_Buffer> buffer)
// find audio stream and codec
m_stream = -1;
- for(unsigned int i = 0; i < m_formatCtx->nb_streams; i++)
+ for(int i = 0; i < m_formatCtx->nb_streams; i++)
if((m_formatCtx->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO)
&& (m_stream < 0))
{
@@ -215,7 +214,7 @@ AUD_FFMPEGReader::AUD_FFMPEGReader(AUD_Reference<AUD_Buffer> buffer)
m_specs.format = FFMPEG_TO_AUD(m_codecCtx->sample_fmt);
m_specs.rate = (AUD_SampleRate) m_codecCtx->sample_rate;
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
av_close_input_stream(m_formatCtx);
av_free(m_byteiocontext); AUD_DELETE("byteiocontext")
@@ -334,6 +333,7 @@ void AUD_FFMPEGReader::read(int & length, sample_t* & buffer)
// read packages and decode them
AVPacket packet;
int data_size = 0;
+ int pkgbuf_size = m_pkgbuf->getSize();
int pkgbuf_pos;
int left = length;
int sample_size = AUD_SAMPLE_SIZE(m_specs);
diff --git a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.h b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.h
index 6e303934f36..645f5f356f0 100644
--- a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.h
+++ b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.h
@@ -27,9 +27,7 @@
#define AUD_FFMPEGREADER
#include "AUD_IReader.h"
-#include "AUD_Reference.h"
class AUD_Buffer;
-
struct AVCodecContext;
extern "C" {
#include <libavformat/avformat.h>
@@ -92,11 +90,6 @@ private:
int m_stream;
/**
- * The memory file to read from, only saved to keep the buffer alive.
- */
- AUD_Reference<AUD_Buffer> m_membuffer;
-
- /**
* Decodes a packet into the given buffer.
* \param packet The AVPacket to decode.
* \param buffer The target buffer.
@@ -116,10 +109,11 @@ public:
/**
* Creates a new reader.
* \param buffer The buffer to read from.
+ * \param size The size of the buffer.
* \exception AUD_Exception Thrown if the buffer specified cannot be read
* with ffmpeg.
*/
- AUD_FFMPEGReader(AUD_Reference<AUD_Buffer> buffer);
+ AUD_FFMPEGReader(unsigned char* buffer, int size);
/**
* Destroys the reader and closes the file.
diff --git a/intern/audaspace/ffmpeg/Makefile b/intern/audaspace/ffmpeg/Makefile
index 492ac83f532..0bfe6494559 100644
--- a/intern/audaspace/ffmpeg/Makefile
+++ b/intern/audaspace/ffmpeg/Makefile
@@ -29,7 +29,7 @@
#
LIBNAME = aud_ffmpeg
-DIR = $(OCGDIR)/intern/audaspace
+DIR = $(OCGDIR)/intern/$(LIBNAME)
include nan_compile.mk
diff --git a/intern/audaspace/intern/AUD_C-API.cpp b/intern/audaspace/intern/AUD_C-API.cpp
index 7a624aa53fd..d2c8e94c949 100644
--- a/intern/audaspace/intern/AUD_C-API.cpp
+++ b/intern/audaspace/intern/AUD_C-API.cpp
@@ -25,7 +25,6 @@
#include "AUD_NULLDevice.h"
#include "AUD_I3DDevice.h"
-#include "AUD_FileFactory.h"
#include "AUD_StreamBufferFactory.h"
#include "AUD_DelayFactory.h"
#include "AUD_LimiterFactory.h"
@@ -49,6 +48,7 @@
#endif
#ifdef WITH_FFMPEG
+#include "AUD_FFMPEGFactory.h"
extern "C" {
#include <libavformat/avformat.h>
}
@@ -77,9 +77,6 @@ int AUD_init(AUD_DeviceType device, AUD_Specs specs, int buffersize)
#endif
AUD_IDevice* dev = NULL;
- if(AUD_device)
- AUD_exit();
-
try
{
switch(device)
@@ -110,13 +107,16 @@ int AUD_init(AUD_DeviceType device, AUD_Specs specs, int buffersize)
return false;
}
+ if(AUD_device)
+ AUD_exit();
+
AUD_device = dev;
if(AUD_device->checkCapability(AUD_CAPS_3D_DEVICE))
AUD_3ddevice = dynamic_cast<AUD_I3DDevice*>(AUD_device);
return true;
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
return false;
}
@@ -187,13 +187,21 @@ AUD_SoundInfo AUD_getInfo(AUD_Sound* sound)
AUD_Sound* AUD_load(const char* filename)
{
assert(filename);
- return new AUD_FileFactory(filename);
+#ifdef WITH_FFMPEG
+ return new AUD_FFMPEGFactory(filename);
+#else
+ return NULL;
+#endif
}
AUD_Sound* AUD_loadBuffer(unsigned char* buffer, int size)
{
assert(buffer);
- return new AUD_FileFactory(buffer, size);
+#ifdef WITH_FFMPEG
+ return new AUD_FFMPEGFactory(buffer, size);
+#else
+ return NULL;
+#endif
}
AUD_Sound* AUD_bufferSound(AUD_Sound* sound)
@@ -204,7 +212,7 @@ AUD_Sound* AUD_bufferSound(AUD_Sound* sound)
{
return new AUD_StreamBufferFactory(sound);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
return NULL;
}
@@ -218,7 +226,7 @@ AUD_Sound* AUD_delaySound(AUD_Sound* sound, float delay)
{
return new AUD_DelayFactory(sound, delay);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
return NULL;
}
@@ -232,7 +240,7 @@ extern AUD_Sound* AUD_limitSound(AUD_Sound* sound, float start, float end)
{
return new AUD_LimiterFactory(sound, start, end);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
return NULL;
}
@@ -246,7 +254,7 @@ AUD_Sound* AUD_pingpongSound(AUD_Sound* sound)
{
return new AUD_PingPongFactory(sound);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
return NULL;
}
@@ -260,7 +268,7 @@ AUD_Sound* AUD_loopSound(AUD_Sound* sound)
{
return new AUD_LoopFactory(sound);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
return NULL;
}
@@ -278,7 +286,7 @@ int AUD_stopLoop(AUD_Handle* handle)
{
return AUD_device->sendMessage(handle, message);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
}
}
@@ -299,7 +307,7 @@ AUD_Handle* AUD_play(AUD_Sound* sound, int keep)
{
return AUD_device->play(sound, keep);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
return NULL;
}
@@ -360,7 +368,7 @@ AUD_Handle* AUD_play3D(AUD_Sound* sound, int keep)
else
return AUD_device->play(sound, keep);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
return NULL;
}
@@ -376,7 +384,7 @@ int AUD_updateListener(AUD_3DData* data)
if(AUD_3ddevice)
return AUD_3ddevice->updateListener(*data);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
}
return false;
@@ -391,7 +399,7 @@ int AUD_set3DSetting(AUD_3DSetting setting, float value)
if(AUD_3ddevice)
return AUD_3ddevice->setSetting(setting, value);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
}
return false;
@@ -406,7 +414,7 @@ float AUD_get3DSetting(AUD_3DSetting setting)
if(AUD_3ddevice)
return AUD_3ddevice->getSetting(setting);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
}
return 0.0;
@@ -424,7 +432,7 @@ int AUD_update3DSource(AUD_Handle* handle, AUD_3DData* data)
if(AUD_3ddevice)
return AUD_3ddevice->updateSource(handle, *data);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
}
}
@@ -443,7 +451,7 @@ int AUD_set3DSourceSetting(AUD_Handle* handle,
if(AUD_3ddevice)
return AUD_3ddevice->setSourceSetting(handle, setting, value);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
}
}
@@ -461,7 +469,7 @@ float AUD_get3DSourceSetting(AUD_Handle* handle, AUD_3DSourceSetting setting)
if(AUD_3ddevice)
return AUD_3ddevice->getSourceSetting(handle, setting);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
}
}
@@ -481,7 +489,7 @@ int AUD_setSoundVolume(AUD_Handle* handle, float volume)
{
return AUD_device->setCapability(AUD_CAPS_SOURCE_VOLUME, &caps);
}
- catch(AUD_Exception) {}
+ catch(AUD_Exception e) {}
}
return false;
}
@@ -499,7 +507,7 @@ int AUD_setSoundPitch(AUD_Handle* handle, float pitch)
{
return AUD_device->setCapability(AUD_CAPS_SOURCE_PITCH, &caps);
}
- catch(AUD_Exception) {}
+ catch(AUD_Exception e) {}
}
return false;
}
@@ -510,7 +518,7 @@ AUD_Device* AUD_openReadDevice(AUD_Specs specs)
{
return new AUD_ReadDevice(specs);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
return NULL;
}
@@ -525,7 +533,7 @@ int AUD_playDevice(AUD_Device* device, AUD_Sound* sound)
{
return device->play(sound) != NULL;
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
return false;
}
@@ -540,7 +548,7 @@ int AUD_readDevice(AUD_Device* device, sample_t* buffer, int length)
{
return device->read(buffer, length);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
return false;
}
@@ -554,7 +562,7 @@ void AUD_closeReadDevice(AUD_Device* device)
{
delete device;
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
}
}
diff --git a/intern/audaspace/intern/Makefile b/intern/audaspace/intern/Makefile
index 4bdca04c1cb..2dcc7798f1c 100644
--- a/intern/audaspace/intern/Makefile
+++ b/intern/audaspace/intern/Makefile
@@ -35,32 +35,6 @@ include nan_compile.mk
CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-ifeq ($(WITH_SDL),true)
- CPPFLAGS += -DWITH_SDL
- CPPFLAGS += $(NAN_SDLCFLAGS)
-endif
-
-ifeq ($(WITH_OPENAL),true)
- CPPFLAGS += -DWITH_OPENAL
- CPPFLAGS += -I../OpenAL
-endif
-
-ifeq ($(WITH_JACK),true)
- CPPFLAGS += -DWITH_JACK
- CPPFLAGS += $(NAN_JACKCFLAGS)
- CPPFLAGS += -I../jack
-endif
-
-ifeq ($(WITH_FFMPEG),true)
- CPPFLAGS += -DWITH_FFMPEG
- CPPFLAGS += $(NAN_FFMPEGCFLAGS)
-endif
-
-ifeq ($(WITH_SNDFILE),true)
- CPPFLAGS += -DWITH_SNDFILE
- CPPFLAGS += -I../sndfile
-endif
-
CPPFLAGS += -I$(LCGDIR)/samplerate/include/
CPPFLAGS += -I../ffmpeg
CPPFLAGS += -I../FX
diff --git a/intern/audaspace/jack/AUD_JackDevice.cpp b/intern/audaspace/jack/AUD_JackDevice.cpp
index 4d8ab93d672..445e68e1a9a 100644
--- a/intern/audaspace/jack/AUD_JackDevice.cpp
+++ b/intern/audaspace/jack/AUD_JackDevice.cpp
@@ -35,7 +35,7 @@
int AUD_JackDevice::jack_mix(jack_nframes_t length, void *data)
{
AUD_JackDevice* device = (AUD_JackDevice*)data;
- unsigned int samplesize = AUD_SAMPLE_SIZE(device->m_specs);
+ int samplesize = AUD_SAMPLE_SIZE(device->m_specs);
if(device->m_buffer->getSize() < samplesize * length)
device->m_buffer->resize(samplesize * length);
device->mix(device->m_buffer->getBuffer(), length);
@@ -44,10 +44,10 @@ int AUD_JackDevice::jack_mix(jack_nframes_t length, void *data)
float* out;
int count = device->m_specs.channels;
- for(unsigned int i = 0; i < count; i++)
+ for(int i = 0; i < count; i++)
{
out = (float*)jack_port_get_buffer(device->m_ports[i], length);
- for(unsigned int j = 0; j < length; j++)
+ for(int j = 0; j < length; j++)
out[j] = in[j * count + i];
}
@@ -105,7 +105,7 @@ AUD_JackDevice::AUD_JackDevice(AUD_Specs specs)
if(jack_activate(m_client))
AUD_THROW(AUD_ERROR_JACK);
}
- catch(AUD_Exception)
+ catch(AUD_Exception e)
{
jack_client_close(m_client);
delete[] m_ports; AUD_DELETE("jack_port")
diff --git a/intern/audaspace/jack/AUD_JackDevice.h b/intern/audaspace/jack/AUD_JackDevice.h
index f0c887a2f43..0b09e20b354 100644
--- a/intern/audaspace/jack/AUD_JackDevice.h
+++ b/intern/audaspace/jack/AUD_JackDevice.h
@@ -26,7 +26,6 @@
#ifndef AUD_JACKDEVICE
#define AUD_JACKDEVICE
-
#include "AUD_SoftwareDevice.h"
class AUD_Buffer;
diff --git a/intern/audaspace/jack/Makefile b/intern/audaspace/jack/Makefile
index 23cadf559c0..a6cc9119c6d 100644
--- a/intern/audaspace/jack/Makefile
+++ b/intern/audaspace/jack/Makefile
@@ -35,10 +35,6 @@ include nan_compile.mk
CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-# If we are here, jack is enable.
-CPPFLAGS += -DWITH_JACK
-CPPFLAGS += $(NAN_JACKCFLAGS)
-
CPPFLAGS += -I../intern
CPPFLAGS += -I..
CPPFLAGS += -I.
diff --git a/intern/audaspace/make/msvc_9_0/audaspace.vcproj b/intern/audaspace/make/msvc_9_0/audaspace.vcproj
index 0d8ade43e07..2bb97502c4e 100644
--- a/intern/audaspace/make/msvc_9_0/audaspace.vcproj
+++ b/intern/audaspace/make/msvc_9_0/audaspace.vcproj
@@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="2"
- AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include"
+ AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include"
PreprocessorDefinitions="WIN32,NDEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL"
StringPooling="true"
RuntimeLibrary="0"
@@ -117,7 +117,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include"
+ AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include"
PreprocessorDefinitions="WIN32,_DEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -192,7 +192,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="2"
- AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include"
+ AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include"
PreprocessorDefinitions="WIN32,NDEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL"
StringPooling="true"
RuntimeLibrary="2"
@@ -266,7 +266,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include"
+ AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include"
PreprocessorDefinitions="WIN32,_DEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -381,14 +381,6 @@
>
</File>
<File
- RelativePath="..\..\intern\AUD_FileFactory.cpp"
- >
- </File>
- <File
- RelativePath="..\..\intern\AUD_FileFactory.h"
- >
- </File>
- <File
RelativePath="..\..\intern\AUD_FloatMixer.cpp"
>
</File>
@@ -725,38 +717,6 @@
>
</File>
</Filter>
- <Filter
- Name="jack"
- >
- <File
- RelativePath="..\..\jack\AUD_JackDevice.cpp"
- >
- </File>
- <File
- RelativePath="..\..\jack\AUD_JackDevice.h"
- >
- </File>
- </Filter>
- <Filter
- Name="sndfile"
- >
- <File
- RelativePath="..\..\sndfile\AUD_SndFileFactory.cpp"
- >
- </File>
- <File
- RelativePath="..\..\sndfile\AUD_SndFileFactory.h"
- >
- </File>
- <File
- RelativePath="..\..\sndfile\AUD_SndFileReader.cpp"
- >
- </File>
- <File
- RelativePath="..\..\sndfile\AUD_SndFileReader.h"
- >
- </File>
- </Filter>
<File
RelativePath="..\..\AUD_C-API.h"
>
diff --git a/intern/audaspace/sndfile/AUD_SndFileFactory.cpp b/intern/audaspace/sndfile/AUD_SndFileFactory.cpp
deleted file mode 100644
index bac6dc321f4..00000000000
--- a/intern/audaspace/sndfile/AUD_SndFileFactory.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * $Id$
- *
- * ***** BEGIN LGPL LICENSE BLOCK *****
- *
- * Copyright 2009 Jörg Hermann Müller
- *
- * This file is part of AudaSpace.
- *
- * AudaSpace is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AudaSpace 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 Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
- *
- * ***** END LGPL LICENSE BLOCK *****
- */
-
-#include "AUD_SndFileFactory.h"
-#include "AUD_SndFileReader.h"
-#include "AUD_Buffer.h"
-
-#include <cstring>
-
-AUD_SndFileFactory::AUD_SndFileFactory(const char* filename)
-{
- if(filename != NULL)
- {
- m_filename = new char[strlen(filename)+1]; AUD_NEW("string")
- strcpy(m_filename, filename);
- }
- else
- m_filename = NULL;
-}
-
-AUD_SndFileFactory::AUD_SndFileFactory(unsigned char* buffer, int size)
-{
- m_filename = NULL;
- m_buffer = AUD_Reference<AUD_Buffer>(new AUD_Buffer(size));
- memcpy(m_buffer.get()->getBuffer(), buffer, size);
-}
-
-AUD_SndFileFactory::~AUD_SndFileFactory()
-{
- if(m_filename)
- {
- delete[] m_filename; AUD_DELETE("string")
- }
-}
-
-AUD_IReader* AUD_SndFileFactory::createReader()
-{
- AUD_IReader* reader;
- if(m_filename)
- reader = new AUD_SndFileReader(m_filename);
- else
- reader = new AUD_SndFileReader(m_buffer);
- AUD_NEW("reader")
- return reader;
-}
diff --git a/intern/audaspace/sndfile/AUD_SndFileFactory.h b/intern/audaspace/sndfile/AUD_SndFileFactory.h
deleted file mode 100644
index 98187ff1590..00000000000
--- a/intern/audaspace/sndfile/AUD_SndFileFactory.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * $Id$
- *
- * ***** BEGIN LGPL LICENSE BLOCK *****
- *
- * Copyright 2009 Jörg Hermann Müller
- *
- * This file is part of AudaSpace.
- *
- * AudaSpace is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AudaSpace 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 Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
- *
- * ***** END LGPL LICENSE BLOCK *****
- */
-
-#ifndef AUD_SNDFILEFACTORY
-#define AUD_SNDFILEFACTORY
-
-#include "AUD_IFactory.h"
-#include "AUD_Reference.h"
-class AUD_Buffer;
-
-/**
- * This factory reads a sound file via libsndfile.
- */
-class AUD_SndFileFactory : public AUD_IFactory
-{
-private:
- /**
- * The filename of the sound source file.
- */
- char* m_filename;
-
- /**
- * The buffer to read from.
- */
- AUD_Reference<AUD_Buffer> m_buffer;
-
-public:
- /**
- * Creates a new factory.
- * \param filename The sound file path.
- */
- AUD_SndFileFactory(const char* filename);
-
- /**
- * Creates a new factory.
- * \param buffer The buffer to read from.
- * \param size The size of the buffer.
- */
- AUD_SndFileFactory(unsigned char* buffer, int size);
-
- /**
- * Destroys the factory.
- */
- ~AUD_SndFileFactory();
-
- virtual AUD_IReader* createReader();
-};
-
-#endif //AUD_SNDFILEFACTORY
diff --git a/intern/audaspace/sndfile/AUD_SndFileReader.cpp b/intern/audaspace/sndfile/AUD_SndFileReader.cpp
deleted file mode 100644
index 485818552bb..00000000000
--- a/intern/audaspace/sndfile/AUD_SndFileReader.cpp
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * $Id$
- *
- * ***** BEGIN LGPL LICENSE BLOCK *****
- *
- * Copyright 2009 Jörg Hermann Müller
- *
- * This file is part of AudaSpace.
- *
- * AudaSpace is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AudaSpace 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 Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
- *
- * ***** END LGPL LICENSE BLOCK *****
- */
-
-#include "AUD_SndFileReader.h"
-#include "AUD_Buffer.h"
-
-#include <cstring>
-
-// This function transforms a SampleFormat to our own sample format
-static inline AUD_SampleFormat SNDFILE_TO_AUD(int fmt)
-{
- switch(fmt & SF_FORMAT_SUBMASK)
- {
- // only read s16, s32 and double as they are
- case SF_FORMAT_PCM_16:
- return AUD_FORMAT_S16;
- case SF_FORMAT_PCM_32:
- return AUD_FORMAT_S32;
- case SF_FORMAT_DOUBLE:
- return AUD_FORMAT_FLOAT64;
- // read all other formats as floats
- default:
- return AUD_FORMAT_FLOAT32;
- }
-}
-
-sf_count_t AUD_SndFileReader::vio_get_filelen(void *user_data)
-{
- AUD_SndFileReader* reader = (AUD_SndFileReader*)user_data;
- return reader->m_membuffer.get()->getSize();
-}
-
-sf_count_t AUD_SndFileReader::vio_seek(sf_count_t offset, int whence, void *user_data)
-{
- AUD_SndFileReader* reader = (AUD_SndFileReader*)user_data;
-
- switch(whence)
- {
- case SEEK_SET:
- reader->m_memoffset = offset;
- break;
- case SEEK_CUR:
- reader->m_memoffset = reader->m_memoffset + offset;
- break;
- case SEEK_END:
- reader->m_memoffset = reader->m_membuffer.get()->getSize() + offset;
- break;
- }
-
- return reader->m_memoffset;
-}
-
-sf_count_t AUD_SndFileReader::vio_read(void *ptr, sf_count_t count, void *user_data)
-{
- AUD_SndFileReader* reader = (AUD_SndFileReader*)user_data;
-
- if(reader->m_memoffset + count > reader->m_membuffer.get()->getSize())
- count = reader->m_membuffer.get()->getSize() - reader->m_memoffset;
-
- memcpy(ptr, reader->m_membuffer.get()->getBuffer() + reader->m_memoffset, count);
- reader->m_memoffset += count;
-
- return count;
-}
-
-sf_count_t AUD_SndFileReader::vio_tell(void *user_data)
-{
- AUD_SndFileReader* reader = (AUD_SndFileReader*)user_data;
-
- return reader->m_memoffset;
-}
-
-AUD_SndFileReader::AUD_SndFileReader(const char* filename)
-{
- SF_INFO sfinfo;
-
- sfinfo.format = 0;
- m_sndfile = sf_open(filename, SFM_READ, &sfinfo);
-
- if(!m_sndfile)
- AUD_THROW(AUD_ERROR_FILE);
-
- m_specs.channels = (AUD_Channels) sfinfo.channels;
- m_specs.format = SNDFILE_TO_AUD(sfinfo.format);
- m_specs.rate = (AUD_SampleRate) sfinfo.samplerate;
- m_length = sfinfo.frames;
- m_seekable = sfinfo.seekable;
- m_position = 0;
-
- switch(m_specs.format)
- {
- case AUD_FORMAT_S16:
- m_read = (sf_read_f) sf_readf_short;
- break;
- case AUD_FORMAT_S32:
- m_read = (sf_read_f) sf_readf_int;
- break;
- case AUD_FORMAT_FLOAT64:
- m_read = (sf_read_f) sf_readf_double;
- break;
- default:
- m_read = (sf_read_f) sf_readf_float;
- }
-
- m_buffer = new AUD_Buffer(); AUD_NEW("buffer")
-}
-
-AUD_SndFileReader::AUD_SndFileReader(AUD_Reference<AUD_Buffer> buffer)
-{
- m_membuffer = buffer;
- m_memoffset = 0;
-
- m_vio.get_filelen = vio_get_filelen;
- m_vio.read = vio_read;
- m_vio.seek = vio_seek;
- m_vio.tell = vio_tell;
- m_vio.write = NULL;
-
- SF_INFO sfinfo;
-
- sfinfo.format = 0;
- m_sndfile = sf_open_virtual(&m_vio, SFM_READ, &sfinfo, this);
-
- if(!m_sndfile)
- AUD_THROW(AUD_ERROR_FILE);
-
- m_specs.channels = (AUD_Channels) sfinfo.channels;
- m_specs.format = SNDFILE_TO_AUD(sfinfo.format);
- m_specs.rate = (AUD_SampleRate) sfinfo.samplerate;
- m_length = sfinfo.frames;
- m_seekable = sfinfo.seekable;
- m_position = 0;
-
- switch(m_specs.format)
- {
- case AUD_FORMAT_S16:
- m_read = (sf_read_f) sf_readf_short;
- break;
- case AUD_FORMAT_S32:
- m_read = (sf_read_f) sf_readf_int;
- break;
- case AUD_FORMAT_FLOAT64:
- m_read = (sf_read_f) sf_readf_double;
- break;
- default:
- m_read = (sf_read_f) sf_readf_float;
- }
-
- m_buffer = new AUD_Buffer(); AUD_NEW("buffer")
-}
-
-AUD_SndFileReader::~AUD_SndFileReader()
-{
- sf_close(m_sndfile);
-
- delete m_buffer; AUD_DELETE("buffer")
-}
-
-bool AUD_SndFileReader::isSeekable()
-{
- return m_seekable;
-}
-
-void AUD_SndFileReader::seek(int position)
-{
- if(m_seekable)
- {
- position = sf_seek(m_sndfile, position, SEEK_SET);
- m_position = position;
- }
-}
-
-int AUD_SndFileReader::getLength()
-{
- return m_length;
-}
-
-int AUD_SndFileReader::getPosition()
-{
- return m_position;
-}
-
-AUD_Specs AUD_SndFileReader::getSpecs()
-{
- return m_specs;
-}
-
-AUD_ReaderType AUD_SndFileReader::getType()
-{
- return AUD_TYPE_STREAM;
-}
-
-bool AUD_SndFileReader::notify(AUD_Message &message)
-{
- return false;
-}
-
-void AUD_SndFileReader::read(int & length, sample_t* & buffer)
-{
- int sample_size = AUD_SAMPLE_SIZE(m_specs);
-
- // resize output buffer if necessary
- if(m_buffer->getSize() < length*sample_size)
- m_buffer->resize(length*sample_size);
-
- buffer = m_buffer->getBuffer();
-
- length = m_read(m_sndfile, buffer, length);
-
- m_position += length;
-}
diff --git a/intern/audaspace/sndfile/AUD_SndFileReader.h b/intern/audaspace/sndfile/AUD_SndFileReader.h
deleted file mode 100644
index da890ef53ca..00000000000
--- a/intern/audaspace/sndfile/AUD_SndFileReader.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * $Id$
- *
- * ***** BEGIN LGPL LICENSE BLOCK *****
- *
- * Copyright 2009 Jörg Hermann Müller
- *
- * This file is part of AudaSpace.
- *
- * AudaSpace is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AudaSpace 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 Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
- *
- * ***** END LGPL LICENSE BLOCK *****
- */
-
-#ifndef AUD_SNDFILEREADER
-#define AUD_SNDFILEREADER
-
-#include "AUD_IReader.h"
-#include "AUD_Reference.h"
-class AUD_Buffer;
-
-#include <sndfile.h>
-
-typedef sf_count_t (*sf_read_f)(SNDFILE *sndfile, void *ptr, sf_count_t frames);
-
-/**
- * This class reads a sound file via libsndfile.
- */
-class AUD_SndFileReader : public AUD_IReader
-{
-private:
- /**
- * The current position in samples.
- */
- int m_position;
-
- /**
- * The sample count in the file.
- */
- int m_length;
-
- /**
- * Whether the file is seekable.
- */
- bool m_seekable;
-
- /**
- * The specification of the audio data.
- */
- AUD_Specs m_specs;
-
- /**
- * The playback buffer.
- */
- AUD_Buffer* m_buffer;
-
- /**
- * The sndfile.
- */
- SNDFILE* m_sndfile;
-
- /**
- * The reading function.
- */
- sf_read_f m_read;
-
- /**
- * The virtual IO structure for memory file reading.
- */
- SF_VIRTUAL_IO m_vio;
-
- /**
- * The pointer to the memory file.
- */
- AUD_Reference<AUD_Buffer> m_membuffer;
-
- /**
- * The current reading pointer of the memory file.
- */
- int m_memoffset;
-
- // Functions for libsndfile virtual IO functionality
- static sf_count_t vio_get_filelen(void *user_data);
- static sf_count_t vio_seek(sf_count_t offset, int whence, void *user_data);
- static sf_count_t vio_read(void *ptr, sf_count_t count, void *user_data);
- static sf_count_t vio_tell(void *user_data);
-
-public:
- /**
- * Creates a new reader.
- * \param filename The path to the file to be read.
- * \exception AUD_Exception Thrown if the file specified does not exist or
- * cannot be read with libsndfile.
- */
- AUD_SndFileReader(const char* filename);
-
- /**
- * Creates a new reader.
- * \param buffer The buffer to read from.
- * \exception AUD_Exception Thrown if the buffer specified cannot be read
- * with libsndfile.
- */
- AUD_SndFileReader(AUD_Reference<AUD_Buffer> buffer);
-
- /**
- * Destroys the reader and closes the file.
- */
- virtual ~AUD_SndFileReader();
-
- virtual bool isSeekable();
- virtual void seek(int position);
- virtual int getLength();
- virtual int getPosition();
- virtual AUD_Specs getSpecs();
- virtual AUD_ReaderType getType();
- virtual bool notify(AUD_Message &message);
- virtual void read(int & length, sample_t* & buffer);
-};
-
-#endif //AUD_SNDFILEREADER
diff --git a/intern/audaspace/sndfile/Makefile b/intern/audaspace/sndfile/Makefile
deleted file mode 100644
index 1cf0b2683fb..00000000000
--- a/intern/audaspace/sndfile/Makefile
+++ /dev/null
@@ -1,40 +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., 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):
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-#
-
-LIBNAME = aud_sndfile
-DIR = $(OCGDIR)/intern/audaspace
-
-include nan_compile.mk
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I../intern
-CPPFLAGS += -I..
-CPPFLAGS += -I.
diff --git a/intern/elbeem/CMakeLists.txt b/intern/elbeem/CMakeLists.txt
index e541d334086..8b8a3000efd 100644
--- a/intern/elbeem/CMakeLists.txt
+++ b/intern/elbeem/CMakeLists.txt
@@ -30,11 +30,11 @@ FILE(GLOB SRC intern/*.cpp)
ADD_DEFINITIONS(-DNOGUI -DELBEEM_BLENDER=1)
IF(WINDOWS)
- ADD_DEFINITIONS(-DUSE_MSVC6FIXES)
+ ADD_DEFINITIONS(-DUSE_MSVC6FIXES)
ENDIF(WINDOWS)
IF(WITH_OPENMP)
- ADD_DEFINITIONS(-DPARALLEL=1)
+ ADD_DEFINITIONS(-DPARALLEL=1)
ENDIF(WITH_OPENMP)
BLENDERLIB_NOLIST(bf_elbeem "${SRC}" "${INC}")
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index 9128e923e19..3d588ecfd00 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -29,30 +29,30 @@ SET(INC . ../string)
FILE(GLOB SRC intern/*.cpp)
IF(APPLE)
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp")
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp")
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp")
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp")
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp")
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp")
ELSE(APPLE)
- IF(WIN32)
- SET(INC ${INC} ${WINTAB_INC})
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp")
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp")
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp")
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp")
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp")
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp")
- ELSE(WIN32)
- SET(INC ${INC} ${X11_X11_INCLUDE_PATH})
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp")
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp")
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp")
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp")
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp")
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp")
- ENDIF(WIN32)
+ IF(WIN32)
+ SET(INC ${INC} ${WINTAB_INC})
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerX11.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp")
+ ELSE(WIN32)
+ SET(INC ${INC} ${X11_X11_INCLUDE_PATH})
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerWin32.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemWin32.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowWin32.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_DisplayManagerCarbon.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemCarbon.cpp")
+ LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowCarbon.cpp")
+ ENDIF(WIN32)
ENDIF(APPLE)
BLENDERLIB(bf_ghost "${SRC}" "${INC}")
diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript
index 48009152699..9de82ac44fb 100644
--- a/intern/ghost/SConscript
+++ b/intern/ghost/SConscript
@@ -29,4 +29,4 @@ else:
incs = '. ../string ' + env['BF_OPENGL_INC']
if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
incs = env['BF_WINTAB_INC'] + ' ' + incs
-env.BlenderLib ('bf_ghost', sources, Split(incs), defines=['_USE_MATH_DEFINES'], libtype=['intern','player'], priority = [40,15] )
+env.BlenderLib ('bf_ghost', sources, Split(incs), defines=['_USE_MATH_DEFINES'], libtype=['intern'], priority = [40] )
diff --git a/intern/ghost/intern/GHOST_System.cpp b/intern/ghost/intern/GHOST_System.cpp
index 229744e2000..603452cfcbd 100644
--- a/intern/ghost/intern/GHOST_System.cpp
+++ b/intern/ghost/intern/GHOST_System.cpp
@@ -289,9 +289,9 @@ GHOST_TSuccess GHOST_System::init()
#endif
#ifdef GHOST_DEBUG
+ m_eventPrinter = new GHOST_EventPrinter();
if (m_eventManager) {
- m_eventPrinter = new GHOST_EventPrinter();
- //m_eventManager->addConsumer(m_eventPrinter);
+ m_eventManager->addConsumer(m_eventPrinter);
}
#endif // GHOST_DEBUG
diff --git a/intern/guardedalloc/CMakeLists.txt b/intern/guardedalloc/CMakeLists.txt
index 40ca35632d7..b29837fac7d 100644
--- a/intern/guardedalloc/CMakeLists.txt
+++ b/intern/guardedalloc/CMakeLists.txt
@@ -32,6 +32,6 @@ BLENDERLIB(bf_guardedalloc "${SRC}" "${INC}")
# Override C++ alloc optional
IF(WITH_CXX_GUARDEDALLOC)
- FILE(GLOB SRC cpp/*.cpp)
- BLENDERLIB(bf_guardedalloc_cpp "${SRC}" "${INC}")
+ FILE(GLOB SRC cpp/*.cpp)
+ BLENDERLIB(bf_guardedalloc_cpp "${SRC}" "${INC}")
ENDIF(WITH_CXX_GUARDEDALLOC)
diff --git a/intern/guardedalloc/SConscript b/intern/guardedalloc/SConscript
index 2ee0f84b464..0184ddd9785 100644
--- a/intern/guardedalloc/SConscript
+++ b/intern/guardedalloc/SConscript
@@ -5,4 +5,4 @@ Import('env')
sources = env.Glob('intern/*.c')
incs = '.'
-env.BlenderLib ('bf_guardedalloc', sources, Split(incs), defines=[], libtype=['intern','player'], priority = [5,150] )
+env.BlenderLib ('bf_guardedalloc', sources, Split(incs), defines=[], libtype=['intern', 'player'], priority = [5, 175] )
diff --git a/intern/iksolver/SConscript b/intern/iksolver/SConscript
index 7adb2d50893..df8c10b7302 100644
--- a/intern/iksolver/SConscript
+++ b/intern/iksolver/SConscript
@@ -5,5 +5,5 @@ sources = env.Glob('intern/*.cpp')
incs = 'intern ../moto/include ../memutil'
-env.BlenderLib ('bf_IK', sources, Split(incs), [], libtype=['intern','player'], priority=[100,90] )
+env.BlenderLib ('bf_IK', sources, Split(incs), [], libtype=['intern'], priority=[100] )
diff --git a/intern/iksolver/intern/TNT/tntmath.h b/intern/iksolver/intern/TNT/tntmath.h
index 55a79e2aba0..5773900caf9 100644
--- a/intern/iksolver/intern/TNT/tntmath.h
+++ b/intern/iksolver/intern/TNT/tntmath.h
@@ -35,9 +35,7 @@
// conventional functions required by several matrix algorithms
-#ifdef _WIN32
-#define hypot _hypot
-#endif
+
namespace TNT
{
diff --git a/intern/memutil/SConscript b/intern/memutil/SConscript
index 318d4a3997e..4528de814f3 100644
--- a/intern/memutil/SConscript
+++ b/intern/memutil/SConscript
@@ -5,4 +5,4 @@ sources = env.Glob('intern/*.cpp')
incs = '. ..'
-env.BlenderLib ('bf_memutil', sources, Split(incs), [], libtype=['intern','player'], priority = [0,155] )
+env.BlenderLib ('bf_memutil', sources, Split(incs), [], libtype=['intern', 'player'], priority = [0, 180] )
diff --git a/intern/moto/SConscript b/intern/moto/SConscript
index d9bbafe4623..a730e6de535 100644
--- a/intern/moto/SConscript
+++ b/intern/moto/SConscript
@@ -5,4 +5,4 @@ sources = env.Glob('intern/*.cpp')
incs = 'include'
-env.BlenderLib ('bf_moto', sources, Split(incs), [], libtype=['intern','player'], priority = [130,95] )
+env.BlenderLib ('bf_moto', sources, Split(incs), [], libtype=['intern'], priority = [130] )
diff --git a/intern/smoke/CMakeLists.txt b/intern/smoke/CMakeLists.txt
index 8ed7a7c9115..0db6acb683f 100644
--- a/intern/smoke/CMakeLists.txt
+++ b/intern/smoke/CMakeLists.txt
@@ -29,12 +29,12 @@ SET(INC ${PNG_INC} ${ZLIB_INC} intern ../../extern/bullet2/src ../memutil ../gua
FILE(GLOB SRC intern/*.cpp)
IF(WITH_OPENMP)
- ADD_DEFINITIONS(-DPARALLEL=1)
+ ADD_DEFINITIONS(-DPARALLEL=1)
ENDIF(WITH_OPENMP)
IF(WITH_FFTW3)
- ADD_DEFINITIONS(-DFFTW3=1)
- SET(INC ${INC} ${FFTW3_INC})
+ ADD_DEFINITIONS(-DFFTW3=1)
+ SET(INC ${INC} ${FFTW3_INC})
ENDIF(WITH_FFTW3)
diff --git a/intern/smoke/extern/smoke_API.h b/intern/smoke/extern/smoke_API.h
index 5607df70cf3..f0dba3cc7a4 100644
--- a/intern/smoke/extern/smoke_API.h
+++ b/intern/smoke/extern/smoke_API.h
@@ -20,7 +20,7 @@
* The Original Code is Copyright (C) 2009 by Daniel Genrich
* All rights reserved.
*
- * Contributor(s): Daniel Genrich
+ * Contributor(s): None
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -32,12 +32,6 @@
extern "C" {
#endif
-struct FLUID_3D;
-
-// export
-void smoke_export(struct FLUID_3D *fluid, float *dt, float *dx, float **dens, float **densold, float **heat, float **heatold, float **vx, float **vy, float **vz, float **vxold, float **vyold, float **vzold, unsigned char **obstacles);
-
-// low res
struct FLUID_3D *smoke_init(int *res, float *p0, float dt);
void smoke_free(struct FLUID_3D *fluid);
@@ -69,11 +63,8 @@ void smoke_initWaveletBlenderRNA(struct WTURBULENCE *wt, float *strength);
void smoke_dissolve_wavelet(struct WTURBULENCE *wt, int speed, int log);
-// export
-void smoke_turbulence_export(struct WTURBULENCE *wt, float **dens, float **densold, float **tcu, float **tcv, float **tcw);
-
#ifdef __cplusplus
}
#endif
-#endif /* SMOKE_API_H_ */
+#endif /* SMOKE_API_H_ */ \ No newline at end of file
diff --git a/intern/smoke/intern/FLUID_3D.cpp b/intern/smoke/intern/FLUID_3D.cpp
index 7574a0ec16e..ff66f29143c 100644
--- a/intern/smoke/intern/FLUID_3D.cpp
+++ b/intern/smoke/intern/FLUID_3D.cpp
@@ -27,9 +27,9 @@
#include <zlib.h>
// boundary conditions of the fluid domain
-#define DOMAIN_BC_FRONT 0 // z
-#define DOMAIN_BC_TOP 1 // y
-#define DOMAIN_BC_LEFT 1 // x
+#define DOMAIN_BC_FRONT 1
+#define DOMAIN_BC_TOP 0
+#define DOMAIN_BC_LEFT 1
#define DOMAIN_BC_BACK DOMAIN_BC_FRONT
#define DOMAIN_BC_BOTTOM DOMAIN_BC_TOP
#define DOMAIN_BC_RIGHT DOMAIN_BC_LEFT
@@ -75,6 +75,8 @@ FLUID_3D::FLUID_3D(int *res, float *p0, float dt) :
// allocate arrays
_totalCells = _xRes * _yRes * _zRes;
_slabSize = _xRes * _yRes;
+ _divergence = new float[_totalCells];
+ _pressure = new float[_totalCells];
_xVelocity = new float[_totalCells];
_yVelocity = new float[_totalCells];
_zVelocity = new float[_totalCells];
@@ -84,11 +86,20 @@ FLUID_3D::FLUID_3D(int *res, float *p0, float dt) :
_xForce = new float[_totalCells];
_yForce = new float[_totalCells];
_zForce = new float[_totalCells];
+ _vorticity = new float[_totalCells];
_density = new float[_totalCells];
_densityOld = new float[_totalCells];
_heat = new float[_totalCells];
_heatOld = new float[_totalCells];
- _obstacles = new unsigned char[_totalCells]; // set 0 at end of step
+ _residual = new float[_totalCells];
+ _direction = new float[_totalCells];
+ _q = new float[_totalCells];
+ _obstacles = new unsigned char[_totalCells];
+ _xVorticity = new float[_totalCells];
+ _yVorticity = new float[_totalCells];
+ _zVorticity = new float[_totalCells];
+ _h = new float[_totalCells];
+ _Precond = new float[_totalCells];
// DG TODO: check if alloc went fine
@@ -98,6 +109,8 @@ FLUID_3D::FLUID_3D(int *res, float *p0, float dt) :
_densityOld[x] = 0.0f;
_heat[x] = 0.0f;
_heatOld[x] = 0.0f;
+ _divergence[x] = 0.0f;
+ _pressure[x] = 0.0f;
_xVelocity[x] = 0.0f;
_yVelocity[x] = 0.0f;
_zVelocity[x] = 0.0f;
@@ -107,50 +120,65 @@ FLUID_3D::FLUID_3D(int *res, float *p0, float dt) :
_xForce[x] = 0.0f;
_yForce[x] = 0.0f;
_zForce[x] = 0.0f;
+ _xVorticity[x] = 0.0f;
+ _yVorticity[x] = 0.0f;
+ _zVorticity[x] = 0.0f;
+ _residual[x] = 0.0f;
+ _q[x] = 0.0f;
+ _direction[x] = 0.0f;
+ _h[x] = 0.0f;
+ _Precond[x] = 0.0f;
_obstacles[x] = false;
}
// set side obstacles
- int index;
- for (int y = 0; y < _yRes; y++)
- for (int x = 0; x < _xRes; x++)
- {
- // front slab
- index = x + y * _xRes;
- if(DOMAIN_BC_FRONT==1) _obstacles[index] = 1;
-
- // back slab
- index += _totalCells - _slabSize;
- if(DOMAIN_BC_BACK==1) _obstacles[index] = 1;
- }
+ int index;
+ for (int y = 0; y < _yRes; y++) // z
+ for (int x = 0; x < _xRes; x++)
+ {
+ // front slab
+ index = x + y * _xRes;
+ if(DOMAIN_BC_BOTTOM==1) _obstacles[index] = 1;
- for (int z = 0; z < _zRes; z++)
- for (int x = 0; x < _xRes; x++)
- {
- // bottom slab
- index = x + z * _slabSize;
- if(DOMAIN_BC_BOTTOM==1) _obstacles[index] = 1;
+ // back slab
+ index += _totalCells - _slabSize;
+ if(DOMAIN_BC_TOP==1) _obstacles[index] = 1;
+ }
+ for (int z = 0; z < _zRes; z++) // y
+ for (int x = 0; x < _xRes; x++)
+ {
+ // bottom slab
+ index = x + z * _slabSize;
+ if(DOMAIN_BC_FRONT==1) _obstacles[index] = 1;
- // top slab
- index += _slabSize - _xRes;
- if(DOMAIN_BC_TOP==1) _obstacles[index] = 1;
- }
+ // top slab
+ index += _slabSize - _xRes;
+ if(DOMAIN_BC_BACK==1) _obstacles[index] = 1;
+ }
+ for (int z = 0; z < _zRes; z++) // x
+ for (int y = 0; y < _yRes; y++)
+ {
+ // left slab
+ index = y * _xRes + z * _slabSize;
+ if(DOMAIN_BC_LEFT==1) _obstacles[index] = 1;
- for (int z = 0; z < _zRes; z++)
- for (int y = 0; y < _yRes; y++)
- {
- // left slab
- index = y * _xRes + z * _slabSize;
- if(DOMAIN_BC_LEFT==1) _obstacles[index] = 1;
+ // right slab
+ index += _xRes - 1;
+ if(DOMAIN_BC_RIGHT==1) _obstacles[index] = 1;
+ }
- // right slab
- index += _xRes - 1;
- if(DOMAIN_BC_RIGHT==1) _obstacles[index] = 1;
- }
+ /*
+ SPHERE *obsSphere = NULL;
+ obsSphere = new SPHERE(0.375,0.5,0.375, 0.1); // for 4 to 3 domain
+ addObstacle(obsSphere);
+ delete obsSphere;
+ */
}
FLUID_3D::~FLUID_3D()
{
+ if (_divergence) delete[] _divergence;
+ if (_pressure) delete[] _pressure;
if (_xVelocity) delete[] _xVelocity;
if (_yVelocity) delete[] _yVelocity;
if (_zVelocity) delete[] _zVelocity;
@@ -160,14 +188,23 @@ FLUID_3D::~FLUID_3D()
if (_xForce) delete[] _xForce;
if (_yForce) delete[] _yForce;
if (_zForce) delete[] _zForce;
+ if (_residual) delete[] _residual;
+ if (_direction) delete[] _direction;
+ if (_q) delete[] _q;
if (_density) delete[] _density;
if (_densityOld) delete[] _densityOld;
if (_heat) delete[] _heat;
if (_heatOld) delete[] _heatOld;
+ if (_xVorticity) delete[] _xVorticity;
+ if (_yVorticity) delete[] _yVorticity;
+ if (_zVorticity) delete[] _zVorticity;
+ if (_vorticity) delete[] _vorticity;
+ if (_h) delete[] _h;
+ if (_Precond) delete[] _Precond;
if (_obstacles) delete[] _obstacles;
// if (_wTurbulence) delete _wTurbulence;
- // printf("deleted fluid\n");
+ printf("deleted fluid\n");
}
// init direct access functions from blender
@@ -186,7 +223,7 @@ void FLUID_3D::step()
for (int i = 0; i < _totalCells; i++)
{
_xForce[i] = _yForce[i] = _zForce[i] = 0.0f;
- // _obstacles[i] &= ~2;
+ _obstacles[i] &= ~2;
}
wipeBoundaries();
@@ -226,9 +263,6 @@ void FLUID_3D::step()
*/
_totalTime += _dt;
_totalSteps++;
-
- // todo xxx dg: only clear obstacles, not boundaries
- // memset(_obstacles, 0, sizeof(unsigned char)*_xRes*_yRes*_zRes);
}
//////////////////////////////////////////////////////////////////////
@@ -333,27 +367,20 @@ void FLUID_3D::addForce()
//////////////////////////////////////////////////////////////////////
void FLUID_3D::project()
{
- int x, y, z;
- size_t index;
+ int index, x, y, z;
- float *_pressure = new float[_totalCells];
- float *_divergence = new float[_totalCells];
-
- memset(_pressure, 0, sizeof(float)*_totalCells);
- memset(_divergence, 0, sizeof(float)*_totalCells);
-
- setObstacleBoundaries(_pressure);
+ setObstacleBoundaries();
// copy out the boundaries
if(DOMAIN_BC_LEFT == 0) setNeumannX(_xVelocity, _res);
- else setZeroX(_xVelocity, _res);
-
- if(DOMAIN_BC_TOP == 0) setNeumannY(_yVelocity, _res);
- else setZeroY(_yVelocity, _res);
+ else setZeroX(_xVelocity, _res);
- if(DOMAIN_BC_FRONT == 0) setNeumannZ(_zVelocity, _res);
+ if(DOMAIN_BC_TOP == 0) setNeumannZ(_zVelocity, _res);
else setZeroZ(_zVelocity, _res);
+ if(DOMAIN_BC_FRONT == 0) setNeumannY(_yVelocity, _res);
+ else setZeroY(_yVelocity, _res);
+
// calculate divergence
index = _slabSize + _xRes + 1;
for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes)
@@ -387,7 +414,7 @@ void FLUID_3D::project()
// solve Poisson equation
solvePressurePre(_pressure, _divergence, _obstacles);
- setObstaclePressure(_pressure);
+ setObstaclePressure();
// project out solution
float invDx = 1.0f / _dx;
@@ -396,20 +423,13 @@ void FLUID_3D::project()
for (y = 1; y < _yRes - 1; y++, index += 2)
for (x = 1; x < _xRes - 1; x++, index++)
{
- // if(!_obstacles[index])
+ if(!_obstacles[index])
{
_xVelocity[index] -= 0.5f * (_pressure[index + 1] - _pressure[index - 1]) * invDx;
_yVelocity[index] -= 0.5f * (_pressure[index + _xRes] - _pressure[index - _xRes]) * invDx;
_zVelocity[index] -= 0.5f * (_pressure[index + _slabSize] - _pressure[index - _slabSize]) * invDx;
- }/*
- else
- {
- _xVelocity[index] = _yVelocity[index] = _zVelocity[index] = 0.0f;
- }*/
+ }
}
-
- if (_pressure) delete[] _pressure;
- if (_divergence) delete[] _divergence;
}
//////////////////////////////////////////////////////////////////////
@@ -445,7 +465,7 @@ void FLUID_3D::addObstacle(OBSTACLE* obstacle)
//////////////////////////////////////////////////////////////////////
// calculate the obstacle directional types
//////////////////////////////////////////////////////////////////////
-void FLUID_3D::setObstaclePressure(float *_pressure)
+void FLUID_3D::setObstaclePressure()
{
// tag remaining obstacle blocks
for (int z = 1, index = _slabSize + _xRes + 1;
@@ -519,7 +539,7 @@ void FLUID_3D::setObstaclePressure(float *_pressure)
}
}
-void FLUID_3D::setObstacleBoundaries(float *_pressure)
+void FLUID_3D::setObstacleBoundaries()
{
// cull degenerate obstacles , move to addObstacle?
for (int z = 1, index = _slabSize + _xRes + 1;
@@ -580,18 +600,6 @@ void FLUID_3D::addVorticity()
int x,y,z,index;
if(_vorticityEps<=0.) return;
- float *_xVorticity, *_yVorticity, *_zVorticity, *_vorticity;
-
- _xVorticity = new float[_totalCells];
- _yVorticity = new float[_totalCells];
- _zVorticity = new float[_totalCells];
- _vorticity = new float[_totalCells];
-
- memset(_xVorticity, 0, sizeof(float)*_totalCells);
- memset(_yVorticity, 0, sizeof(float)*_totalCells);
- memset(_zVorticity, 0, sizeof(float)*_totalCells);
- memset(_vorticity, 0, sizeof(float)*_totalCells);
-
// calculate vorticity
float gridSize = 0.5f / _dx;
index = _slabSize + _xRes + 1;
@@ -654,11 +662,6 @@ void FLUID_3D::addVorticity()
_zForce[index] += (N[0] * _yVorticity[index] - N[1] * _xVorticity[index]) * _dx * eps;
}
}
-
- if (_xVorticity) delete[] _xVorticity;
- if (_yVorticity) delete[] _yVorticity;
- if (_zVorticity) delete[] _zVorticity;
- if (_vorticity) delete[] _vorticity;
}
//////////////////////////////////////////////////////////////////////
@@ -669,14 +672,14 @@ void FLUID_3D::advectMacCormack()
Vec3Int res = Vec3Int(_xRes,_yRes,_zRes);
if(DOMAIN_BC_LEFT == 0) copyBorderX(_xVelocity, res);
- else setZeroX(_xVelocity, res);
-
- if(DOMAIN_BC_TOP == 0) copyBorderY(_yVelocity, res);
- else setZeroY(_yVelocity, res);
+ else setZeroX(_xVelocity, res);
- if(DOMAIN_BC_FRONT == 0) copyBorderZ(_zVelocity, res);
+ if(DOMAIN_BC_TOP == 0) copyBorderZ(_zVelocity, res);
else setZeroZ(_zVelocity, res);
+ if(DOMAIN_BC_FRONT == 0) copyBorderY(_yVelocity, res);
+ else setZeroY(_yVelocity, res);
+
SWAP_POINTERS(_xVelocity, _xVelocityOld);
SWAP_POINTERS(_yVelocity, _yVelocityOld);
SWAP_POINTERS(_zVelocity, _zVelocityOld);
@@ -698,14 +701,14 @@ void FLUID_3D::advectMacCormack()
advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _zVelocityOld, _zVelocity, t1,t2, res, _obstacles);
if(DOMAIN_BC_LEFT == 0) copyBorderX(_xVelocity, res);
- else setZeroX(_xVelocity, res);
-
- if(DOMAIN_BC_TOP == 0) copyBorderY(_yVelocity, res);
- else setZeroY(_yVelocity, res);
+ else setZeroX(_xVelocity, res);
- if(DOMAIN_BC_FRONT == 0) copyBorderZ(_zVelocity, res);
+ if(DOMAIN_BC_TOP == 0) copyBorderZ(_zVelocity, res);
else setZeroZ(_zVelocity, res);
+ if(DOMAIN_BC_FRONT == 0) copyBorderY(_yVelocity, res);
+ else setZeroY(_yVelocity, res);
+
setZeroBorder(_density, res);
setZeroBorder(_heat, res);
diff --git a/intern/smoke/intern/FLUID_3D.h b/intern/smoke/intern/FLUID_3D.h
index 9d9e7318204..78a4cf076e3 100644
--- a/intern/smoke/intern/FLUID_3D.h
+++ b/intern/smoke/intern/FLUID_3D.h
@@ -64,7 +64,7 @@ class FLUID_3D
// dimensions
int _xRes, _yRes, _zRes, _maxRes;
Vec3Int _res;
- size_t _totalCells;
+ int _totalCells;
int _slabSize;
float _dx;
float _p0[3];
@@ -81,6 +81,7 @@ class FLUID_3D
float* _densityOld;
float* _heat;
float* _heatOld;
+ float* _pressure;
float* _xVelocity;
float* _yVelocity;
float* _zVelocity;
@@ -90,9 +91,19 @@ class FLUID_3D
float* _xForce;
float* _yForce;
float* _zForce;
+ float* _divergence;
+ float* _xVorticity;
+ float* _yVorticity;
+ float* _zVorticity;
+ float* _vorticity;
+ float* _h;
+ float* _Precond;
unsigned char* _obstacles;
// CG fields
+ float* _residual;
+ float* _direction;
+ float* _q;
int _iterations;
// simulation constants
@@ -123,8 +134,8 @@ class FLUID_3D
void solveHeat(float* field, float* b, unsigned char* skip);
// handle obstacle boundaries
- void setObstacleBoundaries(float *_pressure);
- void setObstaclePressure(float *_pressure);
+ void setObstacleBoundaries();
+ void setObstaclePressure();
public:
// advection, accessed e.g. by WTURBULENCE class
diff --git a/intern/smoke/intern/FLUID_3D_SOLVERS.cpp b/intern/smoke/intern/FLUID_3D_SOLVERS.cpp
index 7d078d86d61..a35beaa05d7 100644
--- a/intern/smoke/intern/FLUID_3D_SOLVERS.cpp
+++ b/intern/smoke/intern/FLUID_3D_SOLVERS.cpp
@@ -28,17 +28,10 @@ void FLUID_3D::solvePressurePre(float* field, float* b, unsigned char* skip)
{
int x, y, z;
size_t index;
- float *_q, *_Precond, *_h, *_residual, *_direction;
// i = 0
int i = 0;
- _residual = new float[_totalCells]; // set 0
- _direction = new float[_totalCells]; // set 0
- _q = new float[_totalCells]; // set 0
- _h = new float[_totalCells]; // set 0
- _Precond = new float[_totalCells]; // set 0
-
memset(_residual, 0, sizeof(float)*_xRes*_yRes*_zRes);
memset(_q, 0, sizeof(float)*_xRes*_yRes*_zRes);
memset(_direction, 0, sizeof(float)*_xRes*_yRes*_zRes);
@@ -198,18 +191,11 @@ void FLUID_3D::solvePressurePre(float* field, float* b, unsigned char* skip)
i++;
}
// cout << i << " iterations converged to " << sqrt(maxR) << endl;
-
- if (_h) delete[] _h;
- if (_Precond) delete[] _Precond;
- if (_residual) delete[] _residual;
- if (_direction) delete[] _direction;
- if (_q) delete[] _q;
}
//////////////////////////////////////////////////////////////////////
// solve the poisson equation with CG
//////////////////////////////////////////////////////////////////////
-#if 0
void FLUID_3D::solvePressure(float* field, float* b, unsigned char* skip)
{
int x, y, z;
@@ -358,7 +344,6 @@ void FLUID_3D::solvePressure(float* field, float* b, unsigned char* skip)
}
// cout << i << " iterations converged to " << maxR << endl;
}
-#endif
//////////////////////////////////////////////////////////////////////
// solve the heat equation with CG
@@ -368,15 +353,10 @@ void FLUID_3D::solveHeat(float* field, float* b, unsigned char* skip)
int x, y, z;
size_t index;
const float heatConst = _dt * _heatDiffusion / (_dx * _dx);
- float *_q, *_residual, *_direction;
// i = 0
int i = 0;
- _residual = new float[_totalCells]; // set 0
- _direction = new float[_totalCells]; // set 0
- _q = new float[_totalCells]; // set 0
-
memset(_residual, 0, sizeof(float)*_xRes*_yRes*_zRes);
memset(_q, 0, sizeof(float)*_xRes*_yRes*_zRes);
memset(_direction, 0, sizeof(float)*_xRes*_yRes*_zRes);
@@ -516,9 +496,5 @@ void FLUID_3D::solveHeat(float* field, float* b, unsigned char* skip)
i++;
}
// cout << i << " iterations converged to " << maxR << endl;
-
- if (_residual) delete[] _residual;
- if (_direction) delete[] _direction;
- if (_q) delete[] _q;
}
diff --git a/intern/smoke/intern/FLUID_3D_STATIC.cpp b/intern/smoke/intern/FLUID_3D_STATIC.cpp
index 4909c071c3d..4474129beea 100644
--- a/intern/smoke/intern/FLUID_3D_STATIC.cpp
+++ b/intern/smoke/intern/FLUID_3D_STATIC.cpp
@@ -80,7 +80,7 @@ void FLUID_3D::addSmokeTestCase(float* field, Vec3Int res, float value)
void FLUID_3D::setNeumannX(float* field, Vec3Int res)
{
const int slabSize = res[0] * res[1];
- int index;
+ size_t index;
for (int z = 0; z < res[2]; z++)
for (int y = 0; y < res[1]; y++)
{
@@ -92,18 +92,6 @@ void FLUID_3D::setNeumannX(float* field, Vec3Int res)
index += res[0] - 1;
field[index] = field[index - 2];
}
-
- // fix, force top slab to only allow outwards flux
- for (int y = 0; y < res[1]; y++)
- for (int z = 0; z < res[2]; z++)
- {
- // top slab
- int index = y * res[0] + z * slabSize;
- index += res[0] - 1;
- if(field[index]<0.) field[index] = 0.;
- index -= 1;
- if(field[index]<0.) field[index] = 0.;
- }
}
//////////////////////////////////////////////////////////////////////
@@ -112,31 +100,18 @@ void FLUID_3D::setNeumannX(float* field, Vec3Int res)
void FLUID_3D::setNeumannY(float* field, Vec3Int res)
{
const int slabSize = res[0] * res[1];
- int index;
+ size_t index;
for (int z = 0; z < res[2]; z++)
for (int x = 0; x < res[0]; x++)
{
- // bottom slab
+ // front slab
index = x + z * slabSize;
field[index] = field[index + 2 * res[0]];
- // top slab
+ // back slab
index += slabSize - res[0];
field[index] = field[index - 2 * res[0]];
}
-
- // fix, force top slab to only allow outwards flux
- for (int z = 0; z < res[2]; z++)
- for (int x = 0; x < res[0]; x++)
- {
- // top slab
- int index = x + z * slabSize;
- index += slabSize - res[0];
- if(field[index]<0.) field[index] = 0.;
- index -= res[0];
- if(field[index]<0.) field[index] = 0.;
- }
-
}
//////////////////////////////////////////////////////////////////////
@@ -146,15 +121,15 @@ void FLUID_3D::setNeumannZ(float* field, Vec3Int res)
{
const int slabSize = res[0] * res[1];
const int totalCells = res[0] * res[1] * res[2];
- int index;
+ size_t index;
for (int y = 0; y < res[1]; y++)
for (int x = 0; x < res[0]; x++)
{
- // front slab
+ // bottom slab
index = x + y * res[0];
field[index] = field[index + 2 * slabSize];
- // back slab
+ // top slab
index += totalCells - slabSize;
field[index] = field[index - 2 * slabSize];
}
@@ -164,11 +139,11 @@ void FLUID_3D::setNeumannZ(float* field, Vec3Int res)
for (int x = 0; x < res[0]; x++)
{
// top slab
- int index = x + y * res[0];
+ index = x + y * res[0];
index += totalCells - slabSize;
- if(field[index]<0.) field[index] = 0.;
+ if(field[index]<0.) field[index] = 0.0f;
index -= slabSize;
- if(field[index]<0.) field[index] = 0.;
+ if(field[index]<0.) field[index] = 0.0f;
}
}
@@ -256,14 +231,13 @@ void FLUID_3D::copyBorderX(float* field, Vec3Int res)
void FLUID_3D::copyBorderY(float* field, Vec3Int res)
{
const int slabSize = res[0] * res[1];
- const int totalCells = res[0] * res[1] * res[2];
int index;
for (int z = 0; z < res[2]; z++)
for (int x = 0; x < res[0]; x++)
{
// bottom slab
index = x + z * slabSize;
- field[index] = field[index + res[0]];
+ field[index] = field[index + res[0]];
// top slab
index += slabSize - res[0];
field[index] = field[index - res[0]];
@@ -279,7 +253,7 @@ void FLUID_3D::copyBorderZ(float* field, Vec3Int res)
{
// front slab
index = x + y * res[0];
- field[index] = field[index + slabSize];
+ field[index] = field[index + slabSize];
// back slab
index += totalCells - slabSize;
field[index] = field[index - slabSize];
@@ -295,21 +269,18 @@ void FLUID_3D::advectFieldSemiLagrange(const float dt, const float* velx, const
const int xres = res[0];
const int yres = res[1];
const int zres = res[2];
- static int hits = 0;
- static int total = 0;
const int slabSize = res[0] * res[1];
// scale dt up to grid resolution
-#if PARALLEL==1 && !_WIN32
-#pragma omp parallel
-#pragma omp for schedule(static)
+#if PARALLEL==1
+#pragma omp parallel for schedule(static)
#endif
for (int z = 0; z < zres; z++)
for (int y = 0; y < yres; y++)
for (int x = 0; x < xres; x++)
{
const int index = x + y * xres + z * xres*yres;
-
+
// backtrace
float xTrace = x - dt * velx[index];
float yTrace = y - dt * vely[index];
@@ -366,8 +337,8 @@ void FLUID_3D::advectFieldSemiLagrange(const float dt, const float* velx, const
//
// comments are the pseudocode from selle's paper
//////////////////////////////////////////////////////////////////////
-void FLUID_3D::advectFieldMacCormack(const float dt, const float* xVelocity, const float* yVelocity, const float* zVelocity,
- float* oldField, float* newField, float* temp1, float* temp2, Vec3Int res, const unsigned char* obstacles)
+void FLUID_3D::advectFieldMacCormack(const float dt, const float* xVelocity, const float* yVelocity, const float* zVelocity,
+ float* oldField, float* newField, float* temp1, float* temp2, Vec3Int res, const unsigned char* obstacles)
{
float* phiHatN = temp1;
float* phiHatN1 = temp2;
@@ -388,7 +359,7 @@ void FLUID_3D::advectFieldMacCormack(const float dt, const float* xVelocity, con
advectFieldSemiLagrange( -1.0*dt, xVelocity, yVelocity, zVelocity, phiHatN1, phiHatN, res);
// phiN1 = phiHatN1 + (phiN - phiHatN) / 2
- const int border = 0;
+ const int border = 0;
for (int z = border; z < sz-border; z++)
for (int y = border; y < sy-border; y++)
for (int x = border; x < sx-border; x++) {
@@ -405,7 +376,7 @@ void FLUID_3D::advectFieldMacCormack(const float dt, const float* xVelocity, con
// if the error estimate was bad, revert to first order
clampOutsideRays(dt, xVelocity, yVelocity, zVelocity, oldField, newField, res, obstacles, phiHatN1);
-}
+}
//////////////////////////////////////////////////////////////////////
@@ -483,18 +454,17 @@ void FLUID_3D::clampExtrema(const float dt, const float* velx, const float* vely
}
//////////////////////////////////////////////////////////////////////
-// Reverts any backtraces that go into boundaries back to first
+// Reverts any backtraces that go into boundaries back to first
// order -- in this case the error correction term was totally
// incorrect
//////////////////////////////////////////////////////////////////////
-void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float* vely, const float* velz,
- float* oldField, float* newField, Vec3Int res, const unsigned char* obstacles, const float *oldAdvection)
+void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float* vely, const float* velz,
+ float* oldField, float* newField, Vec3Int res, const unsigned char* obstacles, const float *oldAdvection)
{
const int sx= res[0];
const int sy= res[1];
const int sz= res[2];
const int slabSize = res[0] * res[1];
-
for (int z = 1; z < sz-1; z++)
for (int y = 1; y < sy-1; y++)
for (int x = 1; x < sx-1; x++)
@@ -509,7 +479,7 @@ void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float*
float zTrace = z - dt * velz[index];
// see if it goes outside the boundaries
- bool hasObstacle =
+ bool hasObstacle =
(zTrace < 1.0f) || (zTrace > sz - 2.0f) ||
(yTrace < 1.0f) || (yTrace > sy - 2.0f) ||
(xTrace < 1.0f) || (xTrace > sx - 2.0f) ||
@@ -545,7 +515,7 @@ void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float*
int z0 = (int)zBackward;
int z1 = z0 + 1;
if(obstacles && !hasObstacle) {
- hasObstacle = hasObstacle ||
+ hasObstacle = hasObstacle ||
obstacles[x0 + y0 * sx + z0*slabSize] ||
obstacles[x0 + y1 * sx + z0*slabSize] ||
obstacles[x1 + y0 * sx + z0*slabSize] ||
@@ -565,7 +535,7 @@ void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float*
z0 = (int)zTrace;
z1 = z0 + 1;
if(obstacles && !hasObstacle) {
- hasObstacle = hasObstacle ||
+ hasObstacle = hasObstacle ||
obstacles[x0 + y0 * sx + z0*slabSize] ||
obstacles[x0 + y1 * sx + z0*slabSize] ||
obstacles[x1 + y0 * sx + z0*slabSize] ||
@@ -607,8 +577,84 @@ void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float*
u1 * (s0 * (t0 * oldField[i001] +
t1 * oldField[i011]) +
s1 * (t0 * oldField[i101] +
- t1 * oldField[i111]));
+ t1 * oldField[i111]));
}
} // xyz
}
+//////////////////////////////////////////////////////////////////////
+// image output
+//////////////////////////////////////////////////////////////////////
+/*
+void FLUID_3D::writeImageSliceXY(const float *field, Vec3Int res, int slice, string prefix, int picCnt, float scale) {
+ writeProjectedIntern(field, res, 0,1, prefix, picCnt, scale);
+}
+void FLUID_3D::writeImageSliceYZ(const float *field, Vec3Int res, int slice, string prefix, int picCnt, float scale) {
+ writeProjectedIntern(field, res, 1,2, prefix, picCnt, scale);
+}
+void FLUID_3D::writeImageSliceXZ(const float *field, Vec3Int res, int slice, string prefix, int picCnt, float scale) {
+ writeProjectedIntern(field, res, 0,2, prefix, picCnt, scale);
+}
+*/
+
+//////////////////////////////////////////////////////////////////////
+// Helper function for projecting densities along a dimension
+//////////////////////////////////////////////////////////////////////
+/*
+static int getOtherDir(int dir1, int dir2) {
+ switch(dir1) {
+ case 0:
+ switch(dir2) {
+ case 1: return 2;
+ case 2: return 1; }
+ break;
+ case 1:
+ switch(dir2) {
+ case 0: return 2;
+ case 2: return 0; }
+ break;
+ case 2:
+ switch(dir2) {
+ case 0: return 1;
+ case 1: return 0; }
+ break;
+ default:
+ return 0;
+ }
+ return 0;
+}
+*/
+
+//////////////////////////////////////////////////////////////////////
+// average densities along third spatial direction
+//////////////////////////////////////////////////////////////////////
+/*
+void FLUID_3D::writeProjectedIntern(const float *field, Vec3Int res,
+ int dir1, int dir2, string prefix, int picCnt, float scale) {
+ const int nitems = res[dir1]*res[dir2];
+ const int otherDir = getOtherDir(dir1,dir2);
+ float *buf = new float[nitems];
+ Vec3Int min = Vec3Int(0);
+ Vec3Int max = res;
+
+ min[otherDir] = 0;
+ max[otherDir] = res[otherDir];
+ float div = 1./(float)MIN3V(res); // normalize for shorter sides, old: res[otherDir];
+ div *= 4.; //slightly increase contrast
+ for(int i=0; i<nitems; i++) buf[i] = 0.;
+
+ Vec3Int cnt = 0;
+ for (cnt[2] = min[2]; cnt[2] < max[2]; cnt[2]++) {
+ for (cnt[1] = min[1]; cnt[1] < max[1]; cnt[1]++)
+ for (cnt[0] = min[0]; cnt[0] < max[0]; cnt[0]++)
+ {
+ const int index = cnt[0] + cnt[1] * res[0] + cnt[2] * res[0]*res[1];
+ const int bufindex = cnt[dir1] + cnt[dir2] * res[dir1];
+ buf[bufindex] += field[index] * scale *div;
+ }
+ }
+ // IMAGE::dumpNumberedPNG(picCnt, prefix, buf, res[dir1], res[dir2]);
+ delete[] buf;
+}
+*/
+
diff --git a/intern/smoke/intern/WTURBULENCE.cpp b/intern/smoke/intern/WTURBULENCE.cpp
index a1b2aaf30f2..db7a1b55afa 100644
--- a/intern/smoke/intern/WTURBULENCE.cpp
+++ b/intern/smoke/intern/WTURBULENCE.cpp
@@ -81,9 +81,25 @@ WTURBULENCE::WTURBULENCE(int xResSm, int yResSm, int zResSm, int amplify, int no
_densityBig = new float[_totalCellsBig];
_densityBigOld = new float[_totalCellsBig];
+ // allocate high resolution velocity field. Note that this is only
+ // necessary because we use MacCormack advection. For semi-Lagrangian
+ // advection, these arrays are not necessary.
+ _tempBig1 = _tempBig2 =
+ _bigUx = _bigUy = _bigUz = NULL;
+ _tempBig1 = new float[_totalCellsBig];
+ _tempBig2 = new float[_totalCellsBig];
+ _bigUx = new float[_totalCellsBig];
+ _bigUy = new float[_totalCellsBig];
+ _bigUz = new float[_totalCellsBig];
+
for(int i = 0; i < _totalCellsBig; i++) {
_densityBig[i] =
- _densityBigOld[i] = 0.;
+ _densityBigOld[i] =
+ _bigUx[i] =
+ _bigUy[i] =
+ _bigUz[i] =
+ _tempBig1[i] =
+ _tempBig2[i] = 0.;
}
// allocate & init texture coordinates
@@ -92,6 +108,10 @@ WTURBULENCE::WTURBULENCE(int xResSm, int yResSm, int zResSm, int amplify, int no
_tcW = new float[_totalCellsSm];
_tcTemp = new float[_totalCellsSm];
+ // allocate & init energy terms
+ _energy = new float[_totalCellsSm];
+ _highFreqEnergy = new float[_totalCellsSm];
+
// map all
const float dx = 1./(float)(_resSm[0]);
const float dy = 1./(float)(_resSm[1]);
@@ -105,8 +125,15 @@ WTURBULENCE::WTURBULENCE(int xResSm, int yResSm, int zResSm, int amplify, int no
_tcV[index] = y*dy;
_tcW[index] = z*dz;
_tcTemp[index] = 0.;
+ _energy[index] = 0.;
}
+ // allocate eigenvalue arrays
+ _eigMin = new float[_totalCellsSm];
+ _eigMax = new float[_totalCellsSm];
+ for(int i=0; i < _totalCellsSm; i++)
+ _eigMin[i] = _eigMax[i] = 0.;
+
// noise tiles
_noiseTile = new float[noiseTileSize * noiseTileSize * noiseTileSize];
/*
@@ -127,12 +154,23 @@ WTURBULENCE::~WTURBULENCE() {
delete[] _densityBig;
delete[] _densityBigOld;
+ delete[] _bigUx;
+ delete[] _bigUy;
+ delete[] _bigUz;
+ delete[] _tempBig1;
+ delete[] _tempBig2;
+
delete[] _tcU;
delete[] _tcV;
delete[] _tcW;
delete[] _tcTemp;
+ delete[] _eigMin;
+ delete[] _eigMax;
delete[] _noiseTile;
+
+ delete[] _energy;
+ delete[] _highFreqEnergy;
}
//////////////////////////////////////////////////////////////////////
@@ -277,34 +315,34 @@ static float minDz(int x, int y, int z, float* input, Vec3Int res)
// handle texture coordinates (advection, reset, eigenvalues),
// Beware -- uses big density maccormack as temporary arrays
//////////////////////////////////////////////////////////////////////
-void WTURBULENCE::advectTextureCoordinates (float dtOrg, float* xvel, float* yvel, float* zvel, float *tempBig1, float *tempBig2) {
+void WTURBULENCE::advectTextureCoordinates (float dtOrg, float* xvel, float* yvel, float* zvel) {
// advection
SWAP_POINTERS(_tcTemp, _tcU);
FLUID_3D::copyBorderX(_tcTemp, _resSm);
FLUID_3D::copyBorderY(_tcTemp, _resSm);
FLUID_3D::copyBorderZ(_tcTemp, _resSm);
FLUID_3D::advectFieldMacCormack(dtOrg, xvel, yvel, zvel,
- _tcTemp, _tcU, tempBig1, tempBig2, _resSm, NULL);
+ _tcTemp, _tcU, _tempBig1, _tempBig2, _resSm, NULL);
SWAP_POINTERS(_tcTemp, _tcV);
FLUID_3D::copyBorderX(_tcTemp, _resSm);
FLUID_3D::copyBorderY(_tcTemp, _resSm);
FLUID_3D::copyBorderZ(_tcTemp, _resSm);
FLUID_3D::advectFieldMacCormack(dtOrg, xvel, yvel, zvel,
- _tcTemp, _tcV, tempBig1, tempBig2, _resSm, NULL);
+ _tcTemp, _tcV, _tempBig1, _tempBig2, _resSm, NULL);
SWAP_POINTERS(_tcTemp, _tcW);
FLUID_3D::copyBorderX(_tcTemp, _resSm);
FLUID_3D::copyBorderY(_tcTemp, _resSm);
FLUID_3D::copyBorderZ(_tcTemp, _resSm);
FLUID_3D::advectFieldMacCormack(dtOrg, xvel, yvel, zvel,
- _tcTemp, _tcW, tempBig1, tempBig2, _resSm, NULL);
+ _tcTemp, _tcW, _tempBig1, _tempBig2, _resSm, NULL);
}
//////////////////////////////////////////////////////////////////////
// Compute the eigenvalues of the advected texture
//////////////////////////////////////////////////////////////////////
-void WTURBULENCE::computeEigenvalues(float *_eigMin, float *_eigMax) {
+void WTURBULENCE::computeEigenvalues() {
// stats
float maxeig = -1.;
float mineig = 10.;
@@ -349,7 +387,7 @@ void WTURBULENCE::computeEigenvalues(float *_eigMin, float *_eigMax) {
//////////////////////////////////////////////////////////////////////
// advect & reset texture coordinates based on eigenvalues
//////////////////////////////////////////////////////////////////////
-void WTURBULENCE::resetTextureCoordinates(float *_eigMin, float *_eigMax)
+void WTURBULENCE::resetTextureCoordinates()
{
// allowed deformation of the textures
const float limit = 2.f;
@@ -380,7 +418,7 @@ void WTURBULENCE::resetTextureCoordinates(float *_eigMin, float *_eigMax)
// Compute the highest frequency component of the wavelet
// decomposition
//////////////////////////////////////////////////////////////////////
-void WTURBULENCE::decomposeEnergy(float *_energy, float *_highFreqEnergy)
+void WTURBULENCE::decomposeEnergy()
{
// do the decomposition -- the goal here is to have
// the energy with the high frequency component stomped out
@@ -416,7 +454,7 @@ void WTURBULENCE::decomposeEnergy(float *_energy, float *_highFreqEnergy)
// compute velocity from energies and march into obstacles
// for wavelet decomposition
//////////////////////////////////////////////////////////////////////
-void WTURBULENCE::computeEnergy(float *_energy, float* xvel, float* yvel, float* zvel, unsigned char *obstacles)
+void WTURBULENCE::computeEnergy(float* xvel, float* yvel, float* zvel, unsigned char *obstacles)
{
// compute everywhere
for (int x = 0; x < _totalCellsSm; x++)
@@ -475,7 +513,7 @@ void WTURBULENCE::computeEnergy(float *_energy, float* xvel, float* yvel, float*
}
if (valid > 0)
{
- _energy[index] = sum / (float)valid;
+ _energy[index] = sum / valid;
obstacles[index] = MARCHED;
}
}
@@ -500,9 +538,9 @@ void WTURBULENCE::computeEnergy(float *_energy, float* xvel, float* yvel, float*
Vec3 WTURBULENCE::WVelocity(Vec3 orgPos)
{
// arbitrarily offset evaluation points
- const Vec3 p1 = orgPos + Vec3(NOISE_TILE_SIZE/2.0,0,0);
- const Vec3 p2 = orgPos + Vec3(0,NOISE_TILE_SIZE/2.0,0);
- const Vec3 p3 = orgPos + Vec3(0,0,NOISE_TILE_SIZE/2.0);
+ const Vec3 p1 = orgPos + Vec3(NOISE_TILE_SIZE/2,0,0);
+ const Vec3 p2 = orgPos + Vec3(0,NOISE_TILE_SIZE/2,0);
+ const Vec3 p3 = orgPos + Vec3(0,0,NOISE_TILE_SIZE/2);
const float f1y = WNoiseDy(p1, _noiseTile);
const float f1z = WNoiseDz(p1, _noiseTile);
@@ -526,9 +564,9 @@ Vec3 WTURBULENCE::WVelocity(Vec3 orgPos)
Vec3 WTURBULENCE::WVelocityWithJacobian(Vec3 orgPos, float* xUnwarped, float* yUnwarped, float* zUnwarped)
{
// arbitrarily offset evaluation points
- const Vec3 p1 = orgPos + Vec3(NOISE_TILE_SIZE/2.0,0,0);
- const Vec3 p2 = orgPos + Vec3(0,NOISE_TILE_SIZE/2.0,0);
- const Vec3 p3 = orgPos + Vec3(0,0,NOISE_TILE_SIZE/2.0);
+ const Vec3 p1 = orgPos + Vec3(NOISE_TILE_SIZE/2,0,0);
+ const Vec3 p2 = orgPos + Vec3(0,NOISE_TILE_SIZE/2,0);
+ const Vec3 p3 = orgPos + Vec3(0,0,NOISE_TILE_SIZE/2);
Vec3 final;
final[0] = WNoiseDx(p1, _noiseTile);
@@ -559,40 +597,24 @@ Vec3 WTURBULENCE::WVelocityWithJacobian(Vec3 orgPos, float* xUnwarped, float* yU
return ret;
}
-
//////////////////////////////////////////////////////////////////////
// perform an actual noise advection step
//////////////////////////////////////////////////////////////////////
void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel, float* zvel, unsigned char *obstacles)
{
- // enlarge timestep to match grid
- const float dt = dtOrg * _amplify;
- const float invAmp = 1.0f / _amplify;
- float *tempBig1 = new float[_totalCellsBig];
- float *tempBig2 = new float[_totalCellsBig];
- float *bigUx = new float[_totalCellsBig];
- float *bigUy = new float[_totalCellsBig];
- float *bigUz = new float[_totalCellsBig];
- float *_energy = new float[_totalCellsSm];
- float *highFreqEnergy = new float[_totalCellsSm];
- float *eigMin = new float[_totalCellsSm];
- float *eigMax = new float[_totalCellsSm];
-
- memset(tempBig1, 0, sizeof(float)*_totalCellsBig);
- memset(tempBig2, 0, sizeof(float)*_totalCellsBig);
- memset(highFreqEnergy, 0, sizeof(float)*_totalCellsSm);
- memset(eigMin, 0, sizeof(float)*_totalCellsSm);
- memset(eigMax, 0, sizeof(float)*_totalCellsSm);
-
- // prepare textures
- advectTextureCoordinates(dtOrg, xvel,yvel,zvel, tempBig1, tempBig2);
+ // enlarge timestep to match grid
+ const float dt = dtOrg * _amplify;
+ const float invAmp = 1.0f / _amplify;
+
+ // prepare textures
+ advectTextureCoordinates(dtOrg, xvel,yvel,zvel);
// compute eigenvalues of the texture coordinates
- computeEigenvalues(eigMin, eigMax);
+ computeEigenvalues();
// do wavelet decomposition of energy
- computeEnergy(_energy, xvel, yvel, zvel, obstacles);
- decomposeEnergy(_energy, highFreqEnergy);
+ computeEnergy(xvel, yvel, zvel, obstacles);
+ decomposeEnergy();
// zero out coefficients inside of the obstacle
for (int x = 0; x < _totalCellsSm; x++)
@@ -627,7 +649,7 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
// retrieve wavelet energy at highest frequency
float energy = INTERPOLATE::lerp3d(
- highFreqEnergy, posSm[0],posSm[1],posSm[2], _xResSm, _yResSm, _zResSm);
+ _highFreqEnergy, posSm[0],posSm[1],posSm[2], _xResSm, _yResSm, _zResSm);
// base amplitude for octave 0
float coefficient = sqrtf(2.0f * fabs(energy));
@@ -636,8 +658,8 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
// add noise to velocity, but only if the turbulence is
// sufficiently undeformed, and the energy is large enough
// to make a difference
- const bool addNoise = eigMax[indexSmall] < 2. &&
- eigMin[indexSmall] > 0.5;
+ const bool addNoise = _eigMax[indexSmall] < 2. &&
+ _eigMin[indexSmall] > 0.5;
if (addNoise && amplitude > _cullingThreshold) {
// base amplitude for octave 0
float amplitudeScaled = amplitude;
@@ -659,21 +681,21 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
// If you wanted to save memory, you would instead perform a
// semi-Lagrangian backtrace for the current grid cell here. Then
// you could just throw the velocity away.
- bigUx[index] = vel[0];
- bigUy[index] = vel[1];
- bigUz[index] = vel[2];
+ _bigUx[index] = vel[0];
+ _bigUy[index] = vel[1];
+ _bigUz[index] = vel[2];
// compute the velocity magnitude for substepping later
- const float velMag = bigUx[index] * bigUx[index] +
- bigUy[index] * bigUy[index] +
- bigUz[index] * bigUz[index];
+ const float velMag = _bigUx[index] * _bigUx[index] +
+ _bigUy[index] * _bigUy[index] +
+ _bigUz[index] * _bigUz[index];
if (velMag > maxVelocity) maxVelocity = velMag;
// zero out velocity inside obstacles
float obsCheck = INTERPOLATE::lerp3dToFloat(
obstacles, posSm[0], posSm[1], posSm[2], _xResSm, _yResSm, _zResSm);
if (obsCheck > 0.95)
- bigUx[index] = bigUy[index] = bigUz[index] = 0.;
+ _bigUx[index] = _bigUy[index] = _bigUz[index] = 0.;
}
// prepare density for an advection
@@ -681,23 +703,24 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
// based on the maximum velocity present, see if we need to substep,
// but cap the maximum number of substeps to 5
- const int maxSubSteps = 5;
+ const int maxSubSteps = 25;
+ const int maxVel = 5;
maxVelocity = sqrt(maxVelocity) * dt;
- int totalSubsteps = (int)(maxVelocity / (float)maxSubSteps);
+ int totalSubsteps = (int)(maxVelocity / (float)maxVel);
totalSubsteps = (totalSubsteps < 1) ? 1 : totalSubsteps;
totalSubsteps = (totalSubsteps > maxSubSteps) ? maxSubSteps : totalSubsteps;
const float dtSubdiv = dt / (float)totalSubsteps;
// set boundaries of big velocity grid
- FLUID_3D::setZeroX(bigUx, _resBig);
- FLUID_3D::setZeroY(bigUy, _resBig);
- FLUID_3D::setZeroZ(bigUz, _resBig);
+ FLUID_3D::setZeroX(_bigUx, _resBig);
+ FLUID_3D::setZeroY(_bigUy, _resBig);
+ FLUID_3D::setZeroZ(_bigUz, _resBig);
// do the MacCormack advection, with substepping if necessary
for(int substep = 0; substep < totalSubsteps; substep++)
{
- FLUID_3D::advectFieldMacCormack(dtSubdiv, bigUx, bigUy, bigUz,
- _densityBigOld, _densityBig, tempBig1, tempBig2, _resBig, NULL);
+ FLUID_3D::advectFieldMacCormack(dtSubdiv, _bigUx, _bigUy, _bigUz,
+ _densityBigOld, _densityBig, _tempBig1, _tempBig2, _resBig, NULL);
if (substep < totalSubsteps - 1)
SWAP_POINTERS(_densityBig, _densityBigOld);
@@ -709,20 +732,17 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
// reset texture coordinates now in preparation for next timestep
// Shouldn't do this before generating the noise because then the
// eigenvalues stored do not reflect the underlying texture coordinates
- resetTextureCoordinates(eigMin, eigMax);
-
- delete[] tempBig1;
- delete[] tempBig2;
- delete[] bigUx;
- delete[] bigUy;
- delete[] bigUz;
- delete[] _energy;
- delete[] highFreqEnergy;
-
- delete[] eigMin;
- delete[] eigMax;
+ resetTextureCoordinates();
-
+ // output files
+ /*
+ string prefix = string("./amplified.preview/density_bigxy_");
+ FLUID_3D::writeImageSliceXY(_densityBig, _resBig, _resBig[2]/2, prefix, _totalStepsBig, 1.0f);
+ //string df3Prefix = string("./df3/density_big_");
+ //IMAGE::dumpDF3(_totalStepsBig, df3Prefix, _densityBig, _resBig[0],_resBig[1],_resBig[2]);
+ string pbrtPrefix = string("./pbrt/density_big_");
+ IMAGE::dumpPBRT(_totalStepsBig, pbrtPrefix, _densityBig, _resBig[0],_resBig[1],_resBig[2]);
+ */
_totalStepsBig++;
}
@@ -732,42 +752,20 @@ void WTURBULENCE::stepTurbulenceReadable(float dtOrg, float* xvel, float* yvel,
//////////////////////////////////////////////////////////////////////
void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, float* zvel, unsigned char *obstacles)
{
- // enlarge timestep to match grid
- const float dt = dtOrg * _amplify;
- const float invAmp = 1.0f / _amplify;
- float *tempBig1 = new float[_totalCellsBig];
- float *tempBig2 = new float[_totalCellsBig];
- float *bigUx = new float[_totalCellsBig];
- float *bigUy = new float[_totalCellsBig];
- float *bigUz = new float[_totalCellsBig];
- float *_energy = new float[_totalCellsSm];
- float *highFreqEnergy = new float[_totalCellsSm];
- float *eigMin = new float[_totalCellsSm];
- float *eigMax = new float[_totalCellsSm];
-
- memset(highFreqEnergy, 0, sizeof(float)*_totalCellsSm);
- memset(eigMin, 0, sizeof(float)*_totalCellsSm);
- memset(eigMax, 0, sizeof(float)*_totalCellsSm);
-
- // prepare textures
- advectTextureCoordinates(dtOrg, xvel,yvel,zvel, tempBig1, tempBig2);
-
- // do wavelet decomposition of energy
- computeEnergy(_energy, xvel, yvel, zvel, obstacles);
-
- for (int x = 0; x < _totalCellsSm; x++)
- if (obstacles[x]) _energy[x] = 0.f;
-
- decomposeEnergy(_energy, highFreqEnergy);
-
- // zero out coefficients inside of the obstacle
- for (int x = 0; x < _totalCellsSm; x++)
- if (obstacles[x]) highFreqEnergy[x] = 0.f;
-
- Vec3Int ressm(_xResSm, _yResSm, _zResSm);
- FLUID_3D::setNeumannX(highFreqEnergy, ressm);
- FLUID_3D::setNeumannY(highFreqEnergy, ressm);
- FLUID_3D::setNeumannZ(highFreqEnergy, ressm);
+ // enlarge timestep to match grid
+ const float dt = dtOrg * _amplify;
+ const float invAmp = 1.0f / _amplify;
+
+ // prepare textures
+ advectTextureCoordinates(dtOrg, xvel,yvel,zvel);
+
+ // do wavelet decomposition of energy
+ computeEnergy(xvel, yvel, zvel, obstacles);
+ decomposeEnergy();
+
+ // zero out coefficients inside of the obstacle
+ for (int x = 0; x < _totalCellsSm; x++)
+ if (obstacles[x]) _energy[x] = 0.f;
// parallel region setup
float maxVelMagThreads[8] = { -1., -1., -1., -1., -1., -1., -1., -1. };
@@ -820,8 +818,8 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
// compute the eigenvalues while we have the Jacobian available
Vec3 eigenvalues = Vec3(1.);
computeEigenvalues3x3( &eigenvalues[0], jacobian);
- eigMax[indexSmall] = MAX3V(eigenvalues);
- eigMin[indexSmall] = MIN3V(eigenvalues);
+ _eigMax[indexSmall] = MAX3V(eigenvalues);
+ _eigMin[indexSmall] = MIN3V(eigenvalues);
}
// make sure to skip one on the beginning and end
@@ -863,7 +861,7 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
// retrieve wavelet energy at highest frequency
float energy = INTERPOLATE::lerp3d(
- highFreqEnergy, posSm[0],posSm[1],posSm[2], _xResSm, _yResSm, _zResSm);
+ _highFreqEnergy, posSm[0],posSm[1],posSm[2], _xResSm, _yResSm, _zResSm);
// base amplitude for octave 0
float coefficient = sqrtf(2.0f * fabs(energy));
@@ -872,8 +870,8 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
// add noise to velocity, but only if the turbulence is
// sufficiently undeformed, and the energy is large enough
// to make a difference
- const bool addNoise = eigMax[indexSmall] < 2. &&
- eigMin[indexSmall] > 0.5;
+ const bool addNoise = _eigMax[indexSmall] < 2. &&
+ _eigMin[indexSmall] > 0.5;
if (addNoise && amplitude > _cullingThreshold) {
// base amplitude for octave 0
float amplitudeScaled = amplitude;
@@ -895,21 +893,21 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
// If you wanted to save memory, you would instead perform a
// semi-Lagrangian backtrace for the current grid cell here. Then
// you could just throw the velocity away.
- bigUx[index] = vel[0];
- bigUy[index] = vel[1];
- bigUz[index] = vel[2];
+ _bigUx[index] = vel[0];
+ _bigUy[index] = vel[1];
+ _bigUz[index] = vel[2];
// compute the velocity magnitude for substepping later
- const float velMag = bigUx[index] * bigUx[index] +
- bigUy[index] * bigUy[index] +
- bigUz[index] * bigUz[index];
+ const float velMag = _bigUx[index] * _bigUx[index] +
+ _bigUy[index] * _bigUy[index] +
+ _bigUz[index] * _bigUz[index];
if (velMag > maxVelMag1) maxVelMag1 = velMag;
// zero out velocity inside obstacles
float obsCheck = INTERPOLATE::lerp3dToFloat(
obstacles, posSm[0], posSm[1], posSm[2], _xResSm, _yResSm, _zResSm);
if (obsCheck > 0.95)
- bigUx[index] = bigUy[index] = bigUz[index] = 0.;
+ _bigUx[index] = _bigUy[index] = _bigUz[index] = 0.;
} // xyz
#if PARALLEL==1
@@ -943,27 +941,19 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
const float dtSubdiv = dt / (float)totalSubsteps;
// set boundaries of big velocity grid
- FLUID_3D::setZeroX(bigUx, _resBig);
- FLUID_3D::setZeroY(bigUy, _resBig);
- FLUID_3D::setZeroZ(bigUz, _resBig);
+ FLUID_3D::setZeroX(_bigUx, _resBig);
+ FLUID_3D::setZeroY(_bigUy, _resBig);
+ FLUID_3D::setZeroZ(_bigUz, _resBig);
// do the MacCormack advection, with substepping if necessary
for(int substep = 0; substep < totalSubsteps; substep++)
{
- FLUID_3D::advectFieldMacCormack(dtSubdiv, bigUx, bigUy, bigUz,
- _densityBigOld, _densityBig, tempBig1, tempBig2, _resBig, NULL);
+ FLUID_3D::advectFieldMacCormack(dtSubdiv, _bigUx, _bigUy, _bigUz,
+ _densityBigOld, _densityBig, _tempBig1, _tempBig2, _resBig, NULL);
if (substep < totalSubsteps - 1)
SWAP_POINTERS(_densityBig, _densityBigOld);
} // substep
-
- delete[] tempBig1;
- delete[] tempBig2;
- delete[] bigUx;
- delete[] bigUy;
- delete[] bigUz;
- delete[] _energy;
- delete[] highFreqEnergy;
// wipe the density borders
FLUID_3D::setZeroBorder(_densityBig, _resBig);
@@ -971,10 +961,7 @@ void WTURBULENCE::stepTurbulenceFull(float dtOrg, float* xvel, float* yvel, floa
// reset texture coordinates now in preparation for next timestep
// Shouldn't do this before generating the noise because then the
// eigenvalues stored do not reflect the underlying texture coordinates
- resetTextureCoordinates(eigMin, eigMax);
-
- delete[] eigMin;
- delete[] eigMax;
+ resetTextureCoordinates();
// output files
// string prefix = string("./amplified.preview/density_bigxy_");
diff --git a/intern/smoke/intern/WTURBULENCE.h b/intern/smoke/intern/WTURBULENCE.h
index 0aa978e9e52..d4e6b0c6a17 100644
--- a/intern/smoke/intern/WTURBULENCE.h
+++ b/intern/smoke/intern/WTURBULENCE.h
@@ -49,10 +49,10 @@ class WTURBULENCE
void stepTurbulenceFull(float dt, float* xvel, float* yvel, float* zvel, unsigned char *obstacles);
// texcoord functions
- void advectTextureCoordinates(float dtOrg, float* xvel, float* yvel, float* zvel, float *tempBig1, float *tempBig2);
- void resetTextureCoordinates(float *_eigMin, float *_eigMax);
+ void advectTextureCoordinates(float dtOrg, float* xvel, float* yvel, float* zvel);
+ void resetTextureCoordinates();
- void computeEnergy(float *energy, float* xvel, float* yvel, float* zvel, unsigned char *obstacles);
+ void computeEnergy(float* xvel, float* yvel, float* zvel, unsigned char *obstacles);
// evaluate wavelet noise function
Vec3 WVelocity(Vec3 p);
@@ -63,6 +63,8 @@ class WTURBULENCE
inline float* getArrayTcU() { return _tcU; }
inline float* getArrayTcV() { return _tcV; }
inline float* getArrayTcW() { return _tcW; }
+ inline float* getArrayEigMin() { return _eigMin; }
+ inline float* getArrayEigMax() { return _eigMax; }
inline Vec3Int getResSm() { return _resSm; } // small resolution
inline Vec3Int getResBig() { return _resBig; }
@@ -71,7 +73,7 @@ class WTURBULENCE
// is accessed on through rna gui
float *_strength;
- // protected:
+ protected:
// enlargement factor from original velocity field / simulation
// _Big = _amplify * _Sm
int _amplify;
@@ -79,15 +81,15 @@ class WTURBULENCE
// noise settings
float _cullingThreshold;
- // float _noiseStrength;
- // float _noiseSizeScale;
- // bool _uvwAdvection;
- // bool _uvwReset;
- // float _noiseTimeanimSpeed;
- // int _dumpInterval;
- // nt _noiseControlType;
+ float _noiseStrength;
+ float _noiseSizeScale;
+ bool _uvwAdvection;
+ bool _uvwReset;
+ float _noiseTimeanimSpeed;
+ int _dumpInterval;
+ int _noiseControlType;
// debug, scale density for projections output images
- // float _outputScale;
+ float _outputScale;
// noise resolution
int _xResBig;
@@ -109,21 +111,39 @@ class WTURBULENCE
float* _densityBig;
float* _densityBigOld;
+ // big velocity macCormack fields
+ float* _bigUx;
+ float* _bigUy;
+ float* _bigUz;
+ // temp arrays for BFECC and MacCormack - they have more convenient
+ // names in the actual implementations
+ float* _tempBig1;
+ float* _tempBig2;
+
// texture coordinates for noise
float* _tcU;
float* _tcV;
float* _tcW;
float* _tcTemp;
+ float* _eigMin;
+ float* _eigMax;
+
+ // wavelet decomposition of velocity energies
+ float* _energy;
+
// noise data
float* _noiseTile;
//float* _noiseTileExt;
// step counter
int _totalStepsBig;
+
+ // highest frequency component of wavelet decomposition
+ float* _highFreqEnergy;
- void computeEigenvalues(float *_eigMin, float *_eigMax);
- void decomposeEnergy(float *energy, float *_highFreqEnergy);
+ void computeEigenvalues();
+ void decomposeEnergy();
};
#endif // WTURBULENCE_H
diff --git a/intern/smoke/intern/smoke_API.cpp b/intern/smoke/intern/smoke_API.cpp
index 058831dddbb..2e95a576eaf 100644
--- a/intern/smoke/intern/smoke_API.cpp
+++ b/intern/smoke/intern/smoke_API.cpp
@@ -20,7 +20,7 @@
* The Original Code is Copyright (C) 2009 by Daniel Genrich
* All rights reserved.
*
- * Contributor(s): Daniel Genrich
+ * Contributor(s): None
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -181,36 +181,6 @@ template < class T > inline T ABS( T a ) {
return (0 < a) ? a : -a ;
}
-extern "C" void smoke_export(FLUID_3D *fluid, float *dt, float *dx, float **dens, float **densold, float **heat, float **heatold, float **vx, float **vy, float **vz, float **vxold, float **vyold, float **vzold, unsigned char **obstacles)
-{
- *dens = fluid->_density;
- *densold = fluid->_densityOld;
- *heat = fluid->_heat;
- *heatold = fluid->_heatOld;
- *vx = fluid->_xVelocity;
- *vy = fluid->_yVelocity;
- *vz = fluid->_zVelocity;
- *vxold = fluid->_xVelocityOld;
- *vyold = fluid->_yVelocityOld;
- *vzold = fluid->_zVelocityOld;
- *obstacles = fluid->_obstacles;
- dt = &(fluid->_dt);
- dx = &(fluid->_dx);
-
-}
-
-extern "C" void smoke_turbulence_export(WTURBULENCE *wt, float **dens, float **densold, float **tcu, float **tcv, float **tcw)
-{
- if(!wt)
- return;
-
- *dens = wt->_densityBig;
- *densold = wt->_densityBigOld;
- *tcu = wt->_tcU;
- *tcv = wt->_tcV;
- *tcw = wt->_tcW;
-}
-
extern "C" float *smoke_get_density(FLUID_3D *fluid)
{
return fluid->_density;
@@ -223,17 +193,17 @@ extern "C" float *smoke_get_heat(FLUID_3D *fluid)
extern "C" float *smoke_get_velocity_x(FLUID_3D *fluid)
{
- return fluid->_xVelocity;
+ return fluid->_xVorticity;
}
extern "C" float *smoke_get_velocity_y(FLUID_3D *fluid)
{
- return fluid->_yVelocity;
+ return fluid->_yVorticity;
}
extern "C" float *smoke_get_velocity_z(FLUID_3D *fluid)
{
- return fluid->_zVelocity;
+ return fluid->_zVorticity;
}
extern "C" float *smoke_turbulence_get_density(WTURBULENCE *wt)
diff --git a/intern/smoke/intern/tnt/tnt_math_utils.h b/intern/smoke/intern/tnt/tnt_math_utils.h
index f6aad8eaf38..6e14a1d9b90 100644
--- a/intern/smoke/intern/tnt/tnt_math_utils.h
+++ b/intern/smoke/intern/tnt/tnt_math_utils.h
@@ -4,9 +4,7 @@
/* needed for fabs, sqrt() below */
#include <cmath>
-#ifdef _WIN32
-#define hypot _hypot
-#endif
+
namespace TNT
{
diff --git a/intern/string/SConscript b/intern/string/SConscript
index 4aca220183c..8973ac88a66 100644
--- a/intern/string/SConscript
+++ b/intern/string/SConscript
@@ -4,4 +4,4 @@ Import ('env')
sources = env.Glob('intern/*.cpp')
incs = '.'
-env.BlenderLib ('bf_string', sources, Split(incs), [], libtype=['intern','player'], priority = [50,10] )
+env.BlenderLib ('bf_string', sources, Split(incs), [], libtype=['intern'], priority = [50] )
diff --git a/intern/string/STR_String.h b/intern/string/STR_String.h
index d8023a06f81..941430fd976 100644
--- a/intern/string/STR_String.h
+++ b/intern/string/STR_String.h
@@ -50,13 +50,6 @@
using namespace std;
-#ifdef WITH_CXX_GUARDEDALLOC
-#include "MEM_guardedalloc.h"
-#endif
-
-#ifdef _WIN32
-#define stricmp _stricmp
-#endif
class STR_String;
@@ -198,13 +191,6 @@ protected:
char *pData; // -> STR_String data
int Len; // Data length
int Max; // Space in data buffer
-
-
-#ifdef WITH_CXX_GUARDEDALLOC
-public:
- void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "CXX:STR_String"); }
- void operator delete( void *mem ) { MEM_freeN(mem); }
-#endif
};
inline STR_String operator+(rcSTR_String lhs, rcSTR_String rhs) { return STR_String(lhs.ReadPtr(), lhs.Length(), rhs.ReadPtr(), rhs.Length()); }
diff --git a/projectfiles_vc9/blender/BPY_python/BPY_python.vcproj b/projectfiles_vc9/blender/BPY_python/BPY_python.vcproj
index 7f1eff21e6f..d0872a43403 100644
--- a/projectfiles_vc9/blender/BPY_python/BPY_python.vcproj
+++ b/projectfiles_vc9/blender/BPY_python/BPY_python.vcproj
@@ -335,10 +335,6 @@
Name="internal"
>
<File
- RelativePath="..\..\..\source\blender\python\intern\bpy_array.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\python\intern\bpy_interface.c"
>
</File>
diff --git a/projectfiles_vc9/blender/blender.sln b/projectfiles_vc9/blender/blender.sln
index 1bd132ea223..602105dc501 100644
--- a/projectfiles_vc9/blender/blender.sln
+++ b/projectfiles_vc9/blender/blender.sln
@@ -10,7 +10,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blender", "blender.vcproj",
{C66F722C-46BE-40C9-ABAE-2EAC7A697EB8} = {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}
{D1A9312F-4557-4982-A0F4-4D08508235F4} = {D1A9312F-4557-4982-A0F4-4D08508235F4}
{884D8731-654C-4C7F-9A75-8F37A305BE1E} = {884D8731-654C-4C7F-9A75-8F37A305BE1E}
- {79D0B232-208C-F208-DA71-79B4AC088602} = {79D0B232-208C-F208-DA71-79B4AC088602}
{E645CC32-4823-463E-82F0-46ADDE664018} = {E645CC32-4823-463E-82F0-46ADDE664018}
{7495FE37-933A-4AC1-BB2A-B3FDB4DE4284} = {7495FE37-933A-4AC1-BB2A-B3FDB4DE4284}
{51FB3D48-2467-4BFA-A321-D848252B437E} = {51FB3D48-2467-4BFA-A321-D848252B437E}
@@ -25,7 +24,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blender", "blender.vcproj",
{415BFD6E-64CF-422B-AF88-C07F040A7292} = {415BFD6E-64CF-422B-AF88-C07F040A7292}
{106AE171-0083-41D6-A949-20DB0E8DC251} = {106AE171-0083-41D6-A949-20DB0E8DC251}
{670EC17A-0548-4BBF-A27B-636C7C188139} = {670EC17A-0548-4BBF-A27B-636C7C188139}
- {8BFA4082-773B-D100-BC24-659083BA023F} = {8BFA4082-773B-D100-BC24-659083BA023F}
{4C3AB78A-52CA-4276-A041-39776E52D8C8} = {4C3AB78A-52CA-4276-A041-39776E52D8C8}
{6B801390-5F95-4F07-81A7-97FBA046AACC} = {6B801390-5F95-4F07-81A7-97FBA046AACC}
{CAE37E91-6570-43AC-A4B4-7A37A4B0FC94} = {CAE37E91-6570-43AC-A4B4-7A37A4B0FC94}
@@ -86,7 +84,6 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DNA_makesdna", "makesdna\DNA_makesdna.vcproj", "{E013786A-9575-4F34-81B2-33290357EE87}"
ProjectSection(ProjectDependencies) = postProject
{31628053-825D-4C06-8A21-D13883489718} = {31628053-825D-4C06-8A21-D13883489718}
- {1CC733F1-6AB5-4904-8F63-C08C46B79DD9} = {1CC733F1-6AB5-4904-8F63-C08C46B79DD9}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXP_expressions", "..\gameengine\expression\EXP_expressions.vcproj", "{EADC3C5A-6C51-4F03-8038-1553E7D7F740}"
@@ -223,10 +220,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_glew", "..\..\extern\gl
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_build_install_all", "..\..\extern\make\msvc_9_0\build_install_all.vcproj", "{9C71A793-C177-4CAB-8EC5-923D500B39F8}"
ProjectSection(ProjectDependencies) = postProject
- {79D0B232-208C-F208-DA71-79B4AC088602} = {79D0B232-208C-F208-DA71-79B4AC088602}
{FFD3C64A-30E2-4BC7-BC8F-51818C320400} = {FFD3C64A-30E2-4BC7-BC8F-51818C320400}
- {8BFA4082-773B-D100-BC24-659083BA023F} = {8BFA4082-773B-D100-BC24-659083BA023F}
- {BAC615B0-F1AF-418B-8D23-A10FD8870D6A} = {BAC615B0-F1AF-418B-8D23-A10FD8870D6A}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_boolop", "..\..\intern\boolop\make\msvc_9_0\boolop.vcproj", "{EB75F4D6-2970-4A3A-8D99-2BAD7201C0E9}"
@@ -248,9 +242,6 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_elbeem", "..\..\intern\elbeem\make\msvc_9_0\elbeem.vcproj", "{A90C4918-4B21-4277-93BD-AF65F30951D9}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_ghost", "..\..\intern\ghost\make\msvc_9_0\ghost.vcproj", "{76D90B92-ECC7-409C-9F98-A8814B90F3C0}"
- ProjectSection(ProjectDependencies) = postProject
- {B789C2F3-279E-4A85-8F0A-7F7AC068E598} = {B789C2F3-279E-4A85-8F0A-7F7AC068E598}
- EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_guardedalloc", "..\..\intern\guardedalloc\make\msvc_9_0\guardedalloc.vcproj", "{1CC733F1-6AB5-4904-8F63-C08C46B79DD9}"
EndProject
@@ -310,10 +301,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_smoke", "..\..\intern\s
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "INT_audaspace", "..\..\intern\audaspace\make\msvc_9_0\audaspace.vcproj", "{87032FD2-9BA0-6B43-BE33-8902BA8F9172}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_lzma", "..\..\extern\lzma\make\msvc_9_0\lzma.vcproj", "{79D0B232-208C-F208-DA71-79B4AC088602}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EXT_lzo", "..\..\extern\lzo\make\msvc_9_0\lzo.vcproj", "{8BFA4082-773B-D100-BC24-659083BA023F}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3D Plugin Debug|Win32 = 3D Plugin Debug|Win32
@@ -1456,46 +1443,6 @@ Global
{87032FD2-9BA0-6B43-BE33-8902BA8F9172}.Debug|Win32.Build.0 = 3DPlugin Debug|Win32
{87032FD2-9BA0-6B43-BE33-8902BA8F9172}.Release|Win32.ActiveCfg = 3DPlugin Release|Win32
{87032FD2-9BA0-6B43-BE33-8902BA8F9172}.Release|Win32.Build.0 = 3DPlugin Release|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.Blender Release|Win32.Build.0 = Blender Release|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Release|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.BlenderPlayer Debug|Win32.Build.0 = Blender Release|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {79D0B232-208C-F208-DA71-79B4AC088602}.Release|Win32.Build.0 = 3D Plugin Release|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.3D Plugin Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.3D Plugin Debug|Win32.Build.0 = 3D Plugin Debug|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.3D Plugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.3D Plugin Release|Win32.Build.0 = 3D Plugin Release|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.3DPlugin Debug|Win32.ActiveCfg = 3D Plugin Release|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.3DPlugin Debug|Win32.Build.0 = 3D Plugin Release|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.3DPlugin Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.3DPlugin Release|Win32.Build.0 = 3D Plugin Release|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.Blender Release|Win32.Build.0 = Blender Release|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Release|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.BlenderPlayer Debug|Win32.Build.0 = Blender Release|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.BlenderPlayer Release|Win32.ActiveCfg = Blender Release|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.BlenderPlayer Release|Win32.Build.0 = Blender Release|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.Debug|Win32.ActiveCfg = 3D Plugin Debug|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.Debug|Win32.Build.0 = 3D Plugin Debug|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.Release|Win32.ActiveCfg = 3D Plugin Release|Win32
- {8BFA4082-773B-D100-BC24-659083BA023F}.Release|Win32.Build.0 = 3D Plugin Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/projectfiles_vc9/blender/blender.vcproj b/projectfiles_vc9/blender/blender.vcproj
index e6a5c483f7a..7b71ee49870 100644
--- a/projectfiles_vc9/blender/blender.vcproj
+++ b/projectfiles_vc9/blender/blender.vcproj
@@ -73,12 +73,12 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
- AdditionalDependencies="libsamplerate.lib SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib OpenAL32.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half.lib Iex.lib IlmImf.lib Imath.lib IlmThread.lib avcodec-52.lib avformat-52.lib avutil-50.lib swscale-0.lib avdevice-52.lib libsndfile-1.lib"
+ AdditionalDependencies="libsamplerate.lib SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib OpenAL32.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half.lib Iex.lib IlmImf.lib Imath.lib IlmThread.lib avcodec-52.lib avformat-52.lib avutil-50.lib swscale-0.lib avdevice-52.lib"
ShowProgress="0"
OutputFile="..\..\..\install\msvc_9\blender.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
- AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\openal\lib;..\..\..\lib\windows\openexr\lib_vs2008;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\build\msvc_9\libs\intern;..\..\..\build\msvc_9\libs\extern;..\..\..\lib\windows\ffmpeg\lib;..\..\..\lib\windows\samplerate\lib;..\..\..\lib\windows\sndfile\lib"
+ AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\openal\lib;..\..\..\lib\windows\openexr\lib_vs2008;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\build\msvc_9\libs\intern;..\..\..\build\msvc_9\libs\extern;..\..\..\lib\windows\ffmpeg\lib;..\..\..\lib\windows\samplerate\lib"
IgnoreAllDefaultLibraries="false"
IgnoreDefaultLibraryNames="msvcprt.lib;glut32.lib;libc.lib;libcd.lib;libcpd.lib;libcp.lib;libcmtd.lib;odbc32.lib;odbccp32.lib"
GenerateDebugInformation="true"
@@ -107,7 +107,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="ECHO Moving libraries and export definitions...&#x0D;&#x0A;MOVE /Y ..\..\bin\blender.lib ..\..\..\build\msvc_9\libs&#x0D;&#x0A;MOVE /Y ..\..\bin\blender.exp ..\..\..\build\msvc_9\libs&#x0D;&#x0A;ECHO Copying required 3rd party dlls...&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\python\lib\python31.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\release\python31.zip ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\release\zlib.pyd ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\openal\lib\wrap_oal.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\openal\lib\OpenAL32.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\sdl\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\tiff\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\pthreads\lib\pthreadVSE2.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\ffmpeg\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\sndfile\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;ECHO Copying language folder&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9\.blender MKDIR ..\..\..\install\msvc_9\.blender&#x0D;&#x0A;XCOPY /Y ..\..\bin\.blender ..\..\..\install\msvc_9\.blender /E&#x0D;&#x0A;ECHO Copying python scripts&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9\.blender\scripts MKDIR ..\..\..\install\msvc_9\.blender\scripts&#x0D;&#x0A;XCOPY /Y ..\..\release\scripts ..\..\..\install\msvc_9\.blender\scripts /E&#x0D;&#x0A;ECHO Copying python ui scripts&#x0D;&#x0A;IF NOT EXIST ..\..\bin\.blender\ui MKDIR ..\..\..\install\msvc_9\.blender\ui&#x0D;&#x0A;XCOPY /Y ..\..\release\ui ..\..\..\install\msvc_9\.blender\ui /E&#x0D;&#x0A;ECHO Copying manuals/text&#x0D;&#x0A;XCOPY/Y ..\..\release\text ..\..\..\install\msvc_9 /E&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
+ CommandLine="ECHO Moving libraries and export definitions...&#x0D;&#x0A;MOVE /Y ..\..\bin\blender.lib ..\..\..\build\msvc_9\libs&#x0D;&#x0A;MOVE /Y ..\..\bin\blender.exp ..\..\..\build\msvc_9\libs&#x0D;&#x0A;ECHO Copying required 3rd party dlls...&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\python\lib\python31.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\release\python31.zip ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\release\zlib.pyd ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\openal\lib\wrap_oal.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\openal\lib\OpenAL32.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\sdl\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\tiff\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\pthreads\lib\pthreadVSE2.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\ffmpeg\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;ECHO Copying language folder&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9\.blender MKDIR ..\..\..\install\msvc_9\.blender&#x0D;&#x0A;XCOPY /Y ..\..\bin\.blender ..\..\..\install\msvc_9\.blender /E&#x0D;&#x0A;ECHO Copying python scripts&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9\.blender\scripts MKDIR ..\..\..\install\msvc_9\.blender\scripts&#x0D;&#x0A;XCOPY /Y ..\..\release\scripts ..\..\..\install\msvc_9\.blender\scripts /E&#x0D;&#x0A;ECHO Copying python ui scripts&#x0D;&#x0A;IF NOT EXIST ..\..\bin\.blender\ui MKDIR ..\..\..\install\msvc_9\.blender\ui&#x0D;&#x0A;XCOPY /Y ..\..\release\ui ..\..\..\install\msvc_9\.blender\ui /E&#x0D;&#x0A;ECHO Copying manuals/text&#x0D;&#x0A;XCOPY/Y ..\..\release\text ..\..\..\install\msvc_9 /E&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
@@ -168,12 +168,12 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386&#x0D;&#x0A;"
- AdditionalDependencies="libsamplerate.lib SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib OpenAL32.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31_d.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half_d.lib Iex_d.lib Imath_d.lib IlmImf_d.lib IlmThread_d.lib avcodec-52.lib avformat-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib libsndfile-1.lib"
+ AdditionalDependencies="libsamplerate.lib SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib OpenAL32.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31_d.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half_d.lib Iex_d.lib Imath_d.lib IlmImf_d.lib IlmThread_d.lib avcodec-52.lib avformat-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib"
ShowProgress="0"
OutputFile="..\..\..\install\msvc_9d\blender.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
- AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\openal\lib;..\..\..\lib\windows\openexr\lib_vs2008;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\lib\windows\ffmpeg\lib;..\..\..\build\msvc_9\libs\intern\debug;..\..\..\build\msvc_9\libs\extern\debug;..\..\..\lib\windows\samplerate\lib;..\..\..\lib\windows\sndfile\lib"
+ AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\openal\lib;..\..\..\lib\windows\openexr\lib_vs2008;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\lib\windows\ffmpeg\lib;..\..\..\build\msvc_9\libs\intern\debug;..\..\..\build\msvc_9\libs\extern\debug;..\..\..\lib\windows\samplerate\lib"
IgnoreDefaultLibraryNames="libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, odbc32.lib, odbccp32.lib"
GenerateDebugInformation="true"
ProgramDatabaseFile="..\..\..\build\msvc_9\libs\debug\blender.pdb"
@@ -201,7 +201,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="ECHO Moving libraries and export definitions...&#x0D;&#x0A;MOVE /Y ..\..\bin\debug\blender.lib ..\..\..\build\msvc_9\libs\debug&#x0D;&#x0A;MOVE /Y ..\..\bin\debug\blender.exp ..\..\..\build\msvc_9\libs\debug&#x0D;&#x0A;MOVE /Y ..\..\bin\debug\blender.ilk ..\..\..\build\msvc_9\libs\debug&#x0D;&#x0A;ECHO Copying required 3rd party dlls...&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\sdl\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\python\lib\python31_d.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\release\python31.zip ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\release\zlib.pyd ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\openal\lib\wrap_oal.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\openal\lib\OpenAL32.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\CRTL\lib\msvcrtd.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\tiff\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\pthreads\lib\pthreadVSE2.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\ffmpeg\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\sndfile\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;ECHO Copying language folder&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9d\.blender MKDIR ..\..\..\install\msvc_9d\.blender&#x0D;&#x0A;XCOPY /Y ..\..\bin\.blender ..\..\..\install\msvc_9d\.blender /E&#x0D;&#x0A;ECHO Copying python scripts&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9d\.blender\scripts MKDIR ..\..\..\install\msvc_9d\.blender\scripts&#x0D;&#x0A;XCOPY /Y ..\..\release\scripts ..\..\..\install\msvc_9d\.blender\scripts /E&#x0D;&#x0A;ECHO Copying python ui scripts&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9d\.blender\ui MKDIR ..\..\..\install\msvc_9d\.blender\ui&#x0D;&#x0A;XCOPY /Y ..\..\release\ui ..\..\..\install\msvc_9d\.blender\ui /E&#x0D;&#x0A;ECHO Copying manuals/text&#x0D;&#x0A;XCOPY/Y ..\..\release\text ..\..\..\install\msvc_9d /E&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
+ CommandLine="ECHO Moving libraries and export definitions...&#x0D;&#x0A;MOVE /Y ..\..\bin\debug\blender.lib ..\..\..\build\msvc_9\libs\debug&#x0D;&#x0A;MOVE /Y ..\..\bin\debug\blender.exp ..\..\..\build\msvc_9\libs\debug&#x0D;&#x0A;MOVE /Y ..\..\bin\debug\blender.ilk ..\..\..\build\msvc_9\libs\debug&#x0D;&#x0A;ECHO Copying required 3rd party dlls...&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\sdl\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\python\lib\python31_d.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\release\python31.zip ..\..\..\install\msvc_9d\python31_d.zip&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\release\zlib.pyd ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\openal\lib\wrap_oal.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\openal\lib\OpenAL32.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\CRTL\lib\msvcrtd.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\tiff\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\pthreads\lib\pthreadVSE2.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\ffmpeg\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;ECHO Copying language folder&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9d\.blender MKDIR ..\..\..\install\msvc_9d\.blender&#x0D;&#x0A;XCOPY /Y ..\..\bin\.blender ..\..\..\install\msvc_9d\.blender /E&#x0D;&#x0A;ECHO Copying python scripts&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9d\.blender\scripts MKDIR ..\..\..\install\msvc_9d\.blender\scripts&#x0D;&#x0A;XCOPY /Y ..\..\release\scripts ..\..\..\install\msvc_9d\.blender\scripts /E&#x0D;&#x0A;ECHO Copying python ui scripts&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9d\.blender\ui MKDIR ..\..\..\install\msvc_9d\.blender\ui&#x0D;&#x0A;XCOPY /Y ..\..\release\ui ..\..\..\install\msvc_9d\.blender\ui /E&#x0D;&#x0A;ECHO Copying manuals/text&#x0D;&#x0A;XCOPY/Y ..\..\release\text ..\..\..\install\msvc_9d /E&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
diff --git a/projectfiles_vc9/blender/blenkernel/BKE_blenkernel.vcproj b/projectfiles_vc9/blender/blenkernel/BKE_blenkernel.vcproj
index 87f10346726..7ba3aac65f0 100644
--- a/projectfiles_vc9/blender/blenkernel/BKE_blenkernel.vcproj
+++ b/projectfiles_vc9/blender/blenkernel/BKE_blenkernel.vcproj
@@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
PreprocessorDefinitions="_DEBUG,WIN32,_LIB"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -118,7 +118,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_OPENEXR;WITH_DDS;WITH_BULLET;WITH_FFMPEG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -193,7 +193,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;UNWRAPPER;WITH_OPENEXR;WITH_DDS;WITH_BULLET=1;WITH_FFMPEG"
StringPooling="true"
RuntimeLibrary="0"
@@ -268,7 +268,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB"
StringPooling="true"
RuntimeLibrary="2"
@@ -343,7 +343,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_FFMPEG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -418,7 +418,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;UNWRAPPER;WITH_FFMPEG"
StringPooling="true"
RuntimeLibrary="0"
@@ -698,10 +698,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\blenkernel\intern\paint.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\blenkernel\intern\particle.c"
>
</File>
@@ -1023,10 +1019,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\blenkernel\BKE_paint.h"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\blenkernel\BKE_particle.h"
>
</File>
diff --git a/projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj b/projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj
index a6630c81aca..c2268694735 100644
--- a/projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj
+++ b/projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj
@@ -567,6 +567,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\blenlib\intern\matrixops.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\blenlib\intern\noise.c"
>
</File>
@@ -603,7 +607,7 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\blenlib\intern\voxel.c"
+ RelativePath="..\..\..\source\blender\blenlib\intern\vectorops.c"
>
</File>
<File
@@ -720,11 +724,15 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\blenlib\BLI_voxel.h"
+ RelativePath="..\..\..\source\blender\blenlib\BLI_winstuff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\source\blender\blenlib\MTC_matrixops.h"
>
</File>
<File
- RelativePath="..\..\..\source\blender\blenlib\BLI_winstuff.h"
+ RelativePath="..\..\..\source\blender\blenlib\MTC_vectorops.h"
>
</File>
<File
diff --git a/projectfiles_vc9/blender/editors/ED_editors.vcproj b/projectfiles_vc9/blender/editors/ED_editors.vcproj
index 5a6519d3d35..174ceb5ca99 100644
--- a/projectfiles_vc9/blender/editors/ED_editors.vcproj
+++ b/projectfiles_vc9/blender/editors/ED_editors.vcproj
@@ -218,10 +218,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\include\ED_info.h"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\editors\include\ED_interface.h"
>
</File>
@@ -294,10 +290,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\include\ED_sound.h"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\editors\include\ED_space_api.h"
>
</File>
@@ -467,10 +459,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\space_view3d\drawvolume.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\editors\space_view3d\space_view3d.c"
>
</File>
@@ -523,6 +511,10 @@
>
</File>
<File
+ RelativePath="..\..\..\source\blender\editors\space_time\time_header.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\editors\space_time\time_intern.h"
>
</File>
@@ -815,10 +807,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\space_info\info_stats.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\editors\space_info\space_info.c"
>
</File>
@@ -1075,23 +1063,23 @@
Name="object"
>
<File
- RelativePath="..\..\..\source\blender\editors\object\object_add.c"
+ RelativePath="..\..\..\source\blender\editors\object\editconstraint.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\object\object_constraint.c"
+ RelativePath="..\..\..\source\blender\editors\object\editgroup.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\object\object_edit.c"
+ RelativePath="..\..\..\source\blender\editors\object\editkey.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\object\object_group.c"
+ RelativePath="..\..\..\source\blender\editors\object\editlattice.c"
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\object\object_hook.c"
+ RelativePath="..\..\..\source\blender\editors\object\object_edit.c"
>
</File>
<File
@@ -1099,10 +1087,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\object\object_lattice.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\editors\object\object_modifier.c"
>
</File>
@@ -1111,22 +1095,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\object\object_relations.c"
- >
- </File>
- <File
- RelativePath="..\..\..\source\blender\editors\object\object_select.c"
- >
- </File>
- <File
- RelativePath="..\..\..\source\blender\editors\object\object_shapekey.c"
- >
- </File>
- <File
- RelativePath="..\..\..\source\blender\editors\object\object_transform.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\editors\object\object_vgroup.c"
>
</File>
@@ -1307,10 +1275,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\sculpt_paint\paint_stroke.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\editors\sculpt_paint\paint_utils.c"
>
</File>
@@ -1326,6 +1290,10 @@
RelativePath="..\..\..\source\blender\editors\sculpt_paint\sculpt_intern.h"
>
</File>
+ <File
+ RelativePath="..\..\..\source\blender\editors\sculpt_paint\sculpt_stroke.c"
+ >
+ </File>
</Filter>
<Filter
Name="uvedit"
@@ -1367,10 +1335,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\editors\gpencil\gpencil_buttons.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\editors\gpencil\gpencil_edit.c"
>
</File>
@@ -1378,14 +1342,6 @@
RelativePath="..\..\..\source\blender\editors\gpencil\gpencil_intern.h"
>
</File>
- <File
- RelativePath="..\..\..\source\blender\editors\gpencil\gpencil_ops.c"
- >
- </File>
- <File
- RelativePath="..\..\..\source\blender\editors\gpencil\gpencil_paint.c"
- >
- </File>
</Filter>
<Filter
Name="curve"
@@ -1499,7 +1455,7 @@
Name="metaball"
>
<File
- RelativePath="..\..\..\source\blender\editors\metaball\mball_edit.c"
+ RelativePath="..\..\..\source\blender\editors\metaball\editmball.c"
>
</File>
<File
@@ -1511,34 +1467,6 @@
>
</File>
</Filter>
- <Filter
- Name="space_userpref"
- >
- <File
- RelativePath="..\..\..\source\blender\editors\space_userpref\space_userpref.c"
- >
- </File>
- <File
- RelativePath="..\..\..\source\blender\editors\space_userpref\userpref_intern.h"
- >
- </File>
- <File
- RelativePath="..\..\..\source\blender\editors\space_userpref\userpref_ops.c"
- >
- </File>
- </Filter>
- <Filter
- Name="sound"
- >
- <File
- RelativePath="..\..\..\source\blender\editors\sound\sound_intern.h"
- >
- </File>
- <File
- RelativePath="..\..\..\source\blender\editors\sound\sound_ops.c"
- >
- </File>
- </Filter>
</Files>
<Globals>
</Globals>
diff --git a/projectfiles_vc9/blender/imbuf/BL_imbuf.vcproj b/projectfiles_vc9/blender/imbuf/BL_imbuf.vcproj
index 0e25b26831b..f9470dcebfe 100644
--- a/projectfiles_vc9/blender/imbuf/BL_imbuf.vcproj
+++ b/projectfiles_vc9/blender/imbuf/BL_imbuf.vcproj
@@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_OPENEXR;WITH_DDS;WITH_FFMPEG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -118,7 +118,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
PreprocessorDefinitions="_DEBUG,WIN32,_LIB"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -192,7 +192,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB,WITH_QUICKTIME"
StringPooling="true"
RuntimeLibrary="2"
@@ -267,7 +267,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_OPENEXR;WITH_DDS;WITH_FFMPEG"
StringPooling="true"
RuntimeLibrary="0"
@@ -342,7 +342,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_DDS;WITH_FFMPEG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -417,7 +417,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\jpeg\include;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\png\include;..\..\..\..\lib\windows\tiff\include;..\..\..\..\lib\windows\openexr\include;..\..\..\..\lib\windows\openexr\include\Iex;..\..\..\..\lib\windows\openexr\include\Imath;..\..\..\..\lib\windows\openexr\include\IlmImf;..\..\..\..\lib\windows\QTDevWin\CIncludes;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf\intern;..\..\..\source\blender\readstreamglue;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\imbuf\intern\openexr;..\..\..\source\blender\imbuf\intern\dds"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_DDS;WITH_FFMPEG"
StringPooling="true"
RuntimeLibrary="0"
diff --git a/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj b/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj
index 8dd1982deca..b907997f190 100644
--- a/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj
+++ b/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj
@@ -45,7 +45,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenkernel;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\windowmanager;..\..\..\source\blender\imbuf"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenkernel;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="_DEBUG,WIN32,_CONSOLE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -140,7 +140,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenkernel;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\windowmanager;..\..\..\source\blender\imbuf"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenkernel;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="NDEBUG,WIN32,_CONSOLE"
StringPooling="true"
RuntimeLibrary="0"
@@ -234,7 +234,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenkernel;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\windowmanager;..\..\..\source\blender\imbuf"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenkernel;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="NDEBUG,WIN32,_CONSOLE"
StringPooling="true"
RuntimeLibrary="2"
@@ -328,7 +328,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenkernel;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\windowmanager;..\..\..\source\blender\imbuf"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenkernel;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -425,7 +425,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenkernel;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\windowmanager;..\..\..\source\blender\imbuf"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenkernel;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="_DEBUG,WIN32,_CONSOLE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -522,7 +522,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenkernel;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\windowmanager;..\..\..\source\blender\imbuf"
+ AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\blenlib;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenkernel;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="NDEBUG,WIN32,_CONSOLE"
StringPooling="true"
RuntimeLibrary="0"
@@ -611,10 +611,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna_animation_api.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_armature.c"
>
</File>
@@ -667,10 +663,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna_gpencil.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_group.c"
>
</File>
@@ -771,10 +763,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna_scene_api.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_screen.c"
>
</File>
@@ -803,10 +791,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna_test.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_text.c"
>
</File>
diff --git a/projectfiles_vc9/blender/makesrna/RNA_rna.vcproj b/projectfiles_vc9/blender/makesrna/RNA_rna.vcproj
index 84359390f41..1d7c3f38581 100644
--- a/projectfiles_vc9/blender/makesrna/RNA_rna.vcproj
+++ b/projectfiles_vc9/blender/makesrna/RNA_rna.vcproj
@@ -231,10 +231,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\makesrna\intern\rna_gpencil_gen.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_group_gen.c"
>
</File>
diff --git a/projectfiles_vc9/blender/render/BRE_render.vcproj b/projectfiles_vc9/blender/render/BRE_render.vcproj
index 4e354c6dde3..d7851674857 100644
--- a/projectfiles_vc9/blender/render/BRE_render.vcproj
+++ b/projectfiles_vc9/blender/render/BRE_render.vcproj
@@ -42,7 +42,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\sdl\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\yafray;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenkernel;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\blender\render\intern\include;..\..\..\source\blender\render\extern\include;..\..\..\source\kernel;..\..\..\source\kernel\gen_messaging"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\sdl\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\yafray;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenkernel;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\blender\render\intern\include;..\..\..\source\blender\render\extern\include;..\..\..\source\kernel;..\..\..\source\kernel\gen_messaging"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_OPENEXR"
StringPooling="true"
RuntimeLibrary="0"
@@ -117,7 +117,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\sdl\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\yafray;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenkernel;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\blender\render\intern\include;..\..\..\source\blender\render\extern\include;..\..\..\source\kernel;..\..\..\source\kernel\gen_messaging"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\sdl\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender;..\..\..\source\blender\misc;..\..\..\source\blender\imbuf;..\..\..\source\blender\yafray;..\..\..\source\blender\blenlib;..\..\..\source\blender\include;..\..\..\source\blender\python;..\..\..\source\blender\blenkernel;..\..\..\source\blender\quicktime;..\..\..\source\blender\blenloader;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\blender\render\intern\include;..\..\..\source\blender\render\extern\include;..\..\..\source\kernel;..\..\..\source\kernel\gen_messaging"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_QUICKTIME;WITH_OPENEXR;_USE_MATH_DEFINES"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -209,10 +209,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\render\intern\source\pointdensity.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\render\intern\source\rayshade.c"
>
</File>
@@ -257,18 +253,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\render\intern\source\volume_precache.c"
- >
- </File>
- <File
- RelativePath="..\..\..\source\blender\render\intern\source\volumetric.c"
- >
- </File>
- <File
- RelativePath="..\..\..\source\blender\render\intern\source\voxeldata.c"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\render\intern\source\zbuf.c"
>
</File>
@@ -314,10 +298,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\render\intern\include\pointdensity.h"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\render\extern\include\RE_pipeline.h"
>
</File>
@@ -330,10 +310,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\render\intern\include\render_types.h"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\render\intern\include\rendercore.h"
>
</File>
@@ -378,18 +354,6 @@
>
</File>
<File
- RelativePath="..\..\..\source\blender\render\intern\include\volume_precache.h"
- >
- </File>
- <File
- RelativePath="..\..\..\source\blender\render\intern\include\volumetric.h"
- >
- </File>
- <File
- RelativePath="..\..\..\source\blender\render\intern\include\voxeldata.h"
- >
- </File>
- <File
RelativePath="..\..\..\source\blender\render\intern\include\zbuf.h"
>
</File>
diff --git a/projectfiles_vc9/gameengine/videotexture/TEX_Video.vcproj b/projectfiles_vc9/gameengine/videotexture/TEX_Video.vcproj
index 94e09303a1b..e2731cf94e9 100644
--- a/projectfiles_vc9/gameengine/videotexture/TEX_Video.vcproj
+++ b/projectfiles_vc9/gameengine/videotexture/TEX_Video.vcproj
@@ -42,7 +42,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\GameLogic;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\Rasterizer;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf;..\..\..\source\blender\python;..\..\..\source\blender\gpu;..\..\..\source\kernel\gen_system;..\..\..\intern\string;..\..\..\intern\moto\include;..\..\..\intern\guardedalloc;..\..\..\intern\SoundSystem;..\..\..\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\GameLogic;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\Rasterizer;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf;..\..\..\source\blender\python;..\..\..\source\blender\gpu;..\..\..\source\kernel\gen_system;..\..\..\intern\string;..\..\..\intern\moto\include;..\..\..\intern\guardedalloc;..\..\..\intern\SoundSystem;..\..\..\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;WITH_FFMPEG;__STDC_CONSTANT_MACROS"
StringPooling="false"
BasicRuntimeChecks="3"
@@ -113,7 +113,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\GameLogic;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\Rasterizer;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf;..\..\..\source\blender\python;..\..\..\source\blender\gpu;..\..\..\source\kernel\gen_system;..\..\..\intern\string;..\..\..\intern\moto\include;..\..\..\intern\guardedalloc;..\..\..\intern\SoundSystem;..\..\..\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include"
+ AdditionalIncludeDirectories="..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\source\gameengine\Ketsji;..\..\..\source\gameengine\Expressions;..\..\..\source\gameengine\GameLogic;..\..\..\source\gameengine\SceneGraph;..\..\..\source\gameengine\Rasterizer;..\..\..\source\gameengine\Rasterizer\RAS_OpenGLRasterizer;..\..\..\source\gameengine\BlenderRoutines;..\..\..\source\blender\editors\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\imbuf;..\..\..\source\blender\python;..\..\..\source\blender\gpu;..\..\..\source\kernel\gen_system;..\..\..\intern\string;..\..\..\intern\moto\include;..\..\..\intern\guardedalloc;..\..\..\intern\SoundSystem;..\..\..\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;WITH_FFMPEG;__STDC_CONSTANT_MACROS"
StringPooling="true"
RuntimeLibrary="0"
diff --git a/release/datafiles/blenderbuttons b/release/datafiles/blenderbuttons
index 79d6138e3f0..98c321cd954 100644
--- a/release/datafiles/blenderbuttons
+++ b/release/datafiles/blenderbuttons
Binary files differ
diff --git a/release/datafiles/datatoc.c b/release/datafiles/datatoc.c
new file mode 100644
index 00000000000..46b935c7fd6
--- /dev/null
+++ b/release/datafiles/datatoc.c
@@ -0,0 +1,102 @@
+/**
+ * $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 *****
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+int main(int argc, char**argv) {
+ FILE *fpin, *fpout;
+ char cname[256];
+ char sizest[256];
+ size_t size;
+ int i;
+
+ if (argc<1) {
+ printf ("Usage: datatoc <data_file>\n");
+ exit(1);
+ }
+
+ fpin= fopen(argv[1], "rb");
+ if (!fpin) {
+ printf ("Unable to open input <%s>\n", argv[1]);
+ exit(1);
+ }
+
+ fseek (fpin, 0L, SEEK_END);
+ size= ftell(fpin);
+ fseek (fpin, 0L, SEEK_SET);
+
+ if (argv[1][0]=='.') argv[1]++;
+
+ sprintf(cname, "%s.c", argv[1]);
+ printf ("Making C file <%s>\n", cname);
+
+ for (i=0; i < (int)strlen(argv[1]); i++)
+ if (argv[1][i]=='.') argv[1][i]='_';
+
+ sprintf(sizest, "%d", (int)size);
+ printf ("Input filesize is %ld, Output size should be %ld\n", size, ((int)size)*4 + strlen("/* DataToC output of file <> */\n\n") + strlen("char datatoc_[]= {\"") + strlen ("\"};\n") + (strlen(argv[1])*3) + strlen(sizest) + strlen("int datatoc__size= ;\n") +(((int)(size/256)+1)*5));
+
+ fpout= fopen(cname, "w");
+ if (!fpout) {
+ printf ("Unable to open output <%s>\n", cname);
+ exit(1);
+ }
+
+ fprintf (fpout, "/* DataToC output of file <%s> */\n\n",argv[1]);
+ fprintf (fpout, "int datatoc_%s_size= %s;\n", argv[1], sizest);
+ /*
+ fprintf (fpout, "char datatoc_%s[]= {\"", argv[1]);
+
+ while (size--) {
+ if(size%256==0)
+ fprintf(fpout, "\" \\\n\"");
+
+ fprintf (fpout, "\\x%02x", getc(fpin));
+ }
+
+ fprintf (fpout, "\"};\n");
+ */
+
+ fprintf (fpout, "char datatoc_%s[]= {\n", argv[1]);
+ while (size--) {
+ if(size%32==31)
+ fprintf(fpout, "\n");
+
+ /* fprintf (fpout, "\\x%02x", getc(fpin)); */
+ fprintf (fpout, "%3d,", getc(fpin));
+ }
+ /* null terminate for the case it is a string */
+ fprintf (fpout, "\n 0};\n\n");
+
+ fclose(fpin);
+ fclose(fpout);
+ return 0;
+}
diff --git a/release/datafiles/splash.jpg b/release/datafiles/splash.jpg
index e35a26a2c23..1c34cf36f75 100644
--- a/release/datafiles/splash.jpg
+++ b/release/datafiles/splash.jpg
Binary files differ
diff --git a/release/io/engine_render_pov.py b/release/io/engine_render_pov.py
index 22cf1a36dbb..65add2baacb 100644
--- a/release/io/engine_render_pov.py
+++ b/release/io/engine_render_pov.py
@@ -82,8 +82,8 @@ def write_pov(filename, scene=None, info_callback = None):
file.write('#declare %s = finish {\n' % name)
if material:
- file.write('\tdiffuse %.3g\n' % material.diffuse_intensity)
- file.write('\tspecular %.3g\n' % material.specular_intensity)
+ file.write('\tdiffuse %.3g\n' % material.diffuse_reflection)
+ file.write('\tspecular %.3g\n' % material.specular_reflection)
file.write('\tambient %.3g\n' % material.ambient)
#file.write('\tambient rgb <%.3g, %.3g, %.3g>\n' % tuple([c*material.ambient for c in world.ambient_color])) # povray blends the global value
@@ -101,10 +101,10 @@ def write_pov(filename, scene=None, info_callback = None):
if material.raytrace_mirror.enabled:
raytrace_mirror= material.raytrace_mirror
- if raytrace_mirror.reflect_factor:
+ if raytrace_mirror.reflect:
file.write('\treflection {\n')
file.write('\t\trgb <%.3g, %.3g, %.3g>' % tuple(material.mirror_color))
- file.write('\t\tfresnel 1 falloff %.3g exponent %.3g metallic %.3g} ' % (raytrace_mirror.fresnel, raytrace_mirror.fresnel_factor, raytrace_mirror.reflect_factor))
+ file.write('\t\tfresnel 1 falloff %.3g exponent %.3g metallic %.3g} ' % (raytrace_mirror.fresnel, raytrace_mirror.fresnel_fac, raytrace_mirror.reflect))
else:
file.write('\tdiffuse 0.8\n')
@@ -300,7 +300,14 @@ def write_pov(filename, scene=None, info_callback = None):
try: vcol_layer = me.active_vertex_color.data
except:vcol_layer = None
- faces_verts = [f.verts for f in me.faces]
+
+ def regular_face(f):
+ fv = f.verts
+ if fv[3]== 0:
+ return fv[0], fv[1], fv[2]
+ return fv[0], fv[1], fv[2], fv[3]
+
+ faces_verts = [regular_face(f) for f in me.faces]
faces_normals = [tuple(f.normal) for f in me.faces]
verts_normals = [tuple(v.normal) for v in me.verts]
@@ -616,7 +623,7 @@ def write_pov_ini(filename_ini, filename_pov, filename_image):
file.write('Display=0\n')
file.write('Pause_When_Done=0\n')
- file.write('Output_File_Type=T\n') # TGA, best progressive loading
+ file.write('Output_File_Type=C\n') # TGA, best progressive loading
file.write('Output_Alpha=1\n')
if render.antialiasing:
@@ -628,89 +635,11 @@ def write_pov_ini(filename_ini, filename_pov, filename_image):
file.close()
-# Radiosity panel, use in the scene for now.
-FloatProperty= bpy.types.Scene.FloatProperty
-IntProperty= bpy.types.Scene.IntProperty
-BoolProperty= bpy.types.Scene.BoolProperty
-
-# Not a real pov option, just to know if we should write
-BoolProperty( attr="pov_radio_enable",
- name="Enable Radiosity",
- description="Enable povrays radiosity calculation.",
- default= False)
-BoolProperty( attr="pov_radio_display_advanced",
- name="Advanced Options",
- description="Show advanced options.",
- default= False)
-
-# Real pov options
-FloatProperty( attr="pov_radio_adc_bailout",
- name="ADC Bailout",
- description="The adc_bailout for radiosity rays. Use adc_bailout = 0.01 / brightest_ambient_object for good results.",
- min=0.0, max=1000.0, soft_min=0.0, soft_max=1.0, default= 0.01)
-
-BoolProperty( attr="pov_radio_always_sample",
- name="Always Sample",
- description="Only use the data from the pretrace step and not gather any new samples during the final radiosity pass..",
- default= True)
-
-FloatProperty( attr="pov_radio_brightness",
- name="Brightness",
- description="Ammount objects are brightened before being returned upwards to the rest of the system.",
- min=0.0, max=1000.0, soft_min=0.0, soft_max=10.0, default= 1.0)
-
-IntProperty( attr="pov_radio_count",
- name="Ray Count",
- description="number of rays that are sent out whenever a new radiosity value has to be calculated.",
- min=1, max=1600, default= 35)
-
-FloatProperty( attr="pov_radio_error_bound",
- name="Error Bound",
- description="one of the two main speed/quality tuning values, lower values are more accurate.",
- min=0.0, max=1000.0, soft_min=0.1, soft_max=10.0, default= 1.8)
-
-FloatProperty( attr="pov_radio_gray_threshold",
- name="Gray Threshold",
- description="one of the two main speed/quality tuning values, lower values are more accurate.",
- min=0.0, max=1.0, soft_min=0, soft_max=1, default= 0.0)
-
-FloatProperty( attr="pov_radio_low_error_factor",
- name="Low Error Factor",
- description="If you calculate just enough samples, but no more, you will get an image which has slightly blotchy lighting.",
- min=0.0, max=1.0, soft_min=0.0, soft_max=1.0, default= 0.5)
-
-# max_sample - not available yet
-BoolProperty( attr="pov_radio_media",
- name="Media",
- description="Radiosity estimation can be affected by media.",
- default= False)
-
-FloatProperty( attr="pov_radio_minimum_reuse",
- name="Minimum Reuse",
- description="Fraction of the screen width which sets the minimum radius of reuse for each sample point (At values higher than 2% expect errors).",
- min=0.0, max=1.0, soft_min=0.1, soft_max=0.1, default= 0.015)
-
-IntProperty( attr="pov_radio_nearest_count",
- name="Nearest Count",
- description="Number of old ambient values blended together to create a new interpolated value.",
- min=1, max=20, default= 5)
-
-BoolProperty( attr="pov_radio_normal",
- name="Normals",
- description="Radiosity estimation can be affected by normals.",
- default= False)
-
-IntProperty( attr="pov_radio_recursion_limit",
- name="Recursion Limit",
- description="how many recursion levels are used to calculate the diffuse inter-reflection.",
- min=1, max=20, default= 3)
-
class PovrayRender(bpy.types.RenderEngine):
__idname__ = 'POVRAY_RENDER'
__label__ = "Povray"
DELAY = 0.02
-
def _export(self, scene):
import tempfile
@@ -740,13 +669,10 @@ class PovrayRender(bpy.types.RenderEngine):
pov_binary = "povray"
if sys.platform=='win32':
- import winreg
- regKey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, 'Software\\POV-Ray\\v3.6\\Windows')
-
if bitness == 64:
- pov_binary = winreg.QueryValueEx(regKey, 'Home')[0] + '\\bin\\pvengine64'
+ pov_binary = "pvengine64"
else:
- pov_binary = winreg.QueryValueEx(regKey, 'Home')[0] + '\\bin\\pvengine'
+ pov_binary = "pvengine"
if 1:
self.process = subprocess.Popen([pov_binary, self.temp_file_ini]) # stdout=subprocess.PIPE, stderr=subprocess.PIPE
@@ -835,8 +761,11 @@ class PovrayRender(bpy.types.RenderEngine):
self._cleanup()
+
bpy.types.register(PovrayRender)
+
+
# Use some of the existing buttons.
import buttons_scene
buttons_scene.SCENE_PT_render.COMPAT_ENGINES.add('POVRAY_RENDER')
@@ -862,8 +791,8 @@ for member in dir(buttons_material):
del buttons_material
class RenderButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "scene"
# COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
@@ -871,6 +800,7 @@ class RenderButtonsPanel(bpy.types.Panel):
rd = context.scene.render_data
return (rd.use_game_engine==False) and (rd.engine in self.COMPAT_ENGINES)
+# Radiosity panel, use in the scene for now.
class SCENE_PT_povray_radiosity(RenderButtonsPanel):
__label__ = "Radiosity"
COMPAT_ENGINES = set(['POVRAY_RENDER'])
@@ -891,38 +821,100 @@ class SCENE_PT_povray_radiosity(RenderButtonsPanel):
col = split.column()
- col.itemR(scene, "pov_radio_count", text="Rays")
- col.itemR(scene, "pov_radio_recursion_limit", text="Recursions")
- col = split.column()
- col.itemR(scene, "pov_radio_error_bound", text="Error")
+ col.itemR(scene, "pov_radio_count")
+ col.itemR(scene, "pov_radio_recursion_limit")
+ col.itemR(scene, "pov_radio_error_bound")
- layout.itemR(scene, "pov_radio_display_advanced")
+ col.itemR(scene, "pov_radio_display_advanced")
if scene.pov_radio_display_advanced:
- split = layout.split()
-
- col = split.column()
- col.itemR(scene, "pov_radio_adc_bailout", slider=True)
- col.itemR(scene, "pov_radio_gray_threshold", slider=True)
- col.itemR(scene, "pov_radio_low_error_factor", slider=True)
-
-
-
- col = split.column()
+ col.itemR(scene, "pov_radio_adc_bailout")
col.itemR(scene, "pov_radio_brightness")
- col.itemR(scene, "pov_radio_minimum_reuse", text="Min Reuse")
- col.itemR(scene, "pov_radio_nearest_count")
-
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Estimation Influence:")
+ col.itemR(scene, "pov_radio_gray_threshold")
+ col.itemR(scene, "pov_radio_low_error_factor")
+ col.itemR(scene, "pov_radio_minimum_reuse")
col.itemR(scene, "pov_radio_media")
+ col.itemR(scene, "pov_radio_nearest_count")
col.itemR(scene, "pov_radio_normal")
-
- col = split.column()
col.itemR(scene, "pov_radio_always_sample")
bpy.types.register(SCENE_PT_povray_radiosity)
+
+
+FloatProperty= bpy.types.Scene.FloatProperty
+IntProperty= bpy.types.Scene.IntProperty
+BoolProperty= bpy.types.Scene.BoolProperty
+
+# Not a real pov option, just to know if we should write
+BoolProperty( attr="pov_radio_enable",
+ name="Enable Radiosity",
+ description="Enable povrays radiosity calculation.",
+ default= False)
+BoolProperty( attr="pov_radio_display_advanced",
+ name="Advanced Options",
+ description="Show advanced options.",
+ default= False)
+
+# Real pov options
+FloatProperty( attr="pov_radio_adc_bailout",
+ name="ADC Bailout",
+ description="The adc_bailout for radiosity rays. Use adc_bailout = 0.01 / brightest_ambient_object for good results.",
+ min=0.0, max=1000.0, soft_min=0.0, soft_max=1.0, default= 0.01)
+
+BoolProperty( attr="pov_radio_always_sample",
+ name="Always Sample",
+ description="Only use the data from the pretrace step and not gather any new samples during the final radiosity pass..",
+ default= True)
+
+FloatProperty( attr="pov_radio_brightness",
+ name="Brightness",
+ description="Ammount objects are brightened before being returned upwards to the rest of the system.",
+ min=0.0, max=1000.0, soft_min=0.0, soft_max=10.0, default= 1.0)
+
+IntProperty( attr="pov_radio_count",
+ name="Ray Count",
+ description="number of rays that are sent out whenever a new radiosity value has to be calculated.",
+ min=1, max=1600, default= 35)
+
+FloatProperty( attr="pov_radio_error_bound",
+ name="Error Bound",
+ description="one of the two main speed/quality tuning values, lower values are more accurate.",
+ min=0.0, max=1000.0, soft_min=0.1, soft_max=10.0, default= 1.8)
+
+FloatProperty( attr="pov_radio_gray_threshold",
+ name="Gray Threshold",
+ description="one of the two main speed/quality tuning values, lower values are more accurate.",
+ min=0.0, max=1.0, default= 0.0)
+
+FloatProperty( attr="pov_radio_low_error_factor",
+ name="Low Error Factor",
+ description="If you calculate just enough samples, but no more, you will get an image which has slightly blotchy lighting.",
+ min=0.0, max=1.0, default= 0.5)
+
+# max_sample - not available yet
+
+BoolProperty( attr="pov_radio_media",
+ name="Use Media",
+ description="Radiosity estimation can be affected by media.",
+ default= False)
+
+FloatProperty( attr="pov_radio_minimum_reuse",
+ name="Minimum Reuse",
+ description="Fraction of the screen width which sets the minimum radius of reuse for each sample point (At values higher than 2% expect errors).",
+ min=0.0, max=1.0, soft_min=0.1, soft_max=0.1, default= 0.015)
+
+IntProperty( attr="pov_radio_nearest_count",
+ name="Nearest Count",
+ description="Number of old ambient values blended together to create a new interpolated value.",
+ min=1, max=20, default= 5)
+
+BoolProperty( attr="pov_radio_normal",
+ name="Normals",
+ description="Radiosity estimation can be affected by normals.",
+ default= False)
+
+IntProperty( attr="pov_radio_recursion_limit",
+ name="Recursion Limit",
+ description="how many recursion levels are used to calculate the diffuse inter-reflection.",
+ min=1, max=20, default= 3)
diff --git a/release/io/export_ply.py b/release/io/export_ply.py
index 65238eb247c..2f10875c970 100644
--- a/release/io/export_ply.py
+++ b/release/io/export_ply.py
@@ -88,9 +88,9 @@ def write(filename, scene, ob, \
# mesh.transform(ob.matrixWorld) # XXX
- faceUV = len(mesh.uv_textures) > 0
+ faceUV = len(mesh.uv_layers) > 0
vertexUV = len(mesh.sticky) > 0
- vertexColors = len(mesh.vertex_colors) > 0
+ vertexColors = len(mesh.vcol_layers) > 0
if (not faceUV) and (not vertexUV): EXPORT_UV = False
if not vertexColors: EXPORT_COLORS = False
@@ -100,7 +100,7 @@ def write(filename, scene, ob, \
if faceUV:
active_uv_layer = None
- for lay in mesh.uv_textures:
+ for lay in mesh.uv_layers:
if lay.active:
active_uv_layer= lay.data
break
@@ -110,7 +110,7 @@ def write(filename, scene, ob, \
if vertexColors:
active_col_layer = None
- for lay in mesh.vertex_colors:
+ for lay in mesh.vcol_layers:
if lay.active:
active_col_layer= lay.data
if not active_col_layer:
@@ -141,7 +141,8 @@ def write(filename, scene, ob, \
col = active_col_layer[i]
col = col.color1, col.color2, col.color3, col.color4
- f_verts= f.verts
+ f_verts= list(f.verts)
+ if not f_verts[3]: f_verts.pop() # XXX face length should be 3/4, not always 4
pf= ply_faces[i]
for j, vidx in enumerate(f_verts):
diff --git a/release/io/netrender/__init__.py b/release/io/netrender/__init__.py
deleted file mode 100644
index 1eb91abb938..00000000000
--- a/release/io/netrender/__init__.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# This directory is a Python package.
-
-import model
-import operators
-import client
-import slave
-import master
-import utils
-import ui
-
-# store temp data in bpy module
-
-import bpy
-
-bpy.data.netrender_jobs = []
-bpy.data.netrender_slaves = []
-bpy.data.netrender_blacklist = [] \ No newline at end of file
diff --git a/release/io/netrender/client.py b/release/io/netrender/client.py
deleted file mode 100644
index 0c60bd1603c..00000000000
--- a/release/io/netrender/client.py
+++ /dev/null
@@ -1,204 +0,0 @@
-import bpy
-import sys, os
-import http, http.client, http.server, urllib
-import subprocess, shutil, time, hashlib
-
-import netrender.slave as slave
-import netrender.master as master
-from netrender.utils import *
-
-
-def clientSendJob(conn, scene, anim = False, chunks = 5):
- netsettings = scene.network_render
- job = netrender.model.RenderJob()
-
- if anim:
- for f in range(scene.start_frame, scene.end_frame + 1):
- job.addFrame(f)
- else:
- job.addFrame(scene.current_frame)
-
- filename = bpy.data.filename
- job.addFile(filename)
-
- job_name = netsettings.job_name
- path, name = os.path.split(filename)
- if job_name == "[default]":
- job_name = name
-
- ###########################
- # LIBRARIES
- ###########################
- for lib in bpy.data.libraries:
- lib_path = lib.filename
-
- if lib_path.startswith("//"):
- lib_path = path + os.sep + lib_path[2:]
-
- job.addFile(lib_path)
-
- ###########################
- # POINT CACHES
- ###########################
-
- root, ext = os.path.splitext(name)
- cache_path = path + os.sep + "blendcache_" + root + os.sep # need an API call for that
-
- if os.path.exists(cache_path):
- caches = {}
- pattern = re.compile("([a-zA-Z0-9]+)_([0-9]+)_[0-9]+\.bphys")
- for cache_file in sorted(os.listdir(cache_path)):
- match = pattern.match(cache_file)
-
- if match:
- cache_id = match.groups()[0]
- cache_frame = int(match.groups()[1])
-
- cache_files = caches.get(cache_id, [])
- cache_files.append((cache_frame, cache_file))
- caches[cache_id] = cache_files
-
- for cache in caches.values():
- cache.sort()
-
- if len(cache) == 1:
- cache_frame, cache_file = cache[0]
- job.addFile(cache_path + cache_file, cache_frame, cache_frame)
- else:
- for i in range(len(cache)):
- current_item = cache[i]
- next_item = cache[i+1] if i + 1 < len(cache) else None
- previous_item = cache[i - 1] if i > 0 else None
-
- current_frame, current_file = current_item
-
- if not next_item and not previous_item:
- job.addFile(cache_path + current_file, current_frame, current_frame)
- elif next_item and not previous_item:
- next_frame = next_item[0]
- job.addFile(cache_path + current_file, current_frame, next_frame - 1)
- elif not next_item and previous_item:
- previous_frame = previous_item[0]
- job.addFile(cache_path + current_file, previous_frame + 1, current_frame)
- else:
- next_frame = next_item[0]
- previous_frame = previous_item[0]
- job.addFile(cache_path + current_file, previous_frame + 1, next_frame - 1)
-
- ###########################
- # IMAGES
- ###########################
- for image in bpy.data.images:
- if image.source == "FILE" and not image.packed_file:
- job.addFile(image.filename)
-
- # print(job.files)
-
- job.name = job_name
-
- for slave in scene.network_render.slaves_blacklist:
- job.blacklist.append(slave.id)
-
- job.chunks = netsettings.chunks
- job.priority = netsettings.priority
-
- # try to send path first
- conn.request("POST", "job", repr(job.serialize()))
- response = conn.getresponse()
-
- job_id = response.getheader("job-id")
-
- # if not ACCEPTED (but not processed), send files
- if response.status == http.client.ACCEPTED:
- for filepath in job.files:
- f = open(filepath, "rb")
- conn.request("PUT", "file", f, headers={"job-id": job_id, "job-file": filepath})
- f.close()
- response = conn.getresponse()
-
- # server will reply with NOT_FOUD until all files are found
-
- return job_id
-
-def clientRequestResult(conn, scene, job_id):
- conn.request("GET", "render", headers={"job-id": job_id, "job-frame":str(scene.current_frame)})
-
-class NetworkRenderEngine(bpy.types.RenderEngine):
- __idname__ = 'NET_RENDER'
- __label__ = "Network Render"
- def render(self, scene):
- if scene.network_render.mode == "RENDER_CLIENT":
- self.render_client(scene)
- elif scene.network_render.mode == "RENDER_SLAVE":
- self.render_slave(scene)
- elif scene.network_render.mode == "RENDER_MASTER":
- self.render_master(scene)
- else:
- print("UNKNOWN OPERATION MODE")
-
- def render_master(self, scene):
- server_address = (scene.network_render.server_address, scene.network_render.server_port)
- httpd = master.RenderMasterServer(server_address, master.RenderHandler, scene.network_render.path)
- httpd.timeout = 1
- httpd.stats = self.update_stats
- while not self.test_break():
- httpd.handle_request()
-
- def render_slave(self, scene):
- slave.render_slave(self, scene)
-
- def render_client(self, scene):
- netsettings = scene.network_render
- self.update_stats("", "Network render client initiation")
-
- conn = clientConnection(scene)
-
- if conn:
- # Sending file
-
- self.update_stats("", "Network render exporting")
-
- job_id = netsettings.job_id
-
- # reading back result
-
- self.update_stats("", "Network render waiting for results")
-
- clientRequestResult(conn, scene, job_id)
- response = conn.getresponse()
-
- if response.status == http.client.NO_CONTENT:
- netsettings.job_id = clientSendJob(conn, scene)
- clientRequestResult(conn, scene, job_id)
-
- while response.status == http.client.ACCEPTED and not self.test_break():
- print("waiting")
- time.sleep(1)
- clientRequestResult(conn, scene, job_id)
- response = conn.getresponse()
-
- if response.status != http.client.OK:
- conn.close()
- return
-
- r = scene.render_data
- x= int(r.resolution_x*r.resolution_percentage*0.01)
- y= int(r.resolution_y*r.resolution_percentage*0.01)
-
- f = open(netsettings.path + "output.exr", "wb")
- buf = response.read(1024)
-
- while buf:
- f.write(buf)
- buf = response.read(1024)
-
- f.close()
-
- result = self.begin_result(0, 0, x, y)
- result.load_from_file(netsettings.path + "output.exr", 0, 0)
- self.end_result(result)
-
- conn.close()
-
-bpy.types.register(NetworkRenderEngine)
-
diff --git a/release/io/netrender/master.py b/release/io/netrender/master.py
deleted file mode 100644
index 78e9243bc9d..00000000000
--- a/release/io/netrender/master.py
+++ /dev/null
@@ -1,615 +0,0 @@
-import sys, os
-import http, http.client, http.server, urllib
-import subprocess, shutil, time, hashlib
-
-from netrender.utils import *
-import netrender.model
-
-JOB_WAITING = 0 # before all data has been entered
-JOB_PAUSED = 1 # paused by user
-JOB_QUEUED = 2 # ready to be dispatched
-
-class MRenderFile:
- def __init__(self, filepath, start, end):
- self.filepath = filepath
- self.start = start
- self.end = end
- self.found = False
-
- def test(self):
- self.found = os.path.exists(self.filepath)
- return self.found
-
-
-class MRenderSlave(netrender.model.RenderSlave):
- def __init__(self, name, address, stats):
- super().__init__()
- self.id = hashlib.md5(bytes(repr(name) + repr(address), encoding='utf8')).hexdigest()
- self.name = name
- self.address = address
- self.stats = stats
- self.last_seen = time.time()
-
- self.job = None
- self.frame = None
-
- netrender.model.RenderSlave._slave_map[self.id] = self
-
- def seen(self):
- self.last_seen = time.time()
-
-# sorting key for jobs
-def groupKey(job):
- return (job.status, job.framesLeft() > 0, job.priority, job.credits)
-
-class MRenderJob(netrender.model.RenderJob):
- def __init__(self, job_id, name, files, chunks = 1, priority = 1, credits = 100.0, blacklist = []):
- super().__init__()
- self.id = job_id
- self.name = name
- self.files = files
- self.frames = []
- self.chunks = chunks
- self.priority = priority
- self.credits = credits
- self.blacklist = blacklist
- self.last_dispatched = time.time()
-
- # special server properties
- self.save_path = ""
- self.files_map = {path: MRenderFile(path, start, end) for path, start, end in files}
- self.status = JOB_WAITING
-
- def save(self):
- if self.save_path:
- f = open(self.save_path + "job.txt", "w")
- f.write(repr(self.serialize()))
- f.close()
-
- def testStart(self):
- for f in self.files_map.values():
- if not f.test():
- return False
-
- self.start()
- return True
-
- def start(self):
- self.status = JOB_QUEUED
-
- def update(self):
- self.credits -= 5 # cost of one frame
- self.credits += (time.time() - self.last_dispatched) / 60
- self.last_dispatched = time.time()
-
- def addFrame(self, frame_number):
- frame = MRenderFrame(frame_number)
- self.frames.append(frame)
- return frame
-
- def framesLeft(self):
- total = 0
- for j in self.frames:
- if j.status == QUEUED:
- total += 1
-
- return total
-
- def reset(self, all):
- for f in self.frames:
- f.reset(all)
-
- def getFrames(self):
- frames = []
- for f in self.frames:
- if f.status == QUEUED:
- self.update()
- frames.append(f)
- if len(frames) >= self.chunks:
- break
-
- return frames
-
-class MRenderFrame(netrender.model.RenderFrame):
- def __init__(self, frame):
- super().__init__()
- self.number = frame
- self.slave = None
- self.time = 0
- self.status = QUEUED
-
- def reset(self, all):
- if all or self.status == ERROR:
- self.slave = None
- self.time = 0
- self.status = QUEUED
-
-
-# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
-class RenderHandler(http.server.BaseHTTPRequestHandler):
- def send_head(self, code = http.client.OK, headers = {}):
- self.send_response(code)
- self.send_header("Content-type", "application/octet-stream")
-
- for key, value in headers.items():
- self.send_header(key, value)
-
- self.end_headers()
-
- def do_HEAD(self):
- print(self.path)
-
- if self.path == "status":
- job_id = self.headers.get('job-id', "")
- job_frame = int(self.headers.get('job-frame', -1))
-
- if job_id:
- print("status:", job_id, "\n")
-
- job = self.server.getJobByID(job_id)
- if job:
- if job_frame != -1:
- frame = job[frame]
-
- if not frame:
- # no such frame
- self.send_heat(http.client.NO_CONTENT)
- return
- else:
- # no such job id
- self.send_head(http.client.NO_CONTENT)
- return
-
- self.send_head()
-
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
- def do_GET(self):
- print(self.path)
-
- if self.path == "version":
- self.send_head()
- self.server.stats("", "New client connection")
- self.wfile.write(VERSION)
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- elif self.path == "render":
- job_id = self.headers['job-id']
- job_frame = int(self.headers['job-frame'])
- print("render:", job_id, job_frame)
-
- job = self.server.getJobByID(job_id)
-
- if job:
- frame = job[job_frame]
-
- if frame:
- if frame.status in (QUEUED, DISPATCHED):
- self.send_head(http.client.ACCEPTED)
- elif frame.status == DONE:
- self.server.stats("", "Sending result back to client")
- f = open(job.save_path + "%04d" % job_frame + ".exr", 'rb')
-
- self.send_head()
-
- shutil.copyfileobj(f, self.wfile)
-
- f.close()
- elif frame.status == ERROR:
- self.send_head(http.client.PARTIAL_CONTENT)
- else:
- # no such frame
- self.send_head(http.client.NO_CONTENT)
- else:
- # no such job id
- self.send_head(http.client.NO_CONTENT)
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- elif self.path == "log":
- job_id = self.headers['job-id']
- job_frame = int(self.headers['job-frame'])
- print("log:", job_id, job_frame)
-
- job = self.server.getJobByID(job_id)
-
- if job:
- frame = job[job_frame]
-
- if frame:
- if frame.status in (QUEUED, DISPATCHED):
- self.send_head(http.client.PROCESSING)
- else:
- self.server.stats("", "Sending log back to client")
- f = open(job.save_path + "%04d" % job_frame + ".log", 'rb')
-
- self.send_head()
-
- shutil.copyfileobj(f, self.wfile)
-
- f.close()
- else:
- # no such frame
- self.send_head(http.client.NO_CONTENT)
- else:
- # no such job id
- self.send_head(http.client.NO_CONTENT)
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- elif self.path == "status":
- job_id = self.headers.get('job-id', "")
- job_frame = int(self.headers.get('job-frame', -1))
-
- if job_id:
- print("status:", job_id, "\n")
-
- job = self.server.getJobByID(job_id)
- if job:
- if job_frame != -1:
- frame = job[frame]
-
- if frame:
- message = frame.serialize()
- else:
- # no such frame
- self.send_heat(http.client.NO_CONTENT)
- return
- else:
- message = job.serialize()
- else:
- # no such job id
- self.send_head(http.client.NO_CONTENT)
- return
- else: # status of all jobs
- message = []
-
- for job in self.server:
- message.append(job.serialize())
-
- self.send_head()
- self.wfile.write(bytes(repr(message), encoding='utf8'))
-
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- elif self.path == "job":
- self.server.update()
-
- slave_id = self.headers['slave-id']
-
- print("slave-id", slave_id)
-
- slave = self.server.updateSlave(slave_id)
-
- if slave: # only if slave id is valid
- job, frames = self.server.getNewJob(slave_id)
-
- if job and frames:
- for f in frames:
- print("dispatch", f.number)
- f.status = DISPATCHED
- f.slave = slave
-
- self.send_head(headers={"job-id": job.id})
-
- message = job.serialize(frames)
-
- self.wfile.write(bytes(repr(message), encoding='utf8'))
-
- self.server.stats("", "Sending job frame to render node")
- else:
- # no job available, return error code
- self.send_head(http.client.ACCEPTED)
- else: # invalid slave id
- self.send_head(http.client.NO_CONTENT)
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- elif self.path == "file":
- slave_id = self.headers['slave-id']
-
- slave = self.server.updateSlave(slave_id)
-
- if slave: # only if slave id is valid
- job_id = self.headers['job-id']
- job_file = self.headers['job-file']
- print("job:", job_id, "\n")
- print("file:", job_file, "\n")
-
- job = self.server.getJobByID(job_id)
-
- if job:
- render_file = job.files_map.get(job_file, None)
-
- if render_file:
- self.server.stats("", "Sending file to render node")
- f = open(render_file.path, 'rb')
-
- shutil.copyfileobj(f, self.wfile)
-
- f.close()
- else:
- # no such file
- self.send_head(http.client.NO_CONTENT)
- else:
- # no such job id
- self.send_head(http.client.NO_CONTENT)
- else: # invalid slave id
- self.send_head(http.client.NO_CONTENT)
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- elif self.path == "slave":
- message = []
-
- for slave in self.server.slaves:
- message.append(slave.serialize())
-
- self.send_head()
-
- self.wfile.write(bytes(repr(message), encoding='utf8'))
-
-
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- def do_POST(self):
- print(self.path)
-
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- if self.path == "job":
- print("posting job info")
- self.server.stats("", "Receiving job")
-
- length = int(self.headers['content-length'])
-
- job_info = netrender.model.RenderJob.materialize(eval(str(self.rfile.read(length), encoding='utf8')))
-
- job_id = self.server.nextJobID()
-
- print(job_info.files)
-
- job = MRenderJob(job_id, job_info.name, job_info.files, chunks = job_info.chunks, priority = job_info.priority, blacklist = job_info.blacklist)
-
- for frame in job_info.frames:
- frame = job.addFrame(frame.number)
-
- self.server.addJob(job)
-
- headers={"job-id": job_id}
-
- if job.testStart():
- self.send_head(headers=headers)
- else:
- self.send_head(http.client.ACCEPTED, headers=headers)
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- elif self.path == "cancel":
- job_id = self.headers.get('job-id', "")
- if job_id:
- print("cancel:", job_id, "\n")
- self.server.removeJob(job_id)
- else: # cancel all jobs
- self.server.clear()
-
- self.send_head()
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- elif self.path == "reset":
- job_id = self.headers.get('job-id', "")
- job_frame = int(self.headers.get('job-frame', "-1"))
- all = bool(self.headers.get('reset-all', "False"))
-
- job = self.server.getJobByID(job_id)
-
- if job:
- if job_frame != -1:
- job[job_frame].reset(all)
- else:
- job.reset(all)
-
- self.send_head()
- else: # job not found
- self.send_head(http.client.NO_CONTENT)
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- elif self.path == "slave":
- length = int(self.headers['content-length'])
- job_frame_string = self.headers['job-frame']
-
- slave_info = netrender.model.RenderSlave.materialize(eval(str(self.rfile.read(length), encoding='utf8')))
-
- slave_id = self.server.addSlave(slave_info.name, self.client_address, slave_info.stats)
-
- self.send_head(headers = {"slave-id": slave_id})
-
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- def do_PUT(self):
- print(self.path)
-
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- if self.path == "file":
- print("writing blend file")
- self.server.stats("", "Receiving job")
-
- length = int(self.headers['content-length'])
- job_id = self.headers['job-id']
- job_file = self.headers['job-file']
-
- job = self.server.getJobByID(job_id)
-
- if job:
-
- render_file = job.files_map.get(job_file, None)
-
- if render_file:
- main_file = job.files[0]
-
- main_path, main_name = os.path.split(main_file)
-
- if job_file != main_file:
- file_path = prefixPath(job.save_path, job_file, main_path)
- else:
- file_path = job.save_path + main_name
-
- buf = self.rfile.read(length)
-
- # add same temp file + renames as slave
-
- f = open(file_path, "wb")
- f.write(buf)
- f.close()
- del buf
-
- render_file.path = file_path # set the new path
-
- if job.testStart():
- self.send_head(headers=headers)
- else:
- self.send_head(http.client.ACCEPTED, headers=headers)
- else: # invalid file
- self.send_head(http.client.NO_CONTENT)
- else: # job not found
- self.send_head(http.client.NO_CONTENT)
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- elif self.path == "render":
- print("writing result file")
- self.server.stats("", "Receiving render result")
-
- slave_id = self.headers['slave-id']
-
- slave = self.server.updateSlave(slave_id)
-
- if slave: # only if slave id is valid
- job_id = self.headers['job-id']
-
- job = self.server.getJobByID(job_id)
-
- if job:
- job_frame = int(self.headers['job-frame'])
- job_result = int(self.headers['job-result'])
- job_time = float(self.headers['job-time'])
-
- frame = job[job_frame]
-
- if job_result == DONE:
- length = int(self.headers['content-length'])
- buf = self.rfile.read(length)
- f = open(job.save_path + "%04d" % job_frame + ".exr", 'wb')
- f.write(buf)
- f.close()
-
- del buf
- elif job_result == ERROR:
- # blacklist slave on this job on error
- job.blacklist.append(slave.id)
-
- frame.status = job_result
- frame.time = job_time
-
- self.server.updateSlave(self.headers['slave-id'])
-
- self.send_head()
- else: # job not found
- self.send_head(http.client.NO_CONTENT)
- else: # invalid slave id
- self.send_head(http.client.NO_CONTENT)
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- elif self.path == "log":
- print("writing log file")
- self.server.stats("", "Receiving log file")
-
- job_id = self.headers['job-id']
-
- job = self.server.getJobByID(job_id)
-
- if job:
- length = int(self.headers['content-length'])
- job_frame = int(self.headers['job-frame'])
-
- buf = self.rfile.read(length)
- f = open(job.save_path + "%04d" % job_frame + ".log", 'wb')
- f.write(buf)
- f.close()
-
- del buf
-
- self.server.updateSlave(self.headers['slave-id'])
-
- self.send_head()
- else: # job not found
- self.send_head(http.client.NO_CONTENT)
-
-class RenderMasterServer(http.server.HTTPServer):
- def __init__(self, address, handler_class, path):
- super().__init__(address, handler_class)
- self.jobs = []
- self.jobs_map = {}
- self.slaves = []
- self.slaves_map = {}
- self.job_id = 0
- self.path = path + "master_" + str(os.getpid()) + os.sep
-
- if not os.path.exists(self.path):
- os.mkdir(self.path)
-
- def nextJobID(self):
- self.job_id += 1
- return str(self.job_id)
-
- def addSlave(self, name, address, stats):
- slave = MRenderSlave(name, address, stats)
- self.slaves.append(slave)
- self.slaves_map[slave.id] = slave
-
- return slave.id
-
- def getSlave(self, slave_id):
- return self.slaves_map.get(slave_id, None)
-
- def updateSlave(self, slave_id):
- slave = self.getSlave(slave_id)
- if slave:
- slave.seen()
-
- return slave
-
- def clear(self):
- self.jobs_map = {}
- self.jobs = []
-
- def update(self):
- self.jobs.sort(key = groupKey)
-
- def removeJob(self, id):
- job = self.jobs_map.pop(id)
-
- if job:
- self.jobs.remove(job)
-
- def addJob(self, job):
- self.jobs.append(job)
- self.jobs_map[job.id] = job
-
- # create job directory
- job.save_path = self.path + "job_" + job.id + os.sep
- if not os.path.exists(job.save_path):
- os.mkdir(job.save_path)
-
- job.save()
-
- def getJobByID(self, id):
- return self.jobs_map.get(id, None)
-
- def __iter__(self):
- for job in self.jobs:
- yield job
-
- def getNewJob(self, slave_id):
- if self.jobs:
- for job in reversed(self.jobs):
- if job.status == JOB_QUEUED and job.framesLeft() > 0 and slave_id not in job.blacklist:
- return job, job.getFrames()
-
- return None, None
diff --git a/release/io/netrender/model.py b/release/io/netrender/model.py
deleted file mode 100644
index 7803ad034a7..00000000000
--- a/release/io/netrender/model.py
+++ /dev/null
@@ -1,162 +0,0 @@
-import sys, os
-import http, http.client, http.server, urllib
-import subprocess, shutil, time, hashlib
-
-from netrender.utils import *
-
-class RenderSlave:
- _slave_map = {}
-
- def __init__(self):
- self.id = ""
- self.name = ""
- self.address = (0,0)
- self.stats = ""
- self.total_done = 0
- self.total_error = 0
- self.last_seen = 0.0
-
- def serialize(self):
- return {
- "id": self.id,
- "name": self.name,
- "address": self.address,
- "stats": self.stats,
- "total_done": self.total_done,
- "total_error": self.total_error,
- "last_seen": self.last_seen
- }
-
- @staticmethod
- def materialize(data):
- if not data:
- return None
-
- slave_id = data["id"]
-
- if slave_id in RenderSlave._slave_map:
- return RenderSlave._slave_map[slave_id]
- else:
- slave = RenderSlave()
- slave.id = slave_id
- slave.name = data["name"]
- slave.address = data["address"]
- slave.stats = data["stats"]
- slave.total_done = data["total_done"]
- slave.total_error = data["total_error"]
- slave.last_seen = data["last_seen"]
-
- RenderSlave._slave_map[slave_id] = slave
-
- return slave
-
-class RenderJob:
- def __init__(self):
- self.id = ""
- self.name = ""
- self.files = []
- self.frames = []
- self.chunks = 0
- self.priority = 0
- self.credits = 0
- self.blacklist = []
- self.last_dispatched = 0.0
-
- def addFile(self, file_path, start=-1, end=-1):
- self.files.append((file_path, start, end))
-
- def addFrame(self, frame_number):
- frame = RenderFrame(frame_number)
- self.frames.append(frame)
- return frame
-
- def __len__(self):
- return len(self.frames)
-
- def framesStatus(self):
- results = {
- QUEUED: 0,
- DISPATCHED: 0,
- DONE: 0,
- ERROR: 0
- }
-
- for frame in self.frames:
- results[frame.status] += 1
-
- return results
-
- def __contains__(self, frame_number):
- for f in self.frames:
- if f.number == frame_number:
- return True
- else:
- return False
-
- def __getitem__(self, frame_number):
- for f in self.frames:
- if f.number == frame_number:
- return f
- else:
- return None
-
- def serialize(self, frames = None):
- min_frame = min((f.number for f in frames)) if frames else -1
- max_frame = max((f.number for f in frames)) if frames else -1
- return {
- "id": self.id,
- "name": self.name,
- "files": [f for f in self.files if f[1] == -1 or not frames or (f[1] <= min_frame <= f[2] or f[1] <= max_frame <= f[2])],
- "frames": [f.serialize() for f in self.frames if not frames or f in frames],
- "chunks": self.chunks,
- "priority": self.priority,
- "credits": self.credits,
- "blacklist": self.blacklist,
- "last_dispatched": self.last_dispatched
- }
-
- @staticmethod
- def materialize(data):
- if not data:
- return None
-
- job = RenderJob()
- job.id = data["id"]
- job.name = data["name"]
- job.files = data["files"]
- job.frames = [RenderFrame.materialize(f) for f in data["frames"]]
- job.chunks = data["chunks"]
- job.priority = data["priority"]
- job.credits = data["credits"]
- job.blacklist = data["blacklist"]
- job.last_dispatched = data["last_dispatched"]
-
- return job
-
-class RenderFrame:
- def __init__(self, number = 0):
- self.number = number
- self.time = 0
- self.status = QUEUED
- self.slave = None
-
- def serialize(self):
- return {
- "number": self.number,
- "time": self.time,
- "status": self.status,
- "slave": None if not self.slave else self.slave.serialize()
- }
-
- @staticmethod
- def materialize(data):
- if not data:
- return None
-
- frame = RenderFrame()
- frame.number = data["number"]
- frame.time = data["time"]
- frame.status = data["status"]
- frame.slave = RenderSlave.materialize(data["slave"])
-
- return frame
diff --git a/release/io/netrender/operators.py b/release/io/netrender/operators.py
deleted file mode 100644
index 1c6d89c0043..00000000000
--- a/release/io/netrender/operators.py
+++ /dev/null
@@ -1,236 +0,0 @@
-import bpy
-import sys, os
-import http, http.client, http.server, urllib
-
-from netrender.utils import *
-import netrender.client as client
-import netrender.model
-
-class RENDER_OT_netclientsend(bpy.types.Operator):
- '''
- Operator documentation text, will be used for the operator tooltip and python docs.
- '''
- __idname__ = "render.netclientsend"
- __label__ = "Net Render Client Send"
-
- # List of operator properties, the attributes will be assigned
- # to the class instance from the operator settings before calling.
-
- __props__ = []
-
- def poll(self, context):
- return True
-
- def execute(self, context):
- scene = context.scene
-
- conn = clientConnection(scene)
-
- if conn:
- # Sending file
- scene.network_render.job_id = client.clientSendJob(conn, scene, True)
-
- return ('FINISHED',)
-
- def invoke(self, context, event):
- return self.execute(context)
-
-class RENDER_OT_netclientstatus(bpy.types.Operator):
- '''Operator documentation text, will be used for the operator tooltip and python docs.'''
- __idname__ = "render.netclientstatus"
- __label__ = "Net Render Client Status"
-
- # List of operator properties, the attributes will be assigned
- # to the class instance from the operator settings before calling.
-
- __props__ = []
-
- def poll(self, context):
- return True
-
- def execute(self, context):
- netsettings = context.scene.network_render
- conn = clientConnection(context.scene)
-
- if conn:
- conn.request("GET", "status")
-
- response = conn.getresponse()
- print( response.status, response.reason )
-
- jobs = (netrender.model.RenderJob.materialize(j) for j in eval(str(response.read(), encoding='utf8')))
-
- while(len(netsettings.jobs) > 0):
- netsettings.jobs.remove(0)
-
- bpy.data.netrender_jobs = []
-
- for j in jobs:
- bpy.data.netrender_jobs.append(j)
- netsettings.jobs.add()
- job = netsettings.jobs[-1]
-
- j.results = j.framesStatus() # cache frame status
-
- job.name = j.name
-
- return ('FINISHED',)
-
- def invoke(self, context, event):
- return self.execute(context)
-
-class RENDER_OT_netclientblacklistslave(bpy.types.Operator):
- '''Operator documentation text, will be used for the operator tooltip and python docs.'''
- __idname__ = "render.netclientblacklistslave"
- __label__ = "Net Render Client Blacklist Slave"
-
- # List of operator properties, the attributes will be assigned
- # to the class instance from the operator settings before calling.
-
- __props__ = []
-
- def poll(self, context):
- return True
-
- def execute(self, context):
- netsettings = context.scene.network_render
-
- if netsettings.active_slave_index >= 0:
-
- # deal with data
- slave = bpy.data.netrender_slaves.pop(netsettings.active_slave_index)
- bpy.data.netrender_blacklist.append(slave)
-
- # deal with rna
- netsettings.slaves_blacklist.add()
- netsettings.slaves_blacklist[-1].name = slave.name
-
- netsettings.slaves.remove(netsettings.active_slave_index)
- netsettings.active_slave_index = -1
-
- return ('FINISHED',)
-
- def invoke(self, context, event):
- return self.execute(context)
-
-class RENDER_OT_netclientwhitelistslave(bpy.types.Operator):
- '''Operator documentation text, will be used for the operator tooltip and python docs.'''
- __idname__ = "render.netclientwhitelistslave"
- __label__ = "Net Render Client Whitelist Slave"
-
- # List of operator properties, the attributes will be assigned
- # to the class instance from the operator settings before calling.
-
- __props__ = []
-
- def poll(self, context):
- return True
-
- def execute(self, context):
- netsettings = context.scene.network_render
-
- if netsettings.active_blacklisted_slave_index >= 0:
-
- # deal with data
- slave = bpy.data.netrender_blacklist.pop(netsettings.active_blacklisted_slave_index)
- bpy.data.netrender_slaves.append(slave)
-
- # deal with rna
- netsettings.slaves.add()
- netsettings.slaves[-1].name = slave.name
-
- netsettings.slaves_blacklist.remove(netsettings.active_blacklisted_slave_index)
- netsettings.active_blacklisted_slave_index = -1
-
- return ('FINISHED',)
-
- def invoke(self, context, event):
- return self.execute(context)
-
-
-class RENDER_OT_netclientslaves(bpy.types.Operator):
- '''Operator documentation text, will be used for the operator tooltip and python docs.'''
- __idname__ = "render.netclientslaves"
- __label__ = "Net Render Client Slaves"
-
- # List of operator properties, the attributes will be assigned
- # to the class instance from the operator settings before calling.
-
- __props__ = []
-
- def poll(self, context):
- return True
-
- def execute(self, context):
- netsettings = context.scene.network_render
- conn = clientConnection(context.scene)
-
- if conn:
- conn.request("GET", "slave")
-
- response = conn.getresponse()
- print( response.status, response.reason )
-
- slaves = (netrender.model.RenderSlave.materialize(s) for s in eval(str(response.read(), encoding='utf8')))
-
- while(len(netsettings.slaves) > 0):
- netsettings.slaves.remove(0)
-
- bpy.data.netrender_slaves = []
-
- for s in slaves:
- for i in range(len(bpy.data.netrender_blacklist)):
- slave = bpy.data.netrender_blacklist[i]
- if slave.id == s.id:
- bpy.data.netrender_blacklist[i] = s
- netsettings.slaves_blacklist[i].name = s.name
- break
- else:
- bpy.data.netrender_slaves.append(s)
-
- netsettings.slaves.add()
- slave = netsettings.slaves[-1]
- slave.name = s.name
-
- return ('FINISHED',)
-
- def invoke(self, context, event):
- return self.execute(context)
-
-class RENDER_OT_netclientcancel(bpy.types.Operator):
- '''Operator documentation text, will be used for the operator tooltip and python docs.'''
- __idname__ = "render.netclientcancel"
- __label__ = "Net Render Client Cancel"
-
- # List of operator properties, the attributes will be assigned
- # to the class instance from the operator settings before calling.
-
- __props__ = []
-
- def poll(self, context):
- netsettings = context.scene.network_render
- return netsettings.active_job_index >= 0 and len(netsettings.jobs) > 0
-
- def execute(self, context):
- netsettings = context.scene.network_render
- conn = clientConnection(context.scene)
-
- if conn:
- job = bpy.data.netrender_jobs[netsettings.active_job_index]
-
- conn.request("POST", "cancel", headers={"job-id":job.id})
-
- response = conn.getresponse()
- print( response.status, response.reason )
-
- return ('FINISHED',)
-
- def invoke(self, context, event):
- return self.execute(context)
-
-bpy.ops.add(RENDER_OT_netclientsend)
-bpy.ops.add(RENDER_OT_netclientstatus)
-bpy.ops.add(RENDER_OT_netclientslaves)
-bpy.ops.add(RENDER_OT_netclientblacklistslave)
-bpy.ops.add(RENDER_OT_netclientwhitelistslave)
-bpy.ops.add(RENDER_OT_netclientcancel) \ No newline at end of file
diff --git a/release/io/netrender/slave.py b/release/io/netrender/slave.py
deleted file mode 100644
index c12c846231d..00000000000
--- a/release/io/netrender/slave.py
+++ /dev/null
@@ -1,169 +0,0 @@
-import sys, os
-import http, http.client, http.server, urllib
-import subprocess, time
-
-from netrender.utils import *
-import netrender.model
-
-CANCEL_POLL_SPEED = 2
-MAX_TIMEOUT = 10
-INCREMENT_TIMEOUT = 1
-
-def slave_Info():
- sysname, nodename, release, version, machine = os.uname()
- slave = netrender.model.RenderSlave()
- slave.name = nodename
- slave.stats = sysname + " " + release + " " + machine
- return slave
-
-def testCancel(conn, job_id):
- conn.request("HEAD", "status", headers={"job-id":job_id})
- response = conn.getresponse()
-
- # cancelled if job isn't found anymore
- if response.status == http.client.NO_CONTENT:
- return True
- else:
- return False
-
-def testFile(conn, JOB_PREFIX, file_path, main_path = None):
- job_full_path = prefixPath(JOB_PREFIX, file_path, main_path)
-
- if not os.path.exists(job_full_path):
- temp_path = JOB_PREFIX + "slave.temp.blend"
- conn.request("GET", "file", headers={"job-id": job.id, "slave-id":slave_id, "job-file":file_path})
- response = conn.getresponse()
-
- if response.status != http.client.OK:
- return None # file for job not returned by server, need to return an error code to server
-
- f = open(temp_path, "wb")
- buf = response.read(1024)
-
- while buf:
- f.write(buf)
- buf = response.read(1024)
-
- f.close()
-
- os.renames(temp_path, job_full_path)
-
- return job_full_path
-
-
-def render_slave(engine, scene):
- netsettings = scene.network_render
- timeout = 1
-
- engine.update_stats("", "Network render node initiation")
-
- conn = clientConnection(scene)
-
- if conn:
- conn.request("POST", "slave", repr(slave_Info().serialize()))
- response = conn.getresponse()
-
- slave_id = response.getheader("slave-id")
-
- NODE_PREFIX = netsettings.path + "slave_" + slave_id + os.sep
- if not os.path.exists(NODE_PREFIX):
- os.mkdir(NODE_PREFIX)
-
- while not engine.test_break():
-
- conn.request("GET", "job", headers={"slave-id":slave_id})
- response = conn.getresponse()
-
- if response.status == http.client.OK:
- timeout = 1 # reset timeout on new job
-
- job = netrender.model.RenderJob.materialize(eval(str(response.read(), encoding='utf8')))
-
- JOB_PREFIX = NODE_PREFIX + "job_" + job.id + os.sep
- if not os.path.exists(JOB_PREFIX):
- os.mkdir(JOB_PREFIX)
-
- job_path = job.files[0][0] # data in files have format (path, start, end)
- main_path, main_file = os.path.split(job_path)
-
- job_full_path = testFile(conn, JOB_PREFIX, job_path)
- print("Fullpath", job_full_path)
- print("File:", main_file, "and %i other files" % (len(job.files) - 1,))
- engine.update_stats("", "Render File", main_file, "for job", job.id)
-
- for file_path, start, end in job.files[1:]:
- print("\t", file_path)
- testFile(conn, JOB_PREFIX, file_path, main_path)
-
- frame_args = []
-
- for frame in job.frames:
- print("frame", frame.number)
- frame_args += ["-f", str(frame.number)]
-
- start_t = time.time()
-
- process = subprocess.Popen([sys.argv[0], "-b", job_full_path, "-o", JOB_PREFIX + "######", "-E", "BLENDER_RENDER", "-F", "MULTILAYER"] + frame_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-
- cancelled = False
- stdout = bytes()
- run_t = time.time()
- while process.poll() == None and not cancelled:
- stdout += process.stdout.read(32)
- current_t = time.time()
- cancelled = engine.test_break()
- if current_t - run_t > CANCEL_POLL_SPEED:
- if testCancel(conn, job.id):
- cancelled = True
- else:
- run_t = current_t
-
- if cancelled:
- # kill process if needed
- if process.poll() == None:
- process.terminate()
- continue # to next frame
-
- total_t = time.time() - start_t
-
- avg_t = total_t / len(job.frames)
-
- status = process.returncode
-
- print("status", status)
-
- headers = {"job-id":job.id, "slave-id":slave_id, "job-time":str(avg_t)}
-
- if status == 0: # non zero status is error
- headers["job-result"] = str(DONE)
- for frame in job.frames:
- headers["job-frame"] = str(frame.number)
- # send result back to server
- f = open(JOB_PREFIX + "%06d" % frame.number + ".exr", 'rb')
- conn.request("PUT", "render", f, headers=headers)
- f.close()
- response = conn.getresponse()
- else:
- headers["job-result"] = str(ERROR)
- for frame in job.frames:
- headers["job-frame"] = str(frame.number)
- # send error result back to server
- conn.request("PUT", "render", headers=headers)
- response = conn.getresponse()
-
- for frame in job.frames:
- headers["job-frame"] = str(frame.number)
- # send log in any case
- conn.request("PUT", "log", stdout, headers=headers)
- response = conn.getresponse()
- else:
- if timeout < MAX_TIMEOUT:
- timeout += INCREMENT_TIMEOUT
-
- for i in range(timeout):
- time.sleep(1)
- if engine.test_break():
- conn.close()
- return
-
- conn.close()
diff --git a/release/io/netrender/ui.py b/release/io/netrender/ui.py
deleted file mode 100644
index 8faabe6ff2d..00000000000
--- a/release/io/netrender/ui.py
+++ /dev/null
@@ -1,283 +0,0 @@
-import bpy
-import sys, os
-import http, http.client, http.server, urllib
-import subprocess, shutil, time, hashlib
-
-import netrender.slave as slave
-import netrender.master as master
-
-from netrender.utils import *
-
-VERSION = b"0.3"
-
-PATH_PREFIX = "/tmp/"
-
-QUEUED = 0
-DISPATCHED = 1
-DONE = 2
-ERROR = 3
-
-class RenderButtonsPanel(bpy.types.Panel):
- __space_type__ = "PROPERTIES"
- __region_type__ = "WINDOW"
- __context__ = "scene"
- # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
-
- def poll(self, context):
- rd = context.scene.render_data
- return (rd.use_game_engine==False) and (rd.engine in self.COMPAT_ENGINES)
-
-# Setting panel, use in the scene for now.
-class SCENE_PT_network_settings(RenderButtonsPanel):
- __label__ = "Network Settings"
- COMPAT_ENGINES = set(['NET_RENDER'])
-
- def draw_header(self, context):
- layout = self.layout
- scene = context.scene
-
- def draw(self, context):
- layout = self.layout
- scene = context.scene
- rd = scene.render_data
-
- layout.active = True
-
- split = layout.split()
-
- col = split.column()
-
- col.itemR(scene.network_render, "mode")
- col.itemR(scene.network_render, "server_address")
- col.itemR(scene.network_render, "server_port")
- col.itemR(scene.network_render, "path")
-
- if scene.network_render.mode == "RENDER_CLIENT":
- col.itemR(scene.network_render, "chunks")
- col.itemR(scene.network_render, "priority")
- col.itemR(scene.network_render, "job_name")
- col.itemO("render.netclientsend", text="send job to server")
-bpy.types.register(SCENE_PT_network_settings)
-
-class SCENE_PT_network_slaves(RenderButtonsPanel):
- __label__ = "Slaves Status"
- COMPAT_ENGINES = set(['NET_RENDER'])
-
- def poll(self, context):
- scene = context.scene
- return super().poll(context) and scene.network_render.mode == "RENDER_CLIENT"
-
- def draw(self, context):
- layout = self.layout
-
- scene = context.scene
- netsettings = scene.network_render
-
- row = layout.row()
- row.template_list(netsettings, "slaves", netsettings, "active_slave_index", rows=2)
-
- col = row.column()
-
- subcol = col.column(align=True)
- subcol.itemO("render.netclientslaves", icon="ICON_FILE_REFRESH", text="")
- subcol.itemO("render.netclientblacklistslave", icon="ICON_ZOOMOUT", text="")
-
- if len(bpy.data.netrender_slaves) == 0 and len(netsettings.slaves) > 0:
- while(len(netsettings.slaves) > 0):
- netsettings.slaves.remove(0)
-
- if netsettings.active_slave_index >= 0 and len(netsettings.slaves) > 0:
- layout.itemS()
-
- slave = bpy.data.netrender_slaves[netsettings.active_slave_index]
-
- layout.itemL(text="Name: " + slave.name)
- layout.itemL(text="Address: " + slave.address[0])
- layout.itemL(text="Seen: " + time.ctime(slave.last_seen))
- layout.itemL(text="Stats: " + slave.stats)
-
-bpy.types.register(SCENE_PT_network_slaves)
-
-class SCENE_PT_network_slaves_blacklist(RenderButtonsPanel):
- __label__ = "Slaves Blacklist"
- COMPAT_ENGINES = set(['NET_RENDER'])
-
- def poll(self, context):
- scene = context.scene
- return super().poll(context) and scene.network_render.mode == "RENDER_CLIENT"
-
- def draw(self, context):
- layout = self.layout
-
- scene = context.scene
- netsettings = scene.network_render
-
- row = layout.row()
- row.template_list(netsettings, "slaves_blacklist", netsettings, "active_blacklisted_slave_index", rows=2)
-
- col = row.column()
-
- subcol = col.column(align=True)
- subcol.itemO("render.netclientwhitelistslave", icon="ICON_ZOOMOUT", text="")
-
- if len(bpy.data.netrender_blacklist) == 0 and len(netsettings.slaves_blacklist) > 0:
- while(len(netsettings.slaves_blacklist) > 0):
- netsettings.slaves_blacklist.remove(0)
-
- if netsettings.active_blacklisted_slave_index >= 0 and len(netsettings.slaves_blacklist) > 0:
- layout.itemS()
-
- slave = bpy.data.netrender_blacklist[netsettings.active_blacklisted_slave_index]
-
- layout.itemL(text="Name: " + slave.name)
- layout.itemL(text="Address: " + slave.address[0])
- layout.itemL(text="Seen: " + slave.last_seen)
- layout.itemL(text="Stats: " + time.ctime(slave.stats))
-
-bpy.types.register(SCENE_PT_network_slaves_blacklist)
-
-class SCENE_PT_network_jobs(RenderButtonsPanel):
- __label__ = "Jobs"
- COMPAT_ENGINES = set(['NET_RENDER'])
-
- def poll(self, context):
- scene = context.scene
- return super().poll(context) and scene.network_render.mode == "RENDER_CLIENT"
-
- def draw(self, context):
- layout = self.layout
-
- scene = context.scene
- netsettings = scene.network_render
-
- row = layout.row()
- row.template_list(netsettings, "jobs", netsettings, "active_job_index", rows=2)
-
- col = row.column()
-
- subcol = col.column(align=True)
- subcol.itemO("render.netclientstatus", icon="ICON_FILE_REFRESH", text="")
- subcol.itemO("render.netclientcancel", icon="ICON_ZOOMOUT", text="")
-
- if len(bpy.data.netrender_jobs) == 0 and len(netsettings.jobs) > 0:
- while(len(netsettings.jobs) > 0):
- netsettings.jobs.remove(0)
-
- if netsettings.active_job_index >= 0 and len(netsettings.jobs) > 0:
- layout.itemS()
-
- job = bpy.data.netrender_jobs[netsettings.active_job_index]
-
- layout.itemL(text="Name: %s" % job.name)
- layout.itemL(text="Length: %04i" % len(job))
- layout.itemL(text="Done: %04i" % job.results[DONE])
- layout.itemL(text="Error: %04i" % job.results[ERROR])
-
-bpy.types.register(SCENE_PT_network_jobs)
-
-class NetRenderSettings(bpy.types.IDPropertyGroup):
- pass
-
-class NetRenderSlave(bpy.types.IDPropertyGroup):
- pass
-
-class NetRenderJob(bpy.types.IDPropertyGroup):
- pass
-
-bpy.types.register(NetRenderSettings)
-bpy.types.register(NetRenderSlave)
-bpy.types.register(NetRenderJob)
-
-bpy.types.Scene.PointerProperty(attr="network_render", type=NetRenderSettings, name="Network Render", description="Network Render Settings")
-
-NetRenderSettings.StringProperty( attr="server_address",
- name="Server address",
- description="IP or name of the master render server",
- maxlen = 128,
- default = "127.0.0.1")
-
-NetRenderSettings.IntProperty( attr="server_port",
- name="Server port",
- description="port of the master render server",
- default = 8000,
- min=1,
- max=65535)
-
-NetRenderSettings.StringProperty( attr="path",
- name="Path",
- description="Path for temporary files",
- maxlen = 128,
- default = "/tmp/")
-
-NetRenderSettings.StringProperty( attr="job_name",
- name="Job name",
- description="Name of the job",
- maxlen = 128,
- default = "[default]")
-
-NetRenderSettings.IntProperty( attr="chunks",
- name="Chunks",
- description="Number of frame to dispatch to each slave in one chunk",
- default = 5,
- min=1,
- max=65535)
-
-NetRenderSettings.IntProperty( attr="priority",
- name="Priority",
- description="Priority of the job",
- default = 1,
- min=1,
- max=10)
-
-NetRenderSettings.StringProperty( attr="job_id",
- name="Network job id",
- description="id of the last sent render job",
- maxlen = 64,
- default = "")
-
-NetRenderSettings.IntProperty( attr="active_slave_index",
- name="Index of the active slave",
- description="",
- default = -1,
- min= -1,
- max=65535)
-
-NetRenderSettings.IntProperty( attr="active_blacklisted_slave_index",
- name="Index of the active slave",
- description="",
- default = -1,
- min= -1,
- max=65535)
-
-NetRenderSettings.IntProperty( attr="active_job_index",
- name="Index of the active job",
- description="",
- default = -1,
- min= -1,
- max=65535)
-
-NetRenderSettings.EnumProperty(attr="mode",
- items=(
- ("RENDER_CLIENT", "Client", "Act as render client"),
- ("RENDER_MASTER", "Master", "Act as render master"),
- ("RENDER_SLAVE", "Slave", "Act as render slave"),
- ),
- name="network mode",
- description="mode of operation of this instance",
- default="RENDER_CLIENT")
-
-NetRenderSettings.CollectionProperty(attr="slaves", type=NetRenderSlave, name="Slaves", description="")
-NetRenderSettings.CollectionProperty(attr="slaves_blacklist", type=NetRenderSlave, name="Slaves Blacklist", description="")
-NetRenderSettings.CollectionProperty(attr="jobs", type=NetRenderJob, name="Job List", description="")
-
-NetRenderSlave.StringProperty( attr="name",
- name="Name of the slave",
- description="",
- maxlen = 64,
- default = "")
-
-NetRenderJob.StringProperty( attr="name",
- name="Name of the job",
- description="",
- maxlen = 128,
- default = "")
diff --git a/release/io/netrender/utils.py b/release/io/netrender/utils.py
deleted file mode 100644
index d1b383f7a97..00000000000
--- a/release/io/netrender/utils.py
+++ /dev/null
@@ -1,61 +0,0 @@
-import bpy
-import sys, os
-import re
-import http, http.client, http.server, urllib
-import subprocess, shutil, time, hashlib
-
-import netrender.model
-
-VERSION = b"0.5"
-
-QUEUED = 0
-DISPATCHED = 1
-DONE = 2
-ERROR = 3
-
-def clientConnection(scene):
- netrender = scene.network_render
-
- conn = http.client.HTTPConnection(netrender.server_address, netrender.server_port)
-
- if clientVerifyVersion(conn):
- return conn
- else:
- conn.close()
- return None
-
-def clientVerifyVersion(conn):
- conn.request("GET", "version")
- response = conn.getresponse()
-
- if response.status != http.client.OK:
- conn.close()
- return False
-
- server_version = response.read()
-
- if server_version != VERSION:
- print("Incorrect server version!")
- print("expected", VERSION, "received", server_version)
- return False
-
- return True
-
-def prefixPath(prefix_directory, file_path, prefix_path):
- if os.path.isabs(file_path):
- # if an absolute path, make sure path exists, if it doesn't, use relative local path
- full_path = file_path
- if not os.path.exists(full_path):
- p, n = os.path.split(full_path)
-
- if main_path and p.startswith(main_path):
- directory = prefix_directory + p[len(main_path):]
- full_path = directory + n
- if not os.path.exists(directory):
- os.mkdir(directory)
- else:
- full_path = prefix_directory + n
- else:
- full_path = prefix_directory + file_path
-
- return full_path \ No newline at end of file
diff --git a/release/scripts/export_map.py b/release/scripts/export_map.py
index 2262ae3b89b..aca02288c7a 100644
--- a/release/scripts/export_map.py
+++ b/release/scripts/export_map.py
@@ -197,7 +197,7 @@ def is_tricyl_facegroup(faces):
is the face group a tri cylinder
Returens a bool, true if the faces make an extruded tri solid
'''
-
+ return False
# cube must have 5 faces
if len(faces) != 5:
print '1'
diff --git a/release/scripts/help_getting_started.py b/release/scripts/help_getting_started.py
new file mode 100644
index 00000000000..77dda2cf88f
--- /dev/null
+++ b/release/scripts/help_getting_started.py
@@ -0,0 +1,50 @@
+#!BPY
+"""
+Name: 'Getting Started'
+Blender: 248
+Group: 'Help'
+Tooltip: 'Help for new users'
+"""
+
+__author__ = "Matt Ebb"
+__url__ = ("blender", "blenderartists.org")
+__version__ = "1.0.1"
+__bpydoc__ = """\
+This script opens the user's default web browser at www.blender.org's
+"Getting Started" page.
+"""
+
+# $Id$
+#
+# --------------------------------------------------------------------------
+# Getting Started Help Menu Item
+# --------------------------------------------------------------------------
+# ***** 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.
+#
+# ***** END GPL LICENCE BLOCK *****
+# --------------------------------------------------------------------------
+
+import Blender
+try: import webbrowser
+except: webbrowser = None
+
+if webbrowser:
+ webbrowser.open('http://www.blender.org/education-help/tutorials/getting-started/')
+else:
+ Blender.Draw.PupMenu("Error%t|This script requires a full python installation")
+
+
diff --git a/release/scripts/help_manual.py b/release/scripts/help_manual.py
new file mode 100644
index 00000000000..27900040eb4
--- /dev/null
+++ b/release/scripts/help_manual.py
@@ -0,0 +1,48 @@
+#!BPY
+"""
+Name: 'Manual'
+Blender: 248
+Group: 'Help'
+Tooltip: 'The Blender Wiki manual'
+"""
+
+__author__ = "Matt Ebb"
+__url__ = ("blender", "blenderartists.org")
+__version__ = "1.0.1"
+__bpydoc__ = """\
+This script opens the user's default web browser at www.blender.org's
+"Manual" page.
+"""
+
+# --------------------------------------------------------------------------
+# Manual Help Menu Item
+# --------------------------------------------------------------------------
+# ***** 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.
+#
+# ***** END GPL LICENCE BLOCK *****
+# --------------------------------------------------------------------------
+
+import Blender
+try: import webbrowser
+except: webbrowser = None
+
+if webbrowser:
+ webbrowser.open('http://wiki.blender.org/index.php/Manual')
+else:
+ Blender.Draw.PupMenu("Error%t|This script requires a full python installation")
+
+
diff --git a/release/scripts/help_release_notes.py b/release/scripts/help_release_notes.py
new file mode 100644
index 00000000000..870f2391487
--- /dev/null
+++ b/release/scripts/help_release_notes.py
@@ -0,0 +1,47 @@
+#!BPY
+"""
+Name: 'Release Logs'
+Blender: 248
+Group: 'Help'
+Tooltip: 'Information about the changes in this version of Blender'
+"""
+
+__author__ = "Matt Ebb"
+__url__ = ("blender", "blenderartists.org")
+__version__ = "1.0.1"
+__bpydoc__ = """\
+This script opens the user's default web browser at www.blender.org's
+"Release Logs" page.
+"""
+
+# --------------------------------------------------------------------------
+# Release Notes Help Menu Item
+# --------------------------------------------------------------------------
+# ***** 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.
+#
+# ***** END GPL LICENCE BLOCK *****
+# --------------------------------------------------------------------------
+
+import Blender
+try: import webbrowser
+except: webbrowser = None
+
+if webbrowser:
+ webbrowser.open('http://www.blender.org/development/release-logs/')
+else:
+ Blender.Draw.PupMenu("Error%t|This script requires a full python installation")
+
diff --git a/release/scripts/help_tutorials.py b/release/scripts/help_tutorials.py
new file mode 100644
index 00000000000..e0cef1abdbf
--- /dev/null
+++ b/release/scripts/help_tutorials.py
@@ -0,0 +1,47 @@
+#!BPY
+
+"""
+Name: 'Tutorials'
+Blender: 248
+Group: 'Help'
+Tooltip: 'Tutorials for learning to use Blender'
+"""
+
+__author__ = "Matt Ebb"
+__url__ = ("blender", "blenderartists.org")
+__version__ = "1.0.1"
+__bpydoc__ = """\
+This script opens the user's default web browser at www.blender.org's
+"Tutorials" page.
+"""
+
+# --------------------------------------------------------------------------
+# Tutorials Help Menu Item
+# --------------------------------------------------------------------------
+# ***** 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.
+#
+# ***** END GPL LICENCE BLOCK *****
+# --------------------------------------------------------------------------
+
+import Blender
+try: import webbrowser
+except: webbrowser = None
+
+if webbrowser:
+ webbrowser.open('http://www.blender.org/education-help/tutorials/')
+else:
+ Blender.Draw.PupMenu("Error%t|This script requires a full python installation")
diff --git a/release/scripts/help_web_blender.py b/release/scripts/help_web_blender.py
new file mode 100644
index 00000000000..2a0f90844ae
--- /dev/null
+++ b/release/scripts/help_web_blender.py
@@ -0,0 +1,48 @@
+#!BPY
+
+"""
+Name: 'Blender Website'
+Blender: 248
+Group: 'HelpWebsites'
+Tooltip: 'The official Blender website'
+"""
+
+__author__ = "Matt Ebb"
+__url__ = ("blender", "blenderartists.org")
+__version__ = "1.0.1"
+__bpydoc__ = """\
+This script opens the user's default web browser at Blender's main site,
+www.blender.org.
+"""
+
+
+# --------------------------------------------------------------------------
+# Blender Website Help Menu -> Websites Item
+# --------------------------------------------------------------------------
+# ***** 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.
+#
+# ***** END GPL LICENCE BLOCK *****
+# --------------------------------------------------------------------------
+
+import Blender
+try: import webbrowser
+except: webbrowser = None
+
+if webbrowser:
+ webbrowser.open('http://www.blender.org/')
+else:
+ Blender.Draw.PupMenu("Error%t|This script requires a full python installation")
diff --git a/release/scripts/help_web_devcomm.py b/release/scripts/help_web_devcomm.py
new file mode 100644
index 00000000000..46fa2487a89
--- /dev/null
+++ b/release/scripts/help_web_devcomm.py
@@ -0,0 +1,47 @@
+#!BPY
+
+"""
+Name: 'Developer Community'
+Blender: 248
+Group: 'HelpWebsites'
+Tooltip: 'Get involved with Blender development'
+"""
+
+__author__ = "Matt Ebb"
+__url__ = ("blender", "blenderartists.org")
+__version__ = "1.0.1"
+__bpydoc__ = """\
+This script opens the user's default web browser at www.blender.org's
+"Get Involved" page.
+"""
+
+# --------------------------------------------------------------------------
+# Blender Website Help Menu -> Websites Item
+# --------------------------------------------------------------------------
+# ***** 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.
+#
+# ***** END GPL LICENCE BLOCK *****
+# --------------------------------------------------------------------------
+
+import Blender
+try: import webbrowser
+except: webbrowser = None
+
+if webbrowser:
+ webbrowser.open('http://www.blender.org/community/get-involved/')
+else:
+ Blender.Draw.PupMenu("Error%t|This script requires a full python installation")
diff --git a/release/scripts/help_web_eshop.py b/release/scripts/help_web_eshop.py
new file mode 100644
index 00000000000..e40795b3a0d
--- /dev/null
+++ b/release/scripts/help_web_eshop.py
@@ -0,0 +1,47 @@
+#!BPY
+
+"""
+Name: 'Blender E-Shop'
+Blender: 248
+Group: 'HelpWebsites'
+Tooltip: 'Buy official Blender resources and merchandise online'
+"""
+
+__author__ = "Matt Ebb"
+__url__ = ("blender", "blenderartists.org")
+__version__ = "1.0.1"
+__bpydoc__ = """\
+This script opens the user's default web browser at www.blender.org's
+"E-Shop" section.
+"""
+
+# --------------------------------------------------------------------------
+# Blender Website Help Menu -> Websites Item
+# --------------------------------------------------------------------------
+# ***** 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.
+#
+# ***** END GPL LICENCE BLOCK *****
+# --------------------------------------------------------------------------
+
+import Blender
+try: import webbrowser
+except: webbrowser = None
+
+if webbrowser:
+ webbrowser.open('http://www.blender3d.org/e-shop')
+else:
+ Blender.Draw.PupMenu("Error%t|This script requires a full python installation")
diff --git a/release/scripts/help_web_usercomm.py b/release/scripts/help_web_usercomm.py
new file mode 100644
index 00000000000..dda5e42f34e
--- /dev/null
+++ b/release/scripts/help_web_usercomm.py
@@ -0,0 +1,47 @@
+#!BPY
+
+"""
+Name: 'User Community'
+Blender: 248
+Group: 'HelpWebsites'
+Tooltip: 'Get involved with other Blender users'
+"""
+
+__author__ = "Matt Ebb"
+__url__ = ("blender", "blenderartists.org")
+__version__ = "1.0.1"
+__bpydoc__ = """\
+This script opens the user's default web browser at www.blender.org's
+"User Community" page.
+"""
+
+# --------------------------------------------------------------------------
+# Blender Website Help Menu -> Websites Item
+# --------------------------------------------------------------------------
+# ***** 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.
+#
+# ***** END GPL LICENCE BLOCK *****
+# --------------------------------------------------------------------------
+
+import Blender
+try: import webbrowser
+except: webbrowser = None
+
+if webbrowser:
+ webbrowser.open('http://www.blender.org/community/user-community/')
+else:
+ Blender.Draw.PupMenu("Error%t|This script requires a full python installation")
diff --git a/release/test/rna_array.py b/release/test/rna_array.py
deleted file mode 100644
index 9b7c65ff017..00000000000
--- a/release/test/rna_array.py
+++ /dev/null
@@ -1,279 +0,0 @@
-import unittest
-import random
-
-test= bpy.data.test
-
-# farr - 1-dimensional array of float
-# fdarr - dynamic 1-dimensional array of float
-# fmarr - 3-dimensional ([3][4][5]) array of float
-# fdmarr - dynamic 3-dimensional (ditto size) array of float
-
-# same as above for other types except that the first letter is "i" for int and "b" for bool
-
-class TestArray(unittest.TestCase):
- # test that assignment works by: assign -> test value
- # - rvalue = list of float
- # - rvalue = list of numbers
- # test.object
- # bpy.data.test.farr[3], iarr[3], barr[...], fmarr, imarr, bmarr
-
- def setUp(self):
- test.farr= (1.0, 2.0, 3.0)
- test.iarr= (7, 8, 9)
- test.barr= (False, True, False)
-
- # test access
- # test slice access, negative indices
- def test_access(self):
- rvals= ([1.0, 2.0, 3.0], [7, 8, 9], [False, True, False])
- for arr, rval in zip((test.farr, test.iarr, test.barr), rvals):
- self.assertEqual(prop_to_list(arr), rval)
- self.assertEqual(arr[0:3], rval)
- self.assertEqual(arr[1:2], rval[1:2])
- self.assertEqual(arr[-1], arr[2])
- self.assertEqual(arr[-2], arr[1])
- self.assertEqual(arr[-3], arr[0])
-
- # fail when index out of bounds
- def test_access_fail(self):
- for arr in (test.farr, test.iarr, test.barr):
- self.assertRaises(IndexError, lambda : arr[4])
-
- # test assignment of a whole array
- def test_assign_array(self):
- # should accept int as float
- test.farr= (1, 2, 3)
-
- # fail when: unexpected no. of items, invalid item type
- def test_assign_array_fail(self):
- def assign_empty_list(arr):
- setattr(test, arr, ())
-
- for arr in ("farr", "iarr", "barr"):
- self.assertRaises(ValueError, assign_empty_list, arr)
-
- def assign_invalid_float():
- test.farr= (1.0, 2.0, "3.0")
-
- def assign_invalid_int():
- test.iarr= ("1", 2, 3)
-
- def assign_invalid_bool():
- test.barr= (True, 0.123, False)
-
- for func in [assign_invalid_float, assign_invalid_int, assign_invalid_bool]:
- self.assertRaises(TypeError, func)
-
- # shouldn't accept float as int
- def assign_float_as_int():
- test.iarr= (1, 2, 3.0)
- self.assertRaises(TypeError, assign_float_as_int)
-
- # non-dynamic arrays cannot change size
- def assign_different_size(arr, val):
- setattr(test, arr, val)
- for arr, val in zip(("iarr", "farr", "barr"), ((1, 2), (1.0, 2.0), (True, False))):
- self.assertRaises(ValueError, assign_different_size, arr, val)
-
- # test assignment of specific items
- def test_assign_item(self):
- for arr, rand_func in zip((test.farr, test.iarr, test.barr), (rand_float, rand_int, rand_bool)):
- for i in range(len(arr)):
- val= rand_func()
- arr[i]= val
-
- self.assertEqual(arr[i], val)
-
- # float prop should accept also int
- for i in range(len(test.farr)):
- val= rand_int()
- test.farr[i]= val
- self.assertEqual(test.farr[i], float(val))
-
- #
-
- def test_assign_item_fail(self):
- def assign_bad_index(arr):
- arr[4] = 1.0
-
- def assign_bad_type(arr):
- arr[1]= "123"
-
- for arr in [test.farr, test.iarr, test.barr]:
- self.assertRaises(IndexError, assign_bad_index, arr)
-
- # not testing bool because bool allows not only (True|False)
- for arr in [test.farr, test.iarr]:
- self.assertRaises(TypeError, assign_bad_type, arr)
-
- def test_dynamic_assign_array(self):
- # test various lengths here
- for arr, rand_func in zip(("fdarr", "idarr", "bdarr"), (rand_float, rand_int, rand_bool)):
- for length in range(1, 64):
- rval= make_random_array(length, rand_func)
- setattr(test, arr, rval)
- self.assertEqual(prop_to_list(getattr(test, arr)), rval)
-
- def test_dynamic_assign_array_fail(self):
- # could also test too big length here
-
- def assign_empty_list(arr):
- setattr(test, arr, ())
-
- for arr in ("fdarr", "idarr", "bdarr"):
- self.assertRaises(ValueError, assign_empty_list, arr)
-
-
-class TestMArray(unittest.TestCase):
- def setUp(self):
- # reset dynamic array sizes
- for arr, func in zip(("fdmarr", "idmarr", "bdmarr"), (rand_float, rand_int, rand_bool)):
- setattr(test, arr, make_random_3d_array((3, 4, 5), func))
-
- # test assignment
- def test_assign_array(self):
- for arr, func in zip(("fmarr", "imarr", "bmarr"), (rand_float, rand_int, rand_bool)):
- # assignment of [3][4][5]
- rval= make_random_3d_array((3, 4, 5), func)
- setattr(test, arr, rval)
- self.assertEqual(prop_to_list(getattr(test, arr)), rval)
-
- # test assignment of [2][4][5], [1][4][5] should work on dynamic arrays
-
- def test_assign_array_fail(self):
- def assign_empty_array():
- test.fmarr= ()
- self.assertRaises(ValueError, assign_empty_array)
-
- def assign_invalid_size(arr, rval):
- setattr(test, arr, rval)
-
- # assignment of 3,4,4 or 3,3,5 should raise ex
- for arr, func in zip(("fmarr", "imarr", "bmarr"), (rand_float, rand_int, rand_bool)):
- rval= make_random_3d_array((3, 4, 4), func)
- self.assertRaises(ValueError, assign_invalid_size, arr, rval)
-
- rval= make_random_3d_array((3, 3, 5), func)
- self.assertRaises(ValueError, assign_invalid_size, arr, rval)
-
- rval= make_random_3d_array((3, 3, 3), func)
- self.assertRaises(ValueError, assign_invalid_size, arr, rval)
-
- def test_assign_item(self):
- # arr[i] = x
- for arr, func in zip(("fmarr", "imarr", "bmarr", "fdmarr", "idmarr", "bdmarr"), (rand_float, rand_int, rand_bool) * 2):
- rval= make_random_2d_array((4, 5), func)
-
- for i in range(3):
- getattr(test, arr)[i]= rval
- self.assertEqual(prop_to_list(getattr(test, arr)[i]), rval)
-
- # arr[i][j] = x
- for arr, func in zip(("fmarr", "imarr", "bmarr", "fdmarr", "idmarr", "bdmarr"), (rand_float, rand_int, rand_bool) * 2):
-
- arr= getattr(test, arr)
- rval= make_random_array(5, func)
-
- for i in range(3):
- for j in range(4):
- arr[i][j]= rval
- self.assertEqual(prop_to_list(arr[i][j]), rval)
-
-
- def test_assign_item_fail(self):
- def assign_wrong_size(arr, i, rval):
- getattr(test, arr)[i]= rval
-
- # assign wrong size at level 2
- for arr, func in zip(("fmarr", "imarr", "bmarr"), (rand_float, rand_int, rand_bool)):
- rval1= make_random_2d_array((3, 5), func)
- rval2= make_random_2d_array((4, 3), func)
-
- for i in range(3):
- self.assertRaises(ValueError, assign_wrong_size, arr, i, rval1)
- self.assertRaises(ValueError, assign_wrong_size, arr, i, rval2)
-
- def test_dynamic_assign_array(self):
- for arr, func in zip(("fdmarr", "idmarr", "bdmarr"), (rand_float, rand_int, rand_bool)):
- # assignment of [3][4][5]
- rval= make_random_3d_array((3, 4, 5), func)
- setattr(test, arr, rval)
- self.assertEqual(prop_to_list(getattr(test, arr)), rval)
-
- # [2][4][5]
- rval= make_random_3d_array((2, 4, 5), func)
- setattr(test, arr, rval)
- self.assertEqual(prop_to_list(getattr(test, arr)), rval)
-
- # [1][4][5]
- rval= make_random_3d_array((1, 4, 5), func)
- setattr(test, arr, rval)
- self.assertEqual(prop_to_list(getattr(test, arr)), rval)
-
-
- # test access
- def test_access(self):
- pass
-
- # test slice access, negative indices
- def test_access_fail(self):
- pass
-
-random.seed()
-
-def rand_int():
- return random.randint(-1000, 1000)
-
-def rand_float():
- return float(rand_int())
-
-def rand_bool():
- return bool(random.randint(0, 1))
-
-def make_random_array(len, rand_func):
- arr= []
- for i in range(len):
- arr.append(rand_func())
-
- return arr
-
-def make_random_2d_array(dimsize, rand_func):
- marr= []
- for i in range(dimsize[0]):
- marr.append([])
-
- for j in range(dimsize[1]):
- marr[-1].append(rand_func())
-
- return marr
-
-def make_random_3d_array(dimsize, rand_func):
- marr= []
- for i in range(dimsize[0]):
- marr.append([])
-
- for j in range(dimsize[1]):
- marr[-1].append([])
-
- for k in range(dimsize[2]):
- marr[-1][-1].append(rand_func())
-
- return marr
-
-def prop_to_list(prop):
- ret= []
-
- for x in prop:
- if type(x) not in (bool, int, float):
- ret.append(prop_to_list(x))
- else:
- ret.append(x)
-
- return ret
-
-def suite():
- return unittest.TestSuite([unittest.TestLoader().loadTestsFromTestCase(TestArray), unittest.TestLoader().loadTestsFromTestCase(TestMArray)])
-
-if __name__ == "__main__":
- unittest.TextTestRunner(verbosity=2).run(suite())
-
diff --git a/release/ui/bpy_ops.py b/release/ui/bpy_ops.py
index dff8125fca1..aa9bfb460f0 100644
--- a/release/ui/bpy_ops.py
+++ b/release/ui/bpy_ops.py
@@ -5,18 +5,6 @@ from bpy.__ops__ import dir as op_dir
from bpy.__ops__ import call as op_call
from bpy.__ops__ import get_rna as op_get_rna
-# Keep in sync with WM_types.h
-context_dict = {
- 'INVOKE_DEFAULT':0,
- 'INVOKE_REGION_WIN':1,
- 'INVOKE_AREA':2,
- 'INVOKE_SCREEN':3,
- 'EXEC_DEFAULT':4,
- 'EXEC_REGION_WIN':5,
- 'EXEC_AREA':6,
- 'EXEC_SCREEN':7,
-}
-
class bpy_ops(object):
'''
Fake module like class.
@@ -106,22 +94,10 @@ class bpy_ops_submodule_op(object):
# submod.foo -> SUBMOD_OT_foo
return self.module.upper() + '_OT_' + self.func
- def __call__(self, *args, **kw):
+ def __call__(self, **kw):
# Get the operator from blender
- if len(args) > 1:
- raise ValueError("only one argument for the execution context is supported ")
-
- if args:
- try:
- context = context_dict[args[0]]
- except:
- raise ValueError("Expected a single context argument in: " + str(list(context_dict.keys())))
-
- return op_call(self.idname(), kw, context)
-
- else:
- return op_call(self.idname(), kw)
+ return op_call(self.idname(), kw)
def get_rna(self):
'''
diff --git a/release/ui/buttons_data_armature.py b/release/ui/buttons_data_armature.py
index 5924a2eb4ea..9b640776a9e 100644
--- a/release/ui/buttons_data_armature.py
+++ b/release/ui/buttons_data_armature.py
@@ -2,8 +2,8 @@
import bpy
class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "data"
def poll(self, context):
@@ -41,22 +41,21 @@ class DATA_PT_skeleton(DataButtonsPanel):
split = layout.split()
col = split.column()
- col.itemL(text="Layers:")
- col.itemR(arm, "layer", text="")
- col.itemL(text="Protected Layers:")
- col.itemR(arm, "layer_protection", text="")
- col.itemL(text="Edit Options:")
- col.itemR(arm, "x_axis_mirror")
- col.itemR(arm, "auto_ik")
-
- col = split.column()
col.itemR(arm, "rest_position")
col.itemL(text="Deform:")
col.itemR(arm, "deform_vertexgroups", text="Vertex Groups")
col.itemR(arm, "deform_envelope", text="Envelopes")
col.itemR(arm, "deform_quaternion", text="Quaternion")
col.itemR(arm, "deform_bbone_rest", text="B-Bones Rest")
-
+ #col.itemR(arm, "x_axis_mirror")
+ #col.itemR(arm, "auto_ik")
+
+ col = split.column()
+ col.itemL(text="Layers:")
+ col.template_layers(arm, "layer")
+ col.itemL(text="Protected Layers:")
+ col.template_layers(arm, "layer_protection")
+
class DATA_PT_display(DataButtonsPanel):
__label__ = "Display"
@@ -84,15 +83,15 @@ class DATA_PT_bone_groups(DataButtonsPanel):
layout = self.layout
ob = context.object
- pose = ob.pose
+ pose= ob.pose
row = layout.row()
row.template_list(pose, "bone_groups", pose, "active_bone_group_index")
col = row.column(align=True)
col.active = (ob.proxy == None)
- col.itemO("pose.group_add", icon='ICON_ZOOMIN', text="")
- col.itemO("pose.group_remove", icon='ICON_ZOOMOUT', text="")
+ col.itemO("pose.group_add", icon="ICON_ZOOMIN", text="")
+ col.itemO("pose.group_remove", icon="ICON_ZOOMOUT", text="")
group = pose.active_bone_group
if group:
@@ -155,7 +154,7 @@ class DATA_PT_ghost(DataButtonsPanel):
split = layout.split()
col = split.column()
- col.itemR(arm, "ghost_type", text="")
+ col.itemR(arm, "ghost_type", text="Scope")
sub = col.column(align=True)
if arm.ghost_type == 'RANGE':
diff --git a/release/ui/buttons_data_bone.py b/release/ui/buttons_data_bone.py
index 0d379a4788f..1eb09377892 100644
--- a/release/ui/buttons_data_bone.py
+++ b/release/ui/buttons_data_bone.py
@@ -2,8 +2,8 @@
import bpy
class BoneButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "bone"
def poll(self, context):
@@ -20,7 +20,7 @@ class BONE_PT_context_bone(BoneButtonsPanel):
bone = context.edit_bone
row = layout.row()
- row.itemL(text="", icon='ICON_BONE_DATA')
+ row.itemL(text="", icon="ICON_BONE_DATA")
row.itemR(bone, "name", text="")
class BONE_PT_transform(BoneButtonsPanel):
@@ -74,15 +74,10 @@ class BONE_PT_bone(BoneButtonsPanel):
def draw(self, context):
layout = self.layout
- ob = context.object
bone = context.bone
arm = context.armature
-
if not bone:
bone = context.edit_bone
- pchan = None
- else:
- pchan = ob.pose.pose_channels[context.bone.name]
split = layout.split()
@@ -92,14 +87,14 @@ class BONE_PT_bone(BoneButtonsPanel):
col.itemR(bone, "parent", text="")
else:
col.item_pointerR(bone, "parent", arm, "edit_bones", text="")
-
+
row = col.row()
row.active = bone.parent != None
row.itemR(bone, "connected")
-
+
col.itemL(text="Layers:")
- col.itemR(bone, "layer", text="")
-
+ col.template_layers(bone, "layer")
+
col = split.column()
col.itemL(text="Inherit:")
col.itemR(bone, "hinge", text="Rotation")
@@ -107,17 +102,6 @@ class BONE_PT_bone(BoneButtonsPanel):
col.itemL(text="Display:")
col.itemR(bone, "draw_wire", text="Wireframe")
col.itemR(bone, "hidden", text="Hide")
-
- if ob and pchan:
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Bone Group:")
- col.item_pointerR(pchan, "bone_group", ob.pose, "bone_groups", text="")
-
- col = split.column()
- col.itemL(text="Custom Shape:")
- col.itemR(pchan, "custom_shape", text="")
class BONE_PT_inverse_kinematics(BoneButtonsPanel):
__label__ = "Inverse Kinematics"
@@ -194,18 +178,18 @@ class BONE_PT_deform(BoneButtonsPanel):
__default_closed__ = True
def draw_header(self, context):
- bone = context.bone
+ layout = self.layout
+ bone = context.bone
if not bone:
bone = context.edit_bone
- self.layout.itemR(bone, "deform", text="")
+ layout.itemR(bone, "deform", text="")
def draw(self, context):
layout = self.layout
bone = context.bone
-
if not bone:
bone = context.edit_bone
diff --git a/release/ui/buttons_data_camera.py b/release/ui/buttons_data_camera.py
index aa107d8dbdd..f2fa4207ec8 100644
--- a/release/ui/buttons_data_camera.py
+++ b/release/ui/buttons_data_camera.py
@@ -2,12 +2,12 @@
import bpy
class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "data"
def poll(self, context):
- return (context.camera)
+ return (context.camera != None)
class DATA_PT_context_camera(DataButtonsPanel):
__show_header__ = False
@@ -49,7 +49,7 @@ class DATA_PT_camera(DataButtonsPanel):
elif cam.type == 'ORTHO':
row.itemR(cam, "ortho_scale")
- layout.itemR(cam, "panorama")
+ layout.itemR(cam, "panorama");
split = layout.split()
diff --git a/release/ui/buttons_data_curve.py b/release/ui/buttons_data_curve.py
index 1124dfd1ae8..35d557afe32 100644
--- a/release/ui/buttons_data_curve.py
+++ b/release/ui/buttons_data_curve.py
@@ -2,28 +2,13 @@
import bpy
class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "data"
def poll(self, context):
- return (context.object and context.object.type in ('CURVE', 'SURFACE') and context.curve)
-
-class DataButtonsPanelCurve(DataButtonsPanel):
- '''
- Same as above but for curves only
- '''
- def poll(self, context):
return (context.object and context.object.type == 'CURVE' and context.curve)
-class DataButtonsPanelActive(DataButtonsPanel):
- '''
- Same as above but for curves only
- '''
- def poll(self, context):
- curve = context.curve
- return (curve and curve.active_spline)
-
class DATA_PT_context_curve(DataButtonsPanel):
__show_header__ = False
@@ -52,170 +37,119 @@ class DATA_PT_shape_curve(DataButtonsPanel):
ob = context.object
curve = context.curve
space = context.space_data
- is_surf = (ob.type == 'SURFACE')
- if not is_surf:
- row = layout.row()
- row.itemR(curve, "curve_2d")
- row.itemR(curve, "use_twist_correction")
-
- split = layout.split()
-
- col = split.column()
+ if curve:
+ layout.itemR(curve, "curve_2d")
+
+ split = layout.split()
- if not is_surf:
- sub = col.column()
- sub.active = curve.curve_2d
- sub.itemL(text="Caps:")
- row = sub.row()
- row.itemR(curve, "front")
- row.itemR(curve, "back")
+ col = split.column()
+ colsub = col.column()
+ colsub.active = curve.curve_2d
+ colsub.itemL(text="Caps:")
+ colsub.itemR(curve, "front")
+ colsub.itemR(curve, "back")
- col.itemL(text="Textures:")
-# col.itemR(curve, "uv_orco")
- col.itemR(curve, "auto_texspace")
+ col.itemL(text="Textures:")
+# col.itemR(curve, "uv_orco")
+ col.itemR(curve, "auto_texspace")
- col = split.column()
- col.itemL(text="Resolution:")
- sub = col.column(align=True)
- sub.itemR(curve, "resolution_u", text="Preview U")
- sub.itemR(curve, "render_resolution_u", text="Render U")
-
- if is_surf:
- sub = col.column(align=True)
+ sub = split.column()
+ sub.itemL(text="Resolution:")
+ sub.itemR(curve, "resolution_u", text="Preview U")
sub.itemR(curve, "resolution_v", text="Preview V")
+ sub.itemR(curve, "render_resolution_u", text="Render U")
sub.itemR(curve, "render_resolution_v", text="Render V")
-
-# col.itemL(text="Display:")
-# col.itemL(text="HANDLES")
-# col.itemL(text="NORMALS")
-# col.itemR(curve, "vertex_normal_flip")
+# sub.itemL(text="Display:")
+# sub.itemL(text="HANDLES")
+# sub.itemL(text="NORMALS")
+# sub.itemR(curve, "vertex_normal_flip")
-class DATA_PT_geometry_curve(DataButtonsPanelCurve):
+class DATA_PT_geometry_curve(DataButtonsPanel):
__label__ = "Geometry "
def draw(self, context):
layout = self.layout
curve = context.curve
-
+
split = layout.split()
- col = split.column()
- col.itemL(text="Modification:")
- col.itemR(curve, "width")
- col.itemR(curve, "extrude")
- col.itemR(curve, "taper_object", icon='ICON_OUTLINER_OB_CURVE')
-
- col = split.column()
- col.itemL(text="Bevel:")
- col.itemR(curve, "bevel_depth", text="Depth")
- col.itemR(curve, "bevel_resolution", text="Resolution")
- col.itemR(curve, "bevel_object", icon='ICON_OUTLINER_OB_CURVE')
-
+ sub = split.column()
+ sub.itemL(text="Modification:")
+ sub.itemR(curve, "width")
+ sub.itemR(curve, "extrude")
+ sub.itemR(curve, "taper_object", icon="ICON_OUTLINER_OB_CURVE")
+
+ sub = split.column()
+ sub.itemL(text="Bevel:")
+ sub.itemR(curve, "bevel_depth", text="Depth")
+ sub.itemR(curve, "bevel_resolution", text="Resolution")
+ sub.itemR(curve, "bevel_object", icon="ICON_OUTLINER_OB_CURVE")
-class DATA_PT_pathanim(DataButtonsPanelCurve):
+class DATA_PT_pathanim(DataButtonsPanel):
__label__ = "Path Animation"
def draw_header(self, context):
+ layout = self.layout
+
curve = context.curve
- self.layout.itemR(curve, "use_path", text="")
+ layout.itemR(curve, "path", text="")
def draw(self, context):
layout = self.layout
curve = context.curve
- layout.active = curve.use_path
+ layout.active = curve.path
split = layout.split()
col = split.column()
col.itemR(curve, "path_length", text="Frames")
- col.itemR(curve, "use_path_follow")
+ col.itemR(curve, "follow")
col = split.column()
- col.itemR(curve, "use_stretch")
- col.itemR(curve, "use_time_offset", text="Offset Children")
+ col.itemR(curve, "stretch")
+ col.itemR(curve, "offset_path_distance", text="Offset Children")
-class DATA_PT_active_spline(DataButtonsPanelActive):
- __label__ = "Active Spline"
+class DATA_PT_current_curve(DataButtonsPanel):
+ __label__ = "Current Curve"
def draw(self, context):
layout = self.layout
- ob = context.object
- curve = context.curve
- act_spline = curve.active_spline
- is_surf = (ob.type == 'SURFACE')
- is_poly = (act_spline.type == 'POLY')
-
+ currentcurve = context.curve.curves[0] # XXX
+
split = layout.split()
+
+ col = split.column()
+ col.itemL(text="Cyclic:")
+ col.itemR(currentcurve, "cyclic_u", text="U")
+ col.itemR(currentcurve, "cyclic_v", text="V")
+ col.itemL(text="Order:")
+ col.itemR(currentcurve, "order_u", text="U")
+ col.itemR(currentcurve, "order_v", text="V")
+ col.itemL(text="Endpoints:")
+ col.itemR(currentcurve, "endpoint_u", text="U")
+ col.itemR(currentcurve, "endpoint_v", text="V")
- if is_poly:
- # These settings are below but its easier to have
- # poly's set aside since they use so few settings
- col = split.column()
- col.itemL(text="Cyclic:")
- col.itemR(act_spline, "smooth")
- col = split.column()
- col.itemR(act_spline, "cyclic_u", text="U")
+ col = split.column()
+ col.itemL(text="Bezier:")
+ col.itemR(currentcurve, "bezier_u", text="U")
+ col.itemR(currentcurve, "bezier_v", text="V")
+ col.itemL(text="Resolution:")
+ col.itemR(currentcurve, "resolution_u", text="U")
+ col.itemR(currentcurve, "resolution_v", text="V")
+ col.itemL(text="Interpolation:")
+ col.itemR(currentcurve, "tilt_interpolation", text="Tilt")
+ col.itemR(currentcurve, "radius_interpolation", text="Tilt")
+ col.itemR(currentcurve, "smooth")
- else:
- col = split.column()
- col.itemL(text="Cyclic:")
- if act_spline.type == 'NURBS':
- col.itemL(text="Bezier:")
- col.itemL(text="Endpoint:")
- col.itemL(text="Order:")
-
- col.itemL(text="Resolution:")
-
- col = split.column()
- col.itemR(act_spline, "cyclic_u", text="U")
-
- if act_spline.type == 'NURBS':
- sub = col.column()
- # sub.active = (not act_spline.cyclic_u)
- sub.itemR(act_spline, "bezier_u", text="U")
- sub.itemR(act_spline, "endpoint_u", text="U")
-
- sub = col.column()
- sub.itemR(act_spline, "order_u", text="U")
- col.itemR(act_spline, "resolution_u", text="U")
-
- if is_surf:
- col = split.column()
- col.itemR(act_spline, "cyclic_v", text="V")
-
- # its a surface, assume its a nurb.
- sub = col.column()
- sub.active = (not act_spline.cyclic_v)
- sub.itemR(act_spline, "bezier_v", text="V")
- sub.itemR(act_spline, "endpoint_v", text="V")
- sub = col.column()
- sub.itemR(act_spline, "order_v", text="V")
- sub.itemR(act_spline, "resolution_v", text="V")
-
-
- if not is_surf:
- split = layout.split()
- col = split.column()
- col.active = (not curve.curve_2d)
-
- col.itemL(text="Interpolation:")
- col.itemR(act_spline, "tilt_interpolation", text="Tilt")
- col.itemR(act_spline, "radius_interpolation", text="Radius")
-
- split = layout.split()
- col = split.column()
- col.itemR(act_spline, "smooth")
-
-
bpy.types.register(DATA_PT_context_curve)
bpy.types.register(DATA_PT_shape_curve)
bpy.types.register(DATA_PT_geometry_curve)
bpy.types.register(DATA_PT_pathanim)
-bpy.types.register(DATA_PT_active_spline)
+bpy.types.register(DATA_PT_current_curve)
diff --git a/release/ui/buttons_data_empty.py b/release/ui/buttons_data_empty.py
index 402699f82a4..02fea15dc2a 100644
--- a/release/ui/buttons_data_empty.py
+++ b/release/ui/buttons_data_empty.py
@@ -2,8 +2,8 @@
import bpy
class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "data"
def poll(self, context):
@@ -17,7 +17,7 @@ class DATA_PT_empty(DataButtonsPanel):
ob = context.object
- layout.itemR(ob, "empty_draw_type", text="Draw Type")
- layout.itemR(ob, "empty_draw_size", text="Draw Size")
+ layout.itemR(ob, "empty_draw_type")
+ layout.itemR(ob, "empty_draw_size")
bpy.types.register(DATA_PT_empty) \ No newline at end of file
diff --git a/release/ui/buttons_data_lamp.py b/release/ui/buttons_data_lamp.py
index 808a205b1b8..a00bb23d5b5 100644
--- a/release/ui/buttons_data_lamp.py
+++ b/release/ui/buttons_data_lamp.py
@@ -2,8 +2,8 @@
import bpy
class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "data"
def poll(self, context):
@@ -13,7 +13,9 @@ class DATA_PT_preview(DataButtonsPanel):
__label__ = "Preview"
def draw(self, context):
- self.layout.template_preview(context.lamp)
+ layout = self.layout
+
+ layout.template_preview(context.lamp)
class DATA_PT_context_lamp(DataButtonsPanel):
__show_header__ = False
@@ -67,7 +69,8 @@ class DATA_PT_lamp(DataButtonsPanel):
if lamp.type == 'AREA':
col.itemR(lamp, "distance")
col.itemR(lamp, "gamma")
-
+
+
col = split.column()
col.itemR(lamp, "negative")
col.itemR(lamp, "layer", text="This Layer Only")
@@ -296,12 +299,18 @@ class DATA_PT_falloff_curve(DataButtonsPanel):
def poll(self, context):
lamp = context.lamp
- return (lamp and lamp.type in ('POINT', 'SPOT') and lamp.falloff_type == 'CUSTOM_CURVE')
+ if lamp and lamp.type in ('POINT', 'SPOT'):
+ if lamp.falloff_type == 'CUSTOM_CURVE':
+ return True
+
+ return False
def draw(self, context):
+ layout = self.layout
+
lamp = context.lamp
- self.layout.template_curve_mapping(lamp.falloff_curve)
+ layout.template_curve_mapping(lamp.falloff_curve)
bpy.types.register(DATA_PT_context_lamp)
bpy.types.register(DATA_PT_preview)
diff --git a/release/ui/buttons_data_lattice.py b/release/ui/buttons_data_lattice.py
index 895c1a65bea..5d8a07c7d44 100644
--- a/release/ui/buttons_data_lattice.py
+++ b/release/ui/buttons_data_lattice.py
@@ -2,12 +2,12 @@
import bpy
class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "data"
def poll(self, context):
- return (context.lattice)
+ return (context.lattice != None)
class DATA_PT_context_lattice(DataButtonsPanel):
__show_header__ = False
diff --git a/release/ui/buttons_data_mesh.py b/release/ui/buttons_data_mesh.py
index 33b3960b381..b681218a8fe 100644
--- a/release/ui/buttons_data_mesh.py
+++ b/release/ui/buttons_data_mesh.py
@@ -2,12 +2,12 @@
import bpy
class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "data"
def poll(self, context):
- return (context.mesh)
+ return (context.mesh != None)
class DATA_PT_context_mesh(DataButtonsPanel):
__show_header__ = False
@@ -48,6 +48,36 @@ class DATA_PT_normals(DataButtonsPanel):
col.itemR(mesh, "vertex_normal_flip")
col.itemR(mesh, "double_sided")
+class DATA_PT_meshdraw(DataButtonsPanel):
+ __label__ = "Draw"
+
+ def draw(self, context):
+ layout = self.layout
+
+ mesh = context.mesh
+
+ layout.itemL(text="Edit Mode only, WIP")
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(mesh, "draw_edges", text="Edges")
+ col.itemR(mesh, "draw_faces", text="Faces")
+ col.itemR(mesh, "draw_creases", text="Creases")
+ col.itemR(mesh, "draw_bevel_weights", text="Bevel Weights")
+ col.itemR(mesh, "draw_seams", text="Seams")
+ col.itemR(mesh, "draw_sharp", text="Sharp")
+
+ col = split.column()
+ col.itemR(mesh, "draw_normals", text="Face Normals")
+ col.itemR(mesh, "draw_vertex_normals", text="Vertex Normals")
+
+ col.itemS()
+
+ col.itemR(mesh, "draw_edge_lenght")
+ col.itemR(mesh, "draw_edge_angle")
+ col.itemR(mesh, "draw_face_area")
+
class DATA_PT_vertex_groups(DataButtonsPanel):
__label__ = "Vertex Groups"
@@ -63,19 +93,19 @@ class DATA_PT_vertex_groups(DataButtonsPanel):
row.template_list(ob, "vertex_groups", ob, "active_vertex_group_index")
col = row.column(align=True)
- col.itemO("object.vertex_group_add", icon='ICON_ZOOMIN', text="")
- col.itemO("object.vertex_group_remove", icon='ICON_ZOOMOUT', text="")
+ col.itemO("object.vertex_group_add", icon="ICON_ZOOMIN", text="")
+ col.itemO("object.vertex_group_remove", icon="ICON_ZOOMOUT", text="")
- col.itemO("object.vertex_group_copy", icon='ICON_BLANK1', text="")
+ col.itemO("object.vertex_group_copy", icon="ICON_BLANK1", text="")
if ob.data.users > 1:
- col.itemO("object.vertex_group_copy_to_linked", icon='ICON_BLANK1', text="")
+ col.itemO("object.vertex_group_copy_to_linked", icon="ICON_BLANK1", text="")
group = ob.active_vertex_group
if group:
row = layout.row()
row.itemR(group, "name")
- if ob.mode == 'EDIT':
+ if context.edit_object:
row = layout.row()
sub = row.row(align=True)
@@ -102,20 +132,20 @@ class DATA_PT_shape_keys(DataButtonsPanel):
kb = ob.active_shape_key
row = layout.row()
- row.template_list(key, "keys", ob, "active_shape_key_index", rows=2)
+ row.template_list(key, "keys", ob, "active_shape_key_index")
col = row.column()
subcol = col.column(align=True)
- subcol.itemO("object.shape_key_add", icon='ICON_ZOOMIN', text="")
- subcol.itemO("object.shape_key_remove", icon='ICON_ZOOMOUT', text="")
+ subcol.itemO("object.shape_key_add", icon="ICON_ZOOMIN", text="")
+ subcol.itemO("object.shape_key_remove", icon="ICON_ZOOMOUT", text="")
if kb:
col.itemS()
subcol = col.column(align=True)
- subcol.itemR(ob, "shape_key_lock", icon='ICON_UNPINNED', text="")
- subcol.itemR(kb, "mute", icon='ICON_MUTE_IPO_ON', text="")
+ subcol.itemR(ob, "shape_key_lock", icon="ICON_UNPINNED", text="")
+ subcol.itemR(kb, "mute", icon="ICON_MUTE_IPO_ON", text="")
if key.relative:
row = layout.row()
@@ -150,7 +180,7 @@ class DATA_PT_shape_keys(DataButtonsPanel):
layout.itemR(kb, "name")
- if ob.mode == 'EDIT':
+ if context.edit_object:
layout.enabled = False
class DATA_PT_uv_texture(DataButtonsPanel):
@@ -167,8 +197,8 @@ class DATA_PT_uv_texture(DataButtonsPanel):
col.template_list(me, "uv_textures", me, "active_uv_texture_index", rows=2)
col = row.column(align=True)
- col.itemO("mesh.uv_texture_add", icon='ICON_ZOOMIN', text="")
- col.itemO("mesh.uv_texture_remove", icon='ICON_ZOOMOUT', text="")
+ col.itemO("mesh.uv_texture_add", icon="ICON_ZOOMIN", text="")
+ col.itemO("mesh.uv_texture_remove", icon="ICON_ZOOMOUT", text="")
lay = me.active_uv_texture
if lay:
@@ -188,8 +218,8 @@ class DATA_PT_vertex_colors(DataButtonsPanel):
col.template_list(me, "vertex_colors", me, "active_vertex_color_index", rows=2)
col = row.column(align=True)
- col.itemO("mesh.vertex_color_add", icon='ICON_ZOOMIN', text="")
- col.itemO("mesh.vertex_color_remove", icon='ICON_ZOOMOUT', text="")
+ col.itemO("mesh.vertex_color_add", icon="ICON_ZOOMIN", text="")
+ col.itemO("mesh.vertex_color_remove", icon="ICON_ZOOMOUT", text="")
lay = me.active_vertex_color
if lay:
@@ -197,6 +227,7 @@ class DATA_PT_vertex_colors(DataButtonsPanel):
bpy.types.register(DATA_PT_context_mesh)
bpy.types.register(DATA_PT_normals)
+bpy.types.register(DATA_PT_meshdraw)
bpy.types.register(DATA_PT_vertex_groups)
bpy.types.register(DATA_PT_shape_keys)
bpy.types.register(DATA_PT_uv_texture)
diff --git a/release/ui/buttons_data_metaball.py b/release/ui/buttons_data_metaball.py
index 88c0066c67f..e31c3d7fcd0 100644
--- a/release/ui/buttons_data_metaball.py
+++ b/release/ui/buttons_data_metaball.py
@@ -1,8 +1,8 @@
import bpy
class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "data"
def poll(self, context):
diff --git a/release/ui/buttons_data_modifier.py b/release/ui/buttons_data_modifier.py
index 2835f55f71a..436baa540d4 100644
--- a/release/ui/buttons_data_modifier.py
+++ b/release/ui/buttons_data_modifier.py
@@ -2,8 +2,8 @@
import bpy
class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "modifier"
class DATA_PT_modifiers(DataButtonsPanel):
@@ -27,7 +27,6 @@ class DATA_PT_modifiers(DataButtonsPanel):
# the mt.type enum is (ab)used for a lookup on function names
# ...to avoid lengthy if statements
# so each type must have a function here.
-
def ARMATURE(self, layout, ob, md):
layout.itemR(md, "object")
@@ -171,7 +170,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
if md.texture_coordinates == 'OBJECT':
layout.itemR(md, "texture_coordinate_object", text="Object")
elif md.texture_coordinates == 'UV' and ob.type == 'MESH':
- layout.item_pointerR(md, "uv_layer", ob.data, "uv_textures")
+ layout.item_pointerR(md, "uv_layer", ob.data, "uv_layers")
def EDGE_SPLIT(self, layout, ob, md):
split = layout.split()
@@ -188,40 +187,21 @@ class DATA_PT_modifiers(DataButtonsPanel):
def EXPLODE(self, layout, ob, md):
layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
layout.itemR(md, "protect")
-
- flow = layout.column_flow(2)
- flow.itemR(md, "split_edges")
- flow.itemR(md, "unborn")
- flow.itemR(md, "alive")
- flow.itemR(md, "dead")
-
- layout.itemO("object.explode_refresh", text="Refresh");
+ layout.itemR(md, "split_edges")
+ layout.itemR(md, "unborn")
+ layout.itemR(md, "alive")
+ layout.itemR(md, "dead")
+ # Missing: "Refresh" and "Clear Vertex Group" Operator
def FLUID_SIMULATION(self, layout, ob, md):
layout.itemL(text="See Fluid panel.")
def HOOK(self, layout, ob, md):
- col = layout.column()
- col.itemR(md, "object")
- if md.object and md.object.type == 'ARMATURE':
- layout.item_pointerR(md, "subtarget", md.object.data, "bones", text="Bone")
-
+ layout.itemR(md, "falloff")
+ layout.itemR(md, "force", slider=True)
+ layout.itemR(md, "object")
layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
-
- split = layout.split()
- split.itemR(md, "falloff")
- split.itemR(md, "force", slider=True)
-
- layout.itemS()
-
- row = layout.row()
- row.itemO("object.hook_reset", text="Reset")
- row.itemO("object.hook_recenter", text="Recenter")
-
- if ob.mode == 'EDIT':
- row = layout.row()
- row.itemO("object.hook_select", text="Select")
- row.itemO("object.hook_assign", text="Assign")
+ # Missing: "Reset" and "Recenter" Operator
def LATTICE(self, layout, ob, md):
layout.itemR(md, "object")
@@ -242,7 +222,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
layout.itemS()
- layout.itemO("object.meshdeform_bind", text="Bind")
+ layout.itemO("object.modifier_mdef_bind", text="Bind")
row = layout.row()
row.itemR(md, "precision")
row.itemR(md, "dynamic")
@@ -269,11 +249,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
def MULTIRES(self, layout, ob, md):
layout.itemR(md, "subdivision_type")
-
- row = layout.row()
- row.itemO("object.multires_subdivide", text="Subdivide")
- row.itemO("object.multires_higher_levels_delete", text="Delete Higher")
-
+ layout.itemO("object.multires_subdivide", text="Subdivide")
layout.itemR(md, "level")
def PARTICLE_INSTANCE(self, layout, ob, md):
@@ -370,26 +346,16 @@ class DATA_PT_modifiers(DataButtonsPanel):
def UV_PROJECT(self, layout, ob, md):
if ob.type == 'MESH':
- layout.item_pointerR(md, "uv_layer", ob.data, "uv_textures")
+ layout.item_pointerR(md, "uv_layer", ob.data, "uv_layers")
+ #layout.itemR(md, "projectors")
layout.itemR(md, "image")
layout.itemR(md, "override_image")
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Aspect Ratio:")
-
- sub = col.column(align=True)
- sub.itemR(md, "horizontal_aspect_ratio", text="Horizontal")
- sub.itemR(md, "vertical_aspect_ratio", text="Vertical")
-
- col = split.column()
- col.itemL(text="Projectors:")
-
- sub = col.column(align=True)
- sub.itemR(md, "num_projectors", text="Number")
- for proj in md.projectors:
- sub.itemR(proj, "object", text="")
+ layout.itemL(text="Aspect Ratio:")
+ col = layout.column(align=True)
+ col.itemR(md, "horizontal_aspect_ratio", text="Horizontal")
+ col.itemR(md, "vertical_aspect_ratio", text="Vertical")
+
+ #"Projectors" don't work.
def WAVE(self, layout, ob, md):
split = layout.split()
@@ -402,41 +368,29 @@ class DATA_PT_modifiers(DataButtonsPanel):
col = split.column()
col.itemR(md, "normals")
- sub = col.column()
+ sub = col.row(align=True)
sub.active = md.normals
- sub.itemR(md, "x_normal", text="X")
- sub.itemR(md, "y_normal", text="Y")
- sub.itemR(md, "z_normal", text="Z")
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Time:")
- sub = col.column(align=True)
- sub.itemR(md, "time_offset", text="Offset")
- sub.itemR(md, "lifetime", text="Life")
- col.itemR(md, "damping_time", text="Damping")
-
- col = split.column()
- col.itemL(text="Position:")
- sub = col.column(align=True)
- sub.itemR(md, "start_position_x", text="X")
- sub.itemR(md, "start_position_y", text="Y")
- col.itemR(md, "falloff_radius", text="Falloff")
+ sub.itemR(md, "x_normal", text="X", toggle=True)
+ sub.itemR(md, "y_normal", text="Y", toggle=True)
+ sub.itemR(md, "z_normal", text="Z", toggle=True)
- layout.itemS()
+ flow = layout.column_flow()
+ flow.itemR(md, "time_offset")
+ flow.itemR(md, "lifetime")
+ flow.itemR(md, "damping_time")
+ flow.itemR(md, "falloff_radius")
+ flow.itemR(md, "start_position_x")
+ flow.itemR(md, "start_position_y")
layout.itemR(md, "start_position_object")
layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
layout.itemR(md, "texture")
layout.itemR(md, "texture_coordinates")
if md.texture_coordinates == 'MAP_UV' and ob.type == 'MESH':
- layout.item_pointerR(md, "uv_layer", ob.data, "uv_textures")
+ layout.item_pointerR(md, "uv_layer", ob.data, "uv_layers")
elif md.texture_coordinates == 'OBJECT':
layout.itemR(md, "texture_coordinates_object")
- layout.itemS()
-
flow = layout.column_flow()
flow.itemR(md, "speed", slider=True)
flow.itemR(md, "height", slider=True)
diff --git a/release/ui/buttons_data_text.py b/release/ui/buttons_data_text.py
index d0e7ea09a92..754d6fcda39 100644
--- a/release/ui/buttons_data_text.py
+++ b/release/ui/buttons_data_text.py
@@ -2,8 +2,8 @@
import bpy
class DataButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "data"
def poll(self, context):
@@ -38,31 +38,29 @@ class DATA_PT_shape_text(DataButtonsPanel):
curve = context.curve
space = context.space_data
- layout.itemR(curve, "curve_2d")
+ if curve:
+ layout.itemR(curve, "curve_2d")
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Caps:")
- row = col.row()
- row .itemR(curve, "front")
- row .itemR(curve, "back")
- # col = split.column()
- col.itemL(text="Textures:")
- col.itemR(curve, "uv_orco")
- col.itemR(curve, "auto_texspace")
+ split = layout.split()
+
+ col = split.column()
+ col.itemL(text="Caps:")
+ col.itemR(curve, "front")
+ col.itemR(curve, "back")
+ col.itemL(text="Textures:")
+ col.itemR(curve, "uv_orco")
+ col.itemR(curve, "auto_texspace")
- col = split.column()
- col.itemL(text="Resolution:")
- sub = col.column(align=True)
- sub.itemR(curve, "resolution_u", text="Preview U")
- sub.itemR(curve, "render_resolution_u", text="Render U")
-
- # resolution_v is not used for text
-
- sub = col.column(align=True)
- col.itemL(text="Display:")
- col.itemR(curve, "fast", text="Fast Editing")
+ col = split.column()
+ col.itemL(text="Resolution:")
+ sub = col.column(align=True)
+ sub.itemR(curve, "resolution_u", text="Preview U")
+ sub.itemR(curve, "render_resolution_u", text="Render U")
+ sub = col.column(align=True)
+ sub.itemR(curve, "resolution_v", text="Preview V")
+ sub.itemR(curve, "render_resolution_v", text="Render V")
+ col.itemL(text="Display:")
+ col.itemR(curve, "fast")
class DATA_PT_geometry_text(DataButtonsPanel):
__label__ = "Geometry"
@@ -78,15 +76,13 @@ class DATA_PT_geometry_text(DataButtonsPanel):
col.itemL(text="Modification:")
col.itemR(curve, "width")
col.itemR(curve, "extrude")
- col.itemL(text="Taper Object:")
- col.itemR(curve, "taper_object", text="")
+ col.itemR(curve, "taper_object")
col = split.column()
col.itemL(text="Bevel:")
col.itemR(curve, "bevel_depth", text="Depth")
col.itemR(curve, "bevel_resolution", text="Resolution")
- col.itemL(text="Bevel Object:")
- col.itemR(curve, "bevel_object", text="")
+ col.itemR(curve, "bevel_object")
class DATA_PT_font(DataButtonsPanel):
__label__ = "Font"
@@ -95,39 +91,27 @@ class DATA_PT_font(DataButtonsPanel):
layout = self.layout
text = context.curve
- char = context.curve.edit_format
layout.itemR(text, "font")
- row = layout.row()
- row.itemR(text, "text_size", text="Size")
- row.itemR(text, "shear")
-
split = layout.split()
col = split.column()
- col.itemL(text="Object Font:")
- col.itemR(text, "family", text="")
+ # col.itemR(text, "style")
+ # col.itemR(text, "bold")
+ # col.itemR(text, "italic")
+ # col.itemR(text, "underline")
+ # ToDo: These settings are in a sub struct (Edit Format).
+ col.itemR(text, "text_size")
+ col.itemR(text, "shear")
col = split.column()
- col.itemL(text="Text on Curve:")
- col.itemR(text, "text_on_curve", text="")
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Character:")
- col.itemR(char, "bold")
- col.itemR(char, "italic")
- col.itemR(char, "underline")
-# col.itemR(char, "style")
-# col.itemR(char, "wrap")
-
- col = split.column(align=True)
+ col.itemR(text, "text_on_curve")
+ col.itemR(text, "family")
col.itemL(text="Underline:")
col.itemR(text, "ul_position", text="Position")
- col.itemR(text, "ul_height", text="Thickness")
-
+ col.itemR(text, "ul_height", text="Height")
+ # col.itemR(text, "edit_format")
class DATA_PT_paragraph(DataButtonsPanel):
__label__ = "Paragraph"
@@ -150,34 +134,23 @@ class DATA_PT_paragraph(DataButtonsPanel):
col = split.column(align=True)
col.itemL(text="Offset:")
- col.itemR(text, "offset_x", text="X")
- col.itemR(text, "offset_y", text="Y")
-
+ col.itemR(text, "x_offset", text="X")
+ col.itemR(text, "y_offset", text="Y")
+ #col.itemR(text, "wrap")
+"""
class DATA_PT_textboxes(DataButtonsPanel):
- __label__ = "Text Boxes"
+ __label__ = "Text Boxes"
- def draw(self, context):
- layout = self.layout
+ def draw(self, context):
+ layout = self.layout
- text = context.curve
-
- for box in text.textboxes:
- split = layout.box().split()
-
- col = split.column(align=True)
- col.itemL(text="Dimensions:")
- col.itemR(box, "width", text="Width")
- col.itemR(box, "height", text="Height")
-
- col = split.column(align=True)
- col.itemL(text="Offset:")
- col.itemR(box, "x", text="X")
- col.itemR(box, "y", text="Y")
+ text = context.curve
+"""
bpy.types.register(DATA_PT_context_text)
bpy.types.register(DATA_PT_shape_text)
bpy.types.register(DATA_PT_geometry_text)
bpy.types.register(DATA_PT_font)
bpy.types.register(DATA_PT_paragraph)
-bpy.types.register(DATA_PT_textboxes)
+#bpy.types.register(DATA_PT_textboxes)
diff --git a/release/ui/buttons_game.py b/release/ui/buttons_game.py
index 73ba566e23f..7334b453e91 100644
--- a/release/ui/buttons_game.py
+++ b/release/ui/buttons_game.py
@@ -2,8 +2,8 @@
import bpy
class PhysicsButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "physics"
def poll(self, context):
@@ -45,9 +45,10 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
col = split.column()
col.itemL(text="Attributes:")
- col.itemR(game, "mass")
- col.itemR(game, "radius")
- col.itemR(game, "form_factor")
+ sub = col.column()
+ sub.itemR(game, "mass")
+ sub.itemR(game, "radius")
+ sub.itemR(game, "form_factor")
col = split.column()
sub = col.column()
@@ -107,7 +108,8 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
col.itemR(soft, "dynamic_friction", slider=True)
col.itemR(soft, "margin", slider=True)
col.itemR(soft, "bending_const", text="Bending Constraints")
-
+
+
col = split.column()
col.itemR(soft, "shape_match")
sub = col.column()
@@ -132,26 +134,32 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
elif game.physics_type in ('SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'):
- layout.itemR(ob, "restrict_render", text="Invisible")
+ col = layout.column()
+ col.itemR(ob, "restrict_render", text="Invisible")
class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel):
__label__ = "Collision Bounds"
def poll(self, context):
- game = context.object.game
+ ob = context.active_object
+ game = ob.game
rd = context.scene.render_data
return (game.physics_type in ('DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC')) and (rd.engine == 'BLENDER_GAME')
def draw_header(self, context):
- game = context.active_object.game
+ layout = self.layout
+
+ ob = context.active_object
+ game = ob.game
- self.layout.itemR(game, "use_collision_bounds", text="")
+ layout.itemR(game, "use_collision_bounds", text="")
def draw(self, context):
layout = self.layout
- game = context.active_object.game
-
+ ob = context.scene.objects[0]
+ game = ob.game
+
layout.active = game.use_collision_bounds
layout.itemR(game, "collision_bounds", text="Bounds")
@@ -163,8 +171,8 @@ bpy.types.register(PHYSICS_PT_game_physics)
bpy.types.register(PHYSICS_PT_game_collision_bounds)
class SceneButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "scene"
def poll(self, context):
@@ -176,6 +184,8 @@ class SCENE_PT_game(SceneButtonsPanel):
def draw(self, context):
layout = self.layout
+
+ rd = context.scene.render_data
row = layout.row()
row.itemO("view3d.game_start", text="Start")
@@ -312,8 +322,8 @@ bpy.types.register(SCENE_PT_game_shading)
bpy.types.register(SCENE_PT_game_performance)
class WorldButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "world"
def poll(self, context):
diff --git a/release/ui/buttons_material.py b/release/ui/buttons_material.py
index dc11731d7a9..b971a678926 100644
--- a/release/ui/buttons_material.py
+++ b/release/ui/buttons_material.py
@@ -2,22 +2,24 @@
import bpy
class MaterialButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "material"
# COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (engine in self.COMPAT_ENGINES)
+ return (context.material) and (context.scene.render_data.engine in self.COMPAT_ENGINES)
class MATERIAL_PT_preview(MaterialButtonsPanel):
__label__ = "Preview"
COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
def draw(self, context):
- self.layout.template_preview(context.material)
+ layout = self.layout
+
+ mat = context.material
+
+ layout.template_preview(mat)
class MATERIAL_PT_context_material(MaterialButtonsPanel):
__show_header__ = False
@@ -27,8 +29,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
# An exception, dont call the parent poll func because
# this manages materials for all engine types
- engine = context.scene.render_data.engine
- return (context.object) and (engine in self.COMPAT_ENGINES)
+ return (context.object) and (context.scene.render_data.engine in self.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
@@ -44,10 +45,10 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
row.template_list(ob, "materials", ob, "active_material_index", rows=2)
col = row.column(align=True)
- col.itemO("object.material_slot_add", icon='ICON_ZOOMIN', text="")
- col.itemO("object.material_slot_remove", icon='ICON_ZOOMOUT', text="")
+ col.itemO("object.material_slot_add", icon="ICON_ZOOMIN", text="")
+ col.itemO("object.material_slot_remove", icon="ICON_ZOOMOUT", text="")
- if ob.mode == 'EDIT':
+ if context.edit_object:
row = layout.row(align=True)
row.itemO("object.material_slot_assign", text="Assign")
row.itemO("object.material_slot_select", text="Select")
@@ -72,36 +73,34 @@ class MATERIAL_PT_shading(MaterialButtonsPanel):
__label__ = "Shading"
COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE', 'HALO')) and (engine in self.COMPAT_ENGINES)
-
def draw(self, context):
layout = self.layout
mat = context.material
+ ob = context.object
+ slot = context.material_slot
+ space = context.space_data
- if mat.type in ('SURFACE', 'WIRE'):
- split = layout.split()
+ if mat:
+
+ if mat.type in ('SURFACE', 'WIRE', 'VOLUME'):
+ split = layout.split()
- col = split.column()
- sub = col.column()
- sub.active = not mat.shadeless
- sub.itemR(mat, "emit")
- sub.itemR(mat, "ambient")
- sub = col.column()
- sub.itemR(mat, "translucency")
+ col = split.column()
+ col.active = not mat.shadeless
+ col.itemR(mat, "ambient")
+ col.itemR(mat, "emit")
+ col.itemR(mat, "translucency")
- col = split.column()
- col.itemR(mat, "shadeless")
- sub = col.column()
- sub.active = not mat.shadeless
- sub.itemR(mat, "tangent_shading")
- sub.itemR(mat, "cubic")
+ col = split.column()
+ col.itemR(mat, "shadeless")
+ sub = col.column()
+ sub.active = not mat.shadeless
+ sub.itemR(mat, "tangent_shading")
+ sub.itemR(mat, "cubic")
- elif mat.type == 'HALO':
- layout.itemR(mat, "alpha")
+ elif mat.type == 'HALO':
+ layout.itemR(mat, "alpha")
class MATERIAL_PT_strand(MaterialButtonsPanel):
__label__ = "Strand"
@@ -110,8 +109,7 @@ class MATERIAL_PT_strand(MaterialButtonsPanel):
def poll(self, context):
mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE', 'HALO')) and (engine in self.COMPAT_ENGINES)
+ return mat and (mat.type in ('SURFACE', 'WIRE')) and (context.scene.render_data.engine in self.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
@@ -121,22 +119,20 @@ class MATERIAL_PT_strand(MaterialButtonsPanel):
split = layout.split()
- col = split.column(align=True)
+ col = split.column()
col.itemL(text="Size:")
- col.itemR(tan, "root_size", text="Root")
- col.itemR(tan, "tip_size", text="Tip")
+ col.itemR(tan, "start_size", text="Root")
+ col.itemR(tan, "end_size", text="Tip")
col.itemR(tan, "min_size", text="Minimum")
col.itemR(tan, "blender_units")
sub = col.column()
sub.active = (not mat.shadeless)
sub.itemR(tan, "tangent_shading")
- col.itemR(tan, "shape")
col = split.column()
- col.itemL(text="Shading:")
+ col.itemR(tan, "shape")
col.itemR(tan, "width_fade")
col.itemR(tan, "uv_layer")
- col.itemS()
sub = col.column()
sub.active = (not mat.shadeless)
sub.itemR(tan, "surface_diffuse")
@@ -151,7 +147,8 @@ class MATERIAL_PT_physics(MaterialButtonsPanel):
def draw(self, context):
layout = self.layout
- phys = context.material.physics
+ mat = context.material
+ phys = mat.physics
split = layout.split()
@@ -169,11 +166,6 @@ class MATERIAL_PT_options(MaterialButtonsPanel):
__label__ = "Options"
COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE', 'HALO')) and (engine in self.COMPAT_ENGINES)
-
def draw(self, context):
layout = self.layout
@@ -208,11 +200,6 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel):
__label__ = "Shadow"
__default_closed__ = True
COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
-
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
@@ -223,7 +210,7 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel):
col = split.column()
col.itemR(mat, "shadows", text="Receive")
- col.itemR(mat, "receive_transparent_shadows", text="Receive Transparent")
+ col.itemR(mat, "transparent_shadows", text="Receive Transparent")
col.itemR(mat, "only_shadow", text="Shadows Only")
col.itemR(mat, "cast_shadows_only", text="Cast Only")
col.itemR(mat, "shadow_casting_alpha", text="Casting Alpha")
@@ -237,6 +224,7 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel):
sub = col.column()
sub.active = (not mat.ray_shadow_bias)
sub.itemR(mat, "shadow_ray_bias", text="Ray Bias")
+
class MATERIAL_PT_diffuse(MaterialButtonsPanel):
__label__ = "Diffuse"
@@ -244,8 +232,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel):
def poll(self, context):
mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
+ return mat and (mat.type != 'HALO') and (context.scene.render_data.engine in self.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
@@ -258,7 +245,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel):
col.itemR(mat, "diffuse_color", text="")
sub = col.column()
sub.active = (not mat.shadeless)
- sub.itemR(mat, "diffuse_intensity", text="Intensity")
+ sub.itemR(mat, "diffuse_reflection", text="Intensity")
col = split.column()
col.active = (not mat.shadeless)
@@ -291,15 +278,15 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel):
split = row.split(percentage=0.3)
split.itemL(text="Blend:")
split.itemR(mat, "diffuse_ramp_blend", text="")
-
+
+
class MATERIAL_PT_specular(MaterialButtonsPanel):
__label__ = "Specular"
COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
def poll(self, context):
mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
+ return mat and (mat.type != 'HALO') and (context.scene.render_data.engine in self.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
@@ -312,7 +299,7 @@ class MATERIAL_PT_specular(MaterialButtonsPanel):
col = split.column()
col.itemR(mat, "specular_color", text="")
- col.itemR(mat, "specular_intensity", text="Intensity")
+ col.itemR(mat, "specular_reflection", text="Intensity")
col = split.column()
col.itemR(mat, "specular_shader", text="")
@@ -351,15 +338,13 @@ class MATERIAL_PT_sss(MaterialButtonsPanel):
def poll(self, context):
mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
+ return mat and (mat.type in ('SURFACE', 'WIRE')) and (context.scene.render_data.engine in self.COMPAT_ENGINES)
def draw_header(self, context):
+ layout = self.layout
sss = context.material.subsurface_scattering
- mat = context.material
-
- self.layout.active = (not mat.shadeless)
- self.layout.itemR(sss, "enabled", text="")
+
+ layout.itemR(sss, "enabled", text="")
def draw(self, context):
layout = self.layout
@@ -372,22 +357,21 @@ class MATERIAL_PT_sss(MaterialButtonsPanel):
split = layout.split()
split.active = (not mat.shadeless)
- col = split.column()
- col.itemR(sss, "ior")
- col.itemR(sss, "scale")
+ col = split.column(align=True)
col.itemR(sss, "color", text="")
- col.itemR(sss, "radius", text="RGB Radius")
+ col.itemL(text="Blend:")
+ col.itemR(sss, "color_factor", text="Color")
+ col.itemR(sss, "texture_factor", text="Texture")
+ col.itemL(text="Scattering Weight:")
+ col.itemR(sss, "front")
+ col.itemR(sss, "back")
col = split.column()
sub = col.column(align=True)
- sub.itemL(text="Blend:")
- sub.itemR(sss, "color_factor", text="Color")
- sub.itemR(sss, "texture_factor", text="Texture")
- sub.itemL(text="Scattering Weight:")
- sub.itemR(sss, "front")
- sub.itemR(sss, "back")
- col.itemS()
- col.itemR(sss, "error_tolerance", text="Error")
+ sub.itemR(sss, "ior")
+ sub.itemR(sss, "scale")
+ col.itemR(sss, "radius", text="RGB Radius")
+ col.itemR(sss, "error_tolerance")
class MATERIAL_PT_mirror(MaterialButtonsPanel):
__label__ = "Mirror"
@@ -396,13 +380,14 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel):
def poll(self, context):
mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
+ return mat and (mat.type in ('SURFACE', 'WIRE')) and (context.scene.render_data.engine in self.COMPAT_ENGINES)
- def draw_header(self, context):
+ def draw_header(self, context):
+ layout = self.layout
+
raym = context.material.raytrace_mirror
- self.layout.itemR(raym, "enabled", text="")
+ layout.itemR(raym, "enabled", text="")
def draw(self, context):
layout = self.layout
@@ -415,35 +400,31 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel):
split = layout.split()
col = split.column()
- col.itemR(raym, "reflect_factor")
+ col.itemR(raym, "reflect", text="Reflectivity")
col.itemR(mat, "mirror_color", text="")
-
- col = split.column()
- col.itemR(raym, "fresnel")
+ col.itemL(text="Fresnel:")
+ col.itemR(raym, "fresnel", text="Amount")
sub = col.column()
sub.active = raym.fresnel > 0
sub.itemR(raym, "fresnel_factor", text="Blend")
-
- split = layout.split()
-
- col = split.column()
col.itemS()
- col.itemR(raym, "distance", text="Max Dist")
- col.itemR(raym, "depth")
col.itemS()
sub = col.split(percentage=0.4)
sub.itemL(text="Fade To:")
sub.itemR(raym, "fade_to", text="")
col = split.column()
+ col.itemR(raym, "depth")
+ col.itemR(raym, "distance", text="Max Dist")
col.itemL(text="Gloss:")
- col.itemR(raym, "gloss_factor", text="Amount")
+ col.itemR(raym, "gloss", text="Amount")
sub = col.column()
- sub.active = raym.gloss_factor < 1.0
+ sub.active = raym.gloss < 1
sub.itemR(raym, "gloss_threshold", text="Threshold")
sub.itemR(raym, "gloss_samples", text="Samples")
sub.itemR(raym, "gloss_anisotropic", text="Anisotropic")
-
+
+
class MATERIAL_PT_transp(MaterialButtonsPanel):
__label__= "Transparency"
__default_closed__ = True
@@ -451,12 +432,13 @@ class MATERIAL_PT_transp(MaterialButtonsPanel):
def poll(self, context):
mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
+ return mat and (mat.type in ('SURFACE', 'WIRE')) and (context.scene.render_data.engine in self.COMPAT_ENGINES)
- def draw_header(self, context):
+ def draw_header(self, context):
+ layout = self.layout
+
mat = context.material
- self.layout.itemR(mat, "transparency", text="")
+ layout.itemR(mat, "transparency", text="")
def draw(self, context):
layout = self.layout
@@ -464,29 +446,32 @@ class MATERIAL_PT_transp(MaterialButtonsPanel):
mat = context.material
rayt = context.material.raytrace_transparency
- row = layout.row()
- row.active = mat.transparency and (not mat.shadeless)
+ row= layout.row()
row.itemR(mat, "transparency_method", expand=True)
+ row.active = mat.transparency and (not mat.shadeless)
split = layout.split()
col = split.column()
- col.itemR(mat, "alpha")
+ col.itemL(text="Transparency:")
+ row = col.row()
+ row.itemR(mat, "alpha")
+ row.active = mat.transparency
row = col.row()
- row.active = mat.transparency and (not mat.shadeless)
row.itemR(mat, "specular_alpha", text="Specular")
-
+ row.active = mat.transparency and (not mat.shadeless)
+
col = split.column()
- col.active = (not mat.shadeless)
- col.itemR(rayt, "fresnel")
+ col.active = mat.transparency and (not mat.shadeless)
+ col.itemL(text="Fresnel:")
+ col.itemR(rayt, "fresnel", text="Amount")
sub = col.column()
sub.active = rayt.fresnel > 0
sub.itemR(rayt, "fresnel_factor", text="Blend")
if mat.transparency_method == 'RAYTRACE':
- layout.itemS()
split = layout.split()
- split.active = mat.transparency
+ split.active = mat.transparency and (not mat.shadeless)
col = split.column()
col.itemR(rayt, "ior")
@@ -497,20 +482,19 @@ class MATERIAL_PT_transp(MaterialButtonsPanel):
col = split.column()
col.itemL(text="Gloss:")
- col.itemR(rayt, "gloss_factor", text="Amount")
+ col.itemR(rayt, "gloss", text="Amount")
sub = col.column()
- sub.active = rayt.gloss_factor < 1.0
+ sub.active = rayt.gloss < 1
sub.itemR(rayt, "gloss_threshold", text="Threshold")
sub.itemR(rayt, "gloss_samples", text="Samples")
-
+
class MATERIAL_PT_halo(MaterialButtonsPanel):
__label__= "Halo"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
def poll(self, context):
mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type == 'HALO') and (engine in self.COMPAT_ENGINES)
+ return mat and (mat.type == 'HALO') and (context.scene.render_data.engine in self.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
@@ -526,8 +510,8 @@ class MATERIAL_PT_halo(MaterialButtonsPanel):
col.itemR(halo, "hardness")
col.itemR(halo, "add")
col.itemL(text="Options:")
- col.itemR(halo, "texture")
- col.itemR(halo, "vertex_normal")
+ col.itemR(halo, "use_texture", text="Texture")
+ col.itemR(halo, "use_vertex_normal", text="Vertex Normal")
col.itemR(halo, "xalpha")
col.itemR(halo, "shaded")
col.itemR(halo, "soft")
@@ -538,52 +522,24 @@ class MATERIAL_PT_halo(MaterialButtonsPanel):
sub.active = halo.ring
sub.itemR(halo, "rings")
sub.itemR(mat, "mirror_color", text="")
- col.itemS()
col.itemR(halo, "lines")
sub = col.column()
sub.active = halo.lines
sub.itemR(halo, "line_number", text="Lines")
sub.itemR(mat, "specular_color", text="")
- col.itemS()
col.itemR(halo, "star")
sub = col.column()
sub.active = halo.star
sub.itemR(halo, "star_tips")
-
-class MATERIAL_PT_flare(MaterialButtonsPanel):
- __label__= "Flare"
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type == 'HALO') and (engine in self.COMPAT_ENGINES)
-
- def draw_header(self, context):
- layout = self.layout
-
- mat = context.material
- halo = mat.halo
- layout.itemR(halo, "flare_mode", text="")
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
- halo = mat.halo
+ col.itemR(halo, "flare_mode")
+ sub = col.column()
+ sub.active = halo.flare_mode
+ sub.itemR(halo, "flare_size", text="Size")
+ sub.itemR(halo, "flare_subsize", text="Subsize")
+ sub.itemR(halo, "flare_boost", text="Boost")
+ sub.itemR(halo, "flare_seed", text="Seed")
+ sub.itemR(halo, "flares_sub", text="Sub")
- layout.active = halo.flare_mode
-
- split = layout.split()
-
- col = split.column()
- col.itemR(halo, "flare_size", text="Size")
- col.itemR(halo, "flare_boost", text="Boost")
- col.itemR(halo, "flare_seed", text="Seed")
- col = split.column()
- col.itemR(halo, "flares_sub", text="Subflares")
- col.itemR(halo, "flare_subsize", text="Subsize")
-
bpy.types.register(MATERIAL_PT_context_material)
bpy.types.register(MATERIAL_PT_preview)
bpy.types.register(MATERIAL_PT_diffuse)
@@ -593,121 +549,8 @@ bpy.types.register(MATERIAL_PT_transp)
bpy.types.register(MATERIAL_PT_mirror)
bpy.types.register(MATERIAL_PT_sss)
bpy.types.register(MATERIAL_PT_halo)
-bpy.types.register(MATERIAL_PT_flare)
bpy.types.register(MATERIAL_PT_physics)
bpy.types.register(MATERIAL_PT_strand)
bpy.types.register(MATERIAL_PT_options)
bpy.types.register(MATERIAL_PT_shadow)
-# Volumetrics
-class VolumeButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
- __context__ = "material"
-
- def poll(self, context):
- mat = context.material
- engine = context.scene.render_data.engine
- return mat and (mat.type == 'VOLUME') and (engine in self.COMPAT_ENGINES)
-
-class MATERIAL_PT_volume_shading(VolumeButtonsPanel):
- __label__ = "Shading"
- __default_closed__ = False
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
- vol = context.material.volume
-
- row = layout.row()
- row.itemR(vol, "density")
- row.itemR(vol, "scattering")
-
- split = layout.split()
-
- col = split.column()
- col.itemR(vol, "absorption")
- col.itemR(vol, "absorption_color", text="")
-
- col = split.column()
- col.itemR(vol, "emission")
- col.itemR(vol, "emission_color", text="")
-
-class MATERIAL_PT_volume_scattering(VolumeButtonsPanel):
- __label__ = "Scattering"
- __default_closed__ = False
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- vol = context.material.volume
-
- split = layout.split()
-
- col = split.column()
- col.itemR(vol, "scattering_mode", text="")
- if vol.scattering_mode == 'SINGLE_SCATTERING':
- col.itemR(vol, "light_cache")
- sub = col.column()
- sub.active = vol.light_cache
- sub.itemR(vol, "cache_resolution")
- elif vol.scattering_mode in ('MULTIPLE_SCATTERING', 'SINGLE_PLUS_MULTIPLE_SCATTERING'):
- col.itemR(vol, "cache_resolution")
-
- col = col.column(align=True)
- col.itemR(vol, "ms_diffusion")
- col.itemR(vol, "ms_spread")
- col.itemR(vol, "ms_intensity")
-
- col = split.column()
- # col.itemL(text="Anisotropic Scattering:")
- col.itemR(vol, "phase_function", text="")
- if vol.phase_function in ('SCHLICK', 'HENYEY-GREENSTEIN'):
- col.itemR(vol, "asymmetry")
-
-class MATERIAL_PT_volume_transp(VolumeButtonsPanel):
- __label__= "Transparency"
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
- rayt = context.material.raytrace_transparency
-
- row= layout.row()
- row.itemR(mat, "transparency_method", expand=True)
- row.active = mat.transparency and (not mat.shadeless)
-
-class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
- __label__ = "Integration"
- __default_closed__ = False
- COMPAT_ENGINES = set(['BLENDER_RENDER'])
-
- def draw(self, context):
- layout = self.layout
-
- mat = context.material
- vol = context.material.volume
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Step Calculation:")
- col.itemR(vol, "step_calculation", text="")
- col = col.column(align=True)
- col.itemR(vol, "step_size")
- col.itemR(vol, "shading_step_size")
-
- col = split.column()
- col.itemL()
- col.itemR(vol, "depth_cutoff")
- col.itemR(vol, "density_scale")
-
-bpy.types.register(MATERIAL_PT_volume_shading)
-bpy.types.register(MATERIAL_PT_volume_scattering)
-bpy.types.register(MATERIAL_PT_volume_transp)
-bpy.types.register(MATERIAL_PT_volume_integration)
diff --git a/release/ui/buttons_object.py b/release/ui/buttons_object.py
index af2c7cfb58a..6b6d583e2ca 100644
--- a/release/ui/buttons_object.py
+++ b/release/ui/buttons_object.py
@@ -2,8 +2,8 @@
import bpy
class ObjectButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "object"
class OBJECT_PT_context_object(ObjectButtonsPanel):
@@ -15,7 +15,7 @@ class OBJECT_PT_context_object(ObjectButtonsPanel):
ob = context.object
row = layout.row()
- row.itemL(text="", icon='ICON_OBJECT_DATA')
+ row.itemL(text="", icon="ICON_OBJECT_DATA")
row.itemR(ob, "name", text="")
class OBJECT_PT_transform(ObjectButtonsPanel):
@@ -79,7 +79,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
row = col.box().row()
row.itemR(group, "name", text="")
- row.itemO("object.group_remove", text="", icon='VICON_X')
+ row.itemO("object.group_remove", text="", icon="VICON_X")
split = col.box().split()
split.column().itemR(group, "layer", text="Dupli")
diff --git a/release/ui/buttons_object_constraint.py b/release/ui/buttons_object_constraint.py
index ff3231a9d61..c67d6e40cfb 100644
--- a/release/ui/buttons_object_constraint.py
+++ b/release/ui/buttons_object_constraint.py
@@ -2,8 +2,8 @@
import bpy
class ConstraintButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "constraint"
def draw_constraint(self, con):
@@ -39,7 +39,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
layout.itemR(con, "target") # XXX limiting settings for only 'curves' or some type of object
if con.target and subtargets:
- if con.target.type == 'ARMATURE':
+ if con.target.type == "ARMATURE":
layout.item_pointerR(con, "subtarget", con.target.data, "bones", text="Bone")
if con.type == 'COPY_LOCATION':
@@ -121,17 +121,9 @@ class ConstraintButtonsPanel(bpy.types.Panel):
def FOLLOW_PATH(self, layout, con):
self.target_template(layout, con)
- split = layout.split()
-
- col = split.column()
- col.itemR(con, "curve_follow")
-
- col = split.column()
- col.itemR(con, "fixed_position")
- if con.fixed_position:
- col.itemR(con, "offset_percentage", text="Offset")
- else:
- col.itemR(con, "offset")
+ row = layout.row()
+ row.itemR(con, "curve_follow")
+ row.itemR(con, "offset")
row = layout.row()
row.itemL(text="Forward:")
@@ -486,7 +478,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
layout.itemR(con, "distance")
layout.itemR(con, "shrinkwrap_type")
- if con.shrinkwrap_type == 'PROJECT':
+ if con.shrinkwrap_type == "PROJECT":
row = layout.row(align=True)
row.itemR(con, "axis_x")
row.itemR(con, "axis_y")
diff --git a/release/ui/buttons_physics_cloth.py b/release/ui/buttons_physics_cloth.py
index 5cdca3c2c74..f34077c758a 100644
--- a/release/ui/buttons_physics_cloth.py
+++ b/release/ui/buttons_physics_cloth.py
@@ -1,14 +1,9 @@
import bpy
-from buttons_particle import point_cache_ui
-
-def cloth_panel_enabled(md):
- return md.point_cache.baked==False
-
class PhysicButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "physics"
def poll(self, context):
@@ -43,8 +38,6 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel):
if md:
cloth = md.settings
-
- layout.active = cloth_panel_enabled(md)
split = layout.split()
@@ -89,35 +82,77 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel):
__default_closed__ = True
def poll(self, context):
- return (context.cloth)
+ return (context.cloth != None)
def draw(self, context):
- md = context.cloth
- point_cache_ui(self, md.point_cache, cloth_panel_enabled(md), 0, 0)
+ layout = self.layout
+
+ cache = context.cloth.point_cache
+ layout.set_context_pointer("PointCache", cache)
+
+ row = layout.row()
+ row.template_list(cache, "point_cache_list", cache, "active_point_cache_index")
+ col = row.column(align=True)
+ col.itemO("ptcache.add_new", icon="ICON_ZOOMIN", text="")
+ col.itemO("ptcache.remove", icon="ICON_ZOOMOUT", text="")
+
+ row = layout.row()
+ row.itemR(cache, "name")
+
+ row = layout.row()
+ row.itemR(cache, "start_frame")
+ row.itemR(cache, "end_frame")
+
+ row = layout.row()
+
+ if cache.baked == True:
+ row.itemO("ptcache.free_bake", text="Free Bake")
+ else:
+ row.item_booleanO("ptcache.bake", "bake", True, text="Bake")
+
+ subrow = row.row()
+ subrow.enabled = cache.frames_skipped or cache.outdated
+ subrow.itemO("ptcache.bake", "bake", False, text="Calculate to Current Frame")
+
+ row = layout.row()
+ #row.enabled = particle_panel_enabled(psys)
+ row.itemO("ptcache.bake_from_cache", text="Current Cache to Bake")
+ row.itemR(cache, "step");
+
+ row = layout.row()
+ #row.enabled = particle_panel_enabled(psys)
+ row.itemR(cache, "quick_cache")
+ row.itemR(cache, "disk_cache")
+
+ layout.itemL(text=cache.info)
+
+ layout.itemS()
+
+ row = layout.row()
+ row.itemO("ptcache.bake_all", "bake", True, text="Bake All Dynamics")
+ row.itemO("ptcache.free_bake_all", text="Free All Bakes")
+ layout.itemO("ptcache.bake_all", "bake", False, text="Update All Dynamics to current frame")
class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
__label__ = "Cloth Collision"
__default_closed__ = True
def poll(self, context):
- return (context.cloth)
+ return (context.cloth != None)
def draw_header(self, context):
+ layout = self.layout
cloth = context.cloth.collision_settings
-
- self.layout.active = cloth_panel_enabled(context.cloth)
- self.layout.itemR(cloth, "enable_collision", text="")
+
+ layout.itemR(cloth, "enable_collision", text="")
def draw(self, context):
layout = self.layout
-
cloth = context.cloth.collision_settings
- md = context.cloth
-
- layout.active = cloth.enable_collision and cloth_panel_enabled(md)
-
split = layout.split()
+ layout.active = cloth.enable_collision
+
col = split.column()
col.itemR(cloth, "collision_quality", slider=True, text="Quality")
col.itemR(cloth, "min_distance", slider=True, text="Distance")
@@ -125,10 +160,10 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
col = split.column()
col.itemR(cloth, "enable_self_collision", text="Self Collision")
- sub = col.column()
- sub.active = cloth.enable_self_collision
- sub.itemR(cloth, "self_collision_quality", slider=True, text="Quality")
- sub.itemR(cloth, "self_min_distance", slider=True, text="Distance")
+ col = col.column()
+ col.active = cloth.enable_self_collision
+ col.itemR(cloth, "self_collision_quality", slider=True, text="Quality")
+ col.itemR(cloth, "self_min_distance", slider=True, text="Distance")
class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
__label__ = "Cloth Stiffness Scaling"
@@ -138,19 +173,17 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
return (context.cloth != None)
def draw_header(self, context):
+ layout = self.layout
cloth = context.cloth.settings
- self.layout.active = cloth_panel_enabled(context.cloth)
- self.layout.itemR(cloth, "stiffness_scaling", text="")
+ layout.itemR(cloth, "stiffness_scaling", text="")
def draw(self, context):
layout = self.layout
-
- md = context.cloth
ob = context.object
cloth = context.cloth.settings
- layout.active = cloth.stiffness_scaling and cloth_panel_enabled(md)
+ layout.active = cloth.stiffness_scaling
split = layout.split()
diff --git a/release/ui/buttons_physics_field.py b/release/ui/buttons_physics_field.py
index 58033d2c431..fb29dd92833 100644
--- a/release/ui/buttons_physics_field.py
+++ b/release/ui/buttons_physics_field.py
@@ -2,13 +2,13 @@
import bpy
class PhysicButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "physics"
def poll(self, context):
rd = context.scene.render_data
- return (context.object) and (not rd.use_game_engine)
+ return (context.object != None) and (not rd.use_game_engine)
class PHYSICS_PT_field(PhysicButtonsPanel):
__label__ = "Force Fields"
@@ -146,15 +146,15 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
sub.active = field.use_radial_max
sub.itemR(field, "radial_maximum", text="Distance")
- #if ob.type in 'CURVE':
- #if field.type == 'GUIDE':
+ #if ob.type in "CURVE":
+ #if field.type == "GUIDE":
#colsub = col.column(align=True)
- #if field.type != 'NONE':
+ #if field.type != "NONE":
#layout.itemR(field, "strength")
- #if field.type in ('HARMONIC', 'SPHERICAL', 'CHARGE', "LENNARDj"):
- #if ob.type in ('MESH', 'SURFACE', 'FONT', 'CURVE'):
+ #if field.type in ("HARMONIC", "SPHERICAL", "CHARGE", "LENNARDj"):
+ #if ob.type in ("MESH", "SURFACE", "FONT", "CURVE"):
#layout.itemR(field, "surface")
class PHYSICS_PT_collision(PhysicButtonsPanel):
diff --git a/release/ui/buttons_physics_fluid.py b/release/ui/buttons_physics_fluid.py
index 6f7a97ff793..304d419b388 100644
--- a/release/ui/buttons_physics_fluid.py
+++ b/release/ui/buttons_physics_fluid.py
@@ -2,8 +2,8 @@
import bpy
class PhysicButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "physics"
def poll(self, context):
@@ -46,7 +46,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel):
layout.itemR(fluid, "type")
if fluid.type == 'DOMAIN':
- layout.itemO("fluid.bake", text="Bake Fluid Simulation", icon='ICON_MOD_FLUIDSIM')
+ layout.itemO("fluid.bake", text="BAKE")
split = layout.split()
col = split.column()
@@ -94,7 +94,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel):
col.itemL(text="Slip Type:")
col.itemR(fluid, "slip_type", text="")
if fluid.slip_type == 'PARTIALSLIP':
- col.itemR(fluid, "partial_slip_factor", slider=True, text="Amount")
+ col.itemR(fluid, "partial_slip_amount", slider=True, text="Amount")
col.itemL(text="Impact:")
col.itemR(fluid, "impact_factor", text="Factor")
@@ -175,7 +175,11 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel):
def poll(self, context):
md = context.fluid
if md:
- return (md.settings.type == 'DOMAIN')
+ settings = md.settings
+ if settings:
+ return (settings.type == 'DOMAIN')
+
+ return False
def draw(self, context):
layout = self.layout
@@ -214,7 +218,11 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel):
def poll(self, context):
md = context.fluid
if md:
- return (md.settings.type == 'DOMAIN')
+ settings = md.settings
+ if settings:
+ return (settings.type == 'DOMAIN')
+
+ return False
def draw(self, context):
layout = self.layout
@@ -228,7 +236,7 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel):
sub = col.column(align=True)
sub.itemR(fluid, "slip_type", text="")
if fluid.slip_type == 'PARTIALSLIP':
- sub.itemR(fluid, "partial_slip_factor", slider=True, text="Amount")
+ sub.itemR(fluid, "partial_slip_amount", slider=True, text="Amount")
col = split.column()
col.itemL(text="Surface:")
@@ -243,8 +251,12 @@ class PHYSICS_PT_domain_particles(PhysicButtonsPanel):
def poll(self, context):
md = context.fluid
if md:
- return (md.settings.type == 'DOMAIN')
-
+ settings = md.settings
+ if settings:
+ return (settings.type == 'DOMAIN')
+
+ return False
+
def draw(self, context):
layout = self.layout
diff --git a/release/ui/buttons_physics_smoke.py b/release/ui/buttons_physics_smoke.py
index 6aee152e92a..7e2395216c0 100644
--- a/release/ui/buttons_physics_smoke.py
+++ b/release/ui/buttons_physics_smoke.py
@@ -1,11 +1,9 @@
import bpy
-from buttons_particle import point_cache_ui
-
class PhysicButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "physics"
def poll(self, context):
@@ -51,6 +49,13 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel):
col = split.column()
col.itemL(text="Resolution:")
col.itemR(domain, "maxres", text="Divisions")
+
+ col.itemL(text="Display:")
+ col.itemR(domain, "visibility", text="Resolution")
+ col.itemR(domain, "color", slider=True)
+ sub = col.column()
+ sub.active = domain.highres
+ sub.itemR(domain, "viewhighres")
col = split.column()
col.itemL(text="Behavior:")
@@ -59,7 +64,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel):
col.itemR(domain, "dissolve_smoke", text="Dissolve")
sub = col.column()
sub.active = domain.dissolve_smoke
- sub.itemR(domain, "dissolve_speed", text="Time")
+ sub.itemR(domain, "dissolve_speed", text="Speed")
sub.itemR(domain, "dissolve_smoke_log", text="Slow")
elif md.smoke_type == 'TYPE_FLOW':
@@ -83,7 +88,43 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel):
#elif md.smoke_type == 'TYPE_COLL':
# layout.itemS()
+
+class PHYSICS_PT_smoke_highres(PhysicButtonsPanel):
+ __label__ = "Smoke High Resolution"
+ __default_closed__ = True
+
+ def poll(self, context):
+ md = context.smoke
+ if md:
+ return (md.smoke_type == 'TYPE_DOMAIN')
+
+ return False
+ def draw_header(self, context):
+ layout = self.layout
+
+ high = context.smoke.domain_settings
+
+ layout.itemR(high, "highres", text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ high = context.smoke.domain_settings
+
+ layout.active = high.highres
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemL(text="Resolution:")
+ col.itemR(high, "amplify", text="Divisions")
+
+ sub = split.column()
+ sub.itemL(text="Noise Method:")
+ sub.row().itemR(high, "noise_type", text="")
+ sub.itemR(high, "strength")
+
class PHYSICS_PT_smoke_groups(PhysicButtonsPanel):
__label__ = "Smoke Groups"
__default_closed__ = True
@@ -113,70 +154,6 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel):
col.itemL(text="Collision Group:")
col.itemR(group, "coll_group", text="")
-class PHYSICS_PT_smoke_cache(PhysicButtonsPanel):
- __label__ = "Smoke Cache"
- __default_closed__ = True
-
- def poll(self, context):
- md = context.smoke
- return md and (md.smoke_type == 'TYPE_DOMAIN')
-
- def draw(self, context):
- layout = self.layout
-
- md = context.smoke.domain_settings
- cache = md.point_cache_low
-
- point_cache_ui(self, cache, cache.baked==False, 0, 1)
-
-class PHYSICS_PT_smoke_highres(PhysicButtonsPanel):
- __label__ = "Smoke High Resolution"
- __default_closed__ = True
-
- def poll(self, context):
- md = context.smoke
- return md and (md.smoke_type == 'TYPE_DOMAIN')
-
- def draw_header(self, context):
- high = context.smoke.domain_settings
-
- self.layout.itemR(high, "highres", text="")
-
- def draw(self, context):
- layout = self.layout
-
- md = context.smoke.domain_settings
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Resolution:")
- col.itemR(md, "amplify", text="Divisions")
-
- col = split.column()
- col.itemL(text="Noise Method:")
- col.row().itemR(md, "noise_type", text="")
- col.itemR(md, "strength")
- col.itemR(md, "viewhighres")
-
-class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel):
- __label__ = "Smoke High Resolution Cache"
- __default_closed__ = True
-
- def poll(self, context):
- md = context.smoke
- return md and (md.smoke_type == 'TYPE_DOMAIN') and md.domain_settings.highres
-
- def draw(self, context):
- layout = self.layout
-
- md = context.smoke.domain_settings
- cache = md.point_cache_high
-
- point_cache_ui(self, cache, cache.baked==False, 0, 1)
-
bpy.types.register(PHYSICS_PT_smoke)
-bpy.types.register(PHYSICS_PT_smoke_cache)
bpy.types.register(PHYSICS_PT_smoke_highres)
bpy.types.register(PHYSICS_PT_smoke_groups)
-bpy.types.register(PHYSICS_PT_smoke_cache_highres)
diff --git a/release/ui/buttons_physics_softbody.py b/release/ui/buttons_physics_softbody.py
index 703977a056f..2613f9e8032 100644
--- a/release/ui/buttons_physics_softbody.py
+++ b/release/ui/buttons_physics_softbody.py
@@ -1,14 +1,9 @@
import bpy
-from buttons_particle import point_cache_ui
-
-def softbody_panel_enabled(md):
- return md.point_cache.baked==False
-
class PhysicButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "physics"
def poll(self, context):
@@ -46,7 +41,6 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel):
# General
split = layout.split()
- split.enabled = softbody_panel_enabled(md)
col = split.column()
col.itemL(text="Object:")
@@ -66,132 +60,179 @@ class PHYSICS_PT_softbody_cache(PhysicButtonsPanel):
return (context.soft_body)
def draw(self, context):
- md = context.soft_body
- point_cache_ui(self, md.point_cache, softbody_panel_enabled(md), 0, 0)
+ layout = self.layout
+
+ cache = context.soft_body.point_cache
+ layout.set_context_pointer("PointCache", cache)
+
+ row = layout.row()
+ row.template_list(cache, "point_cache_list", cache, "active_point_cache_index")
+ col = row.column(align=True)
+ col.itemO("ptcache.add_new", icon="ICON_ZOOMIN", text="")
+ col.itemO("ptcache.remove", icon="ICON_ZOOMOUT", text="")
+
+ row = layout.row()
+ row.itemR(cache, "name")
+
+ row = layout.row()
+ row.itemR(cache, "start_frame")
+ row.itemR(cache, "end_frame")
+
+ row = layout.row()
+
+ if cache.baked == True:
+ row.itemO("ptcache.free_bake", text="Free Bake")
+ else:
+ row.item_booleanO("ptcache.bake", "bake", True, text="Bake")
+
+ sub = row.row()
+ sub.enabled = cache.frames_skipped or cache.outdated
+ sub.itemO("ptcache.bake", "bake", False, text="Calculate to Current Frame")
+ row = layout.row()
+ row.itemO("ptcache.bake_from_cache", text="Current Cache to Bake")
+ row.itemR(cache, "step");
+
+ row = layout.row()
+ row.itemR(cache, "quick_cache")
+ row.itemR(cache, "disk_cache")
+
+ layout.itemL(text=cache.info)
+
+ layout.itemS()
+
+ row = layout.row()
+ row.itemO("ptcache.bake_all", "bake", True, text="Bake All Dynamics")
+ row.itemO("ptcache.free_bake_all", text="Free All Bakes")
+ layout.itemO("ptcache.bake_all", "bake", False, text="Update All Dynamics to current frame")
+
class PHYSICS_PT_softbody_goal(PhysicButtonsPanel):
__label__ = "Soft Body Goal"
- __default_closed__ = True
def poll(self, context):
return (context.soft_body)
def draw_header(self, context):
+ layout = self.layout
+
softbody = context.soft_body.settings
- self.layout.active = softbody_panel_enabled(context.soft_body)
- self.layout.itemR(softbody, "use_goal", text="")
+ layout.itemR(softbody, "use_goal", text="")
def draw(self, context):
layout = self.layout
md = context.soft_body
- softbody = md.settings
ob = context.object
-
- layout.active = softbody.use_goal and softbody_panel_enabled(md)
split = layout.split()
+
+ if md:
+ softbody = md.settings
+ layout.active = softbody.use_goal
- # Goal
- split = layout.split()
+ # Goal
+ split = layout.split()
- col = split.column()
- col.itemL(text="Goal Strengths:")
- col.itemR(softbody, "goal_default", text="Default")
- sub = col.column(align=True)
- sub.itemR(softbody, "goal_min", text="Minimum")
- sub.itemR(softbody, "goal_max", text="Maximum")
+ col = split.column()
+ col.itemL(text="Goal Strengths:")
+ col.itemR(softbody, "goal_default", text="Default")
+ sub = col.column(align=True)
+ sub.itemR(softbody, "goal_min", text="Minimum")
+ sub.itemR(softbody, "goal_max", text="Maximum")
- col = split.column()
- col.itemL(text="Goal Settings:")
- col.itemR(softbody, "goal_spring", text="Stiffness")
- col.itemR(softbody, "goal_friction", text="Damping")
+ col = split.column()
+ col.itemL(text="Goal Settings:")
+ col.itemR(softbody, "goal_spring", text="Stiffness")
+ col.itemR(softbody, "goal_friction", text="Damping")
- layout.item_pointerR(softbody, "goal_vertex_group", ob, "vertex_groups", text="Vertex Group")
+ layout.item_pointerR(softbody, "goal_vertex_group", ob, "vertex_groups", text="Vertex Group")
class PHYSICS_PT_softbody_edge(PhysicButtonsPanel):
__label__ = "Soft Body Edges"
- __default_closed__ = True
def poll(self, context):
return (context.soft_body)
def draw_header(self, context):
+ layout = self.layout
+
softbody = context.soft_body.settings
- self.layout.active = softbody_panel_enabled(context.soft_body)
- self.layout.itemR(softbody, "use_edges", text="")
+ layout.itemR(softbody, "use_edges", text="")
def draw(self, context):
layout = self.layout
md = context.soft_body
- softbody = md.settings
ob = context.object
-
- layout.active = softbody.use_edges and softbody_panel_enabled(md)
- split = layout.split()
+ if md:
+ softbody = md.settings
+
+ layout.active = softbody.use_edges
- col = split.column()
- col.itemL(text="Springs:")
- col.itemR(softbody, "pull")
- col.itemR(softbody, "push")
- col.itemR(softbody, "damp")
- col.itemR(softbody, "plastic")
- col.itemR(softbody, "bending")
- col.itemR(softbody, "spring_length", text="Length")
-
- col = split.column()
- col.itemR(softbody, "stiff_quads")
- sub = col.column()
- sub.active = softbody.stiff_quads
- sub.itemR(softbody, "shear")
-
- col.itemR(softbody, "new_aero", text="Aero")
- sub = col.column()
- sub.enabled = softbody.new_aero
- sub.itemR(softbody, "aero", text="Factor")
-
- col.itemL(text="Collision:")
- col.itemR(softbody, "edge_collision", text="Edge")
- col.itemR(softbody, "face_collision", text="Face")
+ split = layout.split()
+
+ col = split.column()
+ col.itemL(text="Springs:")
+ col.itemR(softbody, "pull")
+ col.itemR(softbody, "push")
+ col.itemR(softbody, "damp")
+ col.itemR(softbody, "plastic")
+ col.itemR(softbody, "bending")
+ col.itemR(softbody, "spring_length", text="Length")
+
+ col = split.column()
+ col.itemR(softbody, "stiff_quads")
+ sub = col.column()
+ sub.active = softbody.stiff_quads
+ sub.itemR(softbody, "shear")
+
+ col.itemR(softbody, "new_aero", text="Aero")
+ sub = col.column()
+ sub.enabled = softbody.new_aero
+ sub.itemR(softbody, "aero", text="Factor")
+
+ col.itemL(text="Collision:")
+ col.itemR(softbody, "edge_collision", text="Edge")
+ col.itemR(softbody, "face_collision", text="Face")
class PHYSICS_PT_softbody_collision(PhysicButtonsPanel):
__label__ = "Soft Body Collision"
- __default_closed__ = True
def poll(self, context):
return (context.soft_body)
def draw_header(self, context):
+ layout = self.layout
+
softbody = context.soft_body.settings
- self.layout.active = softbody_panel_enabled(context.soft_body)
- self.layout.itemR(softbody, "self_collision", text="")
+ layout.itemR(softbody, "self_collision", text="")
def draw(self, context):
layout = self.layout
md = context.soft_body
- softbody = md.settings
ob = context.object
+
+ if md:
+ softbody = md.settings
- layout.active = softbody.self_collision and softbody_panel_enabled(md)
+ layout.active = softbody.self_collision
- layout.itemL(text="Collision Type:")
- layout.itemR(softbody, "collision_type", expand=True)
+ layout.itemL(text="Collision Type:")
+ layout.itemR(softbody, "collision_type", expand=True)
- col = layout.column(align=True)
- col.itemL(text="Ball:")
- col.itemR(softbody, "ball_size", text="Size")
- col.itemR(softbody, "ball_stiff", text="Stiffness")
- col.itemR(softbody, "ball_damp", text="Dampening")
+ col = layout.column(align=True)
+ col.itemL(text="Ball:")
+ col.itemR(softbody, "ball_size", text="Size")
+ col.itemR(softbody, "ball_stiff", text="Stiffness")
+ col.itemR(softbody, "ball_damp", text="Dampening")
class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
__label__ = "Soft Body Solver"
- __default_closed__ = True
def poll(self, context):
return (context.soft_body)
@@ -200,28 +241,28 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
layout = self.layout
md = context.soft_body
- softbody = md.settings
ob = context.object
+
+ if md:
+ softbody = md.settings
- layout.active = softbody_panel_enabled(md)
-
- # Solver
- split = layout.split()
+ # Solver
+ split = layout.split()
- col = split.column(align=True)
- col.itemL(text="Step Size:")
- col.itemR(softbody, "minstep")
- col.itemR(softbody, "maxstep")
- col.itemR(softbody, "auto_step", text="Auto-Step")
+ col = split.column(align=True)
+ col.itemL(text="Step Size:")
+ col.itemR(softbody, "minstep")
+ col.itemR(softbody, "maxstep")
+ col.itemR(softbody, "auto_step", text="Auto-Step")
- col = split.column()
- col.itemR(softbody, "error_limit")
- col.itemL(text="Helpers:")
- col.itemR(softbody, "choke")
- col.itemR(softbody, "fuzzy")
+ col = split.column()
+ col.itemR(softbody, "error_limit")
+ col.itemL(text="Helpers:")
+ col.itemR(softbody, "choke")
+ col.itemR(softbody, "fuzzy")
- layout.itemL(text="Diagnostics:")
- layout.itemR(softbody, "diagnose")
+ layout.itemL(text="Diagnostics:")
+ layout.itemR(softbody, "diagnose")
bpy.types.register(PHYSICS_PT_softbody)
bpy.types.register(PHYSICS_PT_softbody_cache)
diff --git a/release/ui/buttons_scene.py b/release/ui/buttons_scene.py
index 3c321f11f6e..e9ee97468e8 100644
--- a/release/ui/buttons_scene.py
+++ b/release/ui/buttons_scene.py
@@ -2,8 +2,8 @@
import bpy
class RenderButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "scene"
# COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
@@ -41,8 +41,8 @@ class SCENE_PT_layers(RenderButtonsPanel):
row.template_list(rd, "layers", rd, "active_layer_index", rows=2)
col = row.column(align=True)
- col.itemO("scene.render_layer_add", icon='ICON_ZOOMIN', text="")
- col.itemO("scene.render_layer_remove", icon='ICON_ZOOMOUT', text="")
+ col.itemO("scene.render_layer_add", icon="ICON_ZOOMIN", text="")
+ col.itemO("scene.render_layer_remove", icon="ICON_ZOOMOUT", text="")
rl = rd.layers[rd.active_layer_index]
@@ -103,19 +103,19 @@ class SCENE_PT_layers(RenderButtonsPanel):
col.itemR(rl, "pass_diffuse")
row = col.row()
row.itemR(rl, "pass_specular")
- row.itemR(rl, "pass_specular_exclude", text="", icon='ICON_X')
+ row.itemR(rl, "pass_specular_exclude", text="", icon="ICON_X")
row = col.row()
row.itemR(rl, "pass_shadow")
- row.itemR(rl, "pass_shadow_exclude", text="", icon='ICON_X')
+ row.itemR(rl, "pass_shadow_exclude", text="", icon="ICON_X")
row = col.row()
row.itemR(rl, "pass_ao")
- row.itemR(rl, "pass_ao_exclude", text="", icon='ICON_X')
+ row.itemR(rl, "pass_ao_exclude", text="", icon="ICON_X")
row = col.row()
row.itemR(rl, "pass_reflection")
- row.itemR(rl, "pass_reflection_exclude", text="", icon='ICON_X')
+ row.itemR(rl, "pass_reflection_exclude", text="", icon="ICON_X")
row = col.row()
row.itemR(rl, "pass_refraction")
- row.itemR(rl, "pass_refraction_exclude", text="", icon='ICON_X')
+ row.itemR(rl, "pass_refraction_exclude", text="", icon="ICON_X")
class SCENE_PT_shading(RenderButtonsPanel):
__label__ = "Shading"
@@ -189,27 +189,20 @@ class SCENE_PT_post_processing(RenderButtonsPanel):
col = split.column()
col.itemR(rd, "use_compositing")
col.itemR(rd, "use_sequencer")
-
- col = split.column()
- col.itemR(rd, "dither_intensity", text="Dither", slider=True)
-
- layout.itemS()
-
- split = layout.split()
-
+
col = split.column()
- col.itemR(rd, "fields", text="Fields")
- sub = col.column()
+ row = col.row()
+ row.itemR(rd, "fields", text="Fields")
+ sub = row.row()
sub.active = rd.fields
- sub.row().itemR(rd, "field_order", expand=True)
sub.itemR(rd, "fields_still", text="Still")
-
- col = split.column()
- col.itemR(rd, "edge")
- sub = col.column()
- sub.active = rd.edge
- sub.itemR(rd, "edge_threshold", text="Threshold", slider=True)
- sub.itemR(rd, "edge_color", text="")
+ sub = col.row()
+ sub.active = rd.fields
+ sub.itemR(rd, "field_order", expand=True)
+
+ split = layout.split()
+ split.itemL()
+ split.itemR(rd, "dither_intensity", text="Dither", slider=True)
class SCENE_PT_output(RenderButtonsPanel):
__label__ = "Output"
@@ -229,8 +222,8 @@ class SCENE_PT_output(RenderButtonsPanel):
col = split.column()
col.itemR(rd, "file_extensions")
- col.itemR(rd, "use_overwrite")
- col.itemR(rd, "use_placeholder")
+ col.itemR(rd, "placeholders")
+ col.itemR(rd, "no_overwrite")
if rd.file_format in ('AVIJPEG', 'JPEG'):
split = layout.split()
@@ -330,9 +323,11 @@ class SCENE_PT_antialiasing(RenderButtonsPanel):
COMPAT_ENGINES = set(['BLENDER_RENDER'])
def draw_header(self, context):
+ layout = self.layout
+
rd = context.scene.render_data
- self.layout.itemR(rd, "antialiasing", text="")
+ layout.itemR(rd, "antialiasing", text="")
def draw(self, context):
layout = self.layout
@@ -375,9 +370,9 @@ class SCENE_PT_dimensions(RenderButtonsPanel):
sub.itemR(rd, "pixel_aspect_y", text="Y")
row = col.row()
- row.itemR(rd, "use_border", text="Border")
+ row.itemR(rd, "border", text="Border")
rowsub = row.row()
- rowsub.active = rd.use_border
+ rowsub.active = rd.border
rowsub.itemR(rd, "crop_to_border", text="Crop")
col = split.column(align=True)
@@ -396,9 +391,11 @@ class SCENE_PT_stamp(RenderButtonsPanel):
COMPAT_ENGINES = set(['BLENDER_RENDER'])
def draw_header(self, context):
+ layout = self.layout
+
rd = context.scene.render_data
- self.layout.itemR(rd, "render_stamp", text="")
+ layout.itemR(rd, "render_stamp", text="")
def draw(self, context):
layout = self.layout
diff --git a/release/ui/buttons_texture.py b/release/ui/buttons_texture.py
index 90ce40b4832..29e43981fd2 100644
--- a/release/ui/buttons_texture.py
+++ b/release/ui/buttons_texture.py
@@ -2,8 +2,8 @@
import bpy
class TextureButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "texture"
def poll(self, context):
@@ -210,51 +210,35 @@ class TEXTURE_PT_influence(TextureSlotPanel):
sub.itemR(tex, factor, text=name, slider=True)
if ma:
- if ma.type in ['SURFACE', 'HALO', 'WIRE']:
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Diffuse:")
- factor_but(col, tex.map_diffuse, "map_diffuse", "diffuse_factor", "Intensity")
- factor_but(col, tex.map_colordiff, "map_colordiff", "colordiff_factor", "Color")
- factor_but(col, tex.map_alpha, "map_alpha", "alpha_factor", "Alpha")
- factor_but(col, tex.map_translucency, "map_translucency", "translucency_factor", "Translucency")
-
- col.itemL(text="Specular:")
- factor_but(col, tex.map_specular, "map_specular", "specular_factor", "Intensity")
- factor_but(col, tex.map_colorspec, "map_colorspec", "colorspec_factor", "Color")
- factor_but(col, tex.map_hardness, "map_hardness", "hardness_factor", "Hardness")
-
- col = split.column()
- col.itemL(text="Shading:")
- factor_but(col, tex.map_ambient, "map_ambient", "ambient_factor", "Ambient")
- factor_but(col, tex.map_emit, "map_emit", "emit_factor", "Emit")
- factor_but(col, tex.map_mirror, "map_mirror", "mirror_factor", "Mirror")
- factor_but(col, tex.map_raymir, "map_raymir", "raymir_factor", "Ray Mirror")
-
- col.itemL(text="Geometry:")
- factor_but(col, tex.map_normal, "map_normal", "normal_factor", "Normal")
- factor_but(col, tex.map_warp, "map_warp", "warp_factor", "Warp")
- factor_but(col, tex.map_displacement, "map_displacement", "displacement_factor", "Displace")
-
- #sub = col.column()
- #sub.active = tex.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.itemR(tex, "default_value", text="Amount", slider=True)
- elif ma.type == 'VOLUME':
- split = layout.split()
-
- col = split.column()
- factor_but(col, tex.map_density, "map_density", "density_factor", "Density")
- factor_but(col, tex.map_emission, "map_emission", "emission_factor", "Emission")
- factor_but(col, tex.map_absorption, "map_absorption", "absorption_factor", "Absorption")
- factor_but(col, tex.map_scattering, "map_scattering", "scattering_factor", "Scattering")
-
- col = split.column()
- col.itemL(text=" ")
- factor_but(col, tex.map_alpha, "map_coloremission", "coloremission_factor", "Emission Color")
- factor_but(col, tex.map_colorabsorption, "map_colorabsorption", "colorabsorption_factor", "Absorption Color")
-
+ split = layout.split()
+
+ col = split.column()
+ col.itemL(text="Diffuse:")
+ factor_but(col, tex.map_diffuse, "map_diffuse", "diffuse_factor", "Intensity")
+ factor_but(col, tex.map_colordiff, "map_colordiff", "colordiff_factor", "Color")
+ factor_but(col, tex.map_alpha, "map_alpha", "alpha_factor", "Alpha")
+ factor_but(col, tex.map_translucency, "map_translucency", "translucency_factor", "Translucency")
+
+ col.itemL(text="Specular:")
+ factor_but(col, tex.map_specular, "map_specular", "specular_factor", "Intensity")
+ factor_but(col, tex.map_colorspec, "map_colorspec", "colorspec_factor", "Color")
+ factor_but(col, tex.map_hardness, "map_hardness", "hardness_factor", "Hardness")
+ col = split.column()
+ col.itemL(text="Shading:")
+ factor_but(col, tex.map_ambient, "map_ambient", "ambient_factor", "Ambient")
+ factor_but(col, tex.map_emit, "map_emit", "emit_factor", "Emit")
+ factor_but(col, tex.map_mirror, "map_mirror", "mirror_factor", "Mirror")
+ factor_but(col, tex.map_raymir, "map_raymir", "raymir_factor", "Ray Mirror")
+
+ col.itemL(text="Geometry:")
+ factor_but(col, tex.map_normal, "map_normal", "normal_factor", "Normal")
+ factor_but(col, tex.map_warp, "map_warp", "warp_factor", "Warp")
+ factor_but(col, tex.map_displacement, "map_displacement", "displacement_factor", "Displace")
+
+ #sub = col.column()
+ #sub.active = tex.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.itemR(tex, "default_value", text="Amount", slider=True)
elif la:
row = layout.row()
factor_but(row, tex.map_color, "map_color", "color_factor", "Color")
@@ -609,133 +593,13 @@ class TEXTURE_PT_distortednoise(TextureTypePanel):
layout.itemR(tex, "noise_basis", text="Basis")
flow = layout.column_flow()
- flow.itemR(tex, "distortion", text="Distortion")
+ flow.itemR(tex, "distortion_amount", text="Distortion")
flow.itemR(tex, "noise_size", text="Size")
flow.itemR(tex, "nabla")
-
-class TEXTURE_PT_voxeldata(TextureButtonsPanel):
- __idname__= "TEXTURE_PT_voxeldata"
- __label__ = "Voxel Data"
-
- def poll(self, context):
- tex = context.texture
- return (tex and tex.type == 'VOXEL_DATA')
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
- vd = tex.voxeldata
-
- layout.itemR(vd, "file_format")
- if vd.file_format in ['BLENDER_VOXEL', 'RAW_8BIT']:
- layout.itemR(vd, "source_path")
- if vd.file_format == 'RAW_8BIT':
- layout.itemR(vd, "resolution")
- elif vd.file_format == 'SMOKE':
- layout.itemR(vd, "domain_object")
-
- layout.itemR(vd, "still")
- row = layout.row()
- row.active = vd.still
- row.itemR(vd, "still_frame_number")
-
- layout.itemR(vd, "interpolation")
- layout.itemR(vd, "intensity")
-
-class TEXTURE_PT_pointdensity(TextureButtonsPanel):
- __idname__= "TEXTURE_PT_pointdensity"
- __label__ = "Point Density"
-
- def poll(self, context):
- tex = context.texture
- return (tex and tex.type == 'POINT_DENSITY')
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
- pd = tex.pointdensity
-
- layout.itemR(pd, "point_source", expand=True)
-
- split = layout.split()
-
- col = split.column()
- if pd.point_source == 'PARTICLE_SYSTEM':
- col.itemL(text="Object:")
- col.itemR(pd, "object", text="")
-
- sub = col.column()
- sub.enabled = pd.object
- if pd.object:
- sub.itemL(text="System:")
- sub.item_pointerR(pd, "particle_system", pd.object, "particle_systems", text="")
- sub.itemL(text="Cache:")
- sub.itemR(pd, "particle_cache", text="")
- else:
- col.itemL(text="Object:")
- col.itemR(pd, "object", text="")
- col.itemL(text="Cache:")
- col.itemR(pd, "vertices_cache", text="")
-
- col.itemS()
-
- col.itemL(text="Color Source:")
- col.itemR(pd, "color_source", text="")
- if pd.color_source in ('PARTICLE_SPEED', 'PARTICLE_VELOCITY'):
- col.itemR(pd, "speed_scale")
- if pd.color_source in ('PARTICLE_SPEED', 'PARTICLE_AGE'):
- layout.template_color_ramp(pd.color_ramp, expand=True)
-
- col = split.column()
- col.itemL()
- col.itemR(pd, "radius")
- col.itemL(text="Falloff:")
- col.itemR(pd, "falloff", text="")
- if pd.falloff == 'SOFT':
- col.itemR(pd, "falloff_softness")
-
-class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel):
- __label__ = "Turbulence"
-
- def poll(self, context):
- tex = context.texture
- return (tex and tex.type == 'POINT_DENSITY')
-
- def draw_header(self, context):
- layout = self.layout
-
- tex = context.texture
- pd = tex.pointdensity
-
- layout.itemR(pd, "turbulence", text="")
-
- def draw(self, context):
- layout = self.layout
-
- tex = context.texture
- pd = tex.pointdensity
- layout.active = pd.turbulence
-
- split = layout.split()
-
- col = split.column()
- col.itemL(text="Influence:")
- col.itemR(pd, "turbulence_influence", text="")
- col.itemL(text="Noise Basis:")
- col.itemR(pd, "noise_basis", text="")
-
- col = split.column()
- col.itemL()
- col.itemR(pd, "turbulence_size")
- col.itemR(pd, "turbulence_depth")
- col.itemR(pd, "turbulence_strength")
bpy.types.register(TEXTURE_PT_context_texture)
bpy.types.register(TEXTURE_PT_preview)
-
-bpy.types.register(TEXTURE_PT_clouds) # Texture Type Panels
+bpy.types.register(TEXTURE_PT_clouds)
bpy.types.register(TEXTURE_PT_wood)
bpy.types.register(TEXTURE_PT_marble)
bpy.types.register(TEXTURE_PT_magic)
@@ -749,10 +613,6 @@ bpy.types.register(TEXTURE_PT_envmap)
bpy.types.register(TEXTURE_PT_musgrave)
bpy.types.register(TEXTURE_PT_voronoi)
bpy.types.register(TEXTURE_PT_distortednoise)
-bpy.types.register(TEXTURE_PT_voxeldata)
-bpy.types.register(TEXTURE_PT_pointdensity)
-bpy.types.register(TEXTURE_PT_pointdensity_turbulence)
-
bpy.types.register(TEXTURE_PT_colors)
bpy.types.register(TEXTURE_PT_mapping)
bpy.types.register(TEXTURE_PT_influence)
diff --git a/release/ui/buttons_world.py b/release/ui/buttons_world.py
index b02673d126f..599f45d160b 100644
--- a/release/ui/buttons_world.py
+++ b/release/ui/buttons_world.py
@@ -2,21 +2,24 @@
import bpy
class WorldButtonsPanel(bpy.types.Panel):
- __space_type__ = 'PROPERTIES'
- __region_type__ = 'WINDOW'
+ __space_type__ = "PROPERTIES"
+ __region_type__ = "WINDOW"
__context__ = "world"
# COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
def poll(self, context):
rd = context.scene.render_data
- return (context.world) and (not rd.use_game_engine) and (rd.engine in self.COMPAT_ENGINES)
+ return (context.world != None) and (not rd.use_game_engine) and (rd.engine in self.COMPAT_ENGINES)
class WORLD_PT_preview(WorldButtonsPanel):
__label__ = "Preview"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
def draw(self, context):
- self.layout.template_preview(context.world)
+ layout = self.layout
+ world = context.world
+
+ layout.template_preview(world)
class WORLD_PT_context_world(WorldButtonsPanel):
__show_header__ = False
@@ -49,30 +52,32 @@ class WORLD_PT_world(WorldButtonsPanel):
world = context.world
- row = layout.row()
- row.itemR(world, "paper_sky")
- row.itemR(world, "blend_sky")
- row.itemR(world, "real_sky")
+ if world:
+
+ row = layout.row()
+ row.itemR(world, "paper_sky")
+ row.itemR(world, "blend_sky")
+ row.itemR(world, "real_sky")
- row = layout.row()
- row.column().itemR(world, "horizon_color")
- col = row.column()
- col.itemR(world, "zenith_color")
- col.active = world.blend_sky
- row.column().itemR(world, "ambient_color")
+ row = layout.row()
+ row.column().itemR(world, "horizon_color")
+ col = row.column()
+ col.itemR(world, "zenith_color")
+ col.active = world.blend_sky
+ row.column().itemR(world, "ambient_color")
class WORLD_PT_mist(WorldButtonsPanel):
__label__ = "Mist"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
def draw_header(self, context):
+ layout = self.layout
world = context.world
- self.layout.itemR(world.mist, "enabled", text="")
+ layout.itemR(world.mist, "enabled", text="")
def draw(self, context):
layout = self.layout
-
world = context.world
layout.active = world.mist.enabled
@@ -82,6 +87,7 @@ class WORLD_PT_mist(WorldButtonsPanel):
flow.itemR(world.mist, "start")
flow.itemR(world.mist, "depth")
flow.itemR(world.mist, "height")
+
layout.itemR(world.mist, "falloff")
@@ -90,13 +96,13 @@ class WORLD_PT_stars(WorldButtonsPanel):
COMPAT_ENGINES = set(['BLENDER_RENDER'])
def draw_header(self, context):
+ layout = self.layout
world = context.world
- self.layout.itemR(world.stars, "enabled", text="")
+ layout.itemR(world.stars, "enabled", text="")
def draw(self, context):
layout = self.layout
-
world = context.world
layout.active = world.stars.enabled
@@ -112,13 +118,13 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
COMPAT_ENGINES = set(['BLENDER_RENDER'])
def draw_header(self, context):
+ layout = self.layout
world = context.world
- self.layout.itemR(world.ambient_occlusion, "enabled", text="")
+ layout.itemR(world.ambient_occlusion, "enabled", text="")
def draw(self, context):
layout = self.layout
-
ao = context.world.ambient_occlusion
layout.active = ao.enabled
@@ -180,3 +186,4 @@ bpy.types.register(WORLD_PT_world)
bpy.types.register(WORLD_PT_ambient_occlusion)
bpy.types.register(WORLD_PT_mist)
bpy.types.register(WORLD_PT_stars)
+
diff --git a/release/ui/space_buttons.py b/release/ui/space_buttons.py
index aa89c06ea08..3cf782e615f 100644
--- a/release/ui/space_buttons.py
+++ b/release/ui/space_buttons.py
@@ -2,7 +2,7 @@
import bpy
class Buttons_HT_header(bpy.types.Header):
- __space_type__ = 'PROPERTIES'
+ __space_type__ = "PROPERTIES"
def draw(self, context):
layout = self.layout
@@ -22,7 +22,7 @@ class Buttons_HT_header(bpy.types.Header):
row.itemR(scene, "current_frame")
class Buttons_MT_view(bpy.types.Menu):
- __space_type__ = 'PROPERTIES'
+ __space_type__ = "PROPERTIES"
__label__ = "View"
def draw(self, context):
diff --git a/release/ui/space_console.py b/release/ui/space_console.py
index 136082a285a..45cb2a856e1 100644
--- a/release/ui/space_console.py
+++ b/release/ui/space_console.py
@@ -5,7 +5,7 @@ import bpy_ops # XXX - should not need to do this
del bpy_ops
class CONSOLE_HT_header(bpy.types.Header):
- __space_type__ = 'CONSOLE'
+ __space_type__ = "CONSOLE"
def draw(self, context):
sc = context.space_data
@@ -39,7 +39,7 @@ class CONSOLE_HT_header(bpy.types.Header):
row.itemO("console.report_replay")
class CONSOLE_MT_console(bpy.types.Menu):
- __space_type__ = 'CONSOLE'
+ __space_type__ = "CONSOLE"
__label__ = "Console"
def draw(self, context):
@@ -52,7 +52,7 @@ class CONSOLE_MT_console(bpy.types.Menu):
layout.itemO("console.paste")
class CONSOLE_MT_report(bpy.types.Menu):
- __space_type__ = 'CONSOLE'
+ __space_type__ = "CONSOLE"
__label__ = "Report"
def draw(self, context):
@@ -108,9 +108,9 @@ def get_console(console_id):
class CONSOLE_OT_exec(bpy.types.Operator):
'''
- Execute the current console line as a python expression.
+ Operator documentatuon text, will be used for the operator tooltip and python docs.
'''
- __idname__ = "console.execute"
+ __idname__ = "console.exec"
__label__ = "Console Execute"
__register__ = False
@@ -385,7 +385,7 @@ def autocomp(bcon):
class CONSOLE_OT_autocomplete(bpy.types.Operator):
'''
- Evaluate the namespace up until the cursor and give a list of options or complete the name if there is only one.
+ Operator documentatuon text, will be used for the operator tooltip and python docs.
'''
__idname__ = "console.autocomplete"
__label__ = "Console Autocomplete"
diff --git a/release/ui/space_filebrowser.py b/release/ui/space_filebrowser.py
index f1ea5555787..51a8f3f78e8 100644
--- a/release/ui/space_filebrowser.py
+++ b/release/ui/space_filebrowser.py
@@ -1,15 +1,15 @@
import bpy
+
class FILEBROWSER_HT_header(bpy.types.Header):
- __space_type__ = 'FILE_BROWSER'
+ __space_type__ = "FILE_BROWSER"
def draw(self, context):
+ st = context.space_data
layout = self.layout
- st = context.space_data
params = st.params
-
layout.template_header(menus=False)
row = layout.row(align=True)
@@ -39,4 +39,5 @@ class FILEBROWSER_HT_header(bpy.types.Header):
row.active = params.do_filter
+
bpy.types.register(FILEBROWSER_HT_header)
diff --git a/release/ui/space_image.py b/release/ui/space_image.py
index 3f82727da47..090067120b1 100644
--- a/release/ui/space_image.py
+++ b/release/ui/space_image.py
@@ -2,19 +2,18 @@
import bpy
class IMAGE_MT_view(bpy.types.Menu):
- __space_type__ = 'IMAGE_EDITOR'
+ __space_type__ = "IMAGE_EDITOR"
__label__ = "View"
def draw(self, context):
layout = self.layout
-
sima = context.space_data
uv = sima.uv_editor
settings = context.tool_settings
show_uvedit = sima.show_uvedit
- layout.itemO("image.properties", icon='ICON_MENU_PANEL')
+ layout.itemO("image.properties", icon="ICON_MENU_PANEL")
layout.itemS()
@@ -44,7 +43,7 @@ class IMAGE_MT_view(bpy.types.Menu):
layout.itemO("screen.screen_full_area")
class IMAGE_MT_select(bpy.types.Menu):
- __space_type__ = 'IMAGE_EDITOR'
+ __space_type__ = "IMAGE_EDITOR"
__label__ = "Select"
def draw(self, context):
@@ -65,12 +64,11 @@ class IMAGE_MT_select(bpy.types.Menu):
layout.itemO("uv.select_linked")
class IMAGE_MT_image(bpy.types.Menu):
- __space_type__ = 'IMAGE_EDITOR'
+ __space_type__ = "IMAGE_EDITOR"
__label__ = "Image"
def draw(self, context):
layout = self.layout
-
sima = context.space_data
ima = sima.image
@@ -87,7 +85,7 @@ class IMAGE_MT_image(bpy.types.Menu):
layout.itemO("image.save")
layout.itemO("image.save_as")
- if ima.source == 'SEQUENCE':
+ if ima.source == "SEQUENCE":
layout.itemO("image.save_sequence")
if not show_render:
@@ -101,7 +99,7 @@ class IMAGE_MT_image(bpy.types.Menu):
# only for dirty && specific image types, perhaps
# this could be done in operator poll too
if ima.dirty:
- if ima.source in ('FILE', 'GENERATED') and ima.type != 'MULTILAYER':
+ if ima.source in ("FILE", "GENERATED") and ima.type != "MULTILAYER":
layout.item_booleanO("image.pack", "as_png", True, text="Pack As PNG")
layout.itemS()
@@ -109,7 +107,7 @@ class IMAGE_MT_image(bpy.types.Menu):
layout.itemR(sima, "image_painting")
class IMAGE_MT_uvs_showhide(bpy.types.Menu):
- __space_type__ = 'IMAGE_EDITOR'
+ __space_type__ = "IMAGE_EDITOR"
__label__ = "Show/Hide Faces"
def draw(self, context):
@@ -120,7 +118,7 @@ class IMAGE_MT_uvs_showhide(bpy.types.Menu):
layout.item_booleanO("uv.hide", "unselected", True)
class IMAGE_MT_uvs_transform(bpy.types.Menu):
- __space_type__ = 'IMAGE_EDITOR'
+ __space_type__ = "IMAGE_EDITOR"
__label__ = "Transform"
def draw(self, context):
@@ -131,7 +129,7 @@ class IMAGE_MT_uvs_transform(bpy.types.Menu):
layout.item_enumO("tfm.transform", "mode", 'RESIZE')
class IMAGE_MT_uvs_mirror(bpy.types.Menu):
- __space_type__ = 'IMAGE_EDITOR'
+ __space_type__ = "IMAGE_EDITOR"
__label__ = "Mirror"
def draw(self, context):
@@ -141,7 +139,7 @@ class IMAGE_MT_uvs_mirror(bpy.types.Menu):
layout.item_enumO("uv.mirror", "axis", 'MIRROR_Y') # "Y Axis", M,
class IMAGE_MT_uvs_weldalign(bpy.types.Menu):
- __space_type__ = 'IMAGE_EDITOR'
+ __space_type__ = "IMAGE_EDITOR"
__label__ = "Weld/Align"
def draw(self, context):
@@ -150,13 +148,13 @@ class IMAGE_MT_uvs_weldalign(bpy.types.Menu):
layout.itemO("uv.weld") # W, 1
layout.items_enumO("uv.align", "axis") # W, 2/3/4
+
class IMAGE_MT_uvs(bpy.types.Menu):
- __space_type__ = 'IMAGE_EDITOR'
+ __space_type__ = "IMAGE_EDITOR"
__label__ = "UVs"
def draw(self, context):
layout = self.layout
-
sima = context.space_data
uv = sima.uv_editor
settings = context.tool_settings
@@ -194,14 +192,13 @@ class IMAGE_MT_uvs(bpy.types.Menu):
layout.itemM("IMAGE_MT_uvs_showhide")
class IMAGE_HT_header(bpy.types.Header):
- __space_type__ = 'IMAGE_EDITOR'
+ __space_type__ = "IMAGE_EDITOR"
def draw(self, context):
- layout = self.layout
-
sima = context.space_data
ima = sima.image
iuser = sima.image_user
+ layout = self.layout
settings = context.tool_settings
show_render = sima.show_render
@@ -250,7 +247,7 @@ class IMAGE_HT_header(bpy.types.Header):
"""
mesh = context.edit_object.data
- row.item_pointerR(mesh, "active_uv_layer", mesh, "uv_textures")
+ row.item_pointerR(mesh, "active_uv_layer", mesh, "uv_layers")
"""
if ima:
@@ -265,17 +262,17 @@ class IMAGE_HT_header(bpy.types.Header):
row.itemR(sima, "draw_channels", text="", expand=True)
row = layout.row(align=True)
- if ima.type == 'COMPOSITE':
- row.itemO("image.record_composite", icon='ICON_REC')
- if ima.type == 'COMPOSITE' and ima.source in ('MOVIE', 'SEQUENCE'):
- row.itemO("image.play_composite", icon='ICON_PLAY')
+ if ima.type == "COMPOSITE":
+ row.itemO("image.record_composite", icon="ICON_REC")
+ if ima.type == "COMPOSITE" and ima.source in ("MOVIE", "SEQUENCE"):
+ row.itemO("image.play_composite", icon="ICON_PLAY")
if show_uvedit or sima.image_painting:
layout.itemR(sima, "update_automatically", text="")
class IMAGE_PT_game_properties(bpy.types.Panel):
- __space_type__ = 'IMAGE_EDITOR'
- __region_type__ = 'UI'
+ __space_type__ = "IMAGE_EDITOR"
+ __region_type__ = "UI"
__label__ = "Game Properties"
def poll(self, context):
@@ -284,48 +281,52 @@ class IMAGE_PT_game_properties(bpy.types.Panel):
return (sima and sima.image) and (rd.engine == 'BLENDER_GAME')
def draw(self, context):
- layout = self.layout
-
sima = context.space_data
+ layout = self.layout
+
ima = sima.image
- split = layout.split()
+ if ima:
+ split = layout.split()
- col = split.column()
- col.itemR(ima, "clamp_x")
- col.itemR(ima, "clamp_y")
- col.itemR(ima, "mapping", expand=True)
- col.itemR(ima, "tiles")
+ col = split.column()
- col = split.column()
+ subcol = col.column(align=True)
+ subcol.itemR(ima, "clamp_x")
+ subcol.itemR(ima, "clamp_y")
+
+ col.itemR(ima, "mapping", expand=True)
+ col.itemR(ima, "tiles")
+
+ col = split.column()
- sub = col.column(align=True)
- sub.itemR(ima, "animated")
+ subcol = col.column(align=True)
+ subcol.itemR(ima, "animated")
- subsub = sub.column()
- subsub.active = ima.animated
- subsub.itemR(ima, "animation_start", text="Start")
- subsub.itemR(ima, "animation_end", text="End")
- subsub.itemR(ima, "animation_speed", text="Speed")
+ subcol = subcol.column()
+ subcol.itemR(ima, "animation_start", text="Start")
+ subcol.itemR(ima, "animation_end", text="End")
+ subcol.itemR(ima, "animation_speed", text="Speed")
+ subcol.active = ima.animated
- sub = col.row(align=True)
- sub.active = ima.tiles or ima.animated
- sub.itemR(ima, "tiles_x", text="X")
- sub.itemR(ima, "tiles_y", text="Y")
+ subrow = col.row(align=True)
+ subrow.itemR(ima, "tiles_x", text="X")
+ subrow.itemR(ima, "tiles_y", text="Y")
+ subrow.active = ima.tiles or ima.animated
class IMAGE_PT_view_properties(bpy.types.Panel):
- __space_type__ = 'IMAGE_EDITOR'
- __region_type__ = 'UI'
- __label__ = "Display"
+ __space_type__ = "IMAGE_EDITOR"
+ __region_type__ = "UI"
+ __label__ = "View Properties"
def poll(self, context):
sima = context.space_data
return (sima and (sima.image or sima.show_uvedit))
def draw(self, context):
- layout = self.layout
-
sima = context.space_data
+ layout = self.layout
+
ima = sima.image
show_uvedit = sima.show_uvedit
uvedit = sima.uv_editor
@@ -334,33 +335,26 @@ class IMAGE_PT_view_properties(bpy.types.Panel):
col = split.column()
if ima:
- col.itemR(ima, "display_aspect", text="Aspect Ratio")
+ col.itemR(ima, "display_aspect")
col = split.column()
- col.itemL(text="Coordinates:")
col.itemR(sima, "draw_repeated", text="Repeat")
if show_uvedit:
col.itemR(uvedit, "normalized_coordinates", text="Normalized")
elif show_uvedit:
- col.itemL(text="Coordinates:")
col.itemR(uvedit, "normalized_coordinates", text="Normalized")
if show_uvedit:
col = layout.column()
row = col.row()
row.itemR(uvedit, "edge_draw_type", expand=True)
-
- split = layout.split()
+ row = col.row()
+ row.itemR(uvedit, "draw_smooth_edges", text="Smooth")
+ row.itemR(uvedit, "draw_modified_edges", text="Modified")
- col = split.column()
- col.itemR(uvedit, "draw_stretch", text="Stretch")
- sub = col.column()
- sub.active = uvedit.draw_stretch
- sub.row().itemR(uvedit, "draw_stretch_type", expand=True)
-
- col = split.column()
- col.itemR(uvedit, "draw_smooth_edges", text="Smooth")
- col.itemR(uvedit, "draw_modified_edges", text="Modified")
+ row = col.row()
+ row.itemR(uvedit, "draw_stretch", text="Stretch")
+ row.itemR(uvedit, "draw_stretch_type", text="")
#col.itemR(uvedit, "draw_edges")
#col.itemR(uvedit, "draw_faces")
@@ -375,3 +369,4 @@ bpy.types.register(IMAGE_MT_uvs)
bpy.types.register(IMAGE_HT_header)
bpy.types.register(IMAGE_PT_game_properties)
bpy.types.register(IMAGE_PT_view_properties)
+
diff --git a/release/ui/space_info.py b/release/ui/space_info.py
index e6cc4af2a06..bfe051b8df2 100644
--- a/release/ui/space_info.py
+++ b/release/ui/space_info.py
@@ -2,14 +2,13 @@
import bpy
class INFO_HT_header(bpy.types.Header):
- __space_type__ = 'INFO'
+ __space_type__ = "INFO"
def draw(self, context):
layout = self.layout
st = context.space_data
- scene = context.scene
- rd = scene.render_data
+ rd = context.scene.render_data
row = layout.row(align=True)
row.template_header()
@@ -34,11 +33,9 @@ class INFO_HT_header(bpy.types.Header):
layout.template_operator_search()
layout.template_running_jobs()
-
- layout.itemL(text=scene.statistics())
class INFO_MT_file(bpy.types.Menu):
- __space_type__ = 'INFO'
+ __space_type__ = "INFO"
__label__ = "File"
def draw(self, context):
@@ -74,7 +71,7 @@ class INFO_MT_file(bpy.types.Menu):
layout.itemO("wm.exit_blender", text="Quit")
class INFO_MT_file_import(bpy.types.Menu):
- __space_type__ = 'INFO'
+ __space_type__ = "INFO"
__label__ = "Import"
def draw(self, context):
@@ -83,7 +80,7 @@ class INFO_MT_file_import(bpy.types.Menu):
layout.itemO("import.obj", text="OBJ")
class INFO_MT_file_export(bpy.types.Menu):
- __space_type__ = 'INFO'
+ __space_type__ = "INFO"
__label__ = "Export"
def draw(self, context):
@@ -96,7 +93,7 @@ class INFO_MT_file_export(bpy.types.Menu):
layout.itemO("export.x3d", text="X3D")
class INFO_MT_file_external_data(bpy.types.Menu):
- __space_type__ = 'INFO'
+ __space_type__ = "INFO"
__label__ = "External Data"
def draw(self, context):
@@ -113,7 +110,7 @@ class INFO_MT_file_external_data(bpy.types.Menu):
layout.itemO("file.find_missing_files")
class INFO_MT_add(bpy.types.Menu):
- __space_type__ = 'INFO'
+ __space_type__ = "INFO"
__label__ = "Add"
def draw(self, context):
@@ -121,25 +118,25 @@ class INFO_MT_add(bpy.types.Menu):
layout.operator_context = "EXEC_SCREEN"
- layout.item_menu_enumO("object.mesh_add", "type", text="Mesh", icon='ICON_OUTLINER_OB_MESH')
- layout.item_menu_enumO("object.curve_add", "type", text="Curve", icon='ICON_OUTLINER_OB_CURVE')
- layout.item_menu_enumO("object.surface_add", "type", text="Surface", icon='ICON_OUTLINER_OB_SURFACE')
- layout.item_menu_enumO("object.metaball_add", "type", 'META', icon='ICON_OUTLINER_OB_META')
- layout.itemO("object.text_add", text="Text", icon='ICON_OUTLINER_OB_FONT')
+ layout.item_menu_enumO( "OBJECT_OT_mesh_add", "type", text="Mesh", icon='ICON_OUTLINER_OB_MESH')
+ layout.item_menu_enumO( "OBJECT_OT_curve_add", "type", text="Curve", icon='ICON_OUTLINER_OB_CURVE')
+ layout.item_menu_enumO( "OBJECT_OT_surface_add", "type", text="Surface", icon='ICON_OUTLINER_OB_SURFACE')
+ layout.item_menu_enumO( "OBJECT_OT_metaball_add", "type", 'META', icon='ICON_OUTLINER_OB_META')
+ layout.itemO("OBJECT_OT_text_add", text="Text", icon='ICON_OUTLINER_OB_FONT')
layout.itemS()
- layout.itemO("object.armature_add", text="Armature", icon='ICON_OUTLINER_OB_ARMATURE')
- layout.item_enumO("object.add", "type", 'LATTICE', icon='ICON_OUTLINER_OB_LATTICE')
- layout.item_enumO("object.add", "type", 'EMPTY', icon='ICON_OUTLINER_OB_EMPTY')
+ layout.itemO("OBJECT_OT_armature_add", text="Armature", icon='ICON_OUTLINER_OB_ARMATURE')
+ layout.item_enumO("OBJECT_OT_object_add", "type", 'LATTICE', icon='ICON_OUTLINER_OB_LATTICE')
+ layout.item_enumO("OBJECT_OT_object_add", "type", 'EMPTY', icon='ICON_OUTLINER_OB_EMPTY')
layout.itemS()
- layout.item_enumO("object.add", "type", 'CAMERA', icon='ICON_OUTLINER_OB_CAMERA')
- layout.item_enumO("object.add", "type", 'LAMP', icon='ICON_OUTLINER_OB_LAMP')
+ layout.item_enumO("OBJECT_OT_object_add", "type", 'CAMERA', icon='ICON_OUTLINER_OB_CAMERA')
+ layout.item_enumO("OBJECT_OT_object_add", "type", 'LAMP', icon='ICON_OUTLINER_OB_LAMP')
class INFO_MT_game(bpy.types.Menu):
- __space_type__ = 'INFO'
+ __space_type__ = "INFO"
__label__ = "Game"
def draw(self, context):
@@ -157,7 +154,7 @@ class INFO_MT_game(bpy.types.Menu):
layout.itemR(gs, "deprecation_warnings")
class INFO_MT_render(bpy.types.Menu):
- __space_type__ = 'INFO'
+ __space_type__ = "INFO"
__label__ = "Render"
def draw(self, context):
@@ -173,7 +170,7 @@ class INFO_MT_render(bpy.types.Menu):
layout.itemO("screen.render_view_show")
class INFO_MT_help(bpy.types.Menu):
- __space_type__ = 'INFO'
+ __space_type__ = "INFO"
__label__ = "Help"
def draw(self, context):
diff --git a/release/ui/space_logic.py b/release/ui/space_logic.py
index 5748d15a53a..728e5e6307b 100644
--- a/release/ui/space_logic.py
+++ b/release/ui/space_logic.py
@@ -1,8 +1,8 @@
import bpy
class LOGIC_PT_properties(bpy.types.Panel):
- __space_type__ = 'LOGIC_EDITOR'
- __region_type__ = 'UI'
+ __space_type__ = "LOGIC_EDITOR"
+ __region_type__ = "UI"
__label__ = "Properties"
def poll(self, context):
@@ -11,19 +11,15 @@ class LOGIC_PT_properties(bpy.types.Panel):
def draw(self, context):
layout = self.layout
-
ob = context.active_object
game = ob.game
- layout.itemO("object.game_property_new", text="Add Game Property")
-
- for i, prop in enumerate(game.properties):
-
- row = layout.row(align=True)
- row.itemR(prop, "name", text="")
- row.itemR(prop, "type", text="")
- row.itemR(prop, "value", text="", toggle=True) # we dont care about the type. rna will display correctly
- row.itemR(prop, "debug", text="", toggle=True, icon='ICON_INFO')
- row.item_intO("object.game_property_remove", "index", i, text="", icon='ICON_X')
-
+ for prop in game.properties:
+ flow = layout.row()
+ flow.itemR(prop, "name", text="")
+ flow.itemR(prop, "type", text="")
+ flow.itemR(prop, "value", text="") # we dont care about the type. rna will display correctly
+ flow.itemR(prop, "debug")
+
bpy.types.register(LOGIC_PT_properties)
+
diff --git a/release/ui/space_node.py b/release/ui/space_node.py
index 6ac1ac84f35..2e28cfc2eed 100644
--- a/release/ui/space_node.py
+++ b/release/ui/space_node.py
@@ -2,11 +2,10 @@
import bpy
class NODE_HT_header(bpy.types.Header):
- __space_type__ = 'NODE_EDITOR'
+ __space_type__ = "NODE_EDITOR"
def draw(self, context):
layout = self.layout
-
snode = context.space_data
row = layout.row(align=True)
@@ -28,7 +27,7 @@ class NODE_HT_header(bpy.types.Header):
if ob:
layout.template_ID(ob, "active_material", new="material.new")
if id:
- layout.itemR(id, "use_nodes")
+ layout.itemR(id, "use_nodes", toggle=True)
elif snode.tree_type == 'TEXTURE':
row.itemR(snode, "texture_type", text="", expand=True)
@@ -38,17 +37,17 @@ class NODE_HT_header(bpy.types.Header):
if id_from:
layout.template_ID(id_from, "active_texture", new="texture.new")
if id:
- layout.itemR(id, "use_nodes")
+ layout.itemR(id, "use_nodes", toggle=True)
elif snode.tree_type == 'COMPOSITING':
id = snode.id
- layout.itemR(id, "use_nodes")
- layout.itemR(id.render_data, "free_unused_nodes", text="Free Unused")
- layout.itemR(snode, "backdrop")
+ layout.itemR(id, "use_nodes", toggle=True)
+ layout.itemR(id.render_data, "free_unused_nodes", text="Free Unused", toggle=True)
+ layout.itemR(snode, "backdrop", toggle=True)
class NODE_MT_view(bpy.types.Menu):
- __space_type__ = 'NODE_EDITOR'
+ __space_type__ = "NODE_EDITOR"
__label__ = "View"
def draw(self, context):
@@ -66,7 +65,7 @@ class NODE_MT_view(bpy.types.Menu):
layout.itemO("screen.screen_full_area")
class NODE_MT_select(bpy.types.Menu):
- __space_type__ = 'NODE_EDITOR'
+ __space_type__ = "NODE_EDITOR"
__label__ = "Select"
def draw(self, context):
@@ -81,7 +80,7 @@ class NODE_MT_select(bpy.types.Menu):
# layout.itemO("node.select_linked_to")
class NODE_MT_node(bpy.types.Menu):
- __space_type__ = 'NODE_EDITOR'
+ __space_type__ = "NODE_EDITOR"
__label__ = "Node"
def draw(self, context):
@@ -114,7 +113,9 @@ class NODE_MT_node(bpy.types.Menu):
# layout.itemS()
# layout.itemO("node.show_cyclic_dependencies")
+
bpy.types.register(NODE_HT_header)
bpy.types.register(NODE_MT_view)
bpy.types.register(NODE_MT_select)
bpy.types.register(NODE_MT_node)
+
diff --git a/release/ui/space_outliner.py b/release/ui/space_outliner.py
index 522b620e29d..f55f4633a7b 100644
--- a/release/ui/space_outliner.py
+++ b/release/ui/space_outliner.py
@@ -2,7 +2,7 @@
import bpy
class OUTLINER_HT_header(bpy.types.Header):
- __space_type__ = 'OUTLINER'
+ __space_type__ = "OUTLINER"
def draw(self, context):
so = context.space_data
@@ -36,7 +36,7 @@ class OUTLINER_HT_header(bpy.types.Header):
class OUTLINER_MT_view(bpy.types.Menu):
- __space_type__ = 'OUTLINER'
+ __space_type__ = "OUTLINER"
__label__ = "View"
def draw(self, context):
diff --git a/release/ui/space_sequencer.py b/release/ui/space_sequencer.py
index daae4a83ec4..1edcf32d3b5 100644
--- a/release/ui/space_sequencer.py
+++ b/release/ui/space_sequencer.py
@@ -7,7 +7,7 @@ def act_strip(context):
# Header
class SEQUENCER_HT_header(bpy.types.Header):
- __space_type__ = 'SEQUENCE_EDITOR'
+ __space_type__ = "SEQUENCE_EDITOR"
def draw(self, context):
layout = self.layout
@@ -38,7 +38,7 @@ class SEQUENCER_HT_header(bpy.types.Header):
layout.itemR(st, "display_channel", text="Channel")
class SEQUENCER_MT_view(bpy.types.Menu):
- __space_type__ = 'SEQUENCE_EDITOR'
+ __space_type__ = "SEQUENCE_EDITOR"
__label__ = "View"
def draw(self, context):
@@ -106,7 +106,7 @@ class SEQUENCER_MT_view(bpy.types.Menu):
"""
class SEQUENCER_MT_select(bpy.types.Menu):
- __space_type__ = 'SEQUENCE_EDITOR'
+ __space_type__ = "SEQUENCE_EDITOR"
__label__ = "Select"
def draw(self, context):
@@ -127,7 +127,7 @@ class SEQUENCER_MT_select(bpy.types.Menu):
layout.itemO("sequencer.select_inverse")
class SEQUENCER_MT_marker(bpy.types.Menu):
- __space_type__ = 'SEQUENCE_EDITOR'
+ __space_type__ = "SEQUENCE_EDITOR"
__label__ = "Marker (TODO)"
def draw(self, context):
@@ -146,7 +146,7 @@ class SEQUENCER_MT_marker(bpy.types.Menu):
#layout.itemO("sequencer.sound_strip_add", text="Transform Markers") # toggle, will be rna - (sseq->flag & SEQ_MARKER_TRANS)
class SEQUENCER_MT_add(bpy.types.Menu):
- __space_type__ = 'SEQUENCE_EDITOR'
+ __space_type__ = "SEQUENCE_EDITOR"
__label__ = "Add"
def draw(self, context):
@@ -163,7 +163,7 @@ class SEQUENCER_MT_add(bpy.types.Menu):
layout.itemM("SEQUENCER_MT_add_effect")
class SEQUENCER_MT_add_effect(bpy.types.Menu):
- __space_type__ = 'SEQUENCE_EDITOR'
+ __space_type__ = "SEQUENCE_EDITOR"
__label__ = "Effect Strip..."
def draw(self, context):
@@ -187,7 +187,7 @@ class SEQUENCER_MT_add_effect(bpy.types.Menu):
layout.item_enumO("sequencer.effect_strip_add", 'type', 'SPEED')
class SEQUENCER_MT_strip(bpy.types.Menu):
- __space_type__ = 'SEQUENCE_EDITOR'
+ __space_type__ = "SEQUENCE_EDITOR"
__label__ = "Strip"
def draw(self, context):
@@ -254,15 +254,15 @@ class SEQUENCER_MT_strip(bpy.types.Menu):
# Panels
class SequencerButtonsPanel(bpy.types.Panel):
- __space_type__ = 'SEQUENCE_EDITOR'
- __region_type__ = 'UI'
+ __space_type__ = "SEQUENCE_EDITOR"
+ __region_type__ = "UI"
def poll(self, context):
return context.space_data.display_mode == 'SEQUENCER' and act_strip(context) != None
class SequencerButtonsPanel_Output(bpy.types.Panel):
- __space_type__ = 'SEQUENCE_EDITOR'
- __region_type__ = 'UI'
+ __space_type__ = "SEQUENCE_EDITOR"
+ __region_type__ = "UI"
def poll(self, context):
return context.space_data.display_mode != 'SEQUENCER'
@@ -303,7 +303,6 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel):
row.itemR(strip, "frame_locked", text="Frame Lock")
col = layout.column()
- col.enabled = not strip.lock
col.itemR(strip, "channel")
col.itemR(strip, "start_frame")
col.itemR(strip, "length")
@@ -416,28 +415,23 @@ class SEQUENCER_PT_input(SequencerButtonsPanel):
if not strip:
return False
- return strip.type in ('MOVIE', 'IMAGE')
+ return strip.type in ('MOVIE', 'IMAGE', 'SOUND')
def draw(self, context):
layout = self.layout
strip = act_strip(context)
- split = layout.split(percentage=0.2)
- col = split.column()
- col.itemL(text="Path:")
- col = split.column()
- col.itemR(strip, "directory", text="")
+ layout.itemR(strip, "directory", text="")
# Current element for the filename
-
+ split = layout.split(percentage=0.3)
+ col = split.column()
+ col.itemL(text="File Name:")
+ col = split.column()
elem = strip.getStripElem(context.scene.current_frame)
if elem:
- split = layout.split(percentage=0.2)
- col = split.column()
- col.itemL(text="File:")
- col = split.column()
col.itemR(elem, "filename", text="") # strip.elements[0] could be a fallback
layout.itemR(strip, "use_translation", text="Image Offset:")
@@ -461,37 +455,6 @@ class SEQUENCER_PT_input(SequencerButtonsPanel):
col.itemR(strip, "animation_start_offset", text="Start")
col.itemR(strip, "animation_end_offset", text="End")
-class SEQUENCER_PT_sound(SequencerButtonsPanel):
- __label__ = "Sound"
-
- def poll(self, context):
- if context.space_data.display_mode != 'SEQUENCER':
- return False
-
- strip = act_strip(context)
- if not strip:
- return False
-
- return strip.type in ('SOUND', )
-
- def draw(self, context):
- layout = self.layout
-
- strip = act_strip(context)
-
- layout.template_ID(strip, "sound", new="sound.open")
-
- layout.itemS()
- layout.itemR(strip.sound, "filename", text="")
-
- row = layout.row()
- if strip.sound.packed_file:
- row.itemO("sound.unpack", icon='ICON_PACKAGE', text="Unpack")
- else:
- row.itemO("sound.pack", icon='ICON_UGLYPACKAGE', text="Pack")
-
- row.itemR(strip.sound, "caching")
-
class SEQUENCER_PT_filter(SequencerButtonsPanel):
__label__ = "Filter"
@@ -595,7 +558,6 @@ bpy.types.register(SEQUENCER_MT_strip)
bpy.types.register(SEQUENCER_PT_edit) # sequencer panels
bpy.types.register(SEQUENCER_PT_effect)
bpy.types.register(SEQUENCER_PT_input)
-bpy.types.register(SEQUENCER_PT_sound)
bpy.types.register(SEQUENCER_PT_filter)
bpy.types.register(SEQUENCER_PT_proxy)
diff --git a/release/ui/space_text.py b/release/ui/space_text.py
index 117033c50a1..61e8d3489a5 100644
--- a/release/ui/space_text.py
+++ b/release/ui/space_text.py
@@ -2,13 +2,12 @@
import bpy
class TEXT_HT_header(bpy.types.Header):
- __space_type__ = 'TEXT_EDITOR'
+ __space_type__ = "TEXT_EDITOR"
def draw(self, context):
- layout = self.layout
-
st = context.space_data
text = st.text
+ layout = self.layout
row = layout.row(align=True)
row.template_header()
@@ -46,14 +45,13 @@ class TEXT_HT_header(bpy.types.Header):
row.itemL(text="Text: Internal")
class TEXT_PT_properties(bpy.types.Panel):
- __space_type__ = 'TEXT_EDITOR'
- __region_type__ = 'UI'
+ __space_type__ = "TEXT_EDITOR"
+ __region_type__ = "UI"
__label__ = "Properties"
def draw(self, context):
- layout = self.layout
-
st = context.space_data
+ layout = self.layout
flow = layout.column_flow()
flow.itemR(st, "line_numbers")
@@ -66,14 +64,13 @@ class TEXT_PT_properties(bpy.types.Panel):
flow.itemR(st, "tab_width")
class TEXT_PT_find(bpy.types.Panel):
- __space_type__ = 'TEXT_EDITOR'
- __region_type__ = 'UI'
+ __space_type__ = "TEXT_EDITOR"
+ __region_type__ = "UI"
__label__ = "Find"
def draw(self, context):
- layout = self.layout
-
st = context.space_data
+ layout = self.layout
# find
col = layout.column(align=True)
@@ -98,12 +95,11 @@ class TEXT_PT_find(bpy.types.Panel):
row.itemR(st, "find_all", text="All")
class TEXT_MT_text(bpy.types.Menu):
- __space_type__ = 'TEXT_EDITOR'
+ __space_type__ = "TEXT_EDITOR"
__label__ = "Text"
def draw(self, context):
layout = self.layout
-
st = context.space_data
text = st.text
@@ -131,7 +127,7 @@ class TEXT_MT_text(bpy.types.Menu):
layout.itemS()
- layout.itemO("text.properties", icon='ICON_MENU_PANEL')
+ layout.itemO("text.properties", icon="ICON_MENU_PANEL")
#ifndef DISABLE_PYTHON
# XXX layout.column()
@@ -140,7 +136,7 @@ class TEXT_MT_text(bpy.types.Menu):
#endif
class TEXT_MT_edit_view(bpy.types.Menu):
- __space_type__ = 'TEXT_EDITOR'
+ __space_type__ = "TEXT_EDITOR"
__label__ = "View"
def draw(self, context):
@@ -150,7 +146,7 @@ class TEXT_MT_edit_view(bpy.types.Menu):
layout.item_enumO("text.move", "type", 'FILE_BOTTOM', text="Bottom of File")
class TEXT_MT_edit_select(bpy.types.Menu):
- __space_type__ = 'TEXT_EDITOR'
+ __space_type__ = "TEXT_EDITOR"
__label__ = "Select"
def draw(self, context):
@@ -160,7 +156,7 @@ class TEXT_MT_edit_select(bpy.types.Menu):
layout.itemO("text.select_line")
class TEXT_MT_edit_markers(bpy.types.Menu):
- __space_type__ = 'TEXT_EDITOR'
+ __space_type__ = "TEXT_EDITOR"
__label__ = "Markers"
def draw(self, context):
@@ -171,7 +167,7 @@ class TEXT_MT_edit_markers(bpy.types.Menu):
layout.itemO("text.previous_marker")
class TEXT_MT_format(bpy.types.Menu):
- __space_type__ = 'TEXT_EDITOR'
+ __space_type__ = "TEXT_EDITOR"
__label__ = "Format"
def draw(self, context):
@@ -190,7 +186,7 @@ class TEXT_MT_format(bpy.types.Menu):
layout.item_menu_enumO("text.convert_whitespace", "type")
class TEXT_MT_edit_to3d(bpy.types.Menu):
- __space_type__ = 'TEXT_EDITOR'
+ __space_type__ = "TEXT_EDITOR"
__label__ = "Text To 3D Object"
def draw(self, context):
@@ -200,11 +196,12 @@ class TEXT_MT_edit_to3d(bpy.types.Menu):
layout.item_booleanO("text.to_3d_object", "split_lines", True, text="One Object Per Line");
class TEXT_MT_edit(bpy.types.Menu):
- __space_type__ = 'TEXT_EDITOR'
+ __space_type__ = "TEXT_EDITOR"
__label__ = "Edit"
def poll(self, context):
- return (context.space_data.text)
+ st = context.space_data
+ return st.text != None
def draw(self, context):
layout = self.layout
@@ -243,3 +240,4 @@ bpy.types.register(TEXT_MT_edit_view)
bpy.types.register(TEXT_MT_edit_select)
bpy.types.register(TEXT_MT_edit_markers)
bpy.types.register(TEXT_MT_edit_to3d)
+
diff --git a/release/ui/space_time.py b/release/ui/space_time.py
index bb82eea3272..d1c9f9806f3 100644
--- a/release/ui/space_time.py
+++ b/release/ui/space_time.py
@@ -2,7 +2,7 @@
import bpy
class TIME_HT_header(bpy.types.Header):
- __space_type__ = 'TIMELINE'
+ __space_type__ = "TIMELINE"
def draw(self, context):
layout = self.layout
@@ -22,7 +22,7 @@ class TIME_HT_header(bpy.types.Header):
sub.itemM("TIME_MT_frame")
sub.itemM("TIME_MT_playback")
- layout.itemR(scene, "use_preview_range", text="PR")
+ layout.itemR(scene, "use_preview_range", text="PR", toggle=True)
row = layout.row(align=True)
if not scene.use_preview_range:
@@ -33,8 +33,6 @@ class TIME_HT_header(bpy.types.Header):
row.itemR(scene, "preview_range_end_frame", text="End")
layout.itemR(scene, "current_frame", text="")
-
- layout.itemS()
row = layout.row(align=True)
row.item_booleanO("screen.frame_jump", "end", False, text="", icon='ICON_REW')
@@ -49,23 +47,28 @@ class TIME_HT_header(bpy.types.Header):
row.item_booleanO("screen.keyframe_jump", "next", True, text="", icon='ICON_NEXT_KEYFRAME')
row.item_booleanO("screen.frame_jump", "end", True, text="", icon='ICON_FF')
+ layout.itemR(rd, "sync_audio", text="", toggle=True, icon='ICON_SPEAKER')
+
+ layout.itemS()
+
row = layout.row(align=True)
row.itemR(tools, "enable_auto_key", text="", toggle=True, icon='ICON_REC')
+ sub = row.row()
+ sub.active = tools.enable_auto_key
+ sub.itemR(tools, "autokey_mode", text="")
if screen.animation_playing and tools.enable_auto_key:
subsub = row.row()
subsub.itemR(tools, "record_with_nla", toggle=True)
-
- layout.itemR(rd, "sync_audio", text="", toggle=True, icon='ICON_SPEAKER')
layout.itemS()
row = layout.row(align=True)
- row.item_pointerR(scene, "active_keying_set", scene, "keying_sets", text="")
- row.itemO("anim.insert_keyframe", text="", icon='ICON_KEY_HLT')
- row.itemO("anim.delete_keyframe", text="", icon='ICON_KEY_DEHLT')
+ row.itemR(scene, "active_keying_set", text="")
+ row.itemO("anim.insert_keyframe", text="", icon="ICON_KEY_HLT")
+ row.itemO("anim.delete_keyframe", text="", icon="ICON_KEY_DEHLT")
class TIME_MT_view(bpy.types.Menu):
- __space_type__ = 'TIMELINE'
+ __space_type__ = "TIMELINE"
__label__ = "View"
def draw(self, context):
@@ -80,12 +83,11 @@ class TIME_MT_view(bpy.types.Menu):
layout.itemR(st, "only_selected")
class TIME_MT_frame(bpy.types.Menu):
- __space_type__ = 'TIMELINE'
+ __space_type__ = "TIMELINE"
__label__ = "Frame"
def draw(self, context):
layout = self.layout
- tools = context.tool_settings
layout.itemO("marker.add", text="Add Marker")
layout.itemO("marker.duplicate", text="Duplicate Marker")
@@ -97,22 +99,15 @@ class TIME_MT_frame(bpy.types.Menu):
layout.itemO("time.start_frame_set")
layout.itemO("time.end_frame_set")
-
- layout.itemS()
-
- sub = layout.row()
- sub.active = tools.enable_auto_key
- sub.itemM("TIME_MT_autokey")
class TIME_MT_playback(bpy.types.Menu):
- __space_type__ = 'TIMELINE'
+ __space_type__ = "TIMELINE"
__label__ = "Playback"
def draw(self, context):
layout = self.layout
st = context.space_data
- rd = context.scene.render_data
layout.itemR(st, "play_top_left")
layout.itemR(st, "play_all_3d")
@@ -120,32 +115,10 @@ class TIME_MT_playback(bpy.types.Menu):
layout.itemR(st, "play_buttons")
layout.itemR(st, "play_image")
layout.itemR(st, "play_sequencer")
-
layout.itemS()
-
layout.itemR(st, "continue_physics")
-
- layout.itemS()
-
- layout.itemR(rd, "sync_audio", icon='ICON_SPEAKER')
-
-
-
-class TIME_MT_autokey(bpy.types.Menu):
- __space_type__ = 'TIMELINE'
- __label__ = "Auto-Keyframing Mode"
-
- def draw(self, context):
- layout = self.layout
- tools = context.tool_settings
-
- layout.active = tools.enable_auto_key
-
- layout.item_enumR(tools, "autokey_mode", 'ADD_REPLACE_KEYS')
- layout.item_enumR(tools, "autokey_mode", 'REPLACE_KEYS')
bpy.types.register(TIME_HT_header)
bpy.types.register(TIME_MT_view)
bpy.types.register(TIME_MT_frame)
-bpy.types.register(TIME_MT_autokey)
bpy.types.register(TIME_MT_playback)
diff --git a/release/ui/space_userpref.py b/release/ui/space_userpref.py
index 1e7a9b581d4..95054efcb25 100644
--- a/release/ui/space_userpref.py
+++ b/release/ui/space_userpref.py
@@ -2,26 +2,21 @@
import bpy
class USERPREF_HT_header(bpy.types.Header):
- __space_type__ = 'USER_PREFERENCES'
+ __space_type__ = "USER_PREFERENCES"
def draw(self, context):
layout = self.layout
layout.template_header(menus=False)
-
- userpref = context.user_preferences
-
- layout.operator_context = "EXEC_AREA"
- layout.itemO("wm.save_homefile", text="Save As Default")
class USERPREF_MT_view(bpy.types.Menu):
- __space_type__ = 'USER_PREFERENCES'
+ __space_type__ = "USER_PREFERENCES"
__label__ = "View"
def draw(self, context):
layout = self.layout
class USERPREF_PT_tabs(bpy.types.Panel):
- __space_type__ = 'USER_PREFERENCES'
+ __space_type__ = "USER_PREFERENCES"
__show_header__ = False
def draw(self, context):
@@ -32,7 +27,7 @@ class USERPREF_PT_tabs(bpy.types.Panel):
layout.itemR(userpref, "active_section", expand=True)
class USERPREF_PT_view(bpy.types.Panel):
- __space_type__ = 'USER_PREFERENCES'
+ __space_type__ = "USER_PREFERENCES"
__label__ = "View"
__show_header__ = False
@@ -64,11 +59,11 @@ class USERPREF_PT_view(bpy.types.Panel):
sub1.itemS()
sub1.itemS()
sub1.itemS()
- sub1.itemR(view, "show_mini_axis", text="Display Mini Axis")
+ sub1.itemR(view, "show_mini_axis")
sub2 = sub1.column()
sub2.enabled = view.show_mini_axis
- sub2.itemR(view, "mini_axis_size", text="Size")
- sub2.itemR(view, "mini_axis_brightness", text="Brightness")
+ sub2.itemR(view, "mini_axis_size")
+ sub2.itemR(view, "mini_axis_brightness")
col = split.column()
sub = col.split(percentage=0.85)
@@ -135,7 +130,7 @@ class USERPREF_PT_view(bpy.types.Panel):
sub1.itemR(view, "open_right_mouse_delay", text="Hold RMB")
class USERPREF_PT_edit(bpy.types.Panel):
- __space_type__ = 'USER_PREFERENCES'
+ __space_type__ = "USER_PREFERENCES"
__label__ = "Edit"
__show_header__ = False
@@ -230,10 +225,9 @@ class USERPREF_PT_edit(bpy.types.Panel):
sub1.itemR(edit, "duplicate_texture", text="Texture")
sub1.itemR(edit, "duplicate_ipo", text="F-Curve")
sub1.itemR(edit, "duplicate_action", text="Action")
- sub1.itemR(edit, "duplicate_particle", text="Particle")
class USERPREF_PT_system(bpy.types.Panel):
- __space_type__ = 'USER_PREFERENCES'
+ __space_type__ = "USER_PREFERENCES"
__label__ = "System"
__show_header__ = False
@@ -314,7 +308,7 @@ class USERPREF_PT_system(bpy.types.Panel):
sub1.itemR(system, "texture_collection_rate", text="Collection Rate")
class USERPREF_PT_filepaths(bpy.types.Panel):
- __space_type__ = 'USER_PREFERENCES'
+ __space_type__ = "USER_PREFERENCES"
__label__ = "File Paths"
__show_header__ = False
@@ -365,9 +359,6 @@ class USERPREF_PT_filepaths(bpy.types.Panel):
sub2.itemL(text="Save & Load:")
sub2.itemR(paths, "use_relative_paths")
sub2.itemR(paths, "compress_file")
- sub2.itemR(paths, "load_ui")
- sub2.itemS()
- sub2.itemS()
sub2.itemL(text="Auto Save:")
sub2.itemR(paths, "save_version")
sub2.itemR(paths, "recent_files")
@@ -375,10 +366,10 @@ class USERPREF_PT_filepaths(bpy.types.Panel):
sub2.itemR(paths, "auto_save_temporary_files")
sub3 = sub2.column()
sub3.enabled = paths.auto_save_temporary_files
- sub3.itemR(paths, "auto_save_time", text="Timer (mins)")
+ sub3.itemR(paths, "auto_save_time")
class USERPREF_PT_language(bpy.types.Panel):
- __space_type__ = 'USER_PREFERENCES'
+ __space_type__ = "USER_PREFERENCES"
__label__ = "Language"
__show_header__ = False
@@ -396,16 +387,24 @@ class USERPREF_PT_language(bpy.types.Panel):
col = split.column()
col.itemR(lan, "language")
- col.itemL(text="Translate:")
- col.itemR(lan, "translate_tooltips", text="Tooltips")
- col.itemR(lan, "translate_buttons", text="Labels")
- col.itemR(lan, "translate_toolbox", text="Toolbox")
- col.itemS()
- col.itemS()
+ col.itemR(lan, "translate_tooltips")
+ col.itemR(lan, "translate_buttons")
+ col.itemR(lan, "translate_toolbox")
col.itemR(lan, "use_textured_fonts")
- col = split.column()
-
+class USERPREF_PT_bottombar(bpy.types.Panel):
+ __space_type__ = "USER_PREFERENCES"
+ __label__ = " "
+ __show_header__ = False
+
+ def draw(self, context):
+ layout = self.layout
+ userpref = context.user_preferences
+
+ split = layout.split(percentage=0.8)
+ split.itemL(text="")
+ layout.operator_context = "EXEC_AREA"
+ split.itemO("wm.save_homefile", text="Save As Default")
bpy.types.register(USERPREF_HT_header)
bpy.types.register(USERPREF_MT_view)
@@ -415,4 +414,5 @@ bpy.types.register(USERPREF_PT_edit)
bpy.types.register(USERPREF_PT_system)
bpy.types.register(USERPREF_PT_filepaths)
bpy.types.register(USERPREF_PT_language)
+bpy.types.register(USERPREF_PT_bottombar)
diff --git a/release/ui/space_view3d.py b/release/ui/space_view3d.py
index bc133cbff48..44b1c82ff46 100644
--- a/release/ui/space_view3d.py
+++ b/release/ui/space_view3d.py
@@ -4,7 +4,7 @@ import bpy
# ********** Header **********
class VIEW3D_HT_header(bpy.types.Header):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
def draw(self, context):
layout = self.layout
@@ -12,7 +12,6 @@ class VIEW3D_HT_header(bpy.types.Header):
view = context.space_data
mode_string = context.mode
edit_object = context.edit_object
- object = context.active_object
row = layout.row(align=True)
row.template_header()
@@ -24,63 +23,32 @@ class VIEW3D_HT_header(bpy.types.Header):
sub.itemM("VIEW3D_MT_view")
# Select Menu
- if mode_string not in ('EDIT_TEXT', 'SCULPT', 'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'):
+ if mode_string not in ('EDIT_TEXT', 'SCULPT', 'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE', 'PARTICLE'):
+ # XXX: Particle Mode has Select Menu.
sub.itemM("VIEW3D_MT_select_%s" % mode_string)
- if edit_object:
+ if mode_string == 'OBJECT':
+ sub.itemM("VIEW3D_MT_object")
+ elif mode_string == 'SCULPT':
+ sub.itemM("VIEW3D_MT_sculpt")
+ elif edit_object:
sub.itemM("VIEW3D_MT_edit_%s" % edit_object.type)
- elif object:
- ob_mode_string = object.mode
-
- if mode_string not in ['PAINT_WEIGHT', 'PAINT_TEXTURE']:
- sub.itemM("VIEW3D_MT_%s" % mode_string)
layout.template_header_3D()
# ********** Menu **********
-# ********** Utilities **********
-
-class VIEW3D_MT_showhide(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Show/Hide"
- _operator_name = ""
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("%s.reveal" % self._operator_name, text="Show Hidden")
- layout.itemO("%s.hide" % self._operator_name, text="Hide Selected")
- layout.item_booleanO("%s.hide" % self._operator_name, "unselected", True, text="Hide Unselected")
-
-class VIEW3D_MT_snap(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Snap"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("view3d.snap_selected_to_grid", text="Selection to Grid")
- layout.itemO("view3d.snap_selected_to_cursor", text="Selection to Cursor")
- layout.itemO("view3d.snap_selected_to_center", text="Selection to Center")
-
- layout.itemS()
-
- layout.itemO("view3d.snap_cursor_to_selected", text="Cursor to Selected")
- layout.itemO("view3d.snap_cursor_to_grid", text="Cursor to Grid")
- layout.itemO("view3d.snap_cursor_to_active", text="Cursor to Active")
-
# ********** View menus **********
class VIEW3D_MT_view(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "View"
def draw(self, context):
layout = self.layout
- layout.itemO("view3d.properties", icon='ICON_MENU_PANEL')
- layout.itemO("view3d.toolbar", icon='ICON_MENU_PANEL')
+ layout.itemO("view3d.properties", icon="ICON_MENU_PANEL")
+ layout.itemO("view3d.toolbar", icon="ICON_MENU_PANEL")
layout.itemS()
@@ -89,23 +57,32 @@ class VIEW3D_MT_view(bpy.types.Menu):
layout.item_enumO("view3d.viewnumpad", "type", 'FRONT')
layout.item_enumO("view3d.viewnumpad", "type", 'RIGHT')
- layout.itemM("VIEW3D_MT_view_cameras", text="Cameras")
+ # layout.itemM("VIEW3D_MT_view_cameras", text="Cameras")
layout.itemS()
-
+
layout.itemO("view3d.view_persportho")
layout.itemS()
+ # layout.itemO("view3d.view_show_all_layers")
+
+ # layout.itemS()
+
+ # layout.itemO("view3d.view_local_view")
+ # layout.itemO("view3d.view_global_view")
+
+ # layout.itemS()
+
layout.itemM("VIEW3D_MT_view_navigation")
- layout.itemM("VIEW3D_MT_view_align")
+ # layout.itemM("VIEW3D_MT_view_align", text="Align View")
layout.itemS()
layout.operator_context = "INVOKE_REGION_WIN"
-
- layout.itemO("view3d.clip_border", text="Clipping Border...")
- layout.itemO("view3d.zoom_border", text="Zoom Border...")
+
+ layout.itemO("view3d.clip_border")
+ layout.itemO("view3d.zoom_border")
layout.itemS()
@@ -116,14 +93,17 @@ class VIEW3D_MT_view(bpy.types.Menu):
layout.itemO("screen.region_foursplit", text="Toggle Quad View")
layout.itemO("screen.screen_full_area", text="Toggle Full Screen")
-
+
class VIEW3D_MT_view_navigation(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Navigation"
def draw(self, context):
layout = self.layout
+ # layout.itemO("view3d.view_fly_mode")
+ # layout.itemS()
+
layout.items_enumO("view3d.view_orbit", "type")
layout.itemS()
@@ -135,26 +115,10 @@ class VIEW3D_MT_view_navigation(bpy.types.Menu):
layout.item_floatO("view3d.zoom", "delta", 1.0, text="Zoom In")
layout.item_floatO("view3d.zoom", "delta", -1.0, text="Zoom Out")
-class VIEW3D_MT_view_align(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Align View"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("view3d.view_center")
-
-class VIEW3D_MT_view_cameras(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Cameras"
-
- def draw(self, context):
- layout = self.layout
-
# ********** Select menus, suffix from context.mode **********
class VIEW3D_MT_select_OBJECT(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Select"
def draw(self, context):
@@ -167,26 +131,24 @@ class VIEW3D_MT_select_OBJECT(bpy.types.Menu):
layout.itemO("object.select_all_toggle", text="Select/Deselect All")
layout.itemO("object.select_inverse", text="Inverse")
layout.itemO("object.select_random", text="Random")
- layout.itemO("object.select_mirror", text="Mirror")
layout.itemO("object.select_by_layer", text="Select All by Layer")
- layout.item_enumO("object.select_by_type", "type", "", text="Select All by Type...")
- layout.itemO("object.select_grouped", text="Select Grouped...")
+ layout.item_enumO("object.select_by_type", "type", "", text="Select All by Type")
+ layout.itemO("object.select_grouped", text="Select Grouped")
class VIEW3D_MT_select_POSE(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Select"
def draw(self, context):
layout = self.layout
- layout.itemO("view3d.select_border", text="Border Select...")
+ layout.itemO("view3d.select_border")
layout.itemS()
layout.itemO("pose.select_all_toggle", text="Select/Deselect All")
layout.itemO("pose.select_inverse", text="Inverse")
layout.itemO("pose.select_constraint_target", text="Constraint Target")
- layout.itemO("pose.select_linked", text="Linked")
layout.itemS()
@@ -195,16 +157,10 @@ class VIEW3D_MT_select_POSE(bpy.types.Menu):
layout.itemS()
- props = layout.itemO("pose.select_hierarchy", properties=True, text="Extend Parent")
- props.extend = True
- props.direction = 'PARENT'
-
- props = layout.itemO("pose.select_hierarchy", properties=True, text="Extend Child")
- props.extend = True
- props.direction = 'CHILD'
+ layout.view3d_select_posemenu()
class VIEW3D_MT_select_PARTICLE(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Select"
def draw(self, context):
@@ -219,17 +175,20 @@ class VIEW3D_MT_select_PARTICLE(bpy.types.Menu):
layout.itemS()
+ #layout.itemO("particle.select_last")
+ #layout.itemO("particle.select_first")
+
layout.itemO("particle.select_more")
layout.itemO("particle.select_less")
class VIEW3D_MT_select_EDIT_MESH(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Select"
def draw(self, context):
layout = self.layout
- layout.itemO("view3d.select_border", text="Border Select...")
+ layout.itemO("view3d.select_border")
layout.itemS()
@@ -267,14 +226,14 @@ class VIEW3D_MT_select_EDIT_MESH(bpy.types.Menu):
layout.itemO("mesh.region_to_loop")
class VIEW3D_MT_select_EDIT_CURVE(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Select"
def draw(self, context):
layout = self.layout
- layout.itemO("view3d.select_border", text="Border Select...")
- layout.itemO("view3d.select_circle", text="Circle Select...")
+ layout.itemO("view3d.select_border")
+ layout.itemO("view3d.select_circle")
layout.itemS()
@@ -296,14 +255,14 @@ class VIEW3D_MT_select_EDIT_CURVE(bpy.types.Menu):
layout.itemO("curve.select_less")
class VIEW3D_MT_select_EDIT_SURFACE(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Select"
def draw(self, context):
layout = self.layout
- layout.itemO("view3d.select_border", text="Border Select...")
- layout.itemO("view3d.select_circle", text="Circle Select...")
+ layout.itemO("view3d.select_border")
+ layout.itemO("view3d.select_circle")
layout.itemS()
@@ -322,7 +281,7 @@ class VIEW3D_MT_select_EDIT_SURFACE(bpy.types.Menu):
layout.itemO("curve.select_less")
class VIEW3D_MT_select_EDIT_METABALL(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Select"
def draw(self, context):
@@ -332,15 +291,15 @@ class VIEW3D_MT_select_EDIT_METABALL(bpy.types.Menu):
layout.itemS()
- layout.itemO("mball.select_deselect_all_metaelems")
- layout.itemO("mball.select_inverse_metaelems")
+ layout.itemL(text="Select/Deselect All")
+ layout.itemL(text="Inverse")
layout.itemS()
- layout.itemO("mball.select_random_metaelems")
+ layout.itemL(text="Random")
class VIEW3D_MT_select_EDIT_LATTICE(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Select"
def draw(self, context):
@@ -353,13 +312,13 @@ class VIEW3D_MT_select_EDIT_LATTICE(bpy.types.Menu):
layout.itemO("lattice.select_all_toggle", text="Select/Deselect All")
class VIEW3D_MT_select_EDIT_ARMATURE(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Select"
def draw(self, context):
layout = self.layout
- layout.itemO("view3d.select_border", text="Border Select...")
+ layout.itemO("view3d.select_border")
layout.itemS()
@@ -368,21 +327,15 @@ class VIEW3D_MT_select_EDIT_ARMATURE(bpy.types.Menu):
layout.itemS()
- layout.item_enumO("armature.select_hierarchy", "direction", 'PARENT', text="Parent")
- layout.item_enumO("armature.select_hierarchy", "direction", 'CHILD', text="Child")
+ layout.item_enumO("armature.select_hierarchy", "direction", 'PARENT')
+ layout.item_enumO("armature.select_hierarchy", "direction", 'CHILD')
layout.itemS()
- props = layout.itemO("armature.select_hierarchy", properties=True, text="Extend Parent")
- props.extend = True
- props.direction = 'PARENT'
-
- props = layout.itemO("armature.select_hierarchy", properties=True, text="Extend Child")
- props.extend = True
- props.direction = 'CHILD'
+ layout.view3d_select_armaturemenu()
class VIEW3D_MT_select_FACE(bpy.types.Menu):# XXX no matching enum
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Select"
def draw(self, context):
@@ -392,35 +345,35 @@ class VIEW3D_MT_select_FACE(bpy.types.Menu):# XXX no matching enum
# ********** Object menu **********
-class VIEW3D_MT_OBJECT(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+class VIEW3D_MT_object(bpy.types.Menu):
+ __space_type__ = "VIEW_3D"
__context__ = "objectmode"
__label__ = "Object"
def draw(self, context):
layout = self.layout
- layout.itemM("VIEW3D_MT_OBJECT_clear")
- layout.itemM("VIEW3D_MT_snap")
+ layout.itemM("VIEW3D_MT_object_clear")
+ layout.itemM("VIEW3D_MT_object_snap")
layout.itemS()
- layout.itemO("anim.insert_keyframe_menu", text="Insert Keyframe...")
- layout.itemO("anim.delete_keyframe_v3d", text="Delete Keyframe...")
+ layout.itemO("anim.insert_keyframe_menu")
+ layout.itemO("anim.delete_keyframe_v3d")
layout.itemS()
layout.itemO("object.duplicate")
layout.item_booleanO("object.duplicate", "linked", True, text="Duplicate Linked")
- layout.itemO("object.delete", text="Delete...")
- layout.itemO("object.proxy_make", text="Make Proxy...")
+ layout.itemO("object.delete")
+ layout.itemO("object.proxy_make")
layout.itemS()
- layout.itemM("VIEW3D_MT_OBJECT_parent")
- layout.itemM("VIEW3D_MT_OBJECT_track")
- layout.itemM("VIEW3D_MT_OBJECT_group")
- layout.itemM("VIEW3D_MT_OBJECT_constraints")
+ layout.itemM("VIEW3D_MT_object_parent")
+ layout.itemM("VIEW3D_MT_object_track")
+ layout.itemM("VIEW3D_MT_object_group")
+ layout.itemM("VIEW3D_MT_object_constraints")
layout.itemS()
@@ -428,42 +381,59 @@ class VIEW3D_MT_OBJECT(bpy.types.Menu):
layout.itemS()
- layout.itemM("VIEW3D_MT_OBJECT_showhide")
+ layout.itemM("VIEW3D_MT_object_show")
-class VIEW3D_MT_OBJECT_clear(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+class VIEW3D_MT_object_clear(bpy.types.Menu):
+ __space_type__ = "VIEW_3D"
__label__ = "Clear"
def draw(self, context):
layout = self.layout
- layout.itemO("object.location_clear", text="Location")
- layout.itemO("object.rotation_clear", text="Rotation")
- layout.itemO("object.scale_clear", text="Scale")
- layout.itemO("object.origin_clear", text="Origin")
+ layout.itemO("object.location_clear")
+ layout.itemO("object.rotation_clear")
+ layout.itemO("object.scale_clear")
+ layout.itemO("object.origin_clear")
+
+class VIEW3D_MT_object_snap(bpy.types.Menu):
+ __space_type__ = "VIEW_3D"
+ __label__ = "Snap"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.itemO("view3d.snap_selected_to_grid")
+ layout.itemO("view3d.snap_selected_to_cursor")
+ layout.itemO("view3d.snap_selected_to_center")
+
+ layout.itemS()
+
+ layout.itemO("view3d.snap_cursor_to_selected")
+ layout.itemO("view3d.snap_cursor_to_grid")
+ layout.itemO("view3d.snap_cursor_to_active")
-class VIEW3D_MT_OBJECT_parent(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+class VIEW3D_MT_object_parent(bpy.types.Menu):
+ __space_type__ = "VIEW_3D"
__label__ = "Parent"
def draw(self, context):
layout = self.layout
- layout.itemO("object.parent_set", text="Set")
- layout.itemO("object.parent_clear", text="Clear")
+ layout.itemO("object.parent_set")
+ layout.itemO("object.parent_clear")
-class VIEW3D_MT_OBJECT_track(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+class VIEW3D_MT_object_track(bpy.types.Menu):
+ __space_type__ = "VIEW_3D"
__label__ = "Track"
def draw(self, context):
layout = self.layout
- layout.itemO("object.track_set", text="Set")
- layout.itemO("object.track_clear", text="Clear")
+ layout.itemO("object.track_set")
+ layout.itemO("object.track_clear")
-class VIEW3D_MT_OBJECT_group(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+class VIEW3D_MT_object_group(bpy.types.Menu):
+ __space_type__ = "VIEW_3D"
__label__ = "Group"
def draw(self, context):
@@ -477,8 +447,8 @@ class VIEW3D_MT_OBJECT_group(bpy.types.Menu):
layout.itemO("group.objects_add_active")
layout.itemO("group.objects_remove_active")
-class VIEW3D_MT_OBJECT_constraints(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+class VIEW3D_MT_object_constraints(bpy.types.Menu):
+ __space_type__ = "VIEW_3D"
__label__ = "Constraints"
def draw(self, context):
@@ -487,36 +457,21 @@ class VIEW3D_MT_OBJECT_constraints(bpy.types.Menu):
layout.itemO("object.constraint_add_with_targets")
layout.itemO("object.constraints_clear")
-class VIEW3D_MT_OBJECT_showhide(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+class VIEW3D_MT_object_show(bpy.types.Menu):
+ __space_type__ = "VIEW_3D"
__label__ = "Show/Hide"
def draw(self, context):
layout = self.layout
- layout.itemO("object.restrictview_clear", text="Show Hidden")
- layout.itemO("object.restrictview_set", text="Hide Selected")
+ layout.itemO("object.restrictview_clear")
+ layout.itemO("object.restrictview_set")
layout.item_booleanO("object.restrictview_set", "unselected", True, text="Hide Unselected")
-# ********** Vertex paint menu **********
-
-class VIEW3D_MT_PAINT_VERTEX(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Paint"
-
- def draw(self, context):
- layout = self.layout
-
- sculpt = context.tool_settings.sculpt
-
- layout.itemO("paint.vertex_color_set")
- props = layout.itemO("paint.vertex_color_set", text="Set Selected Vertex Colors", properties=True)
- props.selected = True
-
# ********** Sculpt menu **********
-class VIEW3D_MT_SCULPT(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+class VIEW3D_MT_sculpt(bpy.types.Menu):
+ __space_type__ = "VIEW_3D"
__label__ = "Sculpt"
def draw(self, context):
@@ -549,181 +504,28 @@ class VIEW3D_MT_SCULPT(bpy.types.Menu):
layout.itemR(brush, "persistent")
layout.itemO("sculpt.set_persistent_base")
-# ********** Particle menu **********
-
-class VIEW3D_MT_PARTICLE(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Particle"
-
- def draw(self, context):
- layout = self.layout
-
- particle_edit = context.tool_settings.particle_edit
-
- layout.itemO("particle.mirror")
-
- layout.itemS()
-
- layout.itemO("particle.remove_doubles")
- layout.itemO("particle.delete")
-
- if particle_edit.selection_mode == 'POINT':
- layout.itemO("particle.subdivide")
-
- layout.itemO("particle.rekey")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_PARTICLE_showhide")
-
-class VIEW3D_MT_PARTICLE_showhide(VIEW3D_MT_showhide):
- _operator_name = "particle"
-
-# ********** Pose Menu **********
-
-class VIEW3D_MT_POSE(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Pose"
-
- def draw(self, context):
- layout = self.layout
-
- arm = context.active_object.data
-
- if arm.drawtype in ('BBONE', 'ENVELOPE'):
- layout.item_enumO("tfm.transform", "mode", 'BONESIZE', text="Scale Envelope Distance")
-
- layout.itemM("VIEW3D_MT_POSE_transform")
-
- layout.itemS()
-
- layout.itemO("anim.insert_keyframe_menu", text="Insert Keyframe...")
- layout.itemO("anim.delete_keyframe_v3d", text="Delete Keyframe...")
-
- layout.itemS()
-
- layout.itemO("pose.apply")
-
- layout.itemS()
-
- layout.itemO("pose.copy")
- layout.itemO("pose.paste")
- layout.item_booleanO("pose.paste", "flipped", True, text="Paste X-Flipped Pose")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_POSE_pose")
- layout.itemM("VIEW3D_MT_POSE_motion")
- layout.itemM("VIEW3D_MT_POSE_group")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_POSE_ik")
- layout.itemM("VIEW3D_MT_POSE_constraints")
-
- layout.itemS()
-
- layout.operator_context = "EXEC_AREA"
- layout.item_enumO("pose.autoside_names", "axis", 'XAXIS', text="AutoName Left/Right")
- layout.item_enumO("pose.autoside_names", "axis", 'YAXIS', text="AutoName Front/Back")
- layout.item_enumO("pose.autoside_names", "axis", 'ZAXIS', text="AutoName Top/Bottom")
-
- layout.itemO("pose.flip_names")
-
- layout.itemS()
-
- layout.operator_context = "INVOKE_AREA"
- layout.itemO("pose.armature_layers", text="Change Armature Layers...")
- layout.itemO("pose.bone_layers", text="Change Bone Layers...")
-
- layout.itemS()
-
- layout.itemM("VIEW3D_MT_POSE_showhide")
- layout.item_menu_enumO("pose.flags_set", 'mode', text="Bone Settings")
-
-class VIEW3D_MT_POSE_transform(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Clear Transform"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemL(text="User Transform")
-
- layout.itemO("pose.loc_clear", text="Location")
- layout.itemO("pose.rot_clear", text="Rotation")
- layout.itemO("pose.scale_clear", text="Scale")
-
- layout.itemL(text="Origin")
-
-class VIEW3D_MT_POSE_pose(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Pose Library"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("poselib.browse_interactive", text="Browse Poses...")
-
- layout.itemS()
-
- layout.itemO("poselib.pose_add", text="Add Pose...")
- layout.itemO("poselib.pose_rename", text="Rename Pose...")
- layout.itemO("poselib.pose_remove", text="Remove Pose...")
+# ********** Edit Menus, suffix from ob.type **********
-class VIEW3D_MT_POSE_motion(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Motion Paths"
+class VIEW3D_MT_edit_snap(bpy.types.Menu):
+ __space_type__ = "VIEW_3D"
+ __label__ = "Snap"
def draw(self, context):
layout = self.layout
- layout.itemO("pose.paths_calculate", text="Calculate")
- layout.itemO("pose.paths_clear", text="Clear")
-
-class VIEW3D_MT_POSE_group(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Bone Groups"
-
- def draw(self, context):
- layout = self.layout
- layout.itemO("pose.group_add")
- layout.itemO("pose.group_remove")
+ layout.itemO("view3d.snap_selected_to_grid")
+ layout.itemO("view3d.snap_selected_to_cursor")
+ layout.itemO("view3d.snap_selected_to_center")
layout.itemS()
- layout.itemO("pose.group_assign")
- layout.itemO("pose.group_unassign")
-
-
-class VIEW3D_MT_POSE_ik(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Inverse Kinematics"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("pose.ik_add")
- layout.itemO("pose.ik_clear")
-
-class VIEW3D_MT_POSE_constraints(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
- __label__ = "Constraints"
-
- def draw(self, context):
- layout = self.layout
-
- layout.itemO("pose.constraint_add_with_targets", text="Add (With Targets)...")
- layout.itemO("pose.constraints_clear")
-
-class VIEW3D_MT_POSE_showhide(VIEW3D_MT_showhide):
- _operator_name = "pose"
-
-# ********** Edit Menus, suffix from ob.type **********
+ layout.itemO("view3d.snap_cursor_to_selected")
+ layout.itemO("view3d.snap_cursor_to_grid")
+ layout.itemO("view3d.snap_cursor_to_active")
# Edit MESH
class VIEW3D_MT_edit_MESH(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Mesh"
def draw(self, context):
@@ -736,17 +538,17 @@ class VIEW3D_MT_edit_MESH(bpy.types.Menu):
layout.itemS()
- layout.itemM("VIEW3D_MT_snap")
+ layout.itemM("VIEW3D_MT_edit_snap")
layout.itemS()
- layout.itemO("uv.mapping_menu", text="UV Unwrap...")
+ layout.itemO("uv.mapping_menu")
layout.itemS()
layout.itemO("mesh.extrude")
layout.itemO("mesh.duplicate")
- layout.itemO("mesh.delete", text="Delete...")
+ layout.itemO("mesh.delete")
layout.itemS()
@@ -766,7 +568,7 @@ class VIEW3D_MT_edit_MESH(bpy.types.Menu):
layout.itemM("VIEW3D_MT_edit_MESH_showhide")
class VIEW3D_MT_edit_MESH_vertices(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Vertices"
def draw(self, context):
@@ -781,9 +583,9 @@ class VIEW3D_MT_edit_MESH_vertices(bpy.types.Menu):
layout.itemO("mesh.vertices_smooth")
layout.itemO("mesh.remove_doubles")
-
+
class VIEW3D_MT_edit_MESH_edges(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Edges"
def draw(self, context):
@@ -791,6 +593,7 @@ class VIEW3D_MT_edit_MESH_edges(bpy.types.Menu):
layout.itemO("mesh.edge_face_add")
layout.itemO("mesh.subdivide")
+ layout.item_floatO("mesh.subdivide", "smoothness", 1.0, text="Subdivide Smooth")
layout.itemS()
@@ -806,9 +609,9 @@ class VIEW3D_MT_edit_MESH_edges(bpy.types.Menu):
layout.item_enumO("mesh.edge_rotate", "direction", 'CW', text="Rotate Edge CW")
layout.item_enumO("mesh.edge_rotate", "direction", 'CCW', text="Rotate Edge CCW")
-
+
class VIEW3D_MT_edit_MESH_faces(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Faces"
def draw(self, context):
@@ -830,7 +633,7 @@ class VIEW3D_MT_edit_MESH_faces(bpy.types.Menu):
layout.itemO("mesh.faces_shade_flat")
class VIEW3D_MT_edit_MESH_normals(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Normals"
def draw(self, context):
@@ -843,8 +646,16 @@ class VIEW3D_MT_edit_MESH_normals(bpy.types.Menu):
layout.itemO("mesh.flip_normals")
-class VIEW3D_MT_edit_MESH_showhide(VIEW3D_MT_showhide):
- _operator_name = "mesh"
+class VIEW3D_MT_edit_MESH_showhide(bpy.types.Menu):
+ __space_type__ = "VIEW_3D"
+ __label__ = "Show/Hide"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.itemO("mesh.reveal")
+ layout.itemO("mesh.hide")
+ layout.item_booleanO("mesh.hide", "unselected", True, text="Hide Unselected")
# Edit CURVE
@@ -853,8 +664,8 @@ def draw_CURVE(self, context):
layout = self.layout
settings = context.tool_settings
-
- layout.itemM("VIEW3D_MT_snap")
+
+ layout.itemM("VIEW3D_MT_edit_snap")
layout.itemS()
@@ -863,7 +674,7 @@ def draw_CURVE(self, context):
layout.itemO("curve.separate")
layout.itemO("curve.make_segment")
layout.itemO("curve.cyclic_toggle")
- layout.itemO("curve.delete", text="Delete...")
+ layout.itemO("curve.delete")
layout.itemS()
@@ -880,13 +691,13 @@ def draw_CURVE(self, context):
layout.itemM("VIEW3D_MT_edit_CURVE_showhide")
class VIEW3D_MT_edit_CURVE(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Curve"
draw = draw_CURVE
class VIEW3D_MT_edit_CURVE_ctrlpoints(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Control Points"
def draw(self, context):
@@ -904,7 +715,7 @@ class VIEW3D_MT_edit_CURVE_ctrlpoints(bpy.types.Menu):
layout.item_menu_enumO("curve.handle_type_set", "type")
class VIEW3D_MT_edit_CURVE_segments(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Segments"
def draw(self, context):
@@ -913,19 +724,27 @@ class VIEW3D_MT_edit_CURVE_segments(bpy.types.Menu):
layout.itemO("curve.subdivide")
layout.itemO("curve.switch_direction")
-class VIEW3D_MT_edit_CURVE_showhide(VIEW3D_MT_showhide):
- _operator_name = "curve"
+class VIEW3D_MT_edit_CURVE_showhide(bpy.types.Menu):
+ __space_type__ = "VIEW_3D"
+ __label__ = "Show/Hide"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.itemO("curve.reveal")
+ layout.itemO("curve.hide")
+ layout.item_booleanO("curve.hide", "unselected", True, text="Hide Unselected")
# Edit SURFACE
class VIEW3D_MT_edit_SURFACE(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Surface"
draw = draw_CURVE
# Edit TEXT
class VIEW3D_MT_edit_TEXT(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Text"
def draw(self, context):
@@ -938,7 +757,7 @@ class VIEW3D_MT_edit_TEXT(bpy.types.Menu):
layout.itemM("VIEW3D_MT_edit_TEXT_chars")
class VIEW3D_MT_edit_TEXT_chars(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Special Characters"
def draw(self, context):
@@ -973,7 +792,7 @@ class VIEW3D_MT_edit_TEXT_chars(bpy.types.Menu):
# Edit META
class VIEW3D_MT_edit_META(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Metaball"
def draw(self, context):
@@ -986,11 +805,11 @@ class VIEW3D_MT_edit_META(bpy.types.Menu):
layout.itemS()
- layout.itemM("VIEW3D_MT_snap")
+ layout.itemM("VIEW3D_MT_edit_snap")
layout.itemS()
- layout.itemO("mball.delete_metaelems", text="Delete...")
+ layout.itemO("mball.delete_metaelems")
layout.itemO("mball.duplicate_metaelems")
layout.itemS()
@@ -1003,19 +822,19 @@ class VIEW3D_MT_edit_META(bpy.types.Menu):
layout.itemM("VIEW3D_MT_edit_META_showhide")
class VIEW3D_MT_edit_META_showhide(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Show/Hide"
def draw(self, context):
layout = self.layout
- layout.itemO("mball.reveal_metaelems", text="Show Hidden")
- layout.itemO("mball.hide_metaelems", text="Hide Selected")
+ layout.itemO("mball.reveal_metaelems")
+ layout.itemO("mball.hide_metaelems")
layout.item_booleanO("mball.hide_metaelems", "unselected", True, text="Hide Unselected")
# Edit LATTICE
class VIEW3D_MT_edit_LATTICE(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Lattice"
def draw(self, context):
@@ -1023,7 +842,7 @@ class VIEW3D_MT_edit_LATTICE(bpy.types.Menu):
settings = context.tool_settings
- layout.itemM("VIEW3D_MT_snap")
+ layout.itemM("VIEW3D_MT_edit_snap")
layout.itemS()
@@ -1036,7 +855,7 @@ class VIEW3D_MT_edit_LATTICE(bpy.types.Menu):
# Edit ARMATURE
class VIEW3D_MT_edit_ARMATURE(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Armature"
def draw(self, context):
@@ -1045,7 +864,7 @@ class VIEW3D_MT_edit_ARMATURE(bpy.types.Menu):
edit_object = context.edit_object
arm = edit_object.data
- layout.itemM("VIEW3D_MT_snap")
+ layout.itemM("VIEW3D_MT_edit_snap")
layout.itemM("VIEW3D_MT_edit_ARMATURE_roll")
if arm.drawtype == 'ENVELOPE':
@@ -1068,19 +887,18 @@ class VIEW3D_MT_edit_ARMATURE(bpy.types.Menu):
layout.itemS()
- layout.itemO("armature.subdivide_multi", text="Subdivide")
+ layout.itemO("armature.subdivide_simple")
+ layout.itemO("armature.subdivide_multi")
layout.itemS()
-
- layout.operator_context = "EXEC_AREA"
- layout.item_enumO("armature.autoside_names", "type", 'XAXIS', text="AutoName Left/Right")
- layout.item_enumO("armature.autoside_names", "type", 'YAXIS', text="AutoName Front/Back")
- layout.item_enumO("armature.autoside_names", "type", 'ZAXIS', text="AutoName Top/Bottom")
+
+ layout.item_enumO("armature.autoside_names", "axis", 'XAXIS', text="AutoName Left/Right")
+ layout.item_enumO("armature.autoside_names", "axis", 'YAXIS', text="AutoName Front/Back")
+ layout.item_enumO("armature.autoside_names", "axis", 'ZAXIS', text="AutoName Top/Bottom")
layout.itemO("armature.flip_names")
layout.itemS()
-
- layout.operator_context = "INVOKE_DEFAULT"
+
layout.itemO("armature.armature_layers")
layout.itemO("armature.bone_layers")
@@ -1089,21 +907,21 @@ class VIEW3D_MT_edit_ARMATURE(bpy.types.Menu):
layout.itemM("VIEW3D_MT_edit_ARMATURE_parent")
layout.itemS()
-
+
layout.item_menu_enumO("armature.flags_set", "mode", text="Bone Settings")
class VIEW3D_MT_edit_ARMATURE_parent(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Parent"
def draw(self, context):
layout = self.layout
- layout.itemO("armature.parent_set", text="Make")
- layout.itemO("armature.parent_clear", text="Clear")
+ layout.itemO("armature.parent_set")
+ layout.itemO("armature.parent_clear")
class VIEW3D_MT_edit_ARMATURE_roll(bpy.types.Menu):
- __space_type__ = 'VIEW_3D'
+ __space_type__ = "VIEW_3D"
__label__ = "Bone Roll"
def draw(self, context):
@@ -1119,8 +937,8 @@ class VIEW3D_MT_edit_ARMATURE_roll(bpy.types.Menu):
# ********** Panel **********
class VIEW3D_PT_3dview_properties(bpy.types.Panel):
- __space_type__ = 'VIEW_3D'
- __region_type__ = 'UI'
+ __space_type__ = "VIEW_3D"
+ __region_type__ = "UI"
__label__ = "View"
def poll(self, context):
@@ -1151,8 +969,8 @@ class VIEW3D_PT_3dview_properties(bpy.types.Panel):
layout.column().itemR(scene, "cursor_location", text="3D Cursor:")
class VIEW3D_PT_3dview_display(bpy.types.Panel):
- __space_type__ = 'VIEW_3D'
- __region_type__ = 'UI'
+ __space_type__ = "VIEW_3D"
+ __region_type__ = "UI"
__label__ = "Display"
def poll(self, context):
@@ -1181,67 +999,10 @@ class VIEW3D_PT_3dview_display(bpy.types.Panel):
col.itemR(view, "lock_rotation")
col.itemR(view, "box_preview")
col.itemR(view, "box_clip")
-
-class VIEW3D_PT_3dview_meshdisplay(bpy.types.Panel):
- __space_type__ = 'VIEW_3D'
- __region_type__ = 'UI'
- __label__ = "Mesh Display"
-
- def poll(self, context):
- editmesh = context.mode == 'EDIT_MESH'
- return (editmesh)
-
- def draw(self, context):
- layout = self.layout
-
- mesh = context.active_object.data
-
- col = layout.column()
- col.itemL(text="Overlays:")
- col.itemR(mesh, "draw_edges", text="Edges")
- col.itemR(mesh, "draw_faces", text="Faces")
- col.itemR(mesh, "draw_creases", text="Creases")
- col.itemR(mesh, "draw_bevel_weights", text="Bevel Weights")
- col.itemR(mesh, "draw_seams", text="Seams")
- col.itemR(mesh, "draw_sharp", text="Sharp")
-
- col.itemS()
- col.itemL(text="Normals:")
- col.itemR(mesh, "draw_normals", text="Face")
- col.itemR(mesh, "draw_vertex_normals", text="Vertex")
- col.itemR(context.scene.tool_settings, "normal_size", text="Normal Size")
-
- col.itemS()
- col.itemL(text="Numerics:")
- col.itemR(mesh, "draw_edge_lenght")
- col.itemR(mesh, "draw_edge_angle")
- col.itemR(mesh, "draw_face_area")
-
-
-class VIEW3D_PT_3dview_curvedisplay(bpy.types.Panel):
- __space_type__ = 'VIEW_3D'
- __region_type__ = 'UI'
- __label__ = "Curve Display"
-
- def poll(self, context):
- editmesh = context.mode == 'EDIT_CURVE'
- return (editmesh)
-
- def draw(self, context):
- layout = self.layout
-
- curve = context.active_object.data
-
- col = layout.column()
- col.itemL(text="Overlays:")
- col.itemR(curve, "draw_handles", text="Handles")
- col.itemR(curve, "draw_normals", text="Normals")
- col.itemR(context.scene.tool_settings, "normal_size", text="Normal Size")
-
class VIEW3D_PT_background_image(bpy.types.Panel):
- __space_type__ = 'VIEW_3D'
- __region_type__ = 'UI'
+ __space_type__ = "VIEW_3D"
+ __region_type__ = "UI"
__label__ = "Background Image"
__default_closed__ = True
@@ -1273,15 +1034,13 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
col.itemL(text="Offset:")
col = layout.column(align=True)
- col.itemR(bg, "offset_x", text="X")
- col.itemR(bg, "offset_y", text="Y")
+ col.itemR(bg, "x_offset", text="X")
+ col.itemR(bg, "y_offset", text="Y")
bpy.types.register(VIEW3D_HT_header) # Header
bpy.types.register(VIEW3D_MT_view) #View Menus
bpy.types.register(VIEW3D_MT_view_navigation)
-bpy.types.register(VIEW3D_MT_view_align)
-bpy.types.register(VIEW3D_MT_view_cameras)
bpy.types.register(VIEW3D_MT_select_OBJECT) # Select Menus
bpy.types.register(VIEW3D_MT_select_POSE)
@@ -1294,31 +1053,18 @@ bpy.types.register(VIEW3D_MT_select_EDIT_LATTICE)
bpy.types.register(VIEW3D_MT_select_EDIT_ARMATURE)
bpy.types.register(VIEW3D_MT_select_FACE) # XXX todo
-bpy.types.register(VIEW3D_MT_OBJECT) # Object Menu
-bpy.types.register(VIEW3D_MT_OBJECT_clear)
-bpy.types.register(VIEW3D_MT_OBJECT_parent)
-bpy.types.register(VIEW3D_MT_OBJECT_track)
-bpy.types.register(VIEW3D_MT_OBJECT_group)
-bpy.types.register(VIEW3D_MT_OBJECT_constraints)
-bpy.types.register(VIEW3D_MT_OBJECT_showhide)
-
-bpy.types.register(VIEW3D_MT_SCULPT) # Sculpt Menu
-
-bpy.types.register(VIEW3D_MT_PAINT_VERTEX)
-
-bpy.types.register(VIEW3D_MT_PARTICLE) # Particle Menu
-bpy.types.register(VIEW3D_MT_PARTICLE_showhide)
+bpy.types.register(VIEW3D_MT_object) # Object Menu
+bpy.types.register(VIEW3D_MT_object_clear)
+bpy.types.register(VIEW3D_MT_object_snap)
+bpy.types.register(VIEW3D_MT_object_parent)
+bpy.types.register(VIEW3D_MT_object_track)
+bpy.types.register(VIEW3D_MT_object_group)
+bpy.types.register(VIEW3D_MT_object_constraints)
+bpy.types.register(VIEW3D_MT_object_show)
-bpy.types.register(VIEW3D_MT_POSE) # POSE Menu
-bpy.types.register(VIEW3D_MT_POSE_transform)
-bpy.types.register(VIEW3D_MT_POSE_pose)
-bpy.types.register(VIEW3D_MT_POSE_motion)
-bpy.types.register(VIEW3D_MT_POSE_group)
-bpy.types.register(VIEW3D_MT_POSE_ik)
-bpy.types.register(VIEW3D_MT_POSE_constraints)
-bpy.types.register(VIEW3D_MT_POSE_showhide)
+bpy.types.register(VIEW3D_MT_sculpt) # Sculpt Menu
-bpy.types.register(VIEW3D_MT_snap) # Edit Menus
+bpy.types.register(VIEW3D_MT_edit_snap) # Edit Menus
bpy.types.register(VIEW3D_MT_edit_MESH)
bpy.types.register(VIEW3D_MT_edit_MESH_vertices)
@@ -1348,6 +1094,4 @@ bpy.types.register(VIEW3D_MT_edit_ARMATURE_roll)
bpy.types.register(VIEW3D_PT_3dview_properties) # Panels
bpy.types.register(VIEW3D_PT_3dview_display)
-bpy.types.register(VIEW3D_PT_3dview_meshdisplay)
-bpy.types.register(VIEW3D_PT_3dview_curvedisplay)
bpy.types.register(VIEW3D_PT_background_image)
diff --git a/release/ui/space_view3d_toolbar.py b/release/ui/space_view3d_toolbar.py
index 73f97dec750..1b4c1e25c34 100644
--- a/release/ui/space_view3d_toolbar.py
+++ b/release/ui/space_view3d_toolbar.py
@@ -2,8 +2,8 @@
import bpy
class View3DPanel(bpy.types.Panel):
- __space_type__ = 'VIEW_3D'
- __region_type__ = 'TOOLS'
+ __space_type__ = "VIEW_3D"
+ __region_type__ = "TOOLS"
# ********** default tools for objectmode ****************
@@ -107,7 +107,6 @@ class VIEW3D_PT_tools_curveedit(View3DPanel):
col.itemO("curve.delete")
col.itemO("curve.cyclic_toggle")
col.itemO("curve.switch_direction")
- col.itemO("curve.spline_type_set")
layout.itemL(text="Modeling:")
@@ -263,8 +262,8 @@ class VIEW3D_PT_tools_posemode(View3DPanel):
# ********** default tools for paint modes ****************
class PaintPanel(bpy.types.Panel):
- __space_type__ = 'VIEW_3D'
- __region_type__ = 'TOOLS'
+ __space_type__ = "VIEW_3D"
+ __region_type__ = "TOOLS"
def paint_settings(self, context):
ts = context.tool_settings
@@ -334,15 +333,18 @@ class VIEW3D_PT_tools_brush(PaintPanel):
row = col.row(align=True)
row.itemR(brush, "size", slider=True)
- row.itemR(brush, "size_pressure", toggle=True, text="")
+ row.itemR(brush, "size_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
if brush.sculpt_tool != 'GRAB':
row = col.row(align=True)
row.itemR(brush, "strength", slider=True)
- row.itemR(brush, "strength_pressure", text="")
+ row.itemR(brush, "strength_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
col = layout.column()
+ if brush.sculpt_tool != 'LAYER':
+ col.itemR(brush, "anchored")
+
if brush.sculpt_tool in ('DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'):
col.itemR(brush, "flip_direction")
@@ -350,6 +352,8 @@ class VIEW3D_PT_tools_brush(PaintPanel):
col.itemR(brush, "persistent")
col.itemO("sculpt.set_persistent_base")
+ col.itemR(brush, "rake")
+
col.itemR(brush, "sculpt_tool")
# Texture Paint Mode #
@@ -358,21 +362,38 @@ class VIEW3D_PT_tools_brush(PaintPanel):
col = layout.column(align=True)
col.item_enumR(settings, "tool", 'DRAW')
col.item_enumR(settings, "tool", 'SOFTEN')
- col.item_enumR(settings, "tool", 'CLONE')
- col.item_enumR(settings, "tool", 'SMEAR')
+ if settings.use_projection:
+ col.item_enumR(settings, "tool", 'CLONE')
+ else:
+ col.item_enumR(settings, "tool", 'SMEAR')
col = layout.column()
col.itemR(brush, "color", text="")
-
+
row = col.row(align=True)
row.itemR(brush, "size", slider=True)
- row.itemR(brush, "size_pressure", toggle=True, text="")
+ row.itemR(brush, "size_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
row = col.row(align=True)
row.itemR(brush, "strength", slider=True)
- row.itemR(brush, "strength_pressure", toggle=True, text="")
+ row.itemR(brush, "strength_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
+
+ row = col.row(align=True)
+ row.itemR(brush, "falloff", slider=True)
+ row.itemR(brush, "falloff_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
- col.itemR(brush, "blend")
+ row = col.row(align=True)
+ row.itemR(brush, "space", text="")
+ rowsub = row.row(align=True)
+ rowsub.active = brush.space
+ rowsub.itemR(brush, "spacing", text="Spacing", slider=True)
+ rowsub.itemR(brush, "spacing_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
+
+ col = layout.column()
+ col.itemR(brush, "airbrush")
+ sub = col.column()
+ sub.active = brush.airbrush
+ sub.itemR(brush, "rate")
# Weight Paint Mode #
@@ -382,11 +403,11 @@ class VIEW3D_PT_tools_brush(PaintPanel):
col = layout.column()
row = col.row(align=True)
row.itemR(brush, "size", slider=True)
- row.itemR(brush, "size_pressure", toggle=True, text="")
+ row.itemR(brush, "size_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
row = col.row(align=True)
row.itemR(brush, "strength", slider=True)
- row.itemR(brush, "strength_pressure", toggle=True, text="")
+ row.itemR(brush, "strength_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
# Vertex Paint Mode #
@@ -396,11 +417,11 @@ class VIEW3D_PT_tools_brush(PaintPanel):
row = col.row(align=True)
row.itemR(brush, "size", slider=True)
- row.itemR(brush, "size_pressure", toggle=True, text="")
+ row.itemR(brush, "size_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
row = col.row(align=True)
row.itemR(brush, "strength", slider=True)
- row.itemR(brush, "strength_pressure", toggle=True, text="")
+ row.itemR(brush, "strength_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
class VIEW3D_PT_tools_brush_stroke(PaintPanel):
__label__ = "Stroke"
@@ -408,41 +429,24 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel):
def poll(self, context):
settings = self.paint_settings(context)
- return (settings and settings.brush and (context.sculpt_object or
- context.vertex_paint_object or
- context.weight_paint_object or
- context.texture_paint_object))
+ return (settings and settings.brush and context.sculpt_object)
def draw(self, context):
- layout = self.layout
-
settings = self.paint_settings(context)
brush = settings.brush
- texture_paint = context.texture_paint_object
-
- if context.sculpt_object:
- if brush.sculpt_tool != 'LAYER':
- layout.itemR(brush, "anchored")
- layout.itemR(brush, "rake")
+ layout = self.layout
- layout.itemR(brush, "airbrush")
+ layout.itemR(brush, "smooth_stroke")
col = layout.column()
- col.active = brush.airbrush
- col.itemR(brush, "rate", slider=True)
-
- if not texture_paint:
- layout.itemR(brush, "smooth_stroke")
- col = layout.column()
- col.active = brush.smooth_stroke
- col.itemR(brush, "smooth_stroke_radius", text="Radius", slider=True)
- col.itemR(brush, "smooth_stroke_factor", text="Factor", slider=True)
+ col.active = brush.smooth_stroke
+ col.itemR(brush, "smooth_stroke_radius", text="Radius", slider=True)
+ col.itemR(brush, "smooth_stroke_factor", text="Factor", slider=True)
layout.itemR(brush, "space")
- row = layout.row(align=True)
- row.active = brush.space
- row.itemR(brush, "spacing", text="Distance", slider=True)
- if texture_paint:
- row.itemR(brush, "spacing_pressure", toggle=True, text="")
+ col = layout.column()
+ col.active = brush.space
+ col.itemR(brush, "spacing", text="Distance", slider=True)
+
class VIEW3D_PT_tools_brush_curve(PaintPanel):
__label__ = "Curve"
@@ -453,10 +457,9 @@ class VIEW3D_PT_tools_brush_curve(PaintPanel):
return (settings and settings.brush and settings.brush.curve)
def draw(self, context):
- layout = self.layout
-
settings = self.paint_settings(context)
brush = settings.brush
+ layout = self.layout
layout.template_curve_mapping(brush.curve)
layout.item_menu_enumO("brush.curve_preset", property="shape")
@@ -469,7 +472,6 @@ class VIEW3D_PT_sculpt_options(PaintPanel):
def draw(self, context):
layout = self.layout
-
sculpt = context.tool_settings.sculpt
col = layout.column()
@@ -498,7 +500,6 @@ class VIEW3D_PT_tools_weightpaint(View3DPanel):
def draw(self, context):
layout = self.layout
-
wpaint = context.tool_settings.weight_paint
col = layout.column()
@@ -526,7 +527,6 @@ class VIEW3D_PT_tools_vertexpaint(View3DPanel):
def draw(self, context):
layout = self.layout
-
vpaint = context.tool_settings.vertex_paint
col = layout.column()
@@ -545,17 +545,9 @@ class VIEW3D_PT_tools_vertexpaint(View3DPanel):
# ********** default tools for texturepaint ****************
-class VIEW3D_PT_tools_projectpaint(View3DPanel):
- __context__ = "projectpaint"
- __label__ = "Project Paint"
-
- def poll(self, context):
- return context.tool_settings.image_paint.tool != 'SMEAR'
-
- def draw_header(self, context):
- layout = self.layout
- ipaint = context.tool_settings.image_paint
- layout.itemR(ipaint, "use_projection", text="")
+class VIEW3D_PT_tools_texturepaint(View3DPanel):
+ __context__ = "texturepaint"
+ __label__ = "Options"
def draw(self, context):
layout = self.layout
@@ -565,6 +557,7 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel):
use_projection= ipaint.use_projection
col = layout.column()
+ col.itemR(ipaint, "use_projection")
sub = col.column()
sub.active = use_projection
sub.itemR(ipaint, "use_occlude")
@@ -579,7 +572,8 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel):
col = split.column()
col.active = (ipaint.use_normal_falloff and use_projection)
col.itemR(ipaint, "normal_angle", text="")
-
+
+
split = layout.split(percentage=0.7)
col = split.column(align=False)
@@ -589,7 +583,8 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel):
col = split.column(align=False)
col.active = (use_projection and ipaint.use_stencil_layer)
col.itemR(ipaint, "invert_stencil", text="Inv")
-
+
+
col = layout.column()
sub = col.column()
sub.active = (settings.tool == 'CLONE')
@@ -606,60 +601,23 @@ class VIEW3D_PT_tools_particlemode(View3DPanel):
def draw(self, context):
layout = self.layout
-
pe = context.tool_settings.particle_edit
- ob = pe.object
- row = layout.row()
- row.itemL(text="Edit:")
- row.itemR(pe, "type", text="")
-
- if pe.type == 'PARTICLES':
- if ob.particle_systems:
- if len(ob.particle_systems) > 1:
- layout.template_list(ob, "particle_systems", ob, "active_particle_system_index", type='ICONS')
-
- ptcache = ob.particle_systems[ob.active_particle_system_index].point_cache
- else:
- for md in ob.modifiers:
- if md.type==pe.type:
- ptcache = md.point_cache
-
- if ptcache and len(ptcache.point_cache_list) > 1:
- layout.template_list(ptcache, "point_cache_list", ptcache, "active_point_cache_index", type='ICONS')
-
-
- if not pe.editable:
- layout.itemL(text="Point cache must be baked")
- layout.itemL(text="to enable editing!")
-
col = layout.column(align=True)
- if pe.hair:
- col.active = pe.editable
- col.itemR(pe, "emitter_deflect", text="Deflect emitter")
- sub = col.row()
- sub.active = pe.emitter_deflect
- sub.itemR(pe, "emitter_distance", text="Distance")
+ col.itemR(pe, "emitter_deflect", text="Deflect")
+ sub = col.row()
+ sub.active = pe.emitter_deflect
+ sub.itemR(pe, "emitter_distance", text="Distance")
col = layout.column(align=True)
- col.active = pe.editable
col.itemL(text="Keep:")
col.itemR(pe, "keep_lengths", text="Lenghts")
col.itemR(pe, "keep_root", text="Root")
- if not pe.hair:
- col.itemL(text="Correct:")
- col.itemR(pe, "auto_velocity", text="Velocity")
col = layout.column(align=True)
- col.active = pe.editable
- col.itemL(text="Draw:")
- col.itemR(pe, "draw_step", text="Path Steps")
- if pe.type == 'PARTICLES':
- col.itemR(pe, "draw_particles", text="Particles")
- col.itemR(pe, "fade_time")
- sub = col.row()
- sub.active = pe.fade_time
- sub.itemR(pe, "fade_frames", slider=True)
+ col.itemL(text="Display:")
+ col.itemR(pe, "show_time", text="Time")
+ col.itemR(pe, "show_children", text="Children")
bpy.types.register(VIEW3D_PT_tools_objectmode)
bpy.types.register(VIEW3D_PT_tools_meshedit)
@@ -676,5 +634,5 @@ bpy.types.register(VIEW3D_PT_tools_brush_curve)
bpy.types.register(VIEW3D_PT_sculpt_options)
bpy.types.register(VIEW3D_PT_tools_vertexpaint)
bpy.types.register(VIEW3D_PT_tools_weightpaint)
-bpy.types.register(VIEW3D_PT_tools_projectpaint)
+bpy.types.register(VIEW3D_PT_tools_texturepaint)
bpy.types.register(VIEW3D_PT_tools_particlemode)
diff --git a/release/windows/inno/blender.iss b/release/windows/inno/blender.iss
deleted file mode 100644
index 5faf5b47406..00000000000
--- a/release/windows/inno/blender.iss
+++ /dev/null
@@ -1,92 +0,0 @@
-; Script generated by the Inno Setup Script Wizard.
-; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
-
-
-[Setup]
-#define VERSION "2.49b"
-
-; NOTE: The value of AppId uniquely identifies this application.
-; Do not use the same AppId value in installers for other applications.
-; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
-AppId={{C45CB76D-AD5F-49CC-86DE-72B168A6A888}
-AppName=Blender
-AppVerName=Blender {#VERSION}
-AppPublisher=Blender Foundation
-AppPublisherURL=http://www.blender.org
-AppSupportURL=http://www.blender.org
-AppUpdatesURL=http://www.blender.org
-DefaultDirName={pf}\Blender
-DefaultGroupName=Blender Foundation
-AllowNoIcons=true
-LicenseFile=.\copyright.txt
-OutputBaseFilename=blender-{#VERSION}
-Compression=lzma
-SolidCompression=true
-ChangesAssociations=true
-WizardImageFile=.\installer.bmp
-WizardSmallImageFile=.\header.bmp
-SetupIconFile=.\installer.ico
-MinVersion=,5.01.2600sp1
-PrivilegesRequired=none
-AllowRootDirectory=true
-ShowLanguageDialog=auto
-
-[Dirs]
-Name: {userdocs}\Blender; Flags: uninsneveruninstall; Tasks: ; Languages:
-
-[Languages]
-Name: english; MessagesFile: compiler:Default.isl
-
-[Tasks]
-Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
-Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
-
-[Files]
-Source: ..\..\..\..\build\bin\release\blender.exe; DestDir: {app}; Flags: ignoreversion
-Source: ..\..\..\..\build\bin\release\blender.html; DestDir: {app}; Flags: ignoreversion
-Source: ..\..\..\..\build\bin\release\BlenderQuickStart.pdf; DestDir: {app}; Flags: ignoreversion
-Source: ..\..\..\..\build\bin\release\copyright.txt; DestDir: {app}; Flags: ignoreversion
-Source: ..\..\..\..\build\bin\release\GPL-license.txt; DestDir: {app}; Flags: ignoreversion
-Source: ..\..\..\..\build\bin\release\Python-license.txt; DestDir: {app}; Flags: ignoreversion
-Source: ..\..\..\..\build\bin\release\release_249.txt; DestDir: {app}; Flags: ignoreversion
-Source: ..\..\..\..\build\bin\release\*.dll; DestDir: {app}; Flags: ignoreversion
-Source: ..\..\..\..\build\bin\release\plugins\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
-Source: ..\..\..\..\build\bin\release\.blender\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
-; NOTE: Don't use "Flags: ignoreversion" on any shared system files
-
-[Icons]
-Name: {group}\Blender; Filename: {app}\blender.exe
-Name: {group}\ReleaseNotes; Filename: {app}\release_249.txt
-Name: {group}\Blender.org; Filename: {app}\blender.html
-Name: {group}\Copyright; Filename: {app}\copyright.txt
-Name: {group}\GPL; Filename: {app}\GPL-license.txt
-Name: {group}\Uninstall; Filename: {uninstallexe}; Tasks: ; Languages:
-Name: {commondesktop}\Blender; Filename: {app}\blender.exe; Tasks: desktopicon
-Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\Blender; Filename: {app}\blender.exe; Tasks: quicklaunchicon
-
-[Registry]
-Root: HKCR; Subkey: .blend; ValueType: string; ValueName: ; ValueData: BlenderFile; Flags: uninsdeletevalue
-Root: HKCR; Subkey: BlenderFile; ValueType: string; ValueName: ; ValueData: Blender File; Flags: uninsdeletekey
-Root: HKCR; Subkey: BlenderFile\DefaultIcon; ValueType: string; ValueName: ; ValueData: {app}\blender.exe,0
-Root: HKCR; Subkey: BlenderFile\shell\open\command; ValueType: string; ValueName: ; ValueData: """{app}\blender.exe"" ""%1"""
-
-[Run]
-Filename: {app}\blender.exe; Description: {cm:LaunchProgram,Blender}; Flags: nowait postinstall skipifsilent
-
-
-[_ISToolDownload]
-
-[UninstallDelete]
-Name: {app}\blender.exe; Type: files
-Name: {app}\*.dll; Type: files
-Name: {app}\blender.html; Type: files; Tasks: ; Languages:
-Name: {app}\BlenderQuickStart.pdf; Type: files
-Name: {app}\copyright.txt; Type: files
-Name: {app}\GPL-license.txt; Type: files
-Name: {app}\Python-license.txt; Type: files
-Name: {app}\release_249.txt; Type: files
-Name: {app}\.blender\*; Type: filesandordirs
-Name: {app}\plugins\*; Type: filesandordirs
-Name: {app}\.blender; Type: dirifempty
-Name: {app}\plugins; Type: dirifempty
-Name: {app}; Type: dirifempty
diff --git a/release/windows/inno/copyright.txt b/release/windows/inno/copyright.txt
deleted file mode 100644
index 4e67c2561d3..00000000000
--- a/release/windows/inno/copyright.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-BLENDER CREATOR LICENSE AGREEMENT
-
-IMPORTANT: PLEASE READ CAREFULLY BEFORE USING THE BLENDER CREATOR SOFTWARE.
-
-This License Agreement for the Blender Creator software ("License Agreement") is an agreement between NaN Technologies B.V., Meerenakkerplein 11, 5652 BJ Eindhoven, the Netherlands ("NaN") and you (either an individual or a legal entity) ("You") with respect to the software product which this License Agreement accompanies (the "Software").
-
-By installing, copying or otherwise using the Software, You agree to be bound by the terms of this License Agreement. If You do not agree to the terms of this License Agreement do not install or use the Software.
-
-
-1. Grant of License
-
-Subject to the provisions of this License Agreement, NaN grants You a limited, non-exclusive, personal, non-sublicenseable, non-transferable, revocable license to use the Software at any computer You own or use.
-
-2. License Restrictions
-
-Except as expressly provided under this License Agreement, or without prior written consent from NaN, or without permission by law, You may not: (a) remove or alter any proprietary, copyright or trademark notices in or on the Software; (b) modify, decompile, disassemble or reverse-engineer the Software; (c) sublicense, rent, lease, lend, assign or otherwise transfer rights to the Software.
-
-3. Permitted copying and electronic distribution of Software
-
-You are hereby granted permission to copy and distribute the Software without written agreement from NaN, only for non-commercial purposes. Distributing the Software within a restricted non-public environment, such as using a local network in a company or a local network of a university, is considered a 'non-commercial purpose'. This entire License Agreement must appear in and/or accompany all copies of the Software.
-Distributing the Software 'bundled' in with ANY product is considered to be a 'commercial purpose'.
-
-4. Intellectual Property Rights and Ownership
-
-Title and ownership to all rights, including intellectual property rights, in and to the Software shall at all times solely and exclusively remain with NaN. The Software is protected by national and international (copyright) laws and treaties. All rights not expressly granted herein are reserved to NaN.
-
-5. Disclaimer of Warranties
-
-NaN provides you with the Software "as is" and with all faults. NaN explicitly disclaims all warranties and guarantees and does not make any representations with respect to the Software, whether express, implied, or statutory, including, but not limited to any (if any) warranties of or related to: fitness for a particular purpose, title, non-infringement, lack of viruses, accuracy or completeness of responses, results, lack of negligence or lack of workmanlike effort, and correspondence to description. The entire risk arising out of use or performance of the Software remains with You.
-
-6. Limitation of Liability
-
-In no event shall NaN or its employees, agents or suppliers be liable for any direct, indirect, consequential, incidental, special, punitive, or other damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, claims of third parties, damages as a result of injury to any person, or any other loss) arising out of or in connection with the license granted under this License Agreement or the use of or inability to use the Software, even if NaN has been advised of the possibility of such damages.
-
-7. User warning and indemnification
-
-WARNING: use of the Software and use of any works that are (partially) created with the Software (the "Works") may cause physical or psychological reactions from You or from third parties, which may result in damages, injuries, losses and/or other negative consequences. You acknowledge that NaN can not be held liable for any such damages, injuries, losses and/or other negative consequences. You acknowledge that it is your obligation to investigate, prevent and/or minimize such reactions prior to having third parties use the Works.
-
-You shall indemnify and hold harmless NaN from and against all actions, claims, demands, proceedings, losses, damages, costs, charges and expenses, including but not limited to legal fees and expenses, arising out of or in connection with (i) the use of the Software by You and (ii) the use of any Works created with the Software by You or any third parties.
-
-8. Term and Termination
-
-This License Agreement and the license granted hereunder is effective until terminated. This License Agreement shall terminate automatically and forthwith if You fail to comply with the terms of this License Agreement. Upon termination, You shall cease the use of the Software, remove the Software from (the memory of) your computer and destroy all copies of the Software.
-
-9. Entire Agreement
-
-This License Agreement is the entire agreement between NaN and You in respect of the subject matter of the License Agreement. This License Agreement supersedes all prior written or oral agreements, proposals or understandings, and any other communications between NaN and You relating to the subject matter of this License Agreement.
-
-10. Enforceability
-
-If any provision of this License Agreement is held to be unenforceable by a court of competent jurisdiction for any reason, such provision shall be adapted or amended only to the extent necessary to make it enforceable, and the remainder of the License Agreement shall remain in effect.
-
-11. Governing law and disputes
-
-This License Agreement and all disputes arising from it will be governed by the laws of The Netherlands. All disputes arising in connection with this Agreement that cannot be settled amicably shall be brought before the competent court in Amsterdam, the Netherlands, to which jurisdiction NaN and You hereby irrevocably consent.
-
diff --git a/release/windows/inno/header.bmp b/release/windows/inno/header.bmp
deleted file mode 100644
index b631ba73933..00000000000
--- a/release/windows/inno/header.bmp
+++ /dev/null
Binary files differ
diff --git a/release/windows/inno/installer.bmp b/release/windows/inno/installer.bmp
deleted file mode 100644
index 10fb01454a4..00000000000
--- a/release/windows/inno/installer.bmp
+++ /dev/null
Binary files differ
diff --git a/release/windows/inno/installer.ico b/release/windows/inno/installer.ico
deleted file mode 100644
index 922c9d472d9..00000000000
--- a/release/windows/inno/installer.ico
+++ /dev/null
Binary files differ
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index 4adc51bcb15..4764caddf6a 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -28,9 +28,9 @@ ADD_SUBDIRECTORY(blender)
ADD_SUBDIRECTORY(kernel)
IF(WITH_GAMEENGINE)
- ADD_SUBDIRECTORY(gameengine)
+ ADD_SUBDIRECTORY(gameengine)
ENDIF(WITH_GAMEENGINE)
IF(WINDOWS)
- ADD_SUBDIRECTORY(icons)
+ ADD_SUBDIRECTORY(icons)
ENDIF(WINDOWS)
diff --git a/source/Makefile b/source/Makefile
index dab037d1749..cd2e7cf75ba 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -109,26 +109,7 @@ COMLIB += $(OCGDIR)/blender/blenfont/$(DEBUG_DIR)libblenfont.a
COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaudaspace.a
COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_src.a
COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_fx.a
-COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_sdl.a
COMLIB += $(NAN_SAMPLERATE)/lib/$(DEBUG_DIR)libsamplerate.a
-COMLIB += $(NAN_LZO)/lib/$(DEBUG_DIR)libminilzo.a
-COMLIB += $(NAN_LZMA)/lib/$(DEBUG_DIR)liblzma.a
-
-ifeq ($(WITH_FFMPEG),true)
- COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_ffmpeg.a
-endif
-
-ifeq ($(WITH_OPENAL),true)
- COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_openal.a
-endif
-
-ifeq ($(WITH_JACK),true)
- COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_jack.a
-endif
-
-ifeq ($(WITH_SNDFILE),true)
- COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_sndfile.a
-endif
ifneq ($(NAN_NO_KETSJI),true)
COMLIB += $(OCGDIR)/gameengine/bloutines/$(DEBUG_DIR)libbloutines.a
@@ -264,8 +245,6 @@ PULIB += $(OCGDIR)/blender/ed_uvedit/$(DEBUG_DIR)libed_uvedit.a
PULIB += $(OCGDIR)/blender/ed_screen/$(DEBUG_DIR)libed_screen.a
PULIB += $(OCGDIR)/blender/ed_console/$(DEBUG_DIR)libed_console.a
PULIB += $(OCGDIR)/blender/ed_userpref/$(DEBUG_DIR)libed_userpref.a
-PULIB += $(OCGDIR)/blender/ed_gpencil/$(DEBUG_DIR)libed_gpencil.a
-PULIB += $(OCGDIR)/blender/ed_opsound/$(DEBUG_DIR)libed_opsound.a
PULIB += $(OCGDIR)/blender/windowmanager/$(DEBUG_DIR)libwindowmanager.a
PULIB += $(OCGDIR)/blender/python/$(DEBUG_DIR)libpython.a
PULIB += $(OCGDIR)/blender/makesrna/$(DEBUG_DIR)librna.a
@@ -374,7 +353,12 @@ ifeq ($(OS),solaris)
SPLIB += $(NAN_ZLIB)/lib/libz.a
endif
-ifeq ($(WITH_OPENAL),true)
+# OpenAL libs are already compiled as shared code!
+
+# Some kooky logic going on here ...
+ifeq ($(NAN_NO_OPENAL), true)
+# NAN_SND_LIBS =
+else
ifeq ($(OS),$(findstring $(OS), "freebsd linux windows"))
ifeq ($(CPU),$(findstring $(CPU), "i386 powerpc x86_64 parisc64"))
NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
@@ -394,18 +378,6 @@ ifeq ($(WITH_OPENAL),true)
endif
endif
-ifeq ($(WITH_JACK),true)
- ifeq ($(OS),$(findstring $(OS), "linux"))
- NAN_SND_LIBS += $(NAN_JACKLIBS)
- endif
-endif
-
-ifeq ($(WITH_SNDFILE),true)
- ifeq ($(OS),$(findstring $(OS), "linux"))
- NAN_SND_LIBS += $(NAN_SNDFILELIBS)
- endif
-endif
-
ifeq ($(OS),windows)
# Might need to change this to $(NAN_MOZILLA_LIB)/nspr4.lib
diff --git a/source/SConscript b/source/SConscript
index e4e89671653..d3a9373b4d8 100644
--- a/source/SConscript
+++ b/source/SConscript
@@ -6,9 +6,6 @@ SConscript(['blender/SConscript',
'creator/SConscript'])
if env['WITH_BF_GAMEENGINE']:
SConscript (['gameengine/SConscript'])
-
-if env['WITH_BF_PLAYER']:
- SConscript (['blenderplayer/bad_level_call_stubs/SConscript'])
-
+
if env['OURPLATFORM'] in ('win64-vc', 'win32-vc', 'win32-mingw'):
SConscript (['icons/SConscript'])
diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt
index 703c5acd8a2..a9e3d50211f 100644
--- a/source/blender/CMakeLists.txt
+++ b/source/blender/CMakeLists.txt
@@ -42,18 +42,18 @@ ADD_SUBDIRECTORY(render)
ADD_SUBDIRECTORY(blenfont)
IF(WITH_OPENEXR)
- ADD_SUBDIRECTORY(imbuf/intern/openexr)
+ ADD_SUBDIRECTORY(imbuf/intern/openexr)
ENDIF(WITH_OPENEXR)
IF(WITH_DDS)
- ADD_SUBDIRECTORY(imbuf/intern/dds)
+ ADD_SUBDIRECTORY(imbuf/intern/dds)
ENDIF(WITH_DDS)
IF(WITH_QUICKTIME)
- ADD_SUBDIRECTORY(quicktime)
+ ADD_SUBDIRECTORY(quicktime)
ENDIF(WITH_QUICKTIME)
IF(WITH_PYTHON)
- ADD_SUBDIRECTORY(python)
+ ADD_SUBDIRECTORY(python)
ENDIF(WITH_PYTHON)
diff --git a/source/blender/avi/CMakeLists.txt b/source/blender/avi/CMakeLists.txt
index 4e48b689055..4738ea14292 100644
--- a/source/blender/avi/CMakeLists.txt
+++ b/source/blender/avi/CMakeLists.txt
@@ -27,8 +27,8 @@
FILE(GLOB SRC intern/*.c)
SET(INC
- . ../../../intern/guardedalloc
- ${JPEG_INC}
+ . ../../../intern/guardedalloc
+ ${JPEG_INC}
)
BLENDERLIB(bf_avi "${SRC}" "${INC}")
diff --git a/source/blender/avi/SConscript b/source/blender/avi/SConscript
index 0bf8c3c74db..f6e5b787b58 100644
--- a/source/blender/avi/SConscript
+++ b/source/blender/avi/SConscript
@@ -1,4 +1,5 @@
#!/usr/bin/python
+#Import ('extra_includes')
Import ('env')
sources = env.Glob('intern/*.c')
@@ -6,4 +7,4 @@ sources = env.Glob('intern/*.c')
incs = '. #/intern/guardedalloc'
incs += ' ' + env['BF_JPEG_INC']
-env.BlenderLib ('bf_avi', sources, Split(incs), [], libtype=['core','player'], priority = [190,120] )
+env.BlenderLib ('bf_avi', sources, Split(incs), [], libtype=['core'], priority = [185] )
diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt
index 844a6899bf5..bc03e69eb88 100644
--- a/source/blender/blenfont/CMakeLists.txt
+++ b/source/blender/blenfont/CMakeLists.txt
@@ -25,17 +25,17 @@
FILE(GLOB SRC intern/*.c)
SET(INC
- ../../../intern/guardedalloc ../blenlib ../makesdna ../editors/include
- ../blenkernel ../../../extern/glew/include .
- ${FREETYPE_INCLUDE_DIRS}
+ ../../../intern/guardedalloc ../blenlib ../makesdna ../editors/include
+ ../blenkernel ../../../extern/glew/include .
+ ${FREETYPE_INCLUDE_DIRS}
)
IF(WITH_INTERNATIONAL)
- SET(INC ${INC} ${GETTEXT_INC})
+ SET(INC ${INC} ${GETTEXT_INC})
ENDIF(WITH_INTERNATIONAL)
IF(WIN32)
- ADD_DEFINITIONS(-D_WIN32 -DUSE_GETTEXT_DLL)
+ ADD_DEFINITIONS(-D_WIN32 -DUSE_GETTEXT_DLL)
ENDIF(WIN32)
BLENDERLIB(bf_blenfont "${SRC}" "${INC}")
diff --git a/source/blender/blenfont/SConscript b/source/blender/blenfont/SConscript
index d070d985247..fa6fa19a9ef 100644
--- a/source/blender/blenfont/SConscript
+++ b/source/blender/blenfont/SConscript
@@ -14,4 +14,4 @@ defs = ''
if sys.platform == 'win32':
defs += ' _WIN32 USE_GETTEXT_DLL'
-env.BlenderLib ( 'bf_blenfont', sources, Split(incs), Split(defs), libtype=['core','player'], priority=[210,210] )
+env.BlenderLib ( 'bf_blenfont', sources, Split(incs), Split(defs), libtype=['core'], priority=[210] )
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index 2cd72809579..432c3b5f854 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -151,7 +151,7 @@ void blf_font_draw(FontBLF *font, char *str)
void blf_font_buffer(FontBLF *font, char *str)
{
- unsigned char *data, *cbuf;
+ unsigned char *data;
unsigned int c;
GlyphBLF *g, *g_prev;
FT_Vector delta;
@@ -197,27 +197,30 @@ void blf_font_buffer(FontBLF *font, char *str)
pen_x += delta.x >> 6;
}
- chx= pen_x + ((int)g->pos_x);
- diff= g->height - ((int)g->pos_y);
- if (diff > 0) {
- if (g->pitch < 0)
- pen_y += diff;
- else
- pen_y -= diff;
- }
- else if (diff < 0) {
+ if (font->b_fbuf) {
+ chx= pen_x + ((int)g->pos_x);
+
+ diff= g->height - ((int)g->pos_y);
+
+ if (diff > 0) {
+ if (g->pitch < 0)
+ pen_y += diff;
+ else
+ pen_y -= diff;
+ }
+ else if (diff < 0) {
+ if (g->pitch < 0)
+ pen_y -= diff;
+ else
+ pen_y += diff;
+ }
+
+
if (g->pitch < 0)
- pen_y -= diff;
+ chy= pen_y - ((int)g->pos_y);
else
- pen_y += diff;
- }
+ chy= pen_y + ((int)g->pos_y);
- if (g->pitch < 0)
- chy= pen_y - ((int)g->pos_y);
- else
- chy= pen_y + ((int)g->pos_y);
-
- if (font->b_fbuf) {
if (chx >= 0 && chx < font->bw && pen_y >= 0 && pen_y < font->bh) {
if (g->pitch < 0)
yb= 0;
@@ -248,52 +251,20 @@ void blf_font_buffer(FontBLF *font, char *str)
yb--;
}
}
- }
- if (font->b_cbuf) {
- if (chx >= 0 && chx < font->bw && pen_y >= 0 && pen_y < font->bh) {
+ if (diff > 0) {
if (g->pitch < 0)
- yb= 0;
+ pen_x -= diff;
else
- yb= g->height-1;
-
- for (y= 0; y < g->height; y++) {
- for (x= 0; x < g->width; x++) {
- cbuf= font->b_cbuf + font->bch * ((chx + x) + ((pen_y + y)*font->bw));
- data= g->bitmap + x + (yb * g->pitch);
- a= data[0];
-
- if (a == 256) {
- cbuf[0]= font->b_col[0];
- cbuf[1]= font->b_col[1];
- cbuf[2]= font->b_col[2];
- }
- else {
- cbuf[0]= (font->b_col[0]*a) + (cbuf[0] * (256-a));
- cbuf[1]= (font->b_col[1]*a) + (cbuf[1] * (256-a));
- cbuf[2]= (font->b_col[2]*a) + (cbuf[2] * (256-a));
- }
- }
-
- if (g->pitch < 0)
- yb++;
- else
- yb--;
- }
+ pen_y += diff;
+ }
+ else if (diff < 0) {
+ if (g->pitch < 0)
+ pen_x += diff;
+ else
+ pen_y -= diff;
}
- }
- if (diff > 0) {
- if (g->pitch < 0)
- pen_x -= diff;
- else
- pen_y += diff;
- }
- else if (diff < 0) {
- if (g->pitch < 0)
- pen_x += diff;
- else
- pen_y -= diff;
}
pen_x += g->advance;
diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h
index 4724ee19aaa..d35acb5447a 100644
--- a/source/blender/blenkernel/BKE_action.h
+++ b/source/blender/blenkernel/BKE_action.h
@@ -66,7 +66,7 @@ void free_action(struct bAction *act);
void make_local_action(struct bAction *act);
/* Some kind of bounding box operation on the action */
-void calc_action_range(const struct bAction *act, float *start, float *end, short incl_modifiers);
+void calc_action_range(const struct bAction *act, float *start, float *end, int incl_hidden);
/* Does action have any motion data at all? */
short action_has_motion(const struct bAction *act);
diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h
index cc5b4dfdcaf..cabbaa7aa0f 100644
--- a/source/blender/blenkernel/BKE_animsys.h
+++ b/source/blender/blenkernel/BKE_animsys.h
@@ -55,9 +55,6 @@ void BKE_free_animdata(struct ID *id);
/* Copy AnimData */
struct AnimData *BKE_copy_animdata(struct AnimData *adt);
-/* Make Local */
-void BKE_animdata_make_local(struct AnimData *adt);
-
/* ************************************* */
/* KeyingSets API */
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index 1cbb2331782..0595134f5c9 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -74,6 +74,7 @@ struct bArmature *add_armature(char *name);
struct bArmature *get_armature(struct Object *ob);
void free_boneChildren(struct Bone *bone);
void free_bones (struct bArmature *arm);
+void unlink_armature(struct bArmature *arm);
void free_armature(struct bArmature *arm);
void make_local_armature(struct bArmature *arm);
struct bArmature *copy_armature(struct bArmature *arm);
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index d60737d62fe..42ee11587a7 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -43,7 +43,7 @@ struct bContext;
struct ReportList;
#define BLENDER_VERSION 250
-#define BLENDER_SUBVERSION 3
+#define BLENDER_SUBVERSION 2
#define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0
diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h
index 4d24a2433b3..6ec988e111e 100644
--- a/source/blender/blenkernel/BKE_brush.h
+++ b/source/blender/blenkernel/BKE_brush.h
@@ -64,6 +64,7 @@ float brush_curve_strength(struct Brush *br, float p, const float len);
/* sampling */
float brush_sample_falloff(struct Brush *brush, float dist);
+float brush_sample_falloff_noalpha(struct Brush *brush, float dist);
void brush_sample_tex(struct Brush *brush, float *xy, float *rgba);
void brush_imbuf_new(struct Brush *brush, short flt, short texfalloff, int size,
struct ImBuf **imbuf);
diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h
index a0061173438..6e69906b71d 100644
--- a/source/blender/blenkernel/BKE_constraint.h
+++ b/source/blender/blenkernel/BKE_constraint.h
@@ -49,7 +49,6 @@ typedef struct bConstraintOb {
float startmat[4][4]; /* original matrix (before constraint solving) */
short type; /* type of owner */
- short rotOrder; /* rotation order for constraint owner (as defined in eEulerRotationOrders in BLI_arithb.h) */
} bConstraintOb;
/* ---------------------------------------------------------------------------- */
diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h
index b9f3ee2dd6e..e5a8df1a932 100644
--- a/source/blender/blenkernel/BKE_curve.h
+++ b/source/blender/blenkernel/BKE_curve.h
@@ -47,7 +47,7 @@ struct BevList;
#define SEGMENTSU(nu) ( ((nu)->flagu & CU_CYCLIC) ? (nu)->pntsu : (nu)->pntsu-1 )
#define SEGMENTSV(nu) ( ((nu)->flagv & CU_CYCLIC) ? (nu)->pntsv : (nu)->pntsv-1 )
-#define CU_DO_TILT(cu, nu) (((nu->flag & CU_2D) && (cu->flag & CU_3D)==0) ? 0 : 1)
+#define CU_DO_TILT(cu, nu) (((nu->type & CU_2D) && (cu->flag & CU_3D)==0) ? 0 : 1)
#define CU_DO_RADIUS(cu, nu) ((CU_DO_TILT(cu, nu) || cu->bevobj || cu->ext1!=0.0 || cu->ext2!=0.0) ? 1:0)
diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h
index e242ead3b87..70b6c1d13f4 100644
--- a/source/blender/blenkernel/BKE_depsgraph.h
+++ b/source/blender/blenkernel/BKE_depsgraph.h
@@ -32,8 +32,6 @@
#define DEPS_DEBUG
*/
-struct ID;
-struct Main;
struct Scene;
struct DagNodeQueue;
struct DagForest;
@@ -105,9 +103,8 @@ void DAG_object_update_flags(struct Scene *sce, struct Object *ob, unsigned int
/* flushes all recalc flags in objects down the dependency tree */
void DAG_scene_flush_update(struct Scene *sce, unsigned int lay, int time);
- /* flushes all recalc flags for this object down the dependency tree,
- but not the DAG only supports objects and object data currently */
-void DAG_id_flush_update(struct ID *id, short flag);
+ /* flushes all recalc flags for this object down the dependency tree */
+void DAG_object_flush_update(struct Scene *sce, struct Object *ob, short flag);
void DAG_pose_sort(struct Object *ob);
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index 5d0b89220d5..6323258ff43 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -119,6 +119,7 @@ typedef struct Global {
#define G_GREASEPENCIL (1 << 17)
/* #define G_AUTOMATKEYS (1 << 30) also removed */
+#define G_HIDDENHANDLES (1 << 31) /* used for curves only */
/* G.fileflags */
diff --git a/source/blender/blenkernel/BKE_group.h b/source/blender/blenkernel/BKE_group.h
index b66ddf13527..35084aabadf 100644
--- a/source/blender/blenkernel/BKE_group.h
+++ b/source/blender/blenkernel/BKE_group.h
@@ -41,7 +41,6 @@ void free_group_object(struct GroupObject *go);
void free_group(struct Group *group);
void unlink_group(struct Group *group);
struct Group *add_group(char *name);
-struct Group *copy_group(struct Group *group);
void add_to_group(struct Group *group, struct Object *ob);
int rem_from_group(struct Group *group, struct Object *ob);
struct Group *find_group(struct Object *ob, struct Group *group);
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index 54722dac910..4e7db115168 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -46,9 +46,6 @@ void *copy_libblock(void *rt);
void id_lib_extern(struct ID *id);
void id_us_plus(struct ID *id);
void id_us_min(struct ID *id);
-int id_make_local(struct ID *id, int test);
-int id_copy(struct ID *id, struct ID **newid, int test);
-int id_unlink(struct ID *id, int test);
int check_for_dupid(struct ListBase *lb, struct ID *id, char *name);
int new_id(struct ListBase *lb, struct ID *id, const char *name);
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index 27c75126026..b65d77751e2 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -90,10 +90,7 @@ typedef enum {
eModifierTypeFlag_UsesPointCache = (1<<6),
/* For physics modifiers, max one per type */
- eModifierTypeFlag_Single = (1<<7),
-
- /* Some modifier can't be added manually by user */
- eModifierTypeFlag_NoUserAdd = (1<<8)
+ eModifierTypeFlag_Single = (1<<7)
} ModifierTypeFlag;
typedef void (*ObjectWalkFunc)(void *userData, struct Object *ob, struct Object **obpoin);
diff --git a/source/blender/blenkernel/BKE_multires.h b/source/blender/blenkernel/BKE_multires.h
index a331479cad1..6558212519f 100644
--- a/source/blender/blenkernel/BKE_multires.h
+++ b/source/blender/blenkernel/BKE_multires.h
@@ -35,12 +35,10 @@ struct Object;
typedef struct MultiresSubsurf {
struct MultiresModifierData *mmd;
- struct Object *ob;
- int local_mmd;
+ struct Mesh *me;
} MultiresSubsurf;
/* MultiresDM */
-struct Object *MultiresDM_get_object(struct DerivedMesh *dm);
struct Mesh *MultiresDM_get_mesh(struct DerivedMesh *dm);
struct DerivedMesh *MultiresDM_new(struct MultiresSubsurf *, struct DerivedMesh*, int, int, int);
void *MultiresDM_get_vertnorm(struct DerivedMesh *);
@@ -60,8 +58,8 @@ void multires_mark_as_modified(struct Object *ob);
void multires_force_update(struct Object *ob);
-struct DerivedMesh *multires_dm_create_from_derived(struct MultiresModifierData*, int local_mmd, struct DerivedMesh*,
- struct Object *, int, int);
+struct DerivedMesh *multires_dm_create_from_derived(struct MultiresModifierData*, struct DerivedMesh*,
+ struct Mesh *, int, int);
struct MultiresModifierData *find_multires_modifier(struct Object *ob);
int multiresModifier_switch_level(struct Object *, const int);
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index cbb37918d04..4ac95b61a5e 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -25,7 +25,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): Bob Holcomb.
+ * Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -325,7 +325,7 @@ void ntreeGPUMaterialNodes(struct bNodeTree *ntree, struct GPUMaterial *mat);
#define CMP_NODE_COMBYUVA 234
#define CMP_NODE_DIFF_MATTE 235
#define CMP_NODE_COLOR_SPILL 236
-#define CMP_NODE_CHROMA_MATTE 237
+#define CMP_NODE_CHROMA 237
#define CMP_NODE_CHANNEL_MATTE 238
#define CMP_NODE_FLIP 239
#define CMP_NODE_SPLITVIEWER 240
@@ -345,9 +345,6 @@ void ntreeGPUMaterialNodes(struct bNodeTree *ntree, struct GPUMaterial *mat);
#define CMP_NODE_DBLUR 254
#define CMP_NODE_BILATERALBLUR 255
#define CMP_NODE_PREMULKEY 256
-#define CMP_NODE_DIST_MATTE 257
-#define CMP_NODE_VIEW_LEVELS 258
-#define CMP_NODE_COLOR_MATTE 259
#define CMP_NODE_GLARE 301
#define CMP_NODE_TONEMAP 302
@@ -424,9 +421,10 @@ extern struct ListBase node_all_textures;
/* API */
int ntreeTexTagAnimated(struct bNodeTree *ntree);
-void ntreeTexSetPreviewFlag(int);
-void ntreeTexExecTree(struct bNodeTree *ntree, struct TexResult *target, float *coord, float *dxt, float *dyt, short thread, struct Tex *tex, short which_output, int cfra);
+void ntreeTexUpdatePreviews( struct bNodeTree* nodetree );
+void ntreeTexExecTree(struct bNodeTree *ntree, struct TexResult *target, float *coord, float *dxt, float *dyt, char do_preview, short thread, struct Tex *tex, short which_output, int cfra);
void ntreeTexCheckCyclics(struct bNodeTree *ntree);
+void ntreeTexAssignIndex(struct bNodeTree *ntree, struct bNode *node);
char* ntreeTexOutputMenu(struct bNodeTree *ntree);
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 1cb6efeb838..a57529ccf75 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -115,11 +115,6 @@ void object_handle_update(struct Scene *scene, struct Object *ob);
float give_timeoffset(struct Object *ob);
int give_obdata_texspace(struct Object *ob, int **texflag, float **loc, float **size, float **rot);
-
-int object_insert_ptcache(struct Object *ob);
-// void object_delete_ptcache(struct Object *ob, int index);
-
-
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index 7dc9e4499c6..67b260b2348 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -29,20 +29,11 @@
#define BKE_PAINT_H
struct Brush;
-struct MFace;
-struct MultireModifierData;
-struct MVert;
struct Object;
struct Paint;
struct Scene;
-struct StrokeCache;
-extern const char PAINT_CURSOR_SCULPT[3];
-extern const char PAINT_CURSOR_VERTEX_PAINT[3];
-extern const char PAINT_CURSOR_WEIGHT_PAINT[3];
-extern const char PAINT_CURSOR_TEXTURE_PAINT[3];
-
-void paint_init(struct Paint *p, const char col[3]);
+void paint_init(struct Paint *p, const char *brush_name);
void free_paint(struct Paint *p);
void copy_paint(struct Paint *orig, struct Paint *new);
@@ -57,39 +48,4 @@ void paint_brush_slot_remove(struct Paint *p);
* however hiding faces is useful */
int paint_facesel_test(struct Object *ob);
-/* Session data (mode-specific) */
-
-typedef struct SculptSession {
- struct ProjVert *projverts;
-
- /* Mesh data (not copied) can come either directly from a Mesh, or from a MultiresDM */
- struct MultiresModifierData *multires; /* Special handling for multires meshes */
- struct MVert *mvert;
- struct MFace *mface;
- int totvert, totface;
- float *face_normals;
-
- /* Mesh connectivity */
- struct ListBase *fmap;
- struct IndexNode *fmap_mem;
- int fmap_size;
-
- /* Used temporarily per-stroke */
- float *vertexcosnos;
- ListBase damaged_rects;
- ListBase damaged_verts;
-
- /* Used to cache the render of the active texture */
- unsigned int texcache_side, *texcache, texcache_actual;
-
- /* Layer brush persistence between strokes */
- float (*mesh_co_orig)[3]; /* Copy of the mesh vertices' locations */
- float *layer_disps; /* Displacements for each vertex */
-
- struct SculptStroke *stroke;
- struct StrokeCache *cache;
-} SculptSession;
-
-void free_sculptsession(SculptSession **);
-
#endif
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
index 15896477a6a..cf02efc34ac 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -59,9 +59,6 @@ struct SurfaceModifierData;
struct BVHTreeRay;
struct BVHTreeRayHit;
-#define PARTICLE_P ParticleData *pa; int p
-#define LOOP_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++)
-
typedef struct ParticleEffectorCache {
struct ParticleEffectorCache *next, *prev;
struct Object *ob;
@@ -112,10 +109,46 @@ typedef struct ParticleCacheKey{
float vel[3];
float rot[4];
float col[3];
- float time;
int steps;
} ParticleCacheKey;
+typedef struct ParticleEditKey{
+ float *co;
+ float *vel;
+ float *rot;
+ float *time;
+
+ float world_co[3];
+ float length;
+ short flag;
+} ParticleEditKey;
+
+typedef struct ParticleUndo {
+ struct ParticleUndo *next, *prev;
+ struct ParticleEditKey **keys;
+ struct KDTree *emitter_field;
+ struct ParticleData *particles;
+ float *emitter_cosnos;
+ int totpart, totkeys;
+ char name[64];
+} ParticleUndo;
+
+typedef struct ParticleEdit {
+ ListBase undo;
+ struct ParticleUndo *curundo;
+
+ ParticleEditKey **keys;
+ int totkeys;
+
+ int *mirror_cache;
+
+ struct KDTree *emitter_field;
+ float *emitter_cosnos;
+
+ char sel_col[3];
+ char nosel_col[3];
+} ParticleEdit;
+
typedef struct ParticleThreadContext {
/* shared */
struct Scene *scene;
@@ -207,10 +240,9 @@ int psys_check_enabled(struct Object *ob, struct ParticleSystem *psys);
void psys_free_boid_rules(struct ListBase *list);
void psys_free_settings(struct ParticleSettings *part);
void free_child_path_cache(struct ParticleSystem *psys);
-void psys_free_path_cache(struct ParticleSystem *psys, struct PTCacheEdit *edit);
+void psys_free_path_cache(struct ParticleSystem *psys);
void free_hair(struct ParticleSystem *psys, int softbody);
void free_keyed_keys(struct ParticleSystem *psys);
-void psys_free_particles(struct ParticleSystem *psys);
void psys_free(struct Object * ob, struct ParticleSystem * psys);
void psys_free_children(struct ParticleSystem *psys);
@@ -239,9 +271,9 @@ void psys_reset(struct ParticleSystem *psys, int mode);
void psys_find_parents(struct Object *ob, struct ParticleSystemModifierData *psmd, struct ParticleSystem *psys);
-void psys_cache_paths(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys, float cfra);
-void psys_cache_edit_paths(struct Scene *scene, struct Object *ob, struct PTCacheEdit *edit, float cfra);
+void psys_cache_paths(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys, float cfra, int editupdate);
void psys_cache_child_paths(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys, float cfra, int editupdate);
+void psys_update_world_cos(struct Object *ob, struct ParticleSystem *psys);
int do_guide(struct Scene *scene, struct ParticleKey *state, int pa_num, float time, struct ListBase *lb);
float psys_get_size(struct Object *ob, struct Material *ma, struct ParticleSystemModifierData *psmd, struct IpoCurve *icu_size, struct ParticleSystem *psys, struct ParticleSettings *part, struct ParticleData *pa, float *vg_size);
float psys_get_timestep(struct ParticleSettings *part);
@@ -327,6 +359,12 @@ void reset_particle(struct Scene *scene, struct ParticleData *pa, struct Particl
#define PSYS_EC_PARTICLE 4
#define PSYS_EC_REACTOR 8
+/* ParticleEditKey->flag */
+#define PEK_SELECT 1
+#define PEK_TO_SELECT 2
+#define PEK_TAG 4
+#define PEK_HIDE 8
+
/* index_dmcache */
#define DMCACHE_NOTFOUND -1
#define DMCACHE_ISCHILD -2
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
index 5ae10d736fd..5d9dddfe30d 100644
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@ -60,8 +60,8 @@
#define PTCACHE_TYPE_SOFTBODY 0
#define PTCACHE_TYPE_PARTICLES 1
#define PTCACHE_TYPE_CLOTH 2
-#define PTCACHE_TYPE_SMOKE_DOMAIN 3
-#define PTCACHE_TYPE_SMOKE_HIGHRES 4
+#define PTCACHE_TYPE_SMOKE_DOMAIN_LOW 3
+#define PTCACHE_TYPE_SMOKE_DOMAIN_HIGH 4
/* PTCache read return code */
#define PTCACHE_READ_EXACT 1
@@ -101,8 +101,6 @@ typedef struct PTCacheFile {
void *cur[BPHYS_TOT_DATA];
} PTCacheFile;
-#define PTCACHE_VEL_PER_SEC 1
-
typedef struct PTCacheID {
struct PTCacheID *next, *prev;
@@ -111,7 +109,6 @@ typedef struct PTCacheID {
void *calldata;
int type;
int stack_index;
- int flag;
/* flags defined in DNA_object_force.h */
unsigned int data_types, info_types;
@@ -154,76 +151,6 @@ typedef struct PTCacheBaker {
void *progresscontext;
} PTCacheBaker;
-/* PTCacheEditKey->flag */
-#define PEK_SELECT 1
-#define PEK_TAG 2
-#define PEK_HIDE 4
-#define PEK_USE_WCO 8
-
-typedef struct PTCacheEditKey{
- float *co;
- float *vel;
- float *rot;
- float *time;
-
- float world_co[3];
- float ftime;
- float length;
- short flag;
-} PTCacheEditKey;
-
-/* PTCacheEditPoint->flag */
-#define PEP_TAG 1
-#define PEP_EDIT_RECALC 2
-#define PEP_TRANSFORM 4
-#define PEP_HIDE 8
-
-typedef struct PTCacheEditPoint {
- struct PTCacheEditKey *keys;
- int totkey;
- short flag;
-} PTCacheEditPoint;
-
-typedef struct PTCacheUndo {
- struct PTCacheUndo *next, *prev;
- struct PTCacheEditPoint *points;
-
- /* particles stuff */
- struct ParticleData *particles;
- struct KDTree *emitter_field;
- float *emitter_cosnos;
- int psys_flag;
-
- /* cache stuff */
- struct ListBase mem_cache;
-
- int totpoint;
- char name[64];
-} PTCacheUndo;
-
-typedef struct PTCacheEdit {
- ListBase undo;
- struct PTCacheUndo *curundo;
- PTCacheEditPoint *points;
-
- struct PTCacheID pid;
-
- /* particles stuff */
- struct ParticleSystem *psys;
- struct ParticleData *particles;
- struct KDTree *emitter_field;
- float *emitter_cosnos;
- int *mirror_cache;
-
- struct ParticleCacheKey **pathcache; /* path cache (runtime) */
- ListBase pathcachebufs;
-
- int totpoint, totframes, totcached, edited;
-
- char sel_col[3];
- char nosel_col[3];
-} PTCacheEdit;
-
/* Particle functions */
void BKE_ptcache_make_particle_key(struct ParticleKey *key, int index, void **data, float time);
@@ -231,8 +158,7 @@ void BKE_ptcache_make_particle_key(struct ParticleKey *key, int index, void **da
void BKE_ptcache_id_from_softbody(PTCacheID *pid, struct Object *ob, struct SoftBody *sb);
void BKE_ptcache_id_from_particles(PTCacheID *pid, struct Object *ob, struct ParticleSystem *psys);
void BKE_ptcache_id_from_cloth(PTCacheID *pid, struct Object *ob, struct ClothModifierData *clmd);
-void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct SmokeModifierData *smd);
-void BKE_ptcache_id_from_smoke_turbulence(PTCacheID *pid, struct Object *ob, struct SmokeModifierData *smd);
+void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct SmokeModifierData *smd, int num);
void BKE_ptcache_ids_from_object(struct ListBase *lb, struct Object *ob);
@@ -253,10 +179,6 @@ void BKE_ptcache_update_info(PTCacheID *pid);
/* Size of cache data type. */
int BKE_ptcache_data_size(int data_type);
-/* Memory cache read/write helpers. */
-void BKE_ptcache_mem_init_pointers(struct PTCacheMem *pm);
-void BKE_ptcache_mem_incr_pointers(struct PTCacheMem *pm);
-
/* Copy a specific data type from cache data to point data. */
void BKE_ptcache_data_get(void **data, int type, int index, void *to);
@@ -275,7 +197,7 @@ int BKE_ptcache_get_continue_physics(void);
/******************* Allocate & free ***************/
struct PointCache *BKE_ptcache_add(struct ListBase *ptcaches);
-void BKE_ptcache_free_mem(struct ListBase *mem_cache);
+void BKE_ptache_free_mem(struct PointCache *cache);
void BKE_ptcache_free(struct PointCache *cache);
void BKE_ptcache_free_list(struct ListBase *ptcaches);
struct PointCache *BKE_ptcache_copy_list(struct ListBase *ptcaches_new, struct ListBase *ptcaches_old);
diff --git a/source/blender/blenkernel/BKE_sca.h b/source/blender/blenkernel/BKE_sca.h
index 1b8e61f136f..22c4f39148a 100644
--- a/source/blender/blenkernel/BKE_sca.h
+++ b/source/blender/blenkernel/BKE_sca.h
@@ -47,6 +47,7 @@ void unlink_actuators(struct ListBase *lb);
void free_actuator(struct bActuator *act);
void free_actuators(struct ListBase *lb);
+void free_text_controllers(struct Text *txt);
void free_sensor(struct bSensor *sens);
void free_sensors(struct ListBase *lb);
struct bSensor *copy_sensor(struct bSensor *sens);
diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h
index 686fc265de0..12a13a2b50c 100644
--- a/source/blender/blenkernel/BKE_scene.h
+++ b/source/blender/blenkernel/BKE_scene.h
@@ -84,5 +84,7 @@ int get_render_child_particle_number(struct RenderData *r, int num);
int get_render_shadow_samples(struct RenderData *r, int samples);
float get_render_aosss_error(struct RenderData *r, float error);
+void free_dome_warp_text(struct Text *txt);
+
#endif
diff --git a/source/blender/blenkernel/BKE_sculpt.h b/source/blender/blenkernel/BKE_sculpt.h
new file mode 100644
index 00000000000..9e5647a8775
--- /dev/null
+++ b/source/blender/blenkernel/BKE_sculpt.h
@@ -0,0 +1,72 @@
+/*
+ * $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) 2007 by Nicholas Bishop
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef BKE_SCULPT_H
+#define BKE_SCULPT_H
+
+struct MFace;
+struct MultireModifierData;
+struct MVert;
+struct Object;
+struct StrokeCache;
+
+typedef struct SculptSession {
+ struct ProjVert *projverts;
+
+ /* Mesh data (not copied) can come either directly from a Mesh, or from a MultiresDM */
+ struct MultiresModifierData *multires; /* Special handling for multires meshes */
+ struct MVert *mvert;
+ struct MFace *mface;
+ int totvert, totface;
+ float *face_normals;
+
+ /* Mesh connectivity */
+ struct ListBase *fmap;
+ struct IndexNode *fmap_mem;
+ int fmap_size;
+
+ /* Used temporarily per-stroke */
+ float *vertexcosnos;
+ ListBase damaged_rects;
+ ListBase damaged_verts;
+
+ /* Used to cache the render of the active texture */
+ unsigned int texcache_side, *texcache, texcache_actual;
+
+ /* Layer brush persistence between strokes */
+ float (*mesh_co_orig)[3]; /* Copy of the mesh vertices' locations */
+ float *layer_disps; /* Displacements for each vertex */
+
+ struct SculptStroke *stroke;
+ struct StrokeCache *cache;
+} SculptSession;
+
+void free_sculptsession(SculptSession **);
+
+#endif
diff --git a/source/blender/blenkernel/BKE_shrinkwrap.h b/source/blender/blenkernel/BKE_shrinkwrap.h
index 5b413ae4e44..eb0e3c4ef00 100644
--- a/source/blender/blenkernel/BKE_shrinkwrap.h
+++ b/source/blender/blenkernel/BKE_shrinkwrap.h
@@ -115,9 +115,9 @@ typedef struct ShrinkwrapCalcData
int vgroup; //Vertex group num
struct DerivedMesh *target; //mesh we are shrinking to
- SpaceTransform local2target; //transform to move between local and target space
+ SpaceTransform local2target; //transform to move bettwem local and target space
- float keepDist; //Distance to keep above target surface (units are in local space)
+ float keepDist; //Distance to kept from target (units are in local space)
} ShrinkwrapCalcData;
diff --git a/source/blender/blenkernel/BKE_smoke.h b/source/blender/blenkernel/BKE_smoke.h
index 0f8e9c5edf5..8dc38640e9a 100644
--- a/source/blender/blenkernel/BKE_smoke.h
+++ b/source/blender/blenkernel/BKE_smoke.h
@@ -32,15 +32,24 @@
#ifndef BKE_SMOKE_H_
#define BKE_SMOKE_H_
-typedef float (*bresenham_callback) (float *result, float *input, int res[3], int *pixel, float *tRay, float correct);
-
void smokeModifier_do(struct SmokeModifierData *smd, struct Scene *scene, struct Object *ob, struct DerivedMesh *dm, int useRenderParams, int isFinalCalc);
void smokeModifier_free (struct SmokeModifierData *smd);
void smokeModifier_reset(struct SmokeModifierData *smd);
-void smokeModifier_reset_turbulence(struct SmokeModifierData *smd);
void smokeModifier_createType(struct SmokeModifierData *smd);
+void smoke_set_tray(struct SmokeModifierData *smd, size_t index, float transparency);
+float smoke_get_tray(struct SmokeModifierData *smd, size_t index);
+float smoke_get_tvox(struct SmokeModifierData *smd, size_t index);
+void smoke_set_tvox(struct SmokeModifierData *smd, size_t index, float tvox);
+
+void smoke_set_bigtray(struct SmokeModifierData *smd, size_t index, float transparency);
+float smoke_get_bigtray(struct SmokeModifierData *smd, size_t index);
+float smoke_get_bigtvox(struct SmokeModifierData *smd, size_t index);
+void smoke_set_bigtvox(struct SmokeModifierData *smd, size_t index, float tvox);
+
long long smoke_get_mem_req(int xres, int yres, int zres, int amplify);
+void smoke_prepare_View(struct SmokeModifierData *smd, float *light);
+void smoke_prepare_bigView(struct SmokeModifierData *smd, float *light);
#endif /* BKE_SMOKE_H_ */
diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h
index e9f6eb21e36..1dd90b4dbda 100644
--- a/source/blender/blenkernel/BKE_sound.h
+++ b/source/blender/blenkernel/BKE_sound.h
@@ -54,9 +54,7 @@ void sound_delete(struct bContext *C, struct bSound* sound);
void sound_cache(struct bSound* sound, int ignore);
-void sound_delete_cache(struct bSound* sound);
-
-void sound_load(struct Main *main, struct bSound* sound);
+void sound_load(struct bSound* sound);
void sound_free(struct bSound* sound);
diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h
index bd14053d121..d288c0b6516 100644
--- a/source/blender/blenkernel/BKE_text.h
+++ b/source/blender/blenkernel/BKE_text.h
@@ -35,7 +35,6 @@
extern "C" {
#endif
-struct Main;
struct Text;
struct TextLine;
struct SpaceText;
@@ -47,7 +46,6 @@ struct Text* add_empty_text (char *name);
int reopen_text (struct Text *text);
struct Text* add_text (char *file, const char *relpath);
struct Text* copy_text (struct Text *ta);
-void unlink_text (struct Main *bmain, struct Text *text);
char* txt_to_buf (struct Text *text);
void txt_clean_text (struct Text *text);
diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h
index a9862ba586b..a1600ce5473 100644
--- a/source/blender/blenkernel/BKE_texture.h
+++ b/source/blender/blenkernel/BKE_texture.h
@@ -40,8 +40,6 @@ struct ColorBand;
struct HaloRen;
struct TexMapping;
struct EnvMap;
-struct PointDensity;
-struct VoxelData;
/* in ColorBand struct */
#define MAXCOLORBAND 32
@@ -77,16 +75,6 @@ void BKE_free_envmap(struct EnvMap *env);
struct EnvMap *BKE_add_envmap(void);
struct EnvMap *BKE_copy_envmap(struct EnvMap *env);
-void BKE_free_pointdensitydata(struct PointDensity *pd);
-void BKE_free_pointdensity(struct PointDensity *pd);
-struct PointDensity *BKE_add_pointdensity(void);
-struct PointDensity *BKE_copy_pointdensity(struct PointDensity *pd);
-
-void BKE_free_voxeldatadata(struct VoxelData *vd);
-void BKE_free_voxeldata(struct VoxelData *vd);
-struct VoxelData *BKE_add_voxeldata(void);
-struct VoxelData *BKE_copy_voxeldata(struct VoxelData *vd);
-
int BKE_texture_dependsOnTime(const struct Tex *texture);
#endif
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 68aed2b0184..8d1df98c5b4 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -27,57 +27,55 @@
FILE(GLOB SRC intern/*.c)
SET(INC
- . ../../../intern/guardedalloc ../../../intern/memutil ../editors/include ../blenlib ../makesdna
- ../render/extern/include ../../../intern/decimation/extern
- ../imbuf ../avi ../../../intern/elbeem/extern ../../../intern/opennl/extern
- ../../../intern/iksolver/extern ../blenloader
- ../nodes ../../../extern/glew/include ../gpu ../makesrna ../../../intern/smoke/extern
- ../../../intern/bsp/extern ../blenfont
- ../../../intern/audaspace/intern
- ../../../extern/lzo/minilzo
- ../../../extern/lzma
- ${ZLIB_INC}
+ . ../../../intern/guardedalloc ../../../intern/memutil ../editors/include ../blenlib ../makesdna
+ ../render/extern/include ../../../intern/decimation/extern
+ ../imbuf ../avi ../../../intern/elbeem/extern ../../../intern/opennl/extern
+ ../../../intern/iksolver/extern ../blenloader
+ ../nodes ../../../extern/glew/include ../gpu ../makesrna ../../../intern/smoke/extern
+ ../../../intern/bsp/extern ../blenfont
+ ../../../intern/audaspace/intern
+ ${ZLIB_INC}
)
IF(WITH_BULLET)
- SET(INC ${INC} ../../../extern/bullet2/src)
- ADD_DEFINITIONS(-DUSE_BULLET)
+ SET(INC ${INC} ../../../extern/bullet2/src)
+ ADD_DEFINITIONS(-DUSE_BULLET)
ENDIF(WITH_BULLET)
IF(WITH_OPENEXR)
- ADD_DEFINITIONS(-DWITH_OPENEXR)
+ ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
IF(WITH_OPENJPEG)
- ADD_DEFINITIONS(-DWITH_OPENJPEG)
+ ADD_DEFINITIONS(-DWITH_OPENJPEG)
ENDIF(WITH_OPENJPEG)
IF(WITH_DDS)
- ADD_DEFINITIONS(-DWITH_DDS)
+ ADD_DEFINITIONS(-DWITH_DDS)
ENDIF(WITH_DDS)
IF(WITH_QUICKTIME)
- SET(INC ${INC} ../quicktime ${QUICKTIME_INC})
- ADD_DEFINITIONS(-DWITH_QUICKTIME)
+ SET(INC ${INC} ../quicktime ${QUICKTIME_INC})
+ ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
IF(WITH_FFMPEG)
- SET(INC ${INC} ${FFMPEG_INC})
- ADD_DEFINITIONS(-DWITH_FFMPEG)
+ SET(INC ${INC} ${FFMPEG_INC})
+ ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
IF(WITH_PYTHON)
- SET(INC ${INC} ../python ${PYTHON_INC})
+ SET(INC ${INC} ../python ${PYTHON_INC})
ELSE(WITH_PYTHON)
- ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ ADD_DEFINITIONS(-DDISABLE_PYTHON)
ENDIF(WITH_PYTHON)
IF(NOT WITH_ELBEEM)
- ADD_DEFINITIONS(-DDISABLE_ELBEEM)
+ ADD_DEFINITIONS(-DDISABLE_ELBEEM)
ENDIF(NOT WITH_ELBEEM)
IF(WIN32)
- SET(INC ${INC} ${PTHREADS_INC})
+ SET(INC ${INC} ${PTHREADS_INC})
ENDIF(WIN32)
BLENDERLIB(bf_blenkernel "${SRC}" "${INC}")
diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript
index f14c624b40e..accaaef1e2f 100644
--- a/source/blender/blenkernel/SConscript
+++ b/source/blender/blenkernel/SConscript
@@ -11,8 +11,6 @@ incs += ' #/extern/bullet2/src'
incs += ' #/intern/opennl/extern #/intern/bsp/extern'
incs += ' ../gpu #/extern/glew/include'
incs += ' #/intern/smoke/extern'
-incs += ' #/extern/lzo/minilzo'
-incs += ' #/extern/lzma'
incs += ' #/intern/audaspace/intern'
incs += ' ' + env['BF_OPENGL_INC']
@@ -62,10 +60,10 @@ if env['BF_NO_ELBEEM']:
if env['WITH_BF_LCMS']:
defs.append('WITH_LCMS')
-# if env['BF_UNIT_TEST']:
-# defs.append('UNIT_TEST')
+if env['WITH_BF_UNIT_TEST']:
+ defs.append('WITH_UNIT_TEST')
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
-env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [166,25] )
+env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core'], priority = [165] )
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 43b9a63a2c1..84cccd8b939 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -2077,7 +2077,7 @@ static void clear_mesh_caches(Object *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)|(ob && ob->mode & OB_MODE_PARTICLE_EDIT);
int needMapping = editing && (ob==obact);
float min[3], max[3];
diff --git a/source/blender/blenkernel/intern/Makefile b/source/blender/blenkernel/intern/Makefile
index 6c2edc9e25f..d6d41d6579e 100644
--- a/source/blender/blenkernel/intern/Makefile
+++ b/source/blender/blenkernel/intern/Makefile
@@ -90,10 +90,6 @@ CPPFLAGS += -I$(NAN_BULLET2)/include
CPPFLAGS += -I$(NAN_FREETYPE)/include
CPPFLAGS += -I$(NAN_FREETYPE)/include/freetype2
-# lzo and lzma, for pointcache
-CPPFLAGS += -I$(NAN_LZO)/minilzo
-CPPFLAGS += -I$(NAN_LZMA)
-
ifeq ($(WITH_FFMPEG),true)
CPPFLAGS += -DWITH_FFMPEG
CPPFLAGS += $(NAN_FFMPEGCFLAGS)
@@ -115,4 +111,3 @@ ifeq ($(WITH_QUICKTIME), true)
CPPFLAGS += -I../../quicktime
CPPFLAGS += -DWITH_QUICKTIME
endif
-
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 47de044ea25..f4d4eb1cc9c 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -410,9 +410,8 @@ bActionGroup *action_groups_find_named (bAction *act, const char name[])
bPoseChannel *get_pose_channel(const bPose *pose, const char *name)
{
bPoseChannel *chan;
-
- if (ELEM(NULL, pose, name) || (name[0] == 0))
- return NULL;
+
+ if (pose==NULL) return NULL;
for (chan=pose->chanbase.first; chan; chan=chan->next) {
if (chan->name[0] == name[0]) {
@@ -838,15 +837,14 @@ short action_has_motion(const bAction *act)
}
/* Calculate the extents of given action */
-void calc_action_range(const bAction *act, float *start, float *end, short incl_modifiers)
+void calc_action_range(const bAction *act, float *start, float *end, int incl_hidden)
{
FCurve *fcu;
float min=999999999.0f, max=-999999999.0f;
- short foundvert=0, foundmod=0;
+ short foundvert=0;
if (act) {
for (fcu= act->curves.first; fcu; fcu= fcu->next) {
- /* if curve has keyframes, consider them first */
if (fcu->totvert) {
float nmin, nmax;
@@ -859,53 +857,10 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_
foundvert= 1;
}
-
- /* if incl_modifiers is enabled, need to consider modifiers too
- * - only really care about the last modifier
- */
- if ((incl_modifiers) && (fcu->modifiers.last)) {
- FModifier *fcm= fcu->modifiers.last;
-
- /* only use the maximum sensible limits of the modifiers if they are more extreme */
- switch (fcm->type) {
- case FMODIFIER_TYPE_LIMITS: /* Limits F-Modifier */
- {
- FMod_Limits *fmd= (FMod_Limits *)fcm->data;
-
- if (fmd->flag & FCM_LIMIT_XMIN) {
- min= MIN2(min, fmd->rect.xmin);
- }
- if (fmd->flag & FCM_LIMIT_XMAX) {
- max= MAX2(max, fmd->rect.xmax);
- }
- }
- break;
-
- case FMODIFIER_TYPE_CYCLES: /* Cycles F-Modifier */
- {
- FMod_Cycles *fmd= (FMod_Cycles *)fcm->data;
-
- if (fmd->before_mode != FCM_EXTRAPOLATE_NONE)
- min= MINAFRAMEF;
- if (fmd->after_mode != FCM_EXTRAPOLATE_NONE)
- max= MAXFRAMEF;
- }
- break;
-
- // TODO: function modifier may need some special limits
-
- default: /* all other standard modifiers are on the infinite range... */
- min= MINAFRAMEF;
- max= MAXFRAMEF;
- break;
- }
-
- foundmod= 1;
- }
}
}
- if (foundvert || foundmod) {
+ if (foundvert) {
if(min==max) max+= 1.0f;
*start= min;
*end= max;
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index eb74dc1fbfc..6c1b8eb9000 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -271,8 +271,8 @@ int where_on_path(Object *ob, float ctime, float *vec, float *dir) /* returns OK
nu= cu->nurb.first;
/* make sure that first and last frame are included in the vectors here */
- if(nu->type == CU_POLY) set_four_ipo(1.0f-fac, data, KEY_LINEAR);
- else if(nu->type == CU_BEZIER) set_four_ipo(1.0f-fac, data, KEY_LINEAR);
+ if((nu->type & 7)==CU_POLY) set_four_ipo(1.0f-fac, data, KEY_LINEAR);
+ else if((nu->type & 7)==CU_BEZIER) set_four_ipo(1.0f-fac, data, KEY_LINEAR);
else if(s0==s1 || p2==p3) set_four_ipo(1.0f-fac, data, KEY_CARDINAL);
else set_four_ipo(1.0f-fac, data, KEY_BSPLINE);
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 0e8450025da..5eaf2133515 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -204,35 +204,15 @@ AnimData *BKE_copy_animdata (AnimData *adt)
return dadt;
}
-/* Make Local -------------------------------------------- */
-
-static void make_local_strips(ListBase *strips)
-{
- NlaStrip *strip;
-
- for(strip=strips->first; strip; strip=strip->next) {
- if(strip->act) make_local_action(strip->act);
- if(strip->remap && strip->remap->target) make_local_action(strip->remap->target);
-
- make_local_strips(&strip->strips);
- }
-}
-
-void BKE_animdata_make_local(AnimData *adt)
-{
- NlaTrack *nlt;
-
- if(adt->action) make_local_action(adt->action);
- if(adt->tmpact) make_local_action(adt->tmpact);
- if(adt->remap && adt->remap->target) make_local_action(adt->remap->target);
-
- for(nlt=adt->nla_tracks.first; nlt; nlt=nlt->next)
- make_local_strips(&nlt->strips);
-}
-
/* *********************************** */
/* KeyingSet API */
+/* NOTES:
+ * It is very likely that there will be two copies of the api - one for internal use,
+ * and one 'operator' based wrapper of the internal API, which should allow for access
+ * from Python/scripts so that riggers can automate the creation of KeyingSets for their rigs.
+ */
+
/* Finding Tools --------------------------- */
/* Find the first path that matches the given criteria */
@@ -265,7 +245,7 @@ KS_Path *BKE_keyingset_find_destination (KeyingSet *ks, ID *id, const char group
if ((ksp->rna_path==0) || strcmp(rna_path, ksp->rna_path))
eq_path= 0;
- /* index - need to compare whole-array setting too... */
+ /* index */
if (ksp->array_index != array_index)
eq_index= 0;
@@ -319,25 +299,18 @@ void BKE_keyingset_add_destination (KeyingSet *ks, ID *id, const char group_name
KS_Path *ksp;
/* sanity checks */
- if ELEM(NULL, ks, rna_path) {
- printf("ERROR: no Keying Set and/or RNA Path to add destination with \n");
+ if ELEM(NULL, ks, rna_path)
return;
- }
/* ID is optional for relative KeyingSets, but is necessary for absolute KeyingSets */
if (id == NULL) {
- if (ks->flag & KEYINGSET_ABSOLUTE) {
- printf("ERROR: No ID provided for absolute destination. \n");
+ if (ks->flag & KEYINGSET_ABSOLUTE)
return;
- }
}
/* don't add if there is already a matching KS_Path in the KeyingSet */
- if (BKE_keyingset_find_destination(ks, id, group_name, rna_path, array_index, groupmode)) {
- if (G.f & G_DEBUG)
- printf("ERROR: destination already exists in Keying Set \n");
+ if (BKE_keyingset_find_destination(ks, id, group_name, rna_path, array_index, groupmode))
return;
- }
/* allocate a new KeyingSet Path */
ksp= MEM_callocN(sizeof(KS_Path), "KeyingSet Path");
@@ -467,19 +440,19 @@ static short animsys_write_rna_setting (PointerRNA *ptr, char *path, int array_i
switch (RNA_property_type(prop))
{
case PROP_BOOLEAN:
- if (RNA_property_array_length(&new_ptr, prop))
+ if (RNA_property_array_length(prop))
RNA_property_boolean_set_index(&new_ptr, prop, array_index, (int)value);
else
RNA_property_boolean_set(&new_ptr, prop, (int)value);
break;
case PROP_INT:
- if (RNA_property_array_length(&new_ptr, prop))
+ if (RNA_property_array_length(prop))
RNA_property_int_set_index(&new_ptr, prop, array_index, (int)value);
else
RNA_property_int_set(&new_ptr, prop, (int)value);
break;
case PROP_FLOAT:
- if (RNA_property_array_length(&new_ptr, prop))
+ if (RNA_property_array_length(prop))
RNA_property_float_set_index(&new_ptr, prop, array_index, value);
else
RNA_property_float_set(&new_ptr, prop, value);
@@ -1204,19 +1177,19 @@ void nladata_flush_channels (ListBase *channels)
switch (RNA_property_type(prop))
{
case PROP_BOOLEAN:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_length(prop))
RNA_property_boolean_set_index(ptr, prop, array_index, (int)value);
else
RNA_property_boolean_set(ptr, prop, (int)value);
break;
case PROP_INT:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_length(prop))
RNA_property_int_set_index(ptr, prop, array_index, (int)value);
else
RNA_property_int_set(ptr, prop, (int)value);
break;
case PROP_FLOAT:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_length(prop))
RNA_property_float_set_index(ptr, prop, array_index, value);
else
RNA_property_float_set(ptr, prop, value);
@@ -1290,7 +1263,7 @@ static void animsys_evaluate_nla (PointerRNA *ptr, AnimData *adt, float ctime)
dummy_strip.act= adt->action;
dummy_strip.remap= adt->remap;
- /* action range is calculated taking F-Modifiers into account (which making new strips doesn't do due to the troublesome nature of that) */
+ // FIXME: what happens when we want to included F-Modifier access?
calc_action_range(dummy_strip.act, &dummy_strip.actstart, &dummy_strip.actend, 1);
dummy_strip.start = dummy_strip.actstart;
dummy_strip.end = (IS_EQ(dummy_strip.actstart, dummy_strip.actend)) ? (dummy_strip.actstart + 1.0f): (dummy_strip.actend);
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index e568f1b2c0e..7b894d79b45 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -130,6 +130,7 @@ void free_bones (bArmature *arm)
void free_armature(bArmature *arm)
{
if (arm) {
+ /* unlink_armature(arm);*/
free_bones(arm);
/* free editmode data */
@@ -1987,9 +1988,9 @@ void chan_calc_mat(bPoseChannel *chan)
SizeToMat3(chan->size, smat);
/* rotations may either be quats or eulers (no rotation modes for now...) */
- if (chan->rotmode > 0) {
+ if (chan->rotmode) {
/* euler rotations (will cause gimble lock... no rotation order to solve that yet) */
- EulOToMat3(chan->eul, chan->rotmode, rmat);
+ EulToMat3(chan->eul, rmat);
}
else {
/* quats are normalised before use to eliminate scaling issues */
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index f261b020717..746dc6c59cc 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -626,7 +626,8 @@ void BKE_write_undo(bContext *C, char *name)
}
}
-/* 1= an undo, -1 is a redo. we have to make sure 'curundo' remains at current situation */
+/* 1= an undo, -1 is a redo. we have to make sure 'curundo' remains at current situation
+ * Note, ALWAYS call sound_initialize_sounds after BKE_undo_step() */
void BKE_undo_step(bContext *C, int step)
{
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index 18f065b59d9..d8926fc5753 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -74,15 +74,14 @@ static int rule_goal_avoid(BoidRule *rule, BoidBrainData *bbd, BoidValues *val,
BoidSettings *boids = bbd->part->boids;
ParticleEffectorCache *ec;
Object *priority_ob = NULL;
- BoidParticle *bpa = pa->boid;
float vec[3] = {0.0f, 0.0f, 0.0f}, loc[3] = {0.0f, 0.0f, 0.0f};
float mul = (rule->type == eBoidRuleType_Avoid ? 1.0 : -1.0);
- float priority = 0.0f, len = 0.0f;
+ float priority = 0.0f, len;
int ret = 0;
/* first find out goal/predator with highest priority */
/* if rule->ob specified use it */
- if(gabr->ob && (rule->type != eBoidRuleType_Goal || gabr->ob != bpa->ground)) {
+ if(gabr->ob && (rule->type != eBoidRuleType_Goal || gabr->ob != pa->stick_ob)) {
PartDeflect *pd = gabr->ob->pd;
float vec_to_part[3];
@@ -105,7 +104,7 @@ static int rule_goal_avoid(BoidRule *rule, BoidBrainData *bbd, BoidValues *val,
PartDeflect *pd = eob->pd;
/* skip current object */
- if(rule->type == eBoidRuleType_Goal && eob == bpa->ground)
+ if(rule->type == eBoidRuleType_Goal && eob == pa->stick_ob)
continue;
if(pd->forcefield == PFIELD_BOID && mul * pd->f_strength > 0.0f) {
@@ -170,10 +169,10 @@ static int rule_goal_avoid(BoidRule *rule, BoidBrainData *bbd, BoidValues *val,
VECCOPY(bbd->goal_nor, nor);
}
}
- else if(rule->type == eBoidRuleType_Avoid && bpa->data.mode == eBoidMode_Climbing &&
+ else if(rule->type == eBoidRuleType_Avoid && pa->boid->mode == eBoidMode_Climbing &&
priority > 2.0f * gabr->fear_factor) {
/* detach from surface and try to fly away from danger */
- VECCOPY(vec_to_part, bpa->gravity);
+ VECCOPY(vec_to_part, pa->r_ve);
VecMulf(vec_to_part, -1.0f);
}
@@ -206,7 +205,6 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
KDTreeNearest *ptn = NULL;
ParticleEffectorCache *ec;
ParticleTarget *pt;
- BoidParticle *bpa = pa->boid;
float vec[3] = {0.0f, 0.0f, 0.0f}, loc[3] = {0.0f, 0.0f, 0.0f};
float co1[3], vel1[3], co2[3], vel2[3];
float len, t, inp, t_min = 2.0f;
@@ -233,7 +231,7 @@ static int rule_avoid_collision(BoidRule *rule, BoidBrainData *bbd, BoidValues *
Object *eob = ec->ob;
/* don't check with current ground object */
- if(eob == bpa->ground)
+ if(eob == pa->stick_ob)
continue;
col.md = ( CollisionModifierData * ) ( modifiers_findByType ( eob, eModifierType_Collision ) );
@@ -560,19 +558,18 @@ static int rule_follow_leader(BoidRule *rule, BoidBrainData *bbd, BoidValues *va
}
static int rule_average_speed(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, ParticleData *pa)
{
- BoidParticle *bpa = pa->boid;
BoidRuleAverageSpeed *asbr = (BoidRuleAverageSpeed*)rule;
float vec[3] = {0.0f, 0.0f, 0.0f};
if(asbr->wander > 0.0f) {
/* abuse pa->r_ave for wandering */
- bpa->wander[0] += asbr->wander * (-1.0f + 2.0f * BLI_frand());
- bpa->wander[1] += asbr->wander * (-1.0f + 2.0f * BLI_frand());
- bpa->wander[2] += asbr->wander * (-1.0f + 2.0f * BLI_frand());
+ pa->r_ave[0] += asbr->wander * (-1.0f + 2.0f * BLI_frand());
+ pa->r_ave[1] += asbr->wander * (-1.0f + 2.0f * BLI_frand());
+ pa->r_ave[2] += asbr->wander * (-1.0f + 2.0f * BLI_frand());
- Normalize(bpa->wander);
+ Normalize(pa->r_ave);
- VECCOPY(vec, bpa->wander);
+ VECCOPY(vec, pa->r_ave);
QuatMulVecf(pa->prev_state.rot, vec);
@@ -617,8 +614,7 @@ static int rule_fight(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti
KDTreeNearest *ptn = NULL;
ParticleTarget *pt;
ParticleData *epars;
- ParticleData *enemy_pa = NULL;
- BoidParticle *bpa;
+ ParticleData *enemy_pa;
/* friends & enemies */
float closest_enemy[3] = {0.0f,0.0f,0.0f};
float closest_dist = fbr->distance + 1.0f;
@@ -628,10 +624,8 @@ static int rule_fight(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti
/* calculate own group strength */
int neighbors = BLI_kdtree_range_search(bbd->psys->tree, fbr->distance, pa->prev_state.co, NULL, &ptn);
- for(n=0; n<neighbors; n++) {
- bpa = bbd->psys->particles[ptn[n].index].boid;
- health += bpa->data.health;
- }
+ for(n=0; n<neighbors; n++)
+ health += bbd->psys->particles[ptn[n].index].boid->health;
f_strength += bbd->part->boids->strength * health;
@@ -648,8 +642,7 @@ static int rule_fight(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti
health = 0.0f;
for(n=0; n<neighbors; n++) {
- bpa = epars[ptn[n].index].boid;
- health += bpa->data.health;
+ health += epars[ptn[n].index].boid->health;
if(n==0 && pt->mode==PTARGET_MODE_ENEMY && ptn[n].dist < closest_dist) {
VECCOPY(closest_enemy, ptn[n].co);
@@ -681,8 +674,7 @@ static int rule_fight(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti
/* must face enemy to fight */
if(Inpf(pa->prev_state.ave, enemy_dir)>0.5f) {
- bpa = enemy_pa->boid;
- bpa->data.health -= bbd->part->boids->strength * bbd->timestep * ((1.0f-bbd->part->boids->accuracy)*damage + bbd->part->boids->accuracy);
+ enemy_pa->boid->health -= bbd->part->boids->strength * bbd->timestep * ((1.0f-bbd->part->boids->accuracy)*damage + bbd->part->boids->accuracy);
}
}
else {
@@ -691,8 +683,7 @@ static int rule_fight(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti
}
/* check if boid doesn't want to fight */
- bpa = pa->boid;
- if(bpa->data.health/bbd->part->boids->health * bbd->part->boids->aggression < e_strength / f_strength) {
+ if(pa->boid->health/bbd->part->boids->health * bbd->part->boids->aggression < e_strength / f_strength) {
/* decide to flee */
if(closest_dist < fbr->flee_distance * fbr->distance) {
VecMulf(bbd->wanted_co, -1.0f);
@@ -730,20 +721,18 @@ static boid_rule_cb boid_rules[] = {
static void set_boid_values(BoidValues *val, BoidSettings *boids, ParticleData *pa)
{
- BoidParticle *bpa = pa->boid;
-
- if(ELEM(bpa->data.mode, eBoidMode_OnLand, eBoidMode_Climbing)) {
- val->max_speed = boids->land_max_speed * bpa->data.health/boids->health;
+ if(ELEM(pa->boid->mode, eBoidMode_OnLand, eBoidMode_Climbing)) {
+ val->max_speed = boids->land_max_speed * pa->boid->health/boids->health;
val->max_acc = boids->land_max_acc * val->max_speed;
- val->max_ave = boids->land_max_ave * M_PI * bpa->data.health/boids->health;
+ val->max_ave = boids->land_max_ave * M_PI * pa->boid->health/boids->health;
val->min_speed = 0.0f; /* no minimum speed on land */
val->personal_space = boids->land_personal_space;
- val->jump_speed = boids->land_jump_speed * bpa->data.health/boids->health;
+ val->jump_speed = boids->land_jump_speed * pa->boid->health/boids->health;
}
else {
- val->max_speed = boids->air_max_speed * bpa->data.health/boids->health;
+ val->max_speed = boids->air_max_speed * pa->boid->health/boids->health;
val->max_acc = boids->air_max_acc * val->max_speed;
- val->max_ave = boids->air_max_ave * M_PI * bpa->data.health/boids->health;
+ val->max_ave = boids->air_max_ave * M_PI * pa->boid->health/boids->health;
val->min_speed = boids->air_min_speed * boids->air_max_speed;
val->personal_space = boids->air_personal_space;
val->jump_speed = 0.0f; /* no jumping in air */
@@ -751,13 +740,11 @@ static void set_boid_values(BoidValues *val, BoidSettings *boids, ParticleData *
}
static Object *boid_find_ground(BoidBrainData *bbd, ParticleData *pa, float *ground_co, float *ground_nor)
{
- BoidParticle *bpa = pa->boid;
-
- if(bpa->data.mode == eBoidMode_Climbing) {
+ if(pa->boid->mode == eBoidMode_Climbing) {
SurfaceModifierData *surmd = NULL;
float x[3], v[3];
- surmd = (SurfaceModifierData *)modifiers_findByType ( bpa->ground, eModifierType_Surface );
+ surmd = (SurfaceModifierData *)modifiers_findByType ( pa->stick_ob, eModifierType_Surface );
/* take surface velocity into account */
effector_find_co(bbd->scene, pa->state.co, surmd, NULL, NULL, x, NULL, v, NULL);
@@ -766,7 +753,7 @@ static Object *boid_find_ground(BoidBrainData *bbd, ParticleData *pa, float *gro
/* get actual position on surface */
effector_find_co(bbd->scene, x, surmd, NULL, NULL, ground_co, ground_nor, NULL, NULL);
- return bpa->ground;
+ return pa->stick_ob;
}
else {
float zvec[3] = {0.0f, 0.0f, 2000.0f};
@@ -816,15 +803,13 @@ static Object *boid_find_ground(BoidBrainData *bbd, ParticleData *pa, float *gro
}
static int boid_rule_applies(ParticleData *pa, BoidSettings *boids, BoidRule *rule)
{
- BoidParticle *bpa = pa->boid;
-
if(rule==NULL)
return 0;
- if(ELEM(bpa->data.mode, eBoidMode_OnLand, eBoidMode_Climbing) && rule->flag & BOIDRULE_ON_LAND)
+ if(ELEM(pa->boid->mode, eBoidMode_OnLand, eBoidMode_Climbing) && rule->flag & BOIDRULE_ON_LAND)
return 1;
- if(bpa->data.mode==eBoidMode_InAir && rule->flag & BOIDRULE_IN_AIR)
+ if(pa->boid->mode==eBoidMode_InAir && rule->flag & BOIDRULE_IN_AIR)
return 1;
return 0;
@@ -850,13 +835,12 @@ void boids_precalc_rules(ParticleSettings *part, float cfra)
}
static void boid_climb(BoidSettings *boids, ParticleData *pa, float *surface_co, float *surface_nor)
{
- BoidParticle *bpa = pa->boid;
float nor[3], vel[3];
VECCOPY(nor, surface_nor);
- /* gather apparent gravity */
- VECADDFAC(bpa->gravity, bpa->gravity, surface_nor, -1.0);
- Normalize(bpa->gravity);
+ /* gather apparent gravity to r_ve */
+ VECADDFAC(pa->r_ve, pa->r_ve, surface_nor, -1.0);
+ Normalize(pa->r_ve);
/* raise boid it's size from surface */
VecMulf(nor, pa->size * boids->height);
@@ -893,17 +877,16 @@ static int apply_boid_rule(BoidBrainData *bbd, BoidRule *rule, BoidValues *val,
}
static BoidState *get_boid_state(BoidSettings *boids, ParticleData *pa) {
BoidState *state = boids->states.first;
- BoidParticle *bpa = pa->boid;
for(; state; state=state->next) {
- if(state->id==bpa->data.state_id)
+ if(state->id==pa->boid->state_id)
return state;
}
/* for some reason particle isn't at a valid state */
state = boids->states.first;
if(state)
- bpa->data.state_id = state->id;
+ pa->boid->state_id = state->id;
return state;
}
@@ -919,11 +902,9 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
BoidSettings *boids = bbd->part->boids;
BoidValues val;
BoidState *state = get_boid_state(boids, pa);
- BoidParticle *bpa = pa->boid;
- int rand;
//BoidCondition *cond;
- if(bpa->data.health <= 0.0f) {
+ if(pa->boid->health <= 0.0f) {
pa->alive = PARS_DYING;
return;
}
@@ -941,9 +922,7 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
bbd->wanted_co[0]=bbd->wanted_co[1]=bbd->wanted_co[2]=bbd->wanted_speed=0.0f;
/* create random seed for every particle & frame */
- BLI_srandom(bbd->psys->seed + p);
- rand = BLI_rand();
- BLI_srandom((int)bbd->cfra + rand);
+ BLI_srandom(bbd->psys->seed + p + (int)bbd->cfra + (int)(1000*pa->r_rot[0]));
set_boid_values(&val, bbd->part->boids, pa);
@@ -960,7 +939,7 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
case eBoidRulesetType_Random:
{
/* use random rule for each particle (allways same for same particle though) */
- rule = BLI_findlink(&state->rules, rand % BLI_countlist(&state->rules));
+ rule = BLI_findlink(&state->rules, (int)(1000.0f * pa->r_rot[1]) % BLI_countlist(&state->rules));
apply_boid_rule(bbd, rule, &val, pa, -1.0);
}
@@ -990,7 +969,7 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
}
/* decide on jumping & liftoff */
- if(bpa->data.mode == eBoidMode_OnLand) {
+ if(pa->boid->mode == eBoidMode_OnLand) {
/* fuzziness makes boids capable of misjudgement */
float mul = 1.0 + state->rule_fuzziness;
@@ -1004,7 +983,7 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
Normalize2(cvel);
if(Inp2f(cvel, dir) > 0.95 / mul)
- bpa->data.mode = eBoidMode_Liftoff;
+ pa->boid->mode = eBoidMode_Liftoff;
}
else if(val.jump_speed > 0.0f) {
float jump_v[3];
@@ -1057,7 +1036,7 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
if(jump) {
VECCOPY(pa->prev_state.vel, jump_v);
- bpa->data.mode = eBoidMode_Falling;
+ pa->boid->mode = eBoidMode_Falling;
}
}
}
@@ -1066,7 +1045,6 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
void boid_body(BoidBrainData *bbd, ParticleData *pa)
{
BoidSettings *boids = bbd->part->boids;
- BoidParticle *bpa = pa->boid;
BoidValues val;
float acc[3] = {0.0f, 0.0f, 0.0f}, tan_acc[3], nor_acc[3];
float dvec[3], bvec[3];
@@ -1088,10 +1066,10 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
pa_mass*=pa->size;
/* if boids can't fly they fall to the ground */
- if((boids->options & BOID_ALLOW_FLIGHT)==0 && ELEM(bpa->data.mode, eBoidMode_OnLand, eBoidMode_Climbing)==0 && bbd->part->acc[2] != 0.0f)
- bpa->data.mode = eBoidMode_Falling;
+ if((boids->options & BOID_ALLOW_FLIGHT)==0 && ELEM(pa->boid->mode, eBoidMode_OnLand, eBoidMode_Climbing)==0 && bbd->part->acc[2] != 0.0f)
+ pa->boid->mode = eBoidMode_Falling;
- if(bpa->data.mode == eBoidMode_Falling) {
+ if(pa->boid->mode == eBoidMode_Falling) {
/* Falling boids are only effected by gravity. */
acc[2] = bbd->part->acc[2];
}
@@ -1101,14 +1079,14 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
float level = landing_level + 1.0f;
float new_vel[3];
- if(bpa->data.mode == eBoidMode_Liftoff) {
- bpa->data.mode = eBoidMode_InAir;
- bpa->ground = boid_find_ground(bbd, pa, ground_co, ground_nor);
+ if(pa->boid->mode == eBoidMode_Liftoff) {
+ pa->boid->mode = eBoidMode_InAir;
+ pa->stick_ob = boid_find_ground(bbd, pa, ground_co, ground_nor);
}
- else if(bpa->data.mode == eBoidMode_InAir && boids->options & BOID_ALLOW_LAND) {
+ else if(pa->boid->mode == eBoidMode_InAir && boids->options & BOID_ALLOW_LAND) {
/* auto-leveling & landing if close to ground */
- bpa->ground = boid_find_ground(bbd, pa, ground_co, ground_nor);
+ pa->stick_ob = boid_find_ground(bbd, pa, ground_co, ground_nor);
/* level = how many particle sizes above ground */
level = (pa->prev_state.co[2] - ground_co[2])/(2.0f * pa->size) - 0.5;
@@ -1119,7 +1097,7 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
if(level < 1.0f) {
bbd->wanted_co[0] = bbd->wanted_co[1] = bbd->wanted_co[2] = 0.0f;
bbd->wanted_speed = 0.0f;
- bpa->data.mode = eBoidMode_Falling;
+ pa->boid->mode = eBoidMode_Falling;
}
else if(level < landing_level) {
bbd->wanted_speed *= (level - 1.0f)/landing_level;
@@ -1210,7 +1188,7 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
/* account for effectors */
do_effectors(p, pa, &pa->state, bbd->scene, bbd->ob, bbd->psys, pa->state.co, force, tvel, bbd->dfra, bbd->cfra);
- if(ELEM(bpa->data.mode, eBoidMode_OnLand, eBoidMode_Climbing)) {
+ if(ELEM(pa->boid->mode, eBoidMode_OnLand, eBoidMode_Climbing)) {
float length = Normalize(force);
length = MAX2(0.0f, length - boids->land_stick_force);
@@ -1221,8 +1199,8 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
VecAddf(acc, acc, force);
/* store smoothed acceleration for nice banking etc. */
- VECADDFAC(bpa->data.acc, bpa->data.acc, acc, dtime);
- VecMulf(bpa->data.acc, 1.0f / (1.0f + dtime));
+ VECADDFAC(pa->boid->acc, pa->boid->acc, acc, dtime);
+ VecMulf(pa->boid->acc, 1.0f / (1.0f + dtime));
/* integrate new location & velocity */
@@ -1240,32 +1218,32 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
VECADDFAC(pa->state.vel, pa->state.vel, acc, dtime);
- if(bpa->data.mode != eBoidMode_InAir)
- bpa->ground = boid_find_ground(bbd, pa, ground_co, ground_nor);
+ if(pa->boid->mode != eBoidMode_InAir)
+ pa->stick_ob = boid_find_ground(bbd, pa, ground_co, ground_nor);
/* change modes, constrain movement & keep track of down vector */
- switch(bpa->data.mode) {
+ switch(pa->boid->mode) {
case eBoidMode_InAir:
{
float grav[3] = {0.0f, 0.0f, bbd->part->acc[2] < 0.0f ? -1.0f : 0.0f};
/* don't take forward acceleration into account (better banking) */
- if(Inpf(bpa->data.acc, pa->state.vel) > 0.0f) {
- Projf(dvec, bpa->data.acc, pa->state.vel);
- VecSubf(dvec, bpa->data.acc, dvec);
+ if(Inpf(pa->boid->acc, pa->state.vel) > 0.0f) {
+ Projf(dvec, pa->boid->acc, pa->state.vel);
+ VecSubf(dvec, pa->boid->acc, dvec);
}
else {
- VECCOPY(dvec, bpa->data.acc);
+ VECCOPY(dvec, pa->boid->acc);
}
- /* gather apparent gravity */
- VECADDFAC(bpa->gravity, grav, dvec, -boids->banking);
- Normalize(bpa->gravity);
+ /* gather apparent gravity to r_ve */
+ VECADDFAC(pa->r_ve, grav, dvec, -boids->banking);
+ Normalize(pa->r_ve);
/* stick boid on goal when close enough */
if(bbd->goal_ob && boid_goal_signed_dist(pa->state.co, bbd->goal_co, bbd->goal_nor) <= pa->size * boids->height) {
- bpa->data.mode = eBoidMode_Climbing;
- bpa->ground = bbd->goal_ob;
+ pa->boid->mode = eBoidMode_Climbing;
+ pa->stick_ob = bbd->goal_ob;
boid_find_ground(bbd, pa, ground_co, ground_nor);
boid_climb(boids, pa, ground_co, ground_nor);
}
@@ -1273,7 +1251,7 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
else if(boids->options & BOID_ALLOW_LAND && pa->state.co[2] <= ground_co[2] + pa->size * boids->height) {
pa->state.co[2] = ground_co[2] + pa->size * boids->height;
pa->state.vel[2] = 0.0f;
- bpa->data.mode = eBoidMode_OnLand;
+ pa->boid->mode = eBoidMode_OnLand;
}
break;
}
@@ -1281,15 +1259,15 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
{
float grav[3] = {0.0f, 0.0f, bbd->part->acc[2] < 0.0f ? -1.0f : 0.0f};
- /* gather apparent gravity */
- VECADDFAC(bpa->gravity, bpa->gravity, grav, dtime);
- Normalize(bpa->gravity);
+ /* gather apparent gravity to r_ve */
+ VECADDFAC(pa->r_ve, pa->r_ve, grav, dtime);
+ Normalize(pa->r_ve);
if(boids->options & BOID_ALLOW_LAND) {
/* stick boid on goal when close enough */
if(bbd->goal_ob && boid_goal_signed_dist(pa->state.co, bbd->goal_co, bbd->goal_nor) <= pa->size * boids->height) {
- bpa->data.mode = eBoidMode_Climbing;
- bpa->ground = bbd->goal_ob;
+ pa->boid->mode = eBoidMode_Climbing;
+ pa->stick_ob = bbd->goal_ob;
boid_find_ground(bbd, pa, ground_co, ground_nor);
boid_climb(boids, pa, ground_co, ground_nor);
}
@@ -1297,14 +1275,14 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
else if(pa->state.co[2] <= ground_co[2] + 1.01 * pa->size * boids->height){
pa->state.co[2] = ground_co[2] + pa->size * boids->height;
pa->state.vel[2] = 0.0f;
- bpa->data.mode = eBoidMode_OnLand;
+ pa->boid->mode = eBoidMode_OnLand;
}
/* if we're falling, can fly and want to go upwards lets fly */
else if(boids->options & BOID_ALLOW_FLIGHT && bbd->wanted_co[2] > 0.0f)
- bpa->data.mode = eBoidMode_InAir;
+ pa->boid->mode = eBoidMode_InAir;
}
else
- bpa->data.mode = eBoidMode_InAir;
+ pa->boid->mode = eBoidMode_InAir;
break;
}
case eBoidMode_Climbing:
@@ -1330,14 +1308,14 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
{
/* stick boid on goal when close enough */
if(bbd->goal_ob && boid_goal_signed_dist(pa->state.co, bbd->goal_co, bbd->goal_nor) <= pa->size * boids->height) {
- bpa->data.mode = eBoidMode_Climbing;
- bpa->ground = bbd->goal_ob;
+ pa->boid->mode = eBoidMode_Climbing;
+ pa->stick_ob = bbd->goal_ob;
boid_find_ground(bbd, pa, ground_co, ground_nor);
boid_climb(boids, pa, ground_co, ground_nor);
}
/* ground is too far away so boid falls */
else if(pa->state.co[2]-ground_co[2] > 1.1 * pa->size * boids->height)
- bpa->data.mode = eBoidMode_Falling;
+ pa->boid->mode = eBoidMode_Falling;
else {
/* constrain to surface */
pa->state.co[2] = ground_co[2] + pa->size * boids->height;
@@ -1351,17 +1329,17 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
VECCOPY(grav, ground_nor);
VecMulf(grav, -1.0f);
- Projf(dvec, bpa->data.acc, pa->state.vel);
- VecSubf(dvec, bpa->data.acc, dvec);
+ Projf(dvec, pa->boid->acc, pa->state.vel);
+ VecSubf(dvec, pa->boid->acc, dvec);
- /* gather apparent gravity */
- VECADDFAC(bpa->gravity, grav, dvec, -boids->banking);
- Normalize(bpa->gravity);
+ /* gather apparent gravity to r_ve */
+ VECADDFAC(pa->r_ve, grav, dvec, -boids->banking);
+ Normalize(pa->r_ve);
}
else {
- /* gather negative surface normal */
- VECADDFAC(bpa->gravity, bpa->gravity, ground_nor, -1.0f);
- Normalize(bpa->gravity);
+ /* gather negative surface normal to r_ve */
+ VECADDFAC(pa->r_ve, pa->r_ve, ground_nor, -1.0f);
+ Normalize(pa->r_ve);
}
break;
}
@@ -1369,29 +1347,29 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
/* save direction to state.ave unless the boid is falling */
/* (boids can't effect their direction when falling) */
- if(bpa->data.mode!=eBoidMode_Falling && VecLength(pa->state.vel) > 0.1*pa->size) {
+ if(pa->boid->mode!=eBoidMode_Falling && VecLength(pa->state.vel) > 0.1*pa->size) {
VECCOPY(pa->state.ave, pa->state.vel);
Normalize(pa->state.ave);
}
/* apply damping */
- if(ELEM(bpa->data.mode, eBoidMode_OnLand, eBoidMode_Climbing))
+ if(ELEM(pa->boid->mode, eBoidMode_OnLand, eBoidMode_Climbing))
VecMulf(pa->state.vel, 1.0f - 0.2f*bbd->part->dampfac);
/* calculate rotation matrix based on forward & down vectors */
- if(bpa->data.mode == eBoidMode_InAir) {
+ if(pa->boid->mode == eBoidMode_InAir) {
VECCOPY(mat[0], pa->state.ave);
- Projf(dvec, bpa->gravity, pa->state.ave);
- VecSubf(mat[2], bpa->gravity, dvec);
+ Projf(dvec, pa->r_ve, pa->state.ave);
+ VecSubf(mat[2], pa->r_ve, dvec);
Normalize(mat[2]);
}
else {
- Projf(dvec, pa->state.ave, bpa->gravity);
+ Projf(dvec, pa->state.ave, pa->r_ve);
VecSubf(mat[0], pa->state.ave, dvec);
Normalize(mat[0]);
- VECCOPY(mat[2], bpa->gravity);
+ VECCOPY(mat[2], pa->r_ve);
}
VecMulf(mat[2], -1.0f);
Crossf(mat[1], mat[2], mat[0]);
diff --git a/source/blender/blenkernel/intern/booleanops.c b/source/blender/blenkernel/intern/booleanops.c
index 5f0697f06ce..eb3aefe7ee6 100644
--- a/source/blender/blenkernel/intern/booleanops.c
+++ b/source/blender/blenkernel/intern/booleanops.c
@@ -589,7 +589,7 @@ int NewBooleanMesh(Scene *scene, Base *base, Base *base_select, int int_op_type)
MEM_freeN(mat);
/* update dag */
- DAG_id_flush_update(&ob_new->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob_new, OB_RECALC_DATA);
return 1;
}
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index bce4e1120be..a7b5a16d924 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -409,6 +409,23 @@ float brush_sample_falloff(Brush *brush, float dist)
return 0.0f;
}
+float brush_sample_falloff_noalpha(Brush *brush, float dist)
+{
+ float outer, inner;
+
+ outer = brush->size >> 1;
+ inner = outer*brush->innerradius;
+
+ if (dist <= inner) {
+ return 1.0f;
+ }
+ else if ((dist < outer) && (inner < outer)) {
+ return 1.0f - sqrt((dist - inner)/(outer - inner));
+ }
+ else
+ return 0.0f;
+}
+
void brush_sample_tex(Brush *brush, float *xy, float *rgba)
{
MTex *mtex= brush->mtex[brush->texact];
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index b20da0962a7..706eece108c 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -1288,7 +1288,6 @@ typedef struct MultiresDM {
CDDerivedMesh cddm;
MultiresModifierData *mmd;
- int local_mmd;
int lvl, totlvl;
float (*orco)[3];
@@ -1298,7 +1297,7 @@ typedef struct MultiresDM {
IndexNode *vert_face_map_mem, *vert_edge_map_mem;
int *face_offsets;
- Object *ob;
+ Mesh *me;
int modified;
void (*update)(DerivedMesh*);
@@ -1310,19 +1309,14 @@ static void MultiresDM_release(DerivedMesh *dm)
int mvert_layer;
/* Before freeing, need to update the displacement map */
- if(dm->needsFree && mrdm->modified) {
- /* Check that mmd still exists */
- if(!mrdm->local_mmd && BLI_findindex(&mrdm->ob->modifiers, mrdm->mmd) < 0)
- mrdm->mmd = NULL;
- if(mrdm->mmd)
- mrdm->update(dm);
- }
+ if(dm->needsFree && mrdm->modified)
+ mrdm->update(dm);
/* If the MVert data is being used as the sculpt undo store, don't free it */
mvert_layer = CustomData_get_layer_index(&dm->vertData, CD_MVERT);
if(mvert_layer != -1) {
CustomDataLayer *cd = &dm->vertData.layers[mvert_layer];
- if(mrdm->mmd && cd->data == mrdm->mmd->undo_verts)
+ if(cd->data == mrdm->mmd->undo_verts)
cd->flag |= CD_FLAG_NOFREE;
}
@@ -1354,8 +1348,7 @@ DerivedMesh *MultiresDM_new(MultiresSubsurf *ms, DerivedMesh *orig, int numVerts
dm = &mrdm->cddm.dm;
mrdm->mmd = ms->mmd;
- mrdm->ob = ms->ob;
- mrdm->local_mmd = ms->local_mmd;
+ mrdm->me = ms->me;
if(dm) {
MDisps *disps;
@@ -1398,12 +1391,7 @@ DerivedMesh *MultiresDM_new(MultiresSubsurf *ms, DerivedMesh *orig, int numVerts
Mesh *MultiresDM_get_mesh(DerivedMesh *dm)
{
- return get_mesh(((MultiresDM*)dm)->ob);
-}
-
-Object *MultiresDM_get_object(DerivedMesh *dm)
-{
- return ((MultiresDM*)dm)->ob;
+ return ((MultiresDM*)dm)->me;
}
void *MultiresDM_get_orco(DerivedMesh *dm)
@@ -1440,11 +1428,10 @@ void MultiresDM_set_update(DerivedMesh *dm, void (*update)(DerivedMesh*))
ListBase *MultiresDM_get_vert_face_map(DerivedMesh *dm)
{
MultiresDM *mrdm = (MultiresDM*)dm;
- Mesh *me = mrdm->ob->data;
if(!mrdm->vert_face_map)
- create_vert_face_map(&mrdm->vert_face_map, &mrdm->vert_face_map_mem, me->mface,
- me->totvert, me->totface);
+ create_vert_face_map(&mrdm->vert_face_map, &mrdm->vert_face_map_mem, mrdm->me->mface,
+ mrdm->me->totvert, mrdm->me->totface);
return mrdm->vert_face_map;
}
@@ -1452,11 +1439,10 @@ ListBase *MultiresDM_get_vert_face_map(DerivedMesh *dm)
ListBase *MultiresDM_get_vert_edge_map(DerivedMesh *dm)
{
MultiresDM *mrdm = (MultiresDM*)dm;
- Mesh *me = mrdm->ob->data;
if(!mrdm->vert_edge_map)
- create_vert_edge_map(&mrdm->vert_edge_map, &mrdm->vert_edge_map_mem, me->medge,
- me->totvert, me->totedge);
+ create_vert_edge_map(&mrdm->vert_edge_map, &mrdm->vert_edge_map_mem, mrdm->me->medge,
+ mrdm->me->totvert, mrdm->me->totedge);
return mrdm->vert_edge_map;
}
@@ -1464,7 +1450,6 @@ ListBase *MultiresDM_get_vert_edge_map(DerivedMesh *dm)
int *MultiresDM_get_face_offsets(DerivedMesh *dm)
{
MultiresDM *mrdm = (MultiresDM*)dm;
- Mesh *me = mrdm->ob->data;
int i, accum = 0;
if(!mrdm->face_offsets) {
@@ -1472,11 +1457,11 @@ int *MultiresDM_get_face_offsets(DerivedMesh *dm)
int area = len * len;
int t = 1 + len * 3 + area * 3, q = t + len + area;
- mrdm->face_offsets = MEM_callocN(sizeof(int) * me->totface, "mrdm face offsets");
- for(i = 0; i < me->totface; ++i) {
+ mrdm->face_offsets = MEM_callocN(sizeof(int) * mrdm->me->totface, "mrdm face offsets");
+ for(i = 0; i < mrdm->me->totface; ++i) {
mrdm->face_offsets[i] = accum;
- accum += (me->mface[i].v4 ? q : t);
+ accum += (mrdm->me->mface[i].v4 ? q : t);
}
}
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 8be8df8e63b..3acaaecb1e8 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -347,7 +347,7 @@ void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr)
BKE_ptcache_id_from_cloth(&pid, ob, clmd);
// don't do anything as long as we're in editmode!
- if(pid.cache->edit && ob->mode & OB_MODE_PARTICLE_EDIT)
+ if(pid.cache->flag & PTCACHE_BAKE_EDIT_ACTIVE)
return;
BKE_ptcache_id_clear(&pid, PTCACHE_CLEAR_AFTER, framenr);
@@ -496,30 +496,23 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob,
if(!do_init_cloth(ob, clmd, result, framenr))
return result;
- if(framenr == startframe && cache->flag & PTCACHE_REDO_NEEDED) {
- BKE_ptcache_id_reset(scene, &pid, PTCACHE_RESET_OUTDATED);
- cache->simframe= framenr;
- cache->flag &= ~PTCACHE_REDO_NEEDED;
- return result;
- }
-
/* try to read from cache */
cache_result = BKE_ptcache_read_cache(&pid, (float)framenr, scene->r.frs_sec);
if(cache_result == PTCACHE_READ_EXACT || cache_result == PTCACHE_READ_INTERPOLATED) {
- implicit_set_positions(clmd);
- cloth_to_object (ob, clmd, result);
-
- cache->simframe= framenr;
cache->flag |= PTCACHE_SIMULATION_VALID;
+ cache->simframe= framenr;
- if(cache_result == PTCACHE_READ_INTERPOLATED && cache->flag & PTCACHE_REDO_NEEDED)
- BKE_ptcache_write_cache(&pid, framenr);
+ implicit_set_positions(clmd);
+ cloth_to_object (ob, clmd, result);
return result;
}
else if(cache_result==PTCACHE_READ_OLD) {
+ BKE_ptcache_id_reset(scene, &pid, PTCACHE_RESET_FREE);
+
implicit_set_positions(clmd);
+
cache->flag |= PTCACHE_SIMULATION_VALID;
}
else if(ob->id.lib || (cache->flag & PTCACHE_BAKED)) {
@@ -531,10 +524,12 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob,
}
if(framenr == startframe) {
- implicit_set_positions(clmd);
-
- cache->simframe= framenr;
+ if(cache->flag & PTCACHE_REDO_NEEDED) {
+ BKE_ptcache_id_reset(scene, &pid, PTCACHE_RESET_OUTDATED);
+ do_init_cloth(ob, clmd, result, framenr);
+ }
cache->flag |= PTCACHE_SIMULATION_VALID;
+ cache->simframe= framenr;
/* don't write cache on first frame, but on second frame write
* cache for frame 1 and 2 */
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index dfbcc51a93c..88e73a00ba7 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -121,7 +121,6 @@ bConstraintOb *constraints_make_evalob (Scene *scene, Object *ob, void *subdata,
if (ob) {
cob->ob = ob;
cob->type = datatype;
- cob->rotOrder = EULER_ORDER_DEFAULT; // TODO: when objects have rotation order too, use that
Mat4CpyMat4(cob->matrix, ob->obmat);
}
else
@@ -138,15 +137,6 @@ bConstraintOb *constraints_make_evalob (Scene *scene, Object *ob, void *subdata,
cob->pchan = (bPoseChannel *)subdata;
cob->type = datatype;
- if (cob->pchan->rotmode > 0) {
- /* should be some type of Euler order */
- cob->rotOrder= cob->pchan->rotmode;
- }
- else {
- /* Quats, so eulers should just use default order */
- cob->rotOrder= EULER_ORDER_DEFAULT;
- }
-
/* matrix in world-space */
Mat4MulMat4(cob->matrix, cob->pchan->pose_mat, ob->obmat);
}
@@ -674,7 +664,6 @@ static void default_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstrain
* (Hopefully all compilers will be happy with the lines with just a space on them. Those are
* really just to help this code easier to read)
*/
-// TODO: cope with getting rotation order...
#define SINGLETARGET_GET_TARS(con, datatar, datasubtarget, ct, list) \
{ \
ct= MEM_callocN(sizeof(bConstraintTarget), "tempConstraintTarget"); \
@@ -698,7 +687,6 @@ static void default_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstrain
* (Hopefully all compilers will be happy with the lines with just a space on them. Those are
* really just to help this code easier to read)
*/
-// TODO: cope with getting rotation order...
#define SINGLETARGETNS_GET_TARS(con, datatar, ct, list) \
{ \
ct= MEM_callocN(sizeof(bConstraintTarget), "tempConstraintTarget"); \
@@ -807,11 +795,11 @@ static void childof_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
/* extract components of both matrices */
VECCOPY(loc, ct->matrix[3]);
- Mat4ToEulO(ct->matrix, eul, ct->rotOrder);
+ Mat4ToEul(ct->matrix, eul);
Mat4ToSize(ct->matrix, size);
VECCOPY(loco, invmat[3]);
- Mat4ToEulO(invmat, eulo, cob->rotOrder);
+ Mat4ToEul(invmat, eulo);
Mat4ToSize(invmat, sizo);
/* disable channels not enabled */
@@ -826,8 +814,8 @@ static void childof_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
if (!(data->flag & CHILDOF_SIZEZ)) size[2]= sizo[2]= 1.0f;
/* make new target mat and offset mat */
- LocEulOSizeToMat4(ct->matrix, loc, eul, size, ct->rotOrder);
- LocEulOSizeToMat4(invmat, loco, eulo, sizo, cob->rotOrder);
+ LocEulSizeToMat4(ct->matrix, loc, eul, size);
+ LocEulSizeToMat4(invmat, loco, eulo, sizo);
/* multiply target (parent matrix) by offset (parent inverse) to get
* the effect of the parent that will be exherted on the owner
@@ -1178,26 +1166,17 @@ static void followpath_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstr
makeDispListCurveTypes(cob->scene, ct->tar, 0);
if (cu->path && cu->path->data) {
- if ((data->followflag & FOLLOWPATH_STATIC) == 0) {
- /* animated position along curve depending on time */
- curvetime= bsystem_time(cob->scene, ct->tar, ctime, 0.0) - data->offset;
-
- /* ctime is now a proper var setting of Curve which gets set by Animato like any other var that's animated,
- * but this will only work if it actually is animated...
- *
- * we firstly calculate the modulus of cu->ctime/cu->pathlen to clamp ctime within the 0.0 to 1.0 times pathlen
- * range, then divide this (the modulus) by pathlen to get a value between 0.0 and 1.0
- */
- curvetime= fmod(cu->ctime, cu->pathlen) / cu->pathlen;
+ curvetime= bsystem_time(cob->scene, ct->tar, (float)ctime, 0.0) - data->offset;
+
+#if 0 // XXX old animation system
+ if (calc_ipo_spec(cu->ipo, CU_SPEED, &curvetime)==0) {
+ curvetime /= cu->pathlen;
CLAMP(curvetime, 0.0, 1.0);
}
- else {
- /* fixed position along curve */
- curvetime= data->offset; // XXX might need a more sensible value
- }
+#endif // XXX old animation system
if ( where_on_path(ct->tar, curvetime, vec, dir) ) {
- if (data->followflag & FOLLOWPATH_FOLLOW) {
+ if (data->followflag) {
vectoquat(dir, (short) data->trackflag, (short) data->upflag, quat);
Normalize(dir);
@@ -1325,7 +1304,7 @@ static void rotlimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *t
VECCOPY(loc, cob->matrix[3]);
Mat4ToSize(cob->matrix, size);
- Mat4ToEulO(cob->matrix, eul, cob->rotOrder);
+ Mat4ToEul(cob->matrix, eul);
/* eulers: radians to degrees! */
eul[0] = (float)(eul[0] / M_PI * 180);
@@ -1360,7 +1339,7 @@ static void rotlimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *t
eul[1] = (float)(eul[1] / 180 * M_PI);
eul[2] = (float)(eul[2] / 180 * M_PI);
- LocEulOSizeToMat4(cob->matrix, loc, eul, size, cob->rotOrder);
+ LocEulSizeToMat4(cob->matrix, loc, eul, size);
}
static bConstraintTypeInfo CTI_ROTLIMIT = {
@@ -1567,14 +1546,14 @@ static void rotlike_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
VECCOPY(loc, cob->matrix[3]);
Mat4ToSize(cob->matrix, size);
- Mat4ToEulO(ct->matrix, eul, ct->rotOrder);
- Mat4ToEulO(cob->matrix, obeul, cob->rotOrder);
+ Mat4ToEul(ct->matrix, eul);
+ Mat4ToEul(cob->matrix, obeul);
if ((data->flag & ROTLIKE_X)==0)
eul[0] = obeul[0];
else {
if (data->flag & ROTLIKE_OFFSET)
- eulerO_rot(eul, obeul[0], 'x', cob->rotOrder);
+ euler_rot(eul, obeul[0], 'x');
if (data->flag & ROTLIKE_X_INVERT)
eul[0] *= -1;
@@ -1584,7 +1563,7 @@ static void rotlike_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
eul[1] = obeul[1];
else {
if (data->flag & ROTLIKE_OFFSET)
- eulerO_rot(eul, obeul[1], 'y', cob->rotOrder);
+ euler_rot(eul, obeul[1], 'y');
if (data->flag & ROTLIKE_Y_INVERT)
eul[1] *= -1;
@@ -1594,14 +1573,14 @@ static void rotlike_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta
eul[2] = obeul[2];
else {
if (data->flag & ROTLIKE_OFFSET)
- eulerO_rot(eul, obeul[2], 'z', cob->rotOrder);
+ euler_rot(eul, obeul[2], 'z');
if (data->flag & ROTLIKE_Z_INVERT)
eul[2] *= -1;
}
compatible_eul(eul, obeul);
- LocEulOSizeToMat4(cob->matrix, loc, eul, size, cob->rotOrder);
+ LocEulSizeToMat4(cob->matrix, loc, eul, size);
}
}
@@ -3057,7 +3036,7 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
Mat4ToSize(ct->matrix, dvec);
break;
case 1: /* rotation (convert to degrees first) */
- Mat4ToEulO(ct->matrix, dvec, cob->rotOrder);
+ Mat4ToEul(ct->matrix, dvec);
for (i=0; i<3; i++)
dvec[i] = (float)(dvec[i] / M_PI * 180);
break;
@@ -3068,7 +3047,7 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
/* extract components of owner's matrix */
VECCOPY(loc, cob->matrix[3]);
- Mat4ToEulO(cob->matrix, eul, cob->rotOrder);
+ Mat4ToEul(cob->matrix, eul);
Mat4ToSize(cob->matrix, size);
/* determine where in range current transforms lie */
@@ -3123,7 +3102,7 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
}
/* apply to matrix */
- LocEulOSizeToMat4(cob->matrix, loc, eul, size, cob->rotOrder);
+ LocEulSizeToMat4(cob->matrix, loc, eul, size);
}
}
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 58ff601e7f7..7dd868278f4 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -470,11 +470,8 @@ void test2DNurb(Nurb *nu)
BezTriple *bezt;
BPoint *bp;
int a;
-
- if((nu->flag & CU_2D)==0)
- return;
- if(nu->type == CU_BEZIER) {
+ if( nu->type== CU_BEZIER+CU_2D ) {
a= nu->pntsu;
bezt= nu->bezt;
while(a--) {
@@ -484,7 +481,7 @@ void test2DNurb(Nurb *nu)
bezt++;
}
}
- else {
+ else if(nu->type & CU_2D) {
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
while(a--) {
@@ -500,7 +497,7 @@ void minmaxNurb(Nurb *nu, float *min, float *max)
BPoint *bp;
int a;
- if(nu->type == CU_BEZIER) {
+ if( (nu->type & 7)==CU_BEZIER ) {
a= nu->pntsu;
bezt= nu->bezt;
while(a--) {
@@ -597,7 +594,7 @@ static void makecyclicknots(float *knots, short pnts, short order)
void makeknots(Nurb *nu, short uv)
{
- if(nu->type == CU_NURBS) {
+ if( (nu->type & 7)==CU_NURBS ) {
if(uv == 1) {
if(nu->knotsu) MEM_freeN(nu->knotsu);
if(check_valid_nurb_u(nu)) {
@@ -1553,7 +1550,7 @@ void makeBevelList(Object *ob)
BPoint *bp;
BevList *bl, *blnew, *blnext;
BevPoint *bevp, *bevp2, *bevp1 = NULL, *bevp0;
- float min, inp, x1, x2, y1, y2, vec[3], vec_prev[3], q[4], quat[4], quat_prev[4], cross[3];
+ float min, inp, x1, x2, y1, y2, vec[3];
float *coord_array, *tilt_array=NULL, *radius_array=NULL, *coord_fp, *tilt_fp=NULL, *radius_fp=NULL;
float *v1, *v2;
struct bevelsort *sortdata, *sd, *sd1;
@@ -1590,7 +1587,7 @@ void makeBevelList(Object *ob)
else
resolu= nu->resolu;
- if(nu->type == CU_POLY) {
+ if((nu->type & 7)==CU_POLY) {
len= nu->pntsu;
bl= MEM_callocN(sizeof(BevList)+len*sizeof(BevPoint), "makeBevelList2");
BLI_addtail(&(cu->bev), bl);
@@ -1613,7 +1610,7 @@ void makeBevelList(Object *ob)
bp++;
}
}
- else if(nu->type == CU_BEZIER) {
+ else if((nu->type & 7)==CU_BEZIER) {
len= resolu*(nu->pntsu+ (nu->flagu & CU_CYCLIC) -1)+1; /* in case last point is not cyclic */
bl= MEM_callocN(sizeof(BevList)+len*sizeof(BevPoint), "makeBevelBPoints");
@@ -1721,7 +1718,7 @@ void makeBevelList(Object *ob)
bl->nr++;
}
}
- else if(nu->type == CU_NURBS) {
+ else if((nu->type & 7)==CU_NURBS) {
if(nu->pntsv==1) {
len= (resolu*SEGMENTSU(nu));
@@ -1823,14 +1820,14 @@ void makeBevelList(Object *ob)
bl= blnext;
}
- /* STEP 3: POLYS COUNT AND AUTOHOLE */
+ /* STEP 3: COUNT POLYS TELLEN AND AUTOHOLE */
bl= cu->bev.first;
poly= 0;
while(bl) {
if(bl->nr && bl->poly>=0) {
poly++;
bl->poly= poly;
- bl->hole= 0;
+ bl->gat= 0; /* 'gat' is dutch for hole */
}
bl= bl->next;
}
@@ -1882,7 +1879,7 @@ void makeBevelList(Object *ob)
sd1= sortdata+ (a-1);
for(b=a-1; b>=0; b--, sd1--) { /* all polys to the left */
if(bevelinside(sd1->bl, bl)) {
- bl->hole= 1- sd1->bl->hole;
+ bl->gat= 1- sd1->bl->gat;
break;
}
}
@@ -1892,7 +1889,7 @@ void makeBevelList(Object *ob)
if((cu->flag & CU_3D)==0) {
sd= sortdata;
for(a=0; a<poly; a++, sd++) {
- if(sd->bl->hole==sd->dir) {
+ if(sd->bl->gat==sd->dir) {
bl= sd->bl;
bevp1= (BevPoint *)(bl+1);
bevp2= bevp1+ (bl->nr-1);
@@ -1912,10 +1909,7 @@ void makeBevelList(Object *ob)
bl= cu->bev.first;
while(bl) {
- if(bl->nr < 2) {
- /* do nothing */
- }
- else if(bl->nr==2) { /* 2 pnt, treat separate */
+ if(bl->nr==2) { /* 2 pnt, treat separate */
bevp2= (BevPoint *)(bl+1);
bevp1= bevp2+1;
@@ -1929,169 +1923,68 @@ void makeBevelList(Object *ob)
if(cu->flag & CU_3D) { /* 3D */
float quat[4], q[4];
- VecSubf(vec, &bevp1->x, &bevp2->x);
+ vec[0]= bevp1->x - bevp2->x;
+ vec[1]= bevp1->y - bevp2->y;
+ vec[2]= bevp1->z - bevp2->z;
vectoquat(vec, 5, 1, quat);
- AxisAngleToQuat(q, vec, bevp1->alfa);
+ Normalize(vec);
+ q[0]= (float)cos(0.5*bevp1->alfa);
+ x1= (float)sin(0.5*bevp1->alfa);
+ q[1]= x1*vec[0];
+ q[2]= x1*vec[1];
+ q[3]= x1*vec[2];
QuatMul(quat, q, quat);
QuatToMat3(quat, bevp1->mat);
Mat3CpyMat3(bevp2->mat, bevp1->mat);
}
- } /* this has to be >2 points */
- else if(cu->flag & CU_NO_TWIST && cu->flag & CU_3D && bl->poly != -1) {
-
- /* Special case, cyclic curve with no twist. tricky... */
-
- float quat[4], q[4], cross[3];
-
- /* correcting a cyclic curve is more complicated, need to be corrected from both ends */
- float *quat_tmp1, *quat_tmp2; /* store a quat in the matrix temporarily */
- int iter_dir;
- BevPoint *bevp_start= (BevPoint *)(bl+1);
-
- /* loop over the points twice, once up, once back, accumulate the quat rotations
- * in both directions, then blend them in the 3rd loop and apply the tilt */
- for(iter_dir = 0; iter_dir < 2; iter_dir++) {
-
- bevp2= (BevPoint *)(bl+1);
- bevp1= bevp2+(bl->nr-1);
- bevp0= bevp1-1;
-
- nr= bl->nr;
- while(nr--) {
-
- /* Normalizes */
- VecBisect3(vec, &bevp0->x, &bevp1->x, &bevp2->x);
-
- if(bl->nr==nr+1) { /* first time */
- vectoquat(vec, 5, 1, quat);
- }
- else {
- float angle = NormalizedVecAngle2(vec_prev, vec);
-
- if(angle > 0.0f) { /* otherwise we can keep as is */
- Crossf(cross, vec_prev, vec);
- AxisAngleToQuat(q, cross, angle);
- QuatMul(quat, q, quat_prev);
- }
- else {
- QUATCOPY(quat, quat_prev);
- }
- }
- QUATCOPY(quat_prev, quat); /* quat_prev can't have the tilt applied */
- VECCOPY(vec_prev, vec);
-
- if(iter_dir==0) { /* up, first time */
- quat_tmp1= (float *)bevp1->mat;
-
- bevp0= bevp1;
- bevp1= bevp2;
- bevp2++;
- }
- else { /* down second time */
- quat_tmp1= ((float *)bevp1->mat)+4;
-
- bevp2= bevp1;
- bevp1= bevp0;
- bevp0--;
-
- /* wrap around */
- if (bevp0 < bevp_start)
- bevp0= bevp_start+(bl->nr-1);
- }
-
- QUATCOPY(quat_tmp1, quat);
- }
- }
-
- /* Now interpolate the 2 quats and apply tilt */
-
- bevp2= (BevPoint *)(bl+1);
- bevp1= bevp2+(bl->nr-1);
- bevp0= bevp1-1;
-
- nr= bl->nr;
- while(nr--) {
-
- VecBisect3(vec, &bevp0->x, &bevp1->x, &bevp2->x);
-
- quat_tmp1= (float *)bevp1->mat;
- quat_tmp2= quat_tmp1+4;
-
- /* blend the 2 rotations gathered from both directions */
- QuatInterpol(quat, quat_tmp1, quat_tmp2, 1.0 - (((float)nr)/bl->nr));
-
- AxisAngleToQuat(q, vec, bevp1->alfa);
- QuatMul(quat, q, quat);
- QuatToMat3(quat, bevp1->mat);
-
- /* generic */
- x1= bevp1->x- bevp0->x;
- x2= bevp1->x- bevp2->x;
- y1= bevp1->y- bevp0->y;
- y2= bevp1->y- bevp2->y;
-
- calc_bevel_sin_cos(x1, y1, x2, y2, &(bevp1->sina), &(bevp1->cosa));
-
- bevp0= bevp1;
- bevp1= bevp2;
- bevp2++;
- }
}
- else {
- /* Any curve with 3 or more points */
-
+ else if(bl->nr>2) {
bevp2= (BevPoint *)(bl+1);
bevp1= bevp2+(bl->nr-1);
bevp0= bevp1-1;
+
nr= bl->nr;
+
while(nr--) {
-
+
if(cu->flag & CU_3D) { /* 3D */
+ float quat[4], q[4];
+
+ vec[0]= bevp2->x - bevp0->x;
+ vec[1]= bevp2->y - bevp0->y;
+ vec[2]= bevp2->z - bevp0->z;
+
+ Normalize(vec);
- /* Normalizes */
- VecBisect3(vec, &bevp0->x, &bevp1->x, &bevp2->x);
-
- if(bl->nr==nr+1 || !(cu->flag & CU_NO_TWIST)) { /* first time */
- vectoquat(vec, 5, 1, quat);
- }
- else {
- float angle = NormalizedVecAngle2(vec_prev, vec);
-
- if(angle > 0.0f) { /* otherwise we can keep as is */
- Crossf(cross, vec_prev, vec);
- AxisAngleToQuat(q, cross, angle);
- QuatMul(quat, q, quat_prev);
- }
- else {
- QUATCOPY(quat, quat_prev);
- }
- }
- QUATCOPY(quat_prev, quat); /* quat_prev can't have the tilt applied */
- VECCOPY(vec_prev, vec);
+ vectoquat(vec, 5, 1, quat);
- AxisAngleToQuat(q, vec, bevp1->alfa);
+ q[0]= (float)cos(0.5*bevp1->alfa);
+ x1= (float)sin(0.5*bevp1->alfa);
+ q[1]= x1*vec[0];
+ q[2]= x1*vec[1];
+ q[3]= x1*vec[2];
QuatMul(quat, q, quat);
+
QuatToMat3(quat, bevp1->mat);
}
-
+
x1= bevp1->x- bevp0->x;
x2= bevp1->x- bevp2->x;
y1= bevp1->y- bevp0->y;
y2= bevp1->y- bevp2->y;
-
+
calc_bevel_sin_cos(x1, y1, x2, y2, &(bevp1->sina), &(bevp1->cosa));
-
-
+
+
bevp0= bevp1;
bevp1= bevp2;
bevp2++;
}
-
/* correct non-cyclic cases */
if(bl->poly== -1) {
if(bl->nr>2) {
@@ -2314,7 +2207,7 @@ void calchandlesNurb(Nurb *nu) /* first, if needed, set handle flags */
BezTriple *bezt, *prev, *next;
short a;
- if(nu->type != CU_BEZIER) return;
+ if((nu->type & 7)!=CU_BEZIER) return;
if(nu->pntsu<2) return;
a= nu->pntsu;
@@ -2349,7 +2242,7 @@ void testhandlesNurb(Nurb *nu)
BezTriple *bezt;
short flag, a;
- if(nu->type != CU_BEZIER) return;
+ if((nu->type & 7)!=CU_BEZIER) return;
bezt= nu->bezt;
a= nu->pntsu;
@@ -2477,7 +2370,7 @@ void sethandlesNurb(ListBase *editnurb, short code)
if(code==1 || code==2) {
nu= editnurb->first;
while(nu) {
- if(nu->type == CU_BEZIER) {
+ if( (nu->type & 7)==CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
@@ -2507,7 +2400,7 @@ void sethandlesNurb(ListBase *editnurb, short code)
} else {
/* Toggle */
while(nu) {
- if(nu->type == CU_BEZIER) {
+ if( (nu->type & 7)==CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
@@ -2524,7 +2417,7 @@ void sethandlesNurb(ListBase *editnurb, short code)
}
nu= editnurb->first;
while(nu) {
- if(nu->type == CU_BEZIER) {
+ if( (nu->type & 7)==CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
@@ -2572,7 +2465,7 @@ void switchdirectionNurb(Nurb *nu)
if(nu->pntsu==1 && nu->pntsv==1) return;
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
a= nu->pntsu;
bezt1= nu->bezt;
bezt2= bezt1+(a-1);
@@ -2611,7 +2504,7 @@ void switchdirectionNurb(Nurb *nu)
bp1++;
bp2--;
}
- if(nu->type == CU_NURBS) {
+ if((nu->type & 7)==CU_NURBS) {
/* inverse knots */
a= KNOTSU(nu);
fp1= nu->knotsu;
@@ -2674,7 +2567,7 @@ float (*curve_getVertexCos(Curve *cu, ListBase *lb, int *numVerts_r))[3]
co = cos[0];
for (nu=lb->first; nu; nu=nu->next) {
- if (nu->type == CU_BEZIER) {
+ if ((nu->type & 7)==CU_BEZIER) {
BezTriple *bezt = nu->bezt;
for (i=0; i<nu->pntsu; i++,bezt++) {
@@ -2701,7 +2594,7 @@ void curve_applyVertexCos(Curve *cu, ListBase *lb, float (*vertexCos)[3])
int i;
for (nu=lb->first; nu; nu=nu->next) {
- if (nu->type == CU_BEZIER) {
+ if ((nu->type & 7)==CU_BEZIER) {
BezTriple *bezt = nu->bezt;
for (i=0; i<nu->pntsu; i++,bezt++) {
@@ -2723,7 +2616,7 @@ int check_valid_nurb_u( struct Nurb *nu )
{
if (nu==NULL) return 0;
if (nu->pntsu <= 1) return 0;
- if (nu->type != CU_NURBS) return 1; /* not a nurb, lets assume its valid */
+ if ((nu->type & 7)!=CU_NURBS) return 1; /* not a nurb, lets assume its valid */
if (nu->pntsu < nu->orderu) return 0;
if (((nu->flag & CU_CYCLIC)==0) && ((nu->flagu>>1) & 2)) { /* Bezier U Endpoints */
@@ -2737,7 +2630,7 @@ int check_valid_nurb_v( struct Nurb *nu)
{
if (nu==NULL) return 0;
if (nu->pntsv <= 1) return 0;
- if (nu->type != CU_NURBS) return 1; /* not a nurb, lets assume its valid */
+ if ((nu->type & 7)!=CU_NURBS) return 1; /* not a nurb, lets assume its valid */
if (nu->pntsv < nu->orderv) return 0;
if (((nu->flag & CU_CYCLIC)==0) && ((nu->flagv>>1) & 2)) { /* Bezier V Endpoints */
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 6a14762e0ed..6c765b02e5d 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -61,7 +61,6 @@
#include "DNA_space_types.h"
#include "DNA_view2d_types.h"
#include "DNA_view3d_types.h"
-#include "DNA_windowmanager_types.h"
#include "BLI_ghash.h"
@@ -2142,77 +2141,39 @@ void DAG_scene_update_flags(Scene *scene, unsigned int lay)
}
-void DAG_id_flush_update(ID *id, short flag)
-{
- Main *bmain= G.main;
- wmWindowManager *wm;
- wmWindow *win;
- Scene *sce;
- Object *obt, *ob= NULL;
- short idtype;
-
- /* only one scene supported currently, making more scenes work
- correctly requires changes beyond just the dependency graph */
-
- if((wm= bmain->wm.first)) {
- /* if we have a windowmanager, use sce from first window */
- for(win=wm->windows.first; win; win=win->next) {
- sce= (win->screen)? win->screen->scene: NULL;
-
- if(sce)
- break;
- }
- }
- else
- /* if not, use the first sce */
- sce= bmain->scene.first;
- if(!id || !sce || !sce->theDag)
- return;
+/* flag this object and all its relations to recalc */
+/* if you need to do more objects, tag object yourself and
+ use DAG_scene_flush_update() in end */
+void DAG_object_flush_update(Scene *sce, Object *ob, short flag)
+{
+
+ if(ob==NULL || sce->theDag==NULL) return;
- /* set flags & pointcache for object */
- if(GS(id->name) == ID_OB) {
- ob= (Object*)id;
- ob->recalc |= flag;
- BKE_ptcache_object_reset(sce, ob, PTCACHE_RESET_DEPSGRAPH);
-
- if(flag & OB_RECALC_DATA) {
- /* all users of this ob->data should be checked */
- id= ob->data;
-
- /* no point in trying in this cases */
- if(!id || id->us <= 1)
- id= NULL;
- /* curves and surfaces only need to mark one object, since
- otherwise cu->displist would be computed multiple times */
- else if(ob->type==OB_CURVE || ob->type==OB_SURF)
- id= NULL;
- /* also for locked shape keys we make an exception */
- else if(ob_get_key(ob) && (ob->shapeflag & (OB_SHAPE_LOCK|OB_SHAPE_TEMPLOCK)))
- id= NULL;
- }
- }
-
- /* set flags & pointcache for object data */
- if(id) {
- idtype= GS(id->name);
-
- if(ELEM7(idtype, ID_ME, ID_CU, ID_MB, ID_LA, ID_LT, ID_CA, ID_AR)) {
- for(obt=bmain->object.first; obt; obt= obt->id.next) {
- if(!(ob && obt == ob) && obt->data == id) {
- obt->recalc |= OB_RECALC_DATA;
- BKE_ptcache_object_reset(sce, obt, PTCACHE_RESET_DEPSGRAPH);
-
- /* for these we only flag one object, otherwise cu->displist
- would be computed multiple times */
- if(obt->type==OB_CURVE || obt->type==OB_SURF)
- break;
+ ob->recalc |= flag;
+ BKE_ptcache_object_reset(sce, ob, PTCACHE_RESET_DEPSGRAPH);
+
+ /* all users of this ob->data should be checked */
+ /* BUT! displists for curves are still only on cu */
+ if(flag & OB_RECALC_DATA) {
+ if(ob->type!=OB_CURVE && ob->type!=OB_SURF) {
+ ID *id= ob->data;
+ if(id && id->us>1) {
+ /* except when there's a key and shapes are locked */
+ if(ob_get_key(ob) && (ob->shapeflag & (OB_SHAPE_LOCK|OB_SHAPE_TEMPLOCK)));
+ else {
+ Object *obt;
+ for (obt=G.main->object.first; obt; obt= obt->id.next) {
+ if (obt != ob && obt->data==ob->data) {
+ obt->recalc |= OB_RECALC_DATA;
+ BKE_ptcache_object_reset(sce, obt, PTCACHE_RESET_DEPSGRAPH);
+ }
+ }
}
}
}
}
-
- /* flush to other objects that depend on this one */
+
// XXX if(G.curscreen)
// DAG_scene_flush_update(sce, dag_screen_view3d_layers(), 0);
// else
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index de85b0a33f6..069129c15da 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -834,7 +834,7 @@ static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase)
resolu= nu->resolu;
if(!check_valid_nurb_u(nu));
- else if(nu->type == CU_BEZIER) {
+ else if((nu->type & 7)==CU_BEZIER) {
/* count */
len= 0;
@@ -902,7 +902,7 @@ static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase)
bezt++;
}
}
- else if(nu->type == CU_NURBS) {
+ else if((nu->type & 7)==CU_NURBS) {
len= (resolu*SEGMENTSU(nu));
dl= MEM_callocN(sizeof(DispList), "makeDispListsurf");
@@ -919,7 +919,7 @@ static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase)
else dl->type= DL_SEGM;
makeNurbcurve(nu, data, NULL, NULL, resolu);
}
- else if(nu->type == CU_POLY) {
+ else if((nu->type & 7)==CU_POLY) {
len= nu->pntsu;
dl= MEM_callocN(sizeof(DispList), "makeDispListpoly");
dl->verts= MEM_callocN(len*3*sizeof(float), "dlverts");
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 31f6e2c6067..90bf08059d7 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -698,19 +698,19 @@ float driver_get_target_value (ChannelDriver *driver, DriverTarget *dtar)
if (RNA_path_resolve(&id_ptr, path, &ptr, &prop)) {
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
- if (RNA_property_array_length(&ptr, prop))
+ if (RNA_property_array_length(prop))
value= (float)RNA_property_boolean_get_index(&ptr, prop, index);
else
value= (float)RNA_property_boolean_get(&ptr, prop);
break;
case PROP_INT:
- if (RNA_property_array_length(&ptr, prop))
+ if (RNA_property_array_length(prop))
value= (float)RNA_property_int_get_index(&ptr, prop, index);
else
value= (float)RNA_property_int_get(&ptr, prop);
break;
case PROP_FLOAT:
- if (RNA_property_array_length(&ptr, prop))
+ if (RNA_property_array_length(prop))
value= RNA_property_float_get_index(&ptr, prop, index);
else
value= RNA_property_float_get(&ptr, prop);
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index 5ce021e3931..70901778585 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -462,7 +462,7 @@ static void build_underline(Curve *cu, float x1, float y1, float x2, float y2, i
nu2->resolu= cu->resolu;
nu2->bezt = NULL;
nu2->knotsu = nu2->knotsv = NULL;
- nu2->flag= CU_2D;
+ nu2->flag= 0;
nu2->charidx = charidx+1000;
if (mat_nr > 0) nu2->mat_nr= mat_nr-1;
nu2->pntsu = 4;
@@ -495,6 +495,7 @@ static void build_underline(Curve *cu, float x1, float y1, float x2, float y2, i
nu2->bp[3].vec[2] = 0;
nu2->bp[3].vec[3] = 1.0;
+ nu2->type = CU_2D;
BLI_addtail(&(cu->nurb), nu2);
}
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 43c4137e73e..dd8f44c71d5 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -214,11 +214,6 @@ bGPdata *gpencil_data_addnew (char name[])
/* initial settings */
gpd->flag = (GP_DATA_DISPINFO|GP_DATA_EXPAND);
- /* for now, stick to view is also enabled by default
- * since this is more useful...
- */
- gpd->flag |= GP_DATA_VIEWALIGN;
-
return gpd;
}
@@ -313,7 +308,7 @@ bGPdata *gpencil_data_duplicate (bGPdata *src)
void gpencil_frame_delete_laststroke (bGPDlayer *gpl, bGPDframe *gpf)
{
bGPDstroke *gps= (gpf) ? gpf->strokes.last : NULL;
- int cfra = (gpf) ? gpf->framenum : 0; /* assume that the current frame was not locked */
+ int cfra = 1; // XXX FIXME!!!
/* error checking */
if (ELEM(NULL, gpf, gps))
diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c
index 6bb47bc0f0f..6fffbd794ef 100644
--- a/source/blender/blenkernel/intern/group.c
+++ b/source/blender/blenkernel/intern/group.c
@@ -142,16 +142,6 @@ Group *add_group(char *name)
return group;
}
-Group *copy_group(Group *group)
-{
- Group *groupn;
-
- groupn= MEM_dupallocN(group);
- BLI_duplicatelist(&groupn->gobject, &group->gobject);
-
- return groupn;
-}
-
/* external */
void add_to_group(Group *group, Object *ob)
{
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 8b21ed89722..1af0d37d58f 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -38,11 +38,6 @@
#include <time.h>
-#ifdef _WIN32
-#define open _open
-#define close _close
-#endif
-
#include "MEM_guardedalloc.h"
#include "IMB_imbuf_types.h"
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 02d92a62b59..3c8bf9200f8 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -119,13 +119,6 @@
#define MAX_IDPUP 60 /* was 24 */
-/* GS reads the memory pointed at in a specific ordering.
- only use this definition, makes little and big endian systems
- work fine, in conjunction with MAKE_ID */
-
-/* from blendef: */
-#define GS(a) (*((short *)(a)))
-
/* ************* general ************************ */
void id_lib_extern(ID *id)
@@ -155,220 +148,6 @@ void id_us_min(ID *id)
id->us--;
}
-int id_make_local(ID *id, int test)
-{
- if(id->flag & LIB_INDIRECT)
- return 0;
-
- switch(GS(id->name)) {
- case ID_SCE:
- return 0; /* not implemented */
- case ID_LI:
- return 0; /* can't be linked */
- case ID_OB:
- if(!test) make_local_object((Object*)id);
- return 1;
- case ID_ME:
- if(!test) {
- make_local_mesh((Mesh*)id);
- make_local_key(((Mesh*)id)->key);
- }
- return 1;
- case ID_CU:
- if(!test) {
- make_local_curve((Curve*)id);
- make_local_key(((Curve*)id)->key);
- }
- return 1;
- case ID_MB:
- if(!test) make_local_mball((MetaBall*)id);
- return 1;
- case ID_MA:
- if(!test) make_local_material((Material*)id);
- return 1;
- case ID_TE:
- if(!test) make_local_texture((Tex*)id);
- return 1;
- case ID_IM:
- return 0; /* not implemented */
- case ID_WV:
- return 0; /* deprecated */
- case ID_LT:
- if(!test) {
- make_local_lattice((Lattice*)id);
- make_local_key(((Lattice*)id)->key);
- }
- return 1;
- case ID_LA:
- if(!test) make_local_lamp((Lamp*)id);
- return 1;
- case ID_CA:
- if(!test) make_local_camera((Camera*)id);
- return 1;
- case ID_IP:
- return 0; /* deprecated */
- case ID_KE:
- if(!test) make_local_key((Key*)id);
- return 1;
- case ID_WO:
- if(!test) make_local_world((World*)id);
- return 1;
- case ID_SCR:
- return 0; /* can't be linked */
- case ID_VF:
- return 0; /* not implemented */
- case ID_TXT:
- return 0; /* not implemented */
- case ID_SCRIPT:
- return 0; /* deprecated */
- case ID_SO:
- return 0; /* not implemented */
- case ID_GR:
- return 0; /* not implemented */
- case ID_AR:
- if(!test) make_local_armature((bArmature*)id);
- return 1;
- case ID_AC:
- if(!test) make_local_action((bAction*)id);
- return 1;
- case ID_NT:
- return 0; /* not implemented */
- case ID_BR:
- if(!test) make_local_brush((Brush*)id);
- return 1;
- case ID_PA:
- if(!test) make_local_particlesettings((ParticleSettings*)id);
- return 1;
- case ID_WM:
- return 0; /* can't be linked */
- case ID_GD:
- return 0; /* not implemented */
- }
-
- return 0;
-}
-
-int id_copy(ID *id, ID **newid, int test)
-{
- if(!test) *newid= NULL;
-
- /* conventions:
- * - make shallow copy, only this ID block
- * - id.us of the new ID is set to 1 */
- switch(GS(id->name)) {
- case ID_SCE:
- return 0; /* can't be copied from here */
- case ID_LI:
- return 0; /* can't be copied from here */
- case ID_OB:
- if(!test) *newid= (ID*)copy_object((Object*)id);
- return 1;
- case ID_ME:
- if(!test) *newid= (ID*)copy_mesh((Mesh*)id);
- return 1;
- case ID_CU:
- if(!test) *newid= (ID*)copy_curve((Curve*)id);
- return 1;
- case ID_MB:
- if(!test) *newid= (ID*)copy_mball((MetaBall*)id);
- return 1;
- case ID_MA:
- if(!test) *newid= (ID*)copy_material((Material*)id);
- return 1;
- case ID_TE:
- if(!test) *newid= (ID*)copy_texture((Tex*)id);
- return 1;
- case ID_IM:
- return 0; /* not implemented */
- case ID_WV:
- return 0; /* deprecated */
- case ID_LT:
- if(!test) *newid= (ID*)copy_lattice((Lattice*)id);
- return 1;
- case ID_LA:
- if(!test) *newid= (ID*)copy_lamp((Lamp*)id);
- return 1;
- case ID_CA:
- if(!test) *newid= (ID*)copy_camera((Camera*)id);
- return 1;
- case ID_IP:
- return 0; /* deprecated */
- case ID_KE:
- if(!test) *newid= (ID*)copy_key((Key*)id);
- return 1;
- case ID_WO:
- if(!test) *newid= (ID*)copy_world((World*)id);
- return 1;
- case ID_SCR:
- return 0; /* can't be copied from here */
- case ID_VF:
- return 0; /* not implemented */
- case ID_TXT:
- if(!test) *newid= (ID*)copy_text((Text*)id);
- return 1;
- case ID_SCRIPT:
- return 0; /* deprecated */
- case ID_SO:
- return 0; /* not implemented */
- case ID_GR:
- if(!test) *newid= (ID*)copy_group((Group*)id);
- return 1;
- case ID_AR:
- if(!test) *newid= (ID*)copy_armature((bArmature*)id);
- return 1;
- case ID_AC:
- if(!test) *newid= (ID*)copy_action((bAction*)id);
- return 1;
- case ID_NT:
- if(!test) *newid= (ID*)ntreeCopyTree((bNodeTree*)id, 0);
- return 1;
- case ID_BR:
- if(!test) *newid= (ID*)copy_brush((Brush*)id);
- return 1;
- case ID_PA:
- if(!test) *newid= (ID*)psys_copy_settings((ParticleSettings*)id);
- return 1;
- case ID_WM:
- return 0; /* can't be copied from here */
- case ID_GD:
- return 0; /* not implemented */
- }
-
- return 0;
-}
-
-int id_unlink(ID *id, int test)
-{
- Main *mainlib= G.main;
- ListBase *lb;
-
- switch(GS(id->name)) {
- case ID_TXT:
- if(test) return 1;
- unlink_text(mainlib, (Text*)id);
- break;
- case ID_GR:
- if(test) return 1;
- unlink_group((Group*)id);
- break;
- case ID_OB:
- if(test) return 1;
- unlink_object(NULL, (Object*)id);
- break;
- }
-
- if(id->us == 0) {
- if(test) return 1;
-
- lb= wich_libbase(mainlib, GS(id->name));
- free_libblock(lb, id);
-
- return 1;
- }
-
- return 0;
-}
-
ListBase *wich_libbase(Main *mainlib, short type)
{
switch( type ) {
@@ -630,6 +409,13 @@ void *alloc_libblock(ListBase *lb, short type, const char *name)
return id;
}
+/* GS reads the memory pointed at in a specific ordering.
+ only use this definition, makes little and big endian systems
+ work fine, in conjunction with MAKE_ID */
+
+/* from blendef: */
+#define GS(a) (*((short *)(a)))
+
/* by spec, animdata is first item after ID */
/* we still read ->adt itself, to ensure compiler warns when it doesnt exist */
static void id_copy_animdata(ID *id)
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index e6f9ac2f404..50db2bfe706 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -170,22 +170,7 @@ void init_material(Material *ma)
ma->sss_front= 1.0f;
ma->sss_back= 1.0f;
- ma->vol.density = 1.0f;
- ma->vol.emission = 0.0f;
- ma->vol.absorption = 1.0f;
- ma->vol.scattering = 1.0f;
- ma->vol.emission_col[0] = ma->vol.emission_col[1] = ma->vol.emission_col[2] = 1.0f;
- ma->vol.absorption_col[0] = ma->vol.absorption_col[1] = ma->vol.absorption_col[2] = 0.0f;
- ma->vol.density_scale = 1.0f;
- ma->vol.depth_cutoff = 0.01f;
- ma->vol.stepsize_type = MA_VOL_STEP_RANDOMIZED;
- ma->vol.stepsize = 0.2f;
- ma->vol.shade_stepsize = 0.2f;
- ma->vol.shade_type = MA_VOL_SHADE_SINGLE;
- ma->vol.shadeflag |= MA_VOL_PRECACHESHADING;
- ma->vol.precache_resolution = 50;
-
- ma->mode= MA_TRACEBLE|MA_SHADBUF|MA_SHADOW|MA_RAYBIAS|MA_TANGENT_STR|MA_ZTRANSP;
+ ma->mode= MA_TRACEBLE|MA_SHADBUF|MA_SHADOW|MA_RAYBIAS|MA_TANGENT_STR;
ma->preview = NULL;
}
@@ -1031,15 +1016,15 @@ void ramp_blend(int type, float *r, float *g, float *b, float fac, float *col)
}
break;
case MA_RAMP_DARK:
- tmp=col[0]+((1-col[0])*facm);
- if(tmp < *r) *r= tmp;
- if(g) {
- tmp=col[1]+((1-col[1])*facm);
- if(tmp < *g) *g= tmp;
- tmp=col[2]+((1-col[2])*facm);
- if(tmp < *b) *b= tmp;
- }
- break;
+ tmp= fac*col[0];
+ if(tmp < *r) *r= tmp;
+ if(g) {
+ tmp= fac*col[1];
+ if(tmp < *g) *g= tmp;
+ tmp= fac*col[2];
+ if(tmp < *b) *b= tmp;
+ }
+ break;
case MA_RAMP_LIGHT:
tmp= fac*col[0];
if(tmp > *r) *r= tmp;
@@ -1169,37 +1154,8 @@ void ramp_blend(int type, float *r, float *g, float *b, float fac, float *col)
}
}
break;
- case MA_RAMP_SOFT:
- if (g){
- float scr, scg, scb;
-
- /* first calculate non-fac based Screen mix */
- scr = 1.0 - ((1.0 - col[0])) * (1.0 - *r);
- scg = 1.0 - ((1.0 - col[1])) * (1.0 - *g);
- scb = 1.0 - ((1.0 - col[2])) * (1.0 - *b);
-
- *r = facm*(*r) + fac*(((1.0 - *r) * col[0] * (*r)) + (*r * scr));
- *g = facm*(*g) + fac*(((1.0 - *g) * col[1] * (*g)) + (*g * scg));
- *b = facm*(*b) + fac*(((1.0 - *b) * col[2] * (*b)) + (*b * scb));
- }
- break;
- case MA_RAMP_LINEAR:
- if (col[0] > 0.5)
- *r = *r + fac*(2*(col[0]-0.5));
- else
- *r = *r + fac*(2*(col[0]) - 1);
- if (g){
- if (col[1] > 0.5)
- *g = *g + fac*(2*(col[1]-0.5));
- else
- *g = *g + fac*(2*(col[1]) -1);
- if (col[2] > 0.5)
- *b = *b + fac*(2*(col[2]-0.5));
- else
- *b = *b + fac*(2*(col[2]) - 1);
- }
- break;
- }
+ }
+
}
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index dcd8a746673..695bb6e3fa3 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -978,7 +978,7 @@ void mesh_set_smooth_flag(Object *meshOb, int enableSmooth)
}
}
-// XXX do this in caller DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+// XXX do this in caller DAG_object_flush_update(scene, meshOb, OB_RECALC_DATA);
}
void mesh_calc_normals(MVert *mverts, int numVerts, MFace *mfaces, int numFaces, float **faceNors_r)
@@ -1266,7 +1266,7 @@ void mesh_pmv_revert(Object *ob, Mesh *me)
MEM_freeN(me->pv->vert_map);
me->pv->vert_map= NULL;
-// XXX do this in caller DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+// XXX do this in caller DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
}
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index f06173264ee..53d1baa5c9c 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -73,12 +73,11 @@
#include "BLI_editVert.h"
-
-
+#include "MTC_matrixops.h"
+#include "MTC_vectorops.h"
#include "BKE_main.h"
#include "BKE_anim.h"
-#include "BKE_action.h"
#include "BKE_bmesh.h"
// XXX #include "BKE_booleanops.h"
#include "BKE_cloth.h"
@@ -1190,7 +1189,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
if(amd->end_cap && amd->end_cap != ob)
end_cap = mesh_get_derived_final(scene, amd->end_cap, CD_MASK_MESH);
- Mat4One(offset);
+ MTC_Mat4One(offset);
indexMap = MEM_callocN(sizeof(*indexMap) * dm->getNumVerts(dm),
"indexmap");
@@ -1212,14 +1211,14 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
float result_mat[4][4];
if(ob)
- Mat4Invert(obinv, ob->obmat);
+ MTC_Mat4Invert(obinv, ob->obmat);
else
- Mat4One(obinv);
+ MTC_Mat4One(obinv);
- Mat4MulSerie(result_mat, offset,
+ MTC_Mat4MulSerie(result_mat, offset,
obinv, amd->offset_ob->obmat,
NULL, NULL, NULL, NULL, NULL);
- Mat4CpyMat4(offset, result_mat);
+ MTC_Mat4CpyMat4(offset, result_mat);
}
if(amd->fit_type == MOD_ARR_FITCURVE && amd->curve_ob) {
@@ -1244,7 +1243,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
prescribed length */
if(amd->fit_type == MOD_ARR_FITLENGTH
|| amd->fit_type == MOD_ARR_FITCURVE) {
- float dist = sqrt(Inpf(offset[3], offset[3]));
+ float dist = sqrt(MTC_dot3Float(offset[3], offset[3]));
if(dist > 1e-6f)
/* this gives length = first copy start to last copy end
@@ -1277,11 +1276,11 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
result = CDDM_from_template(dm, finalVerts, finalEdges, finalFaces);
/* calculate the offset matrix of the final copy (for merging) */
- Mat4One(final_offset);
+ MTC_Mat4One(final_offset);
for(j=0; j < count - 1; j++) {
- Mat4MulMat4(tmp_mat, final_offset, offset);
- Mat4CpyMat4(final_offset, tmp_mat);
+ MTC_Mat4MulMat4(tmp_mat, final_offset, offset);
+ MTC_Mat4CpyMat4(final_offset, tmp_mat);
}
numVerts = numEdges = numFaces = 0;
@@ -1317,7 +1316,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
if((count > 1) && (amd->flags & MOD_ARR_MERGE)) {
float tmp_co[3];
VECCOPY(tmp_co, mv->co);
- Mat4MulVecfl(offset, tmp_co);
+ MTC_Mat4MulVecfl(offset, tmp_co);
for(j = 0; j < maxVerts; j++) {
/* if vertex already merged, don't use it */
@@ -1332,7 +1331,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
if(amd->flags & MOD_ARR_MERGEFINAL) {
VECCOPY(tmp_co, inMV->co);
inMV = &src_mvert[i];
- Mat4MulVecfl(final_offset, tmp_co);
+ MTC_Mat4MulVecfl(final_offset, tmp_co);
if(VecLenCompare(tmp_co, inMV->co, amd->merge_dist))
indexMap[i].merge_final = 1;
}
@@ -1350,7 +1349,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
*mv2 = *mv;
numVerts++;
- Mat4MulVecfl(offset, co);
+ MTC_Mat4MulVecfl(offset, co);
VECCOPY(mv2->co, co);
}
} else if(indexMap[i].merge != i && indexMap[i].merge_final) {
@@ -3182,7 +3181,7 @@ static void tag_and_count_extra_edges(SmoothMesh *mesh, float split_angle,
/* we know the edge has 2 faces, so check the angle */
SmoothFace *face1 = edge->faces->link;
SmoothFace *face2 = edge->faces->next->link;
- float edge_angle_cos = Inpf(face1->normal,
+ float edge_angle_cos = MTC_dot3Float(face1->normal,
face2->normal);
if(edge_angle_cos < threshold) {
@@ -4051,11 +4050,11 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
/* find the projector which the face points at most directly
* (projector normal with largest dot product is best)
*/
- best_dot = Inpf(projectors[0].normal, face_no);
+ best_dot = MTC_dot3Float(projectors[0].normal, face_no);
best_projector = &projectors[0];
for(j = 1; j < num_projectors; ++j) {
- float tmp_dot = Inpf(projectors[j].normal,
+ float tmp_dot = MTC_dot3Float(projectors[j].normal,
face_no);
if(tmp_dot > best_dot) {
best_dot = tmp_dot;
@@ -5599,7 +5598,6 @@ static void hookModifier_copyData(ModifierData *md, ModifierData *target)
thmd->indexar = MEM_dupallocN(hmd->indexar);
memcpy(thmd->parentinv, hmd->parentinv, sizeof(hmd->parentinv));
strncpy(thmd->name, hmd->name, 32);
- strncpy(thmd->subtarget, hmd->subtarget, 32);
}
CustomDataMask hookModifier_requiredDataMask(Object *ob, ModifierData *md)
@@ -5644,11 +5642,9 @@ static void hookModifier_updateDepgraph(ModifierData *md, DagForest *forest, Sce
if (hmd->object) {
DagNode *curNode = dag_get_node(forest, hmd->object);
-
- if (hmd->subtarget[0])
- dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA|DAG_RL_DATA_DATA, "Hook Modifier");
- else
- dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA, "Hook Modifier");
+
+ dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA,
+ "Hook Modifier");
}
}
@@ -5657,22 +5653,12 @@ static void hookModifier_deformVerts(
float (*vertexCos)[3], int numVerts, int useRenderParams, int isFinalCalc)
{
HookModifierData *hmd = (HookModifierData*) md;
- bPoseChannel *pchan= get_pose_channel(hmd->object->pose, hmd->subtarget);
- float vec[3], mat[4][4], dmat[4][4];
+ float vec[3], mat[4][4];
int i;
DerivedMesh *dm = derivedData;
-
- /* get world-space matrix of target, corrected for the space the verts are in */
- if (hmd->subtarget[0] && pchan) {
- /* bone target if there's a matching pose-channel */
- Mat4MulMat4(dmat, pchan->pose_mat, hmd->object->obmat);
- }
- else {
- /* just object target */
- Mat4CpyMat4(dmat, hmd->object->obmat);
- }
+
Mat4Invert(ob->imat, ob->obmat);
- Mat4MulSerie(mat, ob->imat, dmat, hmd->parentinv,
+ Mat4MulSerie(mat, ob->imat, hmd->object->obmat, hmd->parentinv,
NULL, NULL, NULL, NULL, NULL);
/* vertex indices? */
@@ -5729,8 +5715,7 @@ static void hookModifier_deformVerts(
}
}
}
- }
- else if(hmd->name[0]) { /* vertex group hook */
+ } else { /* vertex group hook */
bDeformGroup *curdef;
Mesh *me = ob->data;
int index = 0;
@@ -5816,6 +5801,26 @@ static void smokeModifier_initData(ModifierData *md)
smd->coll = NULL;
smd->type = 0;
smd->time = -1;
+
+ /*
+ smd->fluid = NULL;
+ smd->maxres = 48;
+ smd->amplify = 4;
+ smd->omega = 0.5;
+ smd->time = 0;
+ smd->flags = 0;
+ smd->noise = MOD_SMOKE_NOISEWAVE;
+ smd->visibility = 1;
+
+ // init 3dview buffer
+ smd->tvox = NULL;
+ smd->tray = NULL;
+ smd->tvoxbig = NULL;
+ smd->traybig = NULL;
+ smd->viewsettings = 0;
+ smd->bind = NULL;
+ smd->max_textures = 0;
+ */
}
static void smokeModifier_freeData(ModifierData *md)
@@ -6696,8 +6701,10 @@ static DerivedMesh * particleInstanceModifier_applyModifier(
if((psys->flag & (PSYS_HAIR_DONE|PSYS_KEYED) || psys->pointcache->flag & PTCACHE_BAKED) && pimd->flag & eParticleInstanceFlag_Path){
float ran = 0.0f;
if(pimd->random_position != 0.0f) {
- BLI_srandom(psys->seed + (i/totvert)%totpart);
- ran = pimd->random_position * BLI_frand();
+ /* just use some static collection of random numbers */
+ /* TODO: use something else that's unique to each instanced object */
+ pa = psys->particles + (i/totvert)%totpart;
+ ran = pimd->random_position * 0.5 * (1.0f + pa->r_ave[0]);
}
if(pimd->flag & eParticleInstanceFlag_KeepShape) {
@@ -8071,13 +8078,14 @@ static DerivedMesh *multiresModifier_applyModifier(ModifierData *md, Object *ob,
int useRenderParams, int isFinalCalc)
{
MultiresModifierData *mmd = (MultiresModifierData*)md;
+ Mesh *me = get_mesh(ob);
DerivedMesh *final;
/* TODO: for now just skip a level1 mesh */
if(mmd->lvl == 1)
return dm;
- final = multires_dm_create_from_derived(mmd, 0, dm, ob, useRenderParams, isFinalCalc);
+ final = multires_dm_create_from_derived(mmd, dm, me, useRenderParams, isFinalCalc);
if(mmd->undo_signal && mmd->undo_verts && mmd->undo_verts_tot == final->getNumVerts(final)) {
int i;
MVert *dst = CDDM_get_verts(final);
@@ -8572,9 +8580,7 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type)
mti->type = eModifierTypeType_OnlyDeform;
mti->initData = smokeModifier_initData;
mti->freeData = smokeModifier_freeData;
- mti->flags = eModifierTypeFlag_AcceptsMesh
- | eModifierTypeFlag_UsesPointCache
- | eModifierTypeFlag_Single;
+ mti->flags = eModifierTypeFlag_AcceptsMesh;
mti->deformVerts = smokeModifier_deformVerts;
mti->dependsOnTime = smokeModifier_dependsOnTime;
mti->updateDepgraph = smokeModifier_updateDepgraph;
@@ -8605,7 +8611,7 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type)
mti = INIT_TYPE(Surface);
mti->type = eModifierTypeType_OnlyDeform;
mti->initData = surfaceModifier_initData;
- mti->flags = eModifierTypeFlag_AcceptsMesh|eModifierTypeFlag_NoUserAdd;
+ mti->flags = eModifierTypeFlag_AcceptsMesh;
mti->dependsOnTime = surfaceModifier_dependsOnTime;
mti->freeData = surfaceModifier_freeData;
mti->deformVerts = surfaceModifier_deformVerts;
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c
index 37e7e55050a..e91f318adad 100644
--- a/source/blender/blenkernel/intern/multires.c
+++ b/source/blender/blenkernel/intern/multires.c
@@ -83,7 +83,7 @@ int multiresModifier_switch_level(Object *ob, const int distance)
mmd->lvl += distance;
if(mmd->lvl < 1) mmd->lvl = 1;
else if(mmd->lvl > mmd->totlvl) mmd->lvl = mmd->totlvl;
- /* XXX: DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ /* XXX: DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
object_handle_update(ob);*/
return 1;
}
@@ -204,11 +204,10 @@ static void VecAddUf(float a[3], float b[3])
a[2] += b[2];
}
-static void multires_subdisp(DerivedMesh *orig, Object *ob, DerivedMesh *final, int lvl, int totlvl,
+static void multires_subdisp(DerivedMesh *orig, Mesh *me, DerivedMesh *final, int lvl, int totlvl,
int totsubvert, int totsubedge, int totsubface, int addverts)
{
DerivedMesh *mrdm;
- Mesh *me = ob->data;
MultiresModifierData mmd_sub;
MVert *mvs = CDDM_get_verts(final);
MVert *mvd, *mvd_f1, *mvs_f1, *mvd_f3, *mvd_f4;
@@ -223,7 +222,7 @@ static void multires_subdisp(DerivedMesh *orig, Object *ob, DerivedMesh *final,
memset(&mmd_sub, 0, sizeof(MultiresModifierData));
mmd_sub.lvl = mmd_sub.totlvl = totlvl;
- mrdm = multires_dm_create_from_derived(&mmd_sub, 1, orig, ob, 0, 0);
+ mrdm = multires_dm_create_from_derived(&mmd_sub, orig, me, 0, 0);
mvd = CDDM_get_verts(mrdm);
/* Need to map from ccg to mrdm */
@@ -396,7 +395,7 @@ static void multires_subdisp(DerivedMesh *orig, Object *ob, DerivedMesh *final,
}
}
- final->needsFree = 1;
+ final->needsFree = 1;
final->release(final);
mrdm->needsFree = 1;
MultiresDM_mark_as_modified(mrdm);
@@ -469,8 +468,7 @@ void multiresModifier_subdivide(MultiresModifierData *mmd, Object *ob, int dista
orig = CDDM_from_mesh(me, NULL);
memset(&mmd_sub, 0, sizeof(MultiresModifierData));
mmd_sub.lvl = mmd_sub.totlvl = mmd->lvl;
- mmd_sub.simple = simple;
- mrdm = multires_dm_create_from_derived(&mmd_sub, 1, orig, ob, 0, 0);
+ mrdm = multires_dm_create_from_derived(&mmd_sub, orig, me, 0, 0);
totsubvert = mrdm->getNumVerts(mrdm);
totsubedge = mrdm->getNumEdges(mrdm);
totsubface = mrdm->getNumFaces(mrdm);
@@ -499,7 +497,7 @@ void multiresModifier_subdivide(MultiresModifierData *mmd, Object *ob, int dista
orig = CDDM_from_mesh(me, NULL);
- multires_subdisp(orig, ob, final, mmd->lvl, mmd->totlvl, totsubvert, totsubedge, totsubface, 0);
+ multires_subdisp(orig, me, final, mmd->lvl, mmd->totlvl, totsubvert, totsubedge, totsubface, 0);
orig->needsFree = 1;
orig->release(orig);
@@ -1168,11 +1166,9 @@ static void multiresModifier_disp_run(DerivedMesh *dm, MVert *subco, int invert)
static void multiresModifier_update(DerivedMesh *dm)
{
- Object *ob;
Mesh *me;
MDisps *mdisps;
- ob = MultiresDM_get_object(dm);
me = MultiresDM_get_mesh(dm);
mdisps = CustomData_get_layer(&me->fdata, CD_MDISPS);
@@ -1193,7 +1189,7 @@ static void multiresModifier_update(DerivedMesh *dm)
(includes older displacements but not new sculpts) */
mmd.totlvl = totlvl;
mmd.lvl = lvl;
- subco_dm = multires_dm_create_from_derived(&mmd, 1, orig, ob, 0, 0);
+ subco_dm = multires_dm_create_from_derived(&mmd, orig, me, 0, 0);
cur_lvl_orig_verts = CDDM_get_verts(subco_dm);
/* Subtract the original vertex cos from the new vertex cos */
@@ -1203,7 +1199,7 @@ static void multiresModifier_update(DerivedMesh *dm)
final = multires_subdisp_pre(dm, totlvl - lvl, 0);
- multires_subdisp(orig, ob, final, lvl, totlvl, dm->getNumVerts(dm), dm->getNumEdges(dm),
+ multires_subdisp(orig, me, final, lvl, totlvl, dm->getNumVerts(dm), dm->getNumEdges(dm),
dm->getNumFaces(dm), 1);
subco_dm->release(subco_dm);
@@ -1230,7 +1226,7 @@ void multires_force_update(Object *ob)
}
}
-struct DerivedMesh *multires_dm_create_from_derived(MultiresModifierData *mmd, int local_mmd, DerivedMesh *dm, Object *ob,
+struct DerivedMesh *multires_dm_create_from_derived(MultiresModifierData *mmd, DerivedMesh *dm, Mesh *me,
int useRenderParams, int isFinalCalc)
{
SubsurfModifierData smd;
@@ -1239,8 +1235,7 @@ struct DerivedMesh *multires_dm_create_from_derived(MultiresModifierData *mmd, i
int i;
ms.mmd = mmd;
- ms.ob = ob;
- ms.local_mmd = local_mmd;
+ ms.me = me;
memset(&smd, 0, sizeof(SubsurfModifierData));
smd.levels = smd.renderLevels = mmd->lvl - 1;
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 480c79fbc1a..c41c4ae78e4 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -291,7 +291,7 @@ NlaStrip *add_nlastrip (bAction *act)
/* determine initial range
* - strip length cannot be 0... ever...
*/
- calc_action_range(strip->act, &strip->actstart, &strip->actend, 0);
+ calc_action_range(strip->act, &strip->actstart, &strip->actend, 1);
strip->start = strip->actstart;
strip->end = (IS_EQ(strip->actstart, strip->actend)) ? (strip->actstart + 1.0f): (strip->actend);
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 90ea53d4364..bd6919dc115 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -22,7 +22,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): Bob Holcomb.
+ * Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -2597,7 +2597,7 @@ void ntreeLocalMerge(bNodeTree *localtree, bNodeTree *ntree)
if(outsocket_exists(lnode->new_node, lsock->new_sock)) {
lsock->new_sock->ns.data= lsock->ns.data;
lsock->ns.data= NULL;
- lsock->new_sock= NULL;
+ lsock->new_sock= NULL;
}
}
}
@@ -2932,7 +2932,6 @@ static void registerCompositNodes(ListBase *ntypelist)
nodeRegisterType(ntypelist, &cmp_node_viewer);
nodeRegisterType(ntypelist, &cmp_node_splitviewer);
nodeRegisterType(ntypelist, &cmp_node_output_file);
- nodeRegisterType(ntypelist, &cmp_node_view_levels);
nodeRegisterType(ntypelist, &cmp_node_curve_rgb);
nodeRegisterType(ntypelist, &cmp_node_mix_rgb);
@@ -2972,9 +2971,7 @@ static void registerCompositNodes(ListBase *ntypelist)
nodeRegisterType(ntypelist, &cmp_node_premulkey);
nodeRegisterType(ntypelist, &cmp_node_diff_matte);
- nodeRegisterType(ntypelist, &cmp_node_distance_matte);
- nodeRegisterType(ntypelist, &cmp_node_chroma_matte);
- nodeRegisterType(ntypelist, &cmp_node_color_matte);
+ nodeRegisterType(ntypelist, &cmp_node_chroma);
nodeRegisterType(ntypelist, &cmp_node_channel_matte);
nodeRegisterType(ntypelist, &cmp_node_color_spill);
nodeRegisterType(ntypelist, &cmp_node_luma_matte);
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index f10226f6f6b..0e45aedc3ed 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -101,13 +101,13 @@
#include "BKE_mball.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
-#include "BKE_paint.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "BKE_property.h"
#include "BKE_sca.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
+#include "BKE_sculpt.h"
#include "BKE_softbody.h"
#include "LBM_fluidsim.h"
@@ -284,7 +284,6 @@ void free_object(Object *ob)
if(ob->adt) BKE_free_animdata((ID *)ob);
if(ob->poselib) ob->poselib->id.us--;
if(ob->dup_group) ob->dup_group->id.us--;
- if(ob->gpd) ob->gpd->id.us--;
if(ob->defbase.first)
BLI_freelistN(&ob->defbase);
if(ob->pose)
@@ -308,8 +307,6 @@ void free_object(Object *ob)
if(ob->gpulamp.first) GPU_lamp_free(ob);
free_sculptsession(&ob->sculpt);
-
- if(ob->pc_ids.first) BLI_freelistN(&ob->pc_ids);
}
static void unlink_object__unlinkModifierLinks(void *userData, Object *ob, Object **obpoin)
@@ -481,15 +478,15 @@ void unlink_object(Scene *scene, Object *ob)
if(tpsys->part->dup_ob==ob)
tpsys->part->dup_ob= NULL;
- if(tpsys->part->phystype==PART_PHYS_BOIDS) {
+ if(tpsys->part->flag&PART_STICKY) {
ParticleData *pa;
- BoidParticle *bpa;
int p;
for(p=0,pa=tpsys->particles; p<tpsys->totpart; p++,pa++) {
- bpa = pa->boid;
- if(bpa->ground == ob)
- bpa->ground = NULL;
+ if(pa->stick_ob==ob) {
+ pa->stick_ob= 0;
+ pa->flag &= ~PARS_STICKY;
+ }
}
}
if(tpsys->part->boids) {
@@ -1019,8 +1016,6 @@ Object *add_only_object(int type, char *name)
ob->fluidsimFlag = 0;
ob->fluidsimSettings = NULL;
- ob->pc_ids.first = ob->pc_ids.last = NULL;
-
return ob;
}
@@ -1082,35 +1077,19 @@ ParticleSystem *copy_particlesystem(ParticleSystem *psys)
{
ParticleSystem *psysn;
ParticleData *pa;
- int p;
+ int a;
psysn= MEM_dupallocN(psys);
psysn->particles= MEM_dupallocN(psys->particles);
psysn->child= MEM_dupallocN(psys->child);
+ if(psysn->particles->keys)
+ psysn->particles->keys = MEM_dupallocN(psys->particles->keys);
- if(psys->part->type == PART_HAIR) {
- for(p=0, pa=psysn->particles; p<psysn->totpart; p++, pa++)
- pa->hair = MEM_dupallocN(pa->hair);
- }
-
- if(psysn->particles->keys || psysn->particles->boid) {
- ParticleKey *key = psysn->particles->keys;
- BoidParticle *boid = psysn->particles->boid;
-
- if(key)
- key = MEM_dupallocN(key);
-
- if(boid)
- boid = MEM_dupallocN(boid);
-
- for(p=0, pa=psysn->particles; p<psysn->totpart; p++, pa++) {
- if(boid)
- pa->boid = boid++;
- if(key) {
- pa->keys = key;
- key += pa->totkey;
- }
- }
+ for(a=0, pa=psysn->particles; a<psysn->totpart; a++, pa++) {
+ if(pa->hair)
+ pa->hair= MEM_dupallocN(pa->hair);
+ if(a)
+ pa->keys= (pa-1)->keys + (pa-1)->totkey;
}
if(psys->soft) {
@@ -1118,7 +1097,14 @@ ParticleSystem *copy_particlesystem(ParticleSystem *psys)
psysn->soft->particles = psysn;
}
- BLI_duplicatelist(&psysn->targets, &psys->targets);
+ if(psys->particles->boid) {
+ psysn->particles->boid = MEM_dupallocN(psys->particles->boid);
+ for(a=1, pa=psysn->particles+1; a<psysn->totpart; a++, pa++)
+ pa->boid = (pa-1)->boid + 1;
+ }
+
+ if(psys->targets.first)
+ BLI_duplicatelist(&psysn->targets, &psys->targets);
psysn->pathcache= NULL;
psysn->childcache= NULL;
@@ -1282,8 +1268,7 @@ Object *copy_object(Object *ob)
obn->derivedFinal = NULL;
obn->gpulamp.first = obn->gpulamp.last = NULL;
- obn->pc_ids.first = obn->pc_ids.last = NULL;
-
+
return obn;
}
@@ -1807,7 +1792,7 @@ static void give_parvert(Object *par, int nr, float *vec)
count= 0;
while(nu && !found) {
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
@@ -2550,61 +2535,3 @@ int ray_hit_boundbox(struct BoundBox *bb, float ray_start[3], float ray_normal[3
return result;
}
-
-static int pc_cmp(void *a, void *b)
-{
- LinkData *ad = a, *bd = b;
- if((int)ad->data > (int)bd->data)
- return 1;
- else return 0;
-}
-
-int object_insert_ptcache(Object *ob)
-{
- LinkData *link = NULL;
- int i = 0;
-
- BLI_sortlist(&ob->pc_ids, pc_cmp);
-
- for(link=ob->pc_ids.first, i = 0; link; link=link->next, i++)
- {
- int index =(int)link->data;
-
- if(i < index)
- break;
- }
-
- link = MEM_callocN(sizeof(LinkData), "PCLink");
- link->data = (void *)i;
- BLI_addtail(&ob->pc_ids, link);
-
- return i;
-}
-
-#if 0
-static int pc_findindex(ListBase *listbase, int index)
-{
- LinkData *link= NULL;
- int number= 0;
-
- if (listbase == NULL) return -1;
-
- link= listbase->first;
- while (link) {
- if ((int)link->data == index)
- return number;
-
- number++;
- link= link->next;
- }
-
- return -1;
-}
-
-void object_delete_ptcache(Object *ob, int index)
-{
- int list_index = pc_findindex(&ob->pc_ids, index);
- LinkData *link = BLI_findlink(&ob->pc_ids, list_index);
- BLI_freelinkN(&ob->pc_ids, link);
-}
-#endif
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index bd0b1a5e36e..8c77ed92aa1 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -63,14 +63,6 @@
#include "BKE_packedFile.h"
#include "BKE_report.h"
-#ifdef _WIN32
-#define open _open
-#define close _close
-#define read _read
-#define write _write
-#endif
-
-
int seekPackedFile(PackedFile *pf, int offset, int whence)
{
int oldseek = -1, seek = 0;
@@ -481,7 +473,7 @@ int unpackSound(ReportList *reports, bSound *sound, int how)
freePackedFile(sound->packedfile);
sound->packedfile = 0;
- sound_load(NULL, sound);
+ sound_load(sound);
ret_value = RET_OK;
}
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 7c5b2b82b4b..80016f23d7c 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -39,11 +39,6 @@
#include <stdlib.h>
#include <string.h>
-const char PAINT_CURSOR_SCULPT[3] = {255, 100, 100};
-const char PAINT_CURSOR_VERTEX_PAINT[3] = {255, 255, 255};
-const char PAINT_CURSOR_WEIGHT_PAINT[3] = {200, 200, 255};
-const char PAINT_CURSOR_TEXTURE_PAINT[3] = {255, 255, 255};
-
Paint *paint_get_active(Scene *sce)
{
if(sce && sce->basact && sce->basact->object) {
@@ -159,17 +154,14 @@ int paint_facesel_test(Object *ob)
}
-void paint_init(Paint *p, const char col[3])
+void paint_init(Paint *p, const char *name)
{
Brush *brush;
/* If there's no brush, create one */
brush = paint_brush(p);
- brush_check_exists(&brush, "Brush");
+ brush_check_exists(&brush, name);
paint_brush_set(p, brush);
-
- memcpy(p->paint_cursor_col, col, 3);
- p->paint_cursor_col[3] = 128;
}
void free_paint(Paint *paint)
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 0ba2f357a1f..e1987d34a6c 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -92,10 +92,10 @@ static void do_child_modifiers(Scene *scene, Object *ob, ParticleSystem *psys, P
/* few helpers for countall etc. */
int count_particles(ParticleSystem *psys){
ParticleSettings *part=psys->part;
- PARTICLE_P;
- int tot=0;
+ ParticleData *pa;
+ int tot=0,p;
- LOOP_PARTICLES {
+ for(p=0,pa=psys->particles; p<psys->totpart; p++,pa++){
if(pa->alive == PARS_KILLED);
else if(pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0);
else if(pa->alive == PARS_DEAD && (part->flag & PART_DIED)==0);
@@ -106,10 +106,10 @@ int count_particles(ParticleSystem *psys){
}
int count_particles_mod(ParticleSystem *psys, int totgr, int cur){
ParticleSettings *part=psys->part;
- PARTICLE_P;
- int tot=0;
+ ParticleData *pa;
+ int tot=0,p;
- LOOP_PARTICLES {
+ for(p=0,pa=psys->particles; p<psys->totpart; p++,pa++){
if(pa->alive == PARS_KILLED);
else if(pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0);
else if(pa->alive == PARS_DEAD && (part->flag & PART_DIED)==0);
@@ -120,10 +120,10 @@ int count_particles_mod(ParticleSystem *psys, int totgr, int cur){
}
int psys_count_keys(ParticleSystem *psys)
{
- PARTICLE_P;
- int totkey=0;
+ ParticleData *pa;
+ int i, totpart=psys->totpart, totkey=0;
- LOOP_PARTICLES
+ for(i=0, pa=psys->particles; i<totpart; i++, pa++)
totkey += pa->totkey;
return totkey;
@@ -321,7 +321,7 @@ int psys_ob_has_hair(Object *ob)
}
int psys_in_edit_mode(Scene *scene, ParticleSystem *psys)
{
- return (scene->basact && (scene->basact->object->mode & OB_MODE_PARTICLE_EDIT) && psys==psys_get_current((scene->basact)->object) && (psys->edit || psys->pointcache->edit));
+ return ((scene->basact->object->mode & OB_MODE_PARTICLE_EDIT) && psys==psys_get_current((scene->basact)->object) && psys->edit);
}
int psys_check_enabled(Object *ob, ParticleSystem *psys)
{
@@ -368,16 +368,13 @@ void psys_free_settings(ParticleSettings *part)
void free_hair(ParticleSystem *psys, int softbody)
{
- PARTICLE_P;
-
- if(psys->part->type != PART_HAIR)
- return;
+ ParticleData *pa;
+ int i, totpart=psys->totpart;
- LOOP_PARTICLES {
+ for(i=0, pa=psys->particles; i<totpart; i++, pa++) {
if(pa->hair)
MEM_freeN(pa->hair);
pa->hair = NULL;
- pa->totkey = 0;
}
psys->flag &= ~PSYS_HAIR_DONE;
@@ -389,15 +386,13 @@ void free_hair(ParticleSystem *psys, int softbody)
}
void free_keyed_keys(ParticleSystem *psys)
{
- PARTICLE_P;
-
- if(psys->part->type == PART_HAIR)
- return;
+ ParticleData *pa;
+ int i;
if(psys->particles && psys->particles->keys) {
MEM_freeN(psys->particles->keys);
- LOOP_PARTICLES {
+ for(i=0, pa=psys->particles; i<psys->totpart; i++, pa++) {
if(pa->keys) {
pa->keys= NULL;
pa->totkey= 0;
@@ -411,20 +406,13 @@ void free_child_path_cache(ParticleSystem *psys)
psys->childcache = NULL;
psys->totchildcache = 0;
}
-void psys_free_path_cache(ParticleSystem *psys, PTCacheEdit *edit)
+void psys_free_path_cache(ParticleSystem *psys)
{
- if(edit) {
- psys_free_path_cache_buffers(edit->pathcache, &edit->pathcachebufs);
- edit->pathcache= NULL;
- edit->totcached= 0;
- }
- if(psys) {
- psys_free_path_cache_buffers(psys->pathcache, &psys->pathcachebufs);
- psys->pathcache= NULL;
- psys->totcached= 0;
+ psys_free_path_cache_buffers(psys->pathcache, &psys->pathcachebufs);
+ psys->pathcache= NULL;
+ psys->totcached= 0;
- free_child_path_cache(psys);
- }
+ free_child_path_cache(psys);
}
void psys_free_children(ParticleSystem *psys)
{
@@ -436,29 +424,6 @@ void psys_free_children(ParticleSystem *psys)
free_child_path_cache(psys);
}
-void psys_free_particles(ParticleSystem *psys)
-{
- PARTICLE_P;
-
- if(psys->particles) {
- if(psys->part->type==PART_HAIR) {
- LOOP_PARTICLES {
- if(pa->hair)
- MEM_freeN(pa->hair);
- }
- }
-
- if(psys->particles->keys)
- MEM_freeN(psys->particles->keys);
-
- if(psys->particles->boid)
- MEM_freeN(psys->particles->boid);
-
- MEM_freeN(psys->particles);
- psys->particles= NULL;
- psys->totpart= 0;
- }
-}
/* free everything */
void psys_free(Object *ob, ParticleSystem * psys)
{
@@ -466,12 +431,23 @@ void psys_free(Object *ob, ParticleSystem * psys)
int nr = 0;
ParticleSystem * tpsys;
- psys_free_path_cache(psys, NULL);
+ psys_free_path_cache(psys);
+
+ free_hair(psys, 1);
- psys_free_particles(psys);
+ free_keyed_keys(psys);
if(psys->edit && psys->free_edit)
- psys->free_edit(psys->edit);
+ psys->free_edit(psys);
+
+ if(psys->particles){
+ if(psys->particles->boid)
+ MEM_freeN(psys->particles->boid);
+
+ MEM_freeN(psys->particles);
+ psys->particles = 0;
+ psys->totpart = 0;
+ }
if(psys->child){
MEM_freeN(psys->child);
@@ -502,11 +478,14 @@ void psys_free(Object *ob, ParticleSystem * psys)
psys->part=0;
}
+ if(psys->reactevents.first)
+ BLI_freelistN(&psys->reactevents);
+
BKE_ptcache_free_list(&psys->ptcaches);
psys->pointcache = NULL;
- BLI_freelistN(&psys->targets);
- BLI_freelistN(&psys->reactevents);
+ if(psys->targets.first)
+ BLI_freelistN(&psys->targets);
BLI_kdtree_free(psys->tree);
@@ -666,7 +645,7 @@ void psys_render_restore(Object *ob, ParticleSystem *psys)
psmd->dm->release(psmd->dm);
}
- psys_free_path_cache(psys, NULL);
+ psys_free_path_cache(psys);
if(psys->child){
MEM_freeN(psys->child);
@@ -974,25 +953,17 @@ void psys_interpolate_particle(short type, ParticleKey keys[4], float dt, Partic
typedef struct ParticleInterpolationData {
- HairKey *hkey[2];
-
- int keyed;
ParticleKey *kkey[2];
-
- SoftBody *soft;
+ HairKey *hkey[2];
BodyPoint *bp[2];
-
- PointCache *cache;
-
- PTCacheEditPoint *epoint;
- PTCacheEditKey *ekey[2];
-
+ SoftBody *soft;
+ int keyed, cached;
float birthtime, dietime;
- int bspline;
} ParticleInterpolationData;
/* Assumes pointcache->mem_cache exists, so for disk cached particles call psys_make_temp_pointcache() before use */
-static void get_pointcache_keys_for_time(Object *ob, PointCache *cache, int index, float t, ParticleKey *key1, ParticleKey *key2)
+static void get_pointcache_keys_for_time(Object *ob, ParticleSystem *psys, int index, float t, ParticleKey *key1, ParticleKey *key2)
{
+ PointCache *cache = psys->pointcache;
static PTCacheMem *pm = NULL; /* not thread safe */
if(index < 0) { /* initialize */
@@ -1019,50 +990,35 @@ static void get_pointcache_keys_for_time(Object *ob, PointCache *cache, int inde
static void init_particle_interpolation(Object *ob, ParticleSystem *psys, ParticleData *pa, ParticleInterpolationData *pind)
{
- if(pind->epoint) {
- PTCacheEditPoint *point = pind->epoint;
-
- pind->ekey[0] = point->keys;
- pind->ekey[1] = point->totkey > 1 ? point->keys + 1 : NULL;
+ if(pind->keyed) {
+ pind->kkey[0] = pa->keys;
- pind->birthtime = *(point->keys->time);
- pind->dietime = *((point->keys + point->totkey - 1)->time);
- }
- else if(pind->keyed) {
- ParticleKey *key = pa->keys;
- pind->kkey[0] = key;
- pind->kkey[1] = pa->totkey > 1 ? key + 1 : NULL;
+ if(pa->totkey > 1)
+ pind->kkey[1] = pa->keys + 1;
+ else
+ pind->kkey[1] = NULL;
- pind->birthtime = key->time;
- pind->dietime = (key + pa->totkey - 1)->time;
+ pind->birthtime = pa->keys->time;
+ pind->dietime = (pa->keys + pa->totkey - 1)->time;
}
- else if(pind->cache) {
- get_pointcache_keys_for_time(ob, pind->cache, -1, 0.0f, NULL, NULL);
+ else if(pind->cached) {
+ get_pointcache_keys_for_time(ob, psys, -1, 0.0f, NULL, NULL);
- pind->birthtime = pa ? pa->time : pind->cache->startframe;
- pind->dietime = pa ? pa->dietime : pind->cache->endframe;
+ pind->birthtime = pa->time;
+ pind->dietime = pa->dietime;
}
else {
- HairKey *key = pa->hair;
- pind->hkey[0] = key;
- pind->hkey[1] = key + 1;
+ pind->hkey[0] = pa->hair;
+ pind->hkey[1] = pa->hair + 1;
- pind->birthtime = key->time;
- pind->dietime = (key + pa->totkey - 1)->time;
+ pind->birthtime = pa->hair->time;
+ pind->dietime = (pa->hair + pa->totkey - 1)->time;
}
- //if(pind->soft) {
- // pind->bp[0] = pind->soft->bpoint + pa->bpi;
- // pind->bp[1] = pind->soft->bpoint + pa->bpi + 1;
- //}
-}
-static void edit_to_particle(ParticleKey *key, PTCacheEditKey *ekey)
-{
- VECCOPY(key->co, ekey->co);
- if(ekey->vel) {
- VECCOPY(key->vel, ekey->vel);
+ if(pind->soft) {
+ pind->bp[0] = pind->soft->bpoint + pa->bpi;
+ pind->bp[1] = pind->soft->bpoint + pa->bpi + 1;
}
- key->time = *(ekey->time);
}
static void hair_to_particle(ParticleKey *key, HairKey *hkey)
{
@@ -1077,24 +1033,11 @@ static void bp_to_particle(ParticleKey *key, BodyPoint *bp, HairKey *hkey)
static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData *pa, float t, float frs_sec, ParticleInterpolationData *pind, ParticleKey *result)
{
- PTCacheEditPoint *point = pind->epoint;
ParticleKey keys[4];
- int point_vel = (point && point->keys->vel);
float real_t, dfra, keytime;
/* interpret timing and find keys */
- if(point) {
- if(result->time < 0.0f)
- real_t = -result->time;
- else
- real_t = *(pind->ekey[0]->time) + t * (*(pind->ekey[0][point->totkey-1].time) - *(pind->ekey[0]->time));
-
- while(*(pind->ekey[1]->time) < real_t)
- pind->ekey[1]++;
-
- pind->ekey[0] = pind->ekey[1] - 1;
- }
- else if(pind->keyed) {
+ if(pind->keyed) {
/* we have only one key, so let's use that */
if(pind->kkey[1]==NULL) {
copy_particle_key(result, pind->kkey[0], 1);
@@ -1131,7 +1074,7 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData
pind->kkey[0] = pind->kkey[1] - 1;
}
- else if(pind->cache) {
+ else if(pind->cached) {
if(result->time < 0.0f) /* flag for time in frames */
real_t = -result->time;
else
@@ -1152,11 +1095,7 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData
}
/* set actual interpolation keys */
- if(point) {
- edit_to_particle(keys + 1, pind->ekey[0]);
- edit_to_particle(keys + 2, pind->ekey[1]);
- }
- else if(pind->soft) {
+ if(pind->soft) {
pind->bp[0] = pind->bp[1] - 1;
bp_to_particle(keys + 1, pind->bp[0], pind->hkey[0]);
bp_to_particle(keys + 2, pind->bp[1], pind->hkey[1]);
@@ -1165,8 +1104,8 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData
memcpy(keys + 1, pind->kkey[0], sizeof(ParticleKey));
memcpy(keys + 2, pind->kkey[1], sizeof(ParticleKey));
}
- else if(pind->cache) {
- get_pointcache_keys_for_time(NULL, pind->cache, p, real_t, keys+1, keys+2);
+ else if(pind->cached) {
+ get_pointcache_keys_for_time(NULL, psys, p, real_t, keys+1, keys+2);
}
else {
hair_to_particle(keys + 1, pind->hkey[0]);
@@ -1174,14 +1113,8 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData
}
/* set secondary interpolation keys for hair */
- if(!pind->keyed && !pind->cache && !point_vel) {
- if(point) {
- if(pind->ekey[0] != point->keys)
- edit_to_particle(keys, pind->ekey[0] - 1);
- else
- edit_to_particle(keys, pind->ekey[0]);
- }
- else if(pind->soft) {
+ if(!pind->keyed && !pind->cached) {
+ if(pind->soft) {
if(pind->hkey[0] != pa->hair)
bp_to_particle(keys, pind->bp[0] - 1, pind->hkey[0] - 1);
else
@@ -1194,13 +1127,7 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData
hair_to_particle(keys, pind->hkey[0]);
}
- if(point) {
- if(pind->ekey[1] != point->keys + point->totkey - 1)
- edit_to_particle(keys + 3, pind->ekey[1] + 1);
- else
- edit_to_particle(keys + 3, pind->ekey[1]);
- }
- else if(pind->soft) {
+ if(pind->soft) {
if(pind->hkey[1] != pa->hair + pa->totkey - 1)
bp_to_particle(keys + 3, pind->bp[1] + 1, pind->hkey[1] + 1);
else
@@ -1218,19 +1145,19 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData
keytime = (real_t - keys[1].time) / dfra;
/* convert velocity to timestep size */
- if(pind->keyed || pind->cache || point_vel){
+ if(pind->keyed || pind->cached){
VecMulf(keys[1].vel, dfra / frs_sec);
VecMulf(keys[2].vel, dfra / frs_sec);
QuatInterpol(result->rot,keys[1].rot,keys[2].rot,keytime);
}
/* now we should have in chronologiacl order k1<=k2<=t<=k3<=k4 with keytime between [0,1]->[k2,k3] (k1 & k4 used for cardinal & bspline interpolation)*/
- psys_interpolate_particle((pind->keyed || pind->cache || point_vel) ? -1 /* signal for cubic interpolation */
- : (pind->bspline ? KEY_BSPLINE : KEY_CARDINAL)
+ psys_interpolate_particle((pind->keyed || pind->cached) ? -1 /* signal for cubic interpolation */
+ : ((psys->part->flag & PART_HAIR_BSPLINE) ? KEY_BSPLINE : KEY_CARDINAL)
,keys, keytime, result, 1);
/* the velocity needs to be converted back from cubic interpolation */
- if(pind->keyed || pind->cache || point_vel)
+ if(pind->keyed || pind->cached)
VecMulf(result->vel, frs_sec / dfra);
}
/************************************************/
@@ -1683,7 +1610,7 @@ ParticleSystemModifierData *psys_get_modifier(Object *ob, ParticleSystem *psys)
}
}
}
- return NULL;
+ return 0;
}
/************************************************/
/* Particles on a shape */
@@ -2202,7 +2129,7 @@ int psys_threads_init_path(ParticleThread *threads, Scene *scene, float cfra, in
/*---start figuring out what is actually wanted---*/
if(psys_in_edit_mode(scene, psys))
- if(psys->renderdata==0 && (psys->edit==NULL || pset->flag & PE_DRAW_PART)==0)
+ if(psys->renderdata==0 && (psys->edit==NULL || pset->flag & PE_SHOW_CHILD)==0)
totchild=0;
if(totchild && part->from!=PART_FROM_PARTICLE && part->childtype==PART_CHILD_FACES){
@@ -2318,7 +2245,7 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
needupdate= 0;
w= 0;
while(w<4 && cpa->pa[w]>=0) {
- if(psys->edit->points[cpa->pa[w]].flag & PEP_EDIT_RECALC) {
+ if(psys->particles[cpa->pa[w]].flag & PARS_EDIT_RECALC) {
needupdate= 1;
break;
}
@@ -2361,7 +2288,7 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
}
else{
if(ctx->editupdate && !(part->flag & PART_BRANCHING)) {
- if(!(psys->edit->points[cpa->parent].flag & PEP_EDIT_RECALC))
+ if(!(psys->particles[cpa->parent].flag & PARS_EDIT_RECALC))
return;
memset(keys, 0, sizeof(*keys)*(ctx->steps+1));
@@ -2574,9 +2501,6 @@ void psys_cache_child_paths(Scene *scene, Object *ob, ParticleSystem *psys, floa
ListBase threads;
int i, totchild, totparent, totthread;
- if(psys->flag & PSYS_GLOBAL_HAIR)
- return;
-
pthreads= psys_threads_create(scene, ob, psys);
if(!psys_threads_init_path(pthreads, scene, cfra, editupdate)) {
@@ -2633,121 +2557,158 @@ void psys_cache_child_paths(Scene *scene, Object *ob, ParticleSystem *psys, floa
/* -Usefull for making use of opengl vertex arrays for super fast strand drawing. */
/* -Makes child strands possible and creates them too into the cache. */
/* -Cached path data is also used to determine cut position for the editmode tool. */
-void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra)
+void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra, int editupdate)
{
- ParticleCacheKey *ca, **cache= psys->pathcache;
+ ParticleCacheKey *ca, **cache=psys->pathcache;
ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
- ParticleSettings *part = psys->part;
ParticleEditSettings *pset = &scene->toolsettings->particle;
+ ParticleSettings *part = psys->part;
- ParticleData *pa = psys->particles;
+ ParticleData *pa;
ParticleKey result;
- SoftBody *soft = NULL;
+ ParticleEdit *edit = 0;
+ ParticleEditKey *ekey = 0;
+
+ SoftBody *soft = 0;
BodyPoint *bp[2] = {NULL, NULL};
Material *ma;
+
ParticleInterpolationData pind;
float birthtime = 0.0, dietime = 0.0;
- float t, time = 0.0, dfra = 1.0, frs_sec = scene->r.frs_sec;
+ float t, time = 0.0, keytime = 0.0, dfra = 1.0, frs_sec = scene->r.frs_sec;
float col[4] = {0.5f, 0.5f, 0.5f, 1.0f};
float prev_tangent[3], hairmat[4][4];
float rotmat[3][3];
int k,i;
- int steps = (int)pow(2.0, (double)(psys->renderdata ? part->ren_step : part->draw_step));
+ int steps = (int)pow(2.0, (double)psys->part->draw_step);
int totpart = psys->totpart;
+ float sel_col[3];
+ float nosel_col[3];
float length, vec[3];
float *vg_effector= NULL, effector=0.0f;
float *vg_length= NULL, pa_length=1.0f;
int keyed, baked;
/* we don't have anything valid to create paths from so let's quit here */
- if(!(psys->flag & PSYS_HAIR_DONE) && !(psys->flag & PSYS_KEYED) && !(psys->pointcache->flag & PTCACHE_BAKED))
+ if((psys->flag & PSYS_HAIR_DONE)==0 && (psys->flag & PSYS_KEYED)==0 && (psys->pointcache->flag & PTCACHE_BAKED)==0)
return;
- if(psys_in_edit_mode(scene, psys))
- if(psys->renderdata==0 && (psys->edit==NULL || pset->flag & PE_DRAW_PART)==0)
- return;
-
BLI_srandom(psys->seed);
keyed = psys->flag & PSYS_KEYED;
baked = psys->pointcache->flag & PTCACHE_BAKED;
- /* clear out old and create new empty path cache */
- psys_free_path_cache(psys, psys->edit);
- cache= psys->pathcache= psys_alloc_path_cache_buffers(&psys->pathcachebufs, totpart, steps+1);
+ if(psys->renderdata) {
+ steps = (int)pow(2.0, (double)psys->part->ren_step);
+ }
+ else if(psys_in_edit_mode(scene, psys)) {
+ edit=psys->edit;
+
+ //timed = edit->draw_timed;
+
+ if(pset->brushtype == PE_BRUSH_WEIGHT) {
+ sel_col[0] = sel_col[1] = sel_col[2] = 1.0f;
+ nosel_col[0] = nosel_col[1] = nosel_col[2] = 0.0f;
+ }
+ else{
+ sel_col[0] = (float)edit->sel_col[0] / 255.0f;
+ sel_col[1] = (float)edit->sel_col[1] / 255.0f;
+ sel_col[2] = (float)edit->sel_col[2] / 255.0f;
+ nosel_col[0] = (float)edit->nosel_col[0] / 255.0f;
+ nosel_col[1] = (float)edit->nosel_col[1] / 255.0f;
+ nosel_col[2] = (float)edit->nosel_col[2] / 255.0f;
+ }
+ }
+
+ if(editupdate && psys->pathcache && totpart == psys->totcached) {
+ cache = psys->pathcache;
+ }
+ else {
+ /* clear out old and create new empty path cache */
+ psys_free_path_cache(psys);
+ cache= psys_alloc_path_cache_buffers(&psys->pathcachebufs, totpart, steps+1);
+ psys->pathcache= cache;
+ }
- if(psys->soft && psys->softflag & OB_SB_ENABLE) {
+ if(edit==NULL && psys->soft && psys->softflag & OB_SB_ENABLE) {
soft = psys->soft;
if(!soft->bpoint)
soft= NULL;
}
-
+
psys->lattice = psys_get_lattice(scene, ob, psys);
ma= give_current_material(ob, psys->part->omat);
if(ma && (psys->part->draw & PART_DRAW_MAT_COL))
VECCOPY(col, &ma->r)
-
+
if(psys->part->from!=PART_FROM_PARTICLE) {
if(!(psys->part->flag & PART_CHILD_EFFECT))
vg_effector = psys_cache_vgroup(psmd->dm, psys, PSYS_VG_EFFECTOR);
- if(!psys->totchild)
+ if(!edit && !psys->totchild)
vg_length = psys_cache_vgroup(psmd->dm, psys, PSYS_VG_LENGTH);
}
/*---first main loop: create all actual particles' paths---*/
- for(i=0; i<totpart; i++, pa++){
- if(pa->flag & PARS_NO_DISP || pa->flag & PARS_UNEXIST) {
+ for(i=0,pa=psys->particles; i<totpart; i++, pa++){
+ if(psys && edit==NULL && (pa->flag & PARS_NO_DISP || pa->flag & PARS_UNEXIST)) {
if(soft)
bp[0] += pa->totkey; /* TODO use of initialized value? */
continue;
}
- if(!psys->totchild) {
- BLI_srandom(psys->seed + i);
- pa_length = 1.0f - part->randlength * BLI_frand();
+ if(editupdate && !(pa->flag & PARS_EDIT_RECALC)) continue;
+ else memset(cache[i], 0, sizeof(*cache[i])*(steps+1));
+
+ if(!edit && !psys->totchild) {
+ pa_length = 1.0f - part->randlength * 0.5 * (1.0f + pa->r_ave[0]);
if(vg_length)
pa_length *= psys_particle_value_from_verts(psmd->dm,part->from,pa,vg_length);
}
- pind.keyed = keyed;
- pind.cache = baked ? psys->pointcache : NULL;
- pind.soft = soft;
- pind.epoint = NULL;
- pind.bspline = (psys->part->flag & PART_HAIR_BSPLINE);
-
- memset(cache[i], 0, sizeof(*cache[i])*(steps+1));
-
cache[i]->steps = steps;
+ if(edit)
+ ekey = edit->keys[i];
+
/*--get the first data points--*/
+ pind.keyed = keyed;
+ pind.cached = baked;
+ pind.soft = soft;
init_particle_interpolation(ob, psys, pa, &pind);
+
/* hairmat is needed for for non-hair particle too so we get proper rotations */
psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
VECCOPY(rotmat[0], hairmat[2]);
VECCOPY(rotmat[1], hairmat[1]);
VECCOPY(rotmat[2], hairmat[0]);
- if(part->draw & PART_ABS_PATH_TIME) {
- birthtime = MAX2(pind.birthtime, part->path_start);
- dietime = MIN2(pind.dietime, part->path_end);
- }
- else {
- float tb = pind.birthtime;
- birthtime = tb + part->path_start * (pind.dietime - tb);
- dietime = tb + part->path_end * (pind.dietime - tb);
- }
+ if(!edit) {
+ if(part->draw & PART_ABS_PATH_TIME) {
+ birthtime = MAX2(pind.birthtime, part->path_start);
+ dietime = MIN2(pind.dietime, part->path_end);
+ }
+ else {
+ float tb = pind.birthtime;
+ birthtime = tb + part->path_start * (pind.dietime - tb);
+ dietime = tb + part->path_end * (pind.dietime - tb);
+ }
- if(birthtime >= dietime) {
- cache[i]->steps = -1;
- continue;
- }
+ if(birthtime >= dietime) {
+ cache[i]->steps = -1;
+ continue;
+ }
- dietime = birthtime + pa_length * (dietime - birthtime);
+ dietime = birthtime + pa_length * (dietime - birthtime);
+ }
+ else
+ /* XXX brecht: don't know if this code from 2.4 is correct
+ * still, but makes hair appear again in particle mode */
+ dietime= pind.hkey[0][pa->totkey-1].time;
/*--interpolate actual path from data points--*/
for(k=0, ca=cache[i]; k<=steps; k++, ca++){
@@ -2760,13 +2721,45 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
do_particle_interpolation(psys, i, pa, t, frs_sec, &pind, &result);
/* keyed, baked and softbody are allready in global space */
- if(!keyed && !baked && !soft && !(psys->flag & PSYS_GLOBAL_HAIR)) {
+ if(!keyed && !baked && !soft) {
Mat4MulVecfl(hairmat, result.co);
}
VECCOPY(ca->co, result.co);
- VECCOPY(ca->col, col);
+
+ /* selection coloring in edit mode */
+ if(edit){
+ if(pset->brushtype==PE_BRUSH_WEIGHT){
+ if(k==steps)
+ VecLerpf(ca->col, nosel_col, sel_col, pind.hkey[0]->weight);
+ else
+ VecLerpf(ca->col, nosel_col, sel_col,
+ (1.0f - keytime) * pind.hkey[0]->weight + keytime * pind.hkey[1]->weight);
+ }
+ else{
+ if((ekey + (pind.hkey[0] - pa->hair))->flag & PEK_SELECT){
+ if((ekey + (pind.hkey[1] - pa->hair))->flag & PEK_SELECT){
+ VECCOPY(ca->col, sel_col);
+ }
+ else{
+ VecLerpf(ca->col, sel_col, nosel_col, keytime);
+ }
+ }
+ else{
+ if((ekey + (pind.hkey[1] - pa->hair))->flag & PEK_SELECT){
+ VecLerpf(ca->col, nosel_col, sel_col, keytime);
+ }
+ else{
+ VECCOPY(ca->col, nosel_col);
+ }
+ }
+ }
+ }
+ else{
+ VECCOPY(ca->col, col);
+ }
}
+
/*--modify paths and calculate rotation & velocity--*/
@@ -2779,16 +2772,16 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
for(k=0, ca=cache[i]; k<=steps; k++, ca++) {
/* apply effectors */
- if(!(psys->part->flag & PART_CHILD_EFFECT) && k)
+ if(!(psys->part->flag & PART_CHILD_EFFECT) && edit==0 && k)
do_path_effectors(scene, ob, psys, i, ca, k, steps, cache[i]->co, effector, dfra, cfra, &length, vec);
/* apply guide curves to path data */
- if(psys->effectors.first && (psys->part->flag & PART_CHILD_EFFECT)==0)
+ if(edit==0 && psys->effectors.first && (psys->part->flag & PART_CHILD_EFFECT)==0)
/* ca is safe to cast, since only co and vel are used */
do_guide(scene, (ParticleKey*)ca, i, (float)k/(float)steps, &psys->effectors);
/* apply lattice */
- if(psys->lattice)
+ if(psys->lattice && edit==0)
calc_latt_deform(psys->lattice, ca->co, 1.0f);
/* figure out rotation */
@@ -2817,8 +2810,8 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
cosangle= Inpf(tangent, prev_tangent);
/* note we do the comparison on cosangle instead of
- * angle, since floating point accuracy makes it give
- * different results across platforms */
+ * angle, since floating point accuracy makes it give
+ * different results across platforms */
if(cosangle > 0.999999f) {
QUATCOPY((ca - 1)->rot, (ca - 2)->rot);
}
@@ -2863,123 +2856,6 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
if(vg_length)
MEM_freeN(vg_length);
}
-void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cfra)
-{
- ParticleCacheKey *ca, **cache= edit->pathcache;
- ParticleEditSettings *pset = &scene->toolsettings->particle;
-
- PTCacheEditPoint *point = edit->points;
- PTCacheEditKey *ekey = NULL;
-
- ParticleSystem *psys = edit->psys;
- ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
- ParticleData *pa = psys ? psys->particles : NULL;
-
- ParticleInterpolationData pind;
- ParticleKey result;
-
- float birthtime = 0.0, dietime = 0.0;
- float t, time = 0.0, keytime = 0.0, frs_sec;
- float hairmat[4][4];
- int k,i;
- int steps = (int)pow(2.0, (double)pset->draw_step);
- int totpart = edit->totpoint;
- float sel_col[3];
- float nosel_col[3];
-
- steps = MAX2(steps, 4);
-
- if(!cache || edit->totpoint != edit->totcached) {
- /* clear out old and create new empty path cache */
- psys_free_path_cache(edit->psys, edit);
- cache= edit->pathcache= psys_alloc_path_cache_buffers(&edit->pathcachebufs, totpart, steps+1);
- }
-
- frs_sec = (psys || edit->pid.flag & PTCACHE_VEL_PER_SEC) ? 25.0f : 1.0f;
-
- sel_col[0] = (float)edit->sel_col[0] / 255.0f;
- sel_col[1] = (float)edit->sel_col[1] / 255.0f;
- sel_col[2] = (float)edit->sel_col[2] / 255.0f;
- nosel_col[0] = (float)edit->nosel_col[0] / 255.0f;
- nosel_col[1] = (float)edit->nosel_col[1] / 255.0f;
- nosel_col[2] = (float)edit->nosel_col[2] / 255.0f;
-
- /*---first main loop: create all actual particles' paths---*/
- for(i=0; i<totpart; i++, pa+=pa?1:0, point++){
- if(edit->totcached && !(point->flag & PEP_EDIT_RECALC))
- continue;
-
- ekey = point->keys;
-
- pind.keyed = 0;
- pind.cache = NULL;
- pind.soft = NULL;
- pind.epoint = point;
- pind.bspline = psys ? (psys->part->flag & PART_HAIR_BSPLINE) : 0;
-
- memset(cache[i], 0, sizeof(*cache[i])*(steps+1));
-
- cache[i]->steps = steps;
-
- /*--get the first data points--*/
- init_particle_interpolation(ob, psys, pa, &pind);
-
- if(psys)
- psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
-
- birthtime = pind.birthtime;
- dietime = pind.dietime;
-
- if(birthtime >= dietime) {
- cache[i]->steps = -1;
- continue;
- }
-
- /*--interpolate actual path from data points--*/
- for(k=0, ca=cache[i]; k<=steps; k++, ca++){
- time = (float)k / (float)steps;
-
- t = birthtime + time * (dietime - birthtime);
-
- result.time = -t;
-
- do_particle_interpolation(psys, i, pa, t, frs_sec, &pind, &result);
-
- /* non-hair points are allready in global space */
- if(psys && !(psys->flag & PSYS_GLOBAL_HAIR))
- Mat4MulVecfl(hairmat, result.co);
-
- VECCOPY(ca->co, result.co);
-
- ca->vel[0] = ca->vel[1] = 0.0f;
- ca->vel[1] = 1.0f;
-
- /* selection coloring in edit mode */
- if((ekey + (pind.ekey[0] - point->keys))->flag & PEK_SELECT){
- if((ekey + (pind.ekey[1] - point->keys))->flag & PEK_SELECT){
- VECCOPY(ca->col, sel_col);
- }
- else{
- keytime = (t - (*pind.ekey[0]->time))/((*pind.ekey[1]->time) - (*pind.ekey[0]->time));
- VecLerpf(ca->col, sel_col, nosel_col, keytime);
- }
- }
- else{
- if((ekey + (pind.ekey[1] - point->keys))->flag & PEK_SELECT){
- keytime = (t - (*pind.ekey[0]->time))/((*pind.ekey[1]->time) - (*pind.ekey[0]->time));
- VecLerpf(ca->col, nosel_col, sel_col, keytime);
- }
- else{
- VECCOPY(ca->col, nosel_col);
- }
- }
-
- ca->time = t;
- }
- }
-
- edit->totcached = totpart;
-}
/************************************************/
/* Particle Key handling */
/************************************************/
@@ -3180,7 +3056,7 @@ void object_add_particle_system(Scene *scene, Object *ob)
psys->cfra=bsystem_time(scene,ob,scene->r.cfra+1,0.0);
DAG_scene_sort(scene);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
void object_remove_particle_system(Scene *scene, Object *ob)
{
@@ -3203,7 +3079,7 @@ void object_remove_particle_system(Scene *scene, Object *ob)
((ParticleSystem *) ob->particlesystem.first)->flag |= PSYS_CURRENT;
DAG_scene_sort(scene);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
static void default_particle_settings(ParticleSettings *part)
{
@@ -3383,7 +3259,7 @@ void psys_flush_particle_settings(Scene *scene, ParticleSettings *part, int reca
}
}
if(flush)
- DAG_id_flush_update(&base->object->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, base->object, OB_RECALC_DATA);
}
}
@@ -3415,7 +3291,7 @@ LinkNode *psys_using_settings(struct Scene *scene, ParticleSettings *part, int f
}
if(flush_update && found)
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
return node;
@@ -3594,8 +3470,6 @@ float psys_get_size(Object *ob, Material *ma, ParticleSystemModifierData *psmd,
{
ParticleTexture ptex;
float size=1.0f;
-
- BLI_srandom(psys->seed + (pa - psys->particles) + 100);
if(ma && part->from!=PART_FROM_PARTICLE){
ptex.size=size;
@@ -3614,7 +3488,7 @@ float psys_get_size(Object *ob, Material *ma, ParticleSystemModifierData *psmd,
size*=psys_particle_value_from_verts(psmd->dm,part->from,pa,vg_size);
if(part->randsize!=0.0)
- size*= 1.0f - part->randsize * BLI_frand();
+ size*= 1.0f - part->randsize*pa->sizemul;
return size*part->size;
}
@@ -3781,10 +3655,16 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
if(p<totpart){
pa = psys->particles + p;
+
+ if(pa->alive==PARS_DEAD && part->flag & PART_STICKY && pa->flag & PARS_STICKY && pa->stick_ob){
+ copy_particle_key(state,&pa->state,0);
+ key_from_object(pa->stick_ob,state);
+ return;
+ }
+
pind.keyed = keyed;
- pind.cache = cached ? psys->pointcache : NULL;
+ pind.cached = cached;
pind.soft = NULL;
- pind.epoint = NULL;
init_particle_interpolation(ob, psys, pa, &pind);
do_particle_interpolation(psys, p, pa, t, frs_sec, &pind, state);
@@ -3996,11 +3876,20 @@ int psys_get_particle_state(struct Scene *scene, Object *ob, ParticleSystem *psy
return 0; /* currently not supported */
else if(psys->totchild && p>=psys->totpart){
ChildParticle *cpa=psys->child+p-psys->totpart;
- ParticleKey *key1;
+ ParticleKey *key1, skey;
float t = (cfra - pa->time + pa->loop * pa->lifetime) / pa->lifetime;
pa = psys->particles + cpa->parent;
- key1=&pa->state;
+
+ if(pa->alive==PARS_DEAD && part->flag&PART_STICKY && pa->flag&PARS_STICKY && pa->stick_ob) {
+ key1 = &skey;
+ copy_particle_key(key1,&pa->state,0);
+ key_from_object(pa->stick_ob,key1);
+ }
+ else {
+ key1=&pa->state;
+ }
+
offset_child(cpa, key1, state, part->childflat, part->childrad);
CLAMP(t,0.0,1.0);
@@ -4057,6 +3946,10 @@ int psys_get_particle_state(struct Scene *scene, Object *ob, ParticleSystem *psy
}
}
+ if(pa->alive==PARS_DEAD && part->flag&PART_STICKY && pa->flag&PARS_STICKY && pa->stick_ob){
+ key_from_object(pa->stick_ob,state);
+ }
+
if(psys->lattice)
calc_latt_deform(psys->lattice, state->co,1.0f);
}
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 1931b89af38..dcd3fcd2f89 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -123,11 +123,21 @@ static int get_current_display_percentage(ParticleSystem *psys)
void psys_reset(ParticleSystem *psys, int mode)
{
ParticleSettings *part= psys->part;
- PARTICLE_P;
+ ParticleData *pa;
+ int i;
if(ELEM(mode, PSYS_RESET_ALL, PSYS_RESET_DEPSGRAPH)) {
- if(mode == PSYS_RESET_ALL || !(part->type == PART_HAIR && (psys->edit && psys->edit->edited))) {
- psys_free_particles(psys);
+ if(mode == PSYS_RESET_ALL || !(part->type == PART_HAIR && (psys->flag & PSYS_EDITED))) {
+ if(psys->particles) {
+ if(psys->particles->keys)
+ MEM_freeN(psys->particles->keys);
+
+ for(i=0, pa=psys->particles; i<psys->totpart; i++, pa++)
+ if(pa->hair) MEM_freeN(pa->hair);
+
+ MEM_freeN(psys->particles);
+ psys->particles= NULL;
+ }
psys->totpart= 0;
psys->totkeyed= 0;
@@ -135,17 +145,14 @@ void psys_reset(ParticleSystem *psys, int mode)
if(psys->reactevents.first)
BLI_freelistN(&psys->reactevents);
-
- if(psys->edit && psys->free_edit) {
- psys->free_edit(psys->edit);
- psys->edit = NULL;
- psys->free_edit = NULL;
- }
}
}
else if(mode == PSYS_RESET_CACHE_MISS) {
/* set all particles to be skipped */
- LOOP_PARTICLES
+ ParticleData *pa = psys->particles;
+ int p=0;
+
+ for(; p<psys->totpart; p++, pa++)
pa->flag |= PARS_NO_DISP;
}
@@ -158,7 +165,7 @@ void psys_reset(ParticleSystem *psys, int mode)
psys->totchild= 0;
/* reset path cache */
- psys_free_path_cache(psys, psys->edit);
+ psys_free_path_cache(psys);
/* reset point cache */
psys->pointcache->flag &= ~PTCACHE_SIMULATION_VALID;
@@ -167,10 +174,9 @@ void psys_reset(ParticleSystem *psys, int mode)
static void realloc_particles(Object *ob, ParticleSystem *psys, int new_totpart)
{
- ParticleData *newpars = NULL;
- BoidParticle *newboids = NULL;
- PARTICLE_P;
- int totpart, totsaved = 0;
+ ParticleData *newpars = 0, *pa;
+ BoidData *newboids = 0;
+ int i, totpart, totsaved = 0;
if(new_totpart<0) {
if(psys->part->distr==PART_DISTR_GRID && psys->part->from != PART_FROM_VERT) {
@@ -183,46 +189,47 @@ static void realloc_particles(Object *ob, ParticleSystem *psys, int new_totpart)
else
totpart=new_totpart;
- if(totpart && totpart != psys->totpart) {
+ if(totpart) {
newpars= MEM_callocN(totpart*sizeof(ParticleData), "particles");
-
- if(psys->particles) {
- totsaved=MIN2(psys->totpart,totpart);
- /*save old pars*/
- if(totsaved) {
- memcpy(newpars,psys->particles,totsaved*sizeof(ParticleData));
-
- if(psys->particles->boid)
- memcpy(newboids, psys->particles->boid, totsaved*sizeof(BoidParticle));
- }
- if(psys->particles->keys)
- MEM_freeN(psys->particles->keys);
+ if(psys->part->phystype == PART_PHYS_BOIDS)
+ newboids = MEM_callocN(totpart*sizeof(BoidData), "Boid Data");
+ }
+ if(psys->particles) {
+ totsaved=MIN2(psys->totpart,totpart);
+ /*save old pars*/
+ if(totsaved) {
+ memcpy(newpars,psys->particles,totsaved*sizeof(ParticleData));
- if(psys->particles->boid)
- MEM_freeN(psys->particles->boid);
+ if(newboids)
+ memcpy(newboids, psys->particles->boid, totsaved*sizeof(BoidData));
+ }
- for(p=0, pa=newpars; p<totsaved; p++, pa++) {
- if(pa->keys) {
- pa->keys= NULL;
- pa->totkey= 0;
- }
- }
+ if(psys->particles->keys)
+ MEM_freeN(psys->particles->keys);
- for(p=totsaved, pa=psys->particles+totsaved; p<psys->totpart; p++, pa++)
- if(pa->hair) MEM_freeN(pa->hair);
+ if(psys->particles->boid)
+ MEM_freeN(psys->particles->boid);
- MEM_freeN(psys->particles);
+ for(i=0, pa=newpars; i<totsaved; i++, pa++) {
+ if(pa->keys) {
+ pa->keys= NULL;
+ pa->totkey= 0;
+ }
}
-
- psys->particles=newpars;
- if(newboids) {
- LOOP_PARTICLES
- pa->boid = newboids++;
- }
-
- psys->totpart=totpart;
+ for(i=totsaved, pa=psys->particles+totsaved; i<psys->totpart; i++, pa++)
+ if(pa->hair) MEM_freeN(pa->hair);
+
+ MEM_freeN(psys->particles);
+ }
+ psys->particles=newpars;
+
+ if(newboids) {
+ pa = psys->particles;
+ pa->boid = newboids;
+ for(i=1, pa++; i<totpart; i++,pa++)
+ pa->boid = (pa-1)->boid + 1;
}
if(psys->child) {
@@ -230,6 +237,8 @@ static void realloc_particles(Object *ob, ParticleSystem *psys, int new_totpart)
psys->child=0;
psys->totchild=0;
}
+
+ psys->totpart=totpart;
}
static int get_psys_child_number(struct Scene *scene, ParticleSystem *psys)
@@ -276,7 +285,8 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm, ParticleSystem *psys)
each original elements can reference its derived elements
*/
Mesh *me= (Mesh*)ob->data;
- PARTICLE_P;
+ ParticleData *pa= 0;
+ int p;
/* CACHE LOCATIONS */
if(!dm->deformedOnly) {
@@ -313,7 +323,7 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm, ParticleSystem *psys)
}
/* cache the verts/faces! */
- LOOP_PARTICLES {
+ for(p=0,pa=psys->particles; p<psys->totpart; p++,pa++) {
if(psys->part->from == PART_FROM_VERT) {
if(nodearray[pa->num])
pa->num_dmcache= GET_INT_FROM_POINTER(nodearray[pa->num]->link);
@@ -333,7 +343,7 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm, ParticleSystem *psys)
* should know to use the num or num_dmcache, set the num_dmcache to
* an invalid value, just incase */
- LOOP_PARTICLES
+ for(p=0,pa=psys->particles; p<psys->totpart; p++,pa++)
pa->num_dmcache = -1;
}
}
@@ -1433,11 +1443,12 @@ static void distribute_particles_on_dm(DerivedMesh *finaldm, Scene *scene, Objec
/* ready for future use, to emit particles without geometry */
static void distribute_particles_on_shape(Object *ob, ParticleSystem *psys, int from)
{
- PARTICLE_P;
+ ParticleData *pa;
+ int totpart=psys->totpart, p;
fprintf(stderr,"Shape emission not yet possible!\n");
- LOOP_PARTICLES {
+ for(p=0,pa=psys->particles; p<totpart; p++,pa++){
pa->fuv[0]=pa->fuv[1]=pa->fuv[2]=pa->fuv[3]= 0.0;
pa->foffset= 0.0f;
pa->num= -1;
@@ -1459,11 +1470,12 @@ static void distribute_particles(Scene *scene, Object *ob, ParticleSystem *psys,
distribute_particles_on_shape(ob,psys,from);
if(distr_error){
- PARTICLE_P;
+ ParticleData *pa;
+ int totpart=psys->totpart, p;
fprintf(stderr,"Particle distribution error!\n");
- LOOP_PARTICLES {
+ for(p=0,pa=psys->particles; p<totpart; p++,pa++){
pa->fuv[0]=pa->fuv[1]=pa->fuv[2]=pa->fuv[3]= 0.0;
pa->foffset= 0.0f;
pa->num= -1;
@@ -1558,7 +1570,7 @@ void initialize_particle(ParticleData *pa, int p, Object *ob, ParticleSystem *ps
Material *ma=0;
//IpoCurve *icu=0; // XXX old animation system
int totpart;
- float rand;
+ float rand,length;
part=psys->part;
@@ -1613,8 +1625,40 @@ void initialize_particle(ParticleData *pa, int p, Object *ob, ParticleSystem *ps
pa->dietime= pa->time+pa->lifetime;
+ pa->sizemul= BLI_frand();
+
+ rand= BLI_frand();
+
+ /* while loops are to have a spherical distribution (avoid cubic distribution) */
+ if(part->phystype != PART_PHYS_BOIDS) {
+ /* boids store gravity in r_ve, so skip here */
+ length=2.0f;
+ while(length>1.0){
+ pa->r_ve[0]=2.0f*(BLI_frand()-0.5f);
+ pa->r_ve[1]=2.0f*(BLI_frand()-0.5f);
+ pa->r_ve[2]=2.0f*(BLI_frand()-0.5f);
+ length=VecLength(pa->r_ve);
+ }
+ }
+
+ length=2.0f;
+ while(length>1.0){
+ pa->r_ave[0]=2.0f*(BLI_frand()-0.5f);
+ pa->r_ave[1]=2.0f*(BLI_frand()-0.5f);
+ pa->r_ave[2]=2.0f*(BLI_frand()-0.5f);
+ length=VecLength(pa->r_ave);
+ }
+
+ pa->r_rot[0]=2.0f*(BLI_frand()-0.5f);
+ pa->r_rot[1]=2.0f*(BLI_frand()-0.5f);
+ pa->r_rot[2]=2.0f*(BLI_frand()-0.5f);
+ pa->r_rot[3]=2.0f*(BLI_frand()-0.5f);
+
+ NormalQuat(pa->r_rot);
+
if(part->type!=PART_HAIR && part->distr!=PART_DISTR_GRID && part->from != PART_FROM_VERT){
- if(ptex.exist < BLI_frand())
+ /* any unique random number will do (r_ave[0]) */
+ if(ptex.exist < 0.5*(1.0+pa->r_ave[0]))
pa->flag |= PARS_UNEXIST;
else
pa->flag &= ~PARS_UNEXIST;
@@ -1628,9 +1672,10 @@ void initialize_particle(ParticleData *pa, int p, Object *ob, ParticleSystem *ps
static void initialize_all_particles(Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd)
{
//IpoCurve *icu=0; // XXX old animation system
- PARTICLE_P;
+ ParticleData *pa;
+ int p, totpart=psys->totpart;
- LOOP_PARTICLES
+ for(p=0, pa=psys->particles; p<totpart; p++, pa++)
initialize_particle(pa,p,ob,psys,psmd);
if(psys->part->type != PART_FLUID) {
@@ -1698,39 +1743,10 @@ void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, Partic
float fac, phasefac, nor[3]={0,0,0},loc[3],tloc[3],vel[3]={0.0,0.0,0.0},rot[4],q2[4];
float r_vel[3],r_ave[3],r_rot[4],p_vel[3]={0.0,0.0,0.0};
float x_vec[3]={1.0,0.0,0.0}, utan[3]={0.0,1.0,0.0}, vtan[3]={0.0,0.0,1.0}, rot_vec[3]={0.0,0.0,0.0};
- float q_phase[4], length, r_phase;
+ float q_phase[4];
part=psys->part;
ptex.ivel=1.0;
-
- BLI_srandom(psys->seed + (pa - psys->particles));
-
- /* we need to get every random even if they're not used so that they don't effect eachother */
- /* while loops are to have a spherical distribution (avoid cubic distribution) */
- length=2.0f;
- while(length>1.0){
- r_vel[0]=2.0f*(BLI_frand()-0.5f);
- r_vel[1]=2.0f*(BLI_frand()-0.5f);
- r_vel[2]=2.0f*(BLI_frand()-0.5f);
- length=VecLength(r_vel);
- }
-
- length=2.0f;
- while(length>1.0){
- r_ave[0]=2.0f*(BLI_frand()-0.5f);
- r_ave[1]=2.0f*(BLI_frand()-0.5f);
- r_ave[2]=2.0f*(BLI_frand()-0.5f);
- length=VecLength(r_ave);
- }
-
- r_rot[0]=2.0f*(BLI_frand()-0.5f);
- r_rot[1]=2.0f*(BLI_frand()-0.5f);
- r_rot[2]=2.0f*(BLI_frand()-0.5f);
- r_rot[3]=2.0f*(BLI_frand()-0.5f);
-
- NormalQuat(r_rot);
-
- r_phase = BLI_frand();
if(part->from==PART_FROM_PARTICLE){
Object *tob;
@@ -1741,26 +1757,29 @@ void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, Partic
if(tob==0)
tob=ob;
- tpsys=BLI_findlink(&tob->particlesystem, psys->target_psys-1);
+ tpsys=BLI_findlink(&tob->particlesystem,psys->target_psys-1);
state.time = pa->time;
if(pa->num == -1)
memset(&state, 0, sizeof(state));
else
psys_get_particle_state(scene, tob,tpsys,pa->num,&state,1);
- psys_get_from_key(&state, loc, nor, rot, 0);
+ psys_get_from_key(&state,loc,nor,rot,0);
- QuatMulVecf(rot, vtan);
- QuatMulVecf(rot, utan);
+ QuatMulVecf(rot,vtan);
+ QuatMulVecf(rot,utan);
+ VECCOPY(r_vel,pa->r_ve);
+ VECCOPY(r_rot,pa->r_rot);
+ VECCOPY(r_ave,pa->r_ave);
- VECCOPY(p_vel, state.vel);
+ VECCOPY(p_vel,state.vel);
speed=Normalize(p_vel);
- VecMulf(p_vel, Inpf(r_vel, p_vel));
- VECSUB(p_vel, r_vel, p_vel);
+ VecMulf(p_vel,Inpf(pa->r_ve,p_vel));
+ VECSUB(p_vel,pa->r_ve,p_vel);
Normalize(p_vel);
- VecMulf(p_vel, speed);
+ VecMulf(p_vel,speed);
- VECCOPY(pa->fuv, loc); /* abusing pa->fuv (not used for "from particle") for storing emit location */
+ VECCOPY(pa->fuv,loc); /* abusing pa->fuv (not used for "from particle") for storing emit location */
}
else{
/* get precise emitter matrix if particle is born */
@@ -1814,25 +1833,29 @@ void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, Partic
/* -velocity */
if(part->randfac!=0.0){
- Mat4Mul3Vecfl(ob->obmat,r_vel);
+ VECADD(r_vel,tloc,pa->r_ve);
+ Mat4MulVecfl(ob->obmat,r_vel);
+ VECSUB(r_vel,r_vel,loc);
Normalize(r_vel);
}
/* -angular velocity */
if(part->avemode==PART_AVE_RAND){
- Mat4Mul3Vecfl(ob->obmat,r_ave);
+ VECADD(r_ave,tloc,pa->r_ave);
+ Mat4MulVecfl(ob->obmat,r_ave);
+ VECSUB(r_ave,r_ave,loc);
Normalize(r_ave);
}
/* -rotation */
if(part->randrotfac != 0.0f){
+ QUATCOPY(r_rot,pa->r_rot);
Mat4ToQuat(ob->obmat,rot);
QuatMul(r_rot,r_rot,rot);
}
}
if(part->phystype==PART_PHYS_BOIDS) {
- BoidParticle *bpa = pa->boid;
float dvec[3], q[4], mat[3][3];
VECCOPY(pa->state.co,loc);
@@ -1849,21 +1872,16 @@ void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, Partic
VECCOPY(pa->state.ave, nor);
}
/* and gravity in r_ve */
- bpa->gravity[0] = bpa->gravity[1] = 0.0f;
- bpa->gravity[2] = -1.0f;
+ pa->r_ve[0] = pa->r_ve[1] = 0.0f;
+ pa->r_ve[2] = -1.0f;
if(part->acc[2]!=0.0f)
- bpa->gravity[2] = part->acc[2];
-
- //pa->r_ve[0] = pa->r_ve[1] = 0.0f;
- //pa->r_ve[2] = -1.0f;
- //if(part->acc[2]!=0.0f)
- // pa->r_ve[2] = part->acc[2];
+ pa->r_ve[2] = part->acc[2];
/* calculate rotation matrix */
- Projf(dvec, r_vel, pa->state.ave);
+ Projf(dvec, pa->r_ve, pa->state.ave);
VecSubf(mat[0], pa->state.ave, dvec);
Normalize(mat[0]);
- VECCOPY(mat[2], r_vel);
+ VECCOPY(mat[2], pa->r_ve);
VecMulf(mat[2], -1.0f);
Normalize(mat[2]);
Crossf(mat[1], mat[2], mat[0]);
@@ -1872,10 +1890,10 @@ void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, Partic
Mat3ToQuat_is_ok(mat, q);
QuatCopy(pa->state.rot, q);
- bpa->data.health = part->boids->health;
- bpa->data.mode = eBoidMode_InAir;
- bpa->data.state_id = ((BoidState*)part->boids->states.first)->id;
- bpa->data.acc[0]=bpa->data.acc[1]=bpa->data.acc[2]=0.0f;
+ pa->boid->health = part->boids->health;
+ pa->boid->mode = eBoidMode_InAir;
+ pa->boid->state_id = ((BoidState*)part->boids->states.first)->id;
+ pa->boid->acc[0]=pa->boid->acc[1]=pa->boid->acc[2]=0.0f;
}
else {
/* conversion done so now we apply new: */
@@ -1964,8 +1982,8 @@ void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, Partic
/* rotation phase */
phasefac = part->phasefac;
- if(part->randphasefac != 0.0f)
- phasefac += part->randphasefac * r_phase;
+ if(part->randphasefac != 0.0f) /* abuse r_ave[0] as a random number */
+ phasefac += part->randphasefac * pa->r_ave[0];
VecRotToQuat(x_vec, phasefac*(float)M_PI, q_phase);
/* combine base rotation & phase */
@@ -2003,7 +2021,8 @@ void reset_particle(Scene *scene, ParticleData *pa, ParticleSystem *psys, Partic
pa->state.time = cfra;
-// pa->flag &= ~PARS_STICKY;
+ pa->stick_ob = 0;
+ pa->flag &= ~PARS_STICKY;
}
static void reset_all_particles(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd, float dtime, float cfra, int from)
{
@@ -2069,9 +2088,8 @@ static void set_keyed_keys(Scene *scene, Object *ob, ParticleSystem *psys)
{
ParticleSystem *kpsys = psys;
ParticleTarget *pt;
- PARTICLE_P;
- ParticleKey *key;
- int totpart = psys->totpart, k, totkeys = psys->totkeyed;
+ ParticleData *pa;
+ int totpart = psys->totpart, i, k, totkeys = psys->totkeyed;
/* no proper targets so let's clear and bail out */
if(psys->totkeyed==0) {
@@ -2083,12 +2101,12 @@ static void set_keyed_keys(Scene *scene, Object *ob, ParticleSystem *psys)
if(totpart && psys->particles->totkey != totkeys) {
free_keyed_keys(psys);
- key = MEM_callocN(totpart*totkeys*sizeof(ParticleKey), "Keyed keys");
+ psys->particles->keys = MEM_callocN(totpart*totkeys*sizeof(ParticleKey), "Keyed keys");
+ psys->particles->totkey = totkeys;
- LOOP_PARTICLES {
- pa->keys = key;
+ for(i=1, pa=psys->particles+1; i<totpart; i++,pa++){
+ pa->keys = (pa-1)->keys + totkeys;
pa->totkey = totkeys;
- key += totkeys;
}
}
@@ -2102,23 +2120,22 @@ static void set_keyed_keys(Scene *scene, Object *ob, ParticleSystem *psys)
else
kpsys = BLI_findlink(&ob->particlesystem, pt->psys - 1);
- LOOP_PARTICLES {
- key = pa->keys + k;
- key->time = -1.0; /* use current time */
+ for(i=0,pa=psys->particles; i<totpart; i++, pa++) {
+ (pa->keys + k)->time = -1.0; /* use current time */
- psys_get_particle_state(scene, pt->ob, kpsys, p%kpsys->totpart, key, 1);
+ psys_get_particle_state(scene, pt->ob, kpsys, i%kpsys->totpart, pa->keys + k, 1);
if(psys->flag & PSYS_KEYED_TIMING){
- key->time = pa->time + pt->time;
+ (pa->keys+k)->time = pa->time + pt->time;
if(pt->duration != 0.0f && k+1 < totkeys) {
- copy_particle_key(key+1, key, 1);
- (key+1)->time = pa->time + pt->time + pt->duration;
+ copy_particle_key(pa->keys+k+1, pa->keys+k, 1);
+ (pa->keys+k+1)->time = pa->time + pt->time + pt->duration;
}
}
else if(totkeys > 1)
- key->time = pa->time + (float)k / (float)(totkeys - 1) * pa->lifetime;
+ (pa->keys+k)->time = pa->time + (float)k / (float)(totkeys - 1) * pa->lifetime;
else
- key->time = pa->time;
+ pa->keys->time = pa->time;
}
if(psys->flag & PSYS_KEYED_TIMING && pt->duration!=0.0f)
@@ -2257,7 +2274,7 @@ void psys_clear_temp_pointcache(ParticleSystem *psys)
if((psys->pointcache->flag & PTCACHE_DISK_CACHE)==0)
return;
- BKE_ptcache_free_mem(&psys->pointcache->mem_cache);
+ BKE_ptache_free_mem(psys->pointcache);
}
void psys_get_pointcache_start_end(Scene *scene, ParticleSystem *psys, int *sfra, int *efra)
{
@@ -2273,15 +2290,16 @@ void psys_get_pointcache_start_end(Scene *scene, ParticleSystem *psys, int *sfra
static void update_particle_tree(ParticleSystem *psys)
{
if(psys) {
- PARTICLE_P;
+ ParticleData *pa = psys->particles;
+ int p, totpart = psys->totpart;
if(!psys->tree || psys->tree_frame != psys->cfra) {
BLI_kdtree_free(psys->tree);
- psys->tree = BLI_kdtree_new(psys->totpart);
+ psys->tree = BLI_kdtree_new(totpart);
- LOOP_PARTICLES {
+ for(p=0, pa=psys->particles; p<totpart; p++,pa++){
if(pa->flag & (PARS_NO_DISP+PARS_UNEXIST) || pa->alive != PARS_ALIVE)
continue;
@@ -2524,9 +2542,9 @@ static void precalc_effectors(Scene *scene, Object *ob, ParticleSystem *psys, Pa
ListBase *lb=&psys->effectors;
ParticleEffectorCache *ec;
ParticleSettings *part=psys->part;
- PARTICLE_P;
- int totpart;
+ ParticleData *pa;
float vec2[3],loc[3],*co=0;
+ int p,totpart;
for(ec= lb->first; ec; ec= ec->next) {
PartDeflect *pd= ec->ob->pd;
@@ -2550,7 +2568,7 @@ static void precalc_effectors(Scene *scene, Object *ob, ParticleSystem *psys, Pa
ec->distances=MEM_callocN(totpart*sizeof(float),"particle distances");
ec->locations=MEM_callocN(totpart*3*sizeof(float),"particle locations");
- LOOP_PARTICLES {
+ for(p=0,pa=psys->particles; p<totpart; p++, pa++){
if(part->from == PART_FROM_PARTICLE) {
VECCOPY(loc, pa->fuv);
}
@@ -3220,7 +3238,7 @@ static void deflect_particle(Scene *scene, Object *pob, ParticleSystemModifierDa
ParticleCollision col;
BVHTreeRayHit hit;
float ray_dir[3], zerovec[3]={0.0,0.0,0.0};
- float radius = ((part->flag & PART_SIZE_DEFL)?pa->size:0.0f), boid_z = 0.0f;
+ float radius = ((part->flag & PART_SIZE_DEFL)?pa->size:0.0f), boid_z;
int deflections=0, max_deflections=10;
VECCOPY(col.co1, pa->prev_state.co);
@@ -3229,10 +3247,9 @@ static void deflect_particle(Scene *scene, Object *pob, ParticleSystemModifierDa
/* override for boids */
if(part->phystype == PART_PHYS_BOIDS) {
- BoidParticle *bpa = pa->boid;
radius = pa->size;
boid_z = pa->state.co[2];
- skip_ob = bpa->ground;
+ skip_ob = pa->stick_ob;
}
/* 10 iterations to catch multiple deflections */
@@ -3302,7 +3319,12 @@ static void deflect_particle(Scene *scene, Object *pob, ParticleSystemModifierDa
deflections=max_deflections;
/* store for reactors */
- copy_particle_key(&reaction_state, &pa->state, 0);
+ copy_particle_key(&reaction_state,&pa->state,0);
+
+ if(part->flag & PART_STICKY){
+ pa->stick_ob=ob;
+ pa->flag |= PARS_STICKY;
+ }
}
else {
float nor_vec[3], tan_vec[3], tan_vel[3], vel[3];
@@ -3390,8 +3412,7 @@ static void deflect_particle(Scene *scene, Object *pob, ParticleSystemModifierDa
VECADDFAC(co, co, col.nor, (through ? -0.0001f : 0.0001f));
if(part->phystype == PART_PHYS_BOIDS && part->boids->options & BOID_ALLOW_LAND) {
- BoidParticle *bpa = pa->boid;
- if(bpa->data.mode == eBoidMode_OnLand || co[2] <= boid_z) {
+ if(pa->boid->mode == eBoidMode_OnLand || co[2] <= boid_z) {
co[2] = boid_z;
vel[2] = 0.0f;
}
@@ -3433,9 +3454,10 @@ static void deflect_particle(Scene *scene, Object *pob, ParticleSystemModifierDa
/* Hair */
/************************************************/
static void save_hair(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd, float cfra){
- HairKey *key, *root;
- PARTICLE_P;
+ ParticleData *pa;
+ HairKey *key;
int totpart;
+ int i;
Mat4Invert(ob->imat,ob->obmat);
@@ -3446,22 +3468,21 @@ static void save_hair(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSy
totpart=psys->totpart;
/* save new keys for elements if needed */
- LOOP_PARTICLES {
+ for(i=0,pa=psys->particles; i<totpart; i++,pa++) {
/* first time alloc */
if(pa->totkey==0 || pa->hair==NULL) {
pa->hair = MEM_callocN((psys->part->hair_step + 1) * sizeof(HairKey), "HairKeys");
pa->totkey = 0;
}
- key = root = pa->hair;
- key += pa->totkey;
+ key = pa->hair + pa->totkey;
/* convert from global to geometry space */
VecCopyf(key->co, pa->state.co);
Mat4MulVecfl(ob->imat, key->co);
if(pa->totkey) {
- VECSUB(key->co, key->co, root->co);
+ VECSUB(key->co, key->co, pa->hair->co);
psys_vec_rot_to_face(psmd->dm, pa, key->co);
}
@@ -3473,7 +3494,7 @@ static void save_hair(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSy
/* root is always in the origin of hair space so we set it to be so after the last key is saved*/
if(pa->totkey == psys->part->hair_step + 1)
- root->co[0] = root->co[1] = root->co[2] = 0.0f;
+ pa->hair->co[0] = pa->hair->co[1] = pa->hair->co[2] = 0.0f;
}
}
/************************************************/
@@ -3483,14 +3504,14 @@ static void save_hair(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSy
static void dynamics_step(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd, float cfra,
float *vg_vel, float *vg_tan, float *vg_rot, float *vg_size)
{
+ ParticleData *pa;
ParticleSettings *part=psys->part;
KDTree *tree=0;
IpoCurve *icu_esize= NULL; //=find_ipocurve(part->ipo,PART_EMIT_SIZE); // XXX old animation system
Material *ma=give_current_material(ob,part->omat);
BoidBrainData bbd;
- PARTICLE_P;
float timestep;
- int totpart;
+ int p, totpart;
/* current time */
float ctime, ipotime; // XXX old animation system
/* frame & time changes */
@@ -3519,7 +3540,7 @@ static void dynamics_step(Scene *scene, Object *ob, ParticleSystem *psys, Partic
if(part->type==PART_REACTOR)
vg_size=psys_cache_vgroup(psmd->dm,psys,PSYS_VG_SIZE);
- LOOP_PARTICLES {
+ for(p=0, pa=psys->particles; p<totpart; p++,pa++){
if(pa->flag & PARS_UNEXIST) continue;
/* set correct ipo timing */
@@ -3588,7 +3609,7 @@ static void dynamics_step(Scene *scene, Object *ob, ParticleSystem *psys, Partic
}
/* main loop: calculate physics for all particles */
- LOOP_PARTICLES {
+ for(p=0, pa=psys->particles; p<totpart; p++,pa++){
if(pa->flag & (PARS_UNEXIST+PARS_NO_DISP)) continue;
copy_particle_key(&pa->prev_state,&pa->state,1);
@@ -3676,6 +3697,9 @@ static void dynamics_step(Scene *scene, Object *ob, ParticleSystem *psys, Partic
else{
pa->alive=PARS_DEAD;
pa->state.time=pa->dietime;
+
+ if(pa->flag&PARS_STICKY)
+ psys_key_to_object(pa->stick_ob,&pa->state,0);
}
}
else
@@ -3723,29 +3747,52 @@ static void psys_update_path_cache(Scene *scene, Object *ob, ParticleSystemModif
if((part->type==PART_HAIR || psys->flag&PSYS_KEYED || psys->pointcache->flag & PTCACHE_BAKED) && ( psys_in_edit_mode(scene, psys) || (part->type==PART_HAIR
|| (part->ren_as == PART_DRAW_PATH && (part->draw_as == PART_DRAW_REND || psys->renderdata))))){
- psys_cache_paths(scene, ob, psys, cfra);
+ psys_cache_paths(scene, ob, psys, cfra, 0);
/* for render, child particle paths are computed on the fly */
if(part->childtype) {
- if(((psys->totchild!=0)) || (psys_in_edit_mode(scene, psys) && (pset->flag&PE_DRAW_PART)))
+ if(((psys->totchild!=0)) || (psys_in_edit_mode(scene, psys) && (pset->flag&PE_SHOW_CHILD)))
if(!(psys->part->type == PART_HAIR) || (psys->flag & PSYS_HAIR_DONE))
psys_cache_child_paths(scene, ob, psys, cfra, 0);
}
}
else if(psys->pathcache)
- psys_free_path_cache(psys, NULL);
+ psys_free_path_cache(psys);
+}
+
+/* calculate and store key locations in world coordinates */
+void psys_update_world_cos(Object *ob, ParticleSystem *psys)
+{
+ ParticleSystemModifierData *psmd= psys_get_modifier(ob, psys);
+ ParticleData *pa;
+ ParticleEditKey *key;
+ int i, k, totpart;
+ float hairmat[4][4];
+
+ if(psys==0 || psys->edit==0)
+ return;
+
+ totpart= psys->totpart;
+
+ for(i=0, pa=psys->particles; i<totpart; i++, pa++) {
+ psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
+
+ for(k=0, key=psys->edit->keys[i]; k<pa->totkey; k++, key++) {
+ VECCOPY(key->world_co,key->co);
+ Mat4MulVecfl(hairmat, key->world_co);
+ }
+ }
}
static void hair_step(Scene *scene, Object *ob, ParticleSystemModifierData *psmd, ParticleSystem *psys, float cfra)
{
ParticleSettings *part = psys->part;
- PARTICLE_P;
- float disp = (float)get_current_display_percentage(psys)/100.0f;
-
- BLI_srandom(psys->seed);
+ ParticleData *pa;
+ int p;
+ float disp = (float)get_current_display_percentage(psys)/50.0f-1.0f;
- LOOP_PARTICLES {
- if(BLI_frand() > disp)
+ for(p=0, pa=psys->particles; p<psys->totpart; p++,pa++){
+ if(pa->r_rot[0] > disp)
pa->flag |= PARS_NO_DISP;
else
pa->flag &= ~PARS_NO_DISP;
@@ -3761,6 +3808,9 @@ static void hair_step(Scene *scene, Object *ob, ParticleSystemModifierData *psmd
psys_init_effectors(scene, ob, part->eff_group, psys);
if(psys->effectors.first)
precalc_effectors(scene, ob,psys,psmd,cfra);
+
+ if(psys_in_edit_mode(scene, psys))
+ psys_update_world_cos(ob, psys);
psys_update_path_cache(scene, ob,psmd,psys,cfra);
}
@@ -3769,14 +3819,13 @@ static void hair_step(Scene *scene, Object *ob, ParticleSystemModifierData *psmd
static void cached_step(Scene *scene, Object *ob, ParticleSystemModifierData *psmd, ParticleSystem *psys, float cfra)
{
ParticleSettings *part=psys->part;
+ ParticleData *pa;
ParticleKey state;
IpoCurve *icu_esize= NULL; //=find_ipocurve(part->ipo,PART_EMIT_SIZE); // XXX old animation system
Material *ma=give_current_material(ob,part->omat);
- PARTICLE_P;
+ int p;
float disp, birthtime, dietime, *vg_size= NULL; // XXX ipotime=cfra
- BLI_srandom(psys->seed);
-
if(part->from!=PART_FROM_PARTICLE)
vg_size= psys_cache_vgroup(psmd->dm,psys,PSYS_VG_SIZE);
@@ -3789,9 +3838,9 @@ static void cached_step(Scene *scene, Object *ob, ParticleSystemModifierData *ps
precalc_effectors(scene, ob,psys,psmd,cfra);
//}
- disp= (float)get_current_display_percentage(psys)/100.0f;
+ disp= (float)get_current_display_percentage(psys)/50.0f-1.0f;
- LOOP_PARTICLES {
+ for(p=0, pa=psys->particles; p<psys->totpart; p++,pa++){
#if 0 // XXX old animation system
if((part->flag&PART_ABS_TIME)==0 && part->ipo){
ipotime=100.0f*(cfra-pa->time)/pa->lifetime;
@@ -3838,7 +3887,7 @@ static void cached_step(Scene *scene, Object *ob, ParticleSystemModifierData *ps
psys->lattice= NULL;
}
- if(BLI_frand() > disp)
+ if(pa->r_rot[0] > disp)
pa->flag |= PARS_NO_DISP;
else
pa->flag &= ~PARS_NO_DISP;
@@ -3891,8 +3940,8 @@ static void psys_changed_type(Object *ob, ParticleSystem *psys)
else {
free_hair(psys, 1);
- CLAMP(part->path_start, 0.0f, MAX2(100.0f, part->end + part->lifetime));
- CLAMP(part->path_end, 0.0f, MAX2(100.0f, part->end + part->lifetime));
+ CLAMP(part->path_start, part->sta, part->end + part->lifetime);
+ CLAMP(part->path_end, part->sta, part->end + part->lifetime);
}
psys->softflag= 0;
@@ -3901,25 +3950,23 @@ static void psys_changed_type(Object *ob, ParticleSystem *psys)
}
void psys_check_boid_data(ParticleSystem *psys)
{
- BoidParticle *bpa;
- PARTICLE_P;
-
- pa = psys->particles;
+ ParticleData *pa = psys->particles;
+ int p = 1;
if(!pa)
return;
if(psys->part && psys->part->phystype==PART_PHYS_BOIDS) {
if(!pa->boid) {
- bpa = MEM_callocN(psys->totpart * sizeof(BoidParticle), "Boid Data");
+ pa->boid = MEM_callocN(psys->totpart * sizeof(BoidData), "Boid Data");
- LOOP_PARTICLES
- pa->boid = bpa++;
+ for(pa++; p<psys->totpart; p++, pa++)
+ pa->boid = (pa-1)->boid + 1;
}
}
else if(pa->boid){
MEM_freeN(pa->boid);
- LOOP_PARTICLES
+ for(; p<psys->totpart; p++, pa++)
pa->boid = NULL;
}
}
@@ -4067,10 +4114,10 @@ static void particles_fluid_step(Scene *scene, Object *ob, ParticleSystem *psys,
static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd, float cfra)
{
ParticleSettings *part;
+ ParticleData *pa;
PointCache *cache;
PTCacheID pid;
- PARTICLE_P;
- int totpart, oldtotpart, totchild, oldtotchild;
+ int totpart, oldtotpart, totchild, oldtotchild, p;
float disp, *vg_vel= 0, *vg_tan= 0, *vg_rot= 0, *vg_size= 0;
int init= 0, distr= 0, alloc= 0, usecache= 0, only_children_changed= 0;
int framenr, framedelta, startframe, endframe;
@@ -4213,7 +4260,7 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
}
else if(result==PTCACHE_READ_OLD) {
psys->cfra = (float)cache->simframe;
- LOOP_PARTICLES {
+ for(p=0, pa=psys->particles; p<totpart; p++, pa++) {
/* update alive status */
if(pa->time > psys->cfra)
pa->alive = PARS_UNBORN;
@@ -4252,11 +4299,10 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
}
/* set particles to be not calculated TODO: can't work with pointcache */
- disp= (float)get_current_display_percentage(psys)/100.0f;
+ disp= (float)get_current_display_percentage(psys)/50.0f-1.0f;
- BLI_srandom(psys->seed);
- LOOP_PARTICLES {
- if(BLI_frand() > disp)
+ for(p=0, pa=psys->particles; p<totpart; p++,pa++){
+ if(pa->r_rot[0] > disp)
pa->flag |= PARS_NO_DISP;
else
pa->flag &= ~PARS_NO_DISP;
@@ -4293,7 +4339,7 @@ static void system_step(Scene *scene, Object *ob, ParticleSystem *psys, Particle
psys_update_path_cache(scene, ob, psmd, psys,(int)cfra);
}
else if(psys->pathcache)
- psys_free_path_cache(psys, NULL);
+ psys_free_path_cache(psys);
/* cleanup */
if(vg_vel) MEM_freeN(vg_vel);
@@ -4339,7 +4385,7 @@ static void psys_to_softbody(Scene *scene, Object *ob, ParticleSystem *psys)
static int hair_needs_recalc(ParticleSystem *psys)
{
- if((!psys->edit || !psys->edit->edited) &&
+ if((psys->flag & PSYS_EDITED)==0 &&
((psys->flag & PSYS_HAIR_DONE)==0 || psys->recalc & PSYS_RECALC_RESET)) {
return 1;
}
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 5a14277d63b..09170d92866 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -59,23 +59,28 @@
#include "BLI_blenlib.h"
-/* both in intern */
#include "smoke_API.h"
-#include "minilzo.h"
-
-#include "LzmaLib.h"
-
/* needed for directory lookup */
-/* untitled blend's need getpid for a unique name */
#ifndef WIN32
#include <dirent.h>
-#include <unistd.h>
#else
-#include <process.h>
#include "BLI_winstuff.h"
#endif
+/* untitled blend's need getpid for a unique name */
+#ifdef WIN32
+#include <process.h>
+#else
+#include <unistd.h>
+#endif
+
+#ifdef _WIN32
+#ifndef snprintf
+#define snprintf _snprintf
+#endif
+#endif
+
static void ptcache_data_to(void **data, int type, int index, void *to);
static void ptcache_data_from(void **data, int type, void *from);
@@ -171,7 +176,6 @@ static int ptcache_write_particle(int index, void *psys_v, void **data)
{
ParticleSystem *psys= psys_v;
ParticleData *pa = psys->particles + index;
- BoidParticle *boid = (psys->part->phystype == PART_PHYS_BOIDS) ? pa->boid : NULL;
float times[3] = {pa->time, pa->dietime, pa->lifetime};
if(data[BPHYS_DATA_INDEX]) {
@@ -189,8 +193,8 @@ static int ptcache_write_particle(int index, void *psys_v, void **data)
ptcache_data_from(data, BPHYS_DATA_SIZE, &pa->size);
ptcache_data_from(data, BPHYS_DATA_TIMES, times);
- if(boid)
- ptcache_data_from(data, BPHYS_DATA_BOIDS, &boid->data);
+ if(pa->boid)
+ ptcache_data_from(data, BPHYS_DATA_TIMES, &pa->boid);
return 1;
}
@@ -206,7 +210,6 @@ static void ptcache_read_particle(int index, void *psys_v, void **data, float fr
{
ParticleSystem *psys= psys_v;
ParticleData *pa = psys->particles + index;
- BoidParticle *boid = (psys->part->phystype == PART_PHYS_BOIDS) ? pa->boid : NULL;
if(cfra > pa->state.time)
memcpy(&pa->prev_state, &pa->state, sizeof(ParticleKey));
@@ -230,8 +233,8 @@ static void ptcache_read_particle(int index, void *psys_v, void **data, float fr
pa->lifetime = times[2];
}
- if(boid)
- ptcache_data_to(data, BPHYS_DATA_BOIDS, 0, &boid->data);
+ if(pa->boid)
+ ptcache_data_to(data, BPHYS_DATA_BOIDS, 0, &pa->boid);
/* determine velocity from previous location */
if(data[BPHYS_DATA_LOCATION] && !data[BPHYS_DATA_VELOCITY]) {
@@ -383,6 +386,8 @@ static int ptcache_totpoint_cloth(void *cloth_v)
void BKE_ptcache_id_from_softbody(PTCacheID *pid, Object *ob, SoftBody *sb)
{
ParticleSystemModifierData *psmd;
+ ModifierData *md;
+ int a;
memset(pid, 0, sizeof(PTCacheID));
@@ -408,26 +413,32 @@ void BKE_ptcache_id_from_softbody(PTCacheID *pid, Object *ob, SoftBody *sb)
if(sb->particles) {
psmd= psys_get_modifier(ob, sb->particles);
- // pid->stack_index= modifiers_indexInObject(ob, (ModifierData*)psmd); XXX TODO - get other index DG
+ pid->stack_index= modifiers_indexInObject(ob, (ModifierData*)psmd);
+ }
+ else {
+ for(a=0, md=ob->modifiers.first; md; md=md->next, a++) {
+ if(md->type == eModifierType_Softbody) {
+ pid->stack_index = a;
+ break;
+ }
+ }
}
- else
- pid->stack_index = pid->cache->index;
}
void BKE_ptcache_id_from_particles(PTCacheID *pid, Object *ob, ParticleSystem *psys)
{
+ ParticleSystemModifierData *psmd= psys_get_modifier(ob, psys);
+
memset(pid, 0, sizeof(PTCacheID));
pid->ob= ob;
pid->calldata= psys;
pid->type= PTCACHE_TYPE_PARTICLES;
- pid->stack_index= psys->pointcache->index;
+ pid->stack_index= modifiers_indexInObject(ob, (ModifierData *)psmd);
pid->cache= psys->pointcache;
pid->cache_ptr= &psys->pointcache;
pid->ptcaches= &psys->ptcaches;
- pid->flag |= PTCACHE_VEL_PER_SEC;
-
pid->write_elem= ptcache_write_particle;
pid->write_stream = NULL;
pid->read_stream = NULL;
@@ -458,254 +469,76 @@ void BKE_ptcache_id_from_particles(PTCacheID *pid, Object *ob, ParticleSystem *p
pid->info_types= (1<<BPHYS_DATA_TIMES);
}
+#if 0 // XXX smoke pointcache stuff breaks compiling now
/* Smoke functions */
static int ptcache_totpoint_smoke(void *smoke_v)
{
SmokeModifierData *smd= (SmokeModifierData *)smoke_v;
SmokeDomainSettings *sds = smd->domain;
- if(sds->fluid) {
+ if(sds->fluid)
+ {
return sds->res[0]*sds->res[1]*sds->res[2];
}
else
return 0;
}
-/* Smoke functions */
-static int ptcache_totpoint_smoke_turbulence(void *smoke_v)
-{
- SmokeModifierData *smd= (SmokeModifierData *)smoke_v;
- SmokeDomainSettings *sds = smd->domain;
-
- if(sds->wt) {
- return sds->res_wt[0]*sds->res_wt[1]*sds->res_wt[2];
- }
- else
- return 0;
-}
-
// forward decleration
static int ptcache_file_write(PTCacheFile *pf, void *f, size_t tot, int size);
-static int ptcache_compress_write(PTCacheFile *pf, unsigned char *in, unsigned int in_len, unsigned char *out, int mode)
-{
- int r = 0;
- unsigned char compressed;
- LZO_HEAP_ALLOC(wrkmem, LZO1X_MEM_COMPRESS);
- unsigned int out_len = LZO_OUT_LEN(in_len);
- unsigned char *props = MEM_callocN(16*sizeof(char), "tmp");
- size_t sizeOfIt = 5;
-
- if(mode == 1) {
- r = lzo1x_1_compress(in, (lzo_uint)in_len, out, (lzo_uint *)&out_len, wrkmem);
- if (!(r == LZO_E_OK) || (out_len >= in_len))
- compressed = 0;
- else
- compressed = 1;
- }
- else if(mode == 2) {
-
- r = LzmaCompress(out, (size_t *)&out_len, in, in_len,//assume sizeof(char)==1....
- props, &sizeOfIt, 5, 1 << 24, 3, 0, 2, 32, 2);
-
- if(!(r == SZ_OK) || (out_len >= in_len))
- compressed = 0;
- else
- compressed = 2;
- }
-
- ptcache_file_write(pf, &compressed, 1, sizeof(unsigned char));
- if(compressed) {
- ptcache_file_write(pf, &out_len, 1, sizeof(unsigned int));
- ptcache_file_write(pf, out, out_len, sizeof(unsigned char));
- }
- else
- ptcache_file_write(pf, in, in_len, sizeof(unsigned char));
-
- if(compressed == 2)
- {
- ptcache_file_write(pf, &sizeOfIt, 1, sizeof(unsigned int));
- ptcache_file_write(pf, props, sizeOfIt, sizeof(unsigned char));
- }
-
- MEM_freeN(props);
-
- return r;
-}
-
static int ptcache_write_smoke(PTCacheFile *pf, void *smoke_v)
-{
+{
SmokeModifierData *smd= (SmokeModifierData *)smoke_v;
SmokeDomainSettings *sds = smd->domain;
- if(sds->fluid) {
+ if(sds->fluid)
+ {
size_t res = sds->res[0]*sds->res[1]*sds->res[2];
- float dt, dx, *dens, *densold, *heat, *heatold, *vx, *vy, *vz, *vxold, *vyold, *vzold;
- unsigned char *obstacles;
- unsigned int in_len = sizeof(float)*(unsigned int)res;
- unsigned char *out = (unsigned char *)MEM_callocN(LZO_OUT_LEN(in_len)*4, "pointcache_lzo_buffer");
- int mode = res >= 1000000 ? 2 : 1;
-
- smoke_export(sds->fluid, &dt, &dx, &dens, &densold, &heat, &heatold, &vx, &vy, &vz, &vxold, &vyold, &vzold, &obstacles);
-
- ptcache_compress_write(pf, (unsigned char *)sds->shadow, in_len, out, mode);
- ptcache_compress_write(pf, (unsigned char *)dens, in_len, out, mode);
- ptcache_compress_write(pf, (unsigned char *)densold, in_len, out, mode);
- ptcache_compress_write(pf, (unsigned char *)heat, in_len, out, mode);
- ptcache_compress_write(pf, (unsigned char *)heatold, in_len, out, mode);
- ptcache_compress_write(pf, (unsigned char *)vx, in_len, out, mode);
- ptcache_compress_write(pf, (unsigned char *)vy, in_len, out, mode);
- ptcache_compress_write(pf, (unsigned char *)vz, in_len, out, mode);
- ptcache_compress_write(pf, (unsigned char *)vxold, in_len, out, mode);
- ptcache_compress_write(pf, (unsigned char *)vyold, in_len, out, mode);
- ptcache_compress_write(pf, (unsigned char *)vzold, in_len, out, mode);
- ptcache_compress_write(pf, (unsigned char *)obstacles, (unsigned int)res, out, mode);
- ptcache_file_write(pf, &dt, 1, sizeof(float));
- ptcache_file_write(pf, &dx, 1, sizeof(float));
-
- MEM_freeN(out);
+ float *dens, *densold, *heat, *heatold, *vx, *vy, *vz;
- return 1;
- }
- return 0;
-}
-
-static int ptcache_write_smoke_turbulence(PTCacheFile *pf, void *smoke_v)
-{
- SmokeModifierData *smd= (SmokeModifierData *)smoke_v;
- SmokeDomainSettings *sds = smd->domain;
-
- if(sds->wt) {
- unsigned int res_big_array[3];
- unsigned int res_big;
- unsigned int res = sds->res[0]*sds->res[1]*sds->res[2];
- float *dens, *densold, *tcu, *tcv, *tcw;
- unsigned int in_len = sizeof(float)*(unsigned int)res;
- unsigned int in_len_big;
- unsigned char *out;
- int mode;
-
- smoke_turbulence_get_res(sds->wt, res_big_array);
- res_big = res_big_array[0]*res_big_array[1]*res_big_array[2];
- mode = res_big >= 1000000 ? 2 : 1;
- in_len_big = sizeof(float) * (unsigned int)res_big;
-
- smoke_turbulence_export(sds->wt, &dens, &densold, &tcu, &tcv, &tcw);
-
- out = (unsigned char *)MEM_callocN(LZO_OUT_LEN(in_len_big), "pointcache_lzo_buffer");
- ptcache_compress_write(pf, (unsigned char *)dens, in_len_big, out, mode);
- ptcache_compress_write(pf, (unsigned char *)densold, in_len_big, out, mode);
- MEM_freeN(out);
-
- out = (unsigned char *)MEM_callocN(LZO_OUT_LEN(in_len), "pointcache_lzo_buffer");
- ptcache_compress_write(pf, (unsigned char *)tcu, in_len, out, mode);
- ptcache_compress_write(pf, (unsigned char *)tcv, in_len, out, mode);
- ptcache_compress_write(pf, (unsigned char *)tcw, in_len, out, mode);
- MEM_freeN(out);
+ smoke_export(sds->fluid, &dens, &densold, &heat, &heatold, &vx, &vy, &vz);
+
+ ptcache_file_write(pf, dens, res, sizeof(float));
+ ptcache_file_write(pf, densold, res, sizeof(float));
+ ptcache_file_write(pf, heat, res, sizeof(float));
+ ptcache_file_write(pf, heatold, res, sizeof(float));
+ ptcache_file_write(pf, vx, res, sizeof(float));
+ ptcache_file_write(pf, vy, res, sizeof(float));
+ ptcache_file_write(pf, vz, res, sizeof(float));
return 1;
}
+
return 0;
}
// forward decleration
static int ptcache_file_read(PTCacheFile *pf, void *f, size_t tot, int size);
-static int ptcache_compress_read(PTCacheFile *pf, unsigned char *result, unsigned int len)
-{
- int r = 0;
- unsigned char compressed = 0;
- unsigned int in_len;
- unsigned int out_len = len;
- unsigned char *in;
- unsigned char *props = MEM_callocN(16*sizeof(char), "tmp");
- size_t sizeOfIt = 5;
-
- ptcache_file_read(pf, &compressed, 1, sizeof(unsigned char));
- if(compressed) {
- ptcache_file_read(pf, &in_len, 1, sizeof(unsigned int));
- in = (unsigned char *)MEM_callocN(sizeof(unsigned char)*in_len, "pointcache_compressed_buffer");
- ptcache_file_read(pf, in, in_len, sizeof(unsigned char));
-
- if(compressed == 1)
- r = lzo1x_decompress(in, (lzo_uint)in_len, result, (lzo_uint *)&out_len, NULL);
- else if(compressed == 2)
- {
- size_t leni = in_len, leno = out_len;
- ptcache_file_read(pf, &sizeOfIt, 1, sizeof(unsigned int));
- ptcache_file_read(pf, props, sizeOfIt, sizeof(unsigned char));
- r = LzmaUncompress(result, &leno, in, &leni, props, sizeOfIt);
- }
-
- MEM_freeN(in);
- }
- else {
- ptcache_file_read(pf, result, len, sizeof(unsigned char));
- }
-
- MEM_freeN(props);
-
- return r;
-}
-
static void ptcache_read_smoke(PTCacheFile *pf, void *smoke_v)
{
SmokeModifierData *smd= (SmokeModifierData *)smoke_v;
SmokeDomainSettings *sds = smd->domain;
- if(sds->fluid) {
+ if(sds->fluid)
+ {
size_t res = sds->res[0]*sds->res[1]*sds->res[2];
- float dt, dx, *dens, *densold, *heat, *heatold, *vx, *vy, *vz, *vxold, *vyold, *vzold;
- unsigned char *obstacles;
- unsigned int out_len = (unsigned int)res * sizeof(float);
+ float *dens, *densold, *heat, *heatold, *vx, *vy, *vz;
+
+ smoke_export(sds->fluid, &dens, &densold, &heat, &heatold, &vx, &vy, &vz);
+
+ ptcache_file_read(pf, dens, res, sizeof(float));
+ ptcache_file_read(pf, densold, res, sizeof(float));
+ ptcache_file_read(pf, heat, res, sizeof(float));
+ ptcache_file_read(pf, heatold, res, sizeof(float));
+ ptcache_file_read(pf, vx, res, sizeof(float));
+ ptcache_file_read(pf, vy, res, sizeof(float));
+ ptcache_file_read(pf, vz, res, sizeof(float));
- smoke_export(sds->fluid, &dt, &dx, &dens, &densold, &heat, &heatold, &vx, &vy, &vz, &vxold, &vyold, &vzold, &obstacles);
-
- ptcache_compress_read(pf, (unsigned char *)sds->shadow, out_len);
- ptcache_compress_read(pf, (unsigned char*)dens, out_len);
- ptcache_compress_read(pf, (unsigned char*)densold, out_len);
- ptcache_compress_read(pf, (unsigned char*)heat, out_len);
- ptcache_compress_read(pf, (unsigned char*)heatold, out_len);
- ptcache_compress_read(pf, (unsigned char*)vx, out_len);
- ptcache_compress_read(pf, (unsigned char*)vy, out_len);
- ptcache_compress_read(pf, (unsigned char*)vz, out_len);
- ptcache_compress_read(pf, (unsigned char*)vxold, out_len);
- ptcache_compress_read(pf, (unsigned char*)vyold, out_len);
- ptcache_compress_read(pf, (unsigned char*)vzold, out_len);
- ptcache_compress_read(pf, (unsigned char*)obstacles, (unsigned int)res);
- ptcache_file_read(pf, &dt, 1, sizeof(float));
- ptcache_file_read(pf, &dx, 1, sizeof(float));
- }
-}
-
-static void ptcache_read_smoke_turbulence(PTCacheFile *pf, void *smoke_v)
-{
- SmokeModifierData *smd= (SmokeModifierData *)smoke_v;
- SmokeDomainSettings *sds = smd->domain;
-
- if(sds->fluid) {
- unsigned int res = sds->res[0]*sds->res[1]*sds->res[2];
- unsigned int res_big, res_big_array[3];
- float *dens, *densold, *tcu, *tcv, *tcw;
- unsigned int out_len = sizeof(float)*(unsigned int)res;
- unsigned int out_len_big;
-
- smoke_turbulence_get_res(sds->wt, res_big_array);
- res_big = res_big_array[0]*res_big_array[1]*res_big_array[2];
- out_len_big = sizeof(float) * (unsigned int)res_big;
-
- smoke_turbulence_export(sds->wt, &dens, &densold, &tcu, &tcv, &tcw);
-
- ptcache_compress_read(pf, (unsigned char*)dens, out_len_big);
- ptcache_compress_read(pf, (unsigned char*)densold, out_len_big);
-
- ptcache_compress_read(pf, (unsigned char*)tcu, out_len);
- ptcache_compress_read(pf, (unsigned char*)tcv, out_len);
- ptcache_compress_read(pf, (unsigned char*)tcw, out_len);
}
}
-
-void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct SmokeModifierData *smd)
+void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct SmokeModifierData *smd, int num)
{
SmokeDomainSettings *sds = smd->domain;
@@ -714,54 +547,24 @@ void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct SmokeMo
pid->ob= ob;
pid->calldata= smd;
- pid->type= PTCACHE_TYPE_SMOKE_DOMAIN;
- pid->stack_index= sds->point_cache[0]->index;
+ // if(num == 0)
+ pid->type= PTCACHE_TYPE_SMOKE_DOMAIN_LOW;
+ // else if(num == 1)
+ // pid->type= PTCACHE_TYPE_SMOKE_DOMAIN_HIGH;
- pid->cache= sds->point_cache[0];
- pid->cache_ptr= &(sds->point_cache[0]);
- pid->ptcaches= &(sds->ptcaches[0]);
+ pid->stack_index= modifiers_indexInObject(ob, (ModifierData *)smd);
+ pid->cache= sds->point_cache;
+ pid->cache_ptr= &sds->point_cache;
+ pid->ptcaches= &sds->ptcaches;
+
+
pid->totpoint= pid->totwrite= ptcache_totpoint_smoke;
pid->write_elem= NULL;
pid->read_elem= NULL;
-
pid->read_stream = ptcache_read_smoke;
pid->write_stream = ptcache_write_smoke;
-
- pid->interpolate_elem= NULL;
-
- pid->write_header= ptcache_write_basic_header;
- pid->read_header= ptcache_read_basic_header;
-
- pid->data_types= (1<<BPHYS_DATA_LOCATION); // bogus values to make pointcache happy
- pid->info_types= 0;
-}
-
-void BKE_ptcache_id_from_smoke_turbulence(PTCacheID *pid, struct Object *ob, struct SmokeModifierData *smd)
-{
- SmokeDomainSettings *sds = smd->domain;
-
- memset(pid, 0, sizeof(PTCacheID));
-
- pid->ob= ob;
- pid->calldata= smd;
-
- pid->type= PTCACHE_TYPE_SMOKE_HIGHRES;
- pid->stack_index= sds->point_cache[1]->index;
-
- pid->cache= sds->point_cache[1];
- pid->cache_ptr= &sds->point_cache[1];
- pid->ptcaches= &sds->ptcaches[1];
-
- pid->totpoint= pid->totwrite= ptcache_totpoint_smoke_turbulence;
-
- pid->write_elem= NULL;
- pid->read_elem= NULL;
-
- pid->read_stream = ptcache_read_smoke_turbulence;
- pid->write_stream = ptcache_write_smoke_turbulence;
-
pid->interpolate_elem= NULL;
pid->write_header= ptcache_write_basic_header;
@@ -770,6 +573,7 @@ void BKE_ptcache_id_from_smoke_turbulence(PTCacheID *pid, struct Object *ob, str
pid->data_types= (1<<BPHYS_DATA_LOCATION); // bogus values tot make pointcache happy
pid->info_types= 0;
}
+#endif // XXX smoke poitcache stuff breaks compiling
void BKE_ptcache_id_from_cloth(PTCacheID *pid, Object *ob, ClothModifierData *clmd)
{
@@ -778,7 +582,7 @@ void BKE_ptcache_id_from_cloth(PTCacheID *pid, Object *ob, ClothModifierData *cl
pid->ob= ob;
pid->calldata= clmd;
pid->type= PTCACHE_TYPE_CLOTH;
- pid->stack_index= clmd->point_cache->index;
+ pid->stack_index= modifiers_indexInObject(ob, (ModifierData *)clmd);
pid->cache= clmd->point_cache;
pid->cache_ptr= &clmd->point_cache;
pid->ptcaches= &clmd->ptcaches;
@@ -812,16 +616,14 @@ void BKE_ptcache_ids_from_object(ListBase *lb, Object *ob)
}
for(psys=ob->particlesystem.first; psys; psys=psys->next) {
- if(psys->part) {
+ pid= MEM_callocN(sizeof(PTCacheID), "PTCacheID");
+ BKE_ptcache_id_from_particles(pid, ob, psys);
+ BLI_addtail(lb, pid);
+
+ if(psys->soft) {
pid= MEM_callocN(sizeof(PTCacheID), "PTCacheID");
- BKE_ptcache_id_from_particles(pid, ob, psys);
+ BKE_ptcache_id_from_softbody(pid, ob, psys->soft);
BLI_addtail(lb, pid);
-
- if(psys->soft) {
- pid= MEM_callocN(sizeof(PTCacheID), "PTCacheID");
- BKE_ptcache_id_from_softbody(pid, ob, psys->soft);
- BLI_addtail(lb, pid);
- }
}
}
@@ -831,19 +633,18 @@ void BKE_ptcache_ids_from_object(ListBase *lb, Object *ob)
BKE_ptcache_id_from_cloth(pid, ob, (ClothModifierData*)md);
BLI_addtail(lb, pid);
}
+ /*
+ // enabled on next commit
if(md->type == eModifierType_Smoke) {
SmokeModifierData *smd = (SmokeModifierData *)md;
if(smd->type & MOD_SMOKE_TYPE_DOMAIN)
{
pid= MEM_callocN(sizeof(PTCacheID), "PTCacheID");
- BKE_ptcache_id_from_smoke(pid, ob, (SmokeModifierData*)md);
- BLI_addtail(lb, pid);
-
- pid= MEM_callocN(sizeof(PTCacheID), "PTCacheID");
- BKE_ptcache_id_from_smoke_turbulence(pid, ob, (SmokeModifierData*)md);
+ BKE_ptcache_id_from_smoke(pid, ob, (SmokeModifierData*)md, 0);
BLI_addtail(lb, pid);
}
}
+ */
}
}
@@ -927,10 +728,6 @@ static int BKE_ptcache_id_filename(PTCacheID *pid, char *filename, int cfra, sho
}
if (do_ext) {
-
- if(pid->cache->index < 0)
- pid->cache->index = pid->stack_index = object_insert_ptcache(pid->ob);
-
if(pid->cache->flag & PTCACHE_EXTERNAL) {
if(pid->cache->index >= 0)
snprintf(newname, MAX_PTCACHE_FILE, "_%06d_%02d"PTCACHE_EXT, cfra, pid->stack_index); /* always 6 chars */
@@ -1105,7 +902,7 @@ static void ptcache_file_init_pointers(PTCacheFile *pf)
pf->cur[BPHYS_DATA_BOIDS] = data_types & (1<<BPHYS_DATA_BOIDS) ? &pf->data.boids : NULL;
}
-void BKE_ptcache_mem_init_pointers(PTCacheMem *pm)
+static void ptcache_mem_init_pointers(PTCacheMem *pm)
{
int data_types = pm->data_types;
int i;
@@ -1114,7 +911,7 @@ void BKE_ptcache_mem_init_pointers(PTCacheMem *pm)
pm->cur[i] = data_types & (1<<i) ? pm->data[i] : NULL;
}
-void BKE_ptcache_mem_incr_pointers(PTCacheMem *pm)
+static void ptcache_mem_incr_pointers(PTCacheMem *pm)
{
int i;
@@ -1180,7 +977,7 @@ int BKE_ptcache_read_cache(PTCacheID *pid, float cfra, float frs_sec)
int cfra1 = 0, cfra2 = 0;
int totpoint = 0, totpoint2 = 0;
int *index = &i, *index2 = &i;
- int use_old = 0, old_frame = 0;
+ int use_old = 0, old_frame;
int ret = 0, error = 0;
@@ -1267,12 +1064,12 @@ int BKE_ptcache_read_cache(PTCacheID *pid, float cfra, float frs_sec)
return 0;
if(pm) {
- BKE_ptcache_mem_init_pointers(pm);
+ ptcache_mem_init_pointers(pm);
totpoint = pm->totpoint;
index = pm->data_types & (1<<BPHYS_DATA_INDEX) ? pm->cur[BPHYS_DATA_INDEX] : &i;
}
if(pm2) {
- BKE_ptcache_mem_init_pointers(pm2);
+ ptcache_mem_init_pointers(pm2);
totpoint2 = pm2->totpoint;
index2 = pm2->data_types & (1<<BPHYS_DATA_INDEX) ? pm2->cur[BPHYS_DATA_INDEX] : &i;
}
@@ -1343,18 +1140,18 @@ int BKE_ptcache_read_cache(PTCacheID *pid, float cfra, float frs_sec)
if(use_old) {
if(pid->read_elem && ptcache_file_read(pf, (void*)old_data1, 1, old_elemsize))
pid->read_elem(i, pid->calldata, NULL, frs_sec, cfra, old_data1);
- else if(pid->read_elem)
+ else
{ error = 1; break; }
}
else {
if(pid->read_elem && (pm || ptcache_file_read_data(pf)))
pid->read_elem(*index, pid->calldata, pm ? pm->cur : pf->cur, frs_sec, cfra1 ? (float)cfra1 : (float)cfrai, NULL);
- else if(pid->read_elem)
+ else
{ error = 1; break; }
}
if(pm) {
- BKE_ptcache_mem_incr_pointers(pm);
+ ptcache_mem_incr_pointers(pm);
index = pm->data_types & (1<<BPHYS_DATA_INDEX) ? pm->cur[BPHYS_DATA_INDEX] : &i;
}
}
@@ -1388,7 +1185,7 @@ int BKE_ptcache_read_cache(PTCacheID *pid, float cfra, float frs_sec)
else
{ error = 1; break; }
}
- else if(pid->read_elem)
+ else
{ error = 1; break; }
}
else {
@@ -1400,12 +1197,12 @@ int BKE_ptcache_read_cache(PTCacheID *pid, float cfra, float frs_sec)
else
{ error = 1; break; }
}
- else if(pid->read_elem)
+ else
{ error = 1; break; }
}
if(pm2) {
- BKE_ptcache_mem_incr_pointers(pm2);
+ ptcache_mem_incr_pointers(pm2);
index2 = pm2->data_types & (1<<BPHYS_DATA_INDEX) ? pm2->cur[BPHYS_DATA_INDEX] : &i;
}
}
@@ -1577,11 +1374,11 @@ int BKE_ptcache_write_cache(PTCacheID *pid, int cfra)
pm->data_types = cfra ? pid->data_types : pid->info_types;
ptcache_alloc_data(pm);
- BKE_ptcache_mem_init_pointers(pm);
+ ptcache_mem_init_pointers(pm);
for(i=0; i<totpoint; i++) {
if(pid->write_elem && pid->write_elem(i, pid->calldata, pm->cur))
- BKE_ptcache_mem_incr_pointers(pm);
+ ptcache_mem_incr_pointers(pm);
}
//ptcache_make_index_array(pm, pid->totpoint(pid->calldata));
@@ -1682,8 +1479,6 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, int cfra)
PTCacheMem *pm= pid->cache->mem_cache.first;
PTCacheMem *link= NULL;
- pm= pid->cache->mem_cache.first;
-
if(mode == PTCACHE_CLEAR_ALL) {
pid->cache->last_exact = 0;
for(; pm; pm=pm->next)
@@ -1844,10 +1639,8 @@ int BKE_ptcache_id_reset(Scene *scene, PTCacheID *pid, int mode)
sbFreeSimulation(pid->calldata);
else if(pid->type == PTCACHE_TYPE_PARTICLES)
psys_reset(pid->calldata, PSYS_RESET_DEPSGRAPH);
- else if(pid->type == PTCACHE_TYPE_SMOKE_DOMAIN)
+ else if(pid->type == PTCACHE_TYPE_SMOKE_DOMAIN_LOW)
smokeModifier_reset(pid->calldata);
- else if(pid->type == PTCACHE_TYPE_SMOKE_HIGHRES)
- smokeModifier_reset_turbulence(pid->calldata);
}
if(clear)
BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, 0);
@@ -1885,7 +1678,7 @@ int BKE_ptcache_object_reset(Scene *scene, Object *ob, int mode)
else if(psys->recalc & PSYS_RECALC_REDO || psys->recalc & PSYS_RECALC_CHILD)
skip = 1;
- if(skip == 0 && psys->part) {
+ if(skip == 0) {
BKE_ptcache_id_from_particles(&pid, ob, psys);
reset |= BKE_ptcache_id_reset(scene, &pid, mode);
}
@@ -1896,17 +1689,17 @@ int BKE_ptcache_object_reset(Scene *scene, Object *ob, int mode)
BKE_ptcache_id_from_cloth(&pid, ob, (ClothModifierData*)md);
reset |= BKE_ptcache_id_reset(scene, &pid, mode);
}
+ /*
+ // enabled on next commit
if(md->type == eModifierType_Smoke) {
SmokeModifierData *smd = (SmokeModifierData *)md;
if(smd->type & MOD_SMOKE_TYPE_DOMAIN)
{
- BKE_ptcache_id_from_smoke(&pid, ob, (SmokeModifierData*)md);
- reset |= BKE_ptcache_id_reset(scene, &pid, mode);
-
- BKE_ptcache_id_from_smoke_turbulence(&pid, ob, (SmokeModifierData*)md);
+ BKE_ptcache_id_from_smoke(&pid, ob, (SmokeModifierData*)md, 0);
reset |= BKE_ptcache_id_reset(scene, &pid, mode);
}
}
+ */
}
return reset;
@@ -1966,7 +1759,7 @@ void BKE_ptcache_set_continue_physics(Scene *scene, int enable)
if(CONTINUE_PHYSICS == 0) {
for(ob=G.main->object.first; ob; ob=ob->id.next)
if(BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_OUTDATED))
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
}
}
@@ -1986,16 +1779,15 @@ PointCache *BKE_ptcache_add(ListBase *ptcaches)
cache->startframe= 1;
cache->endframe= 250;
cache->step= 10;
- cache->index = -1;
BLI_addtail(ptcaches, cache);
return cache;
}
-void BKE_ptcache_free_mem(ListBase *mem_cache)
+void BKE_ptache_free_mem(PointCache *cache)
{
- PTCacheMem *pm = mem_cache->first;
+ PTCacheMem *pm = cache->mem_cache.first;
if(pm) {
for(; pm; pm=pm->next) {
@@ -2004,25 +1796,22 @@ void BKE_ptcache_free_mem(ListBase *mem_cache)
MEM_freeN(pm->index_array);
}
- BLI_freelistN(mem_cache);
+ BLI_freelistN(&cache->mem_cache);
}
}
void BKE_ptcache_free(PointCache *cache)
{
- BKE_ptcache_free_mem(&cache->mem_cache);
- if(cache->edit && cache->free_edit)
- cache->free_edit(cache->edit);
+ BKE_ptache_free_mem(cache);
MEM_freeN(cache);
}
void BKE_ptcache_free_list(ListBase *ptcaches)
{
PointCache *cache = ptcaches->first;
- while(cache) {
- BLI_remlink(ptcaches, cache);
- BKE_ptcache_free(cache);
- cache = ptcaches->first;
- }
+ for(; cache; cache=cache->next)
+ BKE_ptache_free_mem(cache);
+
+ BLI_freelistN(ptcaches);
}
static PointCache *ptcache_copy(PointCache *cache)
@@ -2112,7 +1901,7 @@ void BKE_ptcache_make_cache(PTCacheBaker* baker)
Base *base;
ListBase pidlist;
PTCacheID *pid = baker->pid;
- PointCache *cache = NULL;
+ PointCache *cache;
float frameleno = scene->r.framelen;
int cfrao = CFRA;
int startframe = MAXFRAME;
@@ -2286,7 +2075,7 @@ void BKE_ptcache_disk_to_mem(PTCacheID *pid)
pm->frame = cfra;
ptcache_alloc_data(pm);
- BKE_ptcache_mem_init_pointers(pm);
+ ptcache_mem_init_pointers(pm);
ptcache_file_init_pointers(pf);
for(i=0; i<pm->totpoint; i++) {
@@ -2302,7 +2091,7 @@ void BKE_ptcache_disk_to_mem(PTCacheID *pid)
return;
}
ptcache_copy_data(pf->cur, pm->cur);
- BKE_ptcache_mem_incr_pointers(pm);
+ ptcache_mem_incr_pointers(pm);
}
//ptcache_make_index_array(pm, pid->totpoint(pid->calldata));
@@ -2333,7 +2122,7 @@ void BKE_ptcache_mem_to_disk(PTCacheID *pid)
pf->totpoint = pm->totpoint;
pf->type = pid->type;
- BKE_ptcache_mem_init_pointers(pm);
+ ptcache_mem_init_pointers(pm);
ptcache_file_init_pointers(pf);
if(!ptcache_file_write_header_begin(pf) || !pid->write_header(pf)) {
@@ -2353,7 +2142,7 @@ void BKE_ptcache_mem_to_disk(PTCacheID *pid)
ptcache_file_close(pf);
return;
}
- BKE_ptcache_mem_incr_pointers(pm);
+ ptcache_mem_incr_pointers(pm);
}
ptcache_file_close(pf);
diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c
index de2118af202..139895bbdaf 100644
--- a/source/blender/blenkernel/intern/sca.c
+++ b/source/blender/blenkernel/intern/sca.c
@@ -52,6 +52,30 @@
#include "BKE_blender.h"
#include "BKE_sca.h"
+//#include "wm_event_types.h"
+
+void free_text_controllers(Text *txt)
+{
+ Object *ob;
+ bController *cont;
+
+ ob= G.main->object.first;
+ while(ob) {
+ cont= ob->controllers.first;
+ while(cont) {
+ if(cont->type==CONT_PYTHON) {
+ bPythonCont *pc;
+
+ pc= cont->data;
+ if(pc->text==txt) pc->text= NULL;
+ }
+ cont= cont->next;
+ }
+ ob= ob->id.next;
+ }
+}
+
+
/* ******************* SENSORS ************************ */
void free_sensor(bSensor *sens)
@@ -394,10 +418,12 @@ void init_actuator(bActuator *act)
act->data= 0;
switch(act->type) {
+#ifdef __NLA
case ACT_ACTION:
case ACT_SHAPEACTION:
act->data= MEM_callocN(sizeof(bActionActuator), "actionact");
break;
+#endif
case ACT_SOUND:
sa = act->data= MEM_callocN(sizeof(bSoundActuator), "soundact");
sa->volume = 1.0f;
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 6f9ed3e0978..2a8fd765386 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -155,7 +155,6 @@ Scene *copy_scene(Main *bmain, Scene *sce, int type)
scen->theDag= NULL;
scen->obedit= NULL;
scen->toolsettings= MEM_dupallocN(sce->toolsettings);
- scen->stats= NULL;
ts= scen->toolsettings;
if(ts) {
@@ -245,11 +244,6 @@ void free_scene(Scene *sce)
base= base->next;
}
/* do not free objects! */
-
- if(sce->gpd) {
- sce->gpd->id.us--;
- sce->gpd= NULL;
- }
BLI_freelistN(&sce->base);
seq_free_editing(sce);
@@ -305,9 +299,6 @@ void free_scene(Scene *sce)
ntreeFreeTree(sce->nodetree);
MEM_freeN(sce->nodetree);
}
-
- if(sce->stats)
- MEM_freeN(sce->stats);
}
Scene *add_scene(char *name)
@@ -404,13 +395,11 @@ Scene *add_scene(char *name)
sce->unit.scale_length = 1.0f;
pset= &sce->toolsettings->particle;
- pset->flag= PE_KEEP_LENGTHS|PE_LOCK_FIRST|PE_DEFLECT_EMITTER|PE_AUTO_VELOCITY;
+ pset->flag= PE_KEEP_LENGTHS|PE_LOCK_FIRST|PE_DEFLECT_EMITTER;
pset->emitterdist= 0.25f;
pset->totrekey= 5;
pset->totaddkey= 5;
pset->brushtype= PE_BRUSH_NONE;
- pset->draw_step= 2;
- pset->fade_frames= 2;
for(a=0; a<PE_TOT_BRUSH; a++) {
pset->brush[a].strength= 50;
pset->brush[a].size= 50;
@@ -860,3 +849,14 @@ float get_render_aosss_error(RenderData *r, float error)
return error;
}
+void free_dome_warp_text(struct Text *txt)
+{
+ Scene *scene;
+
+ scene = G.main->scene.first;
+ while(scene) {
+ if (scene->r.dometext == txt)
+ scene->r.dometext = NULL;
+ scene = scene->id.next;
+ }
+}
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 078258092f7..2ee95ed928e 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -2792,10 +2792,6 @@ void sequence_effect_speed_rebuild_map(Sequence * seq, int force)
if (!(force || seq->len != v->length || !v->frameMap)) {
return;
}
- if (!seq->seq1) { /* make coverity happy and check for (CID 598)
- input strip ... */
- return;
- }
if (!v->frameMap || v->length != seq->len) {
if (v->frameMap) MEM_freeN(v->frameMap);
@@ -2811,7 +2807,7 @@ void sequence_effect_speed_rebuild_map(Sequence * seq, int force)
/* if there is no IPO, try to make retiming easy by stretching the
strip */
// XXX old animation system - seq
- if (/*!seq->ipo &&*/ seq->seq1->enddisp != seq->seq1->start
+ if (/*!seq->ipo &&*/ seq->seq1 && seq->seq1->enddisp != seq->seq1->start
&& seq->seq1->len != 0) {
fallback_fac = (float) seq->seq1->len /
(float) (seq->seq1->enddisp - seq->seq1->start);
diff --git a/source/blender/blenkernel/intern/sequence.c b/source/blender/blenkernel/intern/sequence.c
index c6b714c3125..159a60ad3af 100644
--- a/source/blender/blenkernel/intern/sequence.c
+++ b/source/blender/blenkernel/intern/sequence.c
@@ -570,7 +570,7 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq)
}
seq->strip->len = seq->len;
} else if (seq->type == SEQ_SOUND) {
- seq->len = AUD_getInfo(seq->sound->handle).length * FPS;
+ seq->len = AUD_getInfo(seq->sound->snd_sound).length * FPS;
seq->len -= seq->anim_startofs;
seq->len -= seq->anim_endofs;
if (seq->len < 0) {
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c
index efb7db04029..27357d92aae 100644
--- a/source/blender/blenkernel/intern/shrinkwrap.c
+++ b/source/blender/blenkernel/intern/shrinkwrap.c
@@ -574,7 +574,7 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Scene *scene, Object
}
}
- //Just to make sure we are not leaving any memory behind
+ //Just to make sure we are not letting any memory behind
assert(ssmd.emCache == NULL);
assert(ssmd.mCache == NULL);
}
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index fe5541211ce..22ea41276ff 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -54,13 +54,10 @@
#include "BKE_DerivedMesh.h"
#include "BKE_modifier.h"
#include "BKE_particle.h"
-#include "BKE_pointcache.h"
-#include "BKE_smoke.h"
#include "BKE_utildefines.h"
#include "DNA_customdata_types.h"
#include "DNA_group_types.h"
-#include "DNA_lamp_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
@@ -123,7 +120,8 @@ struct DerivedMesh;
struct SmokeModifierData;
// forward declerations
-static void get_cell(float *p0, int res[3], float dx, float *pos, int *cell, int correct);
+static void get_cell(struct SmokeModifierData *smd, float *pos, int *cell, int correct);
+static void get_bigcell(struct SmokeModifierData *smd, float *pos, int *cell, int correct);
void calcTriangleDivs(Object *ob, MVert *verts, int numverts, MFace *tris, int numfaces, int numtris, int **tridivs, float cell_len);
#define TRI_UVOFFSET (1./4.)
@@ -165,11 +163,6 @@ int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, Derive
// calc other res with max_res provided
VECSUB(size, max, min);
-
- // prevent crash when initializing a plane as domain
- if((size[0] < FLT_EPSILON) || (size[1] < FLT_EPSILON) || (size[2] < FLT_EPSILON))
- return 0;
-
if(size[0] > size[1])
{
if(size[0] > size[1])
@@ -212,31 +205,18 @@ int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, Derive
// TODO: put in failsafe if res<=0 - dg
// printf("res[0]: %d, res[1]: %d, res[2]: %d\n", smd->domain->res[0], smd->domain->res[1], smd->domain->res[2]);
+
// dt max is 0.1
smd->domain->fluid = smoke_init(smd->domain->res, smd->domain->p0, 0.1);
+ smd->domain->wt = smoke_turbulence_init(smd->domain->res, (smd->domain->flags & MOD_SMOKE_HIGHRES) ? (smd->domain->amplify + 1) : 0, smd->domain->noise);
smd->time = scene->r.cfra;
-
- if(smd->domain->flags & MOD_SMOKE_HIGHRES)
- {
- smd->domain->wt = smoke_turbulence_init(smd->domain->res, smd->domain->amplify + 1, smd->domain->noise);
- smd->domain->res_wt[0] = smd->domain->res[0] * (smd->domain->amplify + 1);
- smd->domain->res_wt[1] = smd->domain->res[1] * (smd->domain->amplify + 1);
- smd->domain->res_wt[2] = smd->domain->res[2] * (smd->domain->amplify + 1);
- smd->domain->dx_wt = smd->domain->dx / (smd->domain->amplify + 1);
- printf("smd->domain->amplify: %d\n", smd->domain->amplify);
- printf("(smd->domain->flags & MOD_SMOKE_HIGHRES)\n");
- }
-
- if(!smd->domain->shadow)
- smd->domain->shadow = MEM_callocN(sizeof(float) * smd->domain->res[0] * smd->domain->res[1] * smd->domain->res[2], "SmokeDomainShadow");
-
+ smd->domain->firstframe = smd->time;
+
smoke_initBlenderRNA(smd->domain->fluid, &(smd->domain->alpha), &(smd->domain->beta));
- if(smd->domain->wt)
- {
+ if(smd->domain->wt)
smoke_initWaveletBlenderRNA(smd->domain->wt, &(smd->domain->strength));
- printf("smoke_initWaveletBlenderRNA\n");
- }
+
return 1;
}
else if((smd->type & MOD_SMOKE_TYPE_FLOW) && smd->flow)
@@ -276,11 +256,12 @@ int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, Derive
SmokeCollSettings *scs = smd->coll;
MVert *mvert = dm->getVertArray(dm);
MFace *mface = dm->getFaceArray(dm);
- int i = 0, divs = 0;
+ size_t i = 0, divs = 0;
int *tridivs = NULL;
float cell_len = 1.0 / 50.0; // for res = 50
- int newdivs = 0;
- int quads = 0, facecounter = 0;
+ size_t newdivs = 0;
+ //size_t max_points = 0;
+ size_t quads = 0, facecounter = 0;
// copy obmat
Mat4CpyMat4(scs->mat, ob->obmat);
@@ -318,7 +299,7 @@ int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, Derive
int again = 0;
do
{
- int j, k;
+ size_t j, k;
int divs1 = tridivs[3 * facecounter + 0];
int divs2 = tridivs[3 * facecounter + 1];
//int divs3 = tridivs[3 * facecounter + 2];
@@ -415,10 +396,10 @@ int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, Derive
{
smd->coll->bvhtree = NULL; // bvhtree_build_from_smoke ( ob->obmat, dm->getFaceArray(dm), dm->getNumFaces(dm), dm->getVertArray(dm), dm->getNumVerts(dm), 0.0 );
}
- return 1;
+
}
- return 1;
+ return 0;
}
/*! init triangle divisions */
@@ -525,9 +506,22 @@ void smokeModifier_freeDomain(SmokeModifierData *smd)
{
if(smd->domain)
{
- if(smd->domain->shadow)
- MEM_freeN(smd->domain->shadow);
- smd->domain->shadow = NULL;
+ // free visualisation buffers
+ if(smd->domain->bind)
+ {
+ glDeleteTextures(smd->domain->max_textures, (GLuint *)smd->domain->bind);
+ MEM_freeN(smd->domain->bind);
+ }
+ smd->domain->max_textures = 0; // unnecessary but let's be sure
+
+ if(smd->domain->tray)
+ MEM_freeN(smd->domain->tray);
+ if(smd->domain->tvox)
+ MEM_freeN(smd->domain->tvox);
+ if(smd->domain->traybig)
+ MEM_freeN(smd->domain->traybig);
+ if(smd->domain->tvoxbig)
+ MEM_freeN(smd->domain->tvoxbig);
if(smd->domain->fluid)
smoke_free(smd->domain->fluid);
@@ -535,11 +529,6 @@ void smokeModifier_freeDomain(SmokeModifierData *smd)
if(smd->domain->wt)
smoke_turbulence_free(smd->domain->wt);
- BKE_ptcache_free_list(&(smd->domain->ptcaches[0]));
- smd->domain->point_cache[0] = NULL;
- BKE_ptcache_free_list(&(smd->domain->ptcaches[1]));
- smd->domain->point_cache[1] = NULL;
-
MEM_freeN(smd->domain);
smd->domain = NULL;
}
@@ -587,46 +576,50 @@ void smokeModifier_freeCollision(SmokeModifierData *smd)
}
}
-void smokeModifier_reset_turbulence(struct SmokeModifierData *smd)
-{
- if(smd && smd->domain && smd->domain->wt)
- {
- smoke_turbulence_free(smd->domain->wt);
- smd->domain->wt = NULL;
- }
-
- smd->domain->point_cache[1]->flag &= ~PTCACHE_SIMULATION_VALID;
- smd->domain->point_cache[1]->flag |= PTCACHE_OUTDATED;
- smd->domain->point_cache[1]->simframe= 0;
- smd->domain->point_cache[1]->last_exact= 0;
-}
-
void smokeModifier_reset(struct SmokeModifierData *smd)
{
if(smd)
{
if(smd->domain)
{
- if(smd->domain->shadow)
- MEM_freeN(smd->domain->shadow);
- smd->domain->shadow = NULL;
+ // free visualisation buffers
+ if(smd->domain->bind)
+ {
+ glDeleteTextures(smd->domain->max_textures, (GLuint *)smd->domain->bind);
+ MEM_freeN(smd->domain->bind);
+ smd->domain->bind = NULL;
+ }
+ smd->domain->max_textures = 0;
+ if(smd->domain->viewsettings < MOD_SMOKE_VIEW_USEBIG)
+ smd->domain->viewsettings = 0;
+ else
+ smd->domain->viewsettings = MOD_SMOKE_VIEW_USEBIG;
+
+ if(smd->domain->tray)
+ MEM_freeN(smd->domain->tray);
+ if(smd->domain->tvox)
+ MEM_freeN(smd->domain->tvox);
+ if(smd->domain->traybig)
+ MEM_freeN(smd->domain->traybig);
+ if(smd->domain->tvoxbig)
+ MEM_freeN(smd->domain->tvoxbig);
+
+ smd->domain->tvox = NULL;
+ smd->domain->tray = NULL;
+ smd->domain->tvoxbig = NULL;
+ smd->domain->traybig = NULL;
if(smd->domain->fluid)
{
smoke_free(smd->domain->fluid);
smd->domain->fluid = NULL;
}
-
- smd->domain->point_cache[0]->flag &= ~PTCACHE_SIMULATION_VALID;
- smd->domain->point_cache[0]->flag |= PTCACHE_OUTDATED;
- smd->domain->point_cache[0]->simframe= 0;
- smd->domain->point_cache[0]->last_exact= 0;
-
- smokeModifier_reset_turbulence(smd);
-
- smd->time = -1;
-
- // printf("reset domain end\n");
+
+ if(smd->domain->wt)
+ {
+ smoke_turbulence_free(smd->domain->wt);
+ smd->domain->wt = NULL;
+ }
}
else if(smd->flow)
{
@@ -684,31 +677,31 @@ void smokeModifier_createType(struct SmokeModifierData *smd)
smd->domain->smd = smd;
- smd->domain->point_cache[0] = BKE_ptcache_add(&(smd->domain->ptcaches[0]));
- smd->domain->point_cache[0]->flag |= PTCACHE_DISK_CACHE;
- smd->domain->point_cache[0]->step = 1;
-
- smd->domain->point_cache[1] = BKE_ptcache_add(&(smd->domain->ptcaches[1]));
- smd->domain->point_cache[1]->flag |= PTCACHE_DISK_CACHE;
- smd->domain->point_cache[1]->step = 1;
-
/* set some standard values */
smd->domain->fluid = NULL;
- smd->domain->wt = NULL;
+ smd->domain->wt = NULL;
smd->domain->eff_group = NULL;
smd->domain->fluid_group = NULL;
smd->domain->coll_group = NULL;
smd->domain->maxres = 32;
- smd->domain->amplify = 1;
- smd->domain->omega = 1.0;
+ smd->domain->amplify = 1;
+ smd->domain->omega = 1.0;
smd->domain->alpha = -0.001;
smd->domain->beta = 0.1;
smd->domain->flags = MOD_SMOKE_DISSOLVE_LOG;
smd->domain->strength = 2.0;
smd->domain->noise = MOD_SMOKE_NOISEWAVE;
+ smd->domain->visibility = 1;
smd->domain->diss_speed = 5;
+
// init 3dview buffer
+ smd->domain->tvox = NULL;
+ smd->domain->tray = NULL;
+ smd->domain->tvoxbig = NULL;
+ smd->domain->traybig = NULL;
smd->domain->viewsettings = 0;
+ smd->domain->bind = NULL;
+ smd->domain->max_textures = 0;
}
else if(smd->type & MOD_SMOKE_TYPE_FLOW)
{
@@ -742,321 +735,16 @@ void smokeModifier_createType(struct SmokeModifierData *smd)
}
}
-// forward decleration
-void smoke_calc_transparency(float *result, float *input, float *p0, float *p1, int res[3], float dx, float *light, bresenham_callback cb, float correct);
-static float calc_voxel_transp(float *result, float *input, int res[3], int *pixel, float *tRay, float correct);
-static int get_lamp(Scene *scene, float *light)
-{
- Base *base_tmp = NULL;
- for(base_tmp = scene->base.first; base_tmp; base_tmp= base_tmp->next)
- {
- if(base_tmp->object->type == OB_LAMP)
- {
- Lamp *la = (Lamp *)base_tmp->object->data;
-
- if(la->type == LA_LOCAL)
- {
- VECCOPY(light, base_tmp->object->obmat[3]);
- return 1;
- }
- }
- }
- return 0;
-}
-
-static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd)
-{
- SmokeDomainSettings *sds = smd->domain;
- GroupObject *go = NULL;
- Base *base = NULL;
-
- // do flows and fluids
- if(1)
- {
- Object *otherobj = NULL;
- ModifierData *md = NULL;
- if(sds->fluid_group) // we use groups since we have 2 domains
- go = sds->fluid_group->gobject.first;
- else
- base = scene->base.first;
- while(base || go)
- {
- otherobj = NULL;
- if(sds->fluid_group)
- {
- if(go->ob)
- otherobj = go->ob;
- }
- else
- otherobj = base->object;
- if(!otherobj)
- {
- if(sds->fluid_group)
- go = go->next;
- else
- base= base->next;
-
- continue;
- }
-
- md = modifiers_findByType(otherobj, eModifierType_Smoke);
-
- // check for active smoke modifier
- if(md && md->mode & (eModifierMode_Realtime | eModifierMode_Render))
- {
- SmokeModifierData *smd2 = (SmokeModifierData *)md;
-
- // check for initialized smoke object
- if((smd2->type & MOD_SMOKE_TYPE_FLOW) && smd2->flow)
- {
- // we got nice flow object
- SmokeFlowSettings *sfs = smd2->flow;
-
- if(sfs->psys && sfs->psys->part && sfs->psys->part->type==PART_EMITTER) // is particle system selected
- {
- ParticleSystem *psys = sfs->psys;
- ParticleSettings *part=psys->part;
- ParticleData *pa = NULL;
- int p = 0;
- float *density = smoke_get_density(sds->fluid);
- float *bigdensity = smoke_turbulence_get_density(sds->wt);
- float *heat = smoke_get_heat(sds->fluid);
- float *velocity_x = smoke_get_velocity_x(sds->fluid);
- float *velocity_y = smoke_get_velocity_y(sds->fluid);
- float *velocity_z = smoke_get_velocity_z(sds->fluid);
- unsigned char *obstacle = smoke_get_obstacle(sds->fluid);
- int bigres[3];
-
- // mostly copied from particle code
- for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++)
- {
- int cell[3];
- size_t i = 0;
- size_t index = 0;
- int badcell = 0;
- if(pa->alive == PARS_KILLED) continue;
- else if(pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0) continue;
- else if(pa->alive == PARS_DEAD && (part->flag & PART_DIED)==0) continue;
- else if(pa->flag & (PARS_UNEXIST+PARS_NO_DISP)) continue;
- // VECCOPY(pos, pa->state.co);
- // Mat4MulVecfl (ob->imat, pos);
- // 1. get corresponding cell
- get_cell(smd->domain->p0, smd->domain->res, smd->domain->dx, pa->state.co, cell, 0);
- // check if cell is valid (in the domain boundary)
- for(i = 0; i < 3; i++)
- {
- if((cell[i] > sds->res[i] - 1) || (cell[i] < 0))
- {
- badcell = 1;
- break;
- }
- }
- if(badcell)
- continue;
- // 2. set cell values (heat, density and velocity)
- index = smoke_get_index(cell[0], sds->res[0], cell[1], sds->res[1], cell[2]);
- if(!(sfs->type & MOD_SMOKE_FLOW_TYPE_OUTFLOW) && !(obstacle[index] & 2)) // this is inflow
- {
- // heat[index] += sfs->temp * 0.1;
- // density[index] += sfs->density * 0.1;
- heat[index] = sfs->temp;
- density[index] = sfs->density;
-
- /*
- velocity_x[index] = pa->state.vel[0];
- velocity_y[index] = pa->state.vel[1];
- velocity_z[index] = pa->state.vel[2];
- */
-
- // obstacle[index] |= 2;
- // we need different handling for the high-res feature
- if(bigdensity)
- {
- // init all surrounding cells according to amplification, too
- int i, j, k;
-
- smoke_turbulence_get_res(smd->domain->wt, bigres);
-
- for(i = 0; i < smd->domain->amplify + 1; i++)
- for(j = 0; j < smd->domain->amplify + 1; j++)
- for(k = 0; k < smd->domain->amplify + 1; k++)
- {
- index = smoke_get_index((smd->domain->amplify + 1)* cell[0] + i, bigres[0], (smd->domain->amplify + 1)* cell[1] + j, bigres[1], (smd->domain->amplify + 1)* cell[2] + k);
- bigdensity[index] = sfs->density;
- }
- }
- }
- else if(sfs->type & MOD_SMOKE_FLOW_TYPE_OUTFLOW) // outflow
- {
- heat[index] = 0.f;
- density[index] = 0.f;
- velocity_x[index] = 0.f;
- velocity_y[index] = 0.f;
- velocity_z[index] = 0.f;
- // we need different handling for the high-res feature
- if(bigdensity)
- {
- // init all surrounding cells according to amplification, too
- int i, j, k;
- smoke_turbulence_get_res(smd->domain->wt, bigres);
-
- for(i = 0; i < smd->domain->amplify + 1; i++)
- for(j = 0; j < smd->domain->amplify + 1; j++)
- for(k = 0; k < smd->domain->amplify + 1; k++)
- {
- index = smoke_get_index((smd->domain->amplify + 1)* cell[0] + i, bigres[0], (smd->domain->amplify + 1)* cell[1] + j, bigres[1], (smd->domain->amplify + 1)* cell[2] + k);
- bigdensity[index] = 0.f;
- }
- }
- } // particles loop
- }
- }
- else
- {
- /*
- for()
- {
- // no psys
- BVHTreeNearest nearest;
- nearest.index = -1;
- nearest.dist = FLT_MAX;
-
- BLI_bvhtree_find_nearest(sfs->bvh->tree, pco, &nearest, sfs->bvh->nearest_callback, sfs->bvh);
- }*/
- }
- }
- }
- if(sds->fluid_group)
- go = go->next;
- else
- base= base->next;
- }
- }
+// forward declaration
+void smoke_calc_transparency(struct SmokeModifierData *smd, float *light, int big);
- // do effectors
- /*
- if(sds->eff_group)
- {
- for(go = sds->eff_group->gobject.first; go; go = go->next)
- {
- if(go->ob)
- {
- if(ob->pd)
- {
-
- }
- }
- }
- }
- */
-
- // do collisions
- if(1)
- {
- Object *otherobj = NULL;
- ModifierData *md = NULL;
-
- if(sds->coll_group) // we use groups since we have 2 domains
- go = sds->coll_group->gobject.first;
- else
- base = scene->base.first;
-
- while(base || go)
- {
- otherobj = NULL;
- if(sds->coll_group)
- {
- if(go->ob)
- otherobj = go->ob;
- }
- else
- otherobj = base->object;
- if(!otherobj)
- {
- if(sds->coll_group)
- go = go->next;
- else
- base= base->next;
- continue;
- }
- md = modifiers_findByType(otherobj, eModifierType_Smoke);
-
- // check for active smoke modifier
- if(md && md->mode & (eModifierMode_Realtime | eModifierMode_Render))
- {
- SmokeModifierData *smd2 = (SmokeModifierData *)md;
-
- if((smd2->type & MOD_SMOKE_TYPE_COLL) && smd2->coll)
- {
- // we got nice collision object
- SmokeCollSettings *scs = smd2->coll;
- size_t i, j;
- unsigned char *obstacles = smoke_get_obstacle(smd->domain->fluid);
-
- for(i = 0; i < scs->numpoints; i++)
- {
- int badcell = 0;
- size_t index = 0;
- int cell[3];
-
- // 1. get corresponding cell
- get_cell(smd->domain->p0, smd->domain->res, smd->domain->dx, &scs->points[3 * i], cell, 0);
-
- // check if cell is valid (in the domain boundary)
- for(j = 0; j < 3; j++)
- if((cell[j] > sds->res[j] - 1) || (cell[j] < 0))
- {
- badcell = 1;
- break;
- }
-
- if(badcell)
- continue;
- // 2. set cell values (heat, density and velocity)
- index = smoke_get_index(cell[0], sds->res[0], cell[1], sds->res[1], cell[2]);
-
- // printf("cell[0]: %d, cell[1]: %d, cell[2]: %d\n", cell[0], cell[1], cell[2]);
- // printf("res[0]: %d, res[1]: %d, res[2]: %d, index: %d\n\n", sds->res[0], sds->res[1], sds->res[2], index);
- obstacles[index] = 1;
- // for moving gobstacles
- /*
- const LbmFloat maxVelVal = 0.1666;
- const LbmFloat maxusqr = maxVelVal*maxVelVal*3. *1.5;
-
- LbmVec objvel = vec2L((mMOIVertices[n]-mMOIVerticesOld[n]) /dvec);
- {
- const LbmFloat usqr = (objvel[0]*objvel[0]+objvel[1]*objvel[1]+objvel[2]*objvel[2])*1.5;
- USQRMAXCHECK(usqr, objvel[0],objvel[1],objvel[2], mMaxVlen, mMxvx,mMxvy,mMxvz);
- if(usqr>maxusqr) {
- // cutoff at maxVelVal
- for(int jj=0; jj<3; jj++) {
- if(objvel[jj]>0.) objvel[jj] = maxVelVal;
- if(objvel[jj]<0.) objvel[jj] = -maxVelVal;
- }
- }
- }
- const LbmFloat dp=dot(objvel, vec2L((*pNormals)[n]) );
- const LbmVec oldov=objvel; // debug
- objvel = vec2L((*pNormals)[n]) *dp;
- */
- }
- }
- }
-
- if(sds->coll_group)
- go = go->next;
- else
- base= base->next;
- }
- }
-}
void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedMesh *dm, int useRenderParams, int isFinalCalc)
{
+ if(scene->r.cfra >= smd->time)
+ smokeModifier_init(smd, ob, scene, dm);
+
if((smd->type & MOD_SMOKE_TYPE_FLOW))
{
- if(scene->r.cfra >= smd->time)
- smokeModifier_init(smd, ob, scene, dm);
-
if(scene->r.cfra > smd->time)
{
// XXX TODO
@@ -1076,9 +764,6 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM
}
else if(smd->type & MOD_SMOKE_TYPE_COLL)
{
- if(scene->r.cfra >= smd->time)
- smokeModifier_init(smd, ob, scene, dm);
-
if(scene->r.cfra > smd->time)
{
// XXX TODO
@@ -1101,231 +786,459 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM
}
else if(smd->type & MOD_SMOKE_TYPE_DOMAIN)
{
- PointCache *cache = NULL;
- PTCacheID pid;
- PointCache *cache_wt = NULL;
- PTCacheID pid_wt;
- float timescale;
- int cache_result = 0, cache_result_wt = 0;
- int startframe, endframe, framenr, badloading = 0;
SmokeDomainSettings *sds = smd->domain;
- float light[3];
-
- framenr = scene->r.cfra;
-
- cache = sds->point_cache[0];
-
- BKE_ptcache_id_from_smoke(&pid, ob, smd);
- BKE_ptcache_id_time(&pid, scene, framenr, &startframe, &endframe, &timescale);
-
- cache_wt = sds->point_cache[1];
- BKE_ptcache_id_from_smoke_turbulence(&pid_wt, ob, smd);
-
- /* handle continuous simulation with the play button */
- if(BKE_ptcache_get_continue_physics())
- {
- // TODO
- return;
- }
-
- if(framenr < startframe)
+
+ if(scene->r.cfra > smd->time)
{
- cache->flag &= ~PTCACHE_SIMULATION_VALID;
- cache->simframe= 0;
- cache->last_exact= 0;
-
- cache_wt->flag &= ~PTCACHE_SIMULATION_VALID;
- cache_wt->simframe= 0;
- cache_wt->last_exact= 0;
+ GroupObject *go = NULL;
+ Base *base = NULL;
+
+ tstart();
+
+ if(sds->flags & MOD_SMOKE_DISSOLVE)
+ {
+ smoke_dissolve(sds->fluid, sds->diss_speed, sds->flags & MOD_SMOKE_DISSOLVE_LOG);
+
+ if(sds->wt)
+ smoke_dissolve_wavelet(sds->wt, sds->diss_speed, sds->flags & MOD_SMOKE_DISSOLVE_LOG);
+ }
- // we got back in time, reset smoke in this case (TODO: use cache later)
- // smd->time = scene->r.cfra;
- // smokeModifier_reset(smd);
+ /* reset view for new frame */
+ if(sds->viewsettings < MOD_SMOKE_VIEW_USEBIG)
+ sds->viewsettings = 0;
+ else
+ sds->viewsettings = MOD_SMOKE_VIEW_USEBIG;
- return;
- }
- else if(framenr > endframe)
- {
- framenr = endframe;
+ // do flows and fluids
+ if(1)
+ {
+ Object *otherobj = NULL;
+ ModifierData *md = NULL;
- // we load last valid frame here
- // and don't update the smd->time variable later
- badloading = 1;
- }
+ if(sds->fluid_group) // we use groups since we have 2 domains
+ go = sds->fluid_group->gobject.first;
+ else
+ base = scene->base.first;
- if(!(cache->flag & PTCACHE_SIMULATION_VALID))
- {
- BKE_ptcache_id_reset(scene, &pid, PTCACHE_RESET_OUTDATED);
- }
- if(sds->wt && !(cache_wt->flag & PTCACHE_SIMULATION_VALID))
- {
- BKE_ptcache_id_reset(scene, &pid_wt, PTCACHE_RESET_OUTDATED);
- }
+ while(base || go)
+ {
+ otherobj = NULL;
- if(smd->time == -1 && framenr!= startframe)
- return;
+ if(sds->fluid_group)
+ {
+ if(go->ob)
+ otherobj = go->ob;
+ }
+ else
+ otherobj = base->object;
- if(!smokeModifier_init(smd, ob, scene, dm))
- return;
+ if(!otherobj)
+ {
+ if(sds->fluid_group)
+ go = go->next;
+ else
+ base= base->next;
- if(!smd->domain->fluid)
- return;
+ continue;
+ }
- /* try to read from cache */
- cache_result = BKE_ptcache_read_cache(&pid, (float)framenr, scene->r.frs_sec);
- // printf("cache_result: %d\n", cache_result);
+ md = modifiers_findByType(otherobj, eModifierType_Smoke);
+
+ // check for active smoke modifier
+ if(md && md->mode & (eModifierMode_Realtime | eModifierMode_Render))
+ {
+ SmokeModifierData *smd2 = (SmokeModifierData *)md;
+
+ // check for initialized smoke object
+ if((smd2->type & MOD_SMOKE_TYPE_FLOW) && smd2->flow)
+ {
+ // we got nice flow object
+ SmokeFlowSettings *sfs = smd2->flow;
+
+ if(sfs->psys && sfs->psys->part && sfs->psys->part->type==PART_EMITTER) // is particle system selected
+ {
+ ParticleSystem *psys = sfs->psys;
+ ParticleSettings *part=psys->part;
+ ParticleData *pa = NULL;
+ int p = 0;
+ float *density = smoke_get_density(sds->fluid);
+ float *bigdensity = smoke_turbulence_get_density(sds->wt);
+ float *heat = smoke_get_heat(sds->fluid);
+ float *velocity_x = smoke_get_velocity_x(sds->fluid);
+ float *velocity_y = smoke_get_velocity_y(sds->fluid);
+ float *velocity_z = smoke_get_velocity_z(sds->fluid);
+ unsigned char *obstacle = smoke_get_obstacle(sds->fluid);
+ int bigres[3];
+
+ printf("found flow psys\n");
+
+ // mostly copied from particle code
+ for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++)
+ {
+ int cell[3];
+ size_t i = 0;
+ size_t index = 0;
+ int badcell = 0;
+
+ if(pa->alive == PARS_KILLED) continue;
+ else if(pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0) continue;
+ else if(pa->alive == PARS_DEAD && (part->flag & PART_DIED)==0) continue;
+ else if(pa->flag & (PARS_UNEXIST+PARS_NO_DISP)) continue;
+
+ // VECCOPY(pos, pa->state.co);
+ // Mat4MulVecfl (ob->imat, pos);
+
+ // 1. get corresponding cell
+ get_cell(smd, pa->state.co, cell, 0);
+
+ // check if cell is valid (in the domain boundary)
+ for(i = 0; i < 3; i++)
+ {
+ if((cell[i] > sds->res[i] - 1) || (cell[i] < 0))
+ {
+ badcell = 1;
+ break;
+ }
+ }
+
+ if(badcell)
+ continue;
+
+ // 2. set cell values (heat, density and velocity)
+ index = smoke_get_index(cell[0], sds->res[0], cell[1], sds->res[1], cell[2]);
+
+ if(!(sfs->type & MOD_SMOKE_FLOW_TYPE_OUTFLOW) && !(obstacle[index] & 2)) // this is inflow
+ {
+ // heat[index] += sfs->temp * 0.1;
+ // density[index] += sfs->density * 0.1;
+
+ heat[index] = sfs->temp;
+ density[index] = sfs->density;
+
+ /*
+ velocity_x[index] = pa->state.vel[0];
+ velocity_y[index] = pa->state.vel[1];
+ velocity_z[index] = pa->state.vel[2];
+ */
+ obstacle[index] |= 2;
+
+ // we need different handling for the high-res feature
+ if(bigdensity)
+ {
+ // init all surrounding cells according to amplification, too
+ int i, j, k;
+
+ smoke_turbulence_get_res(smd->domain->wt, bigres);
+
+ for(i = 0; i < smd->domain->amplify + 1; i++)
+ for(j = 0; j < smd->domain->amplify + 1; j++)
+ for(k = 0; k < smd->domain->amplify + 1; k++)
+ {
+ index = smoke_get_index((smd->domain->amplify + 1)* cell[0] + i, bigres[0], (smd->domain->amplify + 1)* cell[1] + j, bigres[1], (smd->domain->amplify + 1)* cell[2] + k);
+ bigdensity[index] = sfs->density;
+ }
+ }
+ }
+ else if(sfs->type & MOD_SMOKE_FLOW_TYPE_OUTFLOW) // outflow
+ {
+ heat[index] = 0.f;
+ density[index] = 0.f;
+ velocity_x[index] = 0.f;
+ velocity_y[index] = 0.f;
+ velocity_z[index] = 0.f;
+
+ // we need different handling for the high-res feature
+ if(bigdensity)
+ {
+ // init all surrounding cells according to amplification, too
+ int i, j, k;
+
+ smoke_turbulence_get_res(smd->domain->wt, bigres);
+
+ for(i = 0; i < smd->domain->amplify + 1; i++)
+ for(j = 0; j < smd->domain->amplify + 1; j++)
+ for(k = 0; k < smd->domain->amplify + 1; k++)
+ {
+ index = smoke_get_index((smd->domain->amplify + 1)* cell[0] + i, bigres[0], (smd->domain->amplify + 1)* cell[1] + j, bigres[1], (smd->domain->amplify + 1)* cell[2] + k);
+ bigdensity[index] = 0.f;
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ /*
+ for()
+ {
+ // no psys
+ BVHTreeNearest nearest;
- if(cache_result == PTCACHE_READ_EXACT)
- {
- SmokeDomainSettings *sds = smd->domain;
+ nearest.index = -1;
+ nearest.dist = FLT_MAX;
- cache->flag |= PTCACHE_SIMULATION_VALID;
- cache->simframe= framenr;
- sds->v3dnum = framenr;
+ BLI_bvhtree_find_nearest(sfs->bvh->tree, pco, &nearest, sfs->bvh->nearest_callback, sfs->bvh);
+ }*/
+ }
+ }
+ }
- if(!badloading)
- smd->time = scene->r.cfra;
+ if(sds->fluid_group)
+ go = go->next;
+ else
+ base= base->next;
+ }
+ }
- // check for wt cache
- if(sds->wt)
+ // do effectors
+ /*
+ if(sds->eff_group)
{
- cache_result_wt = BKE_ptcache_read_cache(&pid_wt, (float)framenr, scene->r.frs_sec);
- // printf("cache_result_wt: %d\n", cache_result_wt);
-
- // error handling
- if(cache_result_wt == PTCACHE_READ_EXACT)
- {
- cache_wt->flag |= PTCACHE_SIMULATION_VALID;
- cache_wt->simframe= framenr;
- }
- else if(cache_result_wt==PTCACHE_READ_OLD)
+ for(go = sds->eff_group->gobject.first; go; go = go->next)
{
- BKE_ptcache_id_reset(scene, &pid_wt, PTCACHE_RESET_FREE);
- cache_wt->flag |= PTCACHE_SIMULATION_VALID;
- }
- else if(ob->id.lib || (cache_wt->flag & PTCACHE_BAKED))
- {
- // if baked and nothing in cache, do nothing
- cache_wt->flag &= ~PTCACHE_SIMULATION_VALID;
- cache_wt->simframe= 0;
- cache_wt->last_exact= 0;
+ if(go->ob)
+ {
+ if(ob->pd)
+ {
+
+ }
+ }
}
}
+ */
- // printf("PTCACHE_READ_EXACT\n");
- return;
- }
- else if(cache_result==PTCACHE_READ_OLD)
- {
- BKE_ptcache_id_reset(scene, &pid, PTCACHE_RESET_FREE);
- cache->flag |= PTCACHE_SIMULATION_VALID;
+ // do collisions
+ if(1)
+ {
+ Object *otherobj = NULL;
+ ModifierData *md = NULL;
- BKE_ptcache_id_reset(scene, &pid_wt, PTCACHE_RESET_FREE);
- cache_wt->flag |= PTCACHE_SIMULATION_VALID;
- }
- else if(ob->id.lib || (cache->flag & PTCACHE_BAKED))
- {
- // if baked and nothing in cache, do nothing
- cache->flag &= ~PTCACHE_SIMULATION_VALID;
- cache->simframe= 0;
- cache->last_exact= 0;
-
- cache_wt->flag &= ~PTCACHE_SIMULATION_VALID;
- cache_wt->simframe= 0;
- cache_wt->last_exact= 0;
-
- // printf("PTCACHE_BAKED\n");
- return;
- }
- /*
- else if((cache_result==0) && ((startframe!=framenr) && !(cache->flag & PTCACHE_SIMULATION_VALID || (framenr == smd->time))))
- {
- cache->flag &= ~PTCACHE_SIMULATION_VALID;
- cache->simframe= 0;
- cache->last_exact= 0;
+ if(sds->coll_group) // we use groups since we have 2 domains
+ go = sds->coll_group->gobject.first;
+ else
+ base = scene->base.first;
- return;
- }*/
+ while(base || go)
+ {
+ otherobj = NULL;
- // printf("framenr: %d, time: %f\n", framenr, smd->time);
+ if(sds->coll_group)
+ {
+ if(go->ob)
+ otherobj = go->ob;
+ }
+ else
+ otherobj = base->object;
- /* do simulation */
+ if(!otherobj)
+ {
+ if(sds->coll_group)
+ go = go->next;
+ else
+ base= base->next;
- // low res
- cache->flag |= PTCACHE_SIMULATION_VALID;
- cache->simframe= framenr;
+ continue;
+ }
+
+ md = modifiers_findByType(otherobj, eModifierType_Smoke);
+
+ // check for active smoke modifier
+ if(md && md->mode & (eModifierMode_Realtime | eModifierMode_Render))
+ {
+ SmokeModifierData *smd2 = (SmokeModifierData *)md;
- if(sds->wt)
- {
- cache_wt->flag |= PTCACHE_SIMULATION_VALID;
- cache_wt->simframe= framenr;
- }
-
- tstart();
+ if((smd2->type & MOD_SMOKE_TYPE_COLL) && smd2->coll)
+ {
+ // we got nice collision object
+ SmokeCollSettings *scs = smd2->coll;
+ size_t i, j;
+ unsigned char *obstacles = smoke_get_obstacle(smd->domain->fluid);
- if(sds->flags & MOD_SMOKE_DISSOLVE)
- {
- smoke_dissolve(sds->fluid, sds->diss_speed, sds->flags & MOD_SMOKE_DISSOLVE_LOG);
- }
+ for(i = 0; i < scs->numpoints; i++)
+ {
+ int badcell = 0;
+ size_t index = 0;
+ int cell[3];
- smoke_calc_domain(scene, ob, smd);
-
- // set new time
- smd->time = scene->r.cfra;
+ // 1. get corresponding cell
+ get_cell(smd, &scs->points[3 * i], cell, 0);
+
+ // check if cell is valid (in the domain boundary)
+ for(j = 0; j < 3; j++)
+ if((cell[j] > sds->res[j] - 1) || (cell[j] < 0))
+ {
+ badcell = 1;
+ break;
+ }
+
+ if(badcell)
+ continue;
+
+ // 2. set cell values (heat, density and velocity)
+ index = smoke_get_index(cell[0], sds->res[0], cell[1], sds->res[1], cell[2]);
+
+ // printf("cell[0]: %d, cell[1]: %d, cell[2]: %d\n", cell[0], cell[1], cell[2]);
+ // printf("res[0]: %d, res[1]: %d, res[2]: %d, index: %d\n\n", sds->res[0], sds->res[1], sds->res[2], index);
+
+ obstacles[index] = 1;
- // frame 1 is start, don't simulate anything
- if(smd->time == 1)
- {
+ // for moving gobstacles
+ /*
+ const LbmFloat maxVelVal = 0.1666;
+ const LbmFloat maxusqr = maxVelVal*maxVelVal*3. *1.5;
+
+ LbmVec objvel = vec2L((mMOIVertices[n]-mMOIVerticesOld[n]) /dvec); {
+ const LbmFloat usqr = (objvel[0]*objvel[0]+objvel[1]*objvel[1]+objvel[2]*objvel[2])*1.5;
+ USQRMAXCHECK(usqr, objvel[0],objvel[1],objvel[2], mMaxVlen, mMxvx,mMxvy,mMxvz);
+ if(usqr>maxusqr) {
+ // cutoff at maxVelVal
+ for(int jj=0; jj<3; jj++) {
+ if(objvel[jj]>0.) objvel[jj] = maxVelVal;
+ if(objvel[jj]<0.) objvel[jj] = -maxVelVal;
+ }
+ } }
+
+ const LbmFloat dp=dot(objvel, vec2L((*pNormals)[n]) );
+ const LbmVec oldov=objvel; // debug
+ objvel = vec2L((*pNormals)[n]) *dp;
+ */
+ }
+ }
+ }
+
+ if(sds->coll_group)
+ go = go->next;
+ else
+ base= base->next;
+ }
+ }
+
// set new time
smd->time = scene->r.cfra;
- BKE_ptcache_write_cache(&pid, framenr);
+ // simulate the actual smoke (c++ code in intern/smoke)
+ smoke_step(sds->fluid, smd->time);
if(sds->wt)
- BKE_ptcache_write_cache(&pid_wt, framenr);
-
- if(get_lamp(scene, light))
- smoke_calc_transparency(sds->shadow, smoke_get_density(sds->fluid), sds->p0, sds->p1, sds->res, sds->dx, light, calc_voxel_transp, -7.0*sds->dx);
+ smoke_turbulence_step(sds->wt, sds->fluid);
- // printf("smd->time: %f\n", smd->time);
- return;
+ tend();
+ printf ( "Frame: %d, Time: %f\n", (int)smd->time, ( float ) tval() );
}
+ else if(scene->r.cfra < smd->time)
+ {
+ // we got back in time, reset smoke in this case (TODO: use cache later)
+ smd->time = scene->r.cfra;
+ smokeModifier_reset(smd);
+ }
+ }
+}
- // simulate the actual smoke (c++ code in intern/smoke)
- smoke_step(sds->fluid, smd->time);
- BKE_ptcache_write_cache(&pid, framenr);
+// update necessary information for 3dview
+void smoke_prepare_View(SmokeModifierData *smd, float *light)
+{
+ float *density = NULL;
+ int x, y, z;
- if(sds->wt)
- {
+ if(!smd->domain->tray)
+ {
+ // TRay is for self shadowing
+ smd->domain->tray = MEM_callocN(sizeof(float)*smd->domain->res[0]*smd->domain->res[1]*smd->domain->res[2], "Smoke_tRay");
+ }
+ if(!smd->domain->tvox)
+ {
+ // TVox is for tranaparency
+ smd->domain->tvox = MEM_callocN(sizeof(float)*smd->domain->res[0]*smd->domain->res[1]*smd->domain->res[2], "Smoke_tVox");
+ }
- if(sds->flags & MOD_SMOKE_DISSOLVE)
- smoke_dissolve_wavelet(sds->wt, sds->diss_speed, sds->flags & MOD_SMOKE_DISSOLVE_LOG);
+ // update 3dview
+ density = smoke_get_density(smd->domain->fluid);
+ for(x = 0; x < smd->domain->res[0]; x++)
+ for(y = 0; y < smd->domain->res[1]; y++)
+ for(z = 0; z < smd->domain->res[2]; z++)
+ {
+ size_t index;
+
+ index = smoke_get_index(x, smd->domain->res[0], y, smd->domain->res[1], z);
+ // Transparency computation
+ // formula taken from "Visual Simulation of Smoke" / Fedkiw et al. pg. 4
+ // T_vox = exp(-C_ext * h)
+ // C_ext/sigma_t = density * C_ext
+ smoke_set_tvox(smd, index, exp(-density[index] * 7.0 * smd->domain->dx));
+ }
+ smoke_calc_transparency(smd, light, 0);
+}
- smoke_turbulence_step(sds->wt, sds->fluid);
- BKE_ptcache_write_cache(&pid_wt, framenr);
- }
+// update necessary information for 3dview ("high res" option)
+void smoke_prepare_bigView(SmokeModifierData *smd, float *light)
+{
+ float *density = NULL;
+ size_t i = 0;
+ int bigres[3];
+
+ smoke_turbulence_get_res(smd->domain->wt, bigres);
- if(get_lamp(scene, light))
- smoke_calc_transparency(sds->shadow, smoke_get_density(sds->fluid), sds->p0, sds->p1, sds->res, sds->dx, light, calc_voxel_transp, -7.0*sds->dx);
+ if(!smd->domain->traybig)
+ {
+ // TRay is for self shadowing
+ smd->domain->traybig = MEM_callocN(sizeof(float)*bigres[0]*bigres[1]*bigres[2], "Smoke_tRayBig");
+ }
+ if(!smd->domain->tvoxbig)
+ {
+ // TVox is for tranaparency
+ smd->domain->tvoxbig = MEM_callocN(sizeof(float)*bigres[0]*bigres[1]*bigres[2], "Smoke_tVoxBig");
+ }
- tend();
- // printf ( "Frame: %d, Time: %f\n", (int)smd->time, ( float ) tval() );
+ density = smoke_turbulence_get_density(smd->domain->wt);
+ for (i = 0; i < bigres[0] * bigres[1] * bigres[2]; i++)
+ {
+ // Transparency computation
+ // formula taken from "Visual Simulation of Smoke" / Fedkiw et al. pg. 4
+ // T_vox = exp(-C_ext * h)
+ // C_ext/sigma_t = density * C_ext
+ smoke_set_bigtvox(smd, i, exp(-density[i] * 7.0 * smd->domain->dx / (smd->domain->amplify + 1)) );
}
+ smoke_calc_transparency(smd, light, 1);
}
-static float calc_voxel_transp(float *result, float *input, int res[3], int *pixel, float *tRay, float correct)
+
+float smoke_get_tvox(SmokeModifierData *smd, size_t index)
{
- const size_t index = smoke_get_index(pixel[0], res[0], pixel[1], res[1], pixel[2]);
+ return smd->domain->tvox[index];
+}
- // T_ray *= T_vox
- *tRay *= exp(input[index]*correct);
-
- if(result[index] < 0.0f)
- {
-#pragma omp critical
- result[index] = *tRay;
- }
+void smoke_set_tvox(SmokeModifierData *smd, size_t index, float tvox)
+{
+ smd->domain->tvox[index] = tvox;
+}
+
+float smoke_get_tray(SmokeModifierData *smd, size_t index)
+{
+ return smd->domain->tray[index];
+}
+
+void smoke_set_tray(SmokeModifierData *smd, size_t index, float transparency)
+{
+ smd->domain->tray[index] = transparency;
+}
- return *tRay;
+float smoke_get_bigtvox(SmokeModifierData *smd, size_t index)
+{
+ return smd->domain->tvoxbig[index];
+}
+
+void smoke_set_bigtvox(SmokeModifierData *smd, size_t index, float tvox)
+{
+ smd->domain->tvoxbig[index] = tvox;
+}
+
+float smoke_get_bigtray(SmokeModifierData *smd, size_t index)
+{
+ return smd->domain->traybig[index];
+}
+
+void smoke_set_bigtray(SmokeModifierData *smd, size_t index, float transparency)
+{
+ smd->domain->traybig[index] = transparency;
}
long long smoke_get_mem_req(int xres, int yres, int zres, int amplify)
@@ -1346,7 +1259,34 @@ long long smoke_get_mem_req(int xres, int yres, int zres, int amplify)
return totalMB;
}
-static void bresenham_linie_3D(int x1, int y1, int z1, int x2, int y2, int z2, float *tRay, bresenham_callback cb, float *result, float *input, int res[3], float correct)
+
+static void calc_voxel_transp(SmokeModifierData *smd, int *pixel, float *tRay)
+{
+ // printf("Pixel(%d, %d, %d)\n", pixel[0], pixel[1], pixel[2]);
+ const size_t index = smoke_get_index(pixel[0], smd->domain->res[0], pixel[1], smd->domain->res[1], pixel[2]);
+
+ // T_ray *= T_vox
+ *tRay *= smoke_get_tvox(smd, index);
+}
+
+static void calc_voxel_transp_big(SmokeModifierData *smd, int *pixel, float *tRay)
+{
+ int bigres[3];
+ size_t index;
+
+ smoke_turbulence_get_res(smd->domain->wt, bigres);
+ index = smoke_get_index(pixel[0], bigres[0], pixel[1], bigres[1], pixel[2]);
+
+ /*
+ if(index > bigres[0]*bigres[1]*bigres[2])
+ printf("pixel[0]: %d, [1]: %d, [2]: %d\n", pixel[0], pixel[1], pixel[2]);
+ */
+
+ // T_ray *= T_vox
+ *tRay *= smoke_get_bigtvox(smd, index);
+}
+
+static void bresenham_linie_3D(SmokeModifierData *smd, int x1, int y1, int z1, int x2, int y2, int z2, float *tRay, int big)
{
int dx, dy, dz, i, l, m, n, x_inc, y_inc, z_inc, err_1, err_2, dx2, dy2, dz2;
int pixel[3];
@@ -1373,8 +1313,12 @@ static void bresenham_linie_3D(int x1, int y1, int z1, int x2, int y2, int z2, f
err_1 = dy2 - l;
err_2 = dz2 - l;
for (i = 0; i < l; i++) {
- if(cb(result, input, res, pixel, tRay, correct) <= FLT_EPSILON)
- break;
+ if(!big)
+ calc_voxel_transp(smd, pixel, tRay);
+ else
+ calc_voxel_transp_big(smd, pixel, tRay);
+ if(*tRay < 0.0f)
+ return;
if (err_1 > 0) {
pixel[1] += y_inc;
err_1 -= dx2;
@@ -1391,8 +1335,12 @@ static void bresenham_linie_3D(int x1, int y1, int z1, int x2, int y2, int z2, f
err_1 = dx2 - m;
err_2 = dz2 - m;
for (i = 0; i < m; i++) {
- if(cb(result, input, res, pixel, tRay, correct) <= FLT_EPSILON)
- break;
+ if(!big)
+ calc_voxel_transp(smd, pixel, tRay);
+ else
+ calc_voxel_transp_big(smd, pixel, tRay);
+ if(*tRay < 0.0f)
+ return;
if (err_1 > 0) {
pixel[0] += x_inc;
err_1 -= dy2;
@@ -1409,8 +1357,12 @@ static void bresenham_linie_3D(int x1, int y1, int z1, int x2, int y2, int z2, f
err_1 = dy2 - n;
err_2 = dx2 - n;
for (i = 0; i < n; i++) {
- if(cb(result, input, res, pixel, tRay, correct) <= FLT_EPSILON)
- break;
+ if(!big)
+ calc_voxel_transp(smd, pixel, tRay);
+ else
+ calc_voxel_transp_big(smd, pixel, tRay);
+ if(*tRay < 0.0f)
+ return;
if (err_1 > 0) {
pixel[1] += y_inc;
err_1 -= dz2;
@@ -1424,15 +1376,41 @@ static void bresenham_linie_3D(int x1, int y1, int z1, int x2, int y2, int z2, f
pixel[2] += z_inc;
}
}
- cb(result, input, res, pixel, tRay, correct);
+ if(!big)
+ calc_voxel_transp(smd, pixel, tRay);
+ else
+ calc_voxel_transp_big(smd, pixel, tRay);
}
-static void get_cell(float *p0, int res[3], float dx, float *pos, int *cell, int correct)
+static void get_cell(struct SmokeModifierData *smd, float *pos, int *cell, int correct)
{
float tmp[3];
- VECSUB(tmp, pos, p0);
- VecMulf(tmp, 1.0 / dx);
+ VECSUB(tmp, pos, smd->domain->p0);
+ VecMulf(tmp, 1.0 / smd->domain->dx);
+
+ if(correct)
+ {
+ cell[0] = MIN2(smd->domain->res[0] - 1, MAX2(0, (int)floor(tmp[0])));
+ cell[1] = MIN2(smd->domain->res[1] - 1, MAX2(0, (int)floor(tmp[1])));
+ cell[2] = MIN2(smd->domain->res[2] - 1, MAX2(0, (int)floor(tmp[2])));
+ }
+ else
+ {
+ cell[0] = (int)floor(tmp[0]);
+ cell[1] = (int)floor(tmp[1]);
+ cell[2] = (int)floor(tmp[2]);
+ }
+}
+static void get_bigcell(struct SmokeModifierData *smd, float *pos, int *cell, int correct)
+{
+ float tmp[3];
+ int res[3];
+ smoke_turbulence_get_res(smd->domain->wt, res);
+
+ VECSUB(tmp, pos, smd->domain->p0);
+
+ VecMulf(tmp, (smd->domain->amplify + 1)/ smd->domain->dx );
if(correct)
{
@@ -1448,22 +1426,43 @@ static void get_cell(float *p0, int res[3], float dx, float *pos, int *cell, int
}
}
-void smoke_calc_transparency(float *result, float *input, float *p0, float *p1, int res[3], float dx, float *light, bresenham_callback cb, float correct)
+
+void smoke_calc_transparency(struct SmokeModifierData *smd, float *light, int big)
{
int x, y, z;
float bv[6];
+ int res[3];
+ float bigfactor = 1.0;
- memset(result, -1, sizeof(float)*res[0]*res[1]*res[2]); // x
- bv[0] = p0[0];
- bv[1] = p1[0];
+ // x
+ bv[0] = smd->domain->p0[0];
+ bv[1] = smd->domain->p1[0];
// y
- bv[2] = p0[1];
- bv[3] = p1[1];
+ bv[2] = smd->domain->p0[1];
+ bv[3] = smd->domain->p1[1];
// z
- bv[4] = p0[2];
- bv[5] = p1[2];
+ bv[4] = smd->domain->p0[2];
+ bv[5] = smd->domain->p1[2];
+/*
+ printf("bv[0]: %f, [1]: %f, [2]: %f, [3]: %f, [4]: %f, [5]: %f\n", bv[0], bv[1], bv[2], bv[3], bv[4], bv[5]);
+
+ printf("p0[0]: %f, p0[1]: %f, p0[2]: %f\n", smd->domain->p0[0], smd->domain->p0[1], smd->domain->p0[2]);
+ printf("p1[0]: %f, p1[1]: %f, p1[2]: %f\n", smd->domain->p1[0], smd->domain->p1[1], smd->domain->p1[2]);
+ printf("dx: %f, amp: %d\n", smd->domain->dx, smd->domain->amplify);
+*/
+ if(!big)
+ {
+ res[0] = smd->domain->res[0];
+ res[1] = smd->domain->res[1];
+ res[2] = smd->domain->res[2];
+ }
+ else
+ {
+ smoke_turbulence_get_res(smd->domain->wt, res);
+ bigfactor = 1.0 / (smd->domain->amplify + 1);
+ }
-#pragma omp parallel for schedule(static) private(y, z)
+#pragma omp parallel for schedule(static) private(y, z) shared(big, smd, light, res, bigfactor)
for(x = 0; x < res[0]; x++)
for(y = 0; y < res[1]; y++)
for(z = 0; z < res[2]; z++)
@@ -1476,29 +1475,41 @@ void smoke_calc_transparency(float *result, float *input, float *p0, float *p1,
index = smoke_get_index(x, res[0], y, res[1], z);
- if(result[index] >= 0.0f)
- continue;
- voxelCenter[0] = p0[0] + dx * x + dx * 0.5;
- voxelCenter[1] = p0[1] + dx * y + dx * 0.5;
- voxelCenter[2] = p0[2] + dx * z + dx * 0.5;
+ // voxelCenter = m_voxelarray[i].GetCenter();
+ voxelCenter[0] = smd->domain->p0[0] + smd->domain->dx * bigfactor * x + smd->domain->dx * bigfactor * 0.5;
+ voxelCenter[1] = smd->domain->p0[1] + smd->domain->dx * bigfactor * y + smd->domain->dx * bigfactor * 0.5;
+ voxelCenter[2] = smd->domain->p0[2] + smd->domain->dx * bigfactor * z + smd->domain->dx * bigfactor * 0.5;
+
+ // printf("vc[0]: %f, vc[1]: %f, vc[2]: %f\n", voxelCenter[0], voxelCenter[1], voxelCenter[2]);
+ // printf("light[0]: %f, light[1]: %f, light[2]: %f\n", light[0], light[1], light[2]);
// get starting position (in voxel coords)
if(BLI_bvhtree_bb_raycast(bv, light, voxelCenter, pos) > FLT_EPSILON)
{
// we're ouside
- get_cell(p0, res, dx, pos, cell, 1);
+ // printf("out: pos[0]: %f, pos[1]: %f, pos[2]: %f\n", pos[0], pos[1], pos[2]);
+ if(!big)
+ get_cell(smd, pos, cell, 1);
+ else
+ get_bigcell(smd, pos, cell, 1);
}
else
{
+ // printf("in: pos[0]: %f, pos[1]: %f, pos[2]: %f\n", light[0], light[1], light[2]);
// we're inside
- get_cell(p0, res, dx, light, cell, 1);
+ if(!big)
+ get_cell(smd, light, cell, 1);
+ else
+ get_bigcell(smd, light, cell, 1);
}
- bresenham_linie_3D(cell[0], cell[1], cell[2], x, y, z, &tRay, cb, result, input, res, correct);
+ // printf("cell - [0]: %d, [1]: %d, [2]: %d\n", cell[0], cell[1], cell[2]);
+ bresenham_linie_3D(smd, cell[0], cell[1], cell[2], x, y, z, &tRay, big);
- // convention -> from a RGBA float array, use G value for tRay
-// #pragma omp critical
- result[index] = tRay;
+ if(!big)
+ smoke_set_tray(smd, index, tRay);
+ else
+ smoke_set_bigtray(smd, index, tRay);
}
}
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index fdbfe154fae..68f918b0c68 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -866,8 +866,7 @@ static void renew_softbody(Scene *scene, Object *ob, int totpoint, int totspring
bp->frozen = 1.0f;
bp->colball = 0.0f;
bp->flag = 0;
- bp->springweight = 1.0f;
- bp->mass = sb->nodemass;
+
}
}
}
@@ -3623,9 +3622,9 @@ static void particles_to_softbody(Scene *scene, Object *ob)
/* find first BodyPoint index for each particle */
if(psys->totpart > 0) {
-// psys->particles->bpi = 0;
-// for(a=1, pa=psys->particles+1; a<psys->totpart; a++, pa++)
-// pa->bpi = (pa-1)->bpi + (pa-1)->totkey;
+ psys->particles->bpi = 0;
+ for(a=1, pa=psys->particles+1; a<psys->totpart; a++, pa++)
+ pa->bpi = (pa-1)->bpi + (pa-1)->totkey;
}
/* we always make body points */
@@ -4079,7 +4078,7 @@ void sbObjectStep(Scene *scene, Object *ob, float cfra, float (*vertexCos)[3], i
if(framenr < startframe) {
cache->flag &= ~PTCACHE_SIMULATION_VALID;
cache->simframe= 0;
- //cache->last_exact= 0;
+ cache->last_exact= 0;
return;
}
@@ -4141,29 +4140,20 @@ void sbObjectStep(Scene *scene, Object *ob, float cfra, float (*vertexCos)[3], i
pa= sb->particles->particles;
}
- if(framenr == startframe && cache->flag & PTCACHE_REDO_NEEDED) {
- BKE_ptcache_id_reset(scene, &pid, PTCACHE_RESET_OUTDATED);
- cache->simframe= framenr;
- cache->flag &= ~PTCACHE_REDO_NEEDED;
- return;
- }
-
/* try to read from cache */
cache_result = BKE_ptcache_read_cache(&pid, framenr, scene->r.frs_sec);
if(cache_result == PTCACHE_READ_EXACT || cache_result == PTCACHE_READ_INTERPOLATED) {
- if(sb->particles==0)
- softbody_to_object(ob, vertexCos, numVerts, sb->local);
-
- cache->simframe= framenr;
cache->flag |= PTCACHE_SIMULATION_VALID;
+ cache->simframe= framenr;
- if(cache_result == PTCACHE_READ_INTERPOLATED && cache->flag & PTCACHE_REDO_NEEDED)
- BKE_ptcache_write_cache(&pid, framenr);
+ if(sb->particles==0)
+ softbody_to_object(ob, vertexCos, numVerts, sb->local);
return;
}
else if(cache_result==PTCACHE_READ_OLD) {
+ BKE_ptcache_id_reset(scene, &pid, PTCACHE_RESET_FREE);
cache->flag |= PTCACHE_SIMULATION_VALID;
}
else if(ob->id.lib || (cache->flag & PTCACHE_BAKED)) {
@@ -4175,11 +4165,16 @@ void sbObjectStep(Scene *scene, Object *ob, float cfra, float (*vertexCos)[3], i
}
if(framenr == startframe) {
+ if(cache->flag & PTCACHE_REDO_NEEDED) {
+ softbody_update_positions(ob, sb, vertexCos, numVerts);
+ softbody_reset(ob, sb, vertexCos, numVerts);
+ cache->flag &= ~PTCACHE_REDO_NEEDED;
+ }
/* first frame, no simulation to do, just set the positions */
softbody_update_positions(ob, sb, vertexCos, numVerts);
- cache->simframe= framenr;
cache->flag |= PTCACHE_SIMULATION_VALID;
+ cache->simframe= framenr;
/* don't write cache on first frame, but on second frame write
* cache for frame 1 and 2 */
@@ -4191,6 +4186,10 @@ void sbObjectStep(Scene *scene, Object *ob, float cfra, float (*vertexCos)[3], i
softbody_update_positions(ob, sb, vertexCos, numVerts);
+ /* do simulation */
+ cache->flag |= PTCACHE_SIMULATION_VALID;
+ cache->simframe= framenr;
+
/* checking time: */
dtime = framedelta*timescale;
@@ -4199,10 +4198,6 @@ void sbObjectStep(Scene *scene, Object *ob, float cfra, float (*vertexCos)[3], i
if(sb->particles==0)
softbody_to_object(ob, vertexCos, numVerts, 0);
- /* do simulation */
- cache->simframe= framenr;
- cache->flag |= PTCACHE_SIMULATION_VALID;
-
BKE_ptcache_write_cache(&pid, framenr);
}
}
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 2d5d8dad7a8..a3275792a85 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -34,7 +34,7 @@
void sound_init()
{
AUD_Specs specs;
- int device, buffersize;
+ int device, buffersize, success;
device = U.audiodevice;
buffersize = U.mixbufsize;
@@ -54,8 +54,15 @@ void sound_init()
if(specs.channels <= AUD_CHANNELS_INVALID)
specs.channels = AUD_CHANNELS_STEREO;
- if(!AUD_init(device, specs, buffersize))
- AUD_init(AUD_NULL_DEVICE, specs, buffersize);
+ if(!AUD_init(device, specs, buffersize)) {
+ if(device == AUD_SDL_DEVICE)
+ success= AUD_init(AUD_OPENAL_DEVICE, specs, AUD_DEFAULT_BUFFER_SIZE*4);
+ else
+ success= AUD_init(AUD_SDL_DEVICE, specs, AUD_DEFAULT_BUFFER_SIZE*4);
+
+ if(!success)
+ AUD_init(AUD_NULL_DEVICE, specs, buffersize);
+ }
}
void sound_exit()
@@ -71,7 +78,7 @@ struct bSound* sound_new_file(struct Main *main, char* filename)
int len;
strcpy(str, filename);
- BLI_convertstringcode(str, main->name);
+ BLI_convertstringcode(str, G.sce);
len = strlen(filename);
while(len > 0 && filename[len-1] != '/' && filename[len-1] != '\\')
@@ -79,11 +86,11 @@ struct bSound* sound_new_file(struct Main *main, char* filename)
sound = alloc_libblock(&main->sound, ID_SO, filename+len);
strcpy(sound->name, filename);
-// XXX unused currently sound->type = SOUND_TYPE_FILE;
+ sound->type = SOUND_TYPE_FILE;
- sound_load(main, sound);
+ sound_load(sound);
- if(!sound->handle)
+ if(!sound->snd_sound)
{
free_libblock(&main->sound, sound);
sound = NULL;
@@ -107,9 +114,9 @@ struct bSound* sound_new_buffer(struct bContext *C, struct bSound *source)
sound->child_sound = source;
sound->type = SOUND_TYPE_BUFFER;
- sound_load(CTX_data_main(C), sound);
+ sound_load(sound);
- if(!sound->handle)
+ if(!sound->snd_sound)
{
free_libblock(&CTX_data_main(C)->sound, sound);
sound = NULL;
@@ -133,9 +140,9 @@ struct bSound* sound_new_limiter(struct bContext *C, struct bSound *source, floa
sound->end = end;
sound->type = SOUND_TYPE_LIMITER;
- sound_load(CTX_data_main(C), sound);
+ sound_load(sound);
- if(!sound->handle)
+ if(!sound->snd_sound)
{
free_libblock(&CTX_data_main(C)->sound, sound);
sound = NULL;
@@ -162,35 +169,22 @@ void sound_cache(struct bSound* sound, int ignore)
if(sound->cache && !ignore)
AUD_unload(sound->cache);
- sound->cache = AUD_bufferSound(sound->handle);
- sound->changed++;
+ sound->cache = AUD_bufferSound(sound->snd_sound);
}
-void sound_delete_cache(struct bSound* sound)
-{
- if(sound->cache)
- {
- AUD_unload(sound->cache);
- sound->cache = NULL;
- }
-}
-
-void sound_load(struct Main *main, struct bSound* sound)
+void sound_load(struct bSound* sound)
{
if(sound)
{
- if(sound->handle)
+ if(sound->snd_sound)
{
- AUD_unload(sound->handle);
- sound->handle = NULL;
+ AUD_unload(sound->snd_sound);
+ sound->snd_sound = NULL;
}
-// XXX unused currently
-#if 0
switch(sound->type)
{
case SOUND_TYPE_FILE:
-#endif
{
char fullpath[FILE_MAX];
char *path;
@@ -204,32 +198,32 @@ void sound_load(struct Main *main, struct bSound* sound)
if(sound->id.lib)
path = sound->id.lib->filename;
else
- path = main ? main->name : G.sce;
+ path = G.sce;
BLI_convertstringcode(fullpath, path);
/* but we need a packed file then */
if (pf)
- sound->handle = AUD_loadBuffer((unsigned char*) pf->data, pf->size);
+ sound->snd_sound = AUD_loadBuffer((unsigned char*) pf->data, pf->size);
/* or else load it from disk */
else
- sound->handle = AUD_load(fullpath);
- } // XXX
-// XXX unused currently
-#if 0
+ sound->snd_sound = AUD_load(fullpath);
break;
}
case SOUND_TYPE_BUFFER:
- if(sound->child_sound && sound->child_sound->handle)
- sound->handle = AUD_bufferSound(sound->child_sound->handle);
+ if(sound->child_sound && sound->child_sound->snd_sound)
+ sound->snd_sound = AUD_bufferSound(sound->child_sound->snd_sound);
break;
case SOUND_TYPE_LIMITER:
- if(sound->child_sound && sound->child_sound->handle)
- sound->handle = AUD_limitSound(sound->child_sound, sound->start, sound->end);
+ if(sound->child_sound && sound->child_sound->snd_sound)
+ sound->snd_sound = AUD_limitSound(sound->child_sound, sound->start, sound->end);
break;
}
-#endif
- sound->changed++;
+
+ if(sound->cache)
+ {
+
+ }
}
}
@@ -241,36 +235,33 @@ void sound_free(struct bSound* sound)
sound->packedfile = NULL;
}
- if(sound->handle)
+ if(sound->snd_sound)
{
- AUD_unload(sound->handle);
- sound->handle = NULL;
+ AUD_unload(sound->snd_sound);
+ sound->snd_sound = NULL;
}
}
void sound_unlink(struct bContext *C, struct bSound* sound)
{
+ bSound *snd;
Scene *scene;
SoundHandle *handle;
-// XXX unused currently
-#if 0
- bSound *snd;
for(snd = CTX_data_main(C)->sound.first; snd; snd = snd->id.next)
{
if(snd->child_sound == sound)
{
snd->child_sound = NULL;
- if(snd->handle)
+ if(snd->snd_sound)
{
- AUD_unload(sound->handle);
- snd->handle = NULL;
+ AUD_unload(sound->snd_sound);
+ snd->snd_sound = NULL;
}
sound_unlink(C, snd);
}
}
-#endif
for(scene = CTX_data_main(C)->scene.first; scene; scene = scene->id.next)
{
@@ -328,6 +319,8 @@ void sound_stop_all(struct bContext *C)
}
}
+#define SOUND_PLAYBACK_LAMBDA 1.0
+
void sound_update_playing(struct bContext *C)
{
SoundHandle *handle;
@@ -373,10 +366,12 @@ void sound_update_playing(struct bContext *C)
action = 3;
else
{
- float diff = AUD_getPosition(handle->handle) * fps - cfra + handle->startframe;
+ float diff = AUD_getPosition(handle->handle) - (cfra - handle->startframe) / fps;
+// AUD_XXX float diff = AUD_getPosition(handle->handle) * fps - cfra + handle->startframe
if(diff < 0.0)
diff = -diff;
- if(diff > FPS/2.0)
+ if(diff > SOUND_PLAYBACK_LAMBDA)
+// AUD_XXX if(diff > 5.0f)
{
action = 2;
}
@@ -388,9 +383,9 @@ void sound_update_playing(struct bContext *C)
{
if(handle->state == AUD_STATUS_INVALID)
{
- if(handle->source && handle->source->handle)
+ if(handle->source && handle->source->snd_sound)
{
- AUD_Sound* limiter = AUD_limitSound(handle->source->cache ? handle->source->cache : handle->source->handle, handle->frameskip / fps, (handle->frameskip + handle->endframe - handle->startframe)/fps);
+ AUD_Sound* limiter = AUD_limitSound(handle->source->cache ? handle->source->cache : handle->source->snd_sound, handle->frameskip / fps, (handle->frameskip + handle->endframe - handle->startframe)/fps);
handle->handle = AUD_play(limiter, 1);
AUD_unload(limiter);
if(handle->handle)
@@ -429,10 +424,10 @@ void sound_scrub(struct bContext *C)
{
if(cfra >= handle->startframe && cfra < handle->endframe && !handle->mute)
{
- if(handle->source && handle->source->handle)
+ if(handle->source && handle->source->snd_sound)
{
int frameskip = handle->frameskip + cfra - handle->startframe;
- AUD_Sound* limiter = AUD_limitSound(handle->source->cache ? handle->source->cache : handle->source->handle, frameskip / fps, (frameskip + 1)/fps);
+ AUD_Sound* limiter = AUD_limitSound(handle->source->cache ? handle->source->cache : handle->source->snd_sound, frameskip / fps, (frameskip + 1)/fps);
AUD_play(limiter, 0);
AUD_unload(limiter);
}
@@ -455,7 +450,7 @@ AUD_Device* sound_mixdown(struct Scene *scene, AUD_Specs specs, int start, int e
for(handle = scene->sound_handles.first; handle; handle = handle->next)
{
- if(start < handle->endframe && end > handle->startframe && !handle->mute && handle->source && handle->source->handle)
+ if(start < handle->endframe && end > handle->startframe && !handle->mute && handle->source && handle->source->snd_sound)
{
frameskip = handle->frameskip;
s = handle->startframe - start;
@@ -467,7 +462,7 @@ AUD_Device* sound_mixdown(struct Scene *scene, AUD_Specs specs, int start, int e
s = 0;
}
- limiter = AUD_limitSound(handle->source->handle, frameskip / fps, e / fps);
+ limiter = AUD_limitSound(handle->source->snd_sound, frameskip / fps, e / fps);
delayer = AUD_delaySound(limiter, s / fps);
AUD_playDevice(mixdown, delayer);
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index dac426de4eb..8e3d59bbc58 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -37,22 +37,14 @@
#include "BLI_blenlib.h"
-#include "DNA_action_types.h"
-#include "DNA_armature_types.h"
-#include "DNA_constraint_types.h"
-#include "DNA_controller_types.h"
#include "DNA_scene_types.h"
-#include "DNA_screen_types.h"
-#include "DNA_space_types.h"
#include "DNA_text_types.h"
-#include "BKE_depsgraph.h"
-#include "BKE_global.h"
+#include "BKE_utildefines.h"
+#include "BKE_text.h"
#include "BKE_library.h"
+#include "BKE_global.h"
#include "BKE_main.h"
-#include "BKE_node.h"
-#include "BKE_text.h"
-#include "BKE_utildefines.h"
#ifndef DISABLE_PYTHON
#include "BPY_extern.h"
@@ -459,85 +451,6 @@ Text *copy_text(Text *ta)
return tan;
}
-void unlink_text(Main *bmain, Text *text)
-{
- bScreen *scr;
- ScrArea *area;
- SpaceLink *sl;
- Scene *scene;
- Object *ob;
- bController *cont;
- bConstraint *con;
- short update;
-
- /* dome */
- for(scene=bmain->scene.first; scene; scene=scene->id.next)
- if(scene->r.dometext == text)
- scene->r.dometext = NULL;
-
- for(ob=bmain->object.first; ob; ob=ob->id.next) {
- /* game controllers */
- for(cont=ob->controllers.first; cont; cont=cont->next) {
- if(cont->type==CONT_PYTHON) {
- bPythonCont *pc;
-
- pc= cont->data;
- if(pc->text==text) pc->text= NULL;
- }
- }
-
- /* pyconstraints */
- update = 0;
-
- if(ob->type==OB_ARMATURE && ob->pose) {
- bPoseChannel *pchan;
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- for(con = pchan->constraints.first; con; con=con->next) {
- if(con->type==CONSTRAINT_TYPE_PYTHON) {
- bPythonConstraint *data = con->data;
- if (data->text==text) data->text = NULL;
- update = 1;
-
- }
- }
- }
- }
-
- for(con = ob->constraints.first; con; con=con->next) {
- if(con->type==CONSTRAINT_TYPE_PYTHON) {
- bPythonConstraint *data = con->data;
- if (data->text==text) data->text = NULL;
- update = 1;
- }
- }
-
- if(update)
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- }
-
- /* pynodes */
- // XXX nodeDynamicUnlinkText(&text->id);
-
- /* text space */
- for(scr= bmain->screen.first; scr; scr= scr->id.next) {
- for(area= scr->areabase.first; area; area= area->next) {
- for(sl= area->spacedata.first; sl; sl= sl->next) {
- if(sl->spacetype==SPACE_TEXT) {
- SpaceText *st= (SpaceText*) sl;
-
- if(st->text==text) {
- st->text= NULL;
- st->top= 0;
- }
- }
- }
- }
- }
-
- text->id.us= 0;
-}
-
-
/*****************************/
/* Editing utility functions */
/*****************************/
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index fe8b97db606..eeffbfe5ef6 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -38,12 +38,11 @@
#include "PIL_dynlib.h"
-
+#include "MTC_matrixops.h"
#include "BLI_blenlib.h"
#include "BLI_arithb.h"
#include "BLI_rand.h"
-#include "BLI_kdopbvh.h"
#include "DNA_texture_types.h"
#include "DNA_key_types.h"
@@ -418,8 +417,6 @@ void free_texture(Tex *tex)
free_plugin_tex(tex->plugin);
if(tex->coba) MEM_freeN(tex->coba);
if(tex->env) BKE_free_envmap(tex->env);
- if(tex->pd) BKE_free_pointdensity(tex->pd);
- if(tex->vd) BKE_free_voxeldata(tex->vd);
BKE_previewimg_free(&tex->preview);
BKE_icon_delete((struct ID*)tex);
tex->id.icon_id = 0;
@@ -489,16 +486,6 @@ void default_tex(Tex *tex)
tex->env->depth=0;
}
- if (tex->pd) {
- tex->pd->radius = 0.3f;
- tex->pd->falloff_type = TEX_PD_FALLOFF_STD;
- }
-
- if (tex->vd) {
- tex->vd->resol[0] = tex->vd->resol[1] = tex->vd->resol[2] = 0;
- tex->vd->interp_type=TEX_VD_LINEAR;
- tex->vd->file_format=TEX_VD_SMOKE;
- }
pit = tex->plugin;
if (pit) {
varstr= pit->varstr;
@@ -750,9 +737,9 @@ void make_local_texture(Tex *tex)
void autotexname(Tex *tex)
{
- char texstr[20][15]= {"None" , "Clouds" , "Wood", "Marble", "Magic" , "Blend",
+ char texstr[20][12]= {"None" , "Clouds" , "Wood", "Marble", "Magic" , "Blend",
"Stucci", "Noise" , "Image", "Plugin", "EnvMap" , "Musgrave",
- "Voronoi", "DistNoise", "Point Density", "Voxel Data", "", "", "", ""};
+ "Voronoi", "DistNoise", "", "", "", "", "", ""};
Image *ima;
char di[FILE_MAXDIR], fi[FILE_MAXFILE];
@@ -901,106 +888,6 @@ void BKE_free_envmap(EnvMap *env)
}
/* ------------------------------------------------------------------------- */
-
-PointDensity *BKE_add_pointdensity(void)
-{
- PointDensity *pd;
-
- pd= MEM_callocN(sizeof(PointDensity), "pointdensity");
- pd->flag = 0;
- pd->radius = 0.3f;
- pd->falloff_type = TEX_PD_FALLOFF_STD;
- pd->falloff_softness = 2.0;
- pd->source = TEX_PD_PSYS;
- pd->point_tree = NULL;
- pd->point_data = NULL;
- pd->noise_size = 0.5f;
- pd->noise_depth = 1;
- pd->noise_fac = 1.0f;
- pd->noise_influence = TEX_PD_NOISE_STATIC;
- pd->coba = add_colorband(1);
- pd->speed_scale = 1.0f;
- pd->totpoints = 0;
- pd->coba = add_colorband(1);
- pd->object = NULL;
- pd->psys = NULL;
- return pd;
-}
-
-PointDensity *BKE_copy_pointdensity(PointDensity *pd)
-{
- PointDensity *pdn;
-
- pdn= MEM_dupallocN(pd);
- pdn->point_tree = NULL;
- pdn->point_data = NULL;
- if(pdn->coba) pdn->coba= MEM_dupallocN(pdn->coba);
-
- return pdn;
-}
-
-void BKE_free_pointdensitydata(PointDensity *pd)
-{
- if (pd->point_tree) {
- BLI_bvhtree_free(pd->point_tree);
- pd->point_tree = NULL;
- }
- if (pd->point_data) {
- MEM_freeN(pd->point_data);
- pd->point_data = NULL;
- }
- if(pd->coba) MEM_freeN(pd->coba);
-}
-
-void BKE_free_pointdensity(PointDensity *pd)
-{
- BKE_free_pointdensitydata(pd);
- MEM_freeN(pd);
-}
-
-
-void BKE_free_voxeldatadata(struct VoxelData *vd)
-{
- if (vd->dataset) {
- MEM_freeN(vd->dataset);
- vd->dataset = NULL;
- }
-
-}
-
-void BKE_free_voxeldata(struct VoxelData *vd)
-{
- BKE_free_voxeldatadata(vd);
- MEM_freeN(vd);
-}
-
-struct VoxelData *BKE_add_voxeldata(void)
-{
- VoxelData *vd;
-
- vd= MEM_callocN(sizeof(struct VoxelData), "voxeldata");
- vd->dataset = NULL;
- vd->resol[0] = vd->resol[1] = vd->resol[2] = 1;
- vd->interp_type= TEX_VD_LINEAR;
- vd->file_format= TEX_VD_SMOKE;
- vd->int_multiplier = 1.0;
- vd->object = NULL;
-
- return vd;
- }
-
-struct VoxelData *BKE_copy_voxeldata(struct VoxelData *vd)
-{
- VoxelData *vdn;
-
- vdn= MEM_dupallocN(vd);
- vdn->dataset = NULL;
-
- return vdn;
-}
-
-
-/* ------------------------------------------------------------------------- */
int BKE_texture_dependsOnTime(const struct Tex *texture)
{
if(texture->plugin) {
diff --git a/source/blender/blenlib/BLI_arithb.h b/source/blender/blenlib/BLI_arithb.h
index 71604758b80..1502c4870be 100644
--- a/source/blender/blenlib/BLI_arithb.h
+++ b/source/blender/blenlib/BLI_arithb.h
@@ -174,39 +174,7 @@ void CalcNormShort(short *v1, short *v2, short *v3, float *n);
float power_of_2(float val);
/**
- * @section Euler conversion routines (With Custom Order)
- */
-
-/* Defines for rotation orders
- * WARNING: must match the ePchan_RotMode in DNA_action_types.h
- * order matters - types are saved to file!
- */
-typedef enum eEulerRotationOrders {
- EULER_ORDER_DEFAULT = 1, /* Blender 'default' (classic) is basically XYZ */
- EULER_ORDER_XYZ = 1, /* Blender 'default' (classic) - must be as 1 to sync with PoseChannel rotmode */
- EULER_ORDER_XZY,
- EULER_ORDER_YXZ,
- EULER_ORDER_YZX,
- EULER_ORDER_ZXY,
- EULER_ORDER_ZYX,
- /* NOTE: there are about 6 more entries when including duplicated entries too */
-} eEulerRotationOrders;
-
-void EulOToQuat(float eul[3], short order, float quat[4]);
-void QuatToEulO(float quat[4], float eul[3], short order);
-
-void EulOToMat3(float eul[3], short order, float Mat[3][3]);
-void EulOToMat4(float eul[3], short order, float Mat[4][4]);
-
-void Mat3ToEulO(float Mat[3][3], float eul[3], short order);
-void Mat4ToEulO(float Mat[4][4], float eul[3], short order);
-
-void Mat3ToCompatibleEulO(float mat[3][3], float eul[3], float oldrot[3], short order);
-
-void eulerO_rot(float beul[3], float ang, char axis, short order);
-
-/**
- * @section Euler conversion routines (Blender XYZ)
+ * @section Euler conversion routines
*/
void EulToMat3(float *eul, float mat[][3]);
@@ -217,12 +185,9 @@ void Mat4ToEul(float tmat[][4],float *eul);
void EulToQuat(float *eul, float *quat);
-void Mat3ToCompatibleEul(float mat[][3], float *eul, float *oldrot);
-
-
-
void compatible_eul(float *eul, float *oldrot);
-void euler_rot(float *beul, float ang, char axis);
+
+void Mat3ToCompatibleEul(float mat[][3], float *eul, float *oldrot);
/**
@@ -251,8 +216,6 @@ void printquat(char *str, float q[4]);
void QuatInterpol(float *result, float *quat1, float *quat2, float t);
void QuatAdd(float *result, float *quat1, float *quat2, float t);
-void QuatToMat3(float *q, float m[][3]);
-void QuatToMat4(float *q, float m[][4]);
/**
* @section matrix multiplication and copying routines
@@ -362,7 +325,6 @@ void printvec4f(char *str, float v[4]);
void VecAddf(float *v, float *v1, float *v2);
void VecSubf(float *v, float *v1, float *v2);
-void VecMulVecf(float *v, float *v1, float *v2);
void VecLerpf(float *target, float *a, float *b, float t);
void VecMidf(float *v, float *v1, float *v2);
@@ -377,18 +339,17 @@ void Vec2Copyf(float *v1, float *v2);
void Vec2Lerpf(float *target, float *a, float *b, float t);
void AxisAngleToQuat(float *q, float *axis, float angle);
-void QuatToAxisAngle(float *q, float *axis, float *angle);
void RotationBetweenVectorsToQuat(float *q, float v1[3], float v2[3]);
void vectoquat(float *vec, short axis, short upflag, float *q);
-void VecReflect(float *out, float *v1, float *v2);
-void VecBisect3(float *v, float *v1, float *v2, float *v3);
float VecAngle2(float *v1, float *v2);
float VecAngle3(float *v1, float *v2, float *v3);
float NormalizedVecAngle2(float *v1, float *v2);
float VecAngle3_2D(float *v1, float *v2, float *v3);
float NormalizedVecAngle2_2D(float *v1, float *v2);
+
+void euler_rot(float *beul, float ang, char axis);
void NormalShortToFloat(float *out, short *in);
void NormalFloatToShort(short *out, float *in);
@@ -460,6 +421,9 @@ void VecStar(float mat[][3],float *vec);
short EenheidsMat(float mat[][3]);
+void QuatToMat3(float *q, float m[][3]);
+void QuatToMat4(float *q, float m[][4]);
+
void Mat3ToQuat_is_ok(float wmat[][3], float *q);
void i_ortho(float left, float right, float bottom, float top, float nearClip, float farClip, float matrix[][4]);
@@ -470,6 +434,8 @@ void i_rotate(float angle, char axis, float mat[][4]);
+
+
void MinMax3(float *min, float *max, float *vec);
void SizeToMat3(float *size, float mat[][3]);
void SizeToMat4(float *size, float mat[][4]);
@@ -489,9 +455,8 @@ void Mat4ToSize(float mat[][4], float *size);
void triatoquat(float *v1, float *v2, float *v3, float *quat);
-void LocEulSizeToMat4(float mat[4][4], float loc[3], float eul[3], float size[3]);
-void LocEulOSizeToMat4(float mat[4][4], float loc[3], float eul[3], float size[3], short rotOrder);
-void LocQuatSizeToMat4(float mat[4][4], float loc[3], float quat[4], float size[3]);
+void LocEulSizeToMat4(float mat[][4], float loc[3], float eul[3], float size[3]);
+void LocQuatSizeToMat4(float mat[][4], float loc[3], float quat[4], float size[3]);
void tubemap(float x, float y, float z, float *u, float *v);
void spheremap(float x, float y, float z, float *u, float *v);
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
index 0c1cdbc4d3a..d2dd40b21a5 100644
--- a/source/blender/blenlib/BLI_fileops.h
+++ b/source/blender/blenlib/BLI_fileops.h
@@ -36,6 +36,8 @@
#ifndef BLI_FILEOPS_H
#define BLI_FILEOPS_H
+
+
void BLI_recurdir_fileops(char *dirname);
int BLI_link(char *file, char *to);
int BLI_is_writable(char *filename);
diff --git a/source/blender/blenlib/BLI_kdopbvh.h b/source/blender/blenlib/BLI_kdopbvh.h
index fe6bc576fbd..50462d531ef 100644
--- a/source/blender/blenlib/BLI_kdopbvh.h
+++ b/source/blender/blenlib/BLI_kdopbvh.h
@@ -71,8 +71,6 @@ typedef void (*BVHTree_NearestPointCallback) (void *userdata, int index, const f
/* callback must update hit in case it finds a nearest successful hit */
typedef void (*BVHTree_RayCastCallback) (void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit);
-/* callback to range search query */
-typedef void (*BVHTree_RangeQuery) (void *userdata, int index, float squared_dist);
BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis);
void BLI_bvhtree_free(BVHTree *tree);
@@ -97,9 +95,5 @@ int BLI_bvhtree_ray_cast(BVHTree *tree, const float *co, const float *dir, float
float BLI_bvhtree_bb_raycast(float *bv, float *light_start, float *light_end, float *pos);
-/* range query */
-int BLI_bvhtree_range_query(BVHTree *tree, const float *co, float radius, BVHTree_RangeQuery callback, void *userdata);
-
-
#endif // BLI_KDOPBVH_H
diff --git a/source/blender/blenlib/BLI_voxel.h b/source/blender/blenlib/BLI_voxel.h
deleted file mode 100644
index 934bc820259..00000000000
--- a/source/blender/blenlib/BLI_voxel.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 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): Matt Ebb, Raul Fernandez Hernandez (Farsthary).
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef BLI_VOXEL_H
-#define BLI_VOXEL_H
-
-/* find the index number of a voxel, given x/y/z integer coords and resolution vector */
-#define V_I(x, y, z, res) ( (z)*(res)[1]*(res)[0] + (y)*(res)[0] + (x) )
-
-/* 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);
-
-#endif /* BLI_VOXEL_H */
diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h
index b46ebebacd5..3e1b73e51be 100644
--- a/source/blender/blenlib/BLI_winstuff.h
+++ b/source/blender/blenlib/BLI_winstuff.h
@@ -65,7 +65,22 @@
extern "C" {
#endif
-#define _USE_MATH_DEFINES
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+#ifndef M_PI_2
+#define M_PI_2 1.57079632679489661923
+#endif
+#ifndef M_SQRT2
+#define M_SQRT2 1.41421356237309504880
+#endif
+#ifndef M_SQRT1_2
+#define M_SQRT1_2 0.70710678118654752440
+#endif
+#ifndef M_1_PI
+#define M_1_PI 0.318309886183790671538
+#endif
+
#define MAXPATHLEN MAX_PATH
#ifndef S_ISREG
@@ -75,18 +90,6 @@ extern "C" {
#define S_ISDIR(x) ((x&S_IFMT) == S_IFDIR)
#endif
-/* defines for using ISO C++ conformant names */
-#define open _open
-#define close _close
-#define write _write
-#define read _read
-#define getcwd _getcwd
-#define chdir _chdir
-#define strdup _strdup
-#define lseek _lseek
-#define getpid _getpid
-#define snprintf _snprintf
-
#ifndef FREE_WINDOWS
typedef unsigned int mode_t;
#endif
diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt
index 4ed9eb4b007..a0bf2367b98 100644
--- a/source/blender/blenlib/CMakeLists.txt
+++ b/source/blender/blenlib/CMakeLists.txt
@@ -27,20 +27,20 @@
FILE(GLOB SRC intern/*.c)
SET(INC
- . ../makesdna ../blenkernel ../../../intern/guardedalloc ../include
- ${FREETYPE_INCLUDE_DIRS}
- ${ZLIB_INC}
+ . ../makesdna ../blenkernel ../../../intern/guardedalloc ../include
+ ${FREETYPE_INCLUDE_DIRS}
+ ${ZLIB_INC}
)
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
SET(INC
- ${INC}
- ${BINRELOC_INC}
+ ${INC}
+ ${BINRELOC_INC}
)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
IF(WIN32)
- SET(INC ${INC} ${PTHREADS_INC})
+ SET(INC ${INC} ${PTHREADS_INC})
ENDIF(WIN32)
BLENDERLIB(bf_blenlib "${SRC}" "${INC}")
diff --git a/source/blender/blenlib/MTC_matrixops.h b/source/blender/blenlib/MTC_matrixops.h
new file mode 100644
index 00000000000..2bc644be564
--- /dev/null
+++ b/source/blender/blenlib/MTC_matrixops.h
@@ -0,0 +1,162 @@
+/*
+ * matrixops.h
+ *
+ * $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 *****
+ */
+
+#ifndef MATRIXOPS_H
+#define MATRIXOPS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ------------------------------------------------------------------------- */
+/* need rewriting: */
+/**
+ * copy the left upp3 3 by 3 of m2 to m1
+ */
+void MTC_Mat3CpyMat4(float m1[][3], float m2[][4]);
+
+/* ------------------------------------------------------------------------- */
+/* operations based on 4 by 4 matrices */
+
+/**
+ * Copy m1 to m2
+ */
+void MTC_Mat4CpyMat4(float m1[][4], float m2[][4]);
+
+/**
+ * Multiply all matrices after the first, leave the result in the
+ * first argument
+ */
+void MTC_Mat4MulSerie(float answ[][4],
+ float m1[][4], float m2[][4], float m3[][4],
+ float m4[][4], float m5[][4], float m6[][4],
+ float m7[][4], float m8[][4]);
+
+/**
+ * m1 = m2 matprod m3
+ */
+void MTC_Mat4MulMat4(float m1[][4], float m2[][4], float m3[][4]);
+
+/**
+ * Do vec^t prod mat, result in vec. Ignore vec[3] (vec is a
+ * float[3])
+ */
+void MTC_Mat4MulVecfl(float mat[][4], float *vec);
+
+/**
+ * Invert mat, result in inverse. Always returns 1
+ */
+int MTC_Mat4Invert(float inverse[][4], float mat[][4]);
+
+/**
+ * Make the set of mat orthonormal (mat should already be orthogonal)?
+ * (doesn't appear to normalize properly?)
+ */
+void MTC_Mat4Ortho(float mat[][4]);
+
+/**
+ * vec = mat prod vec, result in vec, ignore fourth component entirely
+ * (4th component is _not_ accessed!!! vec is 3d)
+ */
+void MTC_Mat4Mul3Vecfl(float mat[][4], float *vec);
+
+/**
+ * vec = mat prod vec, result in vec
+ */
+void MTC_Mat4MulVec4fl(float mat[][4], float *vec);
+
+/**
+ * Set <m> to the 4-D unity matrix
+ */
+void MTC_Mat4One(float m[][4]);
+
+/**
+ * Swap matrices m1 and m2
+ */
+void MTC_Mat4SwapMat4(float m1[][4], float m2[][4]);
+
+/**
+ * Copy m2 to the top-left 3x3 of m1, don't touch the remaining elements.
+ */
+void MTC_Mat4CpyMat3nc(float m1[][4], float m2[][3]);
+
+/**
+ * m1 = m2 * m3, but only the top-left 3x3
+ */
+void MTC_Mat4MulMat33(float m1[][3], float m2[][4], float m3[][3]);
+
+/* ------------------------------------------------------------------------- */
+/* Operations based on 3 by 3 matrices */
+/**
+ * Do vec^t prod mat, result in vec.(vex is 3d)
+ */
+void MTC_Mat3MulVecfl(float mat[][3], float *vec);
+
+/**
+ * Copy m1 to m2
+ */
+void MTC_Mat3CpyMat3(float m1[][3], float m2[][3]);
+
+/**
+ * m1 = m2 prod m3
+ */
+void MTC_Mat3MulMat3(float m1[][3], float m3[][3], float m2[][3]);
+
+/**
+ * vec = vec prod mat
+ */
+void MTC_Mat3MulVecd(float mat[][3], double *vec);
+
+/**
+ * Guess: invert matrix
+ * result goes to m1
+ */
+void MTC_Mat3Inv(float m1[][3], float m2[][3]);
+
+/**
+ * Sort of a determinant matrix? Doesn't seem very adjoint to me...
+ * result goes to m1
+ */
+void MTC_Mat3Adj(float m1[][3], float m[][3]);
+
+/**
+ * Set <m> to the 3D unity matrix
+ */
+void MTC_Mat3One(float m[][3]);
+
+/* ------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* MATRIXOPS_H */
+
diff --git a/source/blender/render/intern/include/pointdensity.h b/source/blender/blenlib/MTC_vectorops.h
index 93cdef3b14e..4fec93b37b9 100644
--- a/source/blender/render/intern/include/pointdensity.h
+++ b/source/blender/blenlib/MTC_vectorops.h
@@ -1,4 +1,7 @@
/*
+ * vectorops.h
+ *
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -21,24 +24,35 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): Matt Ebb
+ * Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef POINTDENSITY_H
-#define POINTDENSITY_H
+#ifndef VECTOROPS_H
+#define VECTOROPS_H
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_diff3Int(int v1[3], int v2[3], int v3[3]);
+void MTC_cross3Int(int v1[3], int v2[3], int v3[3]);
+int MTC_dot3Int(int v1[3], int v2[3]);
+void MTC_diff3Float(float v1[3], float v2[3], float v3[3]);
+void MTC_cross3Float(float v1[3], float v2[3], float v3[3]);
+float MTC_dot3Float(float v1[3], float v2[3]);
+void MTC_cp3Float(float v1[3], float v2[3]);
/**
- * Make point density kd-trees for all point density textures in the scene
+ * Copy vector with a minus sign (so a = -b)
*/
+void MTC_cp3FloatInv(float v1[3], float v2[3]);
-struct Render;
-struct TexResult;
+void MTC_swapInt(int *i1, int *i2);
-void make_pointdensities(struct Render *re);
-void free_pointdensities(struct Render *re);
-int pointdensitytex(struct Tex *tex, float *texvec, struct TexResult *texres);
+void MTC_diff3DFF(double v1[3], float v2[3], float v3[3]);
+void MTC_cross3Double(double v1[3], double v2[3], double v3[3]);
+float MTC_normalize3DF(float n[3]);
-#endif /* POINTDENSITY_H */
+/* ------------------------------------------------------------------------- */
+#endif /* VECTOROPS_H */
diff --git a/source/blender/blenlib/SConscript b/source/blender/blenlib/SConscript
index fc586de5085..3d7d6b63e64 100644
--- a/source/blender/blenlib/SConscript
+++ b/source/blender/blenlib/SConscript
@@ -16,4 +16,4 @@ if env['OURPLATFORM'] == 'linux2':
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
-env.BlenderLib ( 'bf_blenlib', sources, Split(incs), Split(defs), libtype=['core','player'], priority = [363,170], compileflags =cflags )
+env.BlenderLib ( 'bf_blenlib', sources, Split(incs), Split(defs), libtype=['core'], priority = [180], compileflags =cflags )
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index 61d9cce1a58..07e81b291f5 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -72,10 +72,10 @@ struct BVHTree
char start_axis, stop_axis; // KDOP_AXES array indices according to axis
};
-typedef struct BVHOverlapData
-{
- BVHTree *tree1, *tree2;
- BVHTreeOverlap *overlap;
+typedef struct BVHOverlapData
+{
+ BVHTree *tree1, *tree2;
+ BVHTreeOverlap *overlap;
int i, max_overlap; /* i is number of overlaps */
int start_axis, stop_axis;
} BVHOverlapData;
@@ -109,7 +109,7 @@ typedef struct BVHRayCastData
////////////////////////////////////////////////////////////////////////
// Bounding Volume Hierarchy Definition
-//
+//
// Notes: From OBB until 26-DOP --> all bounding volumes possible, just choose type below
// Notes: You have to choose the type at compile time ITM
// Notes: You can choose the tree type --> binary, quad, octree, choose below
@@ -188,10 +188,10 @@ int ADJUST_MEMORY(void *local_memblock, void **memblock, int new_size, int *max_
//////////////////////////////////////////////////////////////////////////////////////////////////////
-// Introsort
+// Introsort
// with permission deriven from the following Java code:
// http://ralphunden.net/content/tutorials/a-guide-to-introsort/
-// and he derived it from the SUN STL
+// and he derived it from the SUN STL
//////////////////////////////////////////////////////////////////////////////////////////////////////
static int size_threshold = 16;
/*
@@ -362,7 +362,7 @@ static void create_kdop_hull(BVHTree *tree, BVHNode *node, float *co, int numpoi
float newminmax;
float *bv = node->bv;
int i, k;
-
+
// don't init boudings for the moving case
if(!moving)
{
@@ -372,7 +372,7 @@ static void create_kdop_hull(BVHTree *tree, BVHNode *node, float *co, int numpoi
bv[2*i + 1] = -FLT_MAX;
}
}
-
+
for(k = 0; k < numpoints; k++)
{
// for all Axes.
@@ -394,7 +394,7 @@ static void refit_kdop_hull(BVHTree *tree, BVHNode *node, int start, int end)
int i, j;
float *bv = node->bv;
-
+
for (i = tree->start_axis; i < tree->stop_axis; i++)
{
bv[2*i] = FLT_MAX;
@@ -406,10 +406,10 @@ static void refit_kdop_hull(BVHTree *tree, BVHNode *node, int start, int end)
// for all Axes.
for (i = tree->start_axis; i < tree->stop_axis; i++)
{
- newmin = tree->nodes[j]->bv[(2 * i)];
+ newmin = tree->nodes[j]->bv[(2 * i)];
if ((newmin < bv[(2 * i)]))
bv[(2 * i)] = newmin;
-
+
newmax = tree->nodes[j]->bv[(2 * i) + 1];
if ((newmax > bv[(2 * i) + 1]))
bv[(2 * i) + 1] = newmax;
@@ -427,14 +427,14 @@ static char get_largest_axis(float *bv)
middle_point[0] = (bv[1]) - (bv[0]); // x axis
middle_point[1] = (bv[3]) - (bv[2]); // y axis
middle_point[2] = (bv[5]) - (bv[4]); // z axis
- if (middle_point[0] > middle_point[1])
+ if (middle_point[0] > middle_point[1])
{
if (middle_point[0] > middle_point[2])
return 1; // max x axis
else
return 5; // max z axis
}
- else
+ else
{
if (middle_point[1] > middle_point[2])
return 3; // max y axis
@@ -448,24 +448,24 @@ static char get_largest_axis(float *bv)
static void node_join(BVHTree *tree, BVHNode *node)
{
int i, j;
-
+
for (i = tree->start_axis; i < tree->stop_axis; i++)
{
node->bv[2*i] = FLT_MAX;
node->bv[2*i + 1] = -FLT_MAX;
}
-
+
for (i = 0; i < tree->tree_type; i++)
{
- if (node->children[i])
+ if (node->children[i])
{
for (j = tree->start_axis; j < tree->stop_axis; j++)
{
- // update minimum
- if (node->children[i]->bv[(2 * j)] < node->bv[(2 * j)])
+ // update minimum
+ if (node->children[i]->bv[(2 * j)] < node->bv[(2 * j)])
node->bv[(2 * j)] = node->children[i]->bv[(2 * j)];
-
- // update maximum
+
+ // update maximum
if (node->children[i]->bv[(2 * j) + 1] > node->bv[(2 * j) + 1])
node->bv[(2 * j) + 1] = node->children[i]->bv[(2 * j) + 1];
}
@@ -518,7 +518,7 @@ static void bvhtree_info(BVHTree *tree)
static void verify_tree(BVHTree *tree)
{
int i, j, check = 0;
-
+
// check the pointer list
for(i = 0; i < tree->totleaf; i++)
{
@@ -538,7 +538,7 @@ static void verify_tree(BVHTree *tree)
check = 0;
}
}
-
+
// check the leaf list
for(i = 0; i < tree->totleaf; i++)
{
@@ -558,7 +558,7 @@ static void verify_tree(BVHTree *tree)
check = 0;
}
}
-
+
printf("branches: %d, leafs: %d, total: %d\n", tree->totbranch, tree->totleaf, tree->totbranch + tree->totleaf);
}
#endif
@@ -703,7 +703,7 @@ static void non_recursive_bvh_div_nodes(BVHTree *tree, BVHNode *branches_array,
BVHBuildHelper data;
int depth;
-
+
// set parent from root node to NULL
BVHNode *tmp = branches_array+0;
tmp->parent = NULL;
@@ -722,7 +722,7 @@ static void non_recursive_bvh_div_nodes(BVHTree *tree, BVHNode *branches_array,
}
branches_array--; //Implicit trees use 1-based indexs
-
+
build_implicit_tree_helper(tree, &data);
//Loop tree levels (log N) loops
@@ -806,11 +806,11 @@ BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
{
BVHTree *tree;
int numnodes, i;
-
+
// theres not support for trees below binary-trees :P
if(tree_type < 2)
return NULL;
-
+
if(tree_type > MAX_TREETYPE)
return NULL;
@@ -820,13 +820,13 @@ BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
//so that tangent rays can still hit a bounding volume..
//this bug would show up when casting a ray aligned with a kdop-axis and with an edge of 2 faces
epsilon = MAX2(FLT_EPSILON, epsilon);
-
+
if(tree)
{
tree->epsilon = epsilon;
- tree->tree_type = tree_type;
+ tree->tree_type = tree_type;
tree->axis = axis;
-
+
if(axis == 26)
{
tree->start_axis = 0;
@@ -863,13 +863,13 @@ BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
numnodes = maxsize + implicit_needed_branches(tree_type, maxsize) + tree_type;
tree->nodes = (BVHNode **)MEM_callocN(sizeof(BVHNode *)*numnodes, "BVHNodes");
-
+
if(!tree->nodes)
{
MEM_freeN(tree);
return NULL;
}
-
+
tree->nodebv = (float*)MEM_callocN(sizeof(float)* axis * numnodes, "BVHNodeBV");
if(!tree->nodebv)
{
@@ -886,7 +886,7 @@ BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
}
tree->nodearray = (BVHNode *)MEM_callocN(sizeof(BVHNode)* numnodes, "BVHNodeArray");
-
+
if(!tree->nodearray)
{
MEM_freeN(tree->nodechild);
@@ -902,14 +902,14 @@ BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
tree->nodearray[i].bv = tree->nodebv + i * axis;
tree->nodearray[i].children = tree->nodechild + i * tree_type;
}
-
+
}
return tree;
}
void BLI_bvhtree_free(BVHTree *tree)
-{
+{
if(tree)
{
MEM_freeN(tree->nodes);
@@ -946,27 +946,27 @@ int BLI_bvhtree_insert(BVHTree *tree, int index, float *co, int numpoints)
{
int i;
BVHNode *node = NULL;
-
+
// insert should only possible as long as tree->totbranch is 0
if(tree->totbranch > 0)
return 0;
-
+
if(tree->totleaf+1 >= MEM_allocN_len(tree->nodes)/sizeof(*(tree->nodes)))
return 0;
-
+
// TODO check if have enough nodes in array
-
+
node = tree->nodes[tree->totleaf] = &(tree->nodearray[tree->totleaf]);
tree->totleaf++;
-
+
create_kdop_hull(tree, node, co, numpoints, 0);
node->index= index;
-
+
// inflate the bv with some epsilon
for (i = tree->start_axis; i < tree->stop_axis; i++)
{
- node->bv[(2 * i)] -= tree->epsilon; // minimum
- node->bv[(2 * i) + 1] += tree->epsilon; // maximum
+ node->bv[(2 * i)] -= tree->epsilon; // minimum
+ node->bv[(2 * i) + 1] += tree->epsilon; // maximum
}
return 1;
@@ -978,23 +978,23 @@ int BLI_bvhtree_update_node(BVHTree *tree, int index, float *co, float *co_movin
{
int i;
BVHNode *node= NULL;
-
+
// check if index exists
if(index > tree->totleaf)
return 0;
-
+
node = tree->nodearray + index;
-
+
create_kdop_hull(tree, node, co, numpoints, 0);
-
+
if(co_moving)
create_kdop_hull(tree, node, co_moving, numpoints, 1);
-
+
// inflate the bv with some epsilon
for (i = tree->start_axis; i < tree->stop_axis; i++)
{
- node->bv[(2 * i)] -= tree->epsilon; // minimum
- node->bv[(2 * i) + 1] += tree->epsilon; // maximum
+ node->bv[(2 * i)] -= tree->epsilon; // minimum
+ node->bv[(2 * i) + 1] += tree->epsilon; // maximum
}
return 1;
@@ -1030,24 +1030,24 @@ static int tree_overlap(BVHNode *node1, BVHNode *node2, int start_axis, int stop
float *bv2 = node2->bv;
float *bv1_end = bv1 + (stop_axis<<1);
-
+
bv1 += start_axis<<1;
bv2 += start_axis<<1;
-
+
// test all axis if min + max overlap
for (; bv1 != bv1_end; bv1+=2, bv2+=2)
{
- if ((*(bv1) > *(bv2 + 1)) || (*(bv2) > *(bv1 + 1)))
+ if ((*(bv1) > *(bv2 + 1)) || (*(bv2) > *(bv1 + 1)))
return 0;
}
-
+
return 1;
}
static void traverse(BVHOverlapData *data, BVHNode *node1, BVHNode *node2)
{
int j;
-
+
if(tree_overlap(node1, node2, data->start_axis, data->stop_axis))
{
// check if node1 is a leaf
@@ -1056,17 +1056,17 @@ static void traverse(BVHOverlapData *data, BVHNode *node1, BVHNode *node2)
// check if node2 is a leaf
if(!node2->totnode)
{
-
+
if(node1 == node2)
{
return;
}
-
+
if(data->i >= data->max_overlap)
- {
+ {
// try to make alloc'ed memory bigger
data->overlap = realloc(data->overlap, sizeof(BVHTreeOverlap)*data->max_overlap*2);
-
+
if(!data->overlap)
{
printf("Out of Memory in traverse\n");
@@ -1074,7 +1074,7 @@ static void traverse(BVHOverlapData *data, BVHNode *node1, BVHNode *node2)
}
data->max_overlap *= 2;
}
-
+
// both leafs, insert overlap!
data->overlap[data->i].indexA = node1->index;
data->overlap[data->i].indexB = node2->index;
@@ -1092,7 +1092,7 @@ static void traverse(BVHOverlapData *data, BVHNode *node1, BVHNode *node2)
}
else
{
-
+
for(j = 0; j < data->tree2->tree_type; j++)
{
if(node1->children[j])
@@ -1108,21 +1108,21 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, int *result)
int j, total = 0;
BVHTreeOverlap *overlap = NULL, *to = NULL;
BVHOverlapData **data;
-
+
// check for compatibility of both trees (can't compare 14-DOP with 18-DOP)
if((tree1->axis != tree2->axis) && (tree1->axis == 14 || tree2->axis == 14) && (tree1->axis == 18 || tree2->axis == 18))
return 0;
-
+
// fast check root nodes for collision before doing big splitting + traversal
if(!tree_overlap(tree1->nodes[tree1->totleaf], tree2->nodes[tree2->totleaf], MIN2(tree1->start_axis, tree2->start_axis), MIN2(tree1->stop_axis, tree2->stop_axis)))
return 0;
data = MEM_callocN(sizeof(BVHOverlapData *)* tree1->tree_type, "BVHOverlapData_star");
-
+
for(j = 0; j < tree1->tree_type; j++)
{
data[j] = (BVHOverlapData *)MEM_callocN(sizeof(BVHOverlapData), "BVHOverlapData");
-
+
// init BVHOverlapData
data[j]->overlap = (BVHTreeOverlap *)malloc(sizeof(BVHTreeOverlap)*MAX2(tree1->totleaf, tree2->totleaf));
data[j]->tree1 = tree1;
@@ -1138,25 +1138,25 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, int *result)
{
traverse(data[j], tree1->nodes[tree1->totleaf]->children[j], tree2->nodes[tree2->totleaf]);
}
-
+
for(j = 0; j < tree1->tree_type; j++)
total += data[j]->i;
-
+
to = overlap = (BVHTreeOverlap *)MEM_callocN(sizeof(BVHTreeOverlap)*total, "BVHTreeOverlap");
-
+
for(j = 0; j < tree1->tree_type; j++)
{
memcpy(to, data[j]->overlap, data[j]->i*sizeof(BVHTreeOverlap));
to+=data[j]->i;
}
-
+
for(j = 0; j < tree1->tree_type; j++)
{
free(data[j]->overlap);
MEM_freeN(data[j]);
}
MEM_freeN(data);
-
+
(*result) = total;
return overlap;
}
@@ -1173,7 +1173,7 @@ static float squared_dist(const float *a, const float *b)
}
//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)
+static float calc_nearest_point(BVHNearestData *data, BVHNode *node, float *nearest)
{
int i;
const float *bv = node->bv;
@@ -1181,12 +1181,12 @@ static float calc_nearest_point(const float *proj, BVHNode *node, float *nearest
//nearest on AABB hull
for(i=0; i != 3; i++, bv += 2)
{
- if(bv[0] > proj[i])
+ if(bv[0] > data->proj[i])
nearest[i] = bv[0];
- else if(bv[1] < proj[i])
+ else if(bv[1] < data->proj[i])
nearest[i] = bv[1];
else
- nearest[i] = proj[i];
+ nearest[i] = data->proj[i];
}
/*
@@ -1208,7 +1208,7 @@ static float calc_nearest_point(const float *proj, BVHNode *node, float *nearest
}
}
*/
- return squared_dist(proj, nearest);
+ return squared_dist(data->co, nearest);
}
@@ -1231,7 +1231,7 @@ static void dfs_find_nearest_dfs(BVHNearestData *data, BVHNode *node)
else
{
data->nearest.index = node->index;
- data->nearest.dist = calc_nearest_point(data->proj, node, data->nearest.co);
+ data->nearest.dist = calc_nearest_point(data, node, data->nearest.co);
}
}
else
@@ -1240,12 +1240,12 @@ static void dfs_find_nearest_dfs(BVHNearestData *data, BVHNode *node)
int i;
float nearest[3];
- if(data->proj[ node->main_axis ] <= node->children[0]->bv[node->main_axis*2+1])
+ if(data->proj[ (int)node->main_axis ] <= node->children[0]->bv[(int)node->main_axis*2+1])
{
for(i=0; i != node->totnode; i++)
{
- if( calc_nearest_point(data->proj, node->children[i], nearest) >= data->nearest.dist) continue;
+ if( calc_nearest_point(data, node->children[i], nearest) >= data->nearest.dist) continue;
dfs_find_nearest_dfs(data, node->children[i]);
}
}
@@ -1253,7 +1253,7 @@ static void dfs_find_nearest_dfs(BVHNearestData *data, BVHNode *node)
{
for(i=node->totnode-1; i >= 0 ; i--)
{
- if( calc_nearest_point(data->proj, node->children[i], nearest) >= data->nearest.dist) continue;
+ if( calc_nearest_point(data, node->children[i], nearest) >= data->nearest.dist) continue;
dfs_find_nearest_dfs(data, node->children[i]);
}
}
@@ -1263,7 +1263,7 @@ static void dfs_find_nearest_dfs(BVHNearestData *data, BVHNode *node)
static void dfs_find_nearest_begin(BVHNearestData *data, BVHNode *node)
{
float nearest[3], sdist;
- sdist = calc_nearest_point(data->proj, node, nearest);
+ sdist = calc_nearest_point(data, node, nearest);
if(sdist >= data->nearest.dist) return;
dfs_find_nearest_dfs(data, node);
}
@@ -1301,7 +1301,7 @@ static void bfs_find_nearest(BVHNearestData *data, BVHNode *node)
}
current.node = node;
- current.dist = calc_nearest_point(data->proj, node, nearest);
+ current.dist = calc_nearest_point(data, node, nearest);
while(current.dist < data->nearest.dist)
{
@@ -1329,7 +1329,7 @@ static void bfs_find_nearest(BVHNearestData *data, BVHNode *node)
}
heap[heap_size].node = current.node->children[i];
- heap[heap_size].dist = calc_nearest_point(data->proj, current.node->children[i], nearest);
+ heap[heap_size].dist = calc_nearest_point(data, current.node->children[i], nearest);
if(heap[heap_size].dist >= data->nearest.dist) continue;
heap_size++;
@@ -1339,7 +1339,7 @@ static void bfs_find_nearest(BVHNearestData *data, BVHNode *node)
push_heaps++;
}
}
-
+
if(heap_size == 0) break;
current = heap[0];
@@ -1355,7 +1355,6 @@ static void bfs_find_nearest(BVHNearestData *data, BVHNode *node)
}
#endif
-
int BLI_bvhtree_find_nearest(BVHTree *tree, const float *co, BVHTreeNearest *nearest, BVHTree_NearestPointCallback callback, void *userdata)
{
int i;
@@ -1436,7 +1435,7 @@ static float ray_nearest_hit(BVHRayCastData *data, float *bv)
if(lu > low) low = lu;
if(ll < upper) upper = ll;
}
-
+
if(low > upper) return FLT_MAX;
}
}
@@ -1533,115 +1532,28 @@ float BLI_bvhtree_bb_raycast(float *bv, float *light_start, float *light_end, fl
float dist = 0.0;
data.hit.dist = FLT_MAX;
-
+
// get light direction
data.ray.direction[0] = light_end[0] - light_start[0];
data.ray.direction[1] = light_end[1] - light_start[1];
data.ray.direction[2] = light_end[2] - light_start[2];
-
+
data.ray.radius = 0.0;
-
+
data.ray.origin[0] = light_start[0];
data.ray.origin[1] = light_start[1];
data.ray.origin[2] = light_start[2];
-
+
Normalize(data.ray.direction);
VECCOPY(data.ray_dot_axis, data.ray.direction);
-
+
dist = ray_nearest_hit(&data, bv);
-
+
if(dist > 0.0)
{
VECADDFAC(pos, light_start, data.ray.direction, dist);
}
return dist;
-
-}
-
-/*
- * Range Query - as request by broken :P
- *
- * Allocs and fills an array with the indexs of node that are on the given spherical range (center, radius)
- * Returns the size of the array.
- */
-typedef struct RangeQueryData
-{
- BVHTree *tree;
- const float *center;
- float radius; //squared radius
-
- int hits;
-
- BVHTree_RangeQuery callback;
- void *userdata;
-
-
-} RangeQueryData;
-
-
-static void dfs_range_query(RangeQueryData *data, BVHNode *node)
-{
- if(node->totnode == 0)
- {
-
- //Calculate the node min-coords (if the node was a point then this is the point coordinates)
- float co[3];
- co[0] = node->bv[0];
- co[1] = node->bv[2];
- co[2] = node->bv[4];
- }
- else
- {
- int i;
- for(i=0; i != node->totnode; i++)
- {
- float nearest[3];
- float dist = calc_nearest_point(data->center, node->children[i], nearest);
- if(dist < data->radius)
- {
- //Its a leaf.. call the callback
- if(node->children[i]->totnode == 0)
- {
- data->hits++;
- data->callback( data->userdata, node->children[i]->index, dist );
- }
- else
- dfs_range_query( data, node->children[i] );
- }
- }
- }
}
-int BLI_bvhtree_range_query(BVHTree *tree, const float *co, float radius, BVHTree_RangeQuery callback, void *userdata)
-{
- BVHNode * root = tree->nodes[tree->totleaf];
-
- RangeQueryData data;
- data.tree = tree;
- data.center = co;
- data.radius = radius*radius;
- data.hits = 0;
-
- data.callback = callback;
- data.userdata = userdata;
-
- if(root != NULL)
- {
- float nearest[3];
- float dist = calc_nearest_point(data.center, root, nearest);
- if(dist < data.radius)
- {
- //Its a leaf.. call the callback
- if(root->totnode == 0)
- {
- data.hits++;
- data.callback( data.userdata, root->index, dist );
- }
- else
- dfs_range_query( &data, root );
- }
- }
-
- return data.hits;
-}
diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c
index 96056ba7783..a26e333e095 100644
--- a/source/blender/blenlib/intern/arithb.c
+++ b/source/blender/blenlib/intern/arithb.c
@@ -1408,6 +1408,22 @@ void RotationBetweenVectorsToQuat(float *q, float v1[3], float v2[3])
AxisAngleToQuat(q, axis, angle);
}
+void AxisAngleToQuat(float *q, float *axis, float angle)
+{
+ float nor[3];
+ float si;
+
+ VecCopyf(nor, axis);
+ Normalize(nor);
+
+ angle /= 2;
+ si = (float)sin(angle);
+ q[0] = (float)cos(angle);
+ q[1] = nor[0] * si;
+ q[2] = nor[1] * si;
+ q[3] = nor[2] * si;
+}
+
void vectoquat(float *vec, short axis, short upflag, float *q)
{
float q2[4], nor[3], *fp, mat[3][3], angle, si, co, x2, y2, z2, len1;
@@ -1594,7 +1610,7 @@ void VecUpMat3(float *vec, float mat[][3], short axis)
}
/* A & M Watt, Advanced animation and rendering techniques, 1992 ACM press */
-void QuatInterpolW(float *, float *, float *, float ); // XXX why this?
+void QuatInterpolW(float *, float *, float *, float );
void QuatInterpolW(float *result, float *quat1, float *quat2, float t)
{
@@ -2160,13 +2176,6 @@ void VecSubf(float *v, float *v1, float *v2)
v[2]= v1[2]- v2[2];
}
-void VecMulVecf(float *v, float *v1, float *v2)
-{
- v[0] = v1[0] * v2[0];
- v[1] = v1[1] * v2[1];
- v[2] = v1[2] * v2[2];
-}
-
void VecLerpf(float *target, float *a, float *b, float t)
{
float s = 1.0f-t;
@@ -2791,241 +2800,6 @@ void MeanValueWeights(float v[][3], int n, float *co, float *w)
/* ************ EULER *************** */
-/* Euler Rotation Order Code:
- * was adapted from
- ANSI C code from the article
- "Euler Angle Conversion"
- by Ken Shoemake, shoemake@graphics.cis.upenn.edu
- in "Graphics Gems IV", Academic Press, 1994
- * for use in Blender
- */
-
-/* Type for rotation order info - see wiki for derivation details */
-typedef struct RotOrderInfo {
- short i; /* first axis index */
- short j; /* second axis index */
- short k; /* third axis index */
- short parity; /* parity of axis permuation (even=0, odd=1) - 'n' in original code */
-} RotOrderInfo;
-
-/* Array of info for Rotation Order calculations
- * WARNING: must be kept in same order as eEulerRotationOrders
- */
-static RotOrderInfo rotOrders[]= {
- /* i, j, k, n */
- {0, 1, 2, 0}, // XYZ
- {0, 2, 1, 1}, // XZY
- {1, 0, 2, 1}, // YXZ
- {1, 2, 0, 0}, // YZX
- {2, 0, 1, 0}, // ZXY
- {2, 1, 0, 1} // ZYZ
-};
-
-/* Get relevant pointer to rotation order set from the array
- * NOTE: since we start at 1 for the values, but arrays index from 0,
- * there is -1 factor involved in this process...
- */
-#define GET_ROTATIONORDER_INFO(order) (((order)>=1) ? &rotOrders[(order)-1] : &rotOrders[0])
-
-/* Construct quaternion from Euler angles (in radians). */
-void EulOToQuat(float e[3], short order, float q[4])
-{
- RotOrderInfo *R= GET_ROTATIONORDER_INFO(order);
- short i=R->i, j=R->j, k=R->k;
- double ti, tj, th, ci, cj, ch, si, sj, sh, cc, cs, sc, ss;
- double a[3];
-
- ti = e[i]/2; tj = e[j]/2; th = e[k]/2;
-
- if (R->parity) e[j] = -e[j];
-
- ci = cos(ti); cj = cos(tj); ch = cos(th);
- si = sin(ti); sj = sin(tj); sh = sin(th);
-
- cc = ci*ch; cs = ci*sh;
- sc = si*ch; ss = si*sh;
-
- a[i] = cj*sc - sj*cs;
- a[j] = cj*ss + sj*cc;
- a[k] = cj*cs - sj*sc;
-
- q[0] = cj*cc + sj*ss;
- q[1] = a[0];
- q[2] = a[1];
- q[3] = a[2];
-
- if (R->parity) q[j] = -q[j];
-}
-
-/* Convert quaternion to Euler angles (in radians). */
-void QuatToEulO(float q[4], float e[3], short order)
-{
- float M[3][3];
-
- QuatToMat3(q, M);
- Mat3ToEulO(M, e, order);
-}
-
-/* Construct 3x3 matrix from Euler angles (in radians). */
-void EulOToMat3(float e[3], short order, float M[3][3])
-{
- RotOrderInfo *R= GET_ROTATIONORDER_INFO(order);
- short i=R->i, j=R->j, k=R->k;
- double ti, tj, th, ci, cj, ch, si, sj, sh, cc, cs, sc, ss;
-
- if (R->parity) {
- ti = -e[i]; tj = -e[j]; th = -e[k];
- }
- else {
- ti = e[i]; tj = e[j]; th = e[k];
- }
-
- ci = cos(ti); cj = cos(tj); ch = cos(th);
- si = sin(ti); sj = sin(tj); sh = sin(th);
-
- cc = ci*ch; cs = ci*sh;
- sc = si*ch; ss = si*sh;
-
- M[i][i] = cj*ch; M[j][i] = sj*sc-cs; M[k][i] = sj*cc+ss;
- M[i][j] = cj*sh; M[j][j] = sj*ss+cc; M[k][j] = sj*cs-sc;
- M[i][k] = -sj; M[j][k] = cj*si; M[k][k] = cj*ci;
-}
-
-/* Construct 4x4 matrix from Euler angles (in radians). */
-void EulOToMat4(float e[3], short order, float M[4][4])
-{
- float m[3][3];
-
- /* for now, we'll just do this the slow way (i.e. copying matrices) */
- Mat3Ortho(m);
- EulOToMat3(e, order, m);
- Mat4CpyMat3(M, m);
-}
-
-/* Convert 3x3 matrix to Euler angles (in radians). */
-void Mat3ToEulO(float M[3][3], float e[3], short order)
-{
- RotOrderInfo *R= GET_ROTATIONORDER_INFO(order);
- short i=R->i, j=R->j, k=R->k;
- double cy = sqrt(M[i][i]*M[i][i] + M[i][j]*M[i][j]);
-
- if (cy > 16*FLT_EPSILON) {
- e[i] = atan2(M[j][k], M[k][k]);
- e[j] = atan2(-M[i][k], cy);
- e[k] = atan2(M[i][j], M[i][i]);
- }
- else {
- e[i] = atan2(-M[k][j], M[j][j]);
- e[j] = atan2(-M[i][k], cy);
- e[k] = 0;
- }
-
- if (R->parity) {
- e[0] = -e[0];
- e[1] = -e[1];
- e[2] = -e[2];
- }
-}
-
-/* Convert 4x4 matrix to Euler angles (in radians). */
-void Mat4ToEulO(float M[4][4], float e[3], short order)
-{
- float m[3][3];
-
- /* for now, we'll just do this the slow way (i.e. copying matrices) */
- Mat3CpyMat4(m, M);
- Mat3Ortho(m);
- Mat3ToEulO(m, e, order);
-}
-
-/* returns two euler calculation methods, so we can pick the best */
-static void mat3_to_eulo2(float M[3][3], float *e1, float *e2, short order)
-{
- RotOrderInfo *R= GET_ROTATIONORDER_INFO(order);
- short i=R->i, j=R->j, k=R->k;
- float m[3][3];
- double cy;
-
- /* process the matrix first */
- Mat3CpyMat3(m, M);
- Mat3Ortho(m);
-
- cy= sqrt(m[i][i]*m[i][i] + m[i][j]*m[i][j]);
-
- if (cy > 16*FLT_EPSILON) {
- e1[i] = atan2(m[j][k], m[k][k]);
- e1[j] = atan2(-m[i][k], cy);
- e1[k] = atan2(m[i][j], m[i][i]);
-
- e2[i] = atan2(-m[j][k], -m[k][k]);
- e2[j] = atan2(-m[i][k], -cy);
- e2[k] = atan2(-m[i][j], -m[i][i]);
- }
- else {
- e1[i] = atan2(-m[k][j], m[j][j]);
- e1[j] = atan2(-m[i][k], cy);
- e1[k] = 0;
-
- VecCopyf(e2, e1);
- }
-
- if (R->parity) {
- e1[0] = -e1[0];
- e1[1] = -e1[1];
- e1[2] = -e1[2];
-
- e2[0] = -e2[0];
- e2[1] = -e2[1];
- e2[2] = -e2[2];
- }
-}
-
-/* uses 2 methods to retrieve eulers, and picks the closest */
-void Mat3ToCompatibleEulO(float mat[3][3], float eul[3], float oldrot[3], short order)
-{
- float eul1[3], eul2[3];
- float d1, d2;
-
- mat3_to_eulo2(mat, eul1, eul2, order);
-
- compatible_eul(eul1, oldrot);
- compatible_eul(eul2, oldrot);
-
- d1= (float)fabs(eul1[0]-oldrot[0]) + (float)fabs(eul1[1]-oldrot[1]) + (float)fabs(eul1[2]-oldrot[2]);
- d2= (float)fabs(eul2[0]-oldrot[0]) + (float)fabs(eul2[1]-oldrot[1]) + (float)fabs(eul2[2]-oldrot[2]);
-
- /* return best, which is just the one with lowest difference */
- if (d1 > d2)
- VecCopyf(eul, eul2);
- else
- VecCopyf(eul, eul1);
-}
-
-/* rotate the given euler by the given angle on the specified axis */
-// NOTE: is this safe to do with different axis orders?
-void eulerO_rot(float beul[3], float ang, char axis, short order)
-{
- float eul[3], mat1[3][3], mat2[3][3], totmat[3][3];
-
- eul[0]= eul[1]= eul[2]= 0.0f;
- if (axis=='x')
- eul[0]= ang;
- else if (axis=='y')
- eul[1]= ang;
- else
- eul[2]= ang;
-
- EulOToMat3(eul, order, mat1);
- EulOToMat3(beul, order, mat2);
-
- Mat3MulMat3(totmat, mat2, mat1);
-
- Mat3ToEulO(totmat, beul, order);
-}
-
-/* ************ EULER (old XYZ) *************** */
-
-/* XYZ order */
void EulToMat3( float *eul, float mat[][3])
{
double ci, cj, ch, si, sj, sh, cc, cs, sc, ss;
@@ -3053,7 +2827,6 @@ void EulToMat3( float *eul, float mat[][3])
}
-/* XYZ order */
void EulToMat4( float *eul,float mat[][4])
{
double ci, cj, ch, si, sj, sh, cc, cs, sc, ss;
@@ -3085,7 +2858,6 @@ void EulToMat4( float *eul,float mat[][4])
}
/* returns two euler calculation methods, so we can pick the best */
-/* XYZ order */
static void mat3_to_eul2(float tmat[][3], float *eul1, float *eul2)
{
float cy, quat[4], mat[3][3];
@@ -3116,7 +2888,6 @@ static void mat3_to_eul2(float tmat[][3], float *eul1, float *eul2)
}
}
-/* XYZ order */
void Mat3ToEul(float tmat[][3], float *eul)
{
float eul1[3], eul2[3];
@@ -3132,7 +2903,6 @@ void Mat3ToEul(float tmat[][3], float *eul)
}
}
-/* XYZ order */
void Mat4ToEul(float tmat[][4], float *eul)
{
float tempMat[3][3];
@@ -3142,7 +2912,6 @@ void Mat4ToEul(float tmat[][4], float *eul)
Mat3ToEul(tempMat, eul);
}
-/* XYZ order */
void QuatToEul(float *quat, float *eul)
{
float mat[3][3];
@@ -3151,7 +2920,7 @@ void QuatToEul(float *quat, float *eul)
Mat3ToEul(mat, eul);
}
-/* XYZ order */
+
void EulToQuat(float *eul, float *quat)
{
float ti, tj, th, ci, cj, ch, si, sj, sh, cc, cs, sc, ss;
@@ -3167,155 +2936,6 @@ void EulToQuat(float *eul, float *quat)
quat[3] = cj*cs - sj*sc;
}
-/* XYZ order */
-void euler_rot(float *beul, float ang, char axis)
-{
- float eul[3], mat1[3][3], mat2[3][3], totmat[3][3];
-
- eul[0]= eul[1]= eul[2]= 0.0f;
- if(axis=='x') eul[0]= ang;
- else if(axis=='y') eul[1]= ang;
- else eul[2]= ang;
-
- EulToMat3(eul, mat1);
- EulToMat3(beul, mat2);
-
- Mat3MulMat3(totmat, mat2, mat1);
-
- Mat3ToEul(totmat, beul);
-
-}
-
-/* exported to transform.c */
-/* order independent! */
-void compatible_eul(float *eul, float *oldrot)
-{
- float dx, dy, dz;
-
- /* correct differences of about 360 degrees first */
- dx= eul[0] - oldrot[0];
- dy= eul[1] - oldrot[1];
- dz= eul[2] - oldrot[2];
-
- while(fabs(dx) > 5.1) {
- if(dx > 0.0f) eul[0] -= 2.0f*(float)M_PI; else eul[0]+= 2.0f*(float)M_PI;
- dx= eul[0] - oldrot[0];
- }
- while(fabs(dy) > 5.1) {
- if(dy > 0.0f) eul[1] -= 2.0f*(float)M_PI; else eul[1]+= 2.0f*(float)M_PI;
- dy= eul[1] - oldrot[1];
- }
- while(fabs(dz) > 5.1) {
- if(dz > 0.0f) eul[2] -= 2.0f*(float)M_PI; else eul[2]+= 2.0f*(float)M_PI;
- dz= eul[2] - oldrot[2];
- }
-
- /* is 1 of the axis rotations larger than 180 degrees and the other small? NO ELSE IF!! */
- if( fabs(dx) > 3.2 && fabs(dy)<1.6 && fabs(dz)<1.6 ) {
- if(dx > 0.0) eul[0] -= 2.0f*(float)M_PI; else eul[0]+= 2.0f*(float)M_PI;
- }
- if( fabs(dy) > 3.2 && fabs(dz)<1.6 && fabs(dx)<1.6 ) {
- if(dy > 0.0) eul[1] -= 2.0f*(float)M_PI; else eul[1]+= 2.0f*(float)M_PI;
- }
- if( fabs(dz) > 3.2 && fabs(dx)<1.6 && fabs(dy)<1.6 ) {
- if(dz > 0.0) eul[2] -= 2.0f*(float)M_PI; else eul[2]+= 2.0f*(float)M_PI;
- }
-
- /* the method below was there from ancient days... but why! probably because the code sucks :)
- */
-#if 0
- /* calc again */
- dx= eul[0] - oldrot[0];
- dy= eul[1] - oldrot[1];
- dz= eul[2] - oldrot[2];
-
- /* special case, tested for x-z */
-
- if( (fabs(dx) > 3.1 && fabs(dz) > 1.5 ) || ( fabs(dx) > 1.5 && fabs(dz) > 3.1 ) ) {
- if(dx > 0.0) eul[0] -= M_PI; else eul[0]+= M_PI;
- if(eul[1] > 0.0) eul[1]= M_PI - eul[1]; else eul[1]= -M_PI - eul[1];
- if(dz > 0.0) eul[2] -= M_PI; else eul[2]+= M_PI;
-
- }
- else if( (fabs(dx) > 3.1 && fabs(dy) > 1.5 ) || ( fabs(dx) > 1.5 && fabs(dy) > 3.1 ) ) {
- if(dx > 0.0) eul[0] -= M_PI; else eul[0]+= M_PI;
- if(dy > 0.0) eul[1] -= M_PI; else eul[1]+= M_PI;
- if(eul[2] > 0.0) eul[2]= M_PI - eul[2]; else eul[2]= -M_PI - eul[2];
- }
- else if( (fabs(dy) > 3.1 && fabs(dz) > 1.5 ) || ( fabs(dy) > 1.5 && fabs(dz) > 3.1 ) ) {
- if(eul[0] > 0.0) eul[0]= M_PI - eul[0]; else eul[0]= -M_PI - eul[0];
- if(dy > 0.0) eul[1] -= M_PI; else eul[1]+= M_PI;
- if(dz > 0.0) eul[2] -= M_PI; else eul[2]+= M_PI;
- }
-#endif
-}
-
-/* uses 2 methods to retrieve eulers, and picks the closest */
-/* XYZ order */
-void Mat3ToCompatibleEul(float mat[][3], float *eul, float *oldrot)
-{
- float eul1[3], eul2[3];
- float d1, d2;
-
- mat3_to_eul2(mat, eul1, eul2);
-
- compatible_eul(eul1, oldrot);
- compatible_eul(eul2, oldrot);
-
- d1= (float)fabs(eul1[0]-oldrot[0]) + (float)fabs(eul1[1]-oldrot[1]) + (float)fabs(eul1[2]-oldrot[2]);
- d2= (float)fabs(eul2[0]-oldrot[0]) + (float)fabs(eul2[1]-oldrot[1]) + (float)fabs(eul2[2]-oldrot[2]);
-
- /* return best, which is just the one with lowest difference */
- if( d1 > d2) {
- VecCopyf(eul, eul2);
- }
- else {
- VecCopyf(eul, eul1);
- }
-
-}
-
-/* ************ AXIS ANGLE *************** */
-
-/* Axis angle to Quaternions */
-void AxisAngleToQuat(float *q, float *axis, float angle)
-{
- float nor[3];
- float si;
-
- VecCopyf(nor, axis);
- Normalize(nor);
-
- angle /= 2;
- si = (float)sin(angle);
- q[0] = (float)cos(angle);
- q[1] = nor[0] * si;
- q[2] = nor[1] * si;
- q[3] = nor[2] * si;
-}
-
-/* Quaternions to Axis Angle */
-void QuatToAxisAngle(float q[4], float axis[3], float *angle)
-{
- float ha, si;
-
- /* calculate angle/2, and sin(angle/2) */
- ha= (float)acos(q[0]);
- si= (float)sin(ha);
-
- /* from half-angle to angle */
- *angle= ha * 2;
-
- /* prevent division by zero for axis conversion */
- if (fabs(si) < 0.0005)
- si= 1.0f;
-
- axis[0]= q[1] / si;
- axis[1]= q[2] / si;
- axis[2]= q[3] / si;
-}
-
-/* axis angle to 3x3 matrix */
void VecRotToMat3(float *vec, float phi, float mat[][3])
{
/* rotation of phi radials around vec */
@@ -3342,7 +2962,6 @@ void VecRotToMat3(float *vec, float phi, float mat[][3])
}
-/* axis angle to 4x4 matrix */
void VecRotToMat4(float *vec, float phi, float mat[][4])
{
float tmat[3][3];
@@ -3352,7 +2971,6 @@ void VecRotToMat4(float *vec, float phi, float mat[][4])
Mat4CpyMat3(mat, tmat);
}
-/* axis angle to quaternion */
void VecRotToQuat(float *vec, float phi, float *quat)
{
/* rotation of phi radials around vec */
@@ -3374,41 +2992,6 @@ void VecRotToQuat(float *vec, float phi, float *quat)
}
}
-/* Returns a vector bisecting the angle at v2 formed by v1, v2 and v3 */
-void VecBisect3(float *out, float *v1, float *v2, float *v3)
-{
- float d_12[3], d_23[3];
- VecSubf(d_12, v2, v1);
- VecSubf(d_23, v3, v2);
- Normalize(d_12);
- Normalize(d_23);
- VecAddf(out, d_12, d_23);
- Normalize(out);
-}
-
-/* Returns a reflection vector from a vector and a normal vector
-reflect = vec - ((2 * DotVecs(vec, mirror)) * mirror)
-*/
-void VecReflect(float *out, float *v1, float *v2)
-{
- float vec[3], normal[3];
- float reflect[3] = {0.0f, 0.0f, 0.0f};
- float dot2;
-
- VecCopyf(vec, v1);
- VecCopyf(normal, v2);
-
- Normalize(normal);
-
- dot2 = 2 * Inpf(vec, normal);
-
- reflect[0] = vec[0] - (dot2 * normal[0]);
- reflect[1] = vec[1] - (dot2 * normal[1]);
- reflect[2] = vec[2] - (dot2 * normal[2]);
-
- VecCopyf(out, reflect);
-}
-
/* Return the angle in degrees between vecs 1-2 and 2-3 in degrees
If v1 is a shoulder, v2 is the elbow and v3 is the hand,
this would return the angle at the elbow */
@@ -3484,6 +3067,111 @@ float NormalizedVecAngle2_2D(float *v1, float *v2)
return 2.0f*(float)saasin(Vec2Lenf(v2, v1)/2.0f);
}
+void euler_rot(float *beul, float ang, char axis)
+{
+ float eul[3], mat1[3][3], mat2[3][3], totmat[3][3];
+
+ eul[0]= eul[1]= eul[2]= 0.0f;
+ if(axis=='x') eul[0]= ang;
+ else if(axis=='y') eul[1]= ang;
+ else eul[2]= ang;
+
+ EulToMat3(eul, mat1);
+ EulToMat3(beul, mat2);
+
+ Mat3MulMat3(totmat, mat2, mat1);
+
+ Mat3ToEul(totmat, beul);
+
+}
+
+/* exported to transform.c */
+void compatible_eul(float *eul, float *oldrot)
+{
+ float dx, dy, dz;
+
+ /* correct differences of about 360 degrees first */
+ dx= eul[0] - oldrot[0];
+ dy= eul[1] - oldrot[1];
+ dz= eul[2] - oldrot[2];
+
+ while(fabs(dx) > 5.1) {
+ if(dx > 0.0f) eul[0] -= 2.0f*(float)M_PI; else eul[0]+= 2.0f*(float)M_PI;
+ dx= eul[0] - oldrot[0];
+ }
+ while(fabs(dy) > 5.1) {
+ if(dy > 0.0f) eul[1] -= 2.0f*(float)M_PI; else eul[1]+= 2.0f*(float)M_PI;
+ dy= eul[1] - oldrot[1];
+ }
+ while(fabs(dz) > 5.1) {
+ if(dz > 0.0f) eul[2] -= 2.0f*(float)M_PI; else eul[2]+= 2.0f*(float)M_PI;
+ dz= eul[2] - oldrot[2];
+ }
+
+ /* is 1 of the axis rotations larger than 180 degrees and the other small? NO ELSE IF!! */
+ if( fabs(dx) > 3.2 && fabs(dy)<1.6 && fabs(dz)<1.6 ) {
+ if(dx > 0.0) eul[0] -= 2.0f*(float)M_PI; else eul[0]+= 2.0f*(float)M_PI;
+ }
+ if( fabs(dy) > 3.2 && fabs(dz)<1.6 && fabs(dx)<1.6 ) {
+ if(dy > 0.0) eul[1] -= 2.0f*(float)M_PI; else eul[1]+= 2.0f*(float)M_PI;
+ }
+ if( fabs(dz) > 3.2 && fabs(dx)<1.6 && fabs(dy)<1.6 ) {
+ if(dz > 0.0) eul[2] -= 2.0f*(float)M_PI; else eul[2]+= 2.0f*(float)M_PI;
+ }
+
+ /* the method below was there from ancient days... but why! probably because the code sucks :)
+ */
+#if 0
+ /* calc again */
+ dx= eul[0] - oldrot[0];
+ dy= eul[1] - oldrot[1];
+ dz= eul[2] - oldrot[2];
+
+ /* special case, tested for x-z */
+
+ if( (fabs(dx) > 3.1 && fabs(dz) > 1.5 ) || ( fabs(dx) > 1.5 && fabs(dz) > 3.1 ) ) {
+ if(dx > 0.0) eul[0] -= M_PI; else eul[0]+= M_PI;
+ if(eul[1] > 0.0) eul[1]= M_PI - eul[1]; else eul[1]= -M_PI - eul[1];
+ if(dz > 0.0) eul[2] -= M_PI; else eul[2]+= M_PI;
+
+ }
+ else if( (fabs(dx) > 3.1 && fabs(dy) > 1.5 ) || ( fabs(dx) > 1.5 && fabs(dy) > 3.1 ) ) {
+ if(dx > 0.0) eul[0] -= M_PI; else eul[0]+= M_PI;
+ if(dy > 0.0) eul[1] -= M_PI; else eul[1]+= M_PI;
+ if(eul[2] > 0.0) eul[2]= M_PI - eul[2]; else eul[2]= -M_PI - eul[2];
+ }
+ else if( (fabs(dy) > 3.1 && fabs(dz) > 1.5 ) || ( fabs(dy) > 1.5 && fabs(dz) > 3.1 ) ) {
+ if(eul[0] > 0.0) eul[0]= M_PI - eul[0]; else eul[0]= -M_PI - eul[0];
+ if(dy > 0.0) eul[1] -= M_PI; else eul[1]+= M_PI;
+ if(dz > 0.0) eul[2] -= M_PI; else eul[2]+= M_PI;
+ }
+#endif
+}
+
+/* uses 2 methods to retrieve eulers, and picks the closest */
+void Mat3ToCompatibleEul(float mat[][3], float *eul, float *oldrot)
+{
+ float eul1[3], eul2[3];
+ float d1, d2;
+
+ mat3_to_eul2(mat, eul1, eul2);
+
+ compatible_eul(eul1, oldrot);
+ compatible_eul(eul2, oldrot);
+
+ d1= (float)fabs(eul1[0]-oldrot[0]) + (float)fabs(eul1[1]-oldrot[1]) + (float)fabs(eul1[2]-oldrot[2]);
+ d2= (float)fabs(eul2[0]-oldrot[0]) + (float)fabs(eul2[1]-oldrot[1]) + (float)fabs(eul2[2]-oldrot[2]);
+
+ /* return best, which is just the one with lowest difference */
+ if( d1 > d2) {
+ VecCopyf(eul, eul2);
+ }
+ else {
+ VecCopyf(eul, eul1);
+ }
+
+}
+
/* ******************************************** */
void SizeToMat3( float *size, float mat[][3])
@@ -5006,8 +4694,7 @@ float PdistVL3Dfl(float *v1, float *v2, float *v3)
/* make a 4x4 matrix out of 3 transform components */
/* matrices are made in the order: scale * rot * loc */
-// TODO: need to have a version that allows for rotation order...
-void LocEulSizeToMat4(float mat[4][4], float loc[3], float eul[3], float size[3])
+void LocEulSizeToMat4(float mat[][4], float loc[3], float eul[3], float size[3])
{
float rmat[3][3], smat[3][3], tmat[3][3];
@@ -5030,31 +4717,7 @@ void LocEulSizeToMat4(float mat[4][4], float loc[3], float eul[3], float size[3]
/* make a 4x4 matrix out of 3 transform components */
/* matrices are made in the order: scale * rot * loc */
-void LocEulOSizeToMat4(float mat[4][4], float loc[3], float eul[3], float size[3], short rotOrder)
-{
- float rmat[3][3], smat[3][3], tmat[3][3];
-
- /* initialise new matrix */
- Mat4One(mat);
-
- /* make rotation + scaling part */
- EulOToMat3(eul, rotOrder, rmat);
- SizeToMat3(size, smat);
- Mat3MulMat3(tmat, rmat, smat);
-
- /* copy rot/scale part to output matrix*/
- Mat4CpyMat3(mat, tmat);
-
- /* copy location to matrix */
- mat[3][0] = loc[0];
- mat[3][1] = loc[1];
- mat[3][2] = loc[2];
-}
-
-
-/* make a 4x4 matrix out of 3 transform components */
-/* matrices are made in the order: scale * rot * loc */
-void LocQuatSizeToMat4(float mat[4][4], float loc[3], float quat[4], float size[3])
+void LocQuatSizeToMat4(float mat[][4], float loc[3], float quat[4], float size[3])
{
float rmat[3][3], smat[3][3], tmat[3][3];
@@ -5075,8 +4738,6 @@ void LocQuatSizeToMat4(float mat[4][4], float loc[3], float quat[4], float size[
mat[3][2] = loc[2];
}
-/********************************************************/
-
/* Tangents */
/* For normal map tangents we need to detect uv boundaries, and only average
diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c
index cadf8d2bdd1..6c89afe7173 100644
--- a/source/blender/blenlib/intern/bpath.c
+++ b/source/blender/blenlib/intern/bpath.c
@@ -26,24 +26,6 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* path/file handeling stuff */
-#ifndef WIN32
- #include <dirent.h>
- #include <unistd.h>
-#else
- #include <io.h>
- #include "BLI_winstuff.h"
-#endif
-
#include "MEM_guardedalloc.h"
#include "DNA_ID.h" /* Library */
@@ -71,7 +53,23 @@
//XXX define below from BSE_sequence.h - otherwise potentially odd behaviour
#define SEQ_HAS_PATH(seq) (seq->type==SEQ_MOVIE || seq->type==SEQ_IMAGE)
+/* path/file handeling stuff */
+#ifndef WIN32
+ #include <dirent.h>
+ #include <unistd.h>
+#else
+ #include "BLI_winstuff.h"
+ #include <io.h>
+#endif
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <string.h>
#define FILE_MAX 240
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index e7dc9b0eb1f..0228032df01 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -31,29 +31,27 @@
#include <stdio.h>
#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#include <errno.h>
-
#include "zlib.h"
#ifdef WIN32
-#include <io.h>
#include "BLI_winstuff.h"
+#include <io.h>
#else
#include <unistd.h> // for read close
#include <sys/param.h>
#endif
-
#include "BLI_blenlib.h"
#include "BLI_storage.h"
#include "BLI_fileops.h"
#include "BLI_callbacks.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
#include "BKE_utildefines.h"
+#include <errno.h>
#include "BLO_sys_types.h" // for intptr_t support
diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c
index 985700efda1..bde4b561f26 100644
--- a/source/blender/blenlib/intern/freetypefont.c
+++ b/source/blender/blenlib/intern/freetypefont.c
@@ -146,10 +146,9 @@ void freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData *vfd)
bezt = (BezTriple*)MEM_callocN((onpoints[j])* sizeof(BezTriple),"objfnt_bezt") ;
BLI_addtail(&che->nurbsbase, nu);
- nu->type= CU_BEZIER;
+ nu->type= CU_BEZIER+CU_2D;
nu->pntsu = onpoints[j];
nu->resolu= 8;
- nu->flag= CU_2D;
nu->flagu= CU_CYCLIC;
nu->bezt = bezt;
diff --git a/source/blender/blenlib/intern/matrixops.c b/source/blender/blenlib/intern/matrixops.c
new file mode 100644
index 00000000000..0f9fc65f016
--- /dev/null
+++ b/source/blender/blenlib/intern/matrixops.c
@@ -0,0 +1,438 @@
+/*
+ *
+ * Some matrix operations.
+ *
+ * Always use
+ * - vector with x components : float x[3], int x[3], etc
+ *
+ * $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 *****
+ */
+
+/* ------------------------------------------------------------------------- */
+#include <string.h>
+#include "MTC_matrixops.h"
+#include "MTC_vectorops.h"
+/* ------------------------------------------------------------------------- */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#if defined(__sun__) || defined( __sun ) || defined (__sparc) || defined (__sparc__)
+#include <strings.h>
+#endif
+
+#define ABS(x) ((x) < 0 ? -(x) : (x))
+#define SWAP(type, a, b) { type sw_ap; sw_ap=(a); (a)=(b); (b)=sw_ap; }
+
+void MTC_Mat4CpyMat4(float m1[][4], float m2[][4])
+{
+ memcpy(m1, m2, 4*4*sizeof(float));
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_Mat4MulSerie(float answ[][4],
+ float m1[][4], float m2[][4], float m3[][4],
+ float m4[][4], float m5[][4], float m6[][4],
+ float m7[][4], float m8[][4])
+{
+ float temp[4][4];
+
+ if(m1==0 || m2==0) return;
+
+ MTC_Mat4MulMat4(answ, m2, m1);
+ if(m3) {
+ MTC_Mat4MulMat4(temp, m3, answ);
+ if(m4) {
+ MTC_Mat4MulMat4(answ, m4, temp);
+ if(m5) {
+ MTC_Mat4MulMat4(temp, m5, answ);
+ if(m6) {
+ MTC_Mat4MulMat4(answ, m6, temp);
+ if(m7) {
+ MTC_Mat4MulMat4(temp, m7, answ);
+ if(m8) {
+ MTC_Mat4MulMat4(answ, m8, temp);
+ }
+ else MTC_Mat4CpyMat4(answ, temp);
+ }
+ }
+ else MTC_Mat4CpyMat4(answ, temp);
+ }
+ }
+ else MTC_Mat4CpyMat4(answ, temp);
+ }
+}
+
+/* ------------------------------------------------------------------------- */
+void MTC_Mat4MulMat4(float m1[][4], float m2[][4], float m3[][4])
+{
+ /* matrix product: c[j][k] = a[j][i].b[i][k] */
+
+ m1[0][0] = m2[0][0]*m3[0][0] + m2[0][1]*m3[1][0] + m2[0][2]*m3[2][0] + m2[0][3]*m3[3][0];
+ m1[0][1] = m2[0][0]*m3[0][1] + m2[0][1]*m3[1][1] + m2[0][2]*m3[2][1] + m2[0][3]*m3[3][1];
+ m1[0][2] = m2[0][0]*m3[0][2] + m2[0][1]*m3[1][2] + m2[0][2]*m3[2][2] + m2[0][3]*m3[3][2];
+ m1[0][3] = m2[0][0]*m3[0][3] + m2[0][1]*m3[1][3] + m2[0][2]*m3[2][3] + m2[0][3]*m3[3][3];
+
+ m1[1][0] = m2[1][0]*m3[0][0] + m2[1][1]*m3[1][0] + m2[1][2]*m3[2][0] + m2[1][3]*m3[3][0];
+ m1[1][1] = m2[1][0]*m3[0][1] + m2[1][1]*m3[1][1] + m2[1][2]*m3[2][1] + m2[1][3]*m3[3][1];
+ m1[1][2] = m2[1][0]*m3[0][2] + m2[1][1]*m3[1][2] + m2[1][2]*m3[2][2] + m2[1][3]*m3[3][2];
+ m1[1][3] = m2[1][0]*m3[0][3] + m2[1][1]*m3[1][3] + m2[1][2]*m3[2][3] + m2[1][3]*m3[3][3];
+
+ m1[2][0] = m2[2][0]*m3[0][0] + m2[2][1]*m3[1][0] + m2[2][2]*m3[2][0] + m2[2][3]*m3[3][0];
+ m1[2][1] = m2[2][0]*m3[0][1] + m2[2][1]*m3[1][1] + m2[2][2]*m3[2][1] + m2[2][3]*m3[3][1];
+ m1[2][2] = m2[2][0]*m3[0][2] + m2[2][1]*m3[1][2] + m2[2][2]*m3[2][2] + m2[2][3]*m3[3][2];
+ m1[2][3] = m2[2][0]*m3[0][3] + m2[2][1]*m3[1][3] + m2[2][2]*m3[2][3] + m2[2][3]*m3[3][3];
+
+ m1[3][0] = m2[3][0]*m3[0][0] + m2[3][1]*m3[1][0] + m2[3][2]*m3[2][0] + m2[3][3]*m3[3][0];
+ m1[3][1] = m2[3][0]*m3[0][1] + m2[3][1]*m3[1][1] + m2[3][2]*m3[2][1] + m2[3][3]*m3[3][1];
+ m1[3][2] = m2[3][0]*m3[0][2] + m2[3][1]*m3[1][2] + m2[3][2]*m3[2][2] + m2[3][3]*m3[3][2];
+ m1[3][3] = m2[3][0]*m3[0][3] + m2[3][1]*m3[1][3] + m2[3][2]*m3[2][3] + m2[3][3]*m3[3][3];
+
+}
+/* ------------------------------------------------------------------------- */
+
+void MTC_Mat4MulVecfl(float mat[][4], float *vec)
+{
+ float x,y;
+
+ x=vec[0];
+ y=vec[1];
+ vec[0]=x*mat[0][0] + y*mat[1][0] + mat[2][0]*vec[2] + mat[3][0];
+ vec[1]=x*mat[0][1] + y*mat[1][1] + mat[2][1]*vec[2] + mat[3][1];
+ vec[2]=x*mat[0][2] + y*mat[1][2] + mat[2][2]*vec[2] + mat[3][2];
+}
+
+/* ------------------------------------------------------------------------- */
+void MTC_Mat3MulVecfl(float mat[][3], float *vec)
+{
+ float x,y;
+
+ x=vec[0];
+ y=vec[1];
+ vec[0]= x*mat[0][0] + y*mat[1][0] + mat[2][0]*vec[2];
+ vec[1]= x*mat[0][1] + y*mat[1][1] + mat[2][1]*vec[2];
+ vec[2]= x*mat[0][2] + y*mat[1][2] + mat[2][2]*vec[2];
+}
+
+/* ------------------------------------------------------------------------- */
+
+int MTC_Mat4Invert(float inverse[][4], float mat[][4])
+{
+ int i, j, k;
+ double temp;
+ float tempmat[4][4];
+ float max;
+ int maxj;
+
+ /* Set inverse to identity */
+ for (i=0; i<4; i++)
+ for (j=0; j<4; j++)
+ inverse[i][j] = 0;
+ for (i=0; i<4; i++)
+ inverse[i][i] = 1;
+
+ /* Copy original matrix so we don't mess it up */
+ for(i = 0; i < 4; i++)
+ for(j = 0; j <4; j++)
+ tempmat[i][j] = mat[i][j];
+
+ for(i = 0; i < 4; i++) {
+ /* Look for row with max pivot */
+ max = ABS(tempmat[i][i]);
+ maxj = i;
+ for(j = i + 1; j < 4; j++) {
+ if(ABS(tempmat[j][i]) > max) {
+ max = ABS(tempmat[j][i]);
+ maxj = j;
+ }
+ }
+ /* Swap rows if necessary */
+ if (maxj != i) {
+ for( k = 0; k < 4; k++) {
+ SWAP(float, tempmat[i][k], tempmat[maxj][k]);
+ SWAP(float, inverse[i][k], inverse[maxj][k]);
+ }
+ }
+
+ temp = tempmat[i][i];
+ if (temp == 0)
+ return 0; /* No non-zero pivot */
+ for(k = 0; k < 4; k++) {
+ tempmat[i][k] /= temp;
+ inverse[i][k] /= temp;
+ }
+ for(j = 0; j < 4; j++) {
+ if(j != i) {
+ temp = tempmat[j][i];
+ for(k = 0; k < 4; k++) {
+ tempmat[j][k] -= tempmat[i][k]*temp;
+ inverse[j][k] -= inverse[i][k]*temp;
+ }
+ }
+ }
+ }
+ return 1;
+}
+
+/* ------------------------------------------------------------------------- */
+void MTC_Mat3CpyMat4(float m1[][3], float m2[][4])
+{
+
+ m1[0][0]= m2[0][0];
+ m1[0][1]= m2[0][1];
+ m1[0][2]= m2[0][2];
+
+ m1[1][0]= m2[1][0];
+ m1[1][1]= m2[1][1];
+ m1[1][2]= m2[1][2];
+
+ m1[2][0]= m2[2][0];
+ m1[2][1]= m2[2][1];
+ m1[2][2]= m2[2][2];
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_Mat3CpyMat3(float m1[][3], float m2[][3])
+{
+ memcpy(m1, m2, 3*3*sizeof(float));
+}
+
+/* ------------------------------------------------------------------------- */
+/* void Mat3MulMat3(float m1[][3], float m3[][3], float m2[][3]) */
+void MTC_Mat3MulMat3(float m1[][3], float m3[][3], float m2[][3])
+{
+ /* be careful about this rewrite... */
+ /* m1[i][j] = m2[i][k]*m3[k][j], args are flipped! */
+ m1[0][0]= m2[0][0]*m3[0][0] + m2[0][1]*m3[1][0] + m2[0][2]*m3[2][0];
+ m1[0][1]= m2[0][0]*m3[0][1] + m2[0][1]*m3[1][1] + m2[0][2]*m3[2][1];
+ m1[0][2]= m2[0][0]*m3[0][2] + m2[0][1]*m3[1][2] + m2[0][2]*m3[2][2];
+
+ m1[1][0]= m2[1][0]*m3[0][0] + m2[1][1]*m3[1][0] + m2[1][2]*m3[2][0];
+ m1[1][1]= m2[1][0]*m3[0][1] + m2[1][1]*m3[1][1] + m2[1][2]*m3[2][1];
+ m1[1][2]= m2[1][0]*m3[0][2] + m2[1][1]*m3[1][2] + m2[1][2]*m3[2][2];
+
+ m1[2][0]= m2[2][0]*m3[0][0] + m2[2][1]*m3[1][0] + m2[2][2]*m3[2][0];
+ m1[2][1]= m2[2][0]*m3[0][1] + m2[2][1]*m3[1][1] + m2[2][2]*m3[2][1];
+ m1[2][2]= m2[2][0]*m3[0][2] + m2[2][1]*m3[1][2] + m2[2][2]*m3[2][2];
+
+/* m1[0]= m2[0]*m3[0] + m2[1]*m3[3] + m2[2]*m3[6]; */
+/* m1[1]= m2[0]*m3[1] + m2[1]*m3[4] + m2[2]*m3[7]; */
+/* m1[2]= m2[0]*m3[2] + m2[1]*m3[5] + m2[2]*m3[8]; */
+/* m1+=3; */
+/* m2+=3; */
+/* m1[0]= m2[0]*m3[0] + m2[1]*m3[3] + m2[2]*m3[6]; */
+/* m1[1]= m2[0]*m3[1] + m2[1]*m3[4] + m2[2]*m3[7]; */
+/* m1[2]= m2[0]*m3[2] + m2[1]*m3[5] + m2[2]*m3[8]; */
+/* m1+=3; */
+/* m2+=3; */
+/* m1[0]= m2[0]*m3[0] + m2[1]*m3[3] + m2[2]*m3[6]; */
+/* m1[1]= m2[0]*m3[1] + m2[1]*m3[4] + m2[2]*m3[7]; */
+/* m1[2]= m2[0]*m3[2] + m2[1]*m3[5] + m2[2]*m3[8]; */
+} /* end of void Mat3MulMat3(float m1[][3], float m3[][3], float m2[][3]) */
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_Mat4Ortho(float mat[][4])
+{
+ float len;
+
+ len= MTC_normalize3DF(mat[0]);
+ if(len!=0.0) mat[0][3]/= len;
+ len= MTC_normalize3DF(mat[1]);
+ if(len!=0.0) mat[1][3]/= len;
+ len= MTC_normalize3DF(mat[2]);
+ if(len!=0.0) mat[2][3]/= len;
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_Mat4Mul3Vecfl(float mat[][4], float *vec)
+{
+ float x,y;
+ /* vec = mat^T dot vec !!! or vec a row, then vec = vec dot mat*/
+
+ x= vec[0];
+ y= vec[1];
+ vec[0]= x*mat[0][0] + y*mat[1][0] + mat[2][0]*vec[2];
+ vec[1]= x*mat[0][1] + y*mat[1][1] + mat[2][1]*vec[2];
+ vec[2]= x*mat[0][2] + y*mat[1][2] + mat[2][2]*vec[2];
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_Mat4One(float m[][4])
+{
+
+ m[0][0]= m[1][1]= m[2][2]= m[3][3]= 1.0;
+ m[0][1]= m[0][2]= m[0][3]= 0.0;
+ m[1][0]= m[1][2]= m[1][3]= 0.0;
+ m[2][0]= m[2][1]= m[2][3]= 0.0;
+ m[3][0]= m[3][1]= m[3][2]= 0.0;
+}
+
+
+/* ------------------------------------------------------------------------- */
+/* Result is a 3-vector!*/
+void MTC_Mat3MulVecd(float mat[][3], double *vec)
+{
+ double x,y;
+
+ /* vec = mat^T dot vec !!! or vec a row, then vec = vec dot mat*/
+ x=vec[0];
+ y=vec[1];
+ vec[0]= x * mat[0][0] + y * mat[1][0] + mat[2][0] * vec[2];
+ vec[1]= x * mat[0][1] + y * mat[1][1] + mat[2][1] * vec[2];
+ vec[2]= x * mat[0][2] + y * mat[1][2] + mat[2][2] * vec[2];
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_Mat3Inv(float m1[][3], float m2[][3])
+{
+ short a,b;
+ float det;
+
+ /* first adjoint */
+ MTC_Mat3Adj(m1,m2);
+
+ /* then determinant old mat! */
+ det= m2[0][0]* (m2[1][1]*m2[2][2] - m2[1][2]*m2[2][1])
+ -m2[1][0]* (m2[0][1]*m2[2][2] - m2[0][2]*m2[2][1])
+ +m2[2][0]* (m2[0][1]*m2[1][2] - m2[0][2]*m2[1][1]);
+
+ if(det==0) det=1;
+ det= 1/det;
+ for(a=0;a<3;a++) {
+ for(b=0;b<3;b++) {
+ m1[a][b]*=det;
+ }
+ }
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_Mat3Adj(float m1[][3], float m[][3])
+{
+ m1[0][0]=m[1][1]*m[2][2]-m[1][2]*m[2][1];
+ m1[0][1]= -m[0][1]*m[2][2]+m[0][2]*m[2][1];
+ m1[0][2]=m[0][1]*m[1][2]-m[0][2]*m[1][1];
+
+ m1[1][0]= -m[1][0]*m[2][2]+m[1][2]*m[2][0];
+ m1[1][1]=m[0][0]*m[2][2]-m[0][2]*m[2][0];
+ m1[1][2]= -m[0][0]*m[1][2]+m[0][2]*m[1][0];
+
+ m1[2][0]=m[1][0]*m[2][1]-m[1][1]*m[2][0];
+ m1[2][1]= -m[0][0]*m[2][1]+m[0][1]*m[2][0];
+ m1[2][2]=m[0][0]*m[1][1]-m[0][1]*m[1][0];
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_Mat3One(float m[][3])
+{
+
+ m[0][0]= m[1][1]= m[2][2]= 1.0;
+ m[0][1]= m[0][2]= 0.0;
+ m[1][0]= m[1][2]= 0.0;
+ m[2][0]= m[2][1]= 0.0;
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_Mat4SwapMat4(float m1[][4], float m2[][4])
+{
+ float t;
+ int i, j;
+
+ for(i = 0; i < 4; i++) {
+ for (j = 0; j < 4; j++) {
+ t = m1[i][j];
+ m1[i][j] = m2[i][j];
+ m2[i][j] = t;
+ }
+ }
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_Mat4MulVec4fl(float mat[][4], float *vec)
+{
+ float x,y,z;
+
+ x = vec[0];
+ y = vec[1];
+ z = vec[2];
+ vec[0] = x*mat[0][0] + y*mat[1][0] + z*mat[2][0] + mat[3][0]*vec[3];
+ vec[1] = x*mat[0][1] + y*mat[1][1] + z*mat[2][1] + mat[3][1]*vec[3];
+ vec[2] = x*mat[0][2] + y*mat[1][2] + z*mat[2][2] + mat[3][2]*vec[3];
+ vec[3] = x*mat[0][3] + y*mat[1][3] + z*mat[2][3] + mat[3][3]*vec[3];
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_Mat4CpyMat3nc(float m1[][4], float m2[][3]) /* no clear */
+{
+ m1[0][0]= m2[0][0];
+ m1[0][1]= m2[0][1];
+ m1[0][2]= m2[0][2];
+
+ m1[1][0]= m2[1][0];
+ m1[1][1]= m2[1][1];
+ m1[1][2]= m2[1][2];
+
+ m1[2][0]= m2[2][0];
+ m1[2][1]= m2[2][1];
+ m1[2][2]= m2[2][2];
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_Mat4MulMat33(float m1[][3], float m2[][4], float m3[][3])
+{
+ /* m1_i_j = m2_i_k * m3_k_j ? */
+
+ m1[0][0] = m2[0][0]*m3[0][0] + m2[0][1]*m3[1][0] + m2[0][2]*m3[2][0];
+ m1[0][1] = m2[0][0]*m3[0][1] + m2[0][1]*m3[1][1] + m2[0][2]*m3[2][1];
+ m1[0][2] = m2[0][0]*m3[0][2] + m2[0][1]*m3[1][2] + m2[0][2]*m3[2][2];
+
+ m1[1][0] = m2[1][0]*m3[0][0] + m2[1][1]*m3[1][0] + m2[1][2]*m3[2][0];
+ m1[1][1] = m2[1][0]*m3[0][1] + m2[1][1]*m3[1][1] + m2[1][2]*m3[2][1];
+ m1[1][2] = m2[1][0]*m3[0][2] + m2[1][1]*m3[1][2] + m2[1][2]*m3[2][2];
+
+ m1[2][0] = m2[2][0]*m3[0][0] + m2[2][1]*m3[1][0] + m2[2][2]*m3[2][0];
+ m1[2][1] = m2[2][0]*m3[0][1] + m2[2][1]*m3[1][1] + m2[2][2]*m3[2][1];
+ m1[2][2] = m2[2][0]*m3[0][2] + m2[2][1]*m3[1][2] + m2[2][2]*m3[2][2];
+
+}
+
+/* ------------------------------------------------------------------------- */
+
+/* eof */
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index cdc5cec705f..e6e37c58805 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -33,6 +33,13 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef WIN32
+#include "BLI_winstuff.h"
+#include <sys/types.h>
+#include <io.h>
+#include <direct.h>
+#endif
+
#ifndef WIN32
#include <dirent.h>
#endif
@@ -63,6 +70,9 @@
#include <fcntl.h>
+#if !defined(WIN32)
+#include <sys/mtio.h> /* tape comando's */
+#endif
#include <string.h> /* strcpy etc.. */
#ifndef WIN32
@@ -75,14 +85,6 @@
#include <malloc.h>
#endif
-#ifdef WIN32
-#include <sys/types.h>
-#include <io.h>
-#include <direct.h>
-#include "BLI_winstuff.h"
-#endif
-
-
/* lib includes */
#include "MEM_guardedalloc.h"
diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c
index ed3e07b7f7e..2812f17d58f 100644
--- a/source/blender/blenlib/intern/threads.c
+++ b/source/blender/blenlib/intern/threads.c
@@ -142,10 +142,10 @@ void BLI_init_threads(ListBase *threadbase, void *(*do_thread)(void *), int tot)
tslot->do_thread= do_thread;
tslot->avail= 1;
}
-
- MEM_set_lock_callback(BLI_lock_malloc_thread, BLI_unlock_malloc_thread);
- thread_levels++;
}
+
+ MEM_set_lock_callback(BLI_lock_malloc_thread, BLI_unlock_malloc_thread);
+ thread_levels++;
}
/* amount of available threads */
@@ -235,21 +235,18 @@ void BLI_end_threads(ListBase *threadbase)
{
ThreadSlot *tslot;
- /* only needed if there's actually some stuff to end
- * this way we don't end up decrementing thread_levels on an empty threadbase
- * */
- if (threadbase && threadbase->first != NULL) {
+ if (threadbase) {
for(tslot= threadbase->first; tslot; tslot= tslot->next) {
if(tslot->avail==0) {
pthread_join(tslot->pthread, NULL);
}
}
BLI_freelistN(threadbase);
-
- thread_levels--;
- if(thread_levels==0)
- MEM_set_lock_callback(NULL, NULL);
}
+
+ thread_levels--;
+ if(thread_levels==0)
+ MEM_set_lock_callback(NULL, NULL);
}
void BLI_lock_thread(int type)
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c
index c7bb7a54457..3c441a81d6b 100644
--- a/source/blender/blenlib/intern/util.c
+++ b/source/blender/blenlib/intern/util.c
@@ -54,8 +54,6 @@
#include "BKE_utildefines.h"
-
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -77,6 +75,11 @@
#include "BLI_winstuff.h"
+/* for duplicate_defgroup */
+#if !(defined vsnprintf)
+#define vsnprintf _vsnprintf
+#endif
+
#endif
diff --git a/source/blender/blenlib/intern/vectorops.c b/source/blender/blenlib/intern/vectorops.c
new file mode 100644
index 00000000000..3bff5235cfd
--- /dev/null
+++ b/source/blender/blenlib/intern/vectorops.c
@@ -0,0 +1,166 @@
+/*
+ *
+ * Some vector operations.
+ *
+ * Always use
+ * - vector with x components : float x[3], int x[3], etc
+ *
+ * $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 *****
+ */
+
+/* ------------------------------------------------------------------------- */
+/* General format: op(a, b, c): a = b op c */
+/* Copying is done cp <from, to> */
+/* ------------------------------------------------------------------------- */
+
+#include "MTC_vectorops.h"
+#include <math.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+void MTC_diff3Int(int v1[3], int v2[3], int v3[3])
+{
+ v1[0] = v2[0] - v3[0];
+ v1[1] = v2[1] - v3[1];
+ v1[2] = v2[2] - v3[2];
+}
+
+/* ------------------------------------------------------------------------- */
+void MTC_diff3Float(float v1[3], float v2[3], float v3[3])
+{
+ v1[0] = v2[0] - v3[0];
+ v1[1] = v2[1] - v3[1];
+ v1[2] = v2[2] - v3[2];
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_cross3Int(int v1[3], int v2[3], int v3[3])
+{
+ v1[0] = v2[1]*v3[2] - v2[2]*v3[1];
+ v1[1] = v2[2]*v3[0] - v2[0]*v3[2];
+ v1[2] = v2[0]*v3[1] - v2[1]*v3[0];
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_cross3Float(float v1[3], float v2[3], float v3[3])
+{
+ v1[0] = v2[1]*v3[2] - v2[2]*v3[1];
+ v1[1] = v2[2]*v3[0] - v2[0]*v3[2];
+ v1[2] = v2[0]*v3[1] - v2[1]*v3[0];
+}
+/* ------------------------------------------------------------------------- */
+
+void MTC_cross3Double(double v1[3], double v2[3], double v3[3])
+{
+ v1[0] = v2[1]*v3[2] - v2[2]*v3[1];
+ v1[1] = v2[2]*v3[0] - v2[0]*v3[2];
+ v1[2] = v2[0]*v3[1] - v2[1]*v3[0];
+}
+
+/* ------------------------------------------------------------------------- */
+
+int MTC_dot3Int(int v1[3], int v2[3])
+{
+ return (v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2]);
+}
+
+/* ------------------------------------------------------------------------- */
+
+float MTC_dot3Float(float v1[3], float v2[3])
+{
+ return (v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2]);
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_cp3Float(float v1[3], float v2[3])
+{
+ v2[0] = v1[0];
+ v2[1] = v1[1];
+ v2[2] = v1[2];
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_cp3FloatInv(float v1[3], float v2[3])
+{
+ v2[0] = -v1[0];
+ v2[1] = -v1[1];
+ v2[2] = -v1[2];
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_swapInt(int *i1, int *i2)
+{
+ int swap;
+ swap = *i1;
+ *i1 = *i2;
+ *i2 = swap;
+}
+
+/* ------------------------------------------------------------------------- */
+
+void MTC_diff3DFF(double v1[3], float v2[3], float v3[3])
+{
+ v1[0] = v2[0] - v3[0];
+ v1[1] = v2[1] - v3[1];
+ v1[2] = v2[2] - v3[2];
+}
+
+/* ------------------------------------------------------------------------- */
+float MTC_normalize3DF(float n[3])
+{
+ float d;
+
+ d= n[0]*n[0]+n[1]*n[1]+n[2]*n[2];
+ /* FLT_EPSILON is too large! A larger value causes normalize errors in */
+ /* a scaled down utah teapot */
+ if(d>0.0000000000001) {
+
+ /* d= sqrt(d); This _should_ be sqrt, but internally it's a double*/
+ /* anyway. This is safe. */
+ d = sqrt(d);
+
+ n[0]/=d;
+ n[1]/=d;
+ n[2]/=d;
+ } else {
+ n[0]=n[1]=n[2]= 0.0;
+ d= 0.0;
+ }
+ return d;
+}
+
+/* ------------------------------------------------------------------------- */
+
+/* eof */
diff --git a/source/blender/blenlib/intern/voxel.c b/source/blender/blenlib/intern/voxel.c
deleted file mode 100644
index 7dad854af3a..00000000000
--- a/source/blender/blenlib/intern/voxel.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/**
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 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): Matt Ebb, Raul Fernandez Hernandez (Farsthary).
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-#include <math.h>
-
-#include "BLI_voxel.h"
-
-#include "BKE_utildefines.h"
-
-
-#if defined( _MSC_VER ) && !defined( __cplusplus )
-# define inline __inline
-#endif // defined( _MSC_VER ) && !defined( __cplusplus )
-
-static inline float D(float *data, int *res, int x, int y, int z)
-{
- CLAMP(x, 0, res[0]-1);
- CLAMP(y, 0, res[1]-1);
- CLAMP(z, 0, res[2]-1);
- return data[ V_I(x, y, z, res) ];
-}
-
-/* *** nearest neighbour *** */
-/* input coordinates must be in bounding box 0.0 - 1.0 */
-float voxel_sample_nearest(float *data, int *res, float *co)
-{
- int xi, yi, zi;
-
- xi = co[0] * res[0];
- yi = co[1] * res[1];
- zi = co[2] * res[2];
-
- return D(data, res, xi, yi, zi);
-}
-
-// returns highest integer <= x as integer (slightly faster than floor())
-inline int FLOORI(float x)
-{
- const int r = (int)x;
- return ((x >= 0.f) || (float)r == x) ? r : (r - 1);
-}
-
-// clamp function, cannot use the CLAMPIS macro, it sometimes returns unwanted results apparently related to gcc optimization flag -fstrict-overflow which is enabled at -O2
-// this causes the test (x + 2) < 0 with int x == 2147483647 to return false (x being an integer, x + 2 should wrap around to -2147483647 so the test < 0 should return true, which it doesn't)
-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)
-{
- if (data) {
-
- const float xf = co[0] * res[0] - 0.5f;
- const float yf = co[1] * res[1] - 0.5f;
- const float zf = co[2] * res[2] - 0.5f;
-
- const int x = FLOORI(xf), y = FLOORI(yf), z = FLOORI(zf);
-
- const int xc[2] = {_clamp(x, 0, res[0] - 1), _clamp(x + 1, 0, res[0] - 1)};
- const int yc[2] = {res[0] * _clamp(y, 0, res[1] - 1), res[0] * _clamp(y + 1, 0, res[1] - 1)};
- const int zc[2] = {res[0] * res[1] * _clamp(z, 0, res[2] - 1), res[0] * res[1] * _clamp(z + 1, 0, res[2] - 1)};
-
- const float dx = xf - (float)x;
- const float dy = yf - (float)y;
- const float dz = zf - (float)z;
-
- const float u[2] = {1.f - dx, dx};
- const float v[2] = {1.f - dy, dy};
- const float w[2] = {1.f - dz, dz};
-
- return w[0] * ( v[0] * ( u[0] * data[xc[0] + yc[0] + zc[0]] + u[1] * data[xc[1] + yc[0] + zc[0]] )
- + v[1] * ( u[0] * data[xc[0] + yc[1] + zc[0]] + u[1] * data[xc[1] + yc[1] + zc[0]] ) )
- + w[1] * ( v[0] * ( u[0] * data[xc[0] + yc[0] + zc[1]] + u[1] * data[xc[1] + yc[0] + zc[1]] )
- + v[1] * ( u[0] * data[xc[0] + yc[1] + zc[1]] + u[1] * data[xc[1] + yc[1] + zc[1]] ) );
-
- }
- return 0.f;
-}
-
-
-float voxel_sample_triquadratic(float *data, int *res, float *co)
-{
- if (data) {
-
- const float xf = co[0] * res[0], yf = co[1] * res[1], zf = co[2] * res[2];
- const int x = FLOORI(xf), y = FLOORI(yf), z = FLOORI(zf);
-
- const int xc[3] = {_clamp(x - 1, 0, res[0] - 1), _clamp(x, 0, res[0] - 1), _clamp(x + 1, 0, res[0] - 1)};
- const int yc[3] = {res[0] * _clamp(y - 1, 0, res[1] - 1), res[0] * _clamp(y, 0, res[1] - 1), res[0] * _clamp(y + 1, 0, res[1] - 1)};
- const int zc[3] = {res[0] * res[1] * _clamp(z - 1, 0, res[2] - 1), res[0] * res[1] * _clamp(z, 0, res[2] - 1), res[0] * res[1] * _clamp(z + 1, 0, res[2] - 1)};
-
- const float dx = xf - (float)x, dy = yf - (float)y, dz = zf - (float)z;
- const float u[3] = {dx*(0.5f*dx - 1.f) + 0.5f, dx*(1.f - dx) + 0.5f, 0.5f*dx*dx};
- const float v[3] = {dy*(0.5f*dy - 1.f) + 0.5f, dy*(1.f - dy) + 0.5f, 0.5f*dy*dy};
- const float w[3] = {dz*(0.5f*dz - 1.f) + 0.5f, dz*(1.f - dz) + 0.5f, 0.5f*dz*dz};
-
- return w[0] * ( v[0] * ( u[0] * data[xc[0] + yc[0] + zc[0]] + u[1] * data[xc[1] + yc[0] + zc[0]] + u[2] * data[xc[2] + yc[0] + zc[0]] )
- + v[1] * ( u[0] * data[xc[0] + yc[1] + zc[0]] + u[1] * data[xc[1] + yc[1] + zc[0]] + u[2] * data[xc[2] + yc[1] + zc[0]] )
- + v[2] * ( u[0] * data[xc[0] + yc[2] + zc[0]] + u[1] * data[xc[1] + yc[2] + zc[0]] + u[2] * data[xc[2] + yc[2] + zc[0]] ) )
- + w[1] * ( v[0] * ( u[0] * data[xc[0] + yc[0] + zc[1]] + u[1] * data[xc[1] + yc[0] + zc[1]] + u[2] * data[xc[2] + yc[0] + zc[1]] )
- + v[1] * ( u[0] * data[xc[0] + yc[1] + zc[1]] + u[1] * data[xc[1] + yc[1] + zc[1]] + u[2] * data[xc[2] + yc[1] + zc[1]] )
- + v[2] * ( u[0] * data[xc[0] + yc[2] + zc[1]] + u[1] * data[xc[1] + yc[2] + zc[1]] + u[2] * data[xc[2] + yc[2] + zc[1]] ) )
- + w[2] * ( v[0] * ( u[0] * data[xc[0] + yc[0] + zc[2]] + u[1] * data[xc[1] + yc[0] + zc[2]] + u[2] * data[xc[2] + yc[0] + zc[2]] )
- + v[1] * ( u[0] * data[xc[0] + yc[1] + zc[2]] + u[1] * data[xc[1] + yc[1] + zc[2]] + u[2] * data[xc[2] + yc[1] + zc[2]] )
- + v[2] * ( u[0] * data[xc[0] + yc[2] + zc[2]] + u[1] * data[xc[1] + yc[2] + zc[2]] + u[2] * data[xc[2] + yc[2] + zc[2]] ) );
-
-}
- return 0.f;
-}
-
-float voxel_sample_tricubic(float *data, int *res, float *co, int bspline)
-{
- if (data) {
-
- const float xf = co[0] * res[0] - 0.5f, yf = co[1] * res[1] - 0.5f, zf = co[2] * res[2] - 0.5f;
- const int x = FLOORI(xf), y = FLOORI(yf), z = FLOORI(zf);
-
- const int xc[4] = {_clamp(x - 1, 0, res[0] - 1), _clamp(x, 0, res[0] - 1), _clamp(x + 1, 0, res[0] - 1), _clamp(x + 2, 0, res[0] - 1)};
- const int yc[4] = {res[0] * _clamp(y - 1, 0, res[1] - 1), res[0] * _clamp(y, 0, res[1] - 1), res[0] * _clamp(y + 1, 0, res[1] - 1), res[0] * _clamp(y + 2, 0, res[1] - 1)};
- const int zc[4] = {res[0] * res[1] * _clamp(z - 1, 0, res[2] - 1), res[0] * res[1] * _clamp(z, 0, res[2] - 1), res[0] * res[1] * _clamp(z + 1, 0, res[2] - 1), res[0] * res[1] * _clamp(z + 2, 0, res[2] - 1)};
-
- const float dx = xf - (float)x, dy = yf - (float)y, dz = zf - (float)z;
-
- float u[4], v[4], w[4];
- if (bspline) { // B-Spline
- u[0] = (((-1.f/6.f)*dx + 0.5f)*dx - 0.5f)*dx + (1.f/6.f);
- u[1] = (( 0.5f*dx - 1.f )*dx )*dx + (2.f/3.f);
- u[2] = (( -0.5f*dx + 0.5f)*dx + 0.5f)*dx + (1.f/6.f);
- u[3] = ( 1.f/6.f)*dx*dx*dx;
- v[0] = (((-1.f/6.f)*dy + 0.5f)*dy - 0.5f)*dy + (1.f/6.f);
- v[1] = (( 0.5f*dy - 1.f )*dy )*dy + (2.f/3.f);
- v[2] = (( -0.5f*dy + 0.5f)*dy + 0.5f)*dy + (1.f/6.f);
- v[3] = ( 1.f/6.f)*dy*dy*dy;
- w[0] = (((-1.f/6.f)*dz + 0.5f)*dz - 0.5f)*dz + (1.f/6.f);
- w[1] = (( 0.5f*dz - 1.f )*dz )*dz + (2.f/3.f);
- w[2] = (( -0.5f*dz + 0.5f)*dz + 0.5f)*dz + (1.f/6.f);
- w[3] = ( 1.f/6.f)*dz*dz*dz;
- }
- else { // Catmull-Rom
- u[0] = ((-0.5f*dx + 1.0f)*dx - 0.5f)*dx;
- u[1] = (( 1.5f*dx - 2.5f)*dx )*dx + 1.0f;
- u[2] = ((-1.5f*dx + 2.0f)*dx + 0.5f)*dx;
- u[3] = (( 0.5f*dx - 0.5f)*dx )*dx;
- v[0] = ((-0.5f*dy + 1.0f)*dy - 0.5f)*dy;
- v[1] = (( 1.5f*dy - 2.5f)*dy )*dy + 1.0f;
- v[2] = ((-1.5f*dy + 2.0f)*dy + 0.5f)*dy;
- v[3] = (( 0.5f*dy - 0.5f)*dy )*dy;
- w[0] = ((-0.5f*dz + 1.0f)*dz - 0.5f)*dz;
- w[1] = (( 1.5f*dz - 2.5f)*dz )*dz + 1.0f;
- w[2] = ((-1.5f*dz + 2.0f)*dz + 0.5f)*dz;
- w[3] = (( 0.5f*dz - 0.5f)*dz )*dz;
- }
-
- return w[0] * ( v[0] * ( u[0] * data[xc[0] + yc[0] + zc[0]] + u[1] * data[xc[1] + yc[0] + zc[0]] + u[2] * data[xc[2] + yc[0] + zc[0]] + u[3] * data[xc[3] + yc[0] + zc[0]] )
- + v[1] * ( u[0] * data[xc[0] + yc[1] + zc[0]] + u[1] * data[xc[1] + yc[1] + zc[0]] + u[2] * data[xc[2] + yc[1] + zc[0]] + u[3] * data[xc[3] + yc[1] + zc[0]] )
- + v[2] * ( u[0] * data[xc[0] + yc[2] + zc[0]] + u[1] * data[xc[1] + yc[2] + zc[0]] + u[2] * data[xc[2] + yc[2] + zc[0]] + u[3] * data[xc[3] + yc[2] + zc[0]] )
- + v[3] * ( u[0] * data[xc[0] + yc[3] + zc[0]] + u[1] * data[xc[1] + yc[3] + zc[0]] + u[2] * data[xc[2] + yc[3] + zc[0]] + u[3] * data[xc[3] + yc[3] + zc[0]] ) )
- + w[1] * ( v[0] * ( u[0] * data[xc[0] + yc[0] + zc[1]] + u[1] * data[xc[1] + yc[0] + zc[1]] + u[2] * data[xc[2] + yc[0] + zc[1]] + u[3] * data[xc[3] + yc[0] + zc[1]] )
- + v[1] * ( u[0] * data[xc[0] + yc[1] + zc[1]] + u[1] * data[xc[1] + yc[1] + zc[1]] + u[2] * data[xc[2] + yc[1] + zc[1]] + u[3] * data[xc[3] + yc[1] + zc[1]] )
- + v[2] * ( u[0] * data[xc[0] + yc[2] + zc[1]] + u[1] * data[xc[1] + yc[2] + zc[1]] + u[2] * data[xc[2] + yc[2] + zc[1]] + u[3] * data[xc[3] + yc[2] + zc[1]] )
- + v[3] * ( u[0] * data[xc[0] + yc[3] + zc[1]] + u[1] * data[xc[1] + yc[3] + zc[1]] + u[2] * data[xc[2] + yc[3] + zc[1]] + u[3] * data[xc[3] + yc[3] + zc[1]] ) )
- + w[2] * ( v[0] * ( u[0] * data[xc[0] + yc[0] + zc[2]] + u[1] * data[xc[1] + yc[0] + zc[2]] + u[2] * data[xc[2] + yc[0] + zc[2]] + u[3] * data[xc[3] + yc[0] + zc[2]] )
- + v[1] * ( u[0] * data[xc[0] + yc[1] + zc[2]] + u[1] * data[xc[1] + yc[1] + zc[2]] + u[2] * data[xc[2] + yc[1] + zc[2]] + u[3] * data[xc[3] + yc[1] + zc[2]] )
- + v[2] * ( u[0] * data[xc[0] + yc[2] + zc[2]] + u[1] * data[xc[1] + yc[2] + zc[2]] + u[2] * data[xc[2] + yc[2] + zc[2]] + u[3] * data[xc[3] + yc[2] + zc[2]] )
- + v[3] * ( u[0] * data[xc[0] + yc[3] + zc[2]] + u[1] * data[xc[1] + yc[3] + zc[2]] + u[2] * data[xc[2] + yc[3] + zc[2]] + u[3] * data[xc[3] + yc[3] + zc[2]] ) )
- + w[3] * ( v[0] * ( u[0] * data[xc[0] + yc[0] + zc[3]] + u[1] * data[xc[1] + yc[0] + zc[3]] + u[2] * data[xc[2] + yc[0] + zc[3]] + u[3] * data[xc[3] + yc[0] + zc[3]] )
- + v[1] * ( u[0] * data[xc[0] + yc[1] + zc[3]] + u[1] * data[xc[1] + yc[1] + zc[3]] + u[2] * data[xc[2] + yc[1] + zc[3]] + u[3] * data[xc[3] + yc[1] + zc[3]] )
- + v[2] * ( u[0] * data[xc[0] + yc[2] + zc[3]] + u[1] * data[xc[1] + yc[2] + zc[3]] + u[2] * data[xc[2] + yc[2] + zc[3]] + u[3] * data[xc[3] + yc[2] + zc[3]] )
- + v[3] * ( u[0] * data[xc[0] + yc[3] + zc[3]] + u[1] * data[xc[1] + yc[3] + zc[3]] + u[2] * data[xc[2] + yc[3] + zc[3]] + u[3] * data[xc[3] + yc[3] + zc[3]] ) );
-
- }
- return 0.f;
-}
diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt
index d31a85ab208..7bdffdedc05 100644
--- a/source/blender/blenloader/CMakeLists.txt
+++ b/source/blender/blenloader/CMakeLists.txt
@@ -27,11 +27,11 @@
FILE(GLOB SRC intern/*.c)
SET(INC
- . ../../../intern/guardedalloc ../blenlib ../blenkernel
- ../makesdna ../readblenfile ../include ../makesrna
- ../python ../../kernel/gen_messaging
- ../render/extern/include
- ${ZLIB_INC}
+ . ../../../intern/guardedalloc ../blenlib ../blenkernel
+ ../makesdna ../readblenfile ../include ../makesrna
+ ../python ../../kernel/gen_messaging
+ ../render/extern/include
+ ${ZLIB_INC}
)
BLENDERLIB(bf_blenloader "${SRC}" "${INC}")
diff --git a/source/blender/blenloader/SConscript b/source/blender/blenloader/SConscript
index 88d345290e5..19a89b7e604 100644
--- a/source/blender/blenloader/SConscript
+++ b/source/blender/blenloader/SConscript
@@ -11,4 +11,4 @@ incs += ' ' + env['BF_ZLIB_INC']
defs = []
-env.BlenderLib ( 'bf_blenloader', sources, Split(incs), defs, libtype=['core','player'], priority = [167,30] )
+env.BlenderLib ( 'bf_blenloader', sources, Split(incs), defs, libtype=['core','player'], priority = [135, 30] )
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index 9cd45a268da..1f276913ea8 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -67,10 +67,6 @@
#include "BLO_sys_types.h" // needed for intptr_t
-#ifdef _WIN32
-#include "BLI_winstuff.h"
-#endif
-
/**
* IDType stuff, I plan to move this
* out into its own file + prefix, and
@@ -204,7 +200,7 @@ void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp)
buf[2]= buf[2]?buf[2]:' ';
buf[3]= buf[3]?buf[3]:' ';
- fprintf(fp, "['%.4s', '%s', %d, %ld ], \n", buf, name, bhead->nr, (long int)bhead->len+sizeof(BHead));
+ fprintf(fp, "['%.4s', '%s', %d, %ld ], \n", buf, name, bhead->nr, (intptr_t)bhead->len+sizeof(BHead));
}
}
fprintf(fp, "]\n");
@@ -335,7 +331,11 @@ BlendFileData *BLO_read_from_file(char *file, ReportList *reports)
fd = blo_openblenderfile(file, reports);
if (fd) {
fd->reports= reports;
- bfd= blo_read_file_internal(fd, file);
+ bfd= blo_read_file_internal(fd);
+ if (bfd) {
+ bfd->type= BLENFILETYPE_BLEND;
+ strncpy(bfd->main->name, file, sizeof(bfd->main->name)-1);
+ }
blo_freefiledata(fd);
}
@@ -350,7 +350,11 @@ BlendFileData *BLO_read_from_memory(void *mem, int memsize, ReportList *reports)
fd = blo_openblendermemory(mem, memsize, reports);
if (fd) {
fd->reports= reports;
- bfd= blo_read_file_internal(fd, "");
+ bfd= blo_read_file_internal(fd);
+ if (bfd) {
+ bfd->type= BLENFILETYPE_BLEND;
+ strcpy(bfd->main->name, "");
+ }
blo_freefiledata(fd);
}
@@ -379,7 +383,11 @@ BlendFileData *BLO_read_from_memfile(Main *oldmain, const char *filename, MemFil
/* makes lookup of existing images in old main */
blo_make_image_pointer_map(fd, oldmain);
- bfd= blo_read_file_internal(fd, "");
+ bfd= blo_read_file_internal(fd);
+ if (bfd) {
+ bfd->type= BLENFILETYPE_BLEND;
+ strcpy(bfd->main->name, "");
+ }
/* ensures relinked images are not freed */
blo_end_image_pointer_map(fd, oldmain);
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 37031f4f82a..779a898bd6a 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -29,6 +29,11 @@
#include "zlib.h"
+#ifdef WIN32
+#include "winsock2.h"
+#include "BLI_winstuff.h"
+#endif
+
#include <limits.h>
#include <stdio.h> // for printf fopen fwrite fclose sprintf FILE
#include <stdlib.h> // for getenv atoi
@@ -41,8 +46,6 @@
#include <sys/param.h> // for MAXPATHLEN
#else
#include <io.h> // for open close read
-#include "winsock2.h"
-#include "BLI_winstuff.h"
#endif
#include "DNA_anim_types.h"
@@ -132,7 +135,6 @@
#include "BKE_multires.h"
#include "BKE_node.h" // for tree type defines
#include "BKE_object.h"
-#include "BKE_paint.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "BKE_property.h" // for get_ob_property
@@ -141,6 +143,7 @@
#include "BKE_scene.h"
#include "BKE_softbody.h" // sbNew()
#include "BKE_bullet.h" // bsbNew()
+#include "BKE_sculpt.h"
#include "BKE_sequence.h"
#include "BKE_texture.h" // for open_plugin_tex
#include "BKE_utildefines.h" // SWITCH_INT DATA ENDB DNA1 O_BINARY GLOB USER TEST REND
@@ -1370,10 +1373,12 @@ static void IDP_DirectLinkIDPArray(IDProperty *prop, int switch_endian, FileData
prop->totallen = prop->len;
prop->data.pointer = newdataadr(fd, prop->data.pointer);
- array= (IDProperty*) prop->data.pointer;
+ if (switch_endian) {
+ array= (IDProperty*) prop->data.pointer;
- for(i=0; i<prop->len; i++)
- IDP_DirectLinkProperty(&array[i], switch_endian, fd);
+ for(i=0; i<prop->len; i++)
+ IDP_DirectLinkProperty(&array[i], switch_endian, fd);
+ }
}
static void IDP_DirectLinkArray(IDProperty *prop, int switch_endian, FileData *fd)
@@ -1385,22 +1390,19 @@ static void IDP_DirectLinkArray(IDProperty *prop, int switch_endian, FileData *f
prop->totallen = prop->len;
prop->data.pointer = newdataadr(fd, prop->data.pointer);
- if(prop->subtype == IDP_GROUP) {
- test_pointer_array(fd, prop->data.pointer);
- array= prop->data.pointer;
+ if (switch_endian) {
+ if(prop->subtype == IDP_GROUP) {
+ test_pointer_array(fd, prop->data.pointer);
+ array= prop->data.pointer;
- for(i=0; i<prop->len; i++)
- IDP_DirectLinkProperty(array[i], switch_endian, fd);
- }
- else if(prop->subtype == IDP_DOUBLE) {
- if (switch_endian) {
+ for(i=0; i<prop->len; i++)
+ IDP_DirectLinkProperty(array[i], switch_endian, fd);
+ }
+ else if(prop->subtype == IDP_DOUBLE) {
for (i=0; i<prop->len; i++) {
SWITCH_LONGINT(((double*)prop->data.pointer)[i]);
}
- }
- }
- else {
- if (switch_endian) {
+ } else {
for (i=0; i<prop->len; i++) {
SWITCH_INT(((int*)prop->data.pointer)[i]);
}
@@ -2817,11 +2819,6 @@ static void lib_link_texture(FileData *fd, Main *main)
tex->ima= newlibadr_us(fd, tex->id.lib, tex->ima);
tex->ipo= newlibadr_us(fd, tex->id.lib, tex->ipo);
if(tex->env) tex->env->object= newlibadr(fd, tex->id.lib, tex->env->object);
- if(tex->pd) {
- tex->pd->object= newlibadr(fd, tex->id.lib, tex->pd->object);
- tex->pd->psys= newlibadr(fd, tex->id.lib, tex->pd->psys);
- }
- if(tex->vd) tex->vd->object= newlibadr(fd, tex->id.lib, tex->vd->object);
if(tex->nodetree)
lib_link_ntree(fd, &tex->id, tex->nodetree);
@@ -2854,16 +2851,6 @@ static void direct_link_texture(FileData *fd, Tex *tex)
memset(tex->env->cube, 0, 6*sizeof(void *));
tex->env->ok= 0;
}
- tex->pd= newdataadr(fd, tex->pd);
- if(tex->pd) {
- tex->pd->point_tree = NULL;
- tex->pd->coba= newdataadr(fd, tex->pd->coba);
- }
-
- tex->vd= newdataadr(fd, tex->vd);
- if(tex->vd) {
- tex->vd->dataset = NULL;
- }
tex->nodetree= newdataadr(fd, tex->nodetree);
if(tex->nodetree)
@@ -2960,10 +2947,8 @@ static void direct_link_pointcache(FileData *fd, PointCache *cache)
else
cache->mem_cache.first = cache->mem_cache.last = NULL;
- cache->flag &= ~PTCACHE_SIMULATION_VALID;
+ cache->flag &= ~(PTCACHE_SIMULATION_VALID|PTCACHE_BAKE_EDIT_ACTIVE);
cache->simframe= 0;
- cache->edit= NULL;
- cache->free_edit= NULL;
}
static void direct_link_pointcache_list(FileData *fd, ListBase *ptcaches, PointCache **ocache)
@@ -3052,8 +3037,11 @@ static void direct_link_particlesettings(FileData *fd, ParticleSettings *part)
static void lib_link_particlesystems(FileData *fd, Object *ob, ID *id, ListBase *particles)
{
ParticleSystem *psys, *psysnext;
+ int a;
for(psys=particles->first; psys; psys=psysnext){
+ ParticleData *pa;
+
psysnext= psys->next;
psys->part = newlibadr_us(fd, id->lib, psys->part);
@@ -3064,6 +3052,12 @@ static void lib_link_particlesystems(FileData *fd, Object *ob, ID *id, ListBase
pt->ob=newlibadr(fd, id->lib, pt->ob);
psys->target_ob = newlibadr(fd, id->lib, psys->target_ob);
+
+ for(a=0,pa=psys->particles; a<psys->totpart; a++,pa++){
+ pa->stick_ob=newlibadr(fd, id->lib, pa->stick_ob);
+ }
+
+
}
else {
/* particle modifier must be removed before particle system */
@@ -3099,7 +3093,7 @@ static void direct_link_particlesystems(FileData *fd, ListBase *particles)
psys->flag &= ~PSYS_KEYED;
}
- if(psys->particles && psys->particles->boid) {
+ if(psys->particles->boid) {
pa = psys->particles;
pa->boid = newdataadr(fd, pa->boid);
for(a=1,pa++; a<psys->totpart; a++, pa++)
@@ -3127,7 +3121,7 @@ static void direct_link_particlesystems(FileData *fd, ListBase *particles)
link_list(fd, &psys->targets);
- psys->edit = NULL;
+ psys->edit = 0;
psys->free_edit = NULL;
psys->pathcache = 0;
psys->childcache = 0;
@@ -3440,8 +3434,6 @@ static void lib_link_object(FileData *fd, Main *main)
}
for(a=0; a<ob->totcol; a++) ob->mat[a]= newlibadr_us(fd, ob->id.lib, ob->mat[a]);
- ob->gpd= newlibadr_us(fd, ob->id.lib, ob->gpd);
-
ob->id.flag -= LIB_NEEDLINK;
/* if id.us==0 a new base will be created later on */
@@ -3677,6 +3669,8 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
else if (md->type==eModifierType_Smoke) {
SmokeModifierData *smd = (SmokeModifierData*) md;
+ smd->point_cache = NULL;
+
if(smd->type==MOD_SMOKE_TYPE_DOMAIN)
{
smd->flow = NULL;
@@ -3686,13 +3680,22 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
smd->domain->fluid = NULL;
smd->domain->wt = NULL;
- smd->domain->shadow = NULL;
- smd->domain->tex = NULL;
- smd->domain->tex_shadow = NULL;
- smd->domain->tex_wt = NULL;
-
- direct_link_pointcache_list(fd, &(smd->domain->ptcaches[0]), &(smd->domain->point_cache[0]));
- direct_link_pointcache_list(fd, &(smd->domain->ptcaches[1]), &(smd->domain->point_cache[1]));
+ smd->domain->tvox = NULL;
+ smd->domain->tray = NULL;
+ smd->domain->tvoxbig = NULL;
+ smd->domain->traybig = NULL;
+ smd->domain->bind = NULL;
+ smd->domain->max_textures= 0;
+
+ // do_versions trick
+ if(smd->domain->strength < 1.0)
+ smd->domain->strength = 2.0;
+
+ // reset 3dview
+ if(smd->domain->viewsettings < MOD_SMOKE_VIEW_USEBIG)
+ smd->domain->viewsettings = 0;
+ else
+ smd->domain->viewsettings = MOD_SMOKE_VIEW_USEBIG;
}
else if(smd->type==MOD_SMOKE_TYPE_FLOW)
{
@@ -3990,7 +3993,6 @@ static void direct_link_object(FileData *fd, Object *ob)
ob->derivedDeform= NULL;
ob->derivedFinal= NULL;
ob->gpulamp.first= ob->gpulamp.last= NULL;
- link_list(fd, &ob->pc_ids);
if(ob->sculpt)
ob->sculpt= MEM_callocN(sizeof(SculptSession), "reload sculpt session");
@@ -4038,7 +4040,6 @@ static void lib_link_scene(FileData *fd, Main *main)
sce->world= newlibadr_us(fd, sce->id.lib, sce->world);
sce->set= newlibadr(fd, sce->id.lib, sce->set);
sce->ima= newlibadr_us(fd, sce->id.lib, sce->ima);
- sce->gpd= newlibadr_us(fd, sce->id.lib, sce->gpd);
link_paint(fd, sce, &sce->toolsettings->sculpt->paint);
link_paint(fd, sce, &sce->toolsettings->vpaint->paint);
@@ -4133,7 +4134,6 @@ static void direct_link_scene(FileData *fd, Scene *sce)
sce->theDag = NULL;
sce->dagisvalid = 0;
sce->obedit= NULL;
- sce->stats= 0;
memset(&sce->sound_handles, 0, sizeof(sce->sound_handles));
@@ -4346,14 +4346,11 @@ static void direct_link_windowmanager(FileData *fd, wmWindowManager *wm)
static void lib_link_windowmanager(FileData *fd, Main *main)
{
wmWindowManager *wm;
- wmWindow *win;
for(wm= main->wm.first; wm; wm= wm->id.next) {
- if(wm->id.flag & LIB_NEEDLINK) {
- for(win= wm->windows.first; win; win= win->next)
- win->screen= newlibadr(fd, NULL, win->screen);
-
- wm->id.flag -= LIB_NEEDLINK;
+ wmWindow *win;
+ for(win= wm->windows.first; win; win= win->next) {
+ win->screen= newlibadr(fd, NULL, win->screen);
}
}
}
@@ -5060,7 +5057,7 @@ static void fix_relpaths_library(const char *basepath, Main *main)
static void direct_link_sound(FileData *fd, bSound *sound)
{
- sound->handle = NULL;
+ sound->snd_sound = NULL;
sound->packedfile = direct_link_packedfile(fd, sound->packedfile);
sound->newpackedfile = direct_link_packedfile(fd, sound->newpackedfile);
@@ -5075,11 +5072,9 @@ static void lib_link_sound(FileData *fd, Main *main)
if(sound->id.flag & LIB_NEEDLINK) {
sound->id.flag -= LIB_NEEDLINK;
sound->ipo= newlibadr_us(fd, sound->id.lib, sound->ipo); // XXX depreceated - old animation system
-
- sound_load(main, sound);
+ sound->stream = 0;
- if(sound->cache)
- sound_cache(sound, 1);
+ sound_load(sound);
}
sound= sound->id.next;
}
@@ -9222,7 +9217,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
Material *ma;
Camera *cam;
Mesh *me;
- Curve *cu;
Scene *sce;
Tex *tx;
ParticleSettings *part;
@@ -9369,16 +9363,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
//BLI_freelistN(&pidlist);
}
-
- /* type was a mixed flag & enum. move the 2d flag elsewhere */
- for(cu = main->curve.first; cu; cu= cu->id.next) {
- Nurb *nu;
-
- for(nu= cu->nurb.first; nu; nu= nu->next) {
- nu->flag |= (nu->type & CU_2D);
- nu->type &= CU_TYPE;
- }
- }
}
if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 1)) {
@@ -9446,7 +9430,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
mmd->lvl = mmd->totlvl;
orig = CDDM_from_mesh(me, NULL);
- dm = multires_dm_create_from_derived(mmd, 0, orig, ob, 0, 0);
+ dm = multires_dm_create_from_derived(mmd, orig, me, 0, 0);
multires_load_old(dm, me->mr);
@@ -9508,24 +9492,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
-
- /* volume rendering settings */
- if (ma->vol.stepsize < 0.0001f) {
- ma->vol.density = 1.0f;
- ma->vol.emission = 0.0f;
- ma->vol.absorption = 1.0f;
- ma->vol.scattering = 1.0f;
- ma->vol.emission_col[0] = ma->vol.emission_col[1] = ma->vol.emission_col[2] = 1.0f;
- ma->vol.absorption_col[0] = ma->vol.absorption_col[1] = ma->vol.absorption_col[2] = 0.0f;
- ma->vol.density_scale = 1.0f;
- ma->vol.depth_cutoff = 0.01f;
- ma->vol.stepsize_type = MA_VOL_STEP_RANDOMIZED;
- ma->vol.stepsize = 0.2f;
- ma->vol.shade_stepsize = 0.2f;
- ma->vol.shade_type = MA_VOL_SHADE_SINGLE;
- ma->vol.shadeflag |= MA_VOL_PRECACHESHADING;
- ma->vol.precache_resolution = 50;
- }
}
for(sce = main->scene.first; sce; sce = sce->id.next) {
@@ -9599,7 +9565,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 2)) {
Scene *sce;
- Object *ob;
for(sce = main->scene.first; sce; sce = sce->id.next) {
if(fd->fileflags & G_FILE_ENABLE_ALL_FRAMES)
@@ -9632,11 +9597,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
sce->gm.flag |= GAME_DISPLAY_LISTS;
}
-
- for(ob = main->object.first; ob; ob = ob->id.next) {
- if(ob->flag & 8192) // OB_POSEMODE = 8192
- ob->mode |= OB_MODE_POSE;
- }
}
/* put 2.50 compatibility code here until next subversion bump */
@@ -9694,6 +9654,16 @@ static BHead *read_userdef(BlendFileData *bfd, FileData *fd, BHead *bhead)
bfd->user->uifonts.first= bfd->user->uifonts.last= NULL;
bfd->user->uistyles.first= bfd->user->uistyles.last= NULL;
+ // AUD_XXX
+ if(bfd->user->audiochannels == 0)
+ bfd->user->audiochannels = 2;
+ if(bfd->user->audiodevice == 0)
+ bfd->user->audiodevice = 1;
+ if(bfd->user->audioformat == 0)
+ bfd->user->audioformat = 0x12;
+ if(bfd->user->audiorate == 0)
+ bfd->user->audiorate = 44100;
+
bhead = blo_nextbhead(fd, bhead);
/* read all attached data */
@@ -9706,7 +9676,7 @@ static BHead *read_userdef(BlendFileData *bfd, FileData *fd, BHead *bhead)
return bhead;
}
-BlendFileData *blo_read_file_internal(FileData *fd, char *file)
+BlendFileData *blo_read_file_internal(FileData *fd)
{
BHead *bhead= blo_firstbhead(fd);
BlendFileData *bfd;
@@ -9717,9 +9687,6 @@ BlendFileData *blo_read_file_internal(FileData *fd, char *file)
bfd->main->versionfile= fd->fileversion;
- bfd->type= BLENFILETYPE_BLEND;
- strncpy(bfd->main->name, file, sizeof(bfd->main->name)-1);
-
while(bhead) {
switch(bhead->code) {
case DATA:
@@ -10424,8 +10391,6 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob)
expand_doit(fd, mainvar, ob->poselib);
expand_constraints(fd, mainvar, &ob->constraints);
- expand_doit(fd, mainvar, ob->gpd);
-
// XXX depreceated - old animation system (for version patching only)
expand_doit(fd, mainvar, ob->ipo);
expand_doit(fd, mainvar, ob->action);
@@ -10561,9 +10526,6 @@ static void expand_scene(FileData *fd, Main *mainvar, Scene *sce)
if(sce->r.dometext)
expand_doit(fd, mainvar, sce->gm.dome.warptext);
-
- if(sce->gpd)
- expand_doit(fd, mainvar, sce->gpd);
}
static void expand_camera(FileData *fd, Main *mainvar, Camera *ca)
@@ -10856,16 +10818,14 @@ static Library* library_append(Main *mainvar, Scene *scene, char* file, char *di
fix_relpaths_library(G.sce, mainvar); /* make all relative paths, relative to the open blend file */
/* give a base to loose objects. If group append, do it for objects too */
- if(scene) {
- if(idcode==ID_GR) {
- if (flag & FILE_LINK) {
- give_base_to_objects(mainvar, scene, NULL, 0);
- } else {
- give_base_to_objects(mainvar, scene, curlib, 1);
- }
- } else {
+ if(idcode==ID_GR) {
+ if (flag & FILE_LINK) {
give_base_to_objects(mainvar, scene, NULL, 0);
- }
+ } else {
+ give_base_to_objects(mainvar, scene, curlib, 1);
+ }
+ } else {
+ give_base_to_objects(mainvar, scene, NULL, 0);
}
/* has been removed... erm, why? s..ton) */
/* 20040907: looks like they are give base already in append_named_part(); -Nathan L */
@@ -11142,7 +11102,7 @@ BlendFileData *blo_read_blendafterruntime(int file, char *name, int actualsize,
return NULL;
fd->reports= reports;
- bfd= blo_read_file_internal(fd, "");
+ bfd= blo_read_file_internal(fd);
blo_freefiledata(fd);
return bfd;
diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h
index 2a0b6c327d3..e39fefa8205 100644
--- a/source/blender/blenloader/intern/readfile.h
+++ b/source/blender/blenloader/intern/readfile.h
@@ -108,7 +108,7 @@ struct Main;
void blo_join_main(ListBase *mainlist);
void blo_split_main(ListBase *mainlist, struct Main *main);
-BlendFileData *blo_read_file_internal(FileData *fd, char *file);
+BlendFileData *blo_read_file_internal(FileData *fd);
FileData *blo_openblenderfile(char *name, struct ReportList *reports);
FileData *blo_openblendermemory(void *buffer, int buffersize, struct ReportList *reports);
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 46cc62fff1c..62ec1b71938 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -72,23 +72,23 @@ Any case: direct data is ALWAYS after the lib block
#include <config.h>
#endif
-#include <math.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
#include "zlib.h"
#ifndef WIN32
#include <unistd.h>
#else
#include "winsock2.h"
+#include "BLI_winstuff.h"
#include <io.h>
#include <process.h> // for getpid
-#include "BLI_winstuff.h"
#endif
+#include <math.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_action_types.h"
@@ -653,7 +653,7 @@ static void write_particlesystems(WriteData *wd, ListBase *particles)
}
if(psys->particles->boid && psys->part->phystype == PART_PHYS_BOIDS)
- writestruct(wd, DATA, "BoidParticle", psys->totpart, psys->particles->boid);
+ writestruct(wd, DATA, "BoidData", psys->totpart, psys->particles->boid);
}
pt = psys->targets.first;
for(; pt; pt=pt->next)
@@ -1100,7 +1100,7 @@ static void write_defgroups(WriteData *wd, ListBase *defbase)
writestruct(wd, DATA, "bDeformGroup", 1, defgroup);
}
-static void write_modifiers(WriteData *wd, ListBase *modbase)
+static void write_modifiers(WriteData *wd, ListBase *modbase, int write_undo)
{
ModifierData *md;
@@ -1126,20 +1126,14 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
else if(md->type==eModifierType_Smoke) {
SmokeModifierData *smd = (SmokeModifierData*) md;
- if(smd->type & MOD_SMOKE_TYPE_DOMAIN)
+ if(smd->type==MOD_SMOKE_TYPE_DOMAIN)
writestruct(wd, DATA, "SmokeDomainSettings", 1, smd->domain);
- else if(smd->type & MOD_SMOKE_TYPE_FLOW)
+ else if(smd->type==MOD_SMOKE_TYPE_FLOW)
writestruct(wd, DATA, "SmokeFlowSettings", 1, smd->flow);
/*
- else if(smd->type & MOD_SMOKE_TYPE_COLL)
+ else if(smd->type==MOD_SMOKE_TYPE_COLL)
writestruct(wd, DATA, "SmokeCollSettings", 1, smd->coll);
*/
-
- if((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain)
- {
- write_pointcaches(wd, &(smd->domain->ptcaches[0]));
- write_pointcaches(wd, &(smd->domain->ptcaches[1]));
- }
}
else if(md->type==eModifierType_Fluidsim) {
FluidsimModifierData *fluidmd = (FluidsimModifierData*) md;
@@ -1172,13 +1166,13 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
else if (md->type==eModifierType_Multires) {
MultiresModifierData *mmd = (MultiresModifierData*) md;
- if(mmd->undo_verts)
+ if(mmd->undo_verts && write_undo)
writestruct(wd, DATA, "MVert", mmd->undo_verts_tot, mmd->undo_verts);
}
}
}
-static void write_objects(WriteData *wd, ListBase *idbase)
+static void write_objects(WriteData *wd, ListBase *idbase, int write_undo)
{
Object *ob;
@@ -1208,11 +1202,11 @@ static void write_objects(WriteData *wd, ListBase *idbase)
writestruct(wd, DATA, "PartDeflect", 1, ob->pd);
writestruct(wd, DATA, "SoftBody", 1, ob->soft);
- if(ob->soft) write_pointcaches(wd, &ob->soft->ptcaches);
+ if(ob->soft) writestruct(wd, DATA, "PointCache", 1, ob->soft->pointcache);
writestruct(wd, DATA, "BulletSoftBody", 1, ob->bsoft);
write_particlesystems(wd, &ob->particlesystem);
- write_modifiers(wd, &ob->modifiers);
+ write_modifiers(wd, &ob->modifiers, write_undo);
}
ob= ob->id.next;
}
@@ -1358,7 +1352,7 @@ static void write_curves(WriteData *wd, ListBase *idbase)
}
nu= cu->nurb.first;
while(nu) {
- if(nu->type == CU_BEZIER)
+ if( (nu->type & 7)==CU_BEZIER)
writestruct(wd, DATA, "BezTriple", nu->pntsu, nu->bezt);
else {
writestruct(wd, DATA, "BPoint", nu->pntsu*nu->pntsv, nu->bp);
@@ -1575,11 +1569,6 @@ static void write_textures(WriteData *wd, ListBase *idbase)
if(tex->type == TEX_PLUGIN && tex->plugin) writestruct(wd, DATA, "PluginTex", 1, tex->plugin);
if(tex->coba) writestruct(wd, DATA, "ColorBand", 1, tex->coba);
if(tex->type == TEX_ENVMAP && tex->env) writestruct(wd, DATA, "EnvMap", 1, tex->env);
- if(tex->type == TEX_POINTDENSITY && tex->pd) {
- writestruct(wd, DATA, "PointDensity", 1, tex->pd);
- if(tex->pd->coba) writestruct(wd, DATA, "ColorBand", 1, tex->pd->coba);
- }
- if(tex->type == TEX_VOXELDATA && tex->vd) writestruct(wd, DATA, "VoxelData", 1, tex->vd);
/* nodetree is integral part of texture, no libdata */
if(tex->nodetree) {
@@ -2331,7 +2320,7 @@ static int write_file_handle(Main *mainvar, int handle, MemFile *compare, MemFil
write_groups (wd, &mainvar->group);
write_armatures(wd, &mainvar->armature);
write_actions (wd, &mainvar->action);
- write_objects (wd, &mainvar->object);
+ write_objects (wd, &mainvar->object, (current != NULL));
write_materials(wd, &mainvar->mat);
write_textures (wd, &mainvar->tex);
write_meshs (wd, &mainvar->mesh);
diff --git a/source/blender/blenpluginapi/CMakeLists.txt b/source/blender/blenpluginapi/CMakeLists.txt
index 1c5e2697c01..856fb931e9d 100644
--- a/source/blender/blenpluginapi/CMakeLists.txt
+++ b/source/blender/blenpluginapi/CMakeLists.txt
@@ -27,12 +27,12 @@
FILE(GLOB SRC intern/*.c)
SET(INC
- . .. ../../../intern/guardedalloc ../blenlib ../imbuf ../makesdna
+ . .. ../../../intern/guardedalloc ../blenlib ../imbuf ../makesdna
)
IF(WITH_QUICKTIME)
- SET(INC ${INC} ${QUICKTIME_INC})
- ADD_DEFINITIONS(-DWITH_QUICKTIME)
+ SET(INC ${INC} ${QUICKTIME_INC})
+ ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
BLENDERLIB(bf_blenpluginapi "${SRC}" "${INC}")
diff --git a/source/blender/blenpluginapi/SConscript b/source/blender/blenpluginapi/SConscript
index af69b4519b4..776c188d73b 100644
--- a/source/blender/blenpluginapi/SConscript
+++ b/source/blender/blenpluginapi/SConscript
@@ -11,4 +11,4 @@ if env['WITH_BF_QUICKTIME']:
defs.append('WITH_QUICKTIME')
incs += ' ' + env['BF_QUICKTIME_INC']
-env.BlenderLib ( libname = 'bf_blenpluginapi', sources = sources, includes = Split(incs), defines = defs, libtype=['core'], priority = [170] )
+env.BlenderLib ( libname = 'bf_blenpluginapi', sources = sources, includes = Split(incs), defines = defs, libtype=['core', 'player'], priority = [170, 35] )
diff --git a/source/blender/editors/CMakeLists.txt b/source/blender/editors/CMakeLists.txt
index 066d42e723e..96b6fa5b7ab 100644
--- a/source/blender/editors/CMakeLists.txt
+++ b/source/blender/editors/CMakeLists.txt
@@ -27,64 +27,64 @@
FILE(GLOB SRC */*.c)
SET(INC ../windowmanager
- ../editors/include
- ../../../intern/guardedalloc ../../../intern/memutil
- ../blenlib ../makesdna ../makesrna ../blenkernel
- ../include ../imbuf ../render/extern/include
- ../../../intern/bsp/extern
- ../../../intern/decimation/extern ../blenloader ../python
- ../../kernel/gen_system ../readstreamglue
- ../../../intern/elbeem/extern
- ../../../intern/ghost ../../../intern/opennl/extern ../../../extern/glew/include ../../../intern/smoke/extern
- ../../../intern/audaspace/intern
- ../nodes
- ../gpu
- ../blenfont
+ ../editors/include
+ ../../../intern/guardedalloc ../../../intern/memutil
+ ../blenlib ../makesdna ../makesrna ../blenkernel
+ ../include ../imbuf ../render/extern/include
+ ../../../intern/bsp/extern ../radiosity/extern/include
+ ../../../intern/decimation/extern ../blenloader ../python
+ ../../kernel/gen_system ../readstreamglue
+ ../quicktime ../../../intern/elbeem/extern
+ ../../../intern/ghost ../../../intern/opennl/extern ../../../extern/glew/include ../../../intern/smoke/extern
+ ../../../intern/audaspace/intern
+ ../nodes
+ ../gpu
+ ../blenfont
)
IF(WITH_GAMEENGINE)
- ADD_DEFINITIONS(-DGAMEBLENDER)
+ ADD_DEFINITIONS(-DGAMEBLENDER)
ENDIF(WITH_GAMEENGINE)
IF(WITH_INTERNATIONAL)
- ADD_DEFINITIONS(-DINTERNATIONAL)
+ ADD_DEFINITIONS(-DINTERNATIONAL)
ENDIF(WITH_INTERNATIONAL)
IF(WITH_OPENEXR)
- ADD_DEFINITIONS(-DWITH_OPENEXR)
+ ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
IF(WITH_OPENJPEG)
- ADD_DEFINITIONS(-DWITH_OPENJPEG)
+ ADD_DEFINITIONS(-DWITH_OPENJPEG)
ENDIF(WITH_OPENJPEG)
IF(WITH_QUICKTIME)
- SET(INC ${INC} ../quicktime ${QUICKTIME_INC})
- ADD_DEFINITIONS(-DWITH_QUICKTIME)
+ SET(INC ${INC} ${QUICKTIME_INC})
+ ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
IF(WITH_FFMPEG)
- SET(INC ${INC} ${FFMPEG_INC})
- ADD_DEFINITIONS(-DWITH_FFMPEG)
+ SET(INC ${INC} ${FFMPEG_INC})
+ ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
IF(NOT WITH_ELBEEM)
- ADD_DEFINITIONS(-DDISABLE_ELBEEM)
+ ADD_DEFINITIONS(-DDISABLE_ELBEEM)
ENDIF(NOT WITH_ELBEEM)
IF(WITH_PYTHON)
- SET(INC ${INC} ${PYTHON_INC})
+ SET(INC ${INC} ${PYTHON_INC})
ELSE(WITH_PYTHON)
- ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ ADD_DEFINITIONS(-DDISABLE_PYTHON)
ENDIF(WITH_PYTHON)
IF(WIN32)
- SET(INC ${INC} ${PTHREADS_INC})
+ SET(INC ${INC} ${PTHREADS_INC})
ENDIF(WIN32)
# TODO buildinfo
IF(BF_BUILDINFO)
- ADD_DEFINITIONS(-DNAN_BUILDINFO)
+ ADD_DEFINITIONS(-DNAN_BUILDINFO)
ENDIF(BF_BUILDINFO)
BLENDERLIB_NOLIST(bf_editors "${SRC}" "${INC}")
diff --git a/source/blender/editors/Makefile b/source/blender/editors/Makefile
index 6a9d695ab0e..bbbb3fb985f 100644
--- a/source/blender/editors/Makefile
+++ b/source/blender/editors/Makefile
@@ -66,6 +66,5 @@ DIRS = armature \
space_sequencer \
space_logic \
space_userpref \
- sound
include nan_subdirs.mk
diff --git a/source/blender/editors/SConscript b/source/blender/editors/SConscript
index ccffbdb15d5..05f17dae1a1 100644
--- a/source/blender/editors/SConscript
+++ b/source/blender/editors/SConscript
@@ -15,7 +15,6 @@ SConscript(['datafiles/SConscript',
'gpencil/SConscript',
'physics/SConscript',
'preview/SConscript',
- 'sound/SConscript',
'space_buttons/SConscript',
'space_file/SConscript',
'space_image/SConscript',
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index e3418fa194f..acf7467713b 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -79,7 +79,6 @@
#include "UI_view2d.h"
#include "ED_anim_api.h"
-#include "ED_keyframing.h"
#include "ED_keyframes_edit.h" // XXX move the select modes out of there!
#include "ED_screen.h"
#include "ED_space_api.h"
@@ -1870,14 +1869,13 @@ void ANIM_channel_setting_set (bAnimContext *ac, bAnimListElem *ale, int setting
// XXX hardcoded size of icons
#define ICON_WIDTH 17
-// XXX hardcoded width of sliders
-#define SLIDER_WIDTH 70
/* Draw the given channel */
// TODO: make this use UI controls for the buttons
void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc)
{
bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
+ View2D *v2d= &ac->ar->v2d;
short selected, offset;
float y, ymid, ytext;
@@ -1972,6 +1970,26 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
offset += 3;
UI_DrawString(offset, ytext, name);
}
+
+ /* step 6) draw mute+protection toggles + (sliders) ....................... */
+ /* reset offset - now goes from RHS of panel */
+ offset = 0;
+
+ // TODO: we need a mechanism of drawing over (and hiding) stuff from here...
+ // TODO: when drawing sliders, make those draw instead of these toggles if not enough space
+
+ if (v2d) {
+ /* protect... */
+ if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT)) {
+ /* just skip - drawn as widget now */
+ offset += ICON_WIDTH;
+ }
+ /* mute... */
+ if (acf->has_setting(ac, ale, ACHANNEL_SETTING_MUTE)) {
+ /* just skip - drawn as widget now */
+ offset += ICON_WIDTH;
+ }
+ }
}
/* ------------------ */
@@ -1982,50 +2000,6 @@ static void achannel_setting_widget_cb(bContext *C, void *poin, void *poin2)
WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
}
-/* callback for widget sliders - insert keyframes */
-static void achannel_setting_slider_cb(bContext *C, void *id_poin, void *fcu_poin)
-{
- ID *id= (ID *)id_poin;
- FCurve *fcu= (FCurve *)fcu_poin;
-
- Scene *scene= CTX_data_scene(C);
- PointerRNA id_ptr, ptr;
- PropertyRNA *prop;
- short flag=0, done=0;
- float cfra;
-
- /* get current frame */
- // NOTE: this will do for now...
- cfra= (float)CFRA;
-
- /* get flags for keyframing */
- if (IS_AUTOKEY_FLAG(INSERTNEEDED))
- flag |= INSERTKEY_NEEDED;
- if (IS_AUTOKEY_FLAG(AUTOMATKEY))
- flag |= INSERTKEY_MATRIX;
- if (IS_AUTOKEY_MODE(scene, EDITKEYS))
- flag |= INSERTKEY_REPLACE;
-
-
- /* get RNA pointer, and resolve the path */
- RNA_id_pointer_create(id, &id_ptr);
-
- /* try to resolve the path stored in the F-Curve */
- if (RNA_path_resolve(&id_ptr, fcu->rna_path, &ptr, &prop)) {
- /* set the special 'replace' flag if on a keyframe */
- if (fcurve_frame_has_keyframe(fcu, cfra, 0))
- flag |= INSERTKEY_REPLACE;
-
- /* insert a keyframe for this F-Curve */
- done= insert_keyframe_direct(ptr, prop, fcu, cfra, flag);
-
- if (done)
- WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
- }
-}
-
-
-
/* Draw a widget for some setting */
static void draw_setting_widget (bAnimContext *ac, bAnimListElem *ale, bAnimChannelType *acf, uiBlock *block, int xpos, int ypos, int setting)
{
@@ -2190,75 +2164,15 @@ void ANIM_channel_draw_widgets (bAnimContext *ac, bAnimListElem *ale, uiBlock *b
// TODO: when drawing sliders, make those draw instead of these toggles if not enough space
if (v2d) {
- short draw_sliders = 0;
-
- /* check if we need to show the sliders */
- if ((ac->sa) && ELEM(ac->spacetype, SPACE_ACTION, SPACE_IPO)) {
- switch (ac->spacetype) {
- case SPACE_ACTION:
- {
- SpaceAction *saction= (SpaceAction *)ac->sa->spacedata.first;
- draw_sliders= (saction->flag & SACTION_SLIDERS);
- }
- break;
- case SPACE_IPO:
- {
- SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first;
- draw_sliders= (sipo->flag & SIPO_SLIDERS);
- }
- break;
- }
- }
-
- /* check if there's enough space for the toggles if the sliders are drawn too */
- if ( !(draw_sliders) || ((v2d->mask.xmax-v2d->mask.xmin) > ACHANNEL_BUTTON_WIDTH/2) ) {
- /* protect... */
- if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT)) {
- offset += ICON_WIDTH;
- draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax-offset, ymid, ACHANNEL_SETTING_PROTECT);
- }
- /* mute... */
- if (acf->has_setting(ac, ale, ACHANNEL_SETTING_MUTE)) {
- offset += ICON_WIDTH;
- draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax-offset, ymid, ACHANNEL_SETTING_MUTE);
- }
+ /* protect... */
+ if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT)) {
+ offset += ICON_WIDTH;
+ draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax-offset, ymid, ACHANNEL_SETTING_PROTECT);
}
-
- /* draw slider
- * - even if we can draw sliders for this view, we must also check that the channel-type supports them
- * (only only F-Curves really can support them for now)
- * - to make things easier, we use RNA-autobuts for this so that changes are reflected immediately,
- * whereever they occurred. BUT, we don't use the layout engine, otherwise we'd get wrong alignment,
- * and wouldn't be able to auto-keyframe...
- * - slider should start before the toggles (if they're visible) to keep a clean line down the side
- */
- if ((draw_sliders) && (ale->type == ANIMTYPE_FCURVE)) {
- /* adjust offset */
- offset += SLIDER_WIDTH;
-
- /* need backdrop behind sliders... */
- uiBlockSetEmboss(block, UI_EMBOSS);
-
- if (ale->id) { /* Slider using RNA Access -------------------- */
- FCurve *fcu= (FCurve *)ale->data;
- PointerRNA id_ptr, ptr;
- PropertyRNA *prop;
-
- /* get RNA pointer, and resolve the path */
- RNA_id_pointer_create(ale->id, &id_ptr);
-
- /* try to resolve the path */
- if (RNA_path_resolve(&id_ptr, fcu->rna_path, &ptr, &prop)) {
- uiBut *but;
-
- /* create the slider button, and assign relevant callback to ensure keyframes are inserted... */
- but= uiDefAutoButR(block, &ptr, prop, fcu->array_index, "", 0, (int)v2d->cur.xmax-offset, ymid, SLIDER_WIDTH, (int)ymaxc-yminc);
- uiButSetFunc(but, achannel_setting_slider_cb, ale->id, fcu);
- }
- }
- else { /* Special Slider for stuff without RNA Access ---------- */
- // TODO: only implement this case when we really need it...
- }
+ /* mute... */
+ if (acf->has_setting(ac, ale, ACHANNEL_SETTING_MUTE)) {
+ offset += ICON_WIDTH;
+ draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax-offset, ymid, ACHANNEL_SETTING_MUTE);
}
}
}
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 55fb1ccace0..37c8aeac13a 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -885,7 +885,7 @@ static int animdata_filter_gpencil (ListBase *anim_data, bScreen *sc, int filter
for (sa= sc->areabase.first; sa; sa= sa->next) {
/* try to get gp data */
// XXX need to put back grease pencil api...
- gpd= gpencil_data_get_active(sa);
+ gpd= gpencil_data_getactive(sa);
if (gpd == NULL) continue;
/* add gpd as channel too (if for drawing, and it has layers) */
diff --git a/source/blender/editors/animation/anim_intern.h b/source/blender/editors/animation/anim_intern.h
index 462ef76ea8d..e903007fbc0 100644
--- a/source/blender/editors/animation/anim_intern.h
+++ b/source/blender/editors/animation/anim_intern.h
@@ -1,42 +1,18 @@
-/**
- * $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) 2009, Blender Foundation, Joshua Leung
- * This is a new part of Blender (with some old code)
- *
- * Contributor(s): Joshua Leung
- *
- * ***** END GPL LICENSE BLOCK *****
+/* Testing code for 2.5 animation system
+ * Copyright 2009, Joshua Leung
*/
#ifndef ANIM_INTERN_H
#define ANIM_INTERN_H
+
/* KeyingSets/Keyframing Interface ------------- */
/* list of builtin KeyingSets (defined in keyingsets.c) */
extern ListBase builtin_keyingsets;
-/* for builtin keyingsets - context poll */
short keyingset_context_ok_poll(bContext *C, KeyingSet *ks);
-/* Main KeyingSet operations API call */
short modifykey_get_context_data (bContext *C, ListBase *dsources, KeyingSet *ks);
#endif // ANIM_INTERN_H
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 26edf930f0b..394cc53dda2 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -93,8 +93,9 @@ int geticon_anim_blocktype(short blocktype)
}
/* Write into "name" buffer, the name of the property (retrieved using RNA from the curve's settings)
- * WARNING: name buffer we're writing to cannot exceed 256 chars (check anim_channels_defines.c for details)
+ * WARNING: name buffer we're writing to cannot exceed 128 chars (check action_draw.c for details)
*/
+// TODO: have an extra var to indicate if prop was valid?
void getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
{
/* sanity checks */
@@ -147,7 +148,7 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
propname= (char *)RNA_property_ui_name(prop);
/* Array Index - only if applicable */
- if (RNA_property_array_length(&ptr, prop)) {
+ if (RNA_property_array_length(prop)) {
char c= RNA_property_array_item_char(prop, fcu->array_index);
/* we need to write the index to a temp buffer (in py syntax) */
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index fedbe12c0e6..ffa44e60d00 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -381,14 +381,13 @@ void ANIM_OT_time_toggle(wmOperatorType *ot)
void ED_operatortypes_anim(void)
{
- /* Animation Editors only -------------------------- */
WM_operatortype_append(ANIM_OT_change_frame);
WM_operatortype_append(ANIM_OT_time_toggle);
WM_operatortype_append(ANIM_OT_previewrange_set);
WM_operatortype_append(ANIM_OT_previewrange_clear);
- /* Entire UI --------------------------------------- */
+ // XXX this is used all over... maybe for screen instead?
WM_operatortype_append(ANIM_OT_insert_keyframe);
WM_operatortype_append(ANIM_OT_delete_keyframe);
WM_operatortype_append(ANIM_OT_insert_keyframe_menu);
@@ -400,8 +399,8 @@ void ED_operatortypes_anim(void)
WM_operatortype_append(ANIM_OT_add_driver_button);
WM_operatortype_append(ANIM_OT_remove_driver_button);
- WM_operatortype_append(ANIM_OT_add_keyingset_button);
- WM_operatortype_append(ANIM_OT_remove_keyingset_button);
+ WM_operatortype_append(ANIM_OT_keyingset_add_new);
+ WM_operatortype_append(ANIM_OT_keyingset_add_destination);
}
void ED_keymap_anim(wmWindowManager *wm)
@@ -410,10 +409,10 @@ void ED_keymap_anim(wmWindowManager *wm)
/* frame management */
/* NOTE: 'ACTIONMOUSE' not 'LEFTMOUSE', as user may have swapped mouse-buttons */
- WM_keymap_add_item(keymap, "ANIM_OT_change_frame", ACTIONMOUSE, KM_PRESS, 0, 0);
+ WM_keymap_verify_item(keymap, "ANIM_OT_change_frame", ACTIONMOUSE, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "ANIM_OT_time_toggle", TKEY, KM_PRESS, KM_CTRL, 0);
/* preview range */
- WM_keymap_verify_item(keymap, "ANIM_OT_previewrange_set", PKEY, KM_PRESS, 0, 0);
+ WM_keymap_verify_item(keymap, "ANIM_OT_previewrange_set", PKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_verify_item(keymap, "ANIM_OT_previewrange_clear", PKEY, KM_PRESS, KM_ALT, 0);
}
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 8b9224511ba..849e2d2eede 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -151,33 +151,33 @@ short ANIM_add_driver (ID *id, const char rna_path[], int array_index, short fla
/* create F-Curve with Driver */
fcu= verify_driver_fcurve(id, rna_path, array_index, 1);
- if (fcu && fcu->driver) {
+ if(fcu && fcu->driver) {
fcu->driver->type= type;
-
+
/* fill in current value for python */
- if (type == DRIVER_TYPE_PYTHON) {
+ if(type == DRIVER_TYPE_PYTHON) {
PropertyType proptype= RNA_property_type(prop);
- int array= RNA_property_array_length(&ptr, prop);
+ int array= RNA_property_array_length(prop);
char *expression= fcu->driver->expression;
int val, maxlen= sizeof(fcu->driver->expression);
float fval;
-
- if (proptype == PROP_BOOLEAN) {
+
+ if(proptype == PROP_BOOLEAN) {
if(!array) val= RNA_property_boolean_get(&ptr, prop);
else val= RNA_property_boolean_get_index(&ptr, prop, array_index);
-
+
BLI_strncpy(expression, (val)? "True": "False", maxlen);
}
- else if (proptype == PROP_INT) {
- if (!array) val= RNA_property_int_get(&ptr, prop);
+ else if(proptype == PROP_INT) {
+ if(!array) val= RNA_property_int_get(&ptr, prop);
else val= RNA_property_int_get_index(&ptr, prop, array_index);
-
+
BLI_snprintf(expression, maxlen, "%d", val);
}
- else if (proptype == PROP_FLOAT) {
- if (!array) fval= RNA_property_float_get(&ptr, prop);
+ else if(proptype == PROP_FLOAT) {
+ if(!array) fval= RNA_property_float_get(&ptr, prop);
else fval= RNA_property_float_get_index(&ptr, prop, array_index);
-
+
BLI_snprintf(expression, maxlen, "%.3f", fval);
}
@@ -232,7 +232,7 @@ static int add_driver_button_exec (bContext *C, wmOperator *op)
short success= 0;
int a, index, length, all= RNA_boolean_get(op->ptr, "all");
- /* try to create driver using property retrieved from UI */
+ /* try to insert keyframe using property retrieved from UI */
memset(&ptr, 0, sizeof(PointerRNA));
uiAnimContextProperty(C, &ptr, &prop, &index);
@@ -241,7 +241,7 @@ static int add_driver_button_exec (bContext *C, wmOperator *op)
if (path) {
if (all) {
- length= RNA_property_array_length(&ptr, prop);
+ length= RNA_property_array_length(prop);
if (length) index= 0;
else length= 1;
@@ -281,7 +281,7 @@ void ANIM_OT_add_driver_button (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", "Insert a keyframe for all element of the array.");
}
/* Remove Driver Button Operator ------------------------ */
@@ -294,7 +294,7 @@ static int remove_driver_button_exec (bContext *C, wmOperator *op)
short success= 0;
int a, index, length, all= RNA_boolean_get(op->ptr, "all");
- /* try to find driver using property retrieved from UI */
+ /* try to insert keyframe using property retrieved from UI */
memset(&ptr, 0, sizeof(PointerRNA));
uiAnimContextProperty(C, &ptr, &prop, &index);
@@ -303,7 +303,7 @@ static int remove_driver_button_exec (bContext *C, wmOperator *op)
if (path) {
if (all) {
- length= RNA_property_array_length(&ptr, prop);
+ length= RNA_property_array_length(prop);
if(length) index= 0;
else length= 1;
@@ -344,7 +344,7 @@ void ANIM_OT_remove_driver_button (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 keyfames from all elements of the array.");
}
/* ************************************************** */
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index 4aff26105f3..7a618f4d222 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -258,14 +258,14 @@ static void draw_modifier__fn_generator(uiLayout *layout, ID *id, FModifier *fcm
/* add the settings */
col= uiLayoutColumn(layout, 1);
- uiItemR(col, "", 0, &ptr, "type", 0);
- uiItemR(col, NULL, 0, &ptr, "additive", UI_ITEM_R_TOGGLE);
+ uiItemR(col, "", 0, &ptr, "type", 0, 0, 0);
+ uiItemR(col, NULL, 0, &ptr, "additive", 0, 0, 1);
col= uiLayoutColumn(layout, 0); // no grouping for now
- uiItemR(col, NULL, 0, &ptr, "amplitude", 0);
- uiItemR(col, NULL, 0, &ptr, "phase_multiplier", 0);
- uiItemR(col, NULL, 0, &ptr, "phase_offset", 0);
- uiItemR(col, NULL, 0, &ptr, "value_offset", 0);
+ uiItemR(col, NULL, 0, &ptr, "amplitude", 0, 0, 0);
+ uiItemR(col, NULL, 0, &ptr, "phase_multiplier", 0, 0, 0);
+ uiItemR(col, NULL, 0, &ptr, "phase_offset", 0, 0, 0);
+ uiItemR(col, NULL, 0, &ptr, "value_offset", 0, 0, 0);
}
/* --------------- */
@@ -287,14 +287,14 @@ static void draw_modifier__cycles(uiLayout *layout, ID *id, FModifier *fcm, shor
/* before range */
col= uiLayoutColumn(split, 1);
uiItemL(col, "Before:", 0);
- uiItemR(col, "", 0, &ptr, "before_mode", 0);
- uiItemR(col, NULL, 0, &ptr, "before_cycles", 0);
+ uiItemR(col, "", 0, &ptr, "before_mode", 0, 0, 0);
+ uiItemR(col, NULL, 0, &ptr, "before_cycles", 0, 0, 0);
/* after range */
col= uiLayoutColumn(split, 1);
uiItemL(col, "After:", 0);
- uiItemR(col, "", 0, &ptr, "after_mode", 0);
- uiItemR(col, NULL, 0, &ptr, "after_cycles", 0);
+ uiItemR(col, "", 0, &ptr, "after_mode", 0, 0, 0);
+ uiItemR(col, NULL, 0, &ptr, "after_cycles", 0, 0, 0);
}
/* --------------- */
@@ -309,20 +309,20 @@ static void draw_modifier__noise(uiLayout *layout, ID *id, FModifier *fcm, short
RNA_pointer_create(id, &RNA_FModifierNoise, fcm, &ptr);
/* blending mode */
- uiItemR(layout, NULL, 0, &ptr, "modification", 0);
+ uiItemR(layout, NULL, 0, &ptr, "modification", 0, 0, 0);
/* split into 2 columns */
split= uiLayoutSplit(layout, 0.5f);
/* col 1 */
col= uiLayoutColumn(split, 0);
- uiItemR(col, NULL, 0, &ptr, "size", 0);
- uiItemR(col, NULL, 0, &ptr, "strength", 0);
+ uiItemR(col, NULL, 0, &ptr, "size", 0, 0, 0);
+ uiItemR(col, NULL, 0, &ptr, "strength", 0, 0, 0);
/* col 2 */
col= uiLayoutColumn(split, 0);
- uiItemR(col, NULL, 0, &ptr, "phase", 0);
- uiItemR(col, NULL, 0, &ptr, "depth", 0);
+ uiItemR(col, NULL, 0, &ptr, "phase", 0, 0, 0);
+ uiItemR(col, NULL, 0, &ptr, "depth", 0, 0, 0);
}
/* --------------- */
@@ -503,11 +503,11 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh
/* general settings */
col= uiLayoutColumn(layout, 1);
uiItemL(col, "Envelope:", 0);
- uiItemR(col, NULL, 0, &ptr, "reference_value", 0);
+ uiItemR(col, NULL, 0, &ptr, "reference_value", 0, 0, 0);
row= uiLayoutRow(col, 1);
- uiItemR(row, "Min", 0, &ptr, "default_minimum", 0);
- uiItemR(row, "Max", 0, &ptr, "default_maximum", 0);
+ uiItemR(row, "Min", 0, &ptr, "default_minimum", 0, 0, 0);
+ uiItemR(row, "Max", 0, &ptr, "default_maximum", 0, 0, 0);
/* control points header */
// TODO: move this control-point control stuff to using the new special widgets for lists
@@ -559,13 +559,13 @@ static void draw_modifier__limits(uiLayout *layout, ID *id, FModifier *fcm, shor
/* x-minimum */
col= uiLayoutColumn(split, 1);
- uiItemR(col, NULL, 0, &ptr, "use_minimum_x", 0);
- uiItemR(col, NULL, 0, &ptr, "minimum_x", 0);
+ uiItemR(col, NULL, 0, &ptr, "use_minimum_x", 0, 0, 0);
+ uiItemR(col, NULL, 0, &ptr, "minimum_x", 0, 0, 0);
/* y-minimum*/
col= uiLayoutColumn(split, 1);
- uiItemR(col, NULL, 0, &ptr, "use_minimum_y", 0);
- uiItemR(col, NULL, 0, &ptr, "minimum_y", 0);
+ uiItemR(col, NULL, 0, &ptr, "use_minimum_y", 0, 0, 0);
+ uiItemR(col, NULL, 0, &ptr, "minimum_y", 0, 0, 0);
}
/* row 2: minimum */
@@ -577,13 +577,13 @@ static void draw_modifier__limits(uiLayout *layout, ID *id, FModifier *fcm, shor
/* x-minimum */
col= uiLayoutColumn(split, 1);
- uiItemR(col, NULL, 0, &ptr, "use_maximum_x", 0);
- uiItemR(col, NULL, 0, &ptr, "maximum_x", 0);
+ uiItemR(col, NULL, 0, &ptr, "use_maximum_x", 0, 0, 0);
+ uiItemR(col, NULL, 0, &ptr, "maximum_x", 0, 0, 0);
/* y-minimum*/
col= uiLayoutColumn(split, 1);
- uiItemR(col, NULL, 0, &ptr, "use_maximum_y", 0);
- uiItemR(col, NULL, 0, &ptr, "maximum_y", 0);
+ uiItemR(col, NULL, 0, &ptr, "use_maximum_y", 0, 0, 0);
+ uiItemR(col, NULL, 0, &ptr, "maximum_y", 0, 0, 0);
}
}
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index abea38e129e..2107e6e4252 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -98,7 +98,9 @@ static ActKeyColumn *bezt_to_new_actkeycolumn(BezTriple *bezt)
/* store settings based on state of BezTriple */
ak->cfra= bezt->vec[1][0];
ak->sel= BEZSELECTED(bezt) ? SELECT : 0;
- ak->key_type= BEZKEYTYPE(bezt);
+
+ // TODO: handle type = bezt->h1 or bezt->h2
+ ak->handle_type= 0;
/* set 'modified', since this is used to identify long keyframes */
ak->modified = 1;
@@ -132,10 +134,6 @@ static void add_bezt_to_keycolumns_list(DLRBT_Tree *keys, BezTriple *bezt)
if (BEZSELECTED(bezt)) ak->sel = SELECT;
ak->modified += 1;
- /* for keyframe type, 'proper' keyframes have priority over breakdowns (and other types for now) */
- if (BEZKEYTYPE(bezt) == BEZT_KEYTYPE_KEYFRAME)
- ak->key_type= BEZT_KEYTYPE_KEYFRAME;
-
/* done... no need to insert */
return;
}
@@ -342,7 +340,7 @@ static const float _unit_diamond_shape[4][2] = {
};
/* draw a simple diamond shape with OpenGL */
-void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel, short key_type, short mode)
+void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel, short mode)
{
static GLuint displist1=0;
static GLuint displist2=0;
@@ -373,11 +371,6 @@ void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel
glEndList();
}
- /* tweak size of keyframe shape according to type of keyframe
- * - 'proper' keyframes have key_type=0, so get drawn at full size
- */
- hsize -= 0.5f*key_type;
-
/* adjust view transform before starting */
glTranslatef(x, y, 0.0f);
glScalef(1.0f/xscale*hsize, hsize, 1.0f);
@@ -388,22 +381,8 @@ void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel
/* draw! */
if ELEM(mode, KEYFRAME_SHAPE_INSIDE, KEYFRAME_SHAPE_BOTH) {
/* interior - hardcoded colors (for selected and unselected only) */
- switch (key_type) {
- case BEZT_KEYTYPE_BREAKDOWN: /* bluish frames for now */
- {
- if (sel) glColor3f(0.33f, 0.75f, 0.93f);
- else glColor3f(0.70f, 0.86f, 0.91f);
- }
- break;
-
- case BEZT_KEYTYPE_KEYFRAME: /* traditional yellowish frames for now */
- default:
- {
- if (sel) UI_ThemeColorShade(TH_STRIP_SELECT, 50);
- else glColor3f(0.91f, 0.91f, 0.91f);
- }
- break;
- }
+ if (sel) UI_ThemeColorShade(TH_STRIP_SELECT, 50);
+ else glColor3ub(0xE9, 0xE9, 0xE9);
glCallList(displist2);
}
@@ -475,7 +454,7 @@ static void draw_keylist(View2D *v2d, DLRBT_Tree *keys, DLRBT_Tree *blocks, floa
/* draw using OpenGL - uglier but faster */
// NOTE1: a previous version of this didn't work nice for some intel cards
// NOTE2: if we wanted to go back to icons, these are icon = (ak->sel & SELECT) ? ICON_SPACE2 : ICON_SPACE3;
- draw_keyframe_shape(ak->cfra, ypos, xscale, 5.0f, (ak->sel & SELECT), ak->key_type, KEYFRAME_SHAPE_BOTH);
+ draw_keyframe_shape(ak->cfra, ypos, xscale, 5.0f, (ak->sel & SELECT), KEYFRAME_SHAPE_BOTH);
}
}
@@ -716,7 +695,7 @@ void gpl_to_keylist(bDopeSheet *ads, bGPDlayer *gpl, DLRBT_Tree *keys, DLRBT_Tre
ak->cfra= (float)gpf->framenum;
ak->modified = 1;
- ak->key_type= 0;
+ ak->handle_type= 0;
if (gpf->flag & GP_FRAME_SELECT)
ak->sel = SELECT;
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index ac04dc7d1a8..77826eca87a 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -655,7 +655,7 @@ static short set_bezt_bezier(BeztEditData *bed, BezTriple *bezt)
return 0;
}
-/* Set the interpolation type of the selected BezTriples in each F-Curve to the specified one */
+/* Set the interpolation type of the selected BezTriples in each IPO curve to the specified one */
// ANIM_editkeyframes_ipocurve_ipotype() !
BeztEditFunc ANIM_editkeyframes_ipo(short code)
{
@@ -669,35 +669,6 @@ BeztEditFunc ANIM_editkeyframes_ipo(short code)
}
}
-/* ------- */
-
-static short set_keytype_keyframe(BeztEditData *bed, BezTriple *bezt)
-{
- if (bezt->f2 & SELECT)
- BEZKEYTYPE(bezt)= BEZT_KEYTYPE_KEYFRAME;
- return 0;
-}
-
-static short set_keytype_breakdown(BeztEditData *bed, BezTriple *bezt)
-{
- if (bezt->f2 & SELECT)
- BEZKEYTYPE(bezt)= BEZT_KEYTYPE_BREAKDOWN;
- return 0;
-}
-
-/* Set the interpolation type of the selected BezTriples in each F-Curve to the specified one */
-BeztEditFunc ANIM_editkeyframes_keytype(short code)
-{
- switch (code) {
- case BEZT_KEYTYPE_BREAKDOWN: /* breakdown */
- return set_keytype_breakdown;
-
- case BEZT_KEYTYPE_KEYFRAME: /* proper keyframe */
- default:
- return set_keytype_keyframe;
- }
-}
-
/* ******************************************* */
/* Selection */
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index f13d35c7d4a..fc67ee34a2e 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -127,11 +127,11 @@ void duplicate_fcurve_keys(FCurve *fcu)
{
BezTriple *newbezt;
int i;
-
- /* this can only work when there is an F-Curve, and also when there are some BezTriples */
- if ELEM(NULL, fcu, fcu->bezt)
+
+ if (fcu == NULL)
return;
+ // XXX this does not take into account sample data...
for (i=0; i < fcu->totvert; i++) {
/* If a key is selected */
if (fcu->bezt[i].f2 & SELECT) {
@@ -160,7 +160,7 @@ void duplicate_fcurve_keys(FCurve *fcu)
/* **************************************************** */
/* Various Tools */
-/* Basic F-Curve 'cleanup' function that removes 'double points' and unnecessary keyframes on linear-segments only */
+/* Basic IPO-Curve 'cleanup' function that removes 'double points' and unnecessary keyframes on linear-segments only */
void clean_fcurve(FCurve *fcu, float thresh)
{
BezTriple *old_bezts, *bezt, *beztn;
@@ -285,145 +285,75 @@ void smooth_fcurve (FCurve *fcu)
}
}
- /* if any points were selected, allocate tSmooth_Bezt points to work on */
- if (totSel >= 3) {
- tSmooth_Bezt *tarray, *tsb;
-
- /* allocate memory in one go */
- tsb= tarray= MEM_callocN(totSel*sizeof(tSmooth_Bezt), "tSmooth_Bezt Array");
-
- /* populate tarray with data of selected points */
- bezt= fcu->bezt;
- for (i=0, x=0; (i < fcu->totvert) && (x < totSel); i++, bezt++) {
- if (BEZSELECTED(bezt)) {
- /* tsb simply needs pointer to vec, and index */
- tsb->h1 = &bezt->vec[0][1];
- tsb->h2 = &bezt->vec[1][1];
- tsb->h3 = &bezt->vec[2][1];
-
- /* advance to the next tsb to populate */
- if (x < totSel- 1)
- tsb++;
- else
- break;
- }
- }
+ /* if any points were selected, allocate tSmooth_Bezt points to work on */
+ if (totSel >= 3) {
+ tSmooth_Bezt *tarray, *tsb;
- /* calculate the new smoothed F-Curve's with weighted averages:
- * - this is done with two passes
- * - uses 5 points for each operation (which stores in the relevant handles)
- * - previous: w/a ratio = 3:5:2:1:1
- * - next: w/a ratio = 1:1:2:5:3
- */
-
- /* round 1: calculate previous and next */
- tsb= tarray;
- for (i=0; i < totSel; i++, tsb++) {
- /* don't touch end points (otherwise, curves slowly explode) */
- if (ELEM(i, 0, (totSel-1)) == 0) {
- const tSmooth_Bezt *tP1 = tsb - 1;
- const tSmooth_Bezt *tP2 = (i-2 > 0) ? (tsb - 2) : (NULL);
- const tSmooth_Bezt *tN1 = tsb + 1;
- const tSmooth_Bezt *tN2 = (i+2 < totSel) ? (tsb + 2) : (NULL);
-
- const float p1 = *tP1->h2;
- const float p2 = (tP2) ? (*tP2->h2) : (*tP1->h2);
- const float c1 = *tsb->h2;
- const float n1 = *tN1->h2;
- const float n2 = (tN2) ? (*tN2->h2) : (*tN1->h2);
-
- /* calculate previous and next */
- *tsb->h1= (3*p2 + 5*p1 + 2*c1 + n1 + n2) / 12;
- *tsb->h3= (p2 + p1 + 2*c1 + 5*n1 + 3*n2) / 12;
+ /* allocate memory in one go */
+ tsb= tarray= MEM_callocN(totSel*sizeof(tSmooth_Bezt), "tSmooth_Bezt Array");
+
+ /* populate tarray with data of selected points */
+ bezt= fcu->bezt;
+ for (i=0, x=0; (i < fcu->totvert) && (x < totSel); i++, bezt++) {
+ if (BEZSELECTED(bezt)) {
+ /* tsb simply needs pointer to vec, and index */
+ tsb->h1 = &bezt->vec[0][1];
+ tsb->h2 = &bezt->vec[1][1];
+ tsb->h3 = &bezt->vec[2][1];
+
+ /* advance to the next tsb to populate */
+ if (x < totSel- 1)
+ tsb++;
+ else
+ break;
+ }
}
- }
-
- /* round 2: calculate new values and reset handles */
- tsb= tarray;
- for (i=0; i < totSel; i++, tsb++) {
- /* calculate new position by averaging handles */
- *tsb->h2 = (*tsb->h1 + *tsb->h3) / 2;
- /* reset handles now */
- *tsb->h1 = *tsb->h2;
- *tsb->h3 = *tsb->h2;
+ /* calculate the new smoothed F-Curve's with weighted averages:
+ * - this is done with two passes
+ * - uses 5 points for each operation (which stores in the relevant handles)
+ * - previous: w/a ratio = 3:5:2:1:1
+ * - next: w/a ratio = 1:1:2:5:3
+ */
+
+ /* round 1: calculate previous and next */
+ tsb= tarray;
+ for (i=0; i < totSel; i++, tsb++) {
+ /* don't touch end points (otherwise, curves slowly explode) */
+ if (ELEM(i, 0, (totSel-1)) == 0) {
+ const tSmooth_Bezt *tP1 = tsb - 1;
+ const tSmooth_Bezt *tP2 = (i-2 > 0) ? (tsb - 2) : (NULL);
+ const tSmooth_Bezt *tN1 = tsb + 1;
+ const tSmooth_Bezt *tN2 = (i+2 < totSel) ? (tsb + 2) : (NULL);
+
+ const float p1 = *tP1->h2;
+ const float p2 = (tP2) ? (*tP2->h2) : (*tP1->h2);
+ const float c1 = *tsb->h2;
+ const float n1 = *tN1->h2;
+ const float n2 = (tN2) ? (*tN2->h2) : (*tN1->h2);
+
+ /* calculate previous and next */
+ *tsb->h1= (3*p2 + 5*p1 + 2*c1 + n1 + n2) / 12;
+ *tsb->h3= (p2 + p1 + 2*c1 + 5*n1 + 3*n2) / 12;
}
+ }
+
+ /* round 2: calculate new values and reset handles */
+ tsb= tarray;
+ for (i=0; i < totSel; i++, tsb++) {
+ /* calculate new position by averaging handles */
+ *tsb->h2 = (*tsb->h1 + *tsb->h3) / 2;
- /* free memory required for tarray */
- MEM_freeN(tarray);
+ /* reset handles now */
+ *tsb->h1 = *tsb->h2;
+ *tsb->h3 = *tsb->h2;
}
- /* recalculate handles */
- calchandles_fcurve(fcu);
+ /* free memory required for tarray */
+ MEM_freeN(tarray);
}
-
-/* ---------------- */
-
-/* little cache for values... */
-typedef struct tempFrameValCache {
- float frame, val;
-} tempFrameValCache;
-
-
-/* Evaluates the curves between each selected keyframe on each frame, and keys the value */
-void sample_fcurve (FCurve *fcu)
-{
- BezTriple *bezt, *start=NULL, *end=NULL;
- tempFrameValCache *value_cache, *fp;
- int sfra, range;
- int i, n, nIndex;
-
- /* find selected keyframes... once pair has been found, add keyframes */
- for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) {
- /* check if selected, and which end this is */
- if (BEZSELECTED(bezt)) {
- if (start) {
- /* set end */
- end= bezt;
-
- /* cache values then add keyframes using these values, as adding
- * keyframes while sampling will affect the outcome...
- * - only start sampling+adding from index=1, so that we don't overwrite original keyframe
- */
- range= (int)( ceil(end->vec[1][0] - start->vec[1][0]) );
- sfra= (int)( floor(start->vec[1][0]) );
-
- if (range) {
- value_cache= MEM_callocN(sizeof(tempFrameValCache)*range, "IcuFrameValCache");
-
- /* sample values */
- for (n=1, fp=value_cache; n<range && fp; n++, fp++) {
- fp->frame= (float)(sfra + n);
- fp->val= evaluate_fcurve(fcu, fp->frame);
- }
-
- /* add keyframes with these, tagging as 'breakdowns' */
- for (n=1, fp=value_cache; n<range && fp; n++, fp++) {
- nIndex= insert_vert_fcurve(fcu, fp->frame, fp->val, 1);
- BEZKEYTYPE(fcu->bezt + nIndex)= BEZT_KEYTYPE_BREAKDOWN;
- }
-
- /* free temp cache */
- MEM_freeN(value_cache);
-
- /* as we added keyframes, we need to compensate so that bezt is at the right place */
- bezt = fcu->bezt + i + range - 1;
- i += (range - 1);
- }
-
- /* bezt was selected, so it now marks the start of a whole new chain to search */
- start= bezt;
- end= NULL;
- }
- else {
- /* just set start keyframe */
- start= bezt;
- end= NULL;
- }
- }
- }
- /* recalculate channel's handles? */
+ /* recalculate handles */
calchandles_fcurve(fcu);
}
@@ -441,6 +371,7 @@ ListBase animcopybuf = {NULL, NULL};
static float animcopy_firstframe= 999999999.0f;
/* datatype for use in copy/paste buffer */
+// XXX F-Curve editor should use this too
typedef struct tAnimCopybufItem {
struct tAnimCopybufItem *next, *prev;
@@ -599,10 +530,8 @@ short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data)
bezt->vec[1][0] += offset;
bezt->vec[2][0] += offset;
- /* insert the keyframe
- * NOTE: no special flags here for now
- */
- insert_bezt_fcurve(fcu, bezt, 0);
+ /* insert the keyframe */
+ insert_bezt_fcurve(fcu, bezt);
/* un-apply offset from src beztriple after copying */
bezt->vec[0][0] -= offset;
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 7135f8802bc..2da082a9b7c 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -262,8 +262,9 @@ static int binarysearch_bezt_index (BezTriple array[], float frame, int arraylen
* NOTE: any recalculate of the F-Curve that needs to be done will need to
* be done by the caller.
*/
-int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag)
+int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt)
{
+ BezTriple *newb;
int i= 0;
if (fcu->bezt) {
@@ -272,28 +273,13 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag)
if (replace) {
/* sanity check: 'i' may in rare cases exceed arraylen */
- if ((i >= 0) && (i < fcu->totvert)) {
- /* take care with the handletypes and other info if the replacement flags are set */
- if (flag & INSERTKEY_REPLACE) {
- BezTriple *dst= (fcu->bezt + i);
- float dy= bezt->vec[1][1] - dst->vec[1][1];
-
- /* just apply delta value change to the handle values */
- dst->vec[0][1] += dy;
- dst->vec[1][1] += dy;
- dst->vec[2][1] += dy;
-
- // TODO: perform some other operations?
- }
- else {
- /* just brutally replace the values */
- *(fcu->bezt + i) = *bezt;
- }
- }
+ // FIXME: do not overwrite handletype if just replacing...?
+ if ((i >= 0) && (i < fcu->totvert))
+ *(fcu->bezt + i) = *bezt;
}
- else if ((flag & INSERTKEY_REPLACE) == 0) {
- /* insert new - if we're not restricted to replacing keyframes only */
- BezTriple *newb= MEM_callocN((fcu->totvert+1)*sizeof(BezTriple), "beztriple");
+ else {
+ /* add new */
+ newb= MEM_callocN((fcu->totvert+1)*sizeof(BezTriple), "beztriple");
/* add the beztriples that should occur before the beztriple to be pasted (originally in ei->icu) */
if (i > 0)
@@ -306,10 +292,10 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag)
if (i < fcu->totvert)
memcpy(newb+i+1, fcu->bezt+i, (fcu->totvert-i)*sizeof(BezTriple));
- /* replace (+ free) old with new, only if necessary to do so */
+ /* replace (+ free) old with new */
MEM_freeN(fcu->bezt);
fcu->bezt= newb;
-
+
fcu->totvert++;
}
}
@@ -327,11 +313,13 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag)
return i;
}
-/* This function is a wrapper for insert_bezt_fcurve_internal(), and should be used when
- * adding a new keyframe to a curve, when the keyframe doesn't exist anywhere else yet.
- * It returns the index at which the keyframe was added.
+/* This function is a wrapper for insert_bezt_icu, and should be used when
+ * adding a new keyframe to a curve, when the keyframe doesn't exist anywhere
+ * else yet.
+ *
+ * 'fast' - is only for the python API where importing BVH's would take an extreamly long time.
*/
-int insert_vert_fcurve (FCurve *fcu, float x, float y, short flag)
+void insert_vert_fcurve (FCurve *fcu, float x, float y, short fast)
{
BezTriple beztr;
int a;
@@ -349,22 +337,21 @@ int insert_vert_fcurve (FCurve *fcu, float x, float y, short flag)
beztr.h1= beztr.h2= HD_AUTO; // XXX what about when we replace an old one?
/* add temp beztriple to keyframes */
- a= insert_bezt_fcurve(fcu, &beztr, flag);
+ a= insert_bezt_fcurve(fcu, &beztr);
/* what if 'a' is a negative index?
* for now, just exit to prevent any segfaults
*/
- if (a < 0) return -1;
+ if (a < 0) return;
/* don't recalculate handles if fast is set
* - this is a hack to make importers faster
- * - we may calculate twice (due to autohandle needing to be calculated twice)
+ * - we may calculate twice (see editipo_changed(), due to autohandle needing two calculations)
*/
- if ((flag & INSERTKEY_FAST) == 0)
- calchandles_fcurve(fcu);
+ if (!fast) calchandles_fcurve(fcu);
/* set handletype and interpolation */
- if ((fcu->totvert > 2) && (flag & INSERTKEY_REPLACE)==0) {
+ if (fcu->totvert > 2) {
BezTriple *bezt= (fcu->bezt + a);
char h1, h2;
@@ -383,14 +370,10 @@ int insert_vert_fcurve (FCurve *fcu, float x, float y, short flag)
/* don't recalculate handles if fast is set
* - this is a hack to make importers faster
- * - we may calculate twice (due to autohandle needing to be calculated twice)
+ * - we may calculate twice (see editipo_changed(), due to autohandle needing two calculations)
*/
- if ((flag & INSERTKEY_FAST) == 0)
- calchandles_fcurve(fcu);
+ if (!fast) calchandles_fcurve(fcu);
}
-
- /* return the index at which the keyframe was added */
- return a;
}
/* -------------- 'Smarter' Keyframing Functions -------------------- */
@@ -520,19 +503,19 @@ static float setting_get_rna_value (PointerRNA *ptr, PropertyRNA *prop, int inde
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_length(prop))
value= (float)RNA_property_boolean_get_index(ptr, prop, index);
else
value= (float)RNA_property_boolean_get(ptr, prop);
break;
case PROP_INT:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_length(prop))
value= (float)RNA_property_int_get_index(ptr, prop, index);
else
value= (float)RNA_property_int_get(ptr, prop);
break;
case PROP_FLOAT:
- if (RNA_property_array_length(ptr, prop))
+ if (RNA_property_array_length(prop))
value= RNA_property_float_get_index(ptr, prop, index);
else
value= RNA_property_float_get(ptr, prop);
@@ -721,7 +704,7 @@ static float visualkey_get_value (PointerRNA *ptr, PropertyRNA *prop, int array_
float eul[3];
/* euler-rotation test before standard rotation, as standard rotation does quats */
- Mat4ToEulO(tmat, eul, pchan->rotmode);
+ Mat4ToEul(tmat, eul);
return eul[array_index];
}
else if (strstr(identifier, "rotation")) {
@@ -757,12 +740,6 @@ short insert_keyframe_direct (PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, fl
printf("ERROR: no F-Curve to add keyframes to \n");
return 0;
}
- /* F-Curve not editable? */
- if ( (fcu->flag & FCURVE_PROTECTED) || ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) ) {
- if (G.f & G_DEBUG)
- printf("WARNING: not inserting keyframe for locked F-Curve \n");
- return 0;
- }
/* if no property given yet, try to validate from F-Curve info */
if ((ptr.id.data == NULL) && (ptr.data==NULL)) {
@@ -829,7 +806,7 @@ short insert_keyframe_direct (PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, fl
/* insert new keyframe at current frame */
if (insert_mode)
- insert_vert_fcurve(fcu, cfra, curval, flag);
+ insert_vert_fcurve(fcu, cfra, curval, (flag & INSERTKEY_FAST));
/* delete keyframe immediately before/after newly added */
switch (insert_mode) {
@@ -847,7 +824,7 @@ short insert_keyframe_direct (PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, fl
}
else {
/* just insert keyframe */
- insert_vert_fcurve(fcu, cfra, curval, flag);
+ insert_vert_fcurve(fcu, cfra, curval, (flag & INSERTKEY_FAST));
/* return success */
return 1;
@@ -934,19 +911,8 @@ short delete_keyframe (ID *id, bAction *act, const char group[], const char rna_
/* we don't check the validity of the path here yet, but it should be ok... */
fcu= verify_fcurve(act, group, rna_path, array_index, 0);
- /* check if F-Curve exists and/or whether it can be edited */
- if ELEM(NULL, act, fcu) {
- printf("ERROR: no F-Curve and/or Action to delete keyframe from \n");
- return 0;
- }
- if ( (fcu->flag & FCURVE_PROTECTED) || ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) ) {
- if (G.f & G_DEBUG)
- printf("WARNING: not inserting keyframe for locked F-Curve \n");
- return 0;
- }
-
- /* it should be fine to continue now... */
- {
+ /* only continue if we have an F-Curve to remove keyframes from */
+ if (act && fcu) {
short found = -1;
int i;
@@ -1320,15 +1286,6 @@ static int insert_key_button_exec (bContext *C, wmOperator *op)
float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
short success= 0;
int a, index, length, all= RNA_boolean_get(op->ptr, "all");
- short flag = 0;
-
- /* flags for inserting keyframes */
- if (IS_AUTOKEY_FLAG(AUTOMATKEY))
- flag |= INSERTKEY_MATRIX;
- if (IS_AUTOKEY_FLAG(INSERTNEEDED))
- flag |= INSERTKEY_NEEDED;
- if (IS_AUTOKEY_MODE(scene, EDITKEYS))
- flag |= INSERTKEY_REPLACE;
/* try to insert keyframe using property retrieved from UI */
memset(&ptr, 0, sizeof(PointerRNA));
@@ -1339,7 +1296,7 @@ static int insert_key_button_exec (bContext *C, wmOperator *op)
if (path) {
if (all) {
- length= RNA_property_array_length(&ptr, prop);
+ length= RNA_property_array_length(prop);
if(length) index= 0;
else length= 1;
@@ -1348,14 +1305,14 @@ static int insert_key_button_exec (bContext *C, wmOperator *op)
length= 1;
for (a=0; a<length; a++)
- success+= insert_keyframe(ptr.id.data, NULL, NULL, path, index+a, cfra, flag);
+ success+= insert_keyframe(ptr.id.data, NULL, NULL, path, index+a, cfra, 0);
MEM_freeN(path);
}
else if (ptr.type == &RNA_NlaStrip) {
/* handle special vars for NLA-strips */
NlaStrip *strip= (NlaStrip *)ptr.data;
- FCurve *fcu= list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), flag);
+ FCurve *fcu= list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), 0);
success+= insert_keyframe_direct(ptr, prop, fcu, cfra, 0);
}
@@ -1422,7 +1379,7 @@ static int delete_key_button_exec (bContext *C, wmOperator *op)
if (path) {
if (all) {
- length= RNA_property_array_length(&ptr, prop);
+ length= RNA_property_array_length(prop);
if(length) index= 0;
else length= 1;
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 2639d49b5be..5bd37ba7831 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -78,174 +78,139 @@
#include "anim_intern.h"
/* ************************************************** */
-/* KEYING SETS - OPERATORS (for use in UI menus) */
+/* KEYING SETS - EDITING API */
+
+/* Operators ------------------------------------------- */
+
+/* These operators are only provided for scripting/macro usage, not for direct
+ * calling from the UI since they wrap some of the data-access API code for these
+ * (defined in blenkernel) which have quite a few properties.
+ */
-/* Add to KeyingSet Button Operator ------------------------ */
+/* ----- */
-static int add_keyingset_button_exec (bContext *C, wmOperator *op)
+static int keyingset_add_destination_exec (bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- KeyingSet *ks = NULL;
- PropertyRNA *prop= NULL;
PointerRNA ptr;
- char *path = NULL;
- short success= 0;
- int index=0, pflag=0;
- int all= RNA_boolean_get(op->ptr, "all");
-
- /* verify the Keying Set to use:
- * - use the active one for now (more control over this can be added later)
- * - add a new one if it doesn't exist
- */
- if (scene->active_keyingset == 0) {
- short flag=0, keyingflag=0;
-
- /* validate flags
- * - absolute KeyingSets should be created by default
- */
- flag |= KEYINGSET_ABSOLUTE;
-
- if (IS_AUTOKEY_FLAG(AUTOMATKEY))
- keyingflag |= INSERTKEY_MATRIX;
- if (IS_AUTOKEY_FLAG(INSERTNEEDED))
- keyingflag |= INSERTKEY_NEEDED;
-
- /* call the API func, and set the active keyingset index */
- ks= BKE_keyingset_add(&scene->keyingsets, "ButtonKeyingSet", flag, keyingflag);
-
- scene->active_keyingset= BLI_countlist(&scene->keyingsets);
- }
- else
- ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
-
- /* try to add to keyingset using property retrieved from UI */
- memset(&ptr, 0, sizeof(PointerRNA));
- uiAnimContextProperty(C, &ptr, &prop, &index);
-
- /* check if property is able to be added */
- if (ptr.data && prop && RNA_property_animateable(ptr.data, prop)) {
- path= RNA_path_from_ID_to_property(&ptr, prop);
-
- if (path) {
- /* set flags */
- if (all)
- pflag |= KSP_FLAG_WHOLE_ARRAY;
-
- /* add path to this setting */
- BKE_keyingset_add_destination(ks, ptr.id.data, NULL, path, index, pflag, KSP_GROUP_KSNAME);
- success= 1;
-
- /* free the temp path created */
- MEM_freeN(path);
- }
+ KeyingSet *ks= NULL;
+ ID *id= NULL;
+ char rna_path[256], group_name[64]; // xxx
+ short groupmode=0, flag=0;
+ int array_index=0;
+
+ /* get settings from operator properties */
+ ptr = RNA_pointer_get(op->ptr, "keyingset");
+ if (ptr.data)
+ ks= (KeyingSet *)ptr.data;
+
+ ptr = RNA_pointer_get(op->ptr, "id");
+ if (ptr.data)
+ id= (ID *)ptr.data;
+
+ groupmode= RNA_enum_get(op->ptr, "grouping_method");
+ RNA_string_get(op->ptr, "group_name", group_name);
+
+ RNA_string_get(op->ptr, "rna_path", rna_path);
+ array_index= RNA_int_get(op->ptr, "array_index");
+
+ if (RNA_boolean_get(op->ptr, "entire_array"))
+ flag |= KSP_FLAG_WHOLE_ARRAY;
+
+ /* if enough args are provided, call API method */
+ if (ks) {
+ BKE_keyingset_add_destination(ks, id, group_name, rna_path, array_index, flag, groupmode);
+ return OPERATOR_FINISHED;
}
-
- if (success) {
- /* send updates */
- ED_anim_dag_flush_update(C);
-
- /* for now, only send ND_KEYS for KeyingSets */
- WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL);
- }
-
- return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
+ else {
+ BKE_report(op->reports, RPT_ERROR, "Keying Set could not be added.");
+ return OPERATOR_CANCELLED;
+ }
}
-void ANIM_OT_add_keyingset_button (wmOperatorType *ot)
+void ANIM_OT_keyingset_add_destination (wmOperatorType *ot)
{
+ // XXX: this is also defined in rna_animation.c
+ static EnumPropertyItem prop_mode_grouping_items[] = {
+ {KSP_GROUP_NAMED, "NAMED", 0, "Named Group", ""},
+ {KSP_GROUP_NONE, "NONE", 0, "None", ""},
+ {KSP_GROUP_KSNAME, "KEYINGSET", 0, "Keying Set Name", ""},
+ {0, NULL, 0, NULL, NULL}};
+
/* identifiers */
- ot->name= "Add to Keying Set";
- ot->idname= "ANIM_OT_add_keyingset_button";
+ ot->name= "Add Keying Set Destination";
+ ot->idname= "ANIM_OT_keyingset_add_destination";
/* callbacks */
- ot->exec= add_keyingset_button_exec;
- //op->poll= ???
+ ot->exec= keyingset_add_destination_exec;
+ ot->poll= ED_operator_scene_editable;
+
+ /* props */
+ /* pointers */ // xxx - do we want to directly expose these?
+ RNA_def_pointer_runtime(ot->srna, "keyingset", &RNA_KeyingSet, "Keying Set", "Keying Set to add destination to.");
+ RNA_def_pointer_runtime(ot->srna, "id", &RNA_ID, "ID", "ID-block for the destination.");
+ /* grouping */
+ RNA_def_enum(ot->srna, "grouping_method", prop_mode_grouping_items, KSP_GROUP_NAMED, "Grouping Method", "Method used to define which Group-name to use.");
+ RNA_def_string(ot->srna, "group_name", "", 64, "Group Name", "Name of Action Group to assign destination to (only if grouping mode is to use this name).");
+ /* rna-path */
+ RNA_def_string(ot->srna, "rna_path", "", 256, "RNA-Path", "RNA-Path to destination property."); // xxx hopefully this is long enough
+ RNA_def_int(ot->srna, "array_index", 0, 0, INT_MAX, "Array Index", "If applicable, the index ", 0, INT_MAX);
+ /* flags */
+ RNA_def_boolean(ot->srna, "entire_array", 1, "Entire Array", "hen an 'array/vector' type is chosen (Location, Rotation, Color, etc.), entire array is to be used.");
- /* flags */
- 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.");
}
+
+/* ----- */
-/* Remove from KeyingSet Button Operator ------------------------ */
-
-static int remove_keyingset_button_exec (bContext *C, wmOperator *op)
+static int keyingset_add_new_exec (bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- KeyingSet *ks = NULL;
- PropertyRNA *prop= NULL;
- PointerRNA ptr;
- char *path = NULL;
- short success= 0;
- int index=0;
+ Scene *sce= CTX_data_scene(C);
+ KeyingSet *ks= NULL;
+ short flag=0, keyingflag=0;
+ char name[64];
- /* verify the Keying Set to use:
- * - use the active one for now (more control over this can be added later)
- * - return error if it doesn't exist
- */
- if (scene->active_keyingset == 0) {
- BKE_report(op->reports, RPT_ERROR, "No active Keying Set to remove property from");
- return OPERATOR_CANCELLED;
- }
- else
- ks= BLI_findlink(&scene->keyingsets, scene->active_keyingset-1);
+ /* get settings from operator properties */
+ RNA_string_get(op->ptr, "name", name);
- /* try to add to keyingset using property retrieved from UI */
- memset(&ptr, 0, sizeof(PointerRNA));
- uiAnimContextProperty(C, &ptr, &prop, &index);
-
- if (ptr.data && prop) {
- path= RNA_path_from_ID_to_property(&ptr, prop);
+ if (RNA_boolean_get(op->ptr, "absolute"))
+ flag |= KEYINGSET_ABSOLUTE;
+ if (RNA_boolean_get(op->ptr, "insertkey_needed"))
+ keyingflag |= INSERTKEY_NEEDED;
+ if (RNA_boolean_get(op->ptr, "insertkey_visual"))
+ keyingflag |= INSERTKEY_MATRIX;
- if (path) {
- KS_Path *ksp;
-
- /* try to find a path matching this description */
- ksp= BKE_keyingset_find_destination(ks, ptr.id.data, ks->name, path, index, KSP_GROUP_KSNAME);
-
- if (ksp) {
- /* just free it... */
- MEM_freeN(ksp->rna_path);
- BLI_freelinkN(&ks->paths, ksp);
-
- success= 1;
- }
-
- /* free temp path used */
- MEM_freeN(path);
- }
- }
-
+ /* call the API func, and set the active keyingset index */
+ ks= BKE_keyingset_add(&sce->keyingsets, name, flag, keyingflag);
- if (success) {
- /* send updates */
- ED_anim_dag_flush_update(C);
-
- /* for now, only send ND_KEYS for KeyingSets */
- WM_event_add_notifier(C, NC_SCENE|ND_KEYINGSET, NULL);
+ if (ks) {
+ sce->active_keyingset= BLI_countlist(&sce->keyingsets);
+ return OPERATOR_FINISHED;
+ }
+ else {
+ BKE_report(op->reports, RPT_ERROR, "Keying Set could not be added.");
+ return OPERATOR_CANCELLED;
}
-
- return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
}
-void ANIM_OT_remove_keyingset_button (wmOperatorType *ot)
+void ANIM_OT_keyingset_add_new (wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove from Keying Set";
- ot->idname= "ANIM_OT_remove_keyingset_button";
+ ot->name= "Add Keying Set";
+ ot->idname= "ANIM_OT_keyingset_add_new";
/* callbacks */
- ot->exec= remove_keyingset_button_exec;
- //op->poll= ???
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->exec= keyingset_add_new_exec;
+ ot->poll= ED_operator_scene_editable;
+
+ /* props */
+ /* name */
+ RNA_def_string(ot->srna, "name", "KeyingSet", 64, "Name", "Name of Keying Set");
+ /* flags */
+ RNA_def_boolean(ot->srna, "absolute", 1, "Absolute", "Keying Set defines specific paths/settings to be keyframed (i.e. is not reliant on context info)");
+ /* keying flags */
+ RNA_def_boolean(ot->srna, "insertkey_needed", 0, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves.");
+ RNA_def_boolean(ot->srna, "insertkey_visual", 0, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'.");
}
-/* ************************************************** */
-/* KEYING SETS - EDITING API */
-
/* UI API --------------------------------------------- */
/* Build menu-string of available keying-sets (allocates memory for string)
@@ -801,24 +766,24 @@ static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] =
/* Keying Sets with Keying Flags ************************* */
/* Keying Set - "VisualLoc" ---------- */
- BI_KS_DEFINE_BEGIN("VisualLoc", INSERTKEY_MATRIX)
+ BI_KS_DEFINE_BEGIN("VisualLoc", 0)
BI_KS_PATHS_BEGIN(1)
- BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "location", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
+ BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "location", INSERTKEY_MATRIX, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
BI_KS_PATHS_END
BI_KS_DEFINE_END,
/* Keying Set - "Rotation" ---------- */
- BI_KS_DEFINE_BEGIN("VisualRot", INSERTKEY_MATRIX)
+ BI_KS_DEFINE_BEGIN("VisualRot", 0)
BI_KS_PATHS_BEGIN(1)
- BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_PCHAN_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
+ BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_PCHAN_ROT, "rotation", INSERTKEY_MATRIX, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
BI_KS_PATHS_END
BI_KS_DEFINE_END,
/* Keying Set - "VisualLocRot" ---------- */
- BI_KS_DEFINE_BEGIN("VisualLocRot", INSERTKEY_MATRIX)
+ BI_KS_DEFINE_BEGIN("VisualLocRot", 0)
BI_KS_PATHS_BEGIN(2)
- BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "location", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM),
- BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_PCHAN_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
+ BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "location", INSERTKEY_MATRIX, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM),
+ BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_PCHAN_ROT, "rotation", INSERTKEY_MATRIX, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
BI_KS_PATHS_END
BI_KS_DEFINE_END
};
@@ -1045,7 +1010,6 @@ short modifykey_get_context_data (bContext *C, ListBase *dsources, KeyingSet *ks
*/
int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *ks, short mode, float cfra)
{
- Scene *scene= CTX_data_scene(C);
KS_Path *ksp;
int kflag=0, success= 0;
char *groupname= NULL;
@@ -1058,7 +1022,7 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *
/* suppliment with info from the context */
if (IS_AUTOKEY_FLAG(AUTOMATKEY)) kflag |= INSERTKEY_MATRIX;
if (IS_AUTOKEY_FLAG(INSERTNEEDED)) kflag |= INSERTKEY_NEEDED;
- if (IS_AUTOKEY_MODE(scene, EDITKEYS)) kflag |= INSERTKEY_REPLACE;
+ // if (IS_AUTOKEY_MODE(EDITKEYS)) flag |= INSERTKEY_REPLACE;
}
else if (mode == MODIFYKEY_MODE_DELETE)
kflag= 0;
@@ -1083,7 +1047,7 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *
* normal non-array entries get keyframed correctly
*/
i= ksp->array_index;
- arraylen= i;
+ arraylen= i+1;
/* get length of array if whole array option is enabled */
if (ksp->flag & KSP_FLAG_WHOLE_ARRAY) {
@@ -1092,13 +1056,9 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *
RNA_id_pointer_create(ksp->id, &id_ptr);
if (RNA_path_resolve(&id_ptr, ksp->rna_path, &ptr, &prop) && prop)
- arraylen= RNA_property_array_length(&ptr, prop);
+ arraylen= RNA_property_array_length(prop);
}
- /* we should do at least one step */
- if (arraylen == i)
- arraylen++;
-
/* for each possible index, perform operation
* - assume that arraylen is greater than index
*/
@@ -1215,7 +1175,7 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *
RNA_id_pointer_create(cks->id, &id_ptr);
if (RNA_path_resolve(&id_ptr, path, &ptr, &prop) && prop)
- arraylen= RNA_property_array_length(&ptr, prop);
+ arraylen= RNA_property_array_length(prop);
}
/* for each possible index, perform operation
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 4f5d8872384..632f037679f 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -239,7 +239,7 @@ static void fix_bonelist_roll (ListBase *bonelist, ListBase *editbonelist)
}
/* put EditMode back in Object */
-void ED_armature_from_edit(Object *obedit)
+void ED_armature_from_edit(Scene *scene, Object *obedit)
{
bArmature *arm= obedit->data;
EditBone *eBone, *neBone;
@@ -340,22 +340,24 @@ void ED_armature_from_edit(Object *obedit)
armature_rebuild_pose(obt, arm);
}
- DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
-void ED_armature_apply_transform(Object *ob, float mat[4][4])
+
+
+void apply_rot_armature (Scene *scene, Object *ob, float mat[3][3])
{
EditBone *ebone;
bArmature *arm= ob->data;
- float scale = Mat4ToScalef(mat); /* store the scale of the matrix here to use on envelopes */
+ float scale = Mat3ToScalef(mat); /* store the scale of the matrix here to use on envelopes */
/* Put the armature into editmode */
ED_armature_to_edit(ob);
/* Do the rotations */
for (ebone = arm->edbo->first; ebone; ebone=ebone->next){
- Mat4MulVecfl(mat, ebone->head);
- Mat4MulVecfl(mat, ebone->tail);
+ Mat3MulVecfl(mat, ebone->head);
+ Mat3MulVecfl(mat, ebone->tail);
ebone->rad_head *= scale;
ebone->rad_tail *= scale;
@@ -363,7 +365,7 @@ void ED_armature_apply_transform(Object *ob, float mat[4][4])
}
/* Turn the list into an armature */
- ED_armature_from_edit(ob);
+ ED_armature_from_edit(scene, ob);
ED_armature_edit_free(ob);
}
@@ -409,7 +411,7 @@ void docenter_armature (Scene *scene, View3D *v3d, Object *ob, int centermode)
}
/* Turn the list into an armature */
- ED_armature_from_edit(ob);
+ ED_armature_from_edit(scene, ob);
/* Adjust object location for new centerpoint */
if(centermode && obedit==NULL) {
@@ -555,7 +557,7 @@ static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op)
}
/* convert editbones back to bones */
- ED_armature_from_edit(ob);
+ ED_armature_from_edit(scene, ob);
/* flush positions of posebones */
where_is_pose(scene, ob);
@@ -789,7 +791,7 @@ int join_armature_exec(bContext *C, wmOperator *op)
DAG_scene_sort(scene); // because we removed object(s)
- ED_armature_from_edit(ob);
+ ED_armature_from_edit(scene, ob);
ED_armature_edit_free(ob);
WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
@@ -992,7 +994,7 @@ static void separate_armature_bones (Scene *scene, Object *ob, short sel)
}
/* exit editmode (recalculates pchans too) */
- ED_armature_from_edit(ob);
+ ED_armature_from_edit(scene, ob);
ED_armature_edit_free(ob);
}
@@ -1035,7 +1037,7 @@ static int separate_armature_exec (bContext *C, wmOperator *op)
oldob->mode &= ~OB_MODE_POSE;
//oldbase->flag &= ~OB_POSEMODE;
- ED_armature_from_edit(obedit);
+ ED_armature_from_edit(scene, obedit);
ED_armature_edit_free(obedit);
/* 2) duplicate base */
@@ -1052,8 +1054,8 @@ static int separate_armature_exec (bContext *C, wmOperator *op)
/* 4) fix links before depsgraph flushes */ // err... or after?
separated_armature_fix_links(oldob, newob);
- DAG_id_flush_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */
- DAG_id_flush_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */
+ DAG_object_flush_update(scene, oldob, OB_RECALC_DATA); /* this is the original one */
+ DAG_object_flush_update(scene, newob, OB_RECALC_DATA); /* this is the separated one */
/* 5) restore original conditions */
@@ -1888,7 +1890,7 @@ void mouse_armature(bContext *C, short mval[2], int extend)
if(nearBone->flag & BONE_SELECTED) nearBone->flag |= BONE_ACTIVE;
}
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, vc.obedit);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, vc.obedit);
}
}
@@ -4332,8 +4334,8 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor
/* in weightpaint we select the associated vertex group too */
if (ob->mode & OB_MODE_WEIGHT_PAINT) {
if (nearBone->flag & BONE_ACTIVE) {
- ED_vgroup_select_by_name(OBACT, nearBone->name);
- DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA);
+ vertexgroup_select_by_name(OBACT, nearBone->name);
+ DAG_object_flush_update(scene, OBACT, OB_RECALC_DATA);
}
}
@@ -4443,7 +4445,7 @@ static int bone_skinnable(Object *ob, Bone *bone, void *datap)
return 0;
}
-static int ED_vgroup_add_unique_bone(Object *ob, Bone *bone, void *data)
+static int add_defgroup_unique_bone(Object *ob, Bone *bone, void *data)
{
/* This group creates a vertex group to ob that has the
* same name as bone (provided the bone is skinnable).
@@ -4451,7 +4453,7 @@ static int ED_vgroup_add_unique_bone(Object *ob, Bone *bone, void *data)
*/
if (!(bone->flag & BONE_NO_DEFORM)) {
if (!get_named_vertexgroup(ob,bone->name)) {
- ED_vgroup_add_name(ob, bone->name);
+ add_defgroup_name(ob, bone->name);
return 1;
}
}
@@ -4495,7 +4497,7 @@ static int dgroup_skinnable(Object *ob, Bone *bone, void *datap)
segments = 1;
if (!(defgroup = get_named_vertexgroup(ob, bone->name)))
- defgroup = ED_vgroup_add_name(ob, bone->name);
+ defgroup = add_defgroup_name(ob, bone->name);
if (data->list != NULL) {
hgroup = (bDeformGroup ***) &data->list;
@@ -4546,17 +4548,17 @@ static void envelope_bone_weighting(Object *ob, Mesh *mesh, float (*verts)[3], i
/* add the vert to the deform group if weight!=0.0 */
if (distance!=0.0)
- ED_vgroup_vert_add (ob, dgroup, i, distance, WEIGHT_REPLACE);
+ add_vert_to_defgroup (ob, dgroup, i, distance, WEIGHT_REPLACE);
else
- ED_vgroup_vert_remove (ob, dgroup, i);
+ remove_vert_defgroup (ob, dgroup, i);
/* do same for mirror */
if (dgroupflip && dgroupflip[j] && iflip >= 0) {
if (distance!=0.0)
- ED_vgroup_vert_add (ob, dgroupflip[j], iflip, distance,
+ add_vert_to_defgroup (ob, dgroupflip[j], iflip, distance,
WEIGHT_REPLACE);
else
- ED_vgroup_vert_remove (ob, dgroupflip[j], iflip);
+ remove_vert_defgroup (ob, dgroupflip[j], iflip);
}
}
}
@@ -4746,10 +4748,10 @@ void create_vgroups_from_armature(Scene *scene, Object *ob, Object *par, int mod
/* Traverse the bone list, trying to create empty vertex
* groups cooresponding to the bone.
*/
- bone_looper(ob, arm->bonebase.first, NULL, ED_vgroup_add_unique_bone);
+ bone_looper(ob, arm->bonebase.first, NULL, add_defgroup_unique_bone);
if (ob->type == OB_MESH)
- ED_vgroup_data_create(ob->data);
+ create_dverts(ob->data);
}
else if(mode == ARM_GROUPS_ENVELOPE || mode == ARM_GROUPS_AUTO) {
/* Traverse the bone list, trying to create vertex groups
@@ -4763,6 +4765,7 @@ void create_vgroups_from_armature(Scene *scene, Object *ob, Object *par, int mod
static int pose_clear_scale_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
/* only clear those channels that are not locked */
@@ -4779,7 +4782,7 @@ static int pose_clear_scale_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
@@ -4804,6 +4807,7 @@ void POSE_OT_scale_clear(wmOperatorType *ot)
static int pose_clear_loc_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
/* only clear those channels that are not locked */
@@ -4820,7 +4824,7 @@ static int pose_clear_loc_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
@@ -4845,6 +4849,7 @@ void POSE_OT_loc_clear(wmOperatorType *ot)
static int pose_clear_rot_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
/* only clear those channels that are not locked */
@@ -4894,7 +4899,7 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
@@ -5332,6 +5337,7 @@ void ED_armature_bone_rename(bArmature *arm, char *oldnamep, char *newnamep)
static int armature_flip_names_exec (bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_edit_object(C);
bArmature *arm;
char newname[32];
@@ -5351,7 +5357,7 @@ static int armature_flip_names_exec (bContext *C, wmOperator *op)
CTX_DATA_END;
/* since we renamed stuff... */
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
@@ -5377,10 +5383,11 @@ void ARMATURE_OT_flip_names (wmOperatorType *ot)
static int armature_autoside_names_exec (bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_edit_object(C);
bArmature *arm;
char newname[32];
- short axis= RNA_enum_get(op->ptr, "type");
+ short axis= RNA_enum_get(op->ptr, "axis");
/* paranoia checks */
if (ELEM(NULL, ob, ob->pose))
@@ -5397,7 +5404,7 @@ static int armature_autoside_names_exec (bContext *C, wmOperator *op)
CTX_DATA_END;
/* since we renamed stuff... */
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
@@ -5427,7 +5434,7 @@ void ARMATURE_OT_autoside_names (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* settings */
- RNA_def_enum(ot->srna, "type", axis_items, 0, "Axis", "Axis tag names with.");
+ RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Axis tag names with.");
}
@@ -5657,7 +5664,7 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
if (obedit != NULL)
{
- ED_armature_from_edit(obedit);
+ ED_armature_from_edit(scene, obedit);
ED_armature_edit_free(obedit);
}
diff --git a/source/blender/editors/armature/editarmature_generate.c b/source/blender/editors/armature/editarmature_generate.c
index d327ed34839..6c0eab16af0 100644
--- a/source/blender/editors/armature/editarmature_generate.c
+++ b/source/blender/editors/armature/editarmature_generate.c
@@ -30,7 +30,6 @@
#include <string.h>
#include <math.h>
-#include <float.h>
#include "MEM_guardedalloc.h"
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index 16e78f7c8d1..1d87ca8a6df 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -2732,7 +2732,7 @@ static void adjustGraphs(bContext *C, RigGraph *rigg)
/* Turn the list into an armature */
arm->edbo = rigg->editbones;
- ED_armature_from_edit(rigg->ob);
+ ED_armature_from_edit(scene, rigg->ob);
ED_undo_push(C, "Retarget Skeleton");
}
@@ -2762,7 +2762,7 @@ static void retargetGraphs(bContext *C, RigGraph *rigg)
/* Turn the list into an armature */
arm->edbo = rigg->editbones;
- ED_armature_from_edit(rigg->ob);
+ ED_armature_from_edit(scene, rigg->ob);
}
char *RIG_nameBone(RigGraph *rg, int arc_index, int bone_index)
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index a6c94bee5b1..1b167518a5a 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -672,9 +672,9 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numbones,
/* clear weights */
if(bbone && firstsegment) {
for(a=0; a<me->totvert; a++) {
- ED_vgroup_vert_remove(ob, dgrouplist[j], a);
+ remove_vert_defgroup(ob, dgrouplist[j], a);
if(vertsflipped && dgroupflip[j] && vertsflipped[a] >= 0)
- ED_vgroup_vert_remove(ob, dgroupflip[j], vertsflipped[a]);
+ remove_vert_defgroup(ob, dgroupflip[j], vertsflipped[a]);
}
}
@@ -694,32 +694,32 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numbones,
if(bbone) {
if(solution > 0.0f)
- ED_vgroup_vert_add(ob, dgrouplist[j], a, solution,
+ add_vert_to_defgroup(ob, dgrouplist[j], a, solution,
WEIGHT_ADD);
}
else {
weight= heat_limit_weight(solution);
if(weight > 0.0f)
- ED_vgroup_vert_add(ob, dgrouplist[j], a, weight,
+ add_vert_to_defgroup(ob, dgrouplist[j], a, weight,
WEIGHT_REPLACE);
else
- ED_vgroup_vert_remove(ob, dgrouplist[j], a);
+ remove_vert_defgroup(ob, dgrouplist[j], a);
}
/* do same for mirror */
if(vertsflipped && dgroupflip[j] && vertsflipped[a] >= 0) {
if(bbone) {
if(solution > 0.0f)
- ED_vgroup_vert_add(ob, dgroupflip[j], vertsflipped[a],
+ add_vert_to_defgroup(ob, dgroupflip[j], vertsflipped[a],
solution, WEIGHT_ADD);
}
else {
weight= heat_limit_weight(solution);
if(weight > 0.0f)
- ED_vgroup_vert_add(ob, dgroupflip[j], vertsflipped[a],
+ add_vert_to_defgroup(ob, dgroupflip[j], vertsflipped[a],
weight, WEIGHT_REPLACE);
else
- ED_vgroup_vert_remove(ob, dgroupflip[j], vertsflipped[a]);
+ remove_vert_defgroup(ob, dgroupflip[j], vertsflipped[a]);
}
}
}
@@ -734,16 +734,16 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numbones,
/* remove too small vertex weights */
if(bbone && lastsegment) {
for(a=0; a<me->totvert; a++) {
- weight= ED_vgroup_vert_weight(ob, dgrouplist[j], a);
+ weight= get_vert_defgroup(ob, dgrouplist[j], a);
weight= heat_limit_weight(weight);
if(weight <= 0.0f)
- ED_vgroup_vert_remove(ob, dgrouplist[j], a);
+ remove_vert_defgroup(ob, dgrouplist[j], a);
if(vertsflipped && dgroupflip[j] && vertsflipped[a] >= 0) {
- weight= ED_vgroup_vert_weight(ob, dgroupflip[j], vertsflipped[a]);
+ weight= get_vert_defgroup(ob, dgroupflip[j], vertsflipped[a]);
weight= heat_limit_weight(weight);
if(weight <= 0.0f)
- ED_vgroup_vert_remove(ob, dgroupflip[j], vertsflipped[a]);
+ remove_vert_defgroup(ob, dgroupflip[j], vertsflipped[a]);
}
}
}
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index 56d714fd058..021bec05a3b 100644
--- a/source/blender/editors/armature/poselib.c
+++ b/source/blender/editors/armature/poselib.c
@@ -843,7 +843,7 @@ static void poselib_preview_apply (bContext *C, wmOperator *op)
*/
// FIXME: shouldn't this use the builtin stuff?
if ((pld->arm->flag & ARM_DELAYDEFORM)==0)
- DAG_id_flush_update(&pld->ob->id, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_object_flush_update(pld->scene, pld->ob, OB_RECALC_DATA); /* sets recalc flags */
else
where_is_pose(pld->scene, pld->ob);
}
@@ -1346,7 +1346,7 @@ static void poselib_preview_cleanup (bContext *C, wmOperator *op)
* - note: code copied from transform_generics.c -> recalcData()
*/
if ((arm->flag & ARM_DELAYDEFORM)==0)
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA); /* sets recalc flags */
else
where_is_pose(scene, ob);
@@ -1360,7 +1360,7 @@ static void poselib_preview_cleanup (bContext *C, wmOperator *op)
action_set_activemarker(act, marker, 0);
/* Update event for pose and deformation children */
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
/* updates */
if (IS_AUTOKEY_MODE(scene, NORMAL)) {
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 0ae92de4407..5b378878f91 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -125,8 +125,9 @@ void ED_armature_enter_posemode(bContext *C, Base *base)
switch (ob->type){
case OB_ARMATURE:
- ob->restore_mode = ob->mode;
+
ob->mode |= OB_MODE_POSE;
+ base->flag= ob->flag;
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_POSE, NULL);
@@ -135,7 +136,7 @@ void ED_armature_enter_posemode(bContext *C, Base *base)
return;
}
- //ED_object_toggle_modes(C, ob->mode);
+ ED_object_toggle_modes(C, ob->mode);
}
void ED_armature_exit_posemode(bContext *C, Base *base)
@@ -143,8 +144,8 @@ void ED_armature_exit_posemode(bContext *C, Base *base)
if(base) {
Object *ob= base->object;
- ob->restore_mode = ob->mode;
ob->mode &= ~OB_MODE_POSE;
+ base->flag= ob->flag;
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL);
}
@@ -759,7 +760,6 @@ void pose_copy_menu(Scene *scene)
break;
case 2: /* Local Rotation */
QUATCOPY(pchan->quat, pchanact->quat);
- VECCOPY(pchan->eul, pchanact->eul);
break;
case 3: /* Local Size */
VECCOPY(pchan->size, pchanact->size);
@@ -808,14 +808,11 @@ void pose_copy_menu(Scene *scene)
break;
case 10: /* Visual Rotation */
{
- float delta_mat[4][4];
+ float delta_mat[4][4], quat[4];
armature_mat_pose_to_bone(pchan, pchanact->pose_mat, delta_mat);
-
- if (pchan->rotmode > 0)
- Mat4ToEulO(delta_mat, pchan->eul, pchan->rotmode);
- else
- Mat4ToQuat(delta_mat, pchan->quat);
+ Mat4ToQuat(delta_mat, quat);
+ QUATCOPY(pchan->quat, quat);
}
break;
case 11: /* Visual Size */
@@ -892,7 +889,7 @@ void pose_copy_menu(Scene *scene)
ob->pose->flag |= POSE_RECALC;
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA); // and all its relations
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA); // and all its relations
BIF_undo_push("Copy Pose Attributes");
@@ -993,20 +990,20 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
/* check if rotation modes are compatible (i.e. do they need any conversions) */
if (pchan->rotmode == chan->rotmode) {
/* copy the type of rotation in use */
- if (pchan->rotmode > 0) {
+ if (pchan->rotmode) {
VECCOPY(pchan->eul, chan->eul);
}
else {
QUATCOPY(pchan->quat, chan->quat);
}
}
- else if (pchan->rotmode > 0) {
+ else if (pchan->rotmode) {
/* quat to euler */
- QuatToEulO(chan->quat, pchan->eul, pchan->rotmode);
+ QuatToEul(chan->quat, pchan->eul);
}
else {
/* euler to quat */
- EulOToQuat(chan->eul, chan->rotmode, pchan->quat);
+ EulToQuat(chan->eul, pchan->quat);
}
/* paste flipped pose? */
@@ -1014,7 +1011,7 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
pchan->loc[0]*= -1;
/* has to be done as eulers... */
- if (pchan->rotmode > 0) {
+ if (pchan->rotmode) {
pchan->eul[1] *= -1;
pchan->eul[2] *= -1;
}
@@ -1066,7 +1063,7 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
}
/* Update event for pose and deformation children */
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
if (IS_AUTOKEY_ON(scene)) {
// XXX remake_action_ipos(ob->action);
@@ -1123,7 +1120,7 @@ void pose_adds_vgroups(Scene *scene, Object *meshobj, int heatweights)
// and all its relations
- DAG_id_flush_update(&meshobj->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, meshobj, OB_RECALC_DATA);
}
/* ********************************************** */
@@ -1539,6 +1536,7 @@ void pose_select_grouped_menu (Scene *scene)
static int pose_flip_names_exec (bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
bArmature *arm;
char newname[32];
@@ -1558,7 +1556,7 @@ static int pose_flip_names_exec (bContext *C, wmOperator *op)
CTX_DATA_END;
/* since we renamed stuff... */
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
@@ -1585,6 +1583,7 @@ void POSE_OT_flip_names (wmOperatorType *ot)
static int pose_autoside_names_exec (bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
bArmature *arm;
char newname[32];
@@ -1605,7 +1604,7 @@ static int pose_autoside_names_exec (bContext *C, wmOperator *op)
CTX_DATA_END;
/* since we renamed stuff... */
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
@@ -1673,8 +1672,8 @@ void pose_activate_flipped_bone(Scene *scene)
/* in weightpaint we select the associated vertex group too */
if(ob->mode & OB_MODE_WEIGHT_PAINT) {
- ED_vgroup_select_by_name(OBACT, name);
- DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA);
+ vertexgroup_select_by_name(OBACT, name);
+ DAG_object_flush_update(scene, OBACT, OB_RECALC_DATA);
}
// XXX notifiers need to be sent to other editors to update
@@ -2113,7 +2112,7 @@ void pose_relax(Scene *scene)
pchan->bone->flag &= ~ BONE_TRANSFORM;
/* do depsgraph flush */
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
BIF_undo_push("Relax Pose");
}
@@ -2208,7 +2207,7 @@ void pose_clear_user_transforms(Scene *scene, Object *ob)
rest_pose(ob->pose);
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
BIF_undo_push("Clear User Transform");
}
diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c
index a242e424aa0..6006c7e656b 100644
--- a/source/blender/editors/curve/curve_ops.c
+++ b/source/blender/editors/curve/curve_ops.c
@@ -202,11 +202,8 @@ void ED_keymap_curve(wmWindowManager *wm)
RNA_int_set(WM_keymap_add_item(keymap, "FONT_OT_change_character", DOWNARROWKEY, KM_PRESS, KM_ALT, 0)->ptr, "delta", -1);
WM_keymap_add_item(keymap, "FONT_OT_text_copy", CKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "FONT_OT_text_copy", CKEY, KM_PRESS, KM_OSKEY, 0);
WM_keymap_add_item(keymap, "FONT_OT_text_cut", XKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "FONT_OT_text_cut", XKEY, KM_PRESS, KM_OSKEY, 0);
- WM_keymap_add_item(keymap, "FONT_OT_text_paste", VKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "FONT_OT_text_paste", VKEY, KM_PRESS, KM_OSKEY, 0);
+ WM_keymap_add_item(keymap, "FONT_OT_text_paste", PKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "FONT_OT_line_break", RETKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "FONT_OT_text_insert", KM_TEXTINPUT, KM_ANY, KM_ANY, 0); // last!
@@ -233,7 +230,7 @@ void ED_keymap_curve(wmWindowManager *wm)
WM_keymap_add_item(keymap, "CURVE_OT_delete", DELKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "CURVE_OT_tilt_clear", TKEY, KM_PRESS, KM_ALT, 0);
- RNA_enum_set(WM_keymap_add_item(keymap, "TFM_OT_transform", TKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", TFM_TILT);
+ RNA_enum_set(WM_keymap_add_item(keymap, "TFM_OT_transform", TKEY, KM_PRESS, 0, 0)->ptr, "mode", TFM_TILT);
RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_handle_type_set", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", 1);
RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_handle_type_set", HKEY, KM_PRESS, 0, 0)->ptr, "type", 3);
RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_handle_type_set", VKEY, KM_PRESS, 0, 0)->ptr, "type", 2);
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index e346ccafde3..28a9d3ac7c9 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -86,6 +86,9 @@
/* still need to eradicate a few :( */
#define callocstructN(x,y,name) (x*)MEM_callocN((y)* sizeof(x),name)
+/* for curve objects in editmode that can have hidden handles */
+#define BEZSELECTED_HIDDENHANDLES(bezt) ((G.f & G_HIDDENHANDLES) ? (bezt)->f2 & SELECT : BEZSELECTED(bezt))
+
float nurbcircle[8][2]= {
{0.0, -1.0}, {-1.0, -1.0}, {-1.0, 0.0}, {-1.0, 1.0},
{0.0, 1.0}, { 1.0, 1.0}, { 1.0, 0.0}, { 1.0, -1.0}
@@ -191,7 +194,7 @@ int isNurbsel(Nurb *nu)
BPoint *bp;
int a;
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
@@ -210,17 +213,17 @@ int isNurbsel(Nurb *nu)
return 0;
}
-int isNurbsel_count(Curve *cu, Nurb *nu)
+int isNurbsel_count(Nurb *nu)
{
BezTriple *bezt;
BPoint *bp;
int a, sel=0;
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
- if (BEZSELECTED_HIDDENHANDLES(cu, bezt)) sel++;
+ if (BEZSELECTED_HIDDENHANDLES(bezt)) sel++;
bezt++;
}
}
@@ -244,7 +247,7 @@ void printknots(Object *obedit)
int a, num;
for(nu= editnurb->first; nu; nu= nu->next) {
- if(isNurbsel(nu) && nu->type == CU_NURBS) {
+ if(isNurbsel(nu) && (nu->type & 7)==CU_NURBS) {
if(nu->knotsu) {
num= KNOTSU(nu);
for(a=0;a<num;a++) printf("knotu %d: %f\n", a, nu->knotsu[a]);
@@ -266,8 +269,6 @@ void load_editNurb(Object *obedit)
if(obedit==NULL) return;
- set_actNurb(obedit, NULL);
-
if (ELEM(obedit->type, OB_CURVE, OB_SURF)) {
Curve *cu= obedit->data;
Nurb *nu, *newnu;
@@ -299,7 +300,7 @@ void load_editNurb(Object *obedit)
newnu= duplicateNurb(nu);
BLI_addtail(&(cu->nurb), newnu);
- if(nu->type == CU_NURBS) {
+ if((nu->type & 7)==CU_NURBS) {
clamp_nurb_order_u(nu);
}
}
@@ -313,13 +314,11 @@ void load_editNurb(Object *obedit)
void make_editNurb(Object *obedit)
{
ListBase *editnurb= curve_get_editcurve(obedit);
- Nurb *nu, *newnu, *nu_act= NULL;
+ Nurb *nu, *newnu;
KeyBlock *actkey;
if(obedit==NULL) return;
- set_actNurb(obedit, NULL);
-
if (ELEM(obedit->type, OB_CURVE, OB_SURF)) {
Curve *cu= obedit->data;
@@ -335,12 +334,6 @@ void make_editNurb(Object *obedit)
newnu= duplicateNurb(nu);
test2DNurb(newnu); // after join, or any other creation of curve
BLI_addtail(editnurb, newnu);
-
- if (nu_act == NULL && isNurbsel(nu)) {
- nu_act= newnu;
- set_actNurb(obedit, newnu);
- }
-
nu= nu->next;
}
@@ -350,6 +343,8 @@ void make_editNurb(Object *obedit)
key_to_curve(actkey, cu, editnurb);
}
}
+
+ set_actNurb(obedit, NULL);
}
void free_editNurb(Object *obedit)
@@ -414,10 +409,10 @@ static int separate_exec(bContext *C, wmOperator *op)
load_editNurb(newob);
free_editNurb(newob);
- DAG_id_flush_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */
- DAG_id_flush_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */
+ DAG_object_flush_update(scene, oldob, OB_RECALC_DATA); /* this is the original one */
+ DAG_object_flush_update(scene, newob, OB_RECALC_DATA); /* this is the separated one */
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, oldob->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, oldob);
WM_cursor_wait(0);
@@ -489,7 +484,7 @@ static void setflagsNurb(ListBase *editnurb, short flag)
int a;
for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ if( (nu->type & 7)==CU_BEZIER) {
a= nu->pntsu;
bezt= nu->bezt;
while(a--) {
@@ -516,7 +511,7 @@ static void rotateflagNurb(ListBase *editnurb, short flag, float *cent, float ro
int a;
for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_NURBS) {
+ if((nu->type & 7)==CU_NURBS) {
bp= nu->bp;
a= nu->pntsu*nu->pntsv;
@@ -545,7 +540,7 @@ static void translateflagNurb(ListBase *editnurb, short flag, float *vec)
int a;
for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ if( (nu->type & 7)==CU_BEZIER) {
a= nu->pntsu;
bezt= nu->bezt;
while(a--) {
@@ -575,7 +570,7 @@ static void weightflagNurb(ListBase *editnurb, short flag, float w, int mode) /*
int a;
for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_NURBS) {
+ if((nu->type & 7)==CU_NURBS) {
a= nu->pntsu*nu->pntsv;
bp= nu->bp;
while(a--) {
@@ -839,7 +834,7 @@ static void adduplicateflagNurb(Object *obedit, short flag)
nu= editnurb->last;
while(nu) {
- if(nu->type == CU_BEZIER) {
+ if( (nu->type & 7)==CU_BEZIER) {
bezt= nu->bezt;
for(a=0; a<nu->pntsu; a++) {
enda= -1;
@@ -1010,8 +1005,8 @@ static int switch_direction_exec(bContext *C, wmOperator *op)
if(isNurbsel(nu))
switchdirectionNurb(nu);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
return OPERATOR_FINISHED;
}
@@ -1057,8 +1052,8 @@ static int set_weight_exec(bContext *C, wmOperator *op)
}
}
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
return OPERATOR_FINISHED;
}
@@ -1108,8 +1103,8 @@ static int set_radius_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -1183,8 +1178,8 @@ static int smooth_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -1348,8 +1343,8 @@ static int smooth_radius_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -1386,7 +1381,7 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short
for(nu= editnurb->first; nu; nu= nu->next) {
lastsel=0;
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
a= nu->pntsu;
bezt= nu->bezt;
if(next < 0) bezt= (nu->bezt + (a-1));
@@ -1452,7 +1447,7 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
for(nu= editnurb->first; nu; nu= nu->next) {
sel= 0;
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
a= nu->pntsu;
/* which point? */
@@ -1498,7 +1493,7 @@ static int de_select_first_exec(bContext *C, wmOperator *op)
Object *obedit= CTX_data_edit_object(C);
selectend_nurb(obedit, FIRST, 1, DESELECT);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1522,7 +1517,7 @@ static int de_select_last_exec(bContext *C, wmOperator *op)
Object *obedit= CTX_data_edit_object(C);
selectend_nurb(obedit, LAST, 1, DESELECT);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1551,7 +1546,7 @@ static short nurb_has_selected_cps(ListBase *editnurb)
int a;
for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
a= nu->pntsu;
bezt= nu->bezt;
while(a--) {
@@ -1590,7 +1585,7 @@ static int de_select_all_exec(bContext *C, wmOperator *op)
select_adjacent_cp(editnurb, 1, 1, SELECT); /* cascade selection */
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1614,7 +1609,6 @@ void CURVE_OT_select_all_toggle(wmOperatorType *ot)
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);
Nurb *nu;
BPoint *bp;
@@ -1622,16 +1616,16 @@ static int hide_exec(bContext *C, wmOperator *op)
int a, sel, invert= RNA_boolean_get(op->ptr, "unselected");
for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
sel= 0;
while(a--) {
- if(invert == 0 && BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
+ if(invert == 0 && BEZSELECTED_HIDDENHANDLES(bezt)) {
select_beztriple(bezt, DESELECT, 1, HIDDEN);
bezt->hide= 1;
}
- else if(invert && !BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
+ else if(invert && !BEZSELECTED_HIDDENHANDLES(bezt)) {
select_beztriple(bezt, DESELECT, 1, HIDDEN);
bezt->hide= 1;
}
@@ -1660,8 +1654,8 @@ static int hide_exec(bContext *C, wmOperator *op)
}
}
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1696,7 +1690,7 @@ static int reveal_exec(bContext *C, wmOperator *op)
for(nu= editnurb->first; nu; nu= nu->next) {
nu->hide= 0;
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
@@ -1720,8 +1714,8 @@ static int reveal_exec(bContext *C, wmOperator *op)
}
}
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1745,7 +1739,6 @@ void CURVE_OT_reveal(wmOperatorType *ot)
static int select_inverse_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
ListBase *editnurb= curve_get_editcurve(obedit);
Nurb *nu;
BPoint *bp;
@@ -1753,13 +1746,13 @@ static int select_inverse_exec(bContext *C, wmOperator *op)
int a;
for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
if(bezt->hide==0) {
bezt->f2 ^= SELECT; /* always do the center point */
- if((cu->drawflag & CU_HIDE_HANDLES)==0) {
+ if ((G.f & G_HIDDENHANDLES)==0) {
bezt->f1 ^= SELECT;
bezt->f3 ^= SELECT;
}
@@ -1777,7 +1770,7 @@ static int select_inverse_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1810,7 +1803,6 @@ void CURVE_OT_select_inverse(wmOperatorType *ot)
static int subdivide_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
ListBase *editnurb= curve_get_editcurve(obedit);
Nurb *nu;
BezTriple *prevbezt, *bezt, *beztnew, *beztn;
@@ -1822,7 +1814,7 @@ static int subdivide_exec(bContext *C, wmOperator *op)
for(nu= editnurb->first; nu; nu= nu->next) {
amount= 0;
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
/*
Insert a point into a 2D Bezier curve.
Endpoints are preserved. Otherwise, all selected and inserted points are
@@ -1840,7 +1832,7 @@ static int subdivide_exec(bContext *C, wmOperator *op)
bezt= prevbezt+1;
}
while(a--) {
- if( BEZSELECTED_HIDDENHANDLES(cu, prevbezt) && BEZSELECTED_HIDDENHANDLES(cu, bezt) ) amount++;
+ if( BEZSELECTED_HIDDENHANDLES(prevbezt) && BEZSELECTED_HIDDENHANDLES(bezt) ) amount++;
prevbezt= bezt;
bezt++;
}
@@ -1864,7 +1856,7 @@ static int subdivide_exec(bContext *C, wmOperator *op)
memcpy(beztn, prevbezt, sizeof(BezTriple));
beztn++;
- if( BEZSELECTED_HIDDENHANDLES(cu, prevbezt) && BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
+ if( BEZSELECTED_HIDDENHANDLES(prevbezt) && BEZSELECTED_HIDDENHANDLES(bezt) ) {
memcpy(beztn, bezt, sizeof(BezTriple));
/* midpoint subdividing */
@@ -1903,7 +1895,7 @@ static int subdivide_exec(bContext *C, wmOperator *op)
calchandlesNurb(nu);
}
- } /* End of 'if(nu->type == CU_BEZIER)' */
+ } /* End of 'if((nu->type & 7)==CU_BEZIER)' */
else if (nu->pntsv==1) {
/*
All flat lines (ie. co-planar), except flat Nurbs. Flat NURB curves
@@ -1972,7 +1964,7 @@ static int subdivide_exec(bContext *C, wmOperator *op)
}
}
} /* End of 'else if(nu->pntsv==1)' */
- else if(nu->type == CU_NURBS) {
+ else if((nu->type & 7)==CU_NURBS) {
/* This is a very strange test ... */
/**
Subdivide NURB surfaces - nzc 30-5-'00 -
@@ -2171,11 +2163,11 @@ static int subdivide_exec(bContext *C, wmOperator *op)
MEM_freeN(usel);
MEM_freeN(vsel);
- } /* End of 'if(nu->type == CU_NURBS)' */
+ } /* End of 'if((nu->type & 7)==CU_NURBS)' */
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -2264,7 +2256,7 @@ static void findselectedNurbvert(ListBase *editnurb, Nurb **nu, BezTriple **bezt
*bezt= 0;
*bp= 0;
for(nu1= editnurb->first; nu1; nu1= nu1->next) {
- if(nu1->type == CU_BEZIER) {
+ if((nu1->type & 7)==CU_BEZIER) {
bezt1= nu1->bezt;
a= nu1->pntsu;
while(a--) {
@@ -2321,7 +2313,7 @@ static int convertspline(short type, Nurb *nu)
BPoint *bp;
int a, c, nr;
- if(nu->type == CU_POLY) {
+ if((nu->type & 7)==CU_POLY) {
if(type==CU_BEZIER) { /* to Bezier with vecthandles */
nr= nu->pntsu;
bezt =
@@ -2341,11 +2333,13 @@ static int convertspline(short type, Nurb *nu)
MEM_freeN(nu->bp);
nu->bp= 0;
nu->pntsu= nr;
- nu->type = CU_BEZIER;
+ nu->type &= ~7;
+ nu->type |= CU_BEZIER;
calchandlesNurb(nu);
}
else if(type==CU_NURBS) {
- nu->type = CU_NURBS;
+ nu->type &= ~7;
+ nu->type |= CU_NURBS;
nu->orderu= 4;
nu->flagu &= CU_CYCLIC; /* disable all flags except for cyclic */
nu->flagu += 4;
@@ -2358,15 +2352,15 @@ static int convertspline(short type, Nurb *nu)
}
}
}
- else if(nu->type == CU_BEZIER) { /* Bezier */
- if(type==CU_POLY || type==CU_NURBS) {
+ else if((nu->type & 7)==CU_BEZIER) { /* Bezier */
+ if(type==0 || type==4) { /* to Poly or Nurb */
nr= 3*nu->pntsu;
nu->bp = MEM_callocN(nr * sizeof(BPoint), "setsplinetype");
a= nu->pntsu;
bezt= nu->bezt;
bp= nu->bp;
while(a--) {
- if(type==CU_POLY && bezt->h1==HD_VECT && bezt->h2==HD_VECT) {
+ if(type==0 && bezt->h1==HD_VECT && bezt->h2==HD_VECT) {
/* vector handle becomes 1 poly vertice */
VECCOPY(bp->vec, bezt->vec[1]);
bp->vec[3]= 1.0;
@@ -2391,24 +2385,25 @@ static int convertspline(short type, Nurb *nu)
bezt++;
}
MEM_freeN(nu->bezt);
- nu->bezt= NULL;
+ nu->bezt= 0;
nu->pntsu= nr;
nu->pntsv= 1;
nu->orderu= 4;
nu->orderv= 1;
- nu->type = type;
+ nu->type &= ~7;
+ nu->type+= type;
if(nu->flagu & CU_CYCLIC) c= nu->orderu-1;
else c= 0;
- if(type== CU_NURBS) {
+ if(type== 4) {
nu->flagu &= CU_CYCLIC; /* disable all flags except for cyclic */
nu->flagu += 4;
makeknots(nu, 1);
}
}
}
- else if(nu->type == CU_NURBS) {
- if(type==CU_POLY) {
- nu->type = CU_POLY;
+ else if((nu->type & 7)==CU_NURBS) {
+ if(type==0) { /* to Poly */
+ nu->type &= ~7;
if(nu->knotsu) MEM_freeN(nu->knotsu); /* python created nurbs have a knotsu of zero */
nu->knotsu= NULL;
if(nu->knotsv) MEM_freeN(nu->knotsv);
@@ -2443,7 +2438,8 @@ static int convertspline(short type, Nurb *nu)
MEM_freeN(nu->knotsu);
nu->knotsu= NULL;
nu->pntsu= nr;
- nu->type = CU_BEZIER;
+ nu->type &= ~7;
+ nu->type |= CU_BEZIER;
}
}
}
@@ -2472,15 +2468,7 @@ static int set_spline_type_exec(bContext *C, wmOperator *op)
}
}
- if(changed) {
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
-
- return OPERATOR_FINISHED;
- }
- else {
- return OPERATOR_CANCELLED;
- }
+ return (changed)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
}
void CURVE_OT_spline_type_set(wmOperatorType *ot)
@@ -2488,8 +2476,8 @@ void CURVE_OT_spline_type_set(wmOperatorType *ot)
static EnumPropertyItem type_items[]= {
{CU_POLY, "POLY", 0, "Poly", ""},
{CU_BEZIER, "BEZIER", 0, "Bezier", ""},
-// {CU_CARDINAL, "CARDINAL", 0, "Cardinal", ""},
-// {CU_BSPLINE, "B_SPLINE", 0, "B-Spline", ""},
+ {CU_CARDINAL, "CARDINAL", 0, "Cardinal", ""},
+ {CU_BSPLINE, "B_SPLINE", 0, "B-Spline", ""},
{CU_NURBS, "NURBS", 0, "NURBS", ""},
{0, NULL, 0, NULL, NULL}};
@@ -2499,7 +2487,6 @@ void CURVE_OT_spline_type_set(wmOperatorType *ot)
/* api callbacks */
ot->exec= set_spline_type_exec;
- ot->invoke= WM_menu_invoke;
ot->poll= ED_operator_editcurve;
/* flags */
@@ -2513,13 +2500,14 @@ void CURVE_OT_spline_type_set(wmOperatorType *ot)
static int set_handle_type_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
ListBase *editnurb= curve_get_editcurve(obedit);
sethandlesNurb(editnurb, RNA_enum_get(op->ptr, "type"));
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -2812,7 +2800,7 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu
}
}
- if(nu1->type == CU_NURBS) {
+ if((nu1->type & 7)==CU_NURBS) {
/* merge knots */
makeknots(nu1, 1);
@@ -2873,8 +2861,8 @@ static int merge_nurb(bContext *C, wmOperator *op)
set_actNurb(obedit, NULL);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -2882,8 +2870,8 @@ static int merge_nurb(bContext *C, wmOperator *op)
static int make_segment_exec(bContext *C, wmOperator *op)
{
/* joins 2 curves */
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
ListBase *editnurb= curve_get_editcurve(obedit);
Nurb *nu, *nu1=0, *nu2=0;
BezTriple *bezt;
@@ -2899,8 +2887,8 @@ static int make_segment_exec(bContext *C, wmOperator *op)
if( isNurbsel(nu) ) {
if(nu->pntsu>1 && nu->pntsv>1) break;
- if(isNurbsel_count(cu, nu)>1) break;
- if(isNurbsel_count(cu, nu)==1) {
+ if(isNurbsel_count(nu)>1) break;
+ if(isNurbsel_count(nu)==1) {
/* only 1 selected, not first or last, a little complex, but intuitive */
if(nu->pntsv==1) {
if( (nu->bp->f1 & SELECT) || ((nu->bp+nu->pntsu-1)->f1 & SELECT));
@@ -2917,26 +2905,26 @@ static int make_segment_exec(bContext *C, wmOperator *op)
/* find both nurbs and points, nu1 will be put behind nu2 */
for(nu= editnurb->first; nu; nu= nu->next) {
if((nu->flagu & CU_CYCLIC)==0) { /* not cyclic */
- if(nu->type == CU_BEZIER) {
+ if( (nu->type & 7)==CU_BEZIER ) {
bezt= nu->bezt;
if(nu1==0) {
- if( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) nu1= nu;
+ if( BEZSELECTED_HIDDENHANDLES(bezt) ) nu1= nu;
else {
bezt= bezt+(nu->pntsu-1);
- if( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
+ if( BEZSELECTED_HIDDENHANDLES(bezt) ) {
nu1= nu;
switchdirectionNurb(nu);
}
}
}
else if(nu2==0) {
- if( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
+ if( BEZSELECTED_HIDDENHANDLES(bezt) ) {
nu2= nu;
switchdirectionNurb(nu);
}
else {
bezt= bezt+(nu->pntsu-1);
- if( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
+ if( BEZSELECTED_HIDDENHANDLES(bezt) ) {
nu2= nu;
}
}
@@ -2974,7 +2962,7 @@ static int make_segment_exec(bContext *C, wmOperator *op)
if((nu1 && nu2) && (nu1!=nu2)) {
if( nu1->type==nu2->type) {
- if(nu1->type == CU_BEZIER) {
+ if((nu1->type & 7)==CU_BEZIER) {
bezt =
(BezTriple*)MEM_mallocN((nu1->pntsu+nu2->pntsu) * sizeof(BezTriple), "addsegmentN");
memcpy(bezt, nu2->bezt, nu2->pntsu*sizeof(BezTriple));
@@ -3000,7 +2988,7 @@ static int make_segment_exec(bContext *C, wmOperator *op)
BLI_remlink(editnurb, nu2);
/* now join the knots */
- if(nu1->type == CU_NURBS) {
+ if((nu1->type & 7)==CU_NURBS) {
if(nu1->knotsu==NULL) {
makeknots(nu1, 1);
}
@@ -3027,8 +3015,8 @@ static int make_segment_exec(bContext *C, wmOperator *op)
set_actNurb(obedit, NULL); /* for selected */
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -3057,8 +3045,8 @@ void CURVE_OT_make_segment(wmOperatorType *ot)
void mouse_nurb(bContext *C, short mval[2], int extend)
{
Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
ListBase *editnurb= curve_get_editcurve(obedit);
+ Curve *cu= obedit->data;
ViewContext vc;
Nurb *nu;
BezTriple *bezt=0;
@@ -3112,7 +3100,7 @@ void mouse_nurb(bContext *C, short mval[2], int extend)
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
if(nu!=get_actNurb(obedit))
set_actNurb(obedit, nu);
@@ -3243,8 +3231,8 @@ static int spin_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -3267,6 +3255,7 @@ void CURVE_OT_spin(wmOperatorType *ot)
static int addvert_Nurb(bContext *C, short mode, float location[3])
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
ListBase *editnurb= curve_get_editcurve(obedit);
Nurb *nu;
@@ -3280,7 +3269,7 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
findselectedNurbvert(editnurb, &nu, &bezt, &bp);
if(bezt==0 && bp==0) return OPERATOR_CANCELLED;
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
/* which bezpoint? */
if(bezt== nu->bezt) { /* first */
BEZ_DESEL(bezt);
@@ -3378,8 +3367,8 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
test2DNurb(nu);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -3434,14 +3423,14 @@ void CURVE_OT_vertex_add(wmOperatorType *ot)
static int extrude_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
ListBase *editnurb= curve_get_editcurve(obedit);
Nurb *nu;
/* first test: curve? */
for(nu= editnurb->first; nu; nu= nu->next)
- if(nu->pntsv==1 && isNurbsel_count(cu, nu)==1)
+ if(nu->pntsv==1 && isNurbsel_count(nu)==1)
break;
if(obedit->type==OB_CURVE || nu) {
@@ -3449,8 +3438,8 @@ static int extrude_exec(bContext *C, wmOperator *op)
}
else {
if(extrudeflagNurb(editnurb, 1)) { /* '1'= flag */
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
}
@@ -3492,7 +3481,6 @@ void CURVE_OT_extrude(wmOperatorType *ot)
static int toggle_cyclic_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
ListBase *editnurb= curve_get_editcurve(obedit);
Nurb *nu;
BezTriple *bezt;
@@ -3501,7 +3489,7 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
for(nu= editnurb->first; nu; nu= nu->next) {
if( nu->pntsu>1 || nu->pntsv>1) {
- if(nu->type == CU_POLY) {
+ if( (nu->type & 7)==CU_POLY ) {
a= nu->pntsu;
bp= nu->bp;
while(a--) {
@@ -3512,11 +3500,11 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
bp++;
}
}
- else if(nu->type == CU_BEZIER) {
+ else if( (nu->type & 7)==CU_BEZIER ) {
a= nu->pntsu;
bezt= nu->bezt;
while(a--) {
- if( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
+ if( BEZSELECTED_HIDDENHANDLES(bezt) ) {
nu->flagu ^= CU_CYCLIC;
break;
}
@@ -3524,7 +3512,7 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
}
calchandlesNurb(nu);
}
- else if(nu->pntsv==1 && nu->type == CU_NURBS) {
+ else if(nu->pntsv==1 && (nu->type & 7)==CU_NURBS) {
if (nu->knotsu) { /* if check_valid_nurb_u fails the knotsu can be NULL */
a= nu->pntsu;
bp= nu->bp;
@@ -3561,8 +3549,8 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -3653,7 +3641,7 @@ static int select_linked_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -3694,8 +3682,8 @@ void CURVE_OT_select_linked(wmOperatorType *ot)
static int select_row_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
ListBase *editnurb= curve_get_editcurve(obedit);
+ Curve *cu= obedit->data;
static BPoint *last=0;
static int direction=0;
Nurb *nu;
@@ -3745,7 +3733,7 @@ static int select_row_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -3772,7 +3760,7 @@ static int select_next_exec(bContext *C, wmOperator *op)
ListBase *editnurb= curve_get_editcurve(obedit);
select_adjacent_cp(editnurb, 1, 0, SELECT);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -3799,7 +3787,7 @@ static int select_previous_exec(bContext *C, wmOperator *op)
ListBase *editnurb= curve_get_editcurve(obedit);
select_adjacent_cp(editnurb, -1, 0, SELECT);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -3886,7 +3874,7 @@ static int select_more_exec(bContext *C, wmOperator *op)
select_adjacent_cp(editnurb, -1, 0, SELECT);
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -3975,7 +3963,7 @@ static int select_less_exec(bContext *C, wmOperator *op)
for(nu= editnurb->first; nu; nu= nu->next) {
lastsel=0;
/* check what type of curve/nurb it is */
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
a= nu->pntsu;
bezt= nu->bezt;
while(a--) {
@@ -4047,7 +4035,7 @@ static int select_less_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -4121,7 +4109,7 @@ static int select_random_exec(bContext *C, wmOperator *op)
/* select elements */
for(i=1, nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
@@ -4143,7 +4131,7 @@ static int select_random_exec(bContext *C, wmOperator *op)
MEM_freeN(itemstobeselected);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -4177,7 +4165,7 @@ static int select_every_nth_exec(bContext *C, wmOperator *op)
select_adjacent_cp(editnurb, n, 1, SELECT);
select_adjacent_cp(editnurb, -n, 1, SELECT);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -4243,8 +4231,8 @@ void CURVE_OT_duplicate(wmOperatorType *ot)
static int delete_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
ListBase *editnurb= curve_get_editcurve(obedit);
Nurb *nu, *next, *nu1;
BezTriple *bezt, *bezt1, *bezt2;
@@ -4255,8 +4243,8 @@ static int delete_exec(bContext *C, wmOperator *op)
if(type==0) deleteflagNurb(C, op, 1);
else freeNurblist(editnurb);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -4266,12 +4254,12 @@ static int delete_exec(bContext *C, wmOperator *op)
nu= editnurb->first;
while(nu) {
next= nu->next;
- if(nu->type == CU_BEZIER) {
+ if( (nu->type & 7)==CU_BEZIER ) {
bezt= nu->bezt;
a= nu->pntsu;
if(a) {
while(a) {
- if( BEZSELECTED_HIDDENHANDLES(cu, bezt) );
+ if( BEZSELECTED_HIDDENHANDLES(bezt) );
else break;
a--;
bezt++;
@@ -4302,7 +4290,7 @@ static int delete_exec(bContext *C, wmOperator *op)
/* Never allow the order to exceed the number of points
- note, this is ok but changes unselected nurbs, disable for now */
/*
- if ((nu!= NULL) && (nu->type == CU_NURBS)) {
+ if ((nu!= NULL) && ((nu->type & 7)==CU_NURBS)) {
clamp_nurb_order_u(nu);
}
*/
@@ -4313,10 +4301,10 @@ static int delete_exec(bContext *C, wmOperator *op)
while(nu) {
next= nu->next;
type= 0;
- if(nu->type == CU_BEZIER) {
+ if( (nu->type & 7)==CU_BEZIER ) {
bezt= nu->bezt;
for(a=0;a<nu->pntsu;a++) {
- if( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
+ if( BEZSELECTED_HIDDENHANDLES(bezt) ) {
memmove(bezt, bezt+1, (nu->pntsu-a-1)*sizeof(BezTriple));
nu->pntsu--;
a--;
@@ -4356,7 +4344,7 @@ static int delete_exec(bContext *C, wmOperator *op)
/* Never allow the order to exceed the number of points\
- note, this is ok but changes unselected nurbs, disable for now */
/*
- if (nu->type == CU_NURBS) {
+ if ((nu->type & 7)==CU_NURBS) {
clamp_nurb_order_u(nu);
}*/
}
@@ -4373,10 +4361,10 @@ static int delete_exec(bContext *C, wmOperator *op)
nu1= 0;
while(nu) {
next= nu->next;
- if(nu->type == CU_BEZIER) {
+ if( (nu->type & 7)==CU_BEZIER ) {
bezt= nu->bezt;
for(a=0; a<nu->pntsu-1; a++) {
- if( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) {
+ if( BEZSELECTED_HIDDENHANDLES(bezt) ) {
bezt1= bezt;
bezt2= bezt+1;
if( (bezt2->f1 & SELECT) || (bezt2->f2 & SELECT) || (bezt2->f3 & SELECT) ) ;
@@ -4385,8 +4373,8 @@ static int delete_exec(bContext *C, wmOperator *op)
bezt2= bezt+(nu->pntsu-1);
if( (bezt2->f1 & SELECT) || (bezt2->f2 & SELECT) || (bezt2->f3 & SELECT) ) {
nu->flagu &= ~CU_CYCLIC;
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
}
@@ -4411,8 +4399,8 @@ static int delete_exec(bContext *C, wmOperator *op)
bp2= bp+(nu->pntsu-1);
if( bp2->f1 & SELECT ) {
nu->flagu &= ~CU_CYCLIC;
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
}
@@ -4509,8 +4497,8 @@ static int delete_exec(bContext *C, wmOperator *op)
else if(type==2)
freeNurblist(editnurb);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -4581,8 +4569,8 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -4727,7 +4715,7 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname)
cent[2]-= obedit->obmat[3][2];
if(rv3d) {
- if (!(newname) || U.flag & USER_ADD_VIEWALIGNED)
+ if (!(newname) || U.flag & USER_ADD_VIEWALIGNED || !rv3d)
Mat3CpyMat4(imat, rv3d->viewmat);
else
Mat3One(imat);
@@ -4747,7 +4735,7 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname)
/* these types call this function to return a Nurb */
if (stype!=CU_PRIM_TUBE && stype!=CU_PRIM_DONUT) {
nu = (Nurb*)MEM_callocN(sizeof(Nurb), "addNurbprim");
- nu->type= cutype;
+ nu->type= type;
nu->resolu= 4;
nu->resolv= 4;
}
@@ -4760,7 +4748,6 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname)
rename_id((ID *)obedit->data, "Curve");
}
if(cutype==CU_BEZIER) {
- nu->flag= CU_2D;
nu->pntsu= 2;
nu->bezt =
(BezTriple*)MEM_callocN(2 * sizeof(BezTriple), "addNurbprim1");
@@ -4869,7 +4856,6 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname)
rename_id((ID *)obedit->data, "CurveCircle");
}
if(cutype==CU_BEZIER) {
- nu->flag= CU_2D;
nu->pntsu= 4;
nu->bezt= callocstructN(BezTriple, 4, "addNurbprim1");
nu->flagu= CU_CYCLIC;
@@ -5096,7 +5082,7 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname)
}
/* always do: */
- nu->flag |= CU_SMOOTH;
+ nu->flag= CU_SMOOTH;
test2DNurb(nu);
@@ -5108,7 +5094,6 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname)
static int clear_tilt_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
- Curve *cu= obedit->data;
ListBase *editnurb= curve_get_editcurve(obedit);
Nurb *nu;
BezTriple *bezt;
@@ -5120,7 +5105,7 @@ static int clear_tilt_exec(bContext *C, wmOperator *op)
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
- if(BEZSELECTED_HIDDENHANDLES(cu, bezt)) bezt->alfa= 0.0;
+ if(BEZSELECTED_HIDDENHANDLES(bezt)) bezt->alfa= 0.0;
bezt++;
}
}
@@ -5134,8 +5119,8 @@ static int clear_tilt_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index ae34f30a4f1..46be95063ec 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -273,14 +273,15 @@ static void text_update_edited(bContext *C, Scene *scene, Object *obedit, int re
BKE_text_to_curve(scene, obedit, mode);
if(recalc)
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
}
/********************** insert lorem operator *********************/
static int insert_lorem_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
char *p, *p2;
int i;
@@ -307,8 +308,8 @@ static int insert_lorem_exec(bContext *C, wmOperator *op)
insert_into_textbuf(obedit, '\n');
insert_into_textbuf(obedit, '\n');
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
return OPERATOR_FINISHED;
}
@@ -613,6 +614,7 @@ static EnumPropertyItem style_items[]= {
static int set_style(bContext *C, int style, int clear)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
Curve *cu= obedit->data;
EditFont *ef= cu->editfont;
@@ -628,8 +630,8 @@ static int set_style(bContext *C, int style, int clear)
ef->textbufinfo[i].flag |= style;
}
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/datafiles/blenderbuttons.c b/source/blender/editors/datafiles/blenderbuttons.c
index cfd526d82ef..722e3ada57b 100644
--- a/source/blender/editors/datafiles/blenderbuttons.c
+++ b/source/blender/editors/datafiles/blenderbuttons.c
@@ -1,5710 +1,5609 @@
/* DataToC output of file <blenderbuttons> */
-int datatoc_blenderbuttons_size= 182512;
+int datatoc_blenderbuttons_size= 179274;
char datatoc_blenderbuttons[]= {
-137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82,
- 0, 0, 2, 88, 0, 0, 2,128, 8, 6, 0, 0, 0, 64, 11, 6,158, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 13,215, 0, 0, 13,
-215, 1, 66, 40,155,120, 0, 0, 10, 79,105, 67, 67, 80, 80,104,111,116,111,115,104,111,112, 32, 73, 67, 67, 32,112,114,111,102,
-105,108,101, 0, 0,120,218,157, 83,103, 84, 83,233, 22, 61,247,222,244, 66, 75,136,128,148, 75,111, 82, 21, 8, 32, 82, 66,139,
-128, 20,145, 38, 42, 33, 9, 16, 74,136, 33,161,217, 21, 81,193, 17, 69, 69, 4, 27,200,160,136, 3,142,142,128,140, 21, 81, 44,
- 12,138, 10,216, 7,228, 33,162,142,131,163,136,138,202,251,225,123,163,107,214,188,247,230,205,254,181,215, 62,231,172,243,157,
-179,207, 7,192, 8, 12,150, 72, 51, 81, 53,128, 12,169, 66, 30, 17,224,131,199,196,198,225,228, 46, 64,129, 10, 36,112, 0, 16,
- 8,179,100, 33,115,253, 35, 1, 0,248,126, 60, 60, 43, 34,192, 7,190, 0, 1,120,211, 11, 8, 0,192, 77,155,192, 48, 28,135,
-255, 15,234, 66,153, 92, 1,128,132, 1,192,116,145, 56, 75, 8,128, 20, 0, 64,122,142, 66,166, 0, 64, 70, 1,128,157,152, 38,
- 83, 0,160, 4, 0, 96,203, 99, 98,227, 0, 80, 45, 0, 96, 39,127,230,211, 0,128,157,248,153,123, 1, 0, 91,148, 33, 21, 1,
-160,145, 0, 32, 19,101,136, 68, 0,104, 59, 0,172,207, 86,138, 69, 0, 88, 48, 0, 20,102, 75,196, 57, 0,216, 45, 0, 48, 73,
- 87,102, 72, 0,176,183, 0,192,206, 16, 11,178, 0, 8, 12, 0, 48, 81,136,133, 41, 0, 4,123, 0, 96,200, 35, 35,120, 0,132,
-153, 0, 20, 70,242, 87, 60,241, 43,174, 16,231, 42, 0, 0,120,153,178, 60,185, 36, 57, 69,129, 91, 8, 45,113, 7, 87, 87, 46,
- 30, 40,206, 73, 23, 43, 20, 54, 97, 2, 97,154, 64, 46,194,121,153, 25, 50,129, 52, 15,224,243,204, 0, 0,160,145, 21, 17,224,
-131,243,253,120,206, 14,174,206,206, 54,142,182, 14, 95, 45,234,191, 6,255, 34, 98, 98,227,254,229,207,171,112, 64, 0, 0,225,
-116,126,209,254, 44, 47,179, 26,128, 59, 6,128,109,254,162, 37,238, 4,104, 94, 11,160,117,247,139,102,178, 15, 64,181, 0,160,
-233,218, 87,243,112,248,126, 60, 60, 69,161,144,185,217,217,229,228,228,216, 74,196, 66, 91, 97,202, 87,125,254,103,194, 95,192,
- 87,253,108,249,126, 60,252,247,245,224,190,226, 36,129, 50, 93,129, 71, 4,248,224,194,204,244, 76,165, 28,207,146, 9,132, 98,
-220,230,143, 71,252,183, 11,255,252, 29,211, 34,196, 73, 98,185, 88, 42, 20,227, 81, 18,113,142, 68,154,140,243, 50,165, 34,137,
- 66,146, 41,197, 37,210,255,100,226,223, 44,251, 3, 62,223, 53, 0,176,106, 62, 1,123,145, 45,168, 93, 99, 3,246, 75, 39, 16,
- 88,116,192,226,247, 0, 0,242,187,111,193,212, 40, 8, 3,128,104,131,225,207,119,255,239, 63,253, 71,160, 37, 0,128,102, 73,
-146,113, 0, 0, 94, 68, 36, 46, 84,202,179, 63,199, 8, 0, 0, 68,160,129, 42,176, 65, 27,244,193, 24, 44,192, 6, 28,193, 5,
-220,193, 11,252, 96, 54,132, 66, 36,196,194, 66, 16, 66, 10,100,128, 28,114, 96, 41,172,130, 66, 40,134,205,176, 29, 42, 96, 47,
-212, 64, 29, 52,192, 81,104,134,147,112, 14, 46,194, 85,184, 14, 61,112, 15,250, 97, 8,158,193, 40,188,129, 9, 4, 65,200, 8,
- 19, 97, 33,218,136, 1, 98,138, 88, 35,142, 8, 23,153,133,248, 33,193, 72, 4, 18,139, 36, 32,201,136, 20, 81, 34, 75,145, 53,
- 72, 49, 82,138, 84, 32, 85, 72, 29,242, 61,114, 2, 57,135, 92, 70,186,145, 59,200, 0, 50,130,252,134,188, 71, 49,148,129,178,
- 81, 61,212, 12,181, 67,185,168, 55, 26,132, 70,162, 11,208,100,116, 49,154,143, 22,160,155,208,114,180, 26, 61,140, 54,161,231,
-208,171,104, 15,218,143, 62, 67,199, 48,192,232, 24, 7, 51,196,108, 48, 46,198,195, 66,177, 56, 44, 9,147, 99,203,177, 34,172,
- 12,171,198, 26,176, 86,172, 3,187,137,245, 99,207,177,119, 4, 18,129, 69,192, 9, 54, 4,119, 66, 32, 97, 30, 65, 72, 88, 76,
- 88, 78,216, 72,168, 32, 28, 36, 52, 17,218, 9, 55, 9, 3,132, 81,194, 39, 34,147,168, 75,180, 38,186, 17,249,196, 24, 98, 50,
- 49,135, 88, 72, 44, 35,214, 18,143, 19, 47, 16,123,136, 67,196, 55, 36, 18,137, 67, 50, 39,185,144, 2, 73,177,164, 84,210, 18,
-210, 70,210,110, 82, 35,233, 44,169,155, 52, 72, 26, 35,147,201,218,100,107,178, 7, 57,148, 44, 32, 43,200,133,228,157,228,195,
-228, 51,228, 27,228, 33,242, 91, 10,157, 98, 64,113,164,248, 83,226, 40, 82,202,106, 74, 25,229, 16,229, 52,229, 6,101,152, 50,
- 65, 85,163,154, 82,221,168,161, 84, 17, 53,143, 90, 66,173,161,182, 82,175, 81,135,168, 19, 52,117,154, 57,205,131, 22, 73, 75,
-165,173,162,149,211, 26,104, 23,104,247,105,175,232,116,186, 17,221,149, 30, 78,151,208, 87,210,203,233, 71,232,151,232, 3,244,
-119, 12, 13,134, 21,131,199,136,103, 40, 25,155, 24, 7, 24,103, 25,119, 24,175,152, 76,166, 25,211,139, 25,199, 84, 48, 55, 49,
-235,152,231,153, 15,153,111, 85, 88, 42,182, 42,124, 21,145,202, 10,149, 74,149, 38,149, 27, 42, 47, 84,169,170,166,170,222,170,
- 11, 85,243, 85,203, 84,143,169, 94, 83,125,174, 70, 85, 51, 83,227,169, 9,212,150,171, 85,170,157, 80,235, 83, 27, 83,103,169,
- 59,168,135,170,103,168,111, 84, 63,164,126, 89,253,137, 6, 89,195, 76,195, 79, 67,164, 81,160,177, 95,227,188,198, 32, 11, 99,
- 25,179,120, 44, 33,107, 13,171,134,117,129, 53,196, 38,177,205,217,124,118, 42,187,152,253, 29,187,139, 61,170,169,161, 57, 67,
- 51, 74, 51, 87,179, 82,243,148,102, 63, 7,227,152,113,248,156,116, 78, 9,231, 40,167,151,243,126,138,222, 20,239, 41,226, 41,
- 27,166, 52, 76,185, 49,101, 92,107,170,150,151,150, 88,171, 72,171, 81,171, 71,235,189, 54,174,237,167,157,166,189, 69,187, 89,
-251,129, 14, 65,199, 74, 39, 92, 39, 71,103,143,206, 5,157,231, 83,217, 83,221,167, 10,167, 22, 77, 61, 58,245,174, 46,170,107,
-165, 27,161,187, 68,119,191,110,167,238,152,158,190, 94,128,158, 76,111,167,222,121,189,231,250, 28,125, 47,253, 84,253,109,250,
-167,245, 71, 12, 88, 6,179, 12, 36, 6,219, 12,206, 24, 60,197, 53,113,111, 60, 29, 47,199,219,241, 81, 67, 93,195, 64, 67,165,
- 97,149, 97,151,225,132,145,185,209, 60,163,213, 70,141, 70, 15,140,105,198, 92,227, 36,227,109,198,109,198,163, 38, 6, 38, 33,
- 38, 75, 77,234, 77,238,154, 82, 77,185,166, 41,166, 59, 76, 59, 76,199,205,204,205,162,205,214,153, 53,155, 61, 49,215, 50,231,
-155,231,155,215,155,223,183, 96, 90,120, 90, 44,182,168,182,184,101, 73,178,228, 90,166, 89,238,182,188,110,133, 90, 57, 89,165,
- 88, 85, 90, 93,179, 70,173,157,173, 37,214,187,173,187,167, 17,167,185, 78,147, 78,171,158,214,103,195,176,241,182,201,182,169,
-183, 25,176,229,216, 6,219,174,182,109,182,125, 97,103, 98, 23,103,183,197,174,195,238,147,189,147,125,186,125,141,253, 61, 7,
- 13,135,217, 14,171, 29, 90, 29,126,115,180,114, 20, 58, 86, 58,222,154,206,156,238, 63,125,197,244,150,233, 47,103, 88,207, 16,
-207,216, 51,227,182, 19,203, 41,196,105,157, 83,155,211, 71,103, 23,103,185,115,131,243,136,139,137, 75,130,203, 46,151, 62, 46,
-155, 27,198,221,200,189,228, 74,116,245,113, 93,225,122,210,245,157,155,179,155,194,237,168,219,175,238, 54,238,105,238,135,220,
-159,204, 52,159, 41,158, 89, 51,115,208,195,200, 67,224, 81,229,209, 63, 11,159,149, 48,107,223,172,126, 79, 67, 79,129,103,181,
-231, 35, 47, 99, 47,145, 87,173,215,176,183,165,119,170,247, 97,239, 23, 62,246, 62,114,159,227, 62,227, 60, 55,222, 50,222, 89,
- 95,204, 55,192,183,200,183,203, 79,195,111,158, 95,133,223, 67,127, 35,255,100,255,122,255,209, 0,167,128, 37, 1,103, 3,137,
-129, 65,129, 91, 2,251,248,122,124, 33,191,142, 63, 58,219,101,246,178,217,237, 65,140,160,185, 65, 21, 65,143,130,173,130,229,
-193,173, 33,104,200,236,144,173, 33,247,231,152,206,145,206,105, 14,133, 80,126,232,214,208, 7, 97,230, 97,139,195,126, 12, 39,
-133,135,133, 87,134, 63,142,112,136, 88, 26,209, 49,151, 53,119,209,220, 67,115,223, 68,250, 68,150, 68,222,155,103, 49, 79, 57,
-175, 45, 74, 53, 42, 62,170, 46,106, 60,218, 55,186, 52,186, 63,198, 46,102, 89,204,213, 88,157, 88, 73,108, 75, 28, 57, 46, 42,
-174, 54,110,108,190,223,252,237,243,135,226,157,226, 11,227,123, 23,152, 47,200, 93,112,121,161,206,194,244,133,167, 22,169, 46,
- 18, 44, 58,150, 64, 76,136, 78, 56,148,240, 65, 16, 42,168, 22,140, 37,242, 19,119, 37,142, 10,121,194, 29,194,103, 34, 47,209,
- 54,209,136,216, 67, 92, 42, 30, 78,242, 72, 42, 77,122,146,236,145,188, 53,121, 36,197, 51,165, 44,229,185,132, 39,169,144,188,
- 76, 13, 76,221,155, 58,158, 22,154,118, 32,109, 50, 61, 58,189, 49,131,146,145,144,113, 66,170, 33, 77,147,182,103,234,103,230,
-102,118,203,172,101,133,178,254,197,110,139,183, 47, 30,149, 7,201,107,179,144,172, 5, 89, 45, 10,182, 66,166,232, 84, 90, 40,
-215, 42, 7,178,103,101, 87,102,191,205,137,202, 57,150,171,158, 43,205,237,204,179,202,219,144, 55,156,239,159,255,237, 18,194,
- 18,225,146,182,165,134, 75, 87, 45, 29, 88,230,189,172,106, 57,178, 60,113,121,219, 10,227, 21, 5, 43,134, 86, 6,172, 60,184,
-138,182, 42,109,213, 79,171,237, 87,151,174,126,189, 38,122, 77,107,129, 94,193,202,130,193,181, 1,107,235, 11, 85, 10,229,133,
-125,235,220,215,237, 93, 79, 88, 47, 89,223,181, 97,250,134,157, 27, 62, 21,137,138,174, 20,219, 23,151, 21,127,216, 40,220,120,
-229, 27,135,111,202,191,153,220,148,180,169,171,196,185,100,207,102,210,102,233,230,222, 45,158, 91, 14,150,170,151,230,151, 14,
-110, 13,217,218,180, 13,223, 86,180,237,245,246, 69,219, 47,151,205, 40,219,187,131,182, 67,185,163,191, 60,184,188,101,167,201,
-206,205, 59, 63, 84,164, 84,244, 84,250, 84, 54,238,210,221,181, 97,215,248,110,209,238, 27,123,188,246, 52,236,213,219, 91,188,
-247,253, 62,201,190,219, 85, 1, 85, 77,213,102,213,101,251, 73,251,179,247, 63,174,137,170,233,248,150,251,109, 93,173, 78,109,
-113,237,199, 3,210, 3,253, 7, 35, 14,182,215,185,212,213, 29,210, 61, 84, 82,143,214, 43,235, 71, 14,199, 31,190,254,157,239,
-119, 45, 13, 54, 13, 85,141,156,198,226, 35,112, 68,121,228,233,247, 9,223,247, 30, 13, 58,218,118,140,123,172,225, 7,211, 31,
-118, 29,103, 29, 47,106, 66,154,242,154, 70,155, 83,154,251, 91, 98, 91,186, 79,204, 62,209,214,234,222,122,252, 71,219, 31, 15,
-156, 52, 60, 89,121, 74,243, 84,201,105,218,233,130,211,147,103,242,207,140,157,149,157,125,126, 46,249,220, 96,219,162,182,123,
-231, 99,206,223,106, 15,111,239,186, 16,116,225,210, 69,255,139,231, 59,188, 59,206, 92,242,184,116,242,178,219,229, 19, 87,184,
- 87,154,175, 58, 95,109,234,116,234, 60,254,147,211, 79,199,187,156,187,154,174,185, 92,107,185,238,122,189,181,123,102,247,233,
- 27,158, 55,206,221,244,189,121,241, 22,255,214,213,158, 57, 61,221,189,243,122,111,247,197,247,245,223, 22,221,126,114, 39,253,
-206,203,187,217,119, 39,238,173,188, 79,188, 95,244, 64,237, 65,217, 67,221,135,213, 63, 91,254,220,216,239,220,127,106,192,119,
-160,243,209,220, 71,247, 6,133,131,207,254,145,245,143, 15, 67, 5,143,153,143,203,134, 13,134,235,158, 56, 62, 57, 57,226, 63,
-114,253,233,252,167, 67,207,100,207, 38,158, 23,254,162,254,203,174, 23, 22, 47,126,248,213,235,215,206,209,152,209,161,151,242,
-151,147,191,109,124,165,253,234,192,235, 25,175,219,198,194,198, 30,190,201,120, 51, 49, 94,244, 86,251,237,193,119,220,119, 29,
-239,163,223, 15, 79,228,124, 32,127, 40,255,104,249,177,245, 83,208,167,251,147, 25,147,147,255, 4, 3,152,243,252, 99, 51, 45,
-219, 0, 0, 0, 32, 99, 72, 82, 77, 0, 0,122, 37, 0, 0,128,131, 0, 0,249,255, 0, 0,128,233, 0, 0,117, 48, 0, 0,234,
- 96, 0, 0, 58,152, 0, 0, 23,111,146, 95,197, 70, 0, 2,190, 27, 73, 68, 65, 84,120,218,236,157,119,120, 20,197, 31,198,223,
-217,221,235,119,233, 33, 61,144,132, 26, 8, 61,116, 66,111, 34, 77, 69,186, 10, 22, 64,129,159, 32,205,134, 32,130, 93, 1,149,
-174, 34, 32, 34, 72, 85,148, 42,189, 73,239, 61,129, 52,210,235,245,178,243,251, 35,185,243, 18,146,220, 37, 32, 22,230,243, 60,
-251, 92,178,187,247,222,236,236,236,236,187,223, 41, 75, 40,165, 96, 48, 24, 12, 6,131,193, 96, 60, 56, 56,150, 5, 12, 6,131,
-193, 96, 48, 24,255, 34,131, 69, 8,233,198, 52,153, 38,211,100,154, 76,147,105, 50, 77,166,201, 12, 22,131,193, 96, 48, 24, 12,
- 6,131, 25, 44, 6,131,193, 96, 48, 24, 12,102,176, 24, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96, 48,131,
-197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12,198,127, 3,194, 38, 26,101, 48, 24, 12, 6,131,193,120,176, 8,
-229,109,104,214,172,217,207, 10,133,162, 86,121,219,117, 58, 93,234,153, 51,103, 58,179, 44,100, 48, 24, 46,159,228, 8,225,240,
-103,196, 92, 4, 64, 41,123,186, 99, 48, 24,143,162,193,146, 74,165, 81,251,247,239,175, 35,138, 34,108, 54, 27,172, 86,171,227,
-211,100, 50,225,169,167,158, 18, 42,251, 99, 77,154, 52,217,207,113, 92, 68,101,190, 99,179,217,238,156, 61,123,182,125,121,219,
- 3, 3, 3, 15, 3,136, 34,132,216, 43,242, 50, 63, 1,128,227, 28, 45,162, 41,137,137,137,205, 42,210, 36,132, 68, 57,221, 28,
-238,209,178,255,237,174,102,189,122,245, 78, 8,130, 16, 86,250,251,101,253,111,255, 91, 20,197, 91,231,207,159,111,203,138,233,
-195,161, 73,147, 38,251,121,158,175,116,249, 60,115,230, 76,185,229,179, 97,195,134,167, 57,142, 11, 41,235, 28,151,117,206, 1,
-240, 54,155,237,234,217,179,103,219,151,103, 64,130,131,131, 15, 3,136,170,168,236,148, 42,155, 0,144,148,152,152, 24,235,234,
- 58,170,232, 26, 42,163,204, 87,168,233,108,174, 66, 67, 67, 63,168, 86,173,218, 88,157, 78,103, 0, 64,121,158,167,245,235,215,
- 47,145, 15, 54,155, 45,227,242,229,203, 13, 89, 73,100, 48, 24,255,105,131, 37,138, 34,103, 52, 26,113,237,218, 53,148, 85,207,
-115, 28,103,171,236,143, 81, 74,235,236, 94,179, 42, 64, 89, 45, 16, 54,139, 25,114,191,106, 14,237,220,203, 23, 32,154,205,176,
-153, 77,240,143,109,109,175,112,209,185,115,103,222,133,108,216,164, 73,147, 2, 60, 60, 60, 96, 48, 24, 96, 48, 24, 96, 52, 26,
- 97, 48, 24, 96, 50,153, 96, 50,153, 96, 54,155, 97, 54,155, 97,181, 90, 97, 52, 26,113,238,220, 57,155,139, 27, 66,216,132, 9,
- 19, 2, 60, 61, 61, 29,122,246,197,174,105,215,181, 88, 44, 48, 24, 12,184,112,225, 66,133,154,130, 32,132,157, 58,117, 42, 64,
- 42,149,130, 82, 10, 81, 20, 65, 41, 45,177,148,166,109,219,182,102, 86, 68, 31, 42,117, 54,125, 52, 55, 64,238,235, 7,209, 98,
-129, 95,147,230,246,114,139,148, 61,219, 97, 51,155, 33, 90, 44,168,209,247, 73,199,250,142, 29, 59,186, 42,159, 53,126,154,241,
-186,183,212,195, 3, 86,131, 1,145,125,158,112,108,184,184,120, 30, 68,139, 25,212, 98, 70,163, 73,111, 1, 0, 50, 51, 51,245,
-209,209,209, 41, 0, 8,128,242, 34, 60, 97,183,110,221, 10,176,167,161, 44,211,239,188, 28, 58,116, 8,195,135, 15,119,117,236,
- 97,111,190,249,102,128,253, 26, 41, 93,206,173, 86,171,227,211,106,181,194, 96, 48,224,244,233,211,110, 69,174,130,131,131, 63,
-140,139,139, 27,181,122,245,106,245,166, 77,155,212, 17, 17, 17,144, 74,165,224,121, 30, 60,207,131,227, 56, 8,130,128,126,253,
-250, 17, 86, 4, 25, 12,198,127,222, 96,153,205,230,248, 30, 61,122, 80, 0, 48,153, 76,161, 50,153, 76, 90,202,128,133,180,107,
-215,238,106,233,239,185,106, 58, 84, 86, 11,196, 55,145,190, 0,128,167,111,102, 57,110, 12,235,227,154, 56,246, 25,122, 59,175,
-104, 95,165, 18, 28,199, 17, 23, 21, 56,212,106, 53,186,119,239, 14,153, 76,134,216,216, 88, 72, 36,146, 50, 23,169, 84, 10,137,
- 68,114, 79,244,168, 44, 52, 26, 13,102,205,154,101, 55, 71, 80, 43,228, 24,223, 54, 22, 10, 80, 44,189,112, 29, 38,145, 66, 16,
- 4,199,226,142,166, 84, 42,197,249,243,231, 33, 8, 2,120,158,119,124,218,255,222,178,101, 11, 6, 14, 28, 8, 65, 16,160, 84,
- 42, 81,124,147,101, 60, 68, 20,126,254, 88,223,161, 41, 0, 96,120, 98,129,163,140,253, 58,184,143, 99,159,103,146,181, 32,132,
- 64, 42,149,186,119,222, 61, 60,176,109,224, 99, 0,128, 39,175,165, 67, 34,145, 64, 16, 4,156,251,236, 61, 72,100, 50, 8, 82,
- 41, 26, 77,122, 11,153,153,153,250, 39,158,120,226,160, 66,161,216,238,198,195, 10, 18, 19, 19, 33, 8, 66,185,229,157,227, 56,
-172, 88,177, 2,183,111,223,118,235,216,245,122, 61,222,127,255,125, 16, 66, 74, 92, 47,229,253,237,234,216, 9, 33, 92, 80, 80,
-208,123,113,113,113, 35, 86,175, 94,237, 67, 8,193,151, 95,126, 9,169, 84,138,222,189,123,195,207,207, 15, 59,118,236,128, 84,
- 42,197,212,169, 83, 89,225, 99, 48, 24,143,134,193, 58,115,230,204, 99,246,191, 91,183,110,125,249,224,193,131,245,156, 66,249,
-176, 90,173, 82,171,213, 90,199,222,108,104,127,242, 29, 58,116,104,133, 79,244, 54,139,249, 30,131, 84, 86, 69,237,206,141,203,
-201, 12, 98,208,160, 65, 0, 80,238,205,198,121,113,227,169, 27, 38,147, 9,130, 32,160,110,120, 53,188,221,179, 41, 90, 82, 11,
-180,133, 4,214, 60, 45,250,107, 44,184, 92,191, 25,150,220,201,192,237,252, 66, 8,130,123,173,165,162, 40,150,107,174,120,158,
-199,162, 69,139, 48,100,200, 16,240, 60, 95,110,190, 48,254, 90,108,102,179,203,114, 88,217,115, 99, 53, 24,138, 34, 75, 2,239,
- 48, 87, 18,137, 4, 18,185, 28,130, 84, 10, 65, 38, 69,102,102,166,190, 91,183,110, 71,101, 50,217,119,129,129,129, 41, 73, 73,
- 73, 21,150, 79, 74,105, 73,173, 50, 30, 38,190,253,246, 91,172, 92,185, 18,173, 90,181,114,199, 12,193,100, 50, 65, 42,149,226,
-189,247,222,187,103,251,226,197,139,239, 49, 88, 46,244, 8, 0, 46, 48, 48,240,229, 53,107,214,120,218,127,223,223,223, 31, 18,
-137, 4, 13, 27, 54,132,135,135, 7, 14, 30, 60, 8,155,205,230,246,131, 15,131,193, 96,252,235, 13, 86, 41, 99,192, 25,141, 70,
- 92,185,114, 5,174,250,165, 82, 74, 43,172, 37,229,126,213, 28,145,171,117, 53,253, 28,235,135, 36,228, 58,110, 92,219, 90,214,
-130, 76,163, 70,236, 59, 31,187,109,134,210,211,211, 29, 79,222,174, 22,119, 42,114,147,201, 4,149, 82,129, 93, 19, 27, 34, 49,
- 75,134,153, 71,178,241,203,153, 27,144, 72, 36,232, 85,191, 33, 30,147,122,224,173, 26, 50, 76,188,158, 0, 11,165,110,221,192,
- 40,165,101, 26, 43,251,223,246,166, 18,187,193, 98, 60,124,252,154, 52,119, 68,174, 86,135,123,220, 19,181, 2,128, 45,205, 34,
- 32,247,208,160,225,255,166,187, 85, 62, 35,251, 60,225,136, 92,253,210, 60, 18,188, 68, 2,137, 76,134,167,207, 39, 3, 40,106,
- 22,236,220, 48,122, 95, 46, 47, 91, 49, 98,196,136,248,223,127,255, 93,233, 78, 90,203, 50, 88,118,243,243,237,183,223, 98,213,
-170, 85, 16, 4, 1,102,179,217,173,116, 26,141,198,114,141, 83, 85, 34, 88, 0,160,211,233, 76,155, 55,111,198, 23, 95,124, 1,
- 63, 63, 63,244,232,209, 3,193,193,193, 88,183,110, 29, 40,165, 24, 55,110, 28,148, 74, 37,148, 74, 37, 43,243, 12, 6,227,209,
- 51, 88,102,179, 57,190, 91,183,110,110,141,248,209,235,245,119, 93, 24,176, 50, 35, 3,206, 81, 1,185,135, 6,114,141, 6,156,
-155,179,116, 89, 44, 22,135, 65,217,185,115, 39,148, 74, 37,122,247,238,125, 95, 17, 44,179,217, 12,153, 84, 2,206, 63, 16,207,
-126,254, 59,178, 10,244,142, 27,218,222, 91,241, 56,149,150,142,137,109,186, 66,173, 76, 71,161,201,228,118, 4,171,180,185, 18,
- 4, 1,131, 6, 13,130,209,104, 4, 33,164, 68,191, 20, 87,102,149,241,215, 81,222, 32, 4, 66, 8, 20,158, 30,144,169,213,224,
-121,222, 45, 45,231,104,147, 32,147, 65, 34,151, 65, 40, 46,135,246,200, 85, 46, 47, 91,145,156,156,124, 20,128,162,101,203,150,
- 74,119,210,230,108,176,156, 13,144,179,185,226,121, 30, 22,139,197, 45,243, 98, 52, 26, 33,149,254,217, 19,224,206,157, 59, 21,
- 26, 44, 23,199, 76, 9, 33, 34, 33, 68,140,138,138,114,124, 55, 40, 40, 8,222,222,222, 16, 69, 17,162, 40, 66,161, 80, 64,169,
- 84,150,248, 93, 6,131,193,120,100, 12,150,115,115,225,131,186,121, 85,116, 3, 83,122,122, 66,170, 86,219, 71, 43, 81,119,204,
-144,189,207,201,216,177, 99, 43,236,151, 98, 55, 98,110,152, 74,112, 2,143,212,160, 72,216,184, 3,127,222, 32,139, 23, 78,144,
-224,118, 80, 61,240, 87, 78, 67, 34,138,110,221,192, 74, 71,176,198,141, 27,135,101,203,150,129,227, 56, 71,158, 8,130,128,218,
-181,107, 35, 62, 62,158,149,206,191, 1, 90, 65, 52,210,190, 94,225,225, 1,153, 70, 3,222,141,190,119,165,205,144, 84, 46,135,
- 32,147, 66,144, 22, 53, 11,246,237,219,119, 95,110,110,238,138, 6, 13, 26, 92, 71,209, 52, 6,156,187,215,144, 32, 8, 37,140,
- 79, 89,230, 74, 16, 4, 88,173, 86,183, 31, 42, 74, 27,157, 57,115,230,220,179,239, 83, 79, 61,229,110, 4,139, 18, 66,168, 84,
- 42, 69,247,238,221,209,168, 81, 35,108,218,180, 9,162, 40,226,149, 87, 94,129, 82,169,196,188,121,243, 96,181, 90,241,225,135,
- 31,178, 8, 22,131,193,120,244, 12,214,131, 36,247,210,121, 71, 39, 98,231,102,193,223,218,214,131, 92,163,134, 92,163, 65,187,
- 77, 7, 28, 79,205,120,239, 83,183, 34, 88,118,131,149,149,149, 85,161,185,114, 39,130,229, 48, 88, 50, 1,235,195,114, 64,101,
- 18, 8, 38, 75, 9,131,197, 11, 18, 36,250, 69,130,147, 72, 33,216,172,110,105, 82, 74,239,105, 18,124,238,185,231, 64, 8,113,
-140,248,106,220,184,177,243,141,134,221,113, 30, 50, 41,123,182, 59, 58,180, 59, 55, 11,254,220,178, 22, 20, 30, 26,200,212,106,
-116,216,122,216, 17,109,196,188,165, 46, 53,175,126,253, 21,206,207,155, 11,137, 76,134, 39, 79,223,118, 68,174,218,214,173,117,
-212,164,246, 92,113,231,206,157,163, 0,184,193,131, 7,123, 55,110,220,216,173,107,210,222,201,190, 60,115,229,108,176, 44, 22,
-139,219,101,222,157,235,195, 30,197,114,163,188,211,232,232,104,112, 28, 7, 79, 79, 79,104, 52, 26,199, 8, 90,133, 66, 1,149,
- 74,229,232,191,233,238,117,201, 96, 48, 24,255,106,131,213,164, 73,147, 95, 85, 42, 85,164,187, 34,149,153,116,212,185, 19,177,
-221, 92, 17, 66,160,208,104, 32,211,168, 33,247,208,148, 27,229, 42,239, 70, 99,111, 34,228,121,222,113,179,249,238,187,239,160,
-209,104, 48,114,228,200, 74,247,193,178, 63,205,115, 82, 14, 59,228,123,192,203,132, 18,230, 74, 16, 4,240, 18, 9,238,106,130,
-193, 73, 36, 16,172,174,163, 98,132, 16,228,229,229, 65, 16, 4,188,253,246,219,142, 39,118,103,115,197, 58,182,255,253,136, 78,
-102,164, 68, 84,213,195,195, 81, 62,157,215,187,234,147, 72, 8, 1,181, 90, 32,145,203, 33, 41, 30,136,107,143, 92,153,212,158,
- 43,234,213,171,231,136, 92,169, 84, 42,251,232, 81,151,154, 28,199,149, 40,211, 43, 86,172, 40, 97,174, 74, 71,176,220, 45,243,
- 82,169, 20,203,150, 45,171,208, 68, 73,165, 82,183, 71, 80, 2, 69,211, 70,236,219,183, 15,167, 78,157,194,216,177, 99,161, 84,
- 42,177, 96,193, 2, 88,173, 86,204,158, 61, 27, 74,165, 18, 50,153,140, 21, 62, 6,131,241,223, 55, 88, 50,153, 44,242,208,161,
- 67,142, 73, 70, 43,250, 52,153, 76, 24, 52,104,144,219,145, 48,177,120, 20, 33, 87,106,164,156,220, 83, 3,121,113,211,139,243,
-122,226, 70, 45,110,127, 2,118, 54, 88,239,188,243, 14, 4, 65,192,178,101,203, 0, 0,147, 39, 79,118,187, 15,150, 93, 19, 54,
-130, 36,122, 19, 77, 63, 31, 8,211,106, 11,210, 14,157,133, 32, 8, 8,104,253, 24,196,150, 3,161, 83,106, 32,216,172,110,143,
- 34,204,206,206, 70,124,124, 60,120,158,199,164, 73,147, 74,204, 85, 84,234,152,177,115,231, 78,214, 7,235,111, 52, 88, 92,113,
-255,170,178,202,103, 41,243,229,186,157,204,102, 45,234,119, 37,253,115,180, 96,110,110,238,138, 59,119,238, 28, 3,192,141, 24,
- 49,194, 91,165, 82,225,235,175,191,214, 1,144,173, 91,183,206,165,203,178,151,155,242,204, 85, 85,154, 8,237,145, 96,231,126,
- 93,247,107,176,236,102,144, 16, 2,155,205, 6,165, 82, 89, 34,114,165, 80, 40, 32,151,203, 89,193, 99, 48, 24,143,134,193,226,
- 56, 14, 70,163, 17,151, 46, 93,114,247, 9,213,237, 73, 71,253,154,183,194,208,219,121, 32,132, 96, 71, 92, 3, 71,179, 75,219,
-159,246, 57, 42,236,219,239, 79,134, 68,173,129, 95, 92,143, 74,221, 24,156, 13, 86,110,110, 46, 36, 18, 9,222,123,239, 61,112,
- 28,135, 15, 63,252, 16,161,161,161, 72, 77, 77, 69,199,142, 29,221,122,154,231,109, 60,130,159,137,134,234, 57, 47,120, 62,211,
- 1, 62,221,223, 65,178, 73,192, 97,131, 10, 29, 12, 23, 33,219, 49, 31, 38,209,230,150,193, 34,132,192,106,181, 98,223,190,125,
- 37, 58,178, 3, 69, 77,135,246,233, 46, 44, 22, 11,204,102, 51, 62,252,240, 67, 86, 58,255, 6,194, 31, 31,128,103, 83,116, 0,
-128, 95,157,154,173,219,111, 60,224, 40,159,241,115, 38, 65,162,214,192,167, 69,156, 91,154,245, 95,153,130,250,175, 76, 65,102,
-102,166,190,107,147, 6,251, 11,165,170,111, 27, 54,108, 88, 34,114,165, 80, 40, 72,241,255,196,157,178,196,113, 28,120,158,119,
-152, 43,187,153, 42,203, 96,185,251, 0, 96,177, 88, 32,149, 74,221, 54, 88,238,194,113, 28,158,127,254,121, 4, 7, 7, 59, 34,
- 87,239,190,251, 46,148, 74, 37, 94,127,253,117, 88, 44, 22,204,159, 63,159, 21, 62, 6,131,241,223, 55, 88, 70,163, 49,161,107,
-215,174, 40,103, 91,168, 92, 46, 47, 17, 6,178, 79, 58, 90,186,169,144, 16,210,141, 82,186,171,172, 27,132,243,104, 44,121,169,
-168,149,212,195, 19, 18,181, 6, 92, 25,209,166,210,154,246, 39,227,210, 6,203,190,228,229,229, 65, 34,145,224,139, 47,190,128,
-167,167,167, 99,180, 94, 69,154,246, 8, 22,207,243,208, 37, 22,224,242,220, 93,144, 41, 14,163, 86,143, 33, 8,150, 40, 33, 61,
-184, 1,122,155,165,194,137, 70,203,210,172, 83,167, 14,102,204,152,113,207,244, 12,229,209,172, 89, 51,151,154,247, 11,211, 44,
- 91,211,157,242,201,203,229, 46,207,187,125,187, 61,114, 85, 40, 85,125, 27, 31, 31,111,143, 92,121,169, 84, 42, 44, 94,188, 88,
- 7,128,155, 61,123,182,170, 70,141, 26,188, 59,233,228,121, 30,223,125,247,221, 61, 29,218,203, 50, 87,101, 77,251, 81, 86, 58,
-173, 86,235, 61, 6,107,208,160, 65,247,140, 30, 44, 47,130, 85, 86, 58,237,125,213,252,252,252, 28,145, 43,155,205,230, 24, 61,
-104,177, 88, 96,181, 90,203,109,106,101,229,147,105, 50,205, 71, 71,243,145, 48, 88,167, 79,159,238, 85,222, 23,218,181,107,119,
-237,208,161, 67,181,109, 54,155,243, 59, 10,165, 6,131,161, 78,255,254,253, 93, 62, 42,139,162, 8,185, 92, 14, 74, 41,154,190,
-245, 1, 8,185,183,191,149,119,219,174, 32,130, 0,155,205, 6,139,197,226,114,122, 8,189, 94,239,184,153,148,215,193,189,176,
-176,176,194,121,126, 74,223, 20, 12, 6, 67,137, 27, 21,161, 34,110,239,254,241,158,209,132,149,137, 16, 0,128, 66,161, 40,209,
-239,202, 85, 82, 88, 17,125,184,216,167, 84,160,148,162,193,248,105, 69,231,169,184,185,208,110, 2,188, 98,227, 64, 36, 2, 68,
- 0,102,179,217, 85,249, 36,246, 62, 87,148,210,111,250,247,239,127, 21,128, 17, 0,213,104, 52,114,137, 68, 34, 2,200, 6, 64,
-115,114,114,188,146,147,147, 69,131,193, 80,221, 85, 58,247,237,219,135, 27, 55,110,160,121,243,230,142, 87, 54,217,155,221,236,
- 38,198,217, 96,185, 27,193, 42,107, 78,173,242,102,115,119, 23,158,231,225,229,229,229,152,196, 84, 42,149, 66,165, 82, 1, 0,
-230,207,159,239,200,115, 6,131,193,248,207, 27, 44, 23, 6,137, 47,175,249,208, 85, 83,161,205,102, 75,106,217,178,101,101,127,
- 47,205,197, 13, 49,105,255,254,253,210,138, 94,242, 92,198, 58,151,154,199,142, 29,147, 86,240,253,178,254, 78,115,117,236,173,
- 90,181, 42,243,251,229, 97,181, 90,147, 89, 17,125,120, 88,173,214,242,203,231, 59, 31,148,119, 94,211, 92,152,150,235,181,107,
-215, 78,209,104, 52,191, 4, 6, 6,102, 29, 58,116,200,175, 69,139, 22,126,206,251,180,104,209, 34,184,212,215, 76,168, 96,122,
- 18, 66, 72,210,179,207, 62, 43,117, 81,198, 75,255,159,228,226,161, 34,233,194,133, 11,210,178,180,202,251,164,148, 38,185,145,
-173,183,123,245,234,197, 57,127,183,188,178,111,181, 90, 51, 88, 41,100, 48, 24,143,172,193, 50, 24, 12,137, 93,187,118, 45,179,
-215,172, 78,167,187, 83,209,119, 47, 92,184, 16,251,160, 15, 32, 41, 41,169,237,191, 65,243,175, 56,118,198, 63,255, 28, 93,184,
-112,161,229,131,214,188,115,231, 78,219,127,131, 38, 0, 92,188,120,177, 13, 43, 89, 12, 6,131, 25, 44, 55,112,119, 58, 6, 6,
-131,193, 96, 48, 24,140, 71, 21,142,101, 1,131,193, 96, 48, 24, 12,198,131,133, 0,232, 86,214,134,202,140, 14, 32,132,116,171,
-236, 15,187,210,103,154, 76,147,105, 50, 77,166,201, 52,153,230,127, 79,211,149,246,127,102,116, 34,165,244, 47, 91, 0,116, 99,
-154, 76,147,105, 50, 77,166,201, 52,153, 38,211,124,212, 22,214, 68,200, 96, 48, 24, 12, 6,131,241,128, 17, 88, 22,252, 61, 16,
- 66,120, 74,169,237, 1, 74,250, 0, 40,239,133,110, 38, 0, 57, 85, 73, 38, 0,105,241, 98,159,168,200, 2,192, 92,188, 80,215,
- 18,179,184,148, 20,159, 24,106,147,180,160,132, 72, 68, 17,103,170, 87, 15, 63, 13,244, 50, 1,128, 38,168,126,125,141, 90,217,
-205,104, 54, 69,202, 37,178, 75,185,218,194,157,134,180,171, 9,172,132, 48, 24, 15,159,216,216,216, 81,148,210, 57, 69, 85, 20,
-121,239,196,137, 19, 95,178, 92, 97, 48, 30,176,193,170, 85,171,214, 9,142,227,194,236,147, 97, 86, 52,231,142,253,211,102,179,
- 37, 93,190,124,217,173,161,238,132, 16, 33, 56, 56,248,105,181, 90,221,153,231,249,118,197,223, 63,164,213,106,127, 79, 77, 77,
- 93, 71, 41,181, 86,229,128,162,162,162, 60, 13, 6,195, 32, 66,200, 48, 0,160,148,126,175, 80, 40,126,188,117,235, 86,126, 21,
-141, 80,173,160,160,160,239, 37, 18, 9,159,152,152,216, 25, 0,194,195,195,127, 55,153, 76,182,244,244,244, 97,148,210, 27,149,
-212,227,164, 82,233, 7,113,113,113,237, 9, 33, 43, 41,165,139, 30,208,185,148,115, 28, 87,166, 49, 17, 69, 49,162, 10,122, 82,
- 0, 94, 95,124,241,133,223,170, 85,171,154, 38, 37, 37, 53, 4,128,176,176,176,243, 35, 70,140, 56, 61,126,252,248, 44, 0,121,
-197, 70,171, 92, 82, 82,124, 98,210,239,222, 26,155,150,126,105, 16, 0, 4, 5, 55,252,145,231, 57,105,104,232,169, 35, 42,255,
- 97,254,117,235,213, 28,243,195,215, 95, 72, 35, 34,195,177,231,240,169, 38,227,255,247, 70,140, 34,176,238,167,204,100, 61, 60,
-234,212,169,115,130,227,184,176,202,204, 37, 87,252, 6,133,164,139, 23, 47,198,150,167,201,243,124,152,171,185,186, 74,175, 19,
- 69,241,214,133, 11, 23,202,156, 50,162,110,221,186, 71,120,158,143,116,183, 62,114, 78,103,121, 83,112,212,173, 91,247, 4,207,
-243, 97,174, 52, 75,175, 19, 69,241,214,249,243,231,219,186,171,233, 98, 14,189, 42,165,211, 29,205,138,210, 9, 0,157, 58,117,
-146,107,181,218,239, 53, 26, 77, 99,173, 86, 59,138, 82, 58, 99,239,222,189,129, 28,199,161, 91,183,110, 51, 98, 99, 99,227, 21,
- 10,197, 66,189, 94,127, 90,163,209, 12,221,187,119,175,145, 93, 49, 12,198,125, 26, 44,142,227,194, 78,157, 58, 21,160, 86,171,
- 81,108, 84, 96,159,189, 93, 20, 69,136,162, 8, 74,169,227,211,106,181,162, 83,167, 78,110,253,104, 88, 88, 88,195,186,117,235,
-174, 31, 55,110, 92,245,190,125,251,202, 2, 3, 3, 65, 8,193,221,187,119,235,252,242,203, 47,195, 23, 44, 88,240, 78, 88, 88,
-216,192,164,164,164,243,238,154,150,224,224,224,174, 0,158,107,216,176,225,147,147, 39, 79,150,182,107,215, 14, 54,155, 13,123,
-246,236,137,155, 55,111,222, 23, 33, 33, 33, 27, 0,172, 72, 77, 77,221, 77, 41, 21,221,212,109, 26, 25, 25,249,227,129, 3, 7,
- 34, 19, 18, 18,108, 3, 6, 12, 88, 9, 0,135, 15, 31,110, 44,138, 34,105,215,174,221,175,132,144, 65,148,210,211,149,200,243,
-254,227,199,143, 31, 56,110,220,184,106, 35, 71,142,124, 6,192,162,226,223, 34,197,249, 76, 43,121, 14, 29,145, 43, 74,105, 69,
-211,107, 7, 85, 34,146,165,142,143,143,247,105,219,182,237,203,233,233,233, 19,157,117,211,210,210,112,242,228, 73,243,220,185,
-115, 63, 63,124,248,240,194,200,200,200, 28, 0,218,242,132,168, 77,210, 34, 45,253,210,160, 14,109,190,240, 2,128,117, 91, 94,
- 30,114,252,116,134,199,207,191, 45, 25, 46, 83, 72,141,171,150,126, 46,173, 93, 43, 2,123, 79, 92,199,177, 75,217,164, 97,251,
- 62, 66,222,207, 43,187, 3, 88,194, 46,207,135, 3,207,243,161, 39, 78,156, 8, 80,169, 84,101,190,208,189, 84,191, 11, 16, 66,
- 64, 41, 69, 92, 92, 92, 69,154, 97,167, 78,157, 10, 80, 40, 20,142,186,163,116,157, 97,175, 87, 28,101,133, 82,116,232,208,193,
- 92, 65,157, 84,227,143, 63,254, 8, 80,169, 84, 14,157,178,210, 87,218,104,116,232,208,161,194,116,158, 60,121,210,145, 78,119,
- 52, 41,165,104,215,174,157,205,213,177,219,223, 88,225,234,184,237,154,109,218,180,161,149,209,116, 51,157, 21, 62, 0,105,181,
-218,239,215,173, 91,247, 68, 96, 96, 32,250,247,239,191,163, 65,131, 6, 50,149, 74,133,223,126,251, 13,225,225,225,254, 30, 30,
- 30,219,222,127,255,125,124,250,233,167,213,119,238,220,185, 6,192, 19,236,138, 97, 48,238,223, 96, 65,173, 86, 99,237,218,181,
-142,215,195,216, 95,147, 81,214,223,213,171, 87,119,235, 7,131,130,130, 98, 35, 34, 34,246,109,218,180, 73, 25, 16, 16,224, 88,
-111, 50,153,224,233,233,137,231,158,123, 78,214,189,123,247,218,195,134, 13, 59, 26, 20, 20,212,241,238,221,187, 39, 42,210, 11,
- 14, 14,126, 50, 38, 38,230,203,137, 19, 39, 6,246,235,215, 15, 62, 62, 62, 37,182,247,233,211, 7,189,123,247,150,222,186,117,
-107,200,186,117,235,134,172, 92,185,242,110,112,112,240,248,212,212,212, 13, 21, 58, 12,181,186, 91,147, 38, 77,190,222,179,103,
- 79,152,183,183, 55, 66, 66, 66,184,183,223,126,187, 97,205,154, 53,149, 65, 65, 65, 92,106,106, 42, 54,108,216, 80,115,196,136,
- 17,155, 21, 10,197, 40,131,193,176,219, 13,195, 38,243,245,245,157, 50,122,244,104,191,252,252,124,235,169, 83,167,174,219,215,
-203,229,242, 25,173, 91,183,110, 70, 8, 89, 75, 41, 93, 81,149,200, 21,165, 52, 31,127, 54,229,217,177,216,183,187, 25,201,146,
-157, 57,115,198,183, 77,155, 54, 27,140, 70, 99,179,177, 99,199,222,153, 59,119,174,210,211,211,211, 19, 0,201,207,207,207,153,
- 53,107,150,105,222,188,121,211,234,215,175,223,245,200,145, 35, 79, 54,105,210,196, 82,108,222,238, 53, 88,132, 56,210,147,152,
-156,129,125,135, 69,217,140,215, 39,135,125, 52, 39,242,246, 31, 23, 19, 69, 65,233,137,173,251, 47, 32, 45,171, 16,191, 30,185,
-136, 32, 63, 15, 34,149, 75, 98,188,195, 98, 58,230, 37, 95,220, 95, 5,195,201,168, 2, 42,149, 10, 91,183,110,189,231, 21, 83,
-101,189,126, 74, 16, 4,120,123,123, 87,248, 54, 2, 66, 8, 20, 10, 5,118,238,220, 89,226,245, 82,101,253,109,255,244,242,242,
- 2,165,180,194, 87, 28, 40, 20, 10, 28, 58,116, 8, 28,199,221,243,253,210,105, 22, 4, 1,106,181, 26,132, 16,206,149,230,254,
-253,251, 93,106,217, 63, 53, 26, 13, 0, 84,248,254, 33,185, 92,142,131, 7, 15,150,123,204,165,255,214, 20,191,239,210,149,230,
-161, 67,135, 74,188,162,171,244,171,187,156,255, 47,126, 56,174, 80, 84,169, 84, 54, 14, 12, 12,196,241,227,199, 49,115,230, 76,
- 89, 76, 76, 12,174, 95,191, 14, 66, 8, 70,142, 28,137, 6, 13, 26, 32, 53, 53, 21, 13, 26, 52,192,193,131, 7,155,178, 43,133,
-193,120, 0, 6,203,142, 59,230,202,254, 30,177,210, 21, 68,233,161,150, 17, 17, 17,114,141, 70,243,211,214,173, 91,149,126,126,
-127,190, 45,196,104, 52,162,160,160, 0,133,133,133, 40, 40, 40,128,135,135, 7, 22, 46, 92,168, 28, 58,116,232, 79, 17, 17, 17,
-117, 18, 18, 18,140,229,105, 18, 66, 62, 63,115,230, 76,160,213,106,133, 76, 38, 43,215, 44,214,170, 85, 11,227,199,143, 71, 92,
- 92, 92,208,224,193,131, 63, 7,176,161, 60,205, 98,227,246,213,225,195,135,195,164, 82, 41,174, 93,187,134,164,164, 36,140, 25,
- 51,166,134, 40,138, 72, 76, 76,196,245,235,215,145,156,156,140,101,203,150,133, 13, 29, 58,116, 33,128,218, 21, 29,123, 49, 47,
- 78,154, 52,169,142,175,175, 47,247,241,199, 31,231, 21, 22, 22, 46, 45, 94,255,250,252,249,243,135,118,232,208,161,218, 11, 47,
-188, 0, 66,200, 15,148,210,123, 12, 75, 41,205,178, 34, 87, 54, 0,151, 75,125, 45,186, 84,100, 43, 8, 69,239,194,203, 45, 67,
-147, 0,240,234,209,163,199, 36,163,209,216,236,224,193,131, 55,218,181,107, 87, 3, 64, 42,128, 12, 0,240,242,242, 82,127,254,
-249,231,129,125,250,244,185,218,165, 75,151,102, 61,122,244,152,148,145,145, 49,183,120, 59, 45,173, 41,138, 56, 19, 20,220,240,
-199,253, 71,198, 15,218,123,200, 36,157,252,191,119,238, 84, 15,143,200, 59,115, 45,219,118,241, 86, 6, 10,244, 86, 60,209,165,
- 17, 0,160,117,195,234,248,114,237, 65,188,242,234,155,146, 13, 63,174,124,234, 6,133, 26,192, 47, 21,228,231,125,193, 52,255,
- 52, 67,162, 40, 66, 34,145,224,177,199, 30, 3, 33,228,158,119,109, 74, 36, 18, 28, 57,114, 4, 93,186,116,129, 68, 34,193,243,
-207, 63,239, 50,157,162, 40, 66, 16, 4,244,232,209, 3, 86,171,245, 30,189,210,102,193,254,142,206,138, 52, 41,165, 16, 4, 1,
- 28,199,149,105,126, 74, 47,101,153,150,178,142,221,149,150,243,182,178, 94,247, 83, 90,211,158, 78,119,204,149, 93,211,221,116,
- 10,130,128,182,109,219,226,244,233,211, 21,154, 45,142,227, 92,214,201, 90,173,246,185,254,253,251,239, 24, 59,118,172, 2, 0,
-178,178,178, 28, 47,162,231,121, 30, 87,174, 92,129,201,100,194,234,213,171, 97, 52, 26,199,178,235,136,105,254,149,154,143,140,
-193,178, 87, 18,238, 26, 44,119,222,173, 71, 41, 29,247,250,235,175, 7, 86,100,174, 10, 11, 11,145,146,146,130, 26, 53,106,224,
-233,167,159, 14, 92,185,114,229, 56, 0,159, 84, 32, 43,229,121, 30,199,143, 31, 71,122,122, 58, 26, 53,106,132,200,200,200, 18,
- 59,220,188,121, 19,219,182,109, 67,110,110, 46,154, 55,111, 14, 20,245, 47, 42,147, 38, 77,154,204,140,142,142,238,209,169, 83,
- 39,185, 68, 34,193,153, 51,103,208,172, 89, 51,172, 93,187, 22,213,171, 87,135, 74,165,194,213,171, 87,209,168, 81, 35,236,219,
-183, 15,213,170, 85, 67, 76, 76,140,188,121,243,230, 7,178,179,179,127, 79, 72, 72,152, 89, 78,126, 74, 67, 67, 67,223, 24, 61,
-122,180, 44, 37, 37, 69,252,238,187,239, 14, 83, 74, 15, 19, 66,198,188,249,230,155,207,244,236,217,179,218,169, 83,167,242,255,
-248,227,143, 63,202, 50, 87,110, 70,174,172,165,111, 70, 54,155,205,168,215,235, 77, 70,163,209,194,113, 92, 2, 33,196,100,179,
-217,234,148,247, 48,255,220,115,207,213,204,204,204,124,229,213, 87, 95,141, 47, 54, 87, 87, 80,212,177, 29, 0, 96,181, 90,141,
-133,133,133,249,109,218,180,169, 49,116,232,208, 27,107,214,172,121,229,185,231,158, 91,183, 98,197,138, 66, 0,250,210,130,213,
-171,135,159,230,121, 78,170, 45,240,189,181,126,221,242,137,219,182,140, 11, 79, 76, 76,174,237,231, 95, 77, 43,213, 84, 75, 89,
-247,253,183, 39, 0,152, 82, 50,242,113,238,230, 93, 72, 36, 60, 46, 37,230,161, 67,175,167, 37, 55,174,205,105,111, 55, 88,140,
-191, 20,106,127, 57,244,222,189,123, 43,140, 96, 29, 57,114, 4, 18,137, 4, 74,165, 18,107,215,174,173, 80,212,110, 8,236,209,
- 33, 87, 38,198,213,203,207,237, 38,195,254, 2,246,210,203, 87, 95,125,133, 87, 95,125,181,196,111, 20,107, 18,119,210, 89, 86,
-250,106, 68, 68, 32, 61, 45,173,196, 58, 55, 94,210, 14,155,205, 6,137, 68,130,101,203,150,161, 79,159, 62,248,249,231,159, 43,
-252, 44, 54,182,212,157,116,182,109,219, 22,102,179,217,145,230, 43, 87,174,148,169,187,104, 81,197,221, 59, 99, 99, 99, 71, 17,
- 66,230,212,173, 91, 87,222,185,115,103,236,223,191, 31,115,230,204, 17,173, 86,107, 38, 0,180,109,219,182,218,196,137, 19,201,
-201,147, 39,161,209,104,144,145,145,177, 34, 54, 54,118, 54,235,248,206, 96, 60,128, 8,150,189,210,117,101,174,236, 79,138,174,
- 76,150, 70,163,233,221,171, 87, 47,135,185, 49, 24, 12, 14, 99,101, 55, 87,246,255,175, 94,189,138,152,152, 24,169, 70,163,233,
-237,194, 96, 21, 29,136, 32, 32, 36, 36, 4,153,153,153, 56,127,254, 60,106,212,168, 1,139,197,130,237,219,183, 35, 47, 47, 15,
- 18,137, 4, 82,169, 20,102,115,133, 93, 18, 16, 29, 29,253,216,170, 85,171, 98, 87,174, 92,153, 99,127,130,251,254,251,239, 65,
- 41, 69,181,106,213,160,211,233,144,150,150,134,223,127,255, 29, 86,171, 21, 26,141, 6,161,161,161,138,113,227,198,181,159, 53,
-107,150, 4,192,204,114,164, 91, 61,245,212, 83,158,158,158,158,248,223,255,254, 71,205,102,243, 39,132,144,214, 79, 62,249,228,
- 27,227,199,143,247, 77, 72, 72, 48,189,248,226,139, 39,204,102,243,231,197, 55, 19, 9,165,212,226,194,176,150, 27,185,178, 88,
- 44,246, 60,141, 47, 44, 44,132,191,191,127, 13, 23,125,180, 0, 64,122,232,208,161,182, 0,248,217,179,103, 43, 80,244, 2,107,
- 71, 26, 76, 38, 19, 10, 11, 11,161,213,106, 45,121,121,121,233, 83,166, 76,177,174, 89,179,134, 47,254,206,165,178, 12, 22,208,
-203,212,160,129, 90, 70, 41,255,230,146, 37, 75, 52, 61,123,246,228, 52, 26, 13, 10, 10, 10, 60,127,253,237, 55, 77,215,206,237,
-163,230,126,240,209, 14,207,176, 70,105,135,206,220, 66,242,221, 60,152, 44, 22, 68, 5,123, 21,197,191, 24,127, 57,197, 29,172,
- 29, 17, 44,103, 51,177,127,255,126,244,234,213,203,113,173, 75,165, 82,199,126,238,104, 10,130,128, 94,189,122,221, 19,209,217,
-187,119,111,153,209, 38, 87,117,136,179, 25, 42,109,138,202, 50, 94, 28,199,193, 85, 43,179, 61,122, 87,150,201,114,142,226,151,
- 50,109,174, 30, 38, 33, 8, 2,198,143, 31, 15,137, 68,130,169, 83,167, 66, 16, 4, 52,109,218, 20,130, 32,160, 77,155, 54,144,
- 72, 36,232,210,165, 75,185,145,182,178,204,165, 32, 8, 56,122,244, 40,154, 53,107,230, 72, 83,211,166, 77,209,162, 69, 11, 8,
-130,128,184,184, 56, 72, 36, 18,244,232,209,195,165,166,189, 67,187, 70,163,193,213,171, 87,193,243, 60, 8, 33, 89, 39, 79,158,
- 12, 4,128,153, 51,103,102,234,245,122, 63,131,193,128,174, 93,187,162,125,251,246,213,190,255,254,251,183, 1, 48,131,197, 96,
-220,111, 4,203, 94,233,186,107,176, 92, 97, 48, 24,154,216,163, 87,101,153, 43,231, 79,147,201,132,154, 53,107,194, 96, 48, 52,
-169,236,205, 34, 56, 56, 24,102,179, 25,203,151, 47,135, 84, 42,133, 84,250,167,175, 48,153, 42, 14, 14, 93,188,120, 49,254,232,
-209,163,205,154, 55,111,238,179,113,227,198,140,238,221,187, 87,235,217,179, 39,148, 74, 37,244,122, 61, 44, 22, 11, 90,183,110,
-141,232,232,104,164,167,167,227,215, 95,127,205,172, 83,167,142,255,177, 99,199,196,187,119,239,222,174, 64,186,107,215,174, 93,
- 65, 8,193,175,191,254,154, 69, 41, 61,169, 84, 42, 55,206,157, 59,215,219,100, 50,137,207, 60,243, 76, 98,118,118,246, 20, 0,
- 22,185, 92,254, 73,207,158, 61, 91,241, 60,191,214,102,179, 85,186, 50, 43,157,183, 90,173, 22, 10,133,194,157, 41, 33, 36,217,
-217,217, 13, 1, 64,173, 86,251, 2,112,140,144,212,235,245, 37, 76,176,201,100, 50,248,250,250,170, 1,160,248, 59,146,114,206,
- 71, 53,149, 74,181,254,246,237, 91, 30,206,145, 75,111,111,111, 12, 27, 58,148,107,215,182,173,172,113,147, 38, 61,222,250,116,
-229,218, 16, 63, 79, 83, 84,136, 31, 44, 54, 11,118,237,216, 46, 82,209,178,131, 93,162, 15, 7,187,201, 40, 29,193,146, 72, 36,
-216,183,111,223, 61,235,164, 82, 41,182,110,221,234,150, 25,178,155,169,242,154,200, 74,153, 33,226, 78, 84,157,231,121, 44, 91,
-182, 12,162, 40, 98,226,196,137, 37,154, 13,157,245,237,102,199,149,166,253, 59,209,239,136, 0, 76, 72,250, 76,238,248,126,233,
-244, 22,107, 18,119,204,208, 23, 95,124,225, 86, 4,235,241,199, 31,119,203,180, 57, 31,151, 61, 93,167, 79,159, 46, 83,119,201,
-146, 37, 46,251,180,137,162,136, 95,126,249,197, 97, 78,237,188,253,246,219,163, 61, 61, 61, 53,251,247,239,199,221,187,119,161,
-213,106, 81, 88, 88, 8, 31, 31, 31,239,110,221,186,157,185,123,247,110,194,197,139, 23, 89,135,119, 6,163,170, 17, 44,123,165,
-235, 78, 51, 97, 89,237,253,101,232, 9,132, 16, 24, 12,134, 50,141,149,179, 41, 48,155,205,200,202,202,130, 40,138, 85,158,171,
-171,172,138,213,149,193, 58,127,254,252,200, 81,163, 70,165,120,121,121, 53,206,202,202, 74,149,203,229,113,251,247,239, 15, 55,
-155,205,240,244,244,132,167,167, 39,182,109,219, 6,111,111,111,188,250,234,171,119,244,122,253, 97,181, 90, 29,168,215,235,207,
-222,189,123,247,173,114,157,139, 68,210,181, 67,135, 14, 56,121,242, 36,114,115,115,247, 16, 66, 26,191,240,194, 11,221,195,195,
-195,201,156, 57,115, 12, 55,110,220,248, 10, 64,134, 90,173, 94,190,106,213,170,142,205,155, 55,215,140, 24, 49, 2,132,144,175,
- 41,165, 6,119,143, 89,171,213,150, 48, 86,249,249,249, 40, 40, 40,128, 90,173,182,186,153,103, 18, 20,245,165,178,247,167,114,
-156,155,226,232,149,253,252, 80, 65, 16,104,209, 46, 84, 82,158,158, 90,173,158,189,114,229,202, 18,125,238,236,209,209,180,180,
- 52,120,122,122,226,237,183,222,146,190,251,218, 11,205,120, 77,224, 17,142, 35, 48,153,105, 46, 21, 77,219,181,105,131, 15,176,
- 75,244,225, 68,176,236,134,160, 95,191,126,247, 52, 11, 74,165, 82,236,220,185, 19, 3, 6, 12,112, 60,176, 20, 55,181,187,101,
- 8,250,246,237,235,136, 4,109,223,190,189,204,230, 61,123, 4,202, 29, 35,104,223,119,194,132, 9, 16, 4, 1, 95,126,249, 37,
- 38, 77,154, 4,142,227,240,217,103,159,129,227, 56,204,152, 49,163, 82,245,132,189, 46, 75,248,168,232, 51,108, 82, 62,178, 22,
- 5, 2, 0, 60, 60, 61,237, 59, 86, 74, 83, 16, 4, 71,228,170, 73,147, 38,144, 72, 36,104,211,166, 13, 4, 65,112, 68,174,122,
-247,238,237, 60,173, 2,117, 71, 83, 16, 4, 92,187,118,205,145,230, 54,109,218,148,136, 92, 9,130,224,150, 97, 35,132,188,219,
-165, 75,151, 57, 97, 97, 97, 1, 99,199,142, 37, 60,207, 35, 54, 54,214,127,198,140, 25,121, 18,137, 68, 57,121,242,228,178,174,
-107, 9,128,198,245,235,215, 87,179, 43,135,193,184,143, 8, 86,101, 12,150, 59,149,163, 74,165, 58,151,153,153,217, 70, 46,151,
-151, 48, 87,101, 25, 45,158,231,145,158,158, 14,149, 74,117,238, 65, 30,176,171, 38,194, 98, 51,243,154, 83, 62,180,120,250,233,
-167,215,172, 93,187, 54,106,215,174, 93, 56,118,236, 24,170, 85,171,134,185,115,231,222, 74, 72, 72, 24, 74, 41,253,195,157,223,
-173, 89,179,102, 3,181, 90,141,195,135, 15, 3,192, 1, 0,207,189,242,202, 43,196,106,181, 98,225,194,133, 58, 0, 59,189,188,
-188, 54,252,244,211, 79, 77, 26, 53,106, 36,219,181,107, 87,193,177, 99,199,246,186,105,174,108,162, 40,222, 99,172,156,243,212,
-195,195,195,157, 8,150,197,203,203,235,124,126,126,254,211,122,189, 62, 95, 46,151,123,228,231,231, 27,157,141,149, 93, 95, 16,
- 4,201,181,107,215, 82, 0, 68,121,121,121,157,135, 83, 83, 98,137, 2, 38, 8, 93,187,118,237, 42,148, 62, 7,105,105,105,184,
-123,247, 46,204,102, 51,154, 55,111, 78,120, 98,225,179,239,156, 29,205, 46,201,135, 15,199,113,212,126,173,219, 71,253,149, 53,
-114,112,251,246,237,142,255, 57,142,195,175,191,254,234,150,105,219,185,115,103,133, 29,209, 75,117, 72,119, 25, 10,183,239,191,
-112,225,194,162,215, 81, 20, 71,174, 56,142,195,244,233,211, 33,151,203, 49,103,206, 28, 76,159, 62,189, 68, 84,198, 85, 4, 75,
- 16, 4, 68, 76,213, 57, 63, 20, 21, 93, 20,197,253,157, 8, 33,206, 38,203,173, 72,155,171, 14,238,238, 68,254,203, 74,167, 66,
-161, 40,183,131,123, 41,205,114,127,224,196,137, 19,223, 52,107,214,236, 70,181,106,213,118,182,105,211, 70,126,226,196, 9,140,
- 27, 55,142, 24,141, 70,207, 93,187,118, 57,126,183, 44,163,167,213,106,149,236,202, 97, 48,238, 35,130, 85,153, 78,238,238,244,
- 75,208,235,245,187,247,238,221,219,162,127,255,254, 66, 69,205,131, 90,173, 22,129,129,129,184,121,243,166, 85,175,215,187,156,
-254,192,102,115,127, 66,116, 87, 6,171,140, 60,248, 35, 38, 38,198,106,177, 88, 80,187,118,109,132,134,134,194, 96, 48, 96,222,
-188,121, 86,119,205, 21, 33, 68, 26, 27, 27,203, 3, 64, 78, 78, 14, 0,100, 1,168, 83,167, 78, 29,156, 60,121, 18, 57, 57, 57,
-155, 1,116,123,247,221,119,155,182,106,213, 74,186,118,237, 90,221,216,177, 99, 55, 91, 44,150, 57,238,232,139,162,104,178, 90,
-173,145, 28,199,153,115,115,115,147,157,243, 51, 48, 48,208, 87,173, 86,147,180,180, 52,139, 59, 6,171,113,227,198,199,239,220,
-185,131,217,179,103,103,204,157, 59,183, 78, 65, 65, 65, 78, 94, 94,158,213,217,100, 25, 12, 6,206,223,223, 95,190,104,209, 34,
- 37, 0, 52,110,220,248,120,121, 6, 75,171,213,134,171, 84, 42,199,255, 70,163, 17,119,239,222,197,221,187,119,145,150,150,134,
-130,130, 2, 68, 69, 69, 65,167,211,213, 96,151,227,223,135,115, 51,153,243,245,237,124, 3,175,204,181,238,172,217,175, 95, 63,
- 71,223, 45,123, 68,204,190,172, 95,191,190, 68,199,113, 87, 77,111,118,131,181,112,225, 66, 76,152, 48, 1, 10,133, 2,159,127,
-254,121,137, 38,194, 50, 76, 1,113, 39,157,145,211,244,184,187,192, 23, 18,137, 4,126, 99,211, 74, 52,197,149, 49, 26,207, 45,
- 35, 56,119,238,220, 7,214, 68,104,215,172, 81,163,232, 82, 89,182,108, 25,158,126,250,105, 28, 56,112,160,202, 77,132,145,145,
-145,171,230,207,159, 47,191,120,241, 34,242,243,243,145,145,145, 1,163,209,136,164,164, 36, 71,222,148,133, 78,167, 83,176,171,
-134,193,184, 15,131,229,220,249,211,149,193, 42,238, 32,233,202, 8,124,254,206, 59,239,188,210,190,125,123, 95, 15, 15, 15,164,
-164,164,220, 99,174, 10, 11, 11,161,209,104, 96, 50,153,176,119,239,222,124, 81, 20, 63,119,101, 10, 44, 22, 11, 2, 2, 2,144,
-153,153, 9,177,156,126,209, 28,199, 65,169, 84, 66,171,213,162, 60, 51, 80, 81, 5,108, 54,155, 97,177, 88, 96,177, 88, 42,109,
-210, 0, 40,237, 19,182, 22,255,190, 54, 36, 36,164,166, 66,161, 64,124,124, 60, 0, 92, 3,208,185,103,207,158,146,172,172, 44,
-250,226,139, 47, 30,161,148,142,119, 49,155,189,105,255,254,253,145, 0,160, 84, 42,175, 2, 64, 82, 82,146, 37, 55, 55,183, 68,
-100, 80,165, 82,209, 1, 3, 6, 4, 83, 74,177,127,255,254, 72,169, 84, 74, 81,206,156, 85, 0, 12,155, 55,111,190,232,229,229,
-181,230,131, 15, 62, 24,218,167, 79,159, 11, 13, 27, 54,140,212,106,181,233,122,189, 94,111, 48, 24, 40,207,243, 82, 31, 31, 31,
-197,142, 29, 59,110, 28, 57,114,164,155,167,167,231,154,205,155, 55, 95, 4, 80,102,164, 77,173, 86, 39,233,116,186, 8,141, 70,
- 3,189, 94, 95,194, 92,221,189,123, 23,148, 82,220,186,117, 11, 42,149,234, 14,187, 28,255, 30,156, 35, 46,165, 35, 45,165,215,
-185,107,174,156,205,208,142, 29, 59, 42,156, 3,203, 93, 77,103, 51, 52,105,210, 36, 44, 88,176,224,158, 8,214,156, 57, 69,207,
- 36,111,189,245,150,203,232,149, 51, 18,137, 4,119, 23,248, 34,104, 66,118, 9, 51, 3, 0,196,158,190, 74, 78,201, 38, 8, 2,
-102,207,158,125, 79,231,115,231, 38, 60,119,141,149,115, 58,211,211,211, 33, 8, 2,124,125,125, 49,108,216, 48,244,232,209,195,
-209,212, 88, 89,221,196,196,196,211,159,126,250,105,245,208,208, 80,172, 93,187,214,164, 86,171,101, 93,186,116,161,185,185,185,
-164,162, 8, 22, 51, 88, 12,134,107, 56,119, 42, 72,119,154, 9,203,170, 36, 9, 33,221,156,255, 79, 72, 72,200,211,106,181,195,
-134, 12, 25,162, 55, 26,141,168, 89,179, 38,228,114, 57, 44, 22, 11, 76, 38, 19,164, 82, 41,130,131,131, 65, 41,197,134, 13, 27,
-244, 58,157,110, 88, 66, 66, 66, 94, 69,154,132,144, 55, 31,123,236, 49, 67,124,124, 60,170, 87,175, 14, 15, 15,143,123, 94, 27,
-225,233,233, 9,111,111,111, 92,190,124, 25,203,151, 47,215, 19, 66,222,172, 72,179, 44,163,105, 55, 86,118,163,229,106,100, 82,
- 41, 77,181, 61,138,163,211,233, 0,192, 90,189,122,245, 64, 0,184,117,235, 22, 0,220,142,138,138,234, 88,171, 86, 45,114,224,
-192, 1, 80, 74,119,149,101,174, 74,105,102,199,197,197,221,142,139,139, 51,153, 76, 38,169,201,100,146,230,229,229,153,253,253,
-253, 3,252,253,253,253, 3, 3, 3,125, 3, 2, 2,188, 83, 82, 82,172, 86,171, 85,106,179,217,164,113,113,113,166, 86,173, 90,
-221,129,211,108,238,165, 52, 69, 0,249, 75,150, 44,153, 37,145, 72,110,183,109,219, 54,102,218,180,105, 9, 22,139,197, 24, 26,
- 26,234, 19, 20, 20,164,212,233,116, 5,239,191,255,126,250,130, 5, 11,186, 73, 36,146,219, 75,150, 44,153, 5, 32,191,248,187,
-247,104, 90,173,214,221,187,118,237,178, 90, 44, 22, 36, 39, 39, 35, 37, 37, 5,169,169,169,142, 79,111,111,111, 28, 63,126,220,
-102, 54,155,119, 85, 34, 63, 31,148,177, 96,154,248,179,239, 79, 69,198,202,157,110, 0,165,211,105, 55, 67, 79, 63,253, 52, 6,
- 15, 30,140, 33, 67,134, 96,216,176, 97, 24, 49, 98, 68,101,166,102, 40,125,189, 59,190, 59,109,218, 52,188,245,214, 91,120,231,
-157,119, 32,151,203,241,246,219,111, 99,230,204,153,152, 57,115,102,105,115, 69, 42, 56,246, 18,245, 92,222,178, 80,232, 86, 68,
-192,180,186, 86, 81, 19, 33,165,127, 46,238,231,167,195, 12,189,253,246,219, 56,114,228, 8,166, 76,153,130, 61,123,246, 96,220,
-184,113,216,182,109, 27, 70,143, 30,141, 95,126,249,197,241, 89,252, 16, 72,221, 73,167, 32, 8,232,216,177, 35,116, 58,157,195,
-192,142, 25, 51,166,132,222,232,209,163,221,202, 79,165, 82, 57,116,243,230,205, 27,151, 47, 95,126, 43, 59, 59,187, 71, 66, 66,
-194, 29,173, 86, 75,242,242,242, 28,231,176,244, 82, 28,137,150,179,235,136,105, 50, 11,117, 31, 17, 44,171,213,138,240,240,240,
- 18,239,182,226, 56,174,196, 82,153,126, 4, 0,144,154,154,186, 35, 56, 56,248,201, 39,158,120, 98,245,115,207, 61,231, 17, 29,
- 29, 45,137,136,136,128, 78,167,195,237,219,183,145,144,144, 96,221,179,103, 79,190, 78,167, 27,158,154,154,234,114, 20, 89,114,
-114,242,202,192,192,192,237,195,135, 15,159,209,180,105,211, 49, 19, 39, 78,228,163,162,162,144,151,151, 7, 31, 31, 31, 4, 4,
- 4, 32, 62, 62, 30,251,246,237,179,229,230,230, 46,182,217,108,239,166,165,165,101, 84, 38,147,172, 86, 43,111, 54,155, 49,100,
-200, 16,136,162,136,121,243,230,193,106,181,242,149,144, 48,155,205,102, 10,128,100,102,102, 2,128,206,110,184,174, 95,191, 14,
- 0,119, 34, 34, 34, 52, 0,176,107,215, 46, 2,224,176,187, 15,244,206,145,172,232,232,232,120,123,165,232,124,147,179,111, 47,
-142, 92,185,122, 12, 55, 12, 26, 52, 40, 93,167,211,245,156, 52,105,210,140,133, 11, 23, 14, 93,184,112,225, 61, 59,121,122,122,
-174,249,236,179,207,222, 29, 52,104, 80,122,121,209,171,226,136,221, 91,207, 62,251,236,160,115,231,206,121, 40, 20, 10,104,181,
- 90,100,101,101,193,108, 54, 35, 42, 42, 10,233,233,233, 88,185,114,101,129, 94,175,159,201, 46,199,191,151,242,140,149,187,125,
- 44,203,139,226,108,221,186,181,204, 57,166, 42,171, 89,218,100,184, 59, 55,149, 27, 15, 67,101, 78,253, 80,153,122,173, 60,205,
-143, 63,254,216, 49,217,106, 89,145,171,202, 68,176,236,154,190,190,190, 0,138,102,223, 23, 69, 17,143, 63,254,120,149,117,139,
-223, 45,248,164,253,255,216,216,216,119,215,174, 93, 59,135, 82,234, 7, 64,112,206, 3,246, 82, 5, 6,227, 1, 25, 44,155,205,
-150,212,177, 99,199, 18, 21, 91, 69, 47, 85, 45, 54, 34, 73,110,154,172,237, 81, 81, 81, 81,203,150, 45,251,159, 90,173,238,102,
- 48, 24, 26, 1,128, 66,161, 56,167,213,106,119,113, 28, 55, 63, 53, 53,213,237,151, 51, 23, 27,166,113, 97, 97, 97,243, 70,140,
- 24, 49,167,109,219,182, 3, 95,124,241, 69, 34, 8, 2,214,173, 91, 71,147,146,146,214,115, 28,247,102, 74, 74,202,205,170,100,
-146, 74,165,186,186,126,253,250,154, 91,183,110,133,197, 98,193,162, 69,139,160, 80, 40,174,186,251,125, 74,105,134, 32, 8,171,
-219,182,109, 59,244,200,145, 35,107, 40,165,231,229,114,249,247,113,113,113,195, 14, 31, 62,252, 35,165,244,146, 32, 8,223,183,
-105,211,102,216,241,227,199, 55, 80, 74,207, 86, 34,121,217,113,113,113, 57, 0,130,172,214,178, 91, 20,227,226,226, 76, 0,238,
-186, 97,174,236,228,143, 26, 53,202, 60,106,212,168,215, 6, 13, 26,180,252,143, 63,254,104,153,155,155,219, 8, 0,188,189,189,
-207,181,104,209,226,248,143, 63,254,120,165, 56,114,101,112,117,236,132,144, 1,141, 26, 53,218,240,222,123,239,169, 99, 98, 98,
-132,218,181,107, 35, 33, 33, 1,231,207,159,183,126,243,205, 55,133,122,189,190, 31,165, 52,135, 93,142,127, 15,246, 38, 66,111,
-111,239, 18, 15, 79,246,161,251,149,105,194, 43, 75,179,244,131, 25,207,243, 21,105,186,116, 53, 26,141,198, 49,106,217,157,174,
- 9, 21,189,123,212,158, 78,187,166,125,113,195, 92, 81, 87,154,197,175,233,169,140, 38,220,209,180, 88, 44, 14, 93, 55, 52, 43,
-245,163, 39, 78,156,248, 6,192, 55,181,107,215,190, 14,160, 22, 51, 85, 12,198, 95, 96,176, 46, 95,190, 28,251, 87,254,240,173,
- 91,183,242, 1,188, 91,188, 60, 16,146,146,146,110, 2, 24, 20, 20, 20,244,201,225,195,135,223, 6, 0, 81, 20,103,187,122,159,
-161, 43,206,158, 61, 59, 64, 34,145, 44, 92,177, 98, 69, 91, 74, 41,188,188,188, 14, 95,191,126,253,229, 74, 70,193,198, 16, 66,
- 38,218, 71, 5, 26,141,198, 49,132,144,201,148, 82,173,211,118,199,255,149,132, 2, 48, 82, 74, 67,202,217,110,172,132,185,114,
- 68,178, 0,152,126,252,241,199, 66, 0,103,240,231, 60, 87,150,226,197, 0,167,102, 65, 23, 55,184,223, 9, 33,181,223,126,251,
-237,185, 60,207,119,213,106,181,161,106,181, 58,209,106,181,238,214,233,116,111, 82, 74,179,216,165,248,247, 97,181, 90,147, 59,
-118,236, 40,148,245,224, 84,209, 13,188,162, 7, 42,155,205,150, 20, 23, 23,135, 42,104, 38, 87,144,212,219,109,218,180,225,220,
-213,178, 99,177, 88,210, 43, 74,103,155, 54,109,202,125,104,172,234,177,183,105,211,166, 82,105, 44,174,171,146, 31,180,166,139,
-252, 44, 23,189, 94,159, 83,173, 90,181, 66,131,193, 32, 49, 26,141,146,210, 17,123,165, 82,153,193,174, 28, 6,163,138, 6,235,
-223, 76,177,161,234,251,160,244,138,251, 67,189,244, 0,116, 12,165,254,215, 86,244,127, 37,249, 43, 34, 64, 34, 0,221, 3,202,
-195, 76, 0, 47,178, 75,238,159,199,249,243,231, 91, 61,104,205,139, 23, 47,198,254, 5,233,108,243,160, 53, 47, 92,184, 16,251,
-168,106, 86, 68,114,114,114, 43,118,101, 48, 24,247, 7,199,178,128,193, 96, 48, 24, 12, 6,227,193, 66, 0,148, 57, 18,160, 50,
-111,202,174,202,104, 2, 87,250, 76,147,105, 50, 77,166,201, 52,153, 38,211,252,239,105,186,210,174,140,255,248, 71, 83,214, 48,
-220, 7,181, 0,232,198, 52,153, 38,211,100,154, 76,147,105, 50, 77,166,249,168, 45,172,137,144,193, 96, 48, 24, 12, 6,227, 1,
-195, 12, 22,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193,120,132, 32,132,144,
-176,176,176,142, 33, 33, 33,109, 30,213, 60, 16, 88, 49, 96, 48, 24, 12, 6,131,241, 32,168, 94,189,186,183,205,102,123, 46, 36,
- 36,228,229,154, 53,107,214, 4,128,208,208,208,243,148,210,249, 74,165,242,251, 27, 55,110,152, 30, 25,147,201, 94,133,192, 96,
- 48, 24, 12, 6,227,126, 8, 9, 9,105, 10,224,101,165, 82, 57,188, 85,171, 86,178, 46, 93,186,192,199,199, 7, 86,171, 21,169,
-169,169,248,253,247,223,113,250,244,233,108,139,197,178,208, 98,177, 44,204,200,200, 72, 99, 6,139,193, 96, 48, 24, 12, 6,163,
- 28,130,131,131, 63,237,213,171,215, 36, 31, 31, 31,212,174, 93, 27, 65, 65, 65, 48, 26,141,208,235,245,160,148, 66, 16, 4, 80,
- 74, 81, 80, 80,128, 19, 39, 78,224,216,177, 99,214,252,252,252, 53,132,144,249, 41, 41, 41,167,153,193, 98, 48, 24, 12, 6,131,
-193, 40, 69, 72, 72, 72,218,158, 61,123, 2,172, 86, 43, 50, 51, 51, 97, 52, 26,161,211,233, 28, 6,139,231,121, 80, 74, 97,181,
- 90, 1, 0,162, 40,226,210,165, 75, 56,114,228, 8, 18, 19, 19, 63, 75, 77, 77,125,237,191,152, 47,172,147, 59,131,193, 96, 48,
- 24,140,251,194,104, 52, 98,213,170, 85,200,204,204, 68,120,120, 56, 66, 67, 67,225,237,237, 13,165, 82, 9, 0, 14,115, 5, 0,
- 28,199, 33, 38, 38, 6,195,135, 15, 7, 33,100,216,127, 53, 79, 88, 39,119, 6,131,193, 96, 48, 24,247,131,197,100, 50, 33, 54,
- 54, 22,241,241,241, 56,121,242, 36,154, 53,107,134,250,245,235, 35, 51, 51, 19, 41, 41, 41, 37,118, 62,126,252, 56, 78,157, 58,
-133, 14, 29, 58,252,167, 51,133, 53, 17, 50, 24, 12, 6,131,193,168, 50,161,161,161,207, 84,171, 86,109,209,136, 17, 35,148, 77,
-154, 52, 65, 82, 82, 18,146,147,147,145,147,147,131,166, 77,155, 34, 38, 38, 6, 55,111,222,196,246,237,219,113,234,212, 41,200,
-229,114,132,133,133, 65,179,230, 7,252, 18, 18,156,156,146,146, 18,198, 12, 22,131,193, 96, 48, 24, 12, 70, 41, 66, 66, 66,252,
- 8, 33,111,134,134,134,190, 50,108,216, 48, 73,237,218,181,145,148,148,132,140,140, 12,228,228,228,224,232,209,163,118, 51,134,
-176,176, 48, 36, 36, 36,224,220,185,115,122,163,209, 56, 54, 57, 57,121, 37, 51, 88, 12, 6,131,193, 96, 48, 24,229, 27,173,112,
- 0,179,106,213,170,245,204,211, 79, 63,205,133,132,132, 32, 57, 57, 25,123,246,236, 65,173, 90,181,144,150,150,134, 19, 39, 78,
-216,242,243,243, 23,219,108,182,119,211,210,210, 50,254,171,121,241,151,118,114, 39,132,116, 99,154, 76,147,105, 50, 77,166,201,
- 52,153,230,163,161,153,146,146,146,152,146,146, 50,242,218,181,107, 49,115,230,204,217,188,104,209, 34,240, 60,143,208,208, 80,
-236,217,179,135,238,222,189,123,125, 97, 97, 97,221,148,148,148,113,255,101,115, 5,176, 78,238, 12, 6,131,193, 96, 48, 30, 48,
-119,239,222,189, 12, 96, 64,104,104,104,171, 11, 23, 46,188, 1, 0,162, 40,206,190,123,247,238,137, 71, 37, 15,152,193, 98, 48,
- 24, 12, 6,131,241,151,144,156,156,124, 12, 64,223, 71,241,216,217, 60, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,
-131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,241, 72, 65, 0,148, 57, 18,128, 82,186,203,109,145, 42,140, 80,112,165,207, 52,
-153, 38,211,100,154, 76,147,105, 50,205,255,158,166, 43,237,202,248,143,127, 52,148, 82,151, 11,138,231,203,170,236, 2,160, 91,
- 85,190,199, 52,153, 38,211,100,154, 76,243,225,107, 86,165,174, 47, 75,179,248,225,157,160,168,149,132,179,255,255, 79, 75,231,
-191,229,216, 31, 21,205,255,218, 34,184,112,151,142, 76, 34,132,136, 0, 68,250, 0,102, 38, 37,132,216, 79,192, 3,209, 99,252,
- 5,161,205,162,115, 68,254,244,225,236, 60, 49, 24,255,225,235,253,129,213,245, 78,117, 7,239,116,147,181, 1,176, 17, 66,112,
- 63,117,201, 95,113, 79,250,167, 31,251,163,172,249,111, 71,168, 40,163,170, 85,171,182, 35, 32, 32,160,115,102,102,166, 88,188,
- 30,161,161,161,224, 56, 14,130, 32,232,227,227,227, 61, 43,251,131,129,129,129, 95,199,196,196, 60,151,149,149, 37,114, 28,135,
-240,240,112, 16, 66,192,243, 60,120,158,215,223,184,113,195,243,239,206,148,230,205,155,231,152, 76, 38, 77,233,245, 50,153,204,
-112,242,228, 73,143, 71,193, 92,249,251,251, 63, 25, 24, 24,232,157,157,157, 77, 1, 32, 44, 44, 12, 60,207, 23, 21, 26, 65,176,
-222,188,121,115,133,187,122,145,145,145,199,149, 74,165,183, 32, 8,224,121, 30,130, 32, 64,171,213,230, 94,186,116,169,101,241,
-246, 67, 74,165,210,143,231,121,123,217,130,193, 96,200,186,120,241, 98, 59,118,235,251,119,178,126,253,122,190,103,232,243,181,
- 4,170,111,204,113,212, 75, 20, 73,158,149, 40,207,110, 79,254,250,134, 59,223, 31, 56,112,160,237,111,190, 6,170, 3,176, 82,
- 74, 83,170,240,101,174,140,138,182,151, 13, 24, 92,252,175,129, 3,178, 8,112,173, 46,176,225, 34,160, 47,213,172, 32, 62,236,
- 7,169,234,213,171,207,175, 86,173,218,200,194,194, 66, 29,199,113, 32,132,208,152,152, 24,251, 62, 37, 62, 69, 81, 76,186,112,
-225, 66,172,139,155,172,164,122,245,234,159, 85,171, 86,237, 89,157, 78,167, 35,132,128, 16, 66, 9, 33,104,212,168,209, 61,154,
- 54,155, 45,233,252,249,243,177, 15, 43,157,127,215,177, 55,108,216,176, 76,205,242,142,189, 44, 77,231,116, 18, 66, 16, 19, 19,
-115,223,233,252, 39,106,254,103, 13, 22, 0, 46, 32, 32, 96,115,203,150, 45, 59,109,217,178,133,187,124,249, 50, 23, 29, 29, 13,
-155,205, 6, 81, 44,186,246,155, 53,107,166,170,236,143, 5, 5, 5,125,215,178,101,203, 33, 91,182,108,225, 54,111,222,204,181,
-104,209, 2,132, 16,216,108, 54,216,108, 54,116,237,218, 85,121,159,149,133, 70, 16,132,137, 50,153,172,163,213,106,173, 15, 0,
- 18,137,228,146,209,104,220,103,181, 90, 63,167,148, 22,186,163, 99,177, 88, 84, 23, 46, 92,184, 39,111, 90,182,108, 41,171,106,
-218,234,212,169,115,152,227,184,168,178, 46,218,242, 62, 41,165,183, 46, 92,184,208,182, 60,205,122,245,234, 29,230, 56, 46,202,
-190,127, 89, 26,165,215,137,162,120,235,252,249,243,109, 43,170,116, 2, 3, 3,159,106,219,182,173,215, 79, 63,253, 68, 18, 19,
- 19,137, 82,169,132, 40,138,176,217,108,176, 88, 44,232,210,165, 75,165,230, 79, 83,169, 84,158,187,119,239,174, 21, 16, 16,128,
-244,244,116,100,101,101, 97,244,232,209,215,236,219,149, 74,165,223,239,191,255, 94,199,215,215, 23, 58,157, 14,121,121,121, 24,
- 54,108,216,191,254,226,234,209,161,230,123, 4,240,181,255,111, 19,145,189,235,224,205,183,238, 87,183, 94,189,122,167,100, 50,
- 89, 96,121,231,188,172,115,111, 50,153,210, 46, 92,184,208,204,197,245, 19, 1,160, 47,207,243,181, 5, 65,168, 7, 32,194,106,
-181, 6, 2,128, 84, 42, 77,227,121, 62,193, 98,177, 92, 49,153, 76,215, 1,108,165,148, 38,148,167,213, 51,244,249, 90,196,170,
- 27, 88, 96, 20,123,171,106,126, 80, 87,119,115,250, 85,149, 92,183,173,103,232,243,235,221, 53, 89,127,163,185,138, 12, 9, 9,
-249,184,248,239, 41,148,210,248,251,213,180, 1,131, 41,165, 94, 0,144,151,151,231,149,152,152, 24,180,117,235,214,152,185,115,
-231,118,145, 25, 12, 31,153,128,203, 21,125,191,123,199, 90, 39, 4,142,132,161, 56, 6, 96,165, 98,210,206,125, 55, 31,196,141,
-137, 11, 13, 13,157,223,179,103,207, 17,139, 23, 47, 86, 29, 59,118, 76,213,176, 97, 67,240, 60,111,175, 47, 80, 58,240,208,186,
-117,235, 10,179, 15,128, 16, 18, 18, 50,239,177,199, 30, 27,186,112,225, 66,213,149, 43, 87, 84,145,145,145, 40,190,217,150, 40,
-155,246,117, 77,155, 54,125,216,233,252, 75,143,189, 87,175, 94, 67, 23, 45, 90,164, 58,119,238,156,170,118,237,218,224, 56, 14,
- 28,199,221,163,199,113, 28, 98, 99, 99,221,210,236,209,163,199,208, 37, 75,150,168, 78,157, 58,165,170, 87,175,158, 35,239,156,
-154,231, 42,157,206,127,184,230,127,207, 96, 17, 66,184,106,213,170,173,138,141,141,237,185,101,203, 22, 30, 0, 78,157, 58,133,
-236,236,108,132,134,134, 66,163,209, 64, 46,151,195, 96, 48, 84, 42,220, 23, 24, 24,248,117,177,185,146, 0,192,134,225, 3,112,
- 75, 2,140, 79, 55, 65, 42,149,226,230,205,155,224,121,254,126, 66,199, 29, 60, 61, 61, 87,110,220,184,209,167, 89,179,102, 92,
-102,102, 38, 34, 35, 35,145,157,157,221,114,255,254,253,205,159,127,254,249,231, 9, 33,207, 80, 74,247,187,171,185,109,219, 54,
-168,213,106,168, 84, 42,168,213,106,152,205,102, 82,213,244,241, 60, 31,118,236,216,177, 0,141, 70, 3, 81, 20, 29, 75,169,246,
-107, 7,162, 40,162, 67,135, 14,230, 10, 79,158, 32,132, 29, 59,118, 44, 64,169, 84,130, 82, 90, 66,207,102,179, 65, 46,151, 59,
- 63, 33,194,102,179,161, 77,155, 54,102, 87,145, 43,187,185, 2,128, 53,107,214, 32, 40, 40, 8, 1, 1, 1, 80,171,213, 80, 42,
-149, 85, 57,118,248,249,249,225,149, 87, 94,193,224,193,131,177,122,245,106, 72, 36, 18,231,227,128,175,175, 47,126,251,237, 55,
-120,122,122,162, 70,141, 26, 37,182,255,107, 35,129,128,239,246,253, 55, 29, 17,217,129,125,154, 8,221,226,162, 22, 58, 42,215,
-162,157,168, 88,180, 47, 21,109,182,156,221,135,110,207,112,121, 87,224,184,144, 99,199,142, 5,200,229,114,247,110,238, 54, 27,
-154, 53,107,198,187,184,126,122,199,196,196,108,120,249,229,151,165,181,107,215, 38, 82,169, 20,130, 32, 64, 16, 4,123,121,172,
- 65, 41,173, 33,138, 98,167,180,180, 52,250,197, 23, 95,124, 68, 8,121,130, 82,186,173,204,178, 73,245,141, 11,140, 98,239, 3,
-167,209,114, 96,183,105,248,109,221,244,150,113, 77, 69,120,168,244, 55, 0,252, 99, 13, 22, 33,196, 83,169, 84,190,189,110,221,
- 58, 41, 0,116,235,214,237,109, 66,200,171,148,210,252, 7,245, 27, 94, 94, 94,240,242,242, 66,195,134, 13,241,228,147, 79,122,
- 55,109,218,116,114, 39,163,113,204, 94,160,220,107, 83,224,184,176, 95,127,191, 22, 96,255,127,232,128,230,210,158,157,106,165,
- 21, 61,136,149,222,155, 66,180,209,164, 93, 7,111,197,186, 56, 86, 46, 40, 40,232,147, 94,189,122, 13, 90,188,120,177, 7, 0,
-124,253,245,215,120,252,241,199, 17, 24, 24, 8,165, 82, 9,153, 76, 6,137, 68, 2,169, 84,234,248,116, 17, 17,226,131,130,130,
- 62,122,252,241,199, 7, 46, 92,184,208, 3, 0,190,251,238, 59,244,233,211, 7,126,126,126,240,244,244,132, 92, 46,135, 76, 38,
-131, 84, 42, 45, 97,184, 42,147,206, 23,122,116, 65, 77,165, 28,125,222,251, 8, 62, 62, 62,216,253,218,203,144,112, 28,198,109,
-223, 15, 15, 15,143, 10,211, 89,158,230,201,147, 39,145,158,158, 94,230,177, 19, 66, 42,172,251,156,143,189,119,239,222, 3, 23,
- 45, 90,228, 56,246,158, 61,123,194,207,207, 15, 30, 30, 30,144,203,229,144, 74,165, 37,150,242,242,192, 89,179, 87,175, 94, 3,
-151, 44, 89,226, 1, 0, 43, 86,172, 64,183,110,221,224,227,227, 3, 15, 15, 15, 71, 94, 86,246, 28,253,147, 53,255,147, 6,203,
-222, 55, 42, 32, 32, 96,208,207, 63,255,204, 57,223, 0,229,114,185,227,194,144,201,100,224, 56,174, 50,149, 22,137,137,137,121,
-110,203,150, 45,142, 47,153, 74, 85, 10,114,185,188, 82,154,165,244,187,117,238,220,249,135,159,127,254, 89, 33,149, 74,161,215,
-235,113,225,194, 5,120,121,121, 65, 38,147,161,127,255,254,124,187,118,237,252, 58,117,234,244, 19, 33,100,168, 59, 35, 20, 40,
-165,208,104, 52, 37, 12,214,253, 52, 33,219, 47,208, 45, 91,182,128,231,249, 18,133,204,254,233,252,119, 64, 64,128, 91,186,114,
-185, 28,135, 15, 31, 6,207,243,144, 72, 36, 16, 4, 1, 18,137, 4,191,252,242, 11, 94,123,237, 53,100,102,102,130, 16, 2,137,
- 68, 2, 15, 15,151,173,155, 36, 48, 48,208,219,110,174,138, 35,128, 80, 42,149,144, 72, 36, 68, 16, 4, 98,111,198, 35,132, 16,
-119,219,212, 5, 65, 64, 66, 66, 2,134, 15, 31,142, 21, 43, 86, 96,246,236,217, 24, 58,116,104,137,237,249,249,249,240,241,241,
-129,143,143, 15, 20, 10, 69,149,203,194, 63, 9,177, 84,238,188, 59,231, 99, 21, 68,138,162, 78, 30, 34, 32, 2, 20, 20, 34, 21,
-145,150,124, 3,159,126,178,128,119,183, 44,201,229,114, 28, 58,116,200, 97,130, 4, 65, 0, 33, 4,206,198,200,190, 4, 5, 5,
-185,212,148, 74,165,179, 54,109,218, 36, 91,189,122, 53,214,174, 93,235,248, 13,181, 90, 13,111,111,111,248,249,249, 57,150,176,
-176, 48,242,205, 55,223, 72, 27, 55,110, 60, 11,192,182,178, 77, 32,245, 82,213,252,160,238,192,110,211,138,204,229, 52,138,156,
-107,115,154,112,185, 51,188,254,193,230, 74, 0,240,250,151, 95,126,233,215,188,121,115, 0,192,151, 95,126,233, 55,106,212,168,
-215, 9, 33,111, 81, 74,173, 85,126,192, 2,214, 18, 66, 6, 23, 71,108, 21,221,187,119,151,125,245,213, 87,168, 87,175, 30, 38,
- 76,152,224,251,233, 71, 31,245, 5,240, 83,249,101,169,100, 97,250,224,227,249,222,148, 22,149, 31, 42,210, 18,159,217,233, 9,
-120,251,237,247, 92,214,201, 0,184,144,144,144,231,151, 46, 93,234,232, 14,225,227,227, 83,102,221, 36,145, 72, 28, 75, 5,166,
-136, 20, 71,133, 70, 45, 94,188,216,161,233,239,239, 15,169, 84, 90,226, 6,123,251,242, 25,108, 91,254, 62,212,190, 65, 24, 62,
-229,195, 74,167, 51, 76, 46, 67,152, 82,134, 38, 77,154, 64,165, 82,225,164,164,232, 86,230,225,225,225, 50,157,229,105, 58,215,
-203, 0,160,211,233, 28, 81,123,147,201,132,216,216, 88,183,142,125,201,146, 37, 14, 77, 63, 63, 63,199,177,219,211,229, 92,215,
-219, 31, 96, 42,210, 12, 9, 9, 25,181,108,217, 50,135,166,175,175,111, 9, 13,137, 68,130,149, 43, 87,222, 83, 71,220,175,102,
-101,207,123,105,205,132,132, 4,204,157, 59,215, 81, 39,217,163,120,246,174, 70, 11, 22, 44,112,203, 96,255,167, 34, 88, 0, 72,
-102,102,166,120,249,242,101,238,228,201,147,144, 72, 36, 8, 8, 8, 64,139, 22, 45, 0, 0,102,179,217,126,211, 37,245,234,213,
- 75,227, 56, 14,246,155, 46,199,113,176, 90,173,142,246,100, 39, 35,195,101,103,103,139, 59,119,238,228, 86, 61,209, 3, 38, 10,
- 52,125,251,125,244,236,211, 7,219, 67,101,224, 1,180,188,156, 9,153, 76, 38, 4, 7, 7, 91,236, 39,193,174,237,220, 55,171,
-180, 57, 34,132,120,168,213,234,111,182,110,221,170,224, 56, 14, 5, 5, 5, 16, 69, 17,237,218,181, 3,199,113, 56,127,254, 60,
-222,124,243, 77,108,216,176, 1,155, 54,109, 82, 54,107,214,236, 27, 66, 72,125, 74,105,129,147,153,218, 85, 86,225,244,240,240,
-128, 74,165,114, 24, 44,251, 49, 23,183,169,151,110,146, 73,190,112,225, 66,243,242, 52,237,145,132, 1, 3, 6, 56,250,156,217,
-205, 80,233, 79,169, 84,138,243,231,207,151,101,250,238,209, 20, 69, 17,237,219,183,183, 55,197, 65,163,209, 96,239,222,189,142,
-237, 77,155, 54,133,201,100,130,191,191, 63, 46, 93,186,228, 82, 51, 35, 35,131,166,164,164,144, 85,171, 86, 65, 34,145,192,207,
-207, 15, 42,149,138,252,244,211, 79,175, 43, 20,138, 48,163,209, 40, 90, 44, 22,132,133,133, 45,168, 81,163,134,253, 28,105,111,
-220,184,225, 87,158, 38,207,243, 80, 40, 20,248,238,187,239, 48,119,238, 92,188,241,198, 27, 37, 46, 44,158,231, 97, 48, 24,224,
-239,239,239, 48, 89,165, 47,188,191, 98,216,238, 95,173, 73, 65,113,225,212,118, 92, 60,183, 11,162, 77,132, 77,164,160,212, 6,
-209, 10,156,220,121,180, 78,234,173,148, 80, 10, 10, 20,247,184,177, 20,106,173,157,252,229,245, 0,108,222,155,105,156,231, 42,
-157,130, 32,192, 98,177, 96,235,214,173,184,113,227, 6,118,236,216, 1,189, 94,239,200,199, 54,109,218, 96,212,168, 81, 8, 10,
- 10,114,153,159,148,210,239, 18, 19, 19,155,182,111,223,158,228,230,230, 34, 55, 55, 23,122,189, 30, 54,155, 13, 86,171, 21,130,
- 32, 64,161, 80, 64,169, 84, 34, 48, 48, 16, 6,131,129, 26,141,198,239,202,211, 20, 69,146,167,187, 57,253,234,111,235,166,183,
- 28, 56,141, 98,253,135, 4,117, 34,228,186,125,103,188, 71,109, 59,246,122,119, 66, 57, 10, 20, 29, 58, 71, 64,109, 54, 91,230,
- 75,227, 63, 24,247,176,207, 81, 41,198, 76,156, 56,177,190,115,243,244,176, 97,195,112,225,194,133,250,159,127,254,249, 24, 0,
- 95, 86, 86,211, 7, 8, 5, 0, 43,240, 27,138, 22,172,215,235,201,144,205,155, 7, 0,120,118,211,166, 77, 24, 58,116, 40, 62,
-249,232,163,134,165, 13, 86,137,178, 68, 41, 18,174, 29, 64,194,245,131, 16, 69,234, 20, 5, 47,251,111,234, 94, 58, 73, 97, 97,
-161,225,216,177, 99,154, 21, 43, 86,192,219,219, 27, 81, 81, 81,142, 86,138,210, 55, 88,251,255,174,202,146, 78,167, 51, 92,190,
-124, 89,243,195, 15, 63,192,215,215, 23, 53,106,212,128, 74,165,114,104,202,100, 50, 28,221,190, 17, 99,134,247, 70,102,194, 69,
-204,127,117,144,219,233,124,161,123, 23,132, 43,100, 24, 48,251, 3, 68, 71, 71, 99,253,224,126,224, 8, 48,118,207, 81, 72,165,
- 82,172,232,221, 1, 50,185, 12, 99,247,252,225, 42,157, 14,205, 19, 39, 78, 64, 20, 69, 68, 68, 68, 64,167,211,193,211,211, 19,
- 10,133, 2, 18,137, 4, 59,119,238, 68,255,254,253,177,122,245,106,180,105,211,198,229,177, 23, 22, 22, 26,206,157, 59,167,249,
-254,251,239,225,235,235,139,240,240,112,168, 84, 42, 71, 96,194,110,180,120,158, 71, 84, 84, 20,242,242,242, 80,179,102,205, 10,
- 53,181, 90,173,225,228,201,147,154,239,191,255, 30, 62, 62, 62, 8, 11, 11,115, 68,216,236,166,104,230,204,153, 37, 52,154, 52,
-105,114,223,154,149, 61,239,165, 53, 7, 12, 24,128, 90,181,106,193,211,211, 19,106,181,218,161, 93,145,230,127,218, 96, 81, 74,
-105,241, 40, 10, 68, 71, 71, 35, 59, 59, 27,114,185, 28, 45, 90,180, 64,102,102, 38, 52, 26, 13,164, 82, 41, 40,165, 24, 60,120,
- 48, 63,101,202,148,128, 98, 83,229,168,240,203,105, 75, 23, 57,142, 67,219,182,109,113,161,184,229,167,103,159, 62, 8, 11, 11,
-131,189, 19,135, 66,161,192,208,161, 67,201,107,175,189, 38,216,163, 23,148, 82,232,245,122, 52,110,220, 88, 89, 65,116,228,213,
-159,126,250,201, 75, 38,147,161,160,160,192,209, 68,198,243, 60, 46, 95,190,140, 79, 62,249, 4,207, 62,251, 44,238,220,185,131,
-144,144, 16, 76,158, 60, 89,243,193, 7, 31,188, 10,224, 93, 87,153,163,209,104, 28,230, 74,165, 82, 97,196,136, 17, 66,187,118,
-237, 2, 52, 26, 13, 60, 60, 60, 96,111,238,179,217,108,104,219,182, 45,113, 21,117, 16, 69, 17,219,183,111,135, 32, 8, 46, 35,
- 88,197,109,214,110,105, 30, 59,118,204, 97,206,156,159,138, 8, 33,184,112,225,130,195,204, 21, 23,230,138, 52, 41,207,243, 80,
-171,213, 8, 10, 10,130, 82,169,132, 74,165, 34, 91,182,108,121, 43, 34, 34, 34,248,229,151, 95,230,242,243,243,185,216,216, 88,
-244,238,221, 91, 16, 69, 17,102,179, 25, 93,186,116,169, 48, 31, 37, 18, 9,142, 31, 63,142, 15, 62,248, 0,211,166, 77,195,146,
- 37, 75,208,173, 91,183, 18, 70,129, 16,130,106,213,170,193,211,211,243,191,115,117,137,128,217,106,129,174, 80,239,104,194,181,
-217,108, 56,183,247, 76,157, 91,103,174,197,252,252,195,106, 9, 0, 24,246,110,116,254, 86,240,147, 11,127,172,219,201, 87,122,
-108,111,182,249,152,139,166, 66, 76,152, 48, 1, 51,102,204,192,224,193,131,177,115,231, 78,188,249,230,155,120,254,249,231, 75,
- 68,176,220,193, 98,177, 44,125,230,153,103, 70,175, 95,191,190,222,180,105,211, 56,123, 4, 75,165, 82,129, 16, 2,131,193, 0,
-163,209, 8,189, 94,143, 43, 87,174,136, 47,190,248,226, 85,147,201,180,180, 60, 61, 43, 81,158, 85,201,117,219,106, 87,231,107,
-105,227, 63,246,104,223, 42, 66, 79,148,205,243, 30,175,221,141,118, 27, 26,225, 3, 74, 65,197,162, 40,159,209,168,197,235, 83,
- 39,243,127,231,169, 34,132,244,238,222,189,123,143, 57,115,230,220,179,109,206,156, 57,184,116,233, 82, 15, 66, 72, 66,121, 77,
-162,101,225, 13,132, 41,130,130, 62, 3, 0,239,187,119, 39,229, 2, 73, 0, 48, 4,232,105, 3,250,237,220,185, 19, 0, 80,189,
-122,117,136, 64, 3, 2,124,199, 3,107,173,101, 69, 5, 41,133,197, 98,133, 94,111,172,208, 88,217,255,119, 21, 92,182,215,245,
- 60,207,163, 97,195,134,232,217,179, 39,164, 82, 41, 60, 60, 60, 28,205, 57,101, 69, 49, 92, 52,221, 83, 0, 34, 33, 4, 81, 81,
- 81,232,209,163, 7,164, 82, 41,212,106,181,195,180,200,100, 50,240, 60,143, 70,237,186, 98,245,202, 57,120,174, 79, 51, 60, 27,
- 23,136, 13,231,178,220, 74,103,132, 82,134, 26, 42, 57,162,163,163,225,225,225, 1, 66, 0,129,255,179, 62, 85,169,148,144,201,
-101, 21,166,179,180,102, 90, 90, 26,226,227,227, 17, 31, 31, 15,142,227,208,190,125,123, 71,212,229,250,245,235,120,247,221,119,
- 97, 52, 26,221, 58,118,142,227, 80,187,118,109,116,233,210, 5, 50,153, 12, 42,149,170, 68,211,160, 61, 79, 11, 10, 10, 80,171,
- 86, 45,108,222,188, 25, 29, 58,116,112,169, 25, 29, 29,141,142, 29, 59, 66, 42,149, 58, 30,164,149, 74,165,227,190, 81,108,238,
- 28,191,209,172, 89,179, 74,105,238, 56,126, 7,203,119,254, 14,163, 73, 68,190,206, 82,226, 11,193,254,158, 56,248,253, 52,183,
-142,221,174,185,108,217, 50,228,230,230, 58,234, 32,123, 0,198, 30, 60, 9, 15, 15,199,162, 69,139, 30,173, 38, 66,251,109,193,
-238, 42, 67, 67, 67, 97,239,231,161,209,104, 32,147,253,217,199,219,106,181, 98,195,134, 13, 8, 8, 8,112, 44, 94, 94, 94,229,
- 22,232,234,213,171,131, 82,138, 9, 25, 69,221, 12,126, 11,145, 34, 1,192,227, 25,212, 17,221,177,217,108,248,233,167,159,224,
-108, 96, 60, 60, 60, 42,108, 46,146,201,100,157, 90,180,104,193, 25,141,198,123,204,213, 7, 31,124,128,161, 67,135,162,110,221,
-186, 16, 69, 17,133,133,133,232,220,185,179,100,193,130, 5,157, 42, 99,176, 84,170,162,254,252, 38,147, 9,123,247,238,133,143,
-143, 15,252,252,252,224,235,235, 11, 15, 15, 15, 40, 20, 10, 16, 66, 92, 54,151, 81, 74, 49, 96,192, 0, 71,161,115,142, 90,149,
- 54, 91,135, 15, 31,118,171,153,140, 82,138, 86,173, 90, 65,173, 86, 67,163,209, 64,163,209, 96,251,246,237,142,237, 45, 91,182,
-132, 40,138, 8, 8, 8,192,145, 35, 71, 92, 86,186, 97, 97, 97,142,253, 37, 18, 9,249,233,167,159, 94,143,140,140, 12, 30, 59,
-118, 44,199,243, 60, 78,157, 58,133,139, 23, 47, 34, 40, 40,200,209, 39,203, 85, 58,181, 90,109,234,130, 5, 11,108, 95,125,245,
- 21, 0,160, 75,151, 46,200,203,203, 75,119,218,158, 53,124,248,112,199, 40, 69, 0,200,206,206,206,250, 15,248, 43, 88,205, 86,
-232, 12, 6, 20, 22,232, 28,209,160,244,148, 52,239,105,175, 77,148,124, 50,110, 36, 0,224,181,121, 95,162, 96,201,159, 21,216,
-198,215,134, 4, 60,241,233,218,233, 0,250, 87,164,175,211,233, 96, 52, 26, 81,163, 70, 13, 28, 63,126, 28, 5, 5, 5,232,214,
-173, 91,137, 8,169,115,158,186, 56,247, 38, 66, 72,187, 62,125,250,252,241,249,231,159,215,172, 95,191, 62,209,106,181,208,233,
-116,112,254, 60,119,238, 28, 93,179,102,205, 45,157, 78,215,150, 82,106, 42, 79,111,123,242,215, 55,122,134, 62,191,126,255, 89,
- 89, 31,255,168,171,158,201, 57, 53,173, 89,201,114,109,190,254,138,193, 70, 47,130,218, 0, 27, 68, 80,171, 8, 27, 40,254,206,
-241,219,132,144,176, 58,117,234,188,180,122,245,234, 50,243,139,231,121,172, 94,189, 26,237,219,183,127,137, 16,114,185,162,206,
-253,118,218, 0, 50,131, 68, 50,109,235,143, 63, 22,245,229,234,210,101, 90, 27,139,229,181, 35,128,169, 65,163, 70, 79, 29, 62,
-124,216,203, 94,175,120,121,121,129, 82,202,235,116, 58,175,182,109,219, 62, 85, 86,179, 43, 21, 1,139,197, 2,189,222,136,188,
-188, 2,152,204,150,226, 58, 83,132,205,102, 45,254, 20, 97, 45,174, 71, 37, 2,239,209,169, 77,245,194, 34,163, 69,114,247, 29,
-189, 19, 94, 78, 93, 79, 9, 33, 8, 12, 12,132, 84, 42, 45, 17,101,114, 39,122, 85, 6, 54,123, 93,232,231,231, 7,153, 76,134,
-179,123,127, 70,250,165,131,144, 18, 10,209,102,129,104, 53,195,102, 53,131,231,120, 92,185,153,130,232, 96,151, 99,135, 28,233,
-236,249,246,108,180,110,221, 26,235, 7,247, 3, 33,192,203,123,142, 66, 34,145,224,251, 1, 93, 33,151, 73,241,226,206,163,238,
-166,179,196,177,159, 56,113, 2, 19, 38, 76,192,135, 31,126, 8,165, 82,105,111, 57,193,229,203,151,241,227,143, 63,162,123,247,
-238,110, 31, 59, 33,196,113,236,130, 32, 96,250,244,233, 72, 73, 73,193,188,121,243,208,188,121,115, 72, 36, 18,228,230,230,162,
-109,219,182, 72, 75, 75,115, 59, 63,237,205,120, 50,153,172, 68,180,201,110,252,170,114,142,236,154, 35, 7, 4, 99,203,161, 53,
- 32, 32, 56,250,253,196, 18,247,162, 69,107, 15, 84, 90,115,198,140, 25, 37,210,249, 40, 70,175,202, 52, 88,148, 82, 26, 26, 26,
- 10, 81, 20, 75,152,170,210, 29,106,237, 33, 63,231,144, 98,133,125, 16,120, 30,162, 40, 58, 10, 3, 95,198,246, 35, 71,142,220,
- 99, 2,150, 47, 95, 94,225, 13,220,106,181,214,247,240,240, 40, 17,189,146, 74,165,152, 62,125, 58, 70,140, 24,225, 48, 87, 82,
-169, 20, 43, 86,172, 64,108,108, 44, 76, 38, 83,253,138,210, 42,149, 74,117,141, 26, 53,226,236, 81, 32,165, 82, 73,134, 14, 29,
-202, 91,173, 86, 71,158,216, 23,123,223, 52, 87, 38,195, 30,109,218,177, 99,135, 91, 17, 44,119,251, 32, 81, 74,113,230,204,153,
- 18,166,205, 62, 10, 6, 0,206,156, 57,227,232,159,229,174,166,205,102,131, 82,169, 36, 82,169,148, 40, 20,138, 48,187,185,226,
-121,222,113,190,157,251,228,185,186, 80,206,158, 61,219,185,162,237,231,206,157,251, 79, 78,199, 32, 66,132,217, 98,129, 94,103,
- 66, 65,161, 30,179,222,255,182,104,195, 44, 28, 3,112,172,221,152, 9,120,185,103,247, 46, 0,170, 85,210, 16,192,126, 3,251,
-233,167,159, 32,145, 72,176,121,243,102,120,122,122,162, 95,191,126,240,244,244,196,180,105,211, 48,120,240, 96,183, 35, 88,197,
-101, 41,143, 16,210,238,213, 87, 95,253,227,227,143, 63,174, 30, 30, 30, 14,147,201, 4,179,217, 12,147,201,132, 27, 55,110, 96,
-205,154, 53,137, 58,157,174, 29,165, 52,207,149,222,246,228,175,111,252,124,228,245,148,184, 39,159,212, 95, 78,251, 13,119,239,
-102,193,106, 77,134,104,179,194,108, 45, 26,145,108,179, 90, 97,181,218, 32,240,156,231,162,207,167,236, 44,234,240, 79, 76, 3,
- 7, 14,124,236, 33,158, 42,122,237,218,181,172,106,213,170,217, 43, 49, 79,147,201, 68,138, 31,224, 40, 0,123, 7,119, 45, 42,
-232,136,238,204,113, 96,244, 39, 31,126, 24,102,111,190,127,255,195, 15,195, 38, 79,154, 52, 26,192,130, 75,231,206,173, 30, 57,
-114,228,171,235,214,173, 43,241,157,145, 35, 71,226,210,185,115,171,203, 14, 17, 20, 71,176, 12, 6,100,100,229,224,133, 49,111,
- 57, 66, 7, 0,133,179, 67,165, 69,255, 43, 0, 32, 51,237, 6,198, 79,120, 77, 94,222, 3, 85,131, 6, 13, 32,138, 98,137,104,
- 72, 21,250, 94, 57, 71,134, 28,251,121,122,122, 66, 42,149,226,198,225,159, 49,105,204, 32,192,102, 6,181,232, 1,179, 14, 48,
- 23, 66, 52,233, 64,164, 74,192,162,119,169,107, 79,167,167,167,103, 81,159, 80,129,135, 76,250,167,249,115,142, 92,185,115,227,
- 46,125,236, 9, 9, 9,120,249,229,151, 97, 54,155, 49, 96,192, 0,152, 76, 38, 24, 12, 6,232,245,122, 68, 69, 69, 65,167,211,
-185,125,236,246,123,167, 84, 42,197,196,137, 19, 17, 27, 27,139,119,223,125, 23, 83,167, 78, 69, 84, 84, 20,198,142, 29,139, 53,
-107,214, 32, 38, 38,166, 66, 93,187,102, 81,147,123,145,166,253,120, 75, 55,229,217, 91, 10,220, 61, 71,101,105,218,103, 23, 41,
-125,222,255,247, 76,215, 74,107,126,240,193, 7,200,200,200,184, 39,114,101,255, 59, 52, 52, 20, 11, 23, 46,124, 36, 35, 88,142,
-225,164,246, 27,168,253, 70,238, 92,185,171, 84, 42,108,216,176,161, 68,231,186,138,194,210, 28,199, 65, 20, 69,108,171, 86,244,
-253,222,197,145, 43,231,255,251,246,237,139,200,200,200, 18,209, 43,165, 82, 89, 97,161, 17, 69, 17,183,111,223,198,133, 11, 23,
-208,186,117,107,228,229,229, 65,194,113,120,237,220, 57, 52,120,230, 25,152,164, 82,136,162, 8,153, 76,134,209,163, 71,187,213,
- 81,253,143, 63,254,240,113,254,191, 65,131, 6, 73,113,113,113,161,199,143, 31,119,116,124, 47,110, 62,115, 24, 13, 55, 47,106,
- 60,245,212, 83, 37,162, 86,206,230,202,121,249,237,183,223,220,106, 34,164,148, 34, 46, 46,206, 17,189,242,240,240,192,166, 77,
-155, 28,219,237,225,231,192,192, 64,183, 52,237, 79,240,197, 29,219, 97, 52, 26,197,130,130, 2,238,228,201,147,144,201,100,142,
-115,162, 84, 42,161, 80, 40,238,107,112,194,127, 30,155, 8,147,197, 2,189, 94,143,194,194,162, 25, 66,110,156, 47,217,143,217,
-108,172,250,224, 52,123,148,170,160,160, 0,187,119,239,198,198,141, 27,209,188,121,243,123, 58,185, 59, 95,183,110,148,209, 12,
- 66, 72,251, 41, 83,166, 28,125,239,189,247, 66,124,125,125, 97, 54,155,113,231,206, 29,124,243,205, 55, 41, 58,157,174, 61,165,
- 52,163, 18,174, 13, 22,139, 21, 6,157, 17,121,249, 5,152, 57,103, 69,185, 85, 4, 0,100,167, 95,193,208,161,195,100, 15,243,
- 52, 81, 74,147, 1, 60,239,116, 93,173, 2, 96, 15,199,231, 83, 74, 71, 84, 70, 79, 2,116,122,114,224,192, 46, 19, 39, 78,116,
-172,155, 56,113, 34,142, 30, 61,218, 69,178,126,253, 5, 11,176,151, 95,191, 62,230,243,207, 63,119,236,243,249,231,159, 99,195,
-250,245,123,108,192,222,242,234, 14,123, 19, 97, 97,161, 30,158,222,193, 72,142,223,231, 50, 45, 82,222, 0, 42,138, 46, 31,252,
- 74,247,187, 41, 93, 63, 85,162,252,208, 70,141, 26,217, 91, 23, 32,149, 74,209,176,203, 64,124, 58,127, 41,228, 28,197,147,221,
- 26,162,154,194, 6, 40,125, 33,237, 48, 13,196,187, 70,241, 67, 71, 83,183, 30, 80,247,191, 53, 25,183,212, 10,188,184,227, 32,
-164, 82, 41,126, 26,220, 27,114,185, 20,207,254,188, 31, 82,169, 20, 63,143,122, 2, 82,153, 20, 61, 23,255,232,214,131,138,253,
-216,111,220,184,129,195,135, 15, 35, 58, 58, 26,215,175, 95,135,115, 63, 91, 74,169,219,166,173, 97,195,134,142,128,132, 68, 34,
-193,221,187,119,209,167, 79, 31,199, 3,254,190,125,251, 48,101,202, 20,140, 26, 53, 10,157, 58,117, 42,179, 95,108,105,205,152,
-152, 24, 71,224,160,180, 9,118,110,182,173,204, 57, 42, 75,211, 81,126,171,120,222,157, 53,223,123,239,189, 50,205,122,101, 52,
-255,211, 6,203,126,129,148,215,238,172, 86,171,241,202, 43,175, 96,198,140, 25,240,247,247,119,217,119,198,238, 92, 43, 98,235,
-214,173,247,172,219,188,121,179,171, 38,194,203, 94, 94, 94,177,157, 59,119, 70, 94, 94, 30, 18, 19, 19,161, 86,171,209,224,211,
- 79,113,238,229,151,209,100,241, 98,112, 93,186,128, 16, 2,153, 76,134,115,231,206, 65,169, 84, 94,174,108,196,192,195,195, 3,
- 62, 62, 62,142, 54,117,187,209,114, 50, 88,212, 29, 51,180,109,219,182, 50, 71,232, 84,165, 15,150,189,226, 61,122,244,104,137,
-254, 87,206,205, 28, 71,143, 30,117, 68,176,138,247, 39,174,206, 83,241, 83, 29,181,235,169, 84, 42,248,250,250, 66, 46,151, 59,
-140,149,221, 92,185, 99, 46, 93, 77, 36, 26, 17, 17, 81, 98, 34, 82,137, 68, 82, 98, 34,210,127,123, 19,161, 94,111, 64, 97,129,
-254, 65, 54,105, 21,153,179,226, 1, 39, 27, 54,108, 64,171, 86,173,238, 49, 87,246,168, 99, 21, 12, 71, 18, 33,164,211,252,249,
-243,143,125,246,217,103, 62,133,133,133,248,246,219,111,243, 10, 11, 11, 59, 81, 74,147, 42,165, 5,192, 98, 54, 67,103, 48, 66,
- 91, 88,148, 7, 55, 47,252,228,210,148,253,155,169,223,168,209,240,111,191,253,246,158,245,223,126,251, 45,174, 95,191, 62, 28,
-231,206,237,109, 9, 44,121,125,218,180,218,205,155, 55, 15, 3,128,215,167, 77, 75,106, 9, 44,169,232, 58, 55, 23, 55, 17, 22,
- 22, 22, 69, 61, 12,218,204, 7, 83, 78,139, 77, 70,121,125,174,170,114, 67,180,215,183, 82,169, 20, 61, 6,191,128,148, 91, 87,
- 16,173,206, 68, 53,111, 21,104,126, 50,164, 93,222,193,185,108, 21,230, 45,222, 94,169,116,170,229, 50, 40, 20,114,167, 62, 87,
- 10,200, 20,114, 71, 58, 21, 74, 37, 36,114, 89,165,143,253,234,213,171, 80, 42,149,176,217,108,247,220,111, 42,123,252,206,198,
-229,243,207, 63,199,148, 41, 83,176, 98,197, 10,156, 59,119, 14, 77,154, 52, 65,183,110,221,144,158,158,142,179,103,207,194,104,
- 52,186,157, 78,231,126,113, 23, 47, 94,196,175,191,254,138,248,248,120, 36, 38, 38, 86,249,188, 59,107,150, 54, 88, 27,118,157,
-198, 83,221,155, 85, 73,115,230,204,153, 72, 79, 79, 47, 17,185,114,142,110, 62,210, 17, 44,123, 19,147,211, 77,249,158, 40,149,
- 90,173,118,116,136,244,244,244,116, 25, 25,178, 27,172,184, 91, 5, 37,250,114,217, 35, 89, 0, 48,106,212,168,123, 34, 88,165,
- 39,167, 43,141,209,104,220,183,111,223,190,166,125,251,246,229, 47, 95,190,236,104,138, 52,181,105,131, 38,139, 23,227,252,196,
-137,232,152,144, 0,131,217, 12,133, 66,129,237,219,183,155,117, 58,221,190, 74, 86, 22,196,217, 96,169,213,106,120,121,121, 57,
- 12, 70,101, 92,121,121, 79,136,206,255, 87, 38, 34,100,239,115,102, 95,236, 55, 86, 66, 8,244,122,189,163,179,102,101,162, 34,
- 54,155,205,113,225,217, 59, 40,122,123,123, 59, 42, 13,251,104, 50,119,155, 71, 93, 77, 36,170, 80, 40, 60, 15, 28, 56, 80,203,
- 62,141, 68,102,102, 38, 6, 15, 30,124,237,223,126,113, 81, 80,152,173, 54, 20,234, 13, 40,212,235, 30,184,254,234,213,171,113,
-227,198, 13,152,205,102,188,255,254,251,247, 24,171,202,116,114, 47,163, 92,221,104,214,172,153,216,171, 87, 47, 28, 61,122, 20,
-114,185,220, 66, 41,173,244,252, 85, 84, 20, 97,182, 90, 97,208,235, 81,168,213, 62, 18, 79,173, 23,207,157,251, 73,173, 86, 15,
- 6,160,201,205,205,229,189,188,188,160, 82,169,160,215,235,243,248,226,145,130, 71, 0,147,183,197,242,225,160, 65,131, 62, 3,
- 0,133,197,242,225, 17,192, 84,209,117,110,177, 22,155,245, 7,152,143,246,122,171,188, 58,169, 42,209,105,251,141, 84, 42,149,
- 66,224,121,124, 59,119, 50,162,213, 25,104, 22,233, 1, 99,218,117,200, 60,252, 65,188, 35, 48,111,241,118, 92, 74,200,174, 84,
- 58,135,172, 92,143,240,240,112,108,121,166, 31, 20,114, 5,134,108,216, 13,137, 68,130, 29, 99, 7, 67, 42,147,161,219, 87,223,
- 87,233,216,181, 90,109,185,145, 42,119, 35, 88,165,143, 93, 34,145,160,105,211,166,168, 83,167, 14,246,238,221,139,102,205,154,
-225,250,245,235,184,126,253, 58, 18, 18, 18,112,238,220, 57,228,228,228, 84,250, 28,173, 93,187, 22,217,217,217,144,201,100,200,
-204,204, 68,124,124,188, 91, 83,177,184, 58,239,118,234, 61, 62, 19, 0, 16, 82,205,171, 82, 6,203, 89,243,163,143, 62,186,199,
-180, 63,138, 45, 29, 66, 57, 38, 64, 95,175, 94, 61,165,115,251, 41,199,113,240,240,240, 32, 83,166, 76,225,139,255,134,151,151,
- 23,170, 85,171,230, 86,179,155, 68, 34,209,183,108,217, 82,105, 47,128,118,227,164, 86,171,249,169, 83,167,146,229,203,151,151,
- 27,213,114,209, 7,235,179, 17, 35, 70, 60,159,148,148,228, 19, 16, 16,128,212,212, 84,200,100,178,162,139,162,115,103,196,221,
-186, 5,115, 81,159, 34, 92,189,122, 21, 75,151, 46,213, 26,141,198,207, 42,155, 81, 26,141, 6,126,126,126,142,166, 65,123, 4,
-199,201, 44,210,170, 84,100,165,151,202, 68, 28,236,154,206, 6,203,126, 99, 29, 51,102, 76, 9,179,229,118,129, 16, 4,107,199,
-142, 29, 5,123, 58, 44, 22, 11, 26, 53,106,132,244,244,116, 72, 36, 18,200,100,178, 18,145, 59,119, 12,150,171,137, 68, 5, 65,
-128,201,100, 66,135, 14, 29, 64, 8,193,151, 95,126, 89,165,200,203, 63,206, 96, 89, 69,162,209,248, 33, 36,164, 46,170, 5, 24,
- 32,138, 15,238,237, 47, 86,171, 21, 99,199,142, 45, 17,177,178,143, 84,180, 55,241, 23, 53, 43, 89,170, 60,105,171,253,186,190,
-159,249,223, 68, 10, 71,211,150, 86,107,248,215,157,195, 26, 53,106,120, 22, 55, 25,150,230, 7, 74,233,175,101,158,155,226, 41,
- 25,120, 96,246,157, 59,119, 26,122,121,121,161, 71,143, 30,216,186,105,211,150, 31, 0, 71,200, 38, 23, 72,242,185,123,119, 98,
-241,223,201,174,130,122, 69,125,176,140,208,106,245, 15,252, 56,239,247, 65,175,172, 7,106,158,231,177, 97,241, 7,136, 86,165,
-161,105,117, 57, 14, 31, 61,141, 86,225, 0, 76, 85,111, 1,182,247,109, 82,169,148,144,202,228,142,116, 42, 84, 42, 72,164,178,
- 42, 31,187,115,125, 90,186,190,172, 74, 4,207, 57, 63, 95,120,225, 5, 76,155, 54, 13, 61,122,244,192,245,235,215,177,127,255,
-126, 92,191,126, 29, 19, 38, 76, 64, 76, 76, 12,122,246,236, 89, 41,205,245,235,215, 35, 47, 47, 15, 28,199, 33, 43, 43, 11,122,
-189, 30, 51,102,204,184,239,243,110, 39,126,215,251, 0,128,159,118,158,170,178,230,155,111,190,137,187,119,239,150,136, 92, 61,
- 42, 81, 43,151, 6,235,234,213,171,101,182,247,197,196,196,164,117,239,222, 61, 32, 53, 53, 21, 26,141,198,165,185, 34,132,116,
-179,207,149,113,225,194,133, 50, 53,107,214,172,105,238,222,189,187, 36, 56, 56,184,196,232, 65,181, 90, 93,226, 98, 45, 75,179,
-184,242, 47, 32,132,188,212,174, 93,187,239,126,251,237, 55, 85,157, 58,117,144,159,159, 15, 74, 41, 86,172, 88,129,113,227,198,
- 65,161, 80,224,234,213,171,232,215,175,159, 78,167,211,189,228, 60, 7, 86, 89,154,101, 25, 25,142,227, 28,243,195,148, 97,174,
- 42, 60,118,103,230,207,159,239,152, 11,170, 34,150, 44, 89, 2,148,154, 82,161, 44, 77, 74, 41, 62,249,228,147, 7,166,121,229,
-202,149, 21,206,219, 35, 35, 35,191,124,236,177,199,132,196,196,196, 18,166,202,121, 41,163, 66, 42,161,233,106, 34, 81,158,231,
- 17, 24, 24,136,247,222,123, 15,126,126,126, 8, 10, 10,186, 39,242,226,234, 28, 85,241,233,253, 47,213,164, 28, 61, 57,255,179,
-153,237,151,124,189, 81, 34,151, 1, 71,246,255,132,252,156,187, 37, 35,176,230, 63,135, 68,203,154,117,133,233,212,110,183,210,
-105, 52, 26,241,209, 71, 31, 97,230,204,153,247,204,129, 83,206,121,191,175, 99,119,199,100,149,165, 41,138, 34, 81,169,125,160,
- 80,135,160, 65,140, 15, 68, 55,230,234, 20,255,254,243,174, 75, 76, 76,244, 10, 15, 15,199,181,107,215, 8,254,236,143,245,231,
-185,146,201,134, 0,248,181, 34, 77, 2,156, 91,179,102, 77,195, 70,141, 26,225,203, 47,191, 4,128,103,159,219,177, 99,240,211,
-122,189, 1, 40,154,124,180,216,140,185, 76,167,141, 82,162, 84,121, 67,161, 14, 70,131,134,222, 16, 69,247,231, 60,165, 21, 28,
-187,253,230, 87, 58,122, 85,201,137,164,239,209,180, 63, 32,221, 60,242, 11,250,244, 14,195,161, 99,231,177, 59, 81,133, 48, 89,
- 42, 66,116, 25, 16, 51, 46,227,213,129,205, 48,111,125,209, 77,252,252, 73,215,154,132, 16, 28,122,237, 69,168, 85, 10, 60,185,
-230, 87, 72,165, 82,252,254,234, 51,144, 74,229,232,248, 89, 81,147,236,185, 15,167, 67, 34,151, 35,250,127, 51,221, 74,103,233,
-150, 26,123, 87, 14,231,125, 42,138, 96, 85,116,236, 5, 5, 5,200,205,205,197,119,223,125,135,145, 35, 71, 34, 61, 61, 29, 9,
- 9, 9,184,118,237, 26,126,248,225, 7,199,232,244,202,164,211,110, 94, 38, 77,154, 4, 74, 41, 26, 52,104,128,153, 51,103,162,
- 77,155, 54,149, 62, 71,165,207,123,105, 92, 69,175, 42,210,156, 55,111, 94,149,202,210, 35, 97,176, 42,122, 42,225, 56, 14,254,
-254,254,142,194,225, 92,240,170,242,164,203,243, 60,172, 86,171,163,227,180,125, 1,128,190,125,251, 98,235,214,173,238,140,140,
-248,141, 16, 50,188,126,253,250,223,204,154, 53, 75,211,177, 99, 71, 33, 36, 36, 4, 45, 90,180,192,213,171, 87,241,203, 47,191,
- 88, 22, 46, 92,168,213,233,116,163, 40,165, 59,171, 82, 39,219, 95, 61,227,188, 84, 6,155,205,150, 24, 31, 31, 31,252,201, 39,
-159,240, 28,199, 97,222,188,121,206, 47,185,190,167, 16, 30, 61,122,212,234,170, 73,198,106,181, 38,198,199,199, 7,127,250,233,
-167, 60, 33,196,161,233, 60,249,171,115,222,185,163, 89,150,185,180, 15,120, 40,107, 41, 43,237,101,157,227,138, 38, 18, 21, 4,
- 1, 87,175, 94,197,140, 25, 51, 64, 8,193, 79, 63,253,244,159,184,184, 14, 29, 79, 89,222, 54, 54,196,103,200,192, 78,141, 8,
- 56,152,204,247, 14, 64,227,179,114, 29,230,234,137, 79,215, 98,227,107,131,221, 49, 59, 55,142, 31, 63,238,251,209, 71, 31, 9,
- 60,207,227,243,207, 63, 47, 49,217,111,233,243,126,236,216, 49,107,149,154,247,138,175,103,179,217, 12,189,190,106, 81, 19,202,
-145,195,243, 62,122,167,251,146,111,183, 74, 8, 49,225,200,190,159,144,151, 91,246,208,116,153, 68,192,170, 53, 91,172, 2,207,
- 37,254,205,167,110, 73,183,110,221,102,236,218,181, 75, 8, 15, 15,175,178, 72,123, 96,235,130, 5, 11, 30,123,230,153,103,124,
-235,215,175,143,141, 27, 55, 2,128,172,120, 65,241,204,238,191,185,103,146,196,205,159,127,252,206,179, 75,191,221, 42,227,136,
- 25, 71,246,255,132,188, 82,102,189, 52, 82,169, 4,171,215,108, 54, 11, 2,127,197, 85,189,238, 28,189,186,223, 27,162,115,217,
-107,214,231,121,124,249,203, 82, 4, 52,234,133, 65,125,227,112,240,203,103, 48, 40,218, 0,243,186, 97,104, 56,112, 37, 86,188,
- 94, 20,189,105,186,254, 13,183,238, 63, 30, 30,106, 71, 7,114,142,227, 32, 87,168, 32,145,255,217,127, 72,166, 82, 65,168, 68,
- 36,203,126,236, 21, 69,170, 42, 27,193,226, 56, 14,145,145,145,168, 89,179, 38,218,181,107,135,102,205,154,161,115,231,206, 56,
-123,246, 44,206,158, 61,139, 9, 19, 38,148,107,174,220, 57, 71,221,187,119,199,149, 43, 87,238,187,144,151, 62,239, 15, 2,119,
-202,210,203, 47,191, 12, 0,143,110, 31, 44, 87,153,103, 47,144,244, 1,116, 70, 37,132,192,100, 50, 57,154,222,156,231, 85,178,
-119,122,119,115, 62,168,157,132,144,152,183,223,126,123,162, 66,161,232,172,211,233,234, 2,128, 90,173,190,106, 52, 26,127,215,
-235,245,159, 83, 74,115,239, 39,173,206,211, 50,148,113, 28, 21,102, 70, 70, 70, 70,207, 17, 35, 70,236,228, 56, 46,178,162,151,
-243, 58, 61,249, 39,164,165,165, 61,230, 74,115,248,240,225,101,106,150,165,235,142,102, 89,231, 92, 20,197,114,205,149, 59, 21,
-144,171,137, 68, 37, 18, 9,212,106, 53, 54,109,218, 4,127,127,255,255,212, 5,118,248, 68,202, 71, 21,109,239,228, 47,223, 7,
-160,218, 19,159,174,189,179, 55,211, 84,163,147,191,236,246,198,215, 6, 87,175,232, 59, 57, 57, 57, 61, 38, 77,154,244,171, 32,
- 8,145, 21,157,111, 39, 35, 30,159,145,145, 81,233,105, 15, 40,165,184,114,229,138,248,194, 11, 47,100,102,100,100, 60, 93,149,
-227, 31, 63,241,227,207, 22,124,242,170,223,192,254,237, 91,128, 16,152, 76,229,116,234, 37,160,148, 82, 42,240, 92,226, 43,147,
- 62,125,241,239, 60,103,148,210, 51,132,144,119,107,213,170, 53, 26, 64,121,119,194, 31, 92,233,236, 5,204, 50,163,241,147,216,
-216,216,169,111,188,241,134,119,223,190,125, 17, 30, 30, 94,238,124,129, 21,113,240, 88,210,232, 54,177,193, 97, 79,245,107,223,
-147, 35,132, 26, 77, 70, 23,245,106,113,126, 10,252,149,125, 71, 19, 27,187,138,206,115, 28, 87,233, 46, 10,238,208,117,224, 72,
-116, 29, 56,210, 81,158,118,173,235,132,147, 41, 59,209,156, 75,130,113,105,123, 16, 79,123, 81,231, 93,222, 39, 56,142, 67,191,
- 21,155, 75,164,179,221,135, 37,163,179,117,199,189, 93,169,123,143,243,224,171, 7,213, 7,139,231,121,100,102,102,226,234,213,
-171, 72, 75, 75,131, 78,167,195,165, 75,151, 96, 54,155,145,147,147, 3,251, 72,195,170,164,243, 65,157,163,191, 83,243, 81,106,
- 38,172,148,193,178,217,108, 73,174,222,122,110,181, 90, 43, 53,202, 72, 16, 4, 67,251,246,237, 73, 89,163, 13,236,127, 43,149,
- 74,189,155, 21, 99, 46,128, 25, 0,102, 20,191,111, 10,217,217,217,247,237, 2,109, 54, 91, 74,203,150, 45,249,138, 12,145,205,
-102, 75,115, 97,134,180, 0,218, 60,200,147,247, 87,104,150,113,126,180, 29, 59,118,188,103, 30, 19,231,243,163, 80, 40, 42,236,
-117,235,106, 34, 81,157, 78,151, 58, 98,196, 8,155,115,179,160,243, 68,164,255,105, 8,189,221,123,200,243, 53,246,102,154,106,
- 0,128,221,100,129,210,219,229,125, 37, 37, 37, 69, 15,160,227, 95,157,180, 91,183,110,153, 90,181,106,181,186,160,160,224,101,
- 74,105,149,123,233, 79,152, 60,239,141,127,219,105,161,148,158, 1, 48,230,126,117, 76,192,229, 6, 6,195,203, 51,223,126,251,
-201,119,222,126,187,142, 8,248, 1, 69,115, 84,241,192,218,202,104, 29, 57,145,250,192,231, 6,179,217,108, 73,109,219,182,173,
- 84,164,198, 85, 29,111,181, 90, 43,188, 79,172, 65, 56,112,162,114,154,127, 69, 58,157, 53,155, 52,105,130,166, 77,155, 58, 62,
-237,148, 94,239,142,102,243,230,205,209,160, 65,131,114,103,104, 47,221,231,234,239, 62,118,187,166,221,246, 55,109,186,227,129,
-105,222,111, 58, 31, 41,131,101,127,199,224,131,228,226,197,139,127,201,187, 81, 40,125,112, 99,189, 47, 94,188,216, 2,143, 40,
- 87,174, 92,241,187, 95, 13, 87, 19,137,158, 59,119,174,243,163,154,191,123, 51, 76,207,221,179,174,216,108,253,221,104,181,218,
-234,148,210, 42,245,204, 31, 56,112,160,237, 81, 61,167,160,180,196,196, 83, 23,139, 38, 40,253,238,159,152,212, 11, 23, 46, 60,
-240, 58,253,175,184, 79,252, 21,233,100,199,254,207,215,252,183,195,102,136,100, 48, 24,229, 61,164,216, 88, 46, 48, 24, 12, 70,
-213, 32, 0,186,149, 83,185,186, 61,114,135, 16,210,173, 10,149,247, 46,166,201, 52,153, 38,211,100,154, 76,147,105, 62, 90,154,
-174,180, 31,244,200,225,191,243, 41,245, 47, 91, 0,116, 99,154, 76,147,105, 50, 77,166,201, 52,153, 38,211,124,212, 22,214, 68,
-200, 96, 48, 24, 12, 6,131,241,128, 97, 6,139,193, 96, 48, 24, 12, 6,131, 25, 44, 6,131,193, 96, 48, 24, 12,102,176, 24, 12,
- 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96, 84, 29,242, 0,231,227,100, 48, 24, 12, 6,131,193, 96,128, 69,176,
- 24, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,131, 25, 44, 6,131,193, 96,
- 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193,
-248, 39, 24, 44, 66, 72, 55,166,201, 52,153, 38,211,100,154, 76,147,105, 50, 77,102,176, 24, 12, 6,131,193, 96, 48, 24,204, 96,
- 49, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6,131, 25, 44, 6,131,193,
- 96, 48, 24,140,191, 9, 2,160,204,145, 0,148,210, 93,110,139, 84, 97, 52,129, 43,125,166,201, 52,153, 38,211,100,154, 76,147,
-105,254,247, 52, 93,105, 87,198,127,252,163,161,148,254,101, 11,128,110, 76,147,105, 50, 77,166,201, 52,153, 38,211,100,154,143,
-218,194,154, 8, 25,174,158, 48, 4, 66,136, 80,213,237, 15, 75,147,193, 96, 48, 24,140,127, 18,236, 38,198,168,200, 8,181, 1,
-208,167,248,239,159, 41,165, 71, 42,179,253, 97,105, 62, 44,154, 55,111,174, 84, 40, 20, 61,246,236,217, 35,187,116,233, 18,254,
-248,227, 15,186,122,245,106,179,193, 96,216,113,242,228, 73, 61, 43, 49,255,126,154, 53,107,214, 19,192,244,226,127, 63, 56,117,
-234,212,246,251,188,134, 72,173, 90,181, 38,200,100,178,222, 82,169, 52,196,106,181, 18,163,209,152,162,215,235,119, 38, 39, 39,
-127, 74, 41, 21,171,160,217,194,223,223,127, 76, 76, 76, 76,157, 91,183,110, 37,222,185,115,103, 21,128,237, 0,122, 86,175, 94,
-125, 68, 84, 84, 84,248,133, 11, 23,174,101,102,102, 46,166,148,254,241,119,165,147,193, 96, 6,203,189,139,143,243,241,241,233,
-174, 84, 42,255, 87, 88, 88,216,212,211,211,243,162,213,106, 93,144,154,154,250, 51,187,240,254,179,230, 74, 0,208,135, 82, 42,
- 1, 0,158,231,251,183,105,211,166, 6, 33, 68, 36,132, 80, 74, 41,225, 56,174,169,205,102,227,138,247,239, 67, 8,249,131, 82,
-106,173,140,102,171, 86,173,194, 5, 65,160,148, 82, 66, 41,229, 56,142,107, 92, 25,205, 7, 69, 76, 76,204, 92, 74,105, 72, 69,
-251,168,213,234,216, 61,123,246,212,219,188,121,179,109,213,170, 85,185, 67,134, 12,209,140, 28, 57, 82,248,246,219,111,191, 2,
-240,191,210,251, 55,104,208,224, 51,142,227,252,221,249,125, 81, 20, 51, 47, 94,188, 56,137,149,188,191,157,233, 47,124,184,175,
- 3,165,192,215,211, 59,114,197,198,165,202, 52,109,218,244,187, 1, 3, 6, 12,169, 91,183,174, 32,138, 34, 44, 22, 11, 76, 38,
- 83,189, 83,167, 78,117,218,177, 99, 71, 44,128,167, 43,121, 93,246,153, 62,125,250,178,119,223,125,183,154, 68, 34, 33, 22,139,
-165,245,143, 63,254,216,107,204,152, 49,103, 22, 47, 94,220,100,208,160, 65, 30,246,245,239,188,243,206, 99,132,144,137,148,210,
- 31, 30,118, 58, 25, 12,134, 11,131,229,225,225, 81,187, 90,181,106,175,249,249,249, 61, 22, 27, 27,155,247,210, 75, 47,221,188,
-113,227,198,249,200,200, 72,221,183,223,126, 59,199, 98,177, 44,172, 91,183,238,142,252,252,252, 79,239,222,189,123,169,146, 21,
- 69,109, 0, 47, 1,120, 12, 64, 24,128, 20, 0,191, 2, 88, 70, 41,189, 82,149,131, 9, 13, 13,109,164, 86,171,167, 18, 66, 90,
-107,181,218, 48,181, 90,157, 66, 41, 61, 86, 80, 80,240,113,106,106,234,169,170,104,134,133,133,213, 4, 48, 94, 16,132, 56,155,
-205, 22,201,243,252,109,155,205,118,192,102,179,125,153,146,146,114,173, 42,154,237,194, 61,250,138, 26,207, 79, 45,188, 50,188,
-208, 96,149,106,228,130, 69, 34, 26, 18, 69,109,238,244, 99,119, 10,127,250, 39, 22, 20,153, 76,198,173, 90,181,170,137, 76, 38,
- 3, 0,152, 76, 38,196,196,196,144,251,209,148, 72, 36,220,167,159,126,218, 76, 16, 4,152,205,102,177,160,160,128, 62,249,228,
-147,127, 75,179, 53, 33, 36,236,228,201,147, 94, 82,169,180,204,237, 54,155, 13,253,250,245,139,148, 74,165, 88,180,104,145, 37,
- 43, 43,171,233,242,229,203, 79, 45, 92,184,208,127,197,138, 21, 3,203, 50, 88, 28,199,249,151,167,105,179,217, 96, 54,155, 97,
-181, 90, 97, 50,153,208,185,115,103, 86, 27,253, 51,168, 1, 0,219,206, 26, 0,192,247,126,197,148, 74,101,244, 19, 79, 60, 33,
-100,100,100, 64, 34,145,192,108, 54,227,238,221,187,168, 85,171, 22,191,121,243,230,186,149,213,171, 87,175,222,152,247,223,127,
- 63, 96,219,182,109,230,213,171, 87, 27,187,117,235, 38, 29, 53,106,148,103,135, 14, 29,226,194,194,194,184,111,190,249,198,184,
-107,215, 46,243,240,225,195,229,115,231,206, 13,248,245,215, 95,135, 0,248,225, 97,167,147,193, 96, 84, 96,176, 60, 60, 60,246,
-105, 52,154, 90, 47,190,248,226,149,151, 95,126,121,135, 70,163,177, 1,192,247,223,127, 47,244,239,223, 63,227,201, 39,159, 76,
-215,233,116,252,194,133, 11,171,127,241,197, 23, 59, 61, 60, 60,146, 11, 10, 10, 90,186,113, 35, 35, 0,254,199,113,220,248, 30,
- 61,122,236,179, 88, 44, 25, 91,182,108, 89,247,196, 19, 79,196, 81, 74,213,123,246,236,249,133, 16,178, 4,192, 39,238, 70,199,
- 8, 33,124, 84, 84,212,204,176,176,176,201,139, 22, 45,146, 71, 69, 69, 65,169, 84,162,160,160,160,250,181,107,215,194,255,247,
-191,255,245,171, 89,179,230, 2, 47, 47,175,183, 78,158, 60,105,113, 83,147,132,132,132,188,234,233,233,249,222,220,185,115, 21,
-245,235,215, 39,106,181, 26,241,241,241, 13,143, 30, 61, 26,179,124,249,242, 81, 97, 97, 97,179,146,147,147,221, 78,103, 39, 66,
- 4, 67,205,106, 59,124,234,181,236,180,120,217,215,196, 95,173,130, 64, 8, 44,102,179, 36, 77,167,143, 26, 55,118,244,186, 54,
-117,130, 14, 21, 72,210,186, 94,188, 72,205,127,147,209,144, 3, 0,165,212, 72, 8,249,153,231,249,254, 50,153,140,235,223,191,
- 63,118,237,218, 69, 12, 6,131, 0, 0, 10,133,194,218,191,127,127, 40,149, 74,152, 76, 38, 17,192,207,229, 69,154,202,210,148,
- 72, 36, 92,231,206,157,117,199,143, 31,207,182,107,170, 84, 42, 75,231,206,157,253,100, 50,153,210,106,181,210,138, 52,255, 34,
- 19,137, 27, 55,110,148, 88, 87, 80, 80,128,140,140, 12,100,101,101,193,100, 50, 33, 55, 55, 23,162, 40, 18,163,209,152, 33,138,
- 34, 56,174, 40,216, 86,158,166, 84, 42,197,213,171, 87, 75,172,179, 90,173,208,106,181, 48, 26,141, 48,155,205,208,235,245, 74,
-133, 66, 81, 59, 46, 46, 46, 9,192,230,194,194,194, 79,207,156, 57,115,155, 85, 79,127, 11,119,126, 62,109,168, 14,192, 4, 32,
-254, 1, 92, 79, 34, 0, 28, 56,112, 0,105,105,105,200,204,204, 68, 70, 70, 6,194,194,194, 80,149,232,255,149, 43, 87,230, 55,
-109,218,148,156, 57,115,102, 43,128,101,107,215,174,125, 34, 59, 59,123,209,148, 41, 83,124, 63,254,248,227,236,169, 83,167,142,
- 5,176,113,237,218,181, 35, 27, 53,106,212,247,220,185,115,243,254,142,116, 50, 24,140, 10,230,193,162,148,134,212,174, 93, 59,
-251,243,207, 63,175, 55,125,250,116,191,194,194, 66,190, 56, 74,100, 32,132, 80,157, 78,199, 79,155, 54,173,218, 7, 31,124, 80,
- 79, 46,151,231, 88,173,214,106,101,104,148, 53,212,114,188,167,167,103,191,248,248,248,181,245,234,213,243,125,255,253,247, 79,
- 43,149, 74, 58,127,254,252,147, 53,107,214, 12,190,125,251,246, 74, 79, 79,207, 46, 0, 38,151,147,174,123, 52, 35, 35, 35,223,
- 27, 56,112,224,228, 67,135, 14,201, 27, 55,110, 12,141, 70, 3,158,231,225,237,237,141, 86,173, 90,145,253,251,247,203,123,247,
-238, 61, 33, 47, 47,239, 99,119, 53, 67, 66, 66,222,232,213,171,215,156,147, 39, 79, 42,187,118,237, 74,100, 50, 25,114,114,114,
- 32,151,203,209,186,117,107,178,120,225, 87,202,134, 13,234,191, 19, 22, 22,246,174,187,154,230,218,254, 59,135,188, 50,173,243,
-207,191,110, 39,129,129,129,184,249,201,187, 56,208, 33, 6,215,103, 79, 71,112,112, 48,182,110,251,141,244,125,246,149,246,158,
-150,192, 61,238,106,222, 47,206,154,132,144,151, 1,100, 3,200, 38,132,188, 76, 41, 61, 18, 19, 19,115,242,210,165, 75,136,139,
-139,195,186,117,235, 26, 79,153, 50,229,229, 41, 83,166,188,188,110,221,186,198,113,113,113,184,116,233, 18, 98, 98, 98, 78, 58,
-247,149,114, 71,115,223,190,125,232,210,165, 75,206,186,117,235,162,102,204,152, 49,119,198,140, 25,115,215,174, 93, 91,179, 75,
-151, 46, 57,243,230,205, 51, 86,164,249, 87, 28,187,115,100,201,121, 17,197, 63,239, 45, 1, 1, 1,233, 63,255,252, 51,250,246,
-237,203, 5, 6, 6,166,246,239,223, 95,126,252,248,113, 10,224,231,202,164,211, 96, 48, 64,175,215, 67,171,213,226,206,157, 59,
-202,133, 11, 23,182,159, 60,121,114,173,117,235,214,133, 78,152, 48, 97,172,167,167,231,169, 38, 77,154,212,120,216,199,206, 52,
- 1,142,227,238, 2, 48, 3,208,114, 28,119,251,126, 52,159,122,234,169,134, 17, 17, 17,129, 63, 94,240, 65,142,180, 30, 68,169,
- 55, 68,169, 55,108,126, 45,112, 67,246, 24, 66, 67, 67, 3,107,212,168,209,166, 50,154,148,210,157,167, 79,159,126,140, 82,186,
-152, 82,106,163,148,174,159, 58,117,234, 11,132,144,159,166, 78,157, 58,154, 82,186,190,120,253,242,179,103,207,246,165,148,254,
-254,119,164,147,149, 37,166,201,168,192, 96, 17, 66, 44, 31,125,244,209,209,175,191,254,122, 87,106,106,106,112, 84, 84,212,227,
- 79, 60,241, 68,141,188,188, 60,242,196, 19, 79, 68, 6, 7, 7,247,217,183,111, 95,208,192,129, 3,247, 12, 28, 56,240, 8, 33,
-196,101,164,129, 16, 82,147,231,249,137,103,206,156, 57, 88,189,122,117,115, 74, 74,138, 71,211,166, 77, 11, 0,160, 78,157, 58,
-186,172,172, 44,165,151,151, 23,126,251,237,183,227,132,144,151, 8, 33,245, 92,105, 6, 7, 7, 55,243,243,243,251,223,123,239,
-189, 39,231,121,190,204,125,228,114, 57,222,123,239, 61,185,167,167,231,139,161,161,161,173, 93,105, 6, 5, 5,213,247,240,240,
-120,243,139, 47,190, 80, 24,141, 70,152, 76, 38, 4, 6, 6, 66,163,209, 32, 53, 37, 5, 41, 9,241, 72,139,191,133, 9, 47, 60,
-175, 84, 43,149, 19, 67, 66, 66,154,184,210,140,139,240,232,175, 14,107,208,105,220,248,255,225,194,132,145,216, 21, 42, 67,208,
-248,105,104,188,247, 60,194,102,125,138,223,163, 60,113,242,233,238,120,245,213, 73,144, 6, 68,181,109, 27,174, 25,252, 55, 68,
-174, 62,166,148, 42, 41,165, 74, 66,200,252,182,109,219,174, 86, 42,149, 47,191,255,254,251, 61,119,236,216,209,107,255,254,253,
-157,172, 86,171,196,106,181, 74, 14, 28, 56, 16,103, 48, 24, 4,185, 92, 14, 65, 16,168,187,154,109,218,180,249, 78,169, 84,142,
- 93,180,104, 81,207,223,127,255,125,196,137, 19, 39, 94,177,217,108, 50,155,205, 38, 59,113,226,196,104,189, 94, 47,161,148,218,
-202,211,124,216, 72, 36, 18, 72,165, 82, 40,149, 74, 52,109,218,244,230,154, 53,107, 44,193,193,193,146,101,203,150,249, 4, 6,
- 6,170, 87,172, 88,145,155,155,155,251,161,187,122,102,179, 25, 70,163, 17,122,189, 30, 6,131, 1,135, 15, 31,142, 28, 53,106,
-148, 96, 50,153,108, 35, 70,140,200,182, 88, 44,198,113,227,198,121,106, 52,154,215, 88,245,244,240, 41,142,152, 22, 2,208, 82,
- 74,141,246,245, 17, 17, 17,242,208,208,208, 70, 17, 17, 17,114,119,181, 10, 11, 11,151,124,246,217,103, 97,156,220, 27, 7, 77,
-189,241,131, 56, 11, 59,188,190, 68,122,141,201, 8, 8,171,133, 94,189,122, 5, 16, 66,190,124, 0,105,222, 76, 41, 29, 72, 41,
-221, 80,149,239,255,213,233,108,209,162, 69, 92,108,108,236,137,230,205,155,167,198,198,198,158,104,209,162, 69,220,253, 30,243,
-211, 49,164,219,136, 38,124,210,192, 6,132,142,104,194, 39, 61, 29, 83,249,185,154, 24,140,191, 26,151,157,220,171, 85,171,102,
-122,227,141, 55,206, 24, 12,134,243,223,125,247, 93,173,225,195,135, 55,173, 81,163,198,213, 39,159,124,242, 23,141, 70, 99,181,
-247,201,113,147,231,123,247,238,189,205,223,223, 31,121,121,121,130,197, 98,225,181, 90, 45, 15, 0,162, 40,194, 96, 48,240,183,
-110,221, 18,140, 70, 35,109,221,186,245,150, 35, 71,142,188, 4, 96, 98, 69,130,106,181,250,229,165, 75,151, 42,202, 51, 87, 54,
-155, 13, 5, 5, 5,176, 90,173,152, 53,107,150, 98,242,228,201,255, 3,112,212,197, 77,117,252,252,249,243,229, 86,171, 21, 28,
-199,129, 82,138, 83,167, 78, 33, 43, 61, 29,134,130,124, 24,243,243, 96,206,207, 3,175, 45,192,136,199,122, 42, 22,111,216, 52,
- 9,192,136,138, 52, 77,114,205, 7,223, 45, 93, 14,155,205,134,212,205, 63,150,185, 79,246,161,189,176, 89, 45,120,255,195,143,
-201,171,207, 15,122, 31,192,218,191,171, 96,200,229,114, 97,213,170, 85, 67,101, 50, 25, 40,165,196,100, 50, 97,199,142, 29,247,
-173,185,114,229,202, 17,118, 77,179,217, 76, 27, 54,108,120, 79,243,154,209,104,164,255,148, 11, 68, 38,147, 65,161, 80,192,108,
- 54,163,122,245,234,250,126,253,250, 29,158, 63,127,126,117,158,231,213,130, 32,252,150,151,151, 55,247,194,133, 11,183,220,213,
- 43,238, 60, 12,147,201, 4,189, 94,143, 59,119,238, 4,133,134,134,146, 55,223,124,211,166,211,233,162,150, 47, 95,126,227,199,
- 31,127, 84,125,241,197, 23, 79, 2, 24,207,170,168,135, 71,173, 90,181,100,158,158,158, 94,213,253, 4,173,132, 71, 97, 58,165,
- 30, 17, 17, 17, 53, 44, 22,203,147,132,144,214,117,234,212,241,185,126,253,122, 78,104,104,232, 81,142,227,126, 72, 76, 76, 76,
-117, 97,124,136,213,106,197,232,150,185,120,185, 13, 15,139, 37, 15,121,121,121,184,125,251, 54, 46, 94,188,136, 99,199, 46, 84,
- 41,157,145,145,145,207, 43, 20,138, 30, 50,153, 44,194,102,179,113, 58,157,238,182,209,104,220,149,146,146,178,132, 22, 79, 80,
- 84, 73,131,246,151,164,211, 73,255,211, 39,158,120, 34,196,203,203, 11,167, 79,159, 14, 57,123,246,236,167, 0, 98,239,235,186,
- 20,184,111,102,127,242,101,104,176,191, 55, 46, 28,218, 26, 58,111,217,143,223,160,168, 47, 47,131,241,239, 49, 88,118, 20, 10,
-133,109,204,152, 49, 87,183,108,217, 18, 17, 27, 27,123,185,188,206,192, 46,104, 23, 29, 29,125,251,240,225,195,240,245,245, 53,
- 91, 44, 22,222, 96, 48,112, 82,169,148,102,103,103, 19,189, 94,207,157, 61,123, 86,145,148,148, 36,245,241,241,145, 0,104,230,
- 70,132,161, 77,100,100,100,217,166,198,100, 66, 97, 97, 33, 10, 10, 10, 96, 52, 26, 17, 24, 24, 72, 56,142,107,229, 50,172,199,
-113,237,235,214,173, 75,114,114,114, 16, 18, 18,130, 67,135, 14,161, 48, 55, 23,134,130,124,152,242,243, 96,206,203,133, 37, 47,
- 23,185,233, 41,136, 8, 14, 35,197, 83, 11, 84,136,149, 87,214, 8,208,168,113,125,246, 52,180, 56,117, 27, 68, 34,197,241,134,
-193,160,150,162,174, 86, 45,207,165,128, 72,101,184, 60,225, 57, 4, 14,127, 17, 22, 78, 30,250,144,159,220,141,132,144, 41, 28,
-199,205,151,203,229,194,216,177, 99,145,154,154, 90,194,252,140, 29, 59,214,209,231,170, 67,135, 14, 7, 20, 10,133, 53, 35, 35,
- 3, 70,163, 81,226,142,102, 68, 68,196,237,183,222,122,235,184,201,100, 10, 11, 9, 9,241, 54, 26,141,250,186,117,235,134, 40,
-149,202, 64,147,201,100,139,141,141, 93,162, 84, 42, 45,133,133,133,212,106,181,146,127,194, 5, 66, 8, 1, 33, 4, 86,171, 21,
- 86,171, 21,222,222,222,218,172,172,172, 99, 55,111,222, 28, 90, 21, 61,139,197, 2,139,197,226,136, 98,137,162,136,115,231,206,
- 65,161, 80, 72, 68, 81,188, 96,179,217, 84, 18,137, 4, 60,207,179, 57,234, 30, 34,205,155, 55,239,212, 56,208,243,179,177, 33,
- 70,239,154,125,213, 90,149,140,215,126,156,165,140,248,229, 59,237,218, 62,189, 7,123, 76,158, 60,185,134,175,175,175,226,214,
-173, 91,134,121,243,230, 69,110,220,184,145, 0,248,164, 34,205,148,148,148,159, 62,248,224, 3,223, 78,157, 58, 69, 73, 36, 18,
-146,155,155,139,140,140, 12,164,167,167,227,206,157, 59, 52, 33, 33,225,166,213,106, 93, 87,153,116, 54,110,220,120,249,240,225,
-195,159,105,208,160,129,132, 82, 10,179,217, 12,157, 78,215,244,216,177, 99,253, 14, 30, 60, 24, 7,160,210,229, 50, 53, 53,117,
-221,135, 31,126,168,238,216,177, 99, 61,137, 68,194, 61,136,116,150,170, 7, 66, 52, 26, 13,118,237,218, 5,111,111,111,184, 26,
-173,235, 14, 70,139, 24, 26, 20,224, 7,195,161,207, 80,219,183, 6,140, 22, 49,148,149, 98,198,191,214, 96,101,100,100,200,180,
- 90,173, 32,138, 34,159,151,151,167, 82,169, 84, 86,153, 76,102,170,228,239, 53,232,215,175,223,241, 86,173, 90, 21, 22, 71, 52,
- 44, 1, 1, 1,230,188,188, 60,136,162, 8, 81, 20,173,158,158,158,133, 22,139, 5, 81, 81, 81, 28, 0,151, 77,132,122,189,190,
-186, 82,169,188,103,189, 78,167,115,152,171,194,194, 66,232,116, 58,120,121,121, 65,171,213,186,188,184,109, 54, 91,132, 74,165,
- 66, 74, 74, 10, 0,160, 32, 39, 27,198,252,124,152, 10,254, 52, 87,182,220, 28,136,122, 45,188,195,194, 97,181, 90,195, 93,105,
-106,141, 54, 25, 15,138,244,173, 63, 33,240,229, 41,229,238,151,115,112, 47, 60,106, 71, 67,175, 55, 63,244, 57,202, 40,165, 11,
-155, 54,109,218,108,227,198,141,163,146,147,147,239,217, 62, 96,192, 0,140, 31, 63, 30,227,198,141,187,252,248,227,143,159,221,
-186,117, 43, 94,121,229, 21,136,162,216,132, 16,146, 71, 41,253,181, 34,205,233,211,167,159, 72, 76, 76,220,123,237,218,181,177,
- 1, 1, 1,242, 70,141, 26, 93,111,212,168, 17,191,113,227,198,192, 23, 95,124,241,100,175, 94,189, 18,118,239,222,237,187,107,
-215, 46,133, 40,138,205, 9, 33,201,127,247, 60, 88,246, 38, 98,147,201, 4,131,193, 0,179,217, 12,155,205, 70, 42,145,167, 37,
-254, 23, 69,209, 97,214,140, 70, 35, 44, 22, 11,217,185,115, 7,182,110,221,202, 93,186,116, 49,108,250,244,215,145,151,151, 7,
-155,205,198,106,167,135, 64,108,108,236, 99, 2, 21,151, 14, 15,178, 42,134, 6, 90,181, 82, 66, 11,175, 45,125,171, 48,190,134,
- 70,235,233,207,155, 60,253, 36, 33,211,166, 79, 11,190,121,227,166,241,163,143, 62,186,212,167, 79,159,128, 23, 95,124,177,254,
-182,109,219,226,170, 87,175,254,245,157, 59,119,114,203, 49,230,210, 81,163, 70, 29,243,246,246,174,185,122,245,234,244,228,228,
-100, 31,139,197,162,178, 88, 44,102,131,193,112,195,108, 54, 31, 52,153, 76,187, 82, 83, 83, 79, 86, 38,189, 26,141,166,241,160,
- 65,131, 36,185,185,185, 40, 30,125,139,244,244,116, 52,107,214,140,223,189,123,119,131,170,228,193,197,139, 23, 63, 11, 9, 9,
-217,187,101,203,150, 30,106,181,186,185, 76, 38, 11, 18, 69,209,166,215,235,211, 12, 6,195,153,170,164,179, 84, 94,164,156, 58,
-117, 42,196,211,211, 19,137,137,137, 32,132,164,220,239,121, 83, 72,185,196, 75, 7,183,132,215,246,141,196,177,163, 71,161,144,
-114,137,172, 52, 51,254, 85, 6,171,160,160, 64, 56,117,234,148, 79, 98, 98,162,198,223,223,223, 80,191,126,253, 60, 66,136,200,
-113, 28, 77, 77, 77,245,141,143,143, 87,248,249,249,105,107,214,172,153,237,230,239, 93,155, 48, 97, 66,220,140, 25, 51, 78,118,
-239,222, 61, 19, 0,114,114,114,144,149,149,133,140,140, 12,152,205,102,164,164,164,112, 39, 78,156,240,253,237,183,223,154, 2,
-112,217,244,162, 84, 42,239, 20, 20, 20,212,245,246,246,118,220,208,236,166,202,217, 96,217,163, 89,106,181,218,229,197,205,113,
- 92,114,114,114,114, 45,131, 94,143, 59,215,175,195, 88, 80,212, 36,232, 48, 87,121,217, 64, 97, 1,212, 10, 5, 10,178,179,192,
-243,252, 93, 87,154,106, 57,111,178, 88,109,178,106,189,250, 1,164,252,251,179, 87,203,118, 16,235, 53,130, 82,185,222,242,119,
- 20, 8,142,227,108, 21, 53,251,202,100, 50, 4, 6, 6,138,173, 91,183,198, 43,175,188, 98, 55, 2,132, 16,210,137, 16,114,144,
- 82, 90, 88,158,166, 40,138,220,165, 75,151,158,184,113,227, 6, 47,145, 72,184, 86,173, 90,197,180,111,223,222, 36,147,201, 32,
-149, 74,133,194,194, 66,143, 93,187,118, 41, 44, 22, 11, 41,214,124,104,243, 96, 1, 69,163,251,202, 48,240,208,106,181,208,235,
-245, 40, 44, 44, 68,110,110,174,160, 84, 42,235,118,232,208,225,168,209,104, 92,103,179,217,190, 57,121,242,100,126,121,154,102,
-179,185,132,217, 18, 69, 17,148, 82,216,108, 54, 88, 44, 22, 72, 36, 18,113,203,150,173,248, 98,225,124,172, 95,187,129,118,235,
-214,141,252,246,219,111, 16, 69, 49,137, 85, 79,127, 61,162, 40,126,250,251,180,167, 20,176,218,180,198,125,107, 10,183,103, 11,
-218,175, 47,252,126, 66, 47,112,249,213,235,163, 81, 68,120, 77,222,203,211,139, 91,177,114,105,214,111,219,246,220, 72, 74, 74,
-202,159, 61,123,118,155,168,168, 40,175,171, 87,175,134, 2,200, 45,199, 8, 69,140, 28, 57,114,100, 78, 78,142,116,217,178,101,
- 43,146,147,147,247, 81, 74,111,150, 50, 30,205, 8, 33, 31, 3,144, 0, 8, 4, 96, 5,176,147, 82,186,178, 2,179, 34, 18, 66,
-240,251,239,191,223, 51,218, 79,116, 30,145, 81,249, 40, 86, 78,171, 86,173, 26, 95,187,118,109,115, 78, 78,206,234,210,219, 85,
- 42, 85,191,152,152,152, 33,199,143, 31,127,155, 82,122,163,146, 15,110, 19, 47, 93,186,244,145, 40,138, 53, 56,142,187, 77, 41,
-157,250, 0, 34, 88, 47,204, 91,182,118,153,193,108,171,174,144,242,119,140, 22,241, 69, 86,154, 25,255, 26,131,101,181, 90, 53,
-111,189,245, 86,155, 38, 77,154,164,118,232,208,225,110,100,100,164,206,190,205,195,195, 67,239,231,231,167, 55, 24, 12,202,219,
-183,111, 7,111,218,180,169,142,205,102, 83,185,241,123,123,188,189,189,125, 79,156, 56,225,247,195, 15, 63,212, 62,117,234, 84,
-141, 97,195,134,117, 52,153, 76, 48, 26,141,184,117,235, 86,141,165, 75,151,138, 82,169, 52,151, 16,242, 7, 0,151,143,241, 22,
-139,229,200,181,107,215,234,180,106,213,138, 88, 44, 22,135,161,114, 54, 89,133,133,133,144, 74,165, 72, 73, 73,161,162, 40, 30,
-115, 35,157, 71, 79, 28, 63, 94,171, 97,253,104, 24,243,114,138,205, 85, 30,172,121, 57, 16,243,178,193,105, 11,225,231, 43, 64,
-165,208,224,106, 74, 42,138,211, 90, 33, 18,171, 62, 33, 57, 47,191,110,173,153,159,224,247, 40, 79, 80,139,217,209, 44, 8,192,
-209, 92,216,246,114, 6, 14, 28, 62, 2,193,102, 76,254,167, 22,154,179,103,207,166, 15, 27, 54,236,164, 40,138,205, 80,193, 20,
- 5, 21, 60,133, 23, 20, 22, 22, 34, 51, 51,211,150,149,149,101, 0,128,244,244,244,156, 45, 91,182, 92, 18, 69,177,101, 85, 52,
- 31, 4, 22,139,229,158,232,147,205,102,131,213,106,133,217,108, 70, 70, 70,134,236,224,193,131, 29,142, 30, 61, 42,189,120,241,
- 34,142, 30, 61,218,100,211,166, 77,175, 71, 71, 71, 55,186,124,249,242, 93, 87,166,141,148,109,172,121, 0,216,178,241,103, 12,
- 25, 50,132,100,102,102, 98,211,166, 77, 15,164, 25,133,225, 22, 90, 88,109, 74,211,190, 53,133,175, 93,151, 23, 92,208,241,179,
- 79,158, 60,185,157, 82, 74,123,247,238,125,182,110,189, 40,127, 0,144,203, 52, 65, 13, 27, 54,236,232,227,227, 35, 3,128,144,
-144,144,230, 22,139,101, 33,128,246,101,137, 14, 24, 48,160,109, 64, 64, 64,211, 95,127,253,245, 76,114,114,242,254,210,230, 10,
- 0,234,214,173, 59,235,252,249,243,143, 73, 36, 18,226, 84, 70, 40,128, 50, 13,214, 83, 79, 61, 85, 55, 44, 44,204,111,219, 53,
- 47,228, 75,107,129,242,121,128,160,128,205,187, 49,110, 75,235, 35, 40,232,138, 95,173, 90,181,154,220,184,113,227, 76, 37, 35,
- 76,213, 7, 13, 26,244,203,242,229,203,163,123,245,234, 37, 3,112,143,193,138,142,142,126,114,247,238,221, 3,199,142, 29,219,
-152, 16,210,151, 82,122,221, 93,253,147, 39, 79, 30, 2,208,230, 65,158,180,117, 23,232, 46, 20,207, 89,198, 96,252,235, 12,150,
-217,108,222,121,253,250,245, 22, 79, 61,245, 84,166,179,185,162,148, 58, 42, 3, 47, 47, 47,189,191,191,127,246,153, 51,103,170,
-137,162,184,207,141,223, 91,182,123,247,238,223, 23, 44, 88,176,198,215,215,215, 50, 98,196, 8,110,218,180,105, 7,178,178,178,
-104, 86, 86, 22,190,252,242,203, 14,113,113,113, 7,110,223,190,109, 59,121,242,228, 72, 0,189, 92,214,142, 90,237,194, 87, 94,
-121,101,200,129, 3, 7, 20,246,121,138, 74, 71,175, 44, 22, 11, 4, 65,192,194,133, 11,141, 90,173,118,190, 27,145,140, 37, 95,
-125,245,213,192,165, 95, 44, 80,240,102, 51, 44,185,217,176,230,229,194,150,155, 13, 78,167,133,135,130,160,118,179,106,200, 73,
-150, 99,213,246, 67,122,171,213,250,149, 75,131,101, 40,156, 50,118,244, 75, 63,239,220,243, 59,124,219,119, 65,214,239,191,221,
- 27, 29,170, 22, 8,147,217,140,247,222,157, 73,137, 62,119,218,223,244, 68,207,155, 76,229,183,252,154, 76, 38,136,162,152,116,
-241,226,197,181,132,144, 2, 66, 72,167,226, 77,123,203,138, 94, 57,107,114, 28, 39,214,175, 95,127, 99, 96, 96,224, 19, 0,180,
-245,235,215,223, 40,151,203,187,152, 76,166, 86,162, 40, 38,157, 62,125,122, 3, 33,228, 46, 33,164, 79,241, 87, 31,234, 60, 88,
- 22,139, 5, 51,102,204,192, 7, 31,124,128,233,211,167, 59,142,215,222, 76,104, 54,155, 35,119,236,216, 33, 61,116,232, 16,253,
-238,187,239,178,158,126,250,105,239, 97,195,134,121,175, 90,181,106, 34,128,169,229,105, 78,157, 58, 21,139, 23, 47,198,152, 49,
- 99,238,117, 87, 60, 47, 38, 39, 39,193,100, 54,209,149, 43, 87,166, 8,130,224,243,249,231,159, 43, 39, 79,158, 76, 88,245,244,
-215, 99,179,217,222,108,247,233,166, 87, 9, 81,154,173, 86,235,252,179,103, 79,239,117,122, 16, 80,126,250,201,167, 2, 0,124,
-242,241,167, 18, 74,169,151,125, 98,216,217,179,103, 43, 70,143, 30, 29, 80,158,238,250,245,235,115,103,207,158,237,247,194, 11,
- 47,244,218,187,119,175,138, 16,178, 13,192, 31, 0, 50,139, 31, 28,253, 1, 28,170, 86,173, 90,240,218,181,107,107,245,232,209,
- 67,237, 70, 93,247,245,162, 69,139, 34, 62,221,239,129,109,218, 39,144, 40, 62, 13,234, 77,225, 27, 80,128,250,154, 59,232, 28,
-154, 28,178,122,245,234,101, 0,154, 87,194, 92, 53,120,234,169,167, 54, 45, 95,190, 60,242,165,151, 94, 74, 58,116,232, 80, 34,
- 33,100, 86, 25,187,102, 61,247,220,115,183, 87,172, 88, 81, 75, 20,197,237,132,144, 94,148,210,107,172, 4, 49, 24, 85,139, 96,
- 61, 79, 8,137,153, 62,125,250, 71, 33, 33, 33,213,103,206,156, 25, 95,191,126,125,173,227,106,203,202,210,236,219,183, 47, 42,
- 63, 63,191,192,106,181,142,160,148,158, 45,227,226,237,230, 60, 87, 6,165,244, 54, 33,228,163, 38, 77,154, 12,249,241,199, 31,
-247,121,120,120,228, 31, 61,122,212,211,211,211, 51,239,210,165, 75,106,158,231,117,241,241,241,216,177, 99, 71, 7, 0, 95,148,
-245,148, 84, 90, 51, 53, 53,245, 84, 84, 84,212,252,201,147, 39,255,239,237,183,223, 86, 80, 74,161,211,233,144,159,159, 15,163,
-209, 8, 65, 16, 64, 8,193,154, 53,107,140, 70,163,113,105,114,114,242, 81, 87,154, 41, 41, 41, 71,194,195,195,191,153, 63,111,
-222, 11, 47, 14, 25, 44, 67, 94, 22,114, 83,147, 65,116,133,208, 40,229,136,233, 26, 6,109, 22,193,242,125,127,152,178,141,230,
-181,201,201,201,123, 93,105, 30,188, 83,240, 75,155, 58, 1,187,103,207,158,217,245,245,111, 55, 64, 20, 69, 92,126,229, 25,228,
-236,223, 9, 85,253, 70,104,123, 57, 3, 38,147, 9,211,167, 78, 6,175, 75, 59,112,244, 78,225,122, 87,154, 15, 2,103, 77, 66,
-200,203,132,144,103,162,163,163, 49,118,236, 88, 12, 24, 48,160,196,190,155, 54,109,194,162, 69,139, 96, 52, 26,159, 33,132,156,
-162,148, 46, 36,132, 28, 44, 62,183,133,174, 52, 35, 34, 34, 90,196,196,196, 32, 36, 36, 68, 87,108, 46,186, 95,188,120,177,121,
-116,116,116,105,205, 63,138, 53,173, 15,235,216, 41,165, 57,215,175, 95,247,252,248,227,143,137,217,108,198,172, 89,179, 96, 55,
-154,246,150,151, 55,222,120, 35, 68,163,209,224,147, 79, 62, 49,101,102,102,118, 89,180,104,209,158, 5, 11, 22,248,175, 89,179,
-102,168,221, 96,149,210, 76,191,116,233,146,199,226,197,139, 57,171,213,138,207, 62,251,236,158,102,200,137, 19, 39,194,108,182,
- 64,224, 5,147, 65,111,104,160, 80, 40,110,248,248,248, 40, 69, 81,164, 15,235,216, 31,101,205,179,103,207,238, 4,176,211,157,
-239, 25, 12, 6,100,100,100, 32, 51, 51, 19,197, 93, 18, 72,121,233, 52, 24, 12,167,167, 78,157,122,114,201,146, 37,189, 14, 29,
- 58, 52,112,255,254,253,189,118,237,218,101,184,125,251,182,213, 98,177,208,224,224, 96,161,125,251,246,138,222,189,123,171,229,
-114, 57,247,230,155,111,102,206,153, 51,199, 31, 64, 86, 5,245, 39, 79, 41,197,107, 29, 10, 48,181, 51, 15,147,201,140,220,220,
- 92, 36, 39, 39,225,226,197,139, 56,114,228, 50, 40,165, 92, 37,243,115,254,234,213,171,163,100, 50, 25, 89,179,102, 77,245, 53,
-107,214, 76,112,149, 15, 43, 87,174,140, 88,179,102,205,194, 98, 45,145,149, 37,166,201,168,164,193, 42,190,160, 47, 0,232, 69,
- 8,105,255,210, 75, 47,125, 24, 29, 29,109,180, 90,173,146,237,219,183,215,203,204,204,148, 89,173,214,169,148,210,253,149,249,
- 65, 74,233, 98, 66, 8,250,247,239, 63,181,102,205,154,187, 79,157, 58,213,184, 95,191,126,219, 55,110,220,216,222,106,181,222,
- 60,127,254,252, 51, 0,230, 3,248,194, 93,205,248,248,248,183,118,237,218,101, 61,122,244,232,107,211,166, 77,147, 7, 4, 4,
- 16, 31, 31, 31,164,164,164, 32, 41, 41,137,126,251,237,183, 70,163,209,248,133,151,151,215, 91,238,106,202,100,178,215,246,159,
- 56, 73,174,222,184, 49,242,249,199,122, 40,194,235,212,133,134,212, 69, 65, 86, 38,246,239, 77,195,138, 63,206, 24,210, 12,166,
-239,121,158,119,123, 40,125,232,245,140,158, 59,127, 88,254,235,222,221,123,186,205,253,224, 35, 18, 50,252, 5,168, 35, 34, 33,
- 70,212,198,190,189,123, 49,103,246, 44,202, 23,166,237,183,220, 72,235,254,176, 11,130,125,206, 42, 81, 20, 5, 0, 80, 42,149,
- 24, 63,126, 60,156, 95,141,179,104,209, 34,232,245,122, 0, 16, 8, 33, 31, 19, 66,190, 41, 47,106, 85,142,102,245,109,219,182,
- 85,119,214,140,142,142, 46, 75,211,248,176,143, 63, 45, 45,237,173,231,158,123,238,125,137, 68,226, 93,222, 62,106,181, 26, 5,
- 5, 5,176,217,108, 54, 95, 95,223, 43,246,200,104,121,215,145, 86,171,125,107,204,152, 49,239, 17, 66,202,141,116, 40,149,202,
-219, 7, 15, 30,172, 61,108,216, 48,110,237,218,181,183,134, 14, 29, 42, 63,120,240,160, 13,192, 6, 86, 61,253,179,112, 30,176,
-160,213,106, 1,128, 86,176,239, 29, 66,200,212,147, 39, 79, 42,198,140, 25,211,124,248,240,225,158,157, 59,119,214, 56,239,163,
-215,235,197,173, 91,183,106, 23, 47, 94,156,181,127,255,254, 63, 70,141, 26,245, 4,138,102,144, 47,147,148,148,148, 95,190,248,
-226, 11,175, 78,157, 58,213,177,217,108,142,254, 87, 25, 25, 25, 72, 74, 74, 66, 66, 66,194,109, 81, 20,183, 84,242,176, 94, 25,
- 54,108,216,182, 21, 43, 86,212,120,233,165,151,146,126,248,225,135, 45, 0,242,202,216, 79,243,228,147, 79,246, 91,177, 98, 69,
-141,209,163, 71,223, 1, 48,129,205,240,206, 96,220,135,193,114,170, 44, 14, 2,104, 67, 8,233,207,243,252,148,194,194,194,207,
- 40,165,155,239,163,162, 90, 76, 8,217,126,253,250,245, 23, 0,196,126,246,217,103,175, 3, 72, 68, 81, 8,189, 71, 89,253, 21,
- 92,232,217, 0,188, 29, 26, 26,250,211,172, 89,179, 30,200,187, 8,111,220,184, 97, 2,240, 74, 72, 72,200, 15,239,255,176,254,
- 45, 74,105, 51,158,138,126, 54,194,229,112, 28,119,218,102,179,205, 73, 74, 74,218, 87, 25,205,117, 69,233,236,209,186,186, 71,
-159,169,163,135,125,100,149, 40, 35, 10, 13, 86,153, 90, 46,152,164, 54,227,109, 78,159,243,230,209,219,133,255,136, 27,171,209,
-104,180, 62,241,196, 19, 95,115, 28, 39, 2,128,205,102, 19,140, 70,227, 72, 84, 98,228,105, 89,154, 3, 6, 12,248,150,231,121,
-107,113,100,136, 51, 26,141,207,223,143,230,131, 34, 51, 51,179, 16,192,184,138,246,137,139,139, 91,245,235,175,191, 14,235,222,
-189,187,237,151, 95,126, 73,127,252,241,199,133, 83,167, 78, 81, 66, 72,153, 79,113, 9, 9, 9, 70,148,243, 70, 2, 59, 77,154,
- 52,169,241,205, 55,223,156,122,225,133, 23, 60, 23, 46, 92,232,123,252,248,113,219,242,229,203,243, 11, 11, 11, 63,101,213,211,
- 63, 11,137, 68, 2,149, 74, 5,147,201,132,140,140, 12,184,234, 83, 78, 41,189, 65, 8,121,124,202,148, 41,113, 83,166, 76,121,
- 60, 44, 44,172, 65,245,234,213,171,115, 28,199,165,166,166,102, 36, 38, 38, 38,152,205,230,221, 0,126, 1, 32,173, 89,179,230,
-105, 0,171,202,211,187,120,241,226,123, 33, 33, 33,191,111,220,184,241,113,185, 92, 94, 95, 38,147,249, 90,173, 86,174,176,176,
- 48,219,108, 54, 95, 50, 26,141, 63,167,164,164, 28,174,100,221,121,149, 16,210, 89, 16,132, 95,150, 47, 95, 30,157,154,154, 26,
-177,111,223,190,190,165,247,107,222,188,249,138, 21, 43, 86,212, 24, 59,118,236,141, 53,107,214, 84,170, 15, 22,131,193, 12,150,
-123, 23,227,102, 0,155, 31,196, 15, 83, 74,111, 3,120,171,120,121, 32, 36, 39, 39,159, 3, 48,236, 65,102, 80, 74, 74,202, 33,
- 0, 61,129,162,217,156, 19,139,110,154,247,197,209, 59, 5, 63,195,233,245, 42,255,144,167,115, 35, 33,100, 74,241,168, 38, 0,
-152,114,250,244,233,133,165, 34, 82,103,157,183,187,138, 52,149,165,121,230,204,153,210,154,231, 43,163,249,119,146,147,147,243,
-191, 21, 43, 86, 28,127,229,149, 87,228,131, 6, 13,194,229,203,151,241,213, 87, 95, 25,115,114,114,214, 84, 85,243,204,153, 51,
-183,155, 52,105,210,108,217,178,101,175, 45, 93,186,180, 63, 33,132,189,139,240, 31,130,193, 96,184, 57,100,200, 16,112, 28, 71,
- 40,165,212,106,181, 58, 6, 61, 20,207,103,118,211,141,235,202, 10,224,247,226,197, 21, 31,187, 81, 31, 29, 1,112,228, 1, 95,
-251,119, 8, 33,143, 39, 36, 36,204,189,122,245,234,111,101,237,115,225,194,133, 77, 61,122,244, 80, 29, 57,114,228,141,202,142,
- 34,100, 48,152,193, 98,184, 36,225, 1,152,171,127, 50,197,253,159,190,177,155,163,202,110,127, 88,154,127, 23, 23, 47, 94,204,
- 1,224,120,101, 72, 84, 84, 20,250,244,233,115,223,186,197,102,106, 60,216,204,237,255, 40,182,108,217,242,216,163,114,172,148,
-210, 59, 21, 61,156,154, 76,166, 45, 0,182,176, 82,193, 96, 48,131,197,168,122, 69,107,188,159,237, 15, 75,147,193, 96, 48, 24,
-140,127, 50, 4, 64,183,114,110,122,110,143, 14, 32,164,242, 47,218,116,165,207, 52,153, 38,211,100,154, 76,147,105, 50,205,255,
-158,166, 43,237,255,204,232, 68, 74,233, 95,182, 0,232,198, 52,153, 38,211,100,154, 76,147,105, 50, 77,166,249,168, 45,236,133,
-178, 12, 6, 3,237,171, 19,239,158, 97,196,167,172,109, 61,195,136, 79,251,234,196,155,229, 18,131,193, 96,184, 15,235,131,197,
-248,215,241,244,211, 79,243,149,217, 63,222,219,155,203, 75,170,254,169, 70, 37,239,171, 51, 24, 63,189,254,203, 27, 95,252, 23,
-242, 33, 56, 56,184,158,167,167,231, 8, 0, 13,116, 58, 93,128, 74,165, 74, 7,112, 49, 63, 63,127, 85,106,106,234, 21,119,117,
- 58, 69,145,233, 2,143,153, 70, 30,164,115, 4,153,243,123, 2,125,215,190,173,115, 4,153, 33, 74,240,166, 0,208, 78,145,228,
-189,189,241,244, 61,119,117,123,214, 34, 6, 10,200, 9,129,121,251,117,234,120,193,101,175,218,196, 32,210,123,215,247,172, 77,
- 76,148, 66, 74, 0,227,246, 27, 84,193, 74, 58,131,193,248,207, 27, 44,153, 76, 22, 67, 41, 29, 69, 8, 9, 34,132,220,165,148,
-126, 99, 50,153, 46, 60,106,153, 37,147,201, 98, 8, 33,163, 40,165, 65,148,210,187,132,144,191, 57, 31, 8, 89,255,116, 81, 20,
-114,224, 58,136, 0,165,172, 72,151, 97,174,146,171, 47, 29,217,191,197,115,211, 70,117, 70,179, 65,159, 77, 69, 37, 38,177,253,
- 39, 66, 8,225,163,162,162, 94,169, 81,163,198,224, 37, 75,150, 72,163,162,162,160, 80, 40,160,215,235,131,111,222,188, 25, 60,
-118,236,216,142, 53,107,214, 92,123,235,214,173,175,138,231,136, 43,223, 4,133, 17, 31, 72, 48,115,239,194,177, 50, 0,232, 56,
-118,209,140,200,208, 0,106,134, 68, 47,133, 69, 25, 46,193,140,125, 11,199,242,197,219,102, 70,134, 6, 16, 51, 36,122, 39,137,
-164,228,228,228,117,101,105, 83, 64,246,243,202, 79,208,239,153,201, 66,104,104,232,107,246,245, 77, 52,132,252,188,106, 30,122,
- 13,249, 95,137,245, 49, 10, 8, 91, 87,126,130, 62,207, 76, 46,247,109,227,189,234,112, 22, 81,164,229,214, 91, 28, 71,172, 23,
-116,193,211,203,216, 84,102, 58,251, 68, 11,105,102,139,173,204,137, 96,165, 18, 62,253,231,203,214,192,208,208,208,167, 1,132,
-185,171,201, 96, 48, 24, 21, 26,172,136,240,240, 65, 28, 79, 22,152, 45, 54, 31,111,111,111,238,203, 47,191,228,250,246,237,139,
-159,183,110,197,248,241,227, 39,132,134,134,136, 82, 65,200,161,162,117, 66, 66, 98,202,143,238,252,216,147, 79, 62,153,102,177,
- 88,202,157,213,154,231,249,244, 77,155, 54, 5,222,239, 65,133, 54, 31,148,102, 49,155,203,253, 29, 65,144,164,167,156, 94,231,
-214,239,132,135,135, 12,226, 9,183,192, 98, 19,125,124,124,124,184, 47,190,248,130,235,219,183, 47,182,110,221,138,113,227,198,
- 77, 8, 11, 13, 21,165, 18, 62, 71,180,209, 9, 9,137,137, 63, 62,188, 83, 71,200,250,245,224, 48,176,232,191,245,235,193, 13,
- 28, 72, 30,105,147,149,153,153, 73, 0,192,223,223,159,150, 48, 87,253, 90, 60,247,230, 75, 93, 49,103,233,110,232,141,166,213,
-255,246,227,140,138,138,122,229,233,167,159, 30,252,222,123,239, 73, 57,174,168,149, 95,171,213, 66,175,215, 35, 52, 52, 20,123,
-247,238,149,190,245,214, 91,131, 55,109,218, 4, 0, 11, 42,163,205,243, 60,249,125,231,254, 40,223,192, 16, 83,118, 90,138,236,
-249, 94, 13, 72, 89,219,236,235,234,213,171,231, 82,179,154,175,167,241,202,174, 43,181,237,255,143,235, 22,102, 43,103,189, 17,
-128,178, 34, 45, 81,164,194,142, 47,198,150,187,125,204,251,107,109,235,126,249, 83,211, 85, 58,205, 22, 91, 64,121,122, 61,198,
- 47,178,215, 33, 97, 87,174,184,175,201, 96, 48, 24, 21, 26, 44,194, 97,225,154, 37, 31,251,100,101,231,224,135, 77,219, 17, 29,
- 29,141,139, 23, 47,162, 94,116, 52,226, 90, 54,225,122,180,109,204, 9,132, 84,123,251,139,149, 11, 1,184,101, 44, 44, 22, 75,
-192,198,141, 27, 65, 8,129,205,102,131,205,102,179, 79,216,135,194,194, 66, 76,152, 48, 33,224, 65, 28,148,197,108, 14,184,249,
-199, 6, 72,120, 2,171,141,194, 98,163, 48, 91, 69,152,173, 20,249, 58, 43,186, 60, 62,204,237,223,225,192, 45,252,246,139, 79,
-124,114,114,115,177,241,215, 93,142,124,136,142,142, 70,151,118, 45,185,167, 31,239,200,169, 21,242,106, 47, 78,123,223,237,124,
-120, 16,172,127,250, 79,115,229,188,110,224, 58,216, 30,165, 2,124,249,242,101,222,104, 52, 14,241,244,244,108, 45,145, 72, 2,
- 85,222,193, 98,174,180,102,150,150, 4,221, 50,107,101, 29, 70, 13,168,213,235,141, 23, 58, 97,206,210,221,248,118,203, 31, 43,
-188, 66, 19,103,252,155,143, 55, 56, 56,184, 94,141, 26, 53, 74,152, 43,251, 75,205,243,243,243, 81, 80, 80, 0,142,227, 48,117,
-234, 84,233,190,125,251, 6, 7, 7, 7,239,170,168,185,112,123, 18,205,233, 20, 69,102,118,124,121,209,108,158,227, 57,153, 79,
-248,169,217, 31,124,156,175, 86,171,169, 66,161,208, 87,139,136, 57,213,101,220,210,102,148, 82,234, 21, 90,231,143, 37,223,124,
-151,167, 86,171,169, 92, 46,151,191,244,210, 75,110,245,225,212, 27,244,152, 52,105,146, 81,169, 84, 82,133, 66, 65,141,166,162,
- 89, 57, 12, 70, 3,222,124,243, 77,163, 74,165,162,106,181,154,154,204, 38,183,243,225,214,221, 2, 72, 5, 14, 82, 9, 15,169,
-192, 67, 25, 84, 23,178,194,120,152,205,230, 18,154,238,166,115,207,217,100, 40,101, 18,168,228, 2,106, 71,134, 65, 78,245,247,
-236, 51,118,236, 88,209,203,203,203,172,209,104,164,111,188,241, 6,235,191,202, 96, 48,170,102,176, 76, 22,155, 79,144,159, 55,
-190,253,230, 91, 76,125,125, 54,234,213,171, 7, 74, 41, 8, 33,120,125,198, 44,124,254,238,116, 12,126,172, 35, 44, 86,209,167,
- 60,141,178,134, 90, 18, 66, 16, 31, 31, 15,131,193, 0,189, 94,239, 88, 98, 98, 98,220, 74,176,187,195, 55, 37, 60,193, 47,167,
- 10,138,140,149, 69,132,217, 42,194, 98, 21,209, 57,198,163, 82,154, 22,155,232,227,229,161,198,210,197, 11, 49,245,221,143, 75,
-228,195,180, 55,222,194, 87, 31,190,141,137, 99,158,133,201, 98,243,169, 74, 58, 43, 3,211, 44,201,225,195,135,131, 85, 42,213,
-103,195,134, 13, 11,153, 48, 97,130,140, 10,106, 97,251,177,219, 94,159,124,179, 59,196, 96, 50,243,143,183,175,137,231, 7,196,
- 98,206,178,223,139,205,213,157,151, 34,115,115,197,127,243,177,123,122,122,142, 88,178,100,201, 61,230, 42, 45, 45,141, 43, 44,
- 44,132,217,108, 22,139,223,151,136,233,211,167, 75,222,122,235,173, 17,132,144,119,139,117,140,101,105,238,189, 69, 63,168, 17,
- 26, 40,236,219,187,175,230,187,239,127,148, 63, 96,192,128,235, 28,199, 65, 34,145,224, 70,120, 56,125,172, 91,231,203,239,127,
-248,161,241,185,231, 95,186,192,113, 28,120,158,199,213,171, 87,163, 0,168,220, 57,118, 2,208,126,253,250, 57, 52,191,217, 57,
-159,218,215, 15, 25, 50,228,186, 93,243,210,198, 57,212,221,252, 20,120,130, 48,127,245,159,191, 32, 87, 2,197,111,197,116,214,
-116, 55,157, 2,207,161,117,189,226,231,174,208,102, 64,210,193,123,126, 83,161, 80,152,159,122,234,169,235, 9, 9, 9,110, 31,
- 59,187,222,153, 38,211,100, 6,171, 76,204, 70, 61, 98,170,251, 98,241,167,239, 65,164, 28, 40, 40,168, 72, 65,169, 13,145,254,
-106, 24,117,218, 74,255,160, 40,138,176, 88, 44, 48,155,205, 88,178,100, 9, 10, 11, 11, 33,138, 34,234,215,175, 15, 0,104,222,
-188,185,115, 37,123,231,228,201,147, 53, 92,105, 6, 52, 26,112, 27, 20,213,157,215,189,243,241,215, 56,124,250, 38, 68, 17,144,
- 43, 85, 24, 56, 98, 52,172, 54, 10,147,165,242,239, 39, 53,234,117, 8,209, 72, 48,111,238, 12, 16, 65, 2,158, 16, 16, 66,192,
- 17, 17,245, 66,189, 97, 50,232, 30,250,137, 27,184, 14,226,250,245, 37, 71,129, 22,245,195,122,116, 34, 87, 42,149,234,179, 85,
-171, 86,213,104,209,162, 5, 7, 0,199,175,229,200, 63,249,102,119,200,215, 51,159, 32,205,234, 5, 33, 43, 79,143, 57,203,247,
- 97,207,169,148,223, 74,155,171,127, 49, 13,162,162,162, 74,152,171, 79, 62,249,196,127,225,194,133,161, 0,240,212, 83, 79, 37,
-119,237,218, 53,243,234,213,171, 8, 14, 14, 38,153,153,153,143, 3,248, 95,241,195,205, 20, 74,233,194,178, 68,173, 16, 12,190,
-129, 33, 38,153, 76, 6,137, 68, 2,142,227, 28,139,111, 96,136, 73,237,233, 99, 42,189,222, 93, 8, 33, 37, 52, 75, 60, 8,149,
-179,222,101,197, 85,193,254, 85, 73, 39,207, 17, 39,241,178,187,128,201,100, 50, 8,130, 80,233,180, 50, 24, 12,102,176,238,141,
- 98, 25,245, 8,243,150, 33, 72, 35,192, 98,177,226,162, 37, 4, 5, 58, 3,204,102, 11,238,152,205,184,117,230, 46,218,181,107,
-135, 39,158,120,194,102, 54,155, 33,149, 74,243, 54,110,220,232,235,202, 96,153,205,102,152,205,102,104,181, 90,172, 94,189, 26,
-130, 32, 56, 94,156,234,252,198,250,182,109,219, 86,119,207, 74,163,250,141,227, 63,193, 67,193,195, 42, 82, 88,173, 20, 86, 17,
-176,218, 40,244,102,138, 39, 70,189, 9,155,141,194, 38, 82,152,172,174,187, 40,149, 48,108,190, 45,208,111,250, 15, 0, 52,142,
-237,158,114,138,169,237,120,200,100, 18,200,100, 2, 12, 58,253,223,112,234, 40, 29, 56,144,136,143,106, 39,119,163,209, 56,116,
-216,176, 97, 33,118,115, 5, 0, 57,249, 70,193, 96, 50,243,205,234, 5,161,251,224,201,216,185,246, 19,252,122,232, 26,124, 52,
-194,254,176,255,134,185,130, 78,167, 11, 80, 40, 20,208,106,181,142,200,213,194,133, 11, 67, 77, 38, 19, 7, 0,130, 32, 9,203,
- 16, 67, 21, 54, 17,240,242, 76, 69, 78, 78,158, 31,165,148, 20, 27,157,143, 9, 33,223,148, 53,115,190, 20, 22,101, 86, 90,138,
- 76, 46,151, 27,236,198,132,231,121,112, 28,135,172,180, 20, 25,103, 51,209,210,235, 43,131,243,119,157,141, 87, 89,235,221,170,
-184,120, 82,162, 2, 40, 79,211,221,116, 10,188,211,126,124,217, 6, 75, 46,151, 83,158,231, 43,157, 86, 6,131,193, 12,214,189,
- 17, 44,189, 30, 22,139, 21, 86,171, 13, 22,171, 13,121,133,122,124,248,225,135,144,203,229, 32,132, 64, 20, 69, 20,191, 0,149,
-179, 88, 44,120,252,241,199,125, 92,253,160,115,191, 43, 74, 41,120,158, 71,171, 86,173,238,217,239,232,209,163,149, 58, 16, 15,
- 5,143,200,110,175,223,179,254,216, 79,239,129, 82,192, 38, 22, 27, 44,179, 27,247, 89, 23,134,173, 73,135,129, 48,153,204, 69,
- 17, 61, 74,171, 20,201,123, 96, 38,235, 17,235,115,229, 20, 77,232, 54, 97,194,132, 18,119, 66, 31, 79,185, 85, 33,147,218, 78,
- 93, 78, 37, 59,215,126,194,157,184,148, 34,202, 36, 2, 85,211,187, 81,255,149,227, 86,169, 84,233, 58,157, 46, 88,175,215, 35,
- 63, 63, 31,249,249,249, 37, 47,104,137,132,188, 52,102,156,191, 68, 42,131,197,108,194,175,171,230,184,212,236, 28, 65,102,132,
- 75, 48,227,197,199, 98,224, 87,163,193,233, 27,181,106,137,118,131,114,252,183, 85,109,214,125,252, 74,115, 81, 20, 73,222,157,
-179,199, 59, 13,124,249, 24,199,113, 48,153, 76,238, 79,163, 64, 8,185,113,227, 70,148,195, 72, 17, 66,236,235, 47, 95,190, 28,
-101, 55, 68,180,232,205, 18,110,161,241,240, 0, 52,213, 0,185,125,122,174, 63,191,234,172,233,110, 58, 27,212, 12, 1,130, 26,
- 1, 50,175,138,202,156,236,234,213,171, 81, 54,155,141, 77, 33,193, 96, 48,238,207, 96, 25, 13, 58, 88,172, 54, 88, 45, 69,111,
-144, 55,153, 76, 80, 42,149,232,208,161, 67,137,104, 19,165, 20, 59,118,236,128,201,228,186,147,170,213,106,117, 68,176, 68, 81,
- 4,165, 20, 63,252,240, 3, 36, 18, 9,164, 82, 41, 36, 18, 9, 36, 18,137,163, 14,118, 23,171,141,226,141,105,175, 65, 34,112,
-144, 10, 28, 36, 2,129, 84,224, 96,163, 20, 20, 20, 86, 91,209, 98,178,186, 23,200,168,200,176, 1,128,209,100, 41,122,110,166,
-128, 78,167, 99, 37,233, 33,146,153,153, 73,244,122,125,132,183,183,183,147,213,164,168,166,178, 25, 71,246,109,146, 50,242,157,
- 13, 33, 38,139, 21, 82,129,167, 67,123, 68,167,236,222,184,215, 47,211,152, 75,236,163, 11,255,229, 92,188,113,227, 70,112,120,
-120, 56,242,243,243, 97,181, 90,197,167,158,122, 42, 89, 16, 36, 97,130, 68, 66,250, 12, 25, 39,222,189,155, 98,225, 56, 30,148,
-218,240,216,211, 99,137, 92,161,148,154, 77, 38, 43,128, 41,165,163, 87, 61,195,136,143, 40,193,155,246,169, 24,186,140, 91,218,
-236,177,110,157, 47,219, 71, 17,254,248,209,203,205,119,127,241,162,125, 91,203, 55, 63, 90,126,221,121, 20,161, 59,200,101,114,
-140, 24, 49,194,209,103,233,208,215, 83,138, 12,139, 84,134,126,253,250, 57,214,255, 54, 79,234,182,166,146,183, 2,133,119, 1,
-237,221, 18,235, 37, 18, 73, 9, 77,119, 81, 11, 86,224,238,169, 10,247,153, 62,125, 58,135, 82,125,175, 24, 12, 6,163,106, 6,
- 75,175,135,213, 98,117,152, 44,179,217, 12, 0,248,244,211, 79,239, 49, 68,148, 82,199,246, 10, 53,141, 70, 68, 69, 69,193,100,
- 50, 33, 58, 58, 26,148, 82, 12, 25, 50,228,158,253,142, 31, 63, 94,169, 3,177,216, 40,230,126,248,233, 61,235, 15,174,123, 15,
-141,163, 35,209,170,182, 10, 6,139,136, 60,173,245,190, 13, 27, 0,152, 76,102,160,120, 58,124,189, 86,203, 74,210,223,136,197,
- 98, 65, 78, 78, 14,140,133, 57,214,186, 65, 52,239,133, 62, 53,141, 25,217, 58,129,163, 6,107,152,135,206, 88,152,157,204,171,
- 84,255,141,251, 98,126,126,254,170,177, 99,199,118,220,191,127,191,148,227, 56,228,231,231,163,115,231,206,153, 25, 98,168,226,
-165, 49,227,252, 83, 82,146,173,158, 74,193, 40,149, 74,144,158,158, 46,118,236, 61, 76, 63,100,212,171, 33,175,190,249,254,146,
-148, 67, 11,239,233,127,165,227, 64, 5,167, 54, 54, 74, 41,253,240,227,143,140, 94,190, 1, 70,129,216,108,206, 77,246,148, 82,
-250,205,138,111, 13,190,213,130,141,114,185, 92, 62,116,232, 80,183,218,223, 12, 70, 3,222,126,251,109,163, 66,161, 40, 49, 90,
-208, 96, 52, 96,238,220,185, 70,141, 70, 67, 85, 42, 21, 53, 91, 92,215, 31, 28, 71,172, 99,222, 95,107,179,215, 53, 78,193, 48,
- 8,130, 0,179,141,104,157, 53,221, 77,167, 59,163, 8, 39, 77,154, 36,250,248,248,152, 61, 61, 61,165,227,199,143,103, 29,177,
- 24, 12,198,125, 24, 44,157, 22, 22,139,173,184,137,208,234,136, 58,141, 31, 63,254,158,125,119,239,222,237,210, 96, 9,130,144,
-254,194, 11, 47,148,152, 34,129, 82,138, 13, 27, 54,192,222,185,214,110,218,170, 18,193,154,249,214,100,200, 36,124,177, 33, 42,
- 50, 70, 34,165,216,242,203, 14,108,249,101,135, 99, 95,158,151,164,223,143, 97, 43, 50,138, 22, 80, 90,116,103,210, 23, 50,131,
-245, 48,241,247,247,167, 25, 25, 25, 9,185,185,185,117,213,106, 53,178,178,178,144,157,157,141,220,220, 92,232,243,115,172,106,
-107,174,214,100,205,134, 32, 8,184,155,152, 6,155,205,118,247, 63, 18,189, 66,106,106,234,149,154, 53,107,174,125,227,141, 55,
-134, 76,159, 62, 93, 34,138, 34,174, 94,189, 10, 16, 66, 37, 82, 25,138, 70,234, 9,200,203,203, 23, 85, 26,239, 84, 51,229, 85,
- 18,169, 12, 28, 47, 45,179, 41,249,224, 29,154,219, 41,130,188,211,241,229, 69,179, 37, 82, 41,241, 10,171,119,236,153,145, 47,
- 94,176,119, 20,207, 78, 56,115,168,219,171, 95,183,181, 89,173,104,210,182,219,182,103, 70,190,120, 81, 34,145,224,252,249,243,
- 81,174,162, 57, 4,176, 14,120,110, 42,239,225,161, 46, 28, 52,104,208,117,187,230,141, 95,231, 23, 62, 59,110, 6, 4,169,162,
-112,228,200,145,142,209,133,231,126,122,191,112,192,115, 83,229, 4,229, 55,123, 95,208, 5, 79, 95,247,203,149,218,175,191,254,
-186,113,216,176, 97, 14,205,203,151, 47, 71,245,235,215, 79,245,222,123,239, 25,157, 53,221, 73, 39,224,222, 40, 66,149, 74,101,
-126,230,153,103,174,151, 53, 50,145,193, 96, 48, 42,111,176,172, 86, 88, 45, 69,125,176,204,102, 51,172, 86, 43,150, 46, 93, 90,
-194, 12, 73,165, 82,112, 28,231,210, 96,109,220,184,177,196,228,158,205,155, 55,167,148, 82, 60,245,212, 83,142,230,198,145, 35,
- 71, 98,244,232,209,149,238, 68,107,177, 1,179,230,124,234,208,233,221, 61, 14,253, 31,235, 8, 42, 22, 25,181,244,243,155, 42,
-229,216, 42, 50,108,142, 8, 22, 40, 64, 41, 10, 11, 10, 88, 73,122,200,152, 76,166, 93, 11, 22, 44,136,120,235,173,183,100,217,
-217,217,200,204,204, 68, 78, 78,142, 99, 41, 44, 44, 68, 80, 80, 16,126,251,237, 55,115,126,126,254,209,255,210,177,223,186,117,
-235,171, 45, 91,182, 96,223,190,125,131,167, 79,159, 46, 9, 10, 10, 34, 94, 94,105,196, 98, 54, 1,160, 52, 35, 35, 67, 84,105,
-188, 83,253, 3,195,238,164,220, 77,143,182,152, 77, 16,109,230,114,123,102,239, 77,160, 31,134,135, 6,242, 71,247, 31,171,249,
-217,188, 47, 10,237,166, 69, 34,145,160, 93,159,145,167,223,252,104, 89,252,130, 47, 22,152, 94,124,233,229,139,149, 25,245,119,
-209, 16,242,250,149, 43, 87,106,207,156, 57,211,232,172,217,253,149,121,107,250,244,233,163,250,248,227,143,141,246,117, 28,199,
-225,201,233, 95,175,137,139,139, 83,213,171, 87,239,186, 43,109,231,209,142,246, 79,251,122,231,117, 15,114, 20,161, 66,161,168,
-210,136, 71, 6,131,193, 12, 86, 9, 36, 2,151,119,237,118,170, 87, 53,181, 18, 86,209, 8,155,169,104,106, 5,155,205,134,151,
- 94,122,201,177,223,208,161, 67,241,236,179,207,218, 59,148,150,124,130, 37,164,155,171,185, 50, 68, 81,196,193,131, 7, 75,140,
-254,169,168, 2, 43, 79, 83,107,180,225,208,143,239, 66,164,128, 88,228,123, 64, 65,220, 26, 53, 88,150,166, 43,195,166,240,240,
- 1, 7, 10,240,192,205,228,116, 8, 60,151, 87,217, 99,175, 44, 76,243, 79, 77,185, 92,190,230,135, 31,126,232, 29, 23, 23, 87,
-163,113,227,198, 92,118,118, 54, 10, 11, 11, 81, 88, 88,104,143,114,225,210,165, 75,226,237,219,183,147,229,114,249, 15,255,165,
- 99, 47,126,253,205,130,224,224,224, 93, 51,102,204, 24,145,153,153,249,120, 78, 78,174,223,207,223,206, 70,175,167,199,146,142,
-189,135,106, 77, 84, 80, 36,165,166,213,219,187,237,123,223, 95,215,126, 5,179,201, 52,154,144, 69,151,237,211, 52,148,214, 20,
- 33,152, 60,188,124, 45, 74,165,146, 58, 27, 20, 65, 16,224,225,229,107,241,246,169,102,114, 54, 52,101,141,164, 43,239,216,203,
-210,180,175,255,167,104, 86,102, 20,161,253,183,216,181,201, 52,153, 38,155, 11,171, 74, 6,139,218,232,132,197, 63, 31, 93, 96,
-177,137, 94,246,117, 13, 26, 52,128,217,108,198,111,191,253,230, 48, 30,130, 32, 56,230,134,113,167, 15, 86, 41,238,116,232,208,
-161,162,169, 24,238,184,119,166,113, 39,182,243,160,234, 21,109,175,108,194, 92, 25,182,101,123,207,255,153,137, 28,151, 7, 74,
- 39,176,226,244,240,136,142,142,182, 29, 62,124,120,210,216,177, 99, 63,235,218,181,107,104,255,254,253,165,225,225,225,144,203,
-229,184,121,243, 38, 14, 28, 56, 96,190,117,235, 86,178, 78,167,155,212,184,113,227,255,228, 72,203,212,212,212, 43,197,147,136,
-254,207, 62, 21,131, 92,161,148, 14, 29,245,106,152, 99, 20,225,218,175, 96, 52,232, 1, 64,168,104,154, 6, 59, 30, 30, 30, 50,
-251, 40, 60, 65, 16, 28,163,240, 60, 61, 61,101,231,207,159,119,140, 4,172,204, 40,194,135,169, 41,145, 72,170,164,233,206, 40,
- 66,137, 68, 34,187,116,233, 18, 27, 69,200, 96, 48,238,207, 96,221, 73, 78, 94, 5, 96,149,243,186,199, 31,127,188,176, 95,191,
-126, 74,251,136, 66,251,104, 64,147,201, 4,147,201, 4,133, 66, 81,169, 9,161,220,153, 68,212, 29,210,207,109,170,241, 64,115,
-197, 13,195,150,146,146, 82,131, 21,159,191,151,182,109,219,166, 94,190,124,121,216,206,157, 59,135,238,223,191,191,155, 78,167,
-139, 32,132, 64,169, 84, 38,152, 76,166, 93,114,185,124,205,127,213, 92,149,135,217,108,182, 78,159,245,201,119,188, 32,181,138,
-162,153,152,205,230, 81,112,243,165,238, 0, 48,102,204,152, 50, 71,202, 13, 31, 62,188,202, 35,232, 30,166,102,241,107,113,254,
-146, 81,132,197, 29,219, 89,223, 43, 6,131,113,127, 6,171, 44,116, 58,157, 55, 33, 68, 72, 73, 73,185,103,155, 84, 42,197,237,
-219,183,173,255,133, 76,121,224,134,141,241,151, 17, 29, 29,109, 43,126, 16, 88, 85,250,101,207,143, 2,148, 82, 35, 33,100, 10,
- 33,228,227,226, 85, 83,110,253, 62,223, 49, 90,144,144, 5,231,156,183, 85, 16,189, 74,170,226,203,139,147, 42,218,246, 79,215,
-148, 74,248,116,167,151, 58,223,179,205,197,111, 38,177, 43,144,193, 96, 60, 16,131,181,119,239, 94, 43,128,202,152,168,244,191,
- 32,205,233,236,180, 61,218,172, 91,183,206,198,114,161,132,201, 90, 72, 8,249,198,110,184,220,221,230, 76,114,114,242,186, 7,
-157,174,127,131,230,207,151,173,129,127,199,113, 48, 24, 12,102,176, 24, 12,198,191,195,100, 25,171,178,141,193, 96, 48, 24,127,
- 13, 4, 64,195,114, 42,229,243,110,139, 16,210,176, 10, 55,132,243,255, 32,205,128, 10, 52,119,185,208,236, 86,133,116, 50, 77,
-166,201, 52,153, 38,211,100,154,143,164,166, 43,237,255,204,232, 68, 90, 60, 27,249, 95,177, 0,104,248, 47,209,236,198, 52,153,
- 38,211,100,154, 76,147,105, 50,205,191, 79,243,191,182,176, 25,243, 24, 12, 6,131,193, 96, 48, 30, 48,101,246,193,170, 22, 51,
- 0, 92,169,121,207, 69, 10,100, 92,216, 84,165,253, 0, 96,214,172, 89,247,101,230,222,121,231, 29,183,222,210, 92,173,225, 0,
-112,110,140, 33, 19, 9,144,113,126,147,219,191, 79,106, 12,120, 11, 34,222, 40,250, 7, 31,209, 59,155,102,178,226, 83, 53,154,
-106,136,191,133, 72,250,120, 40, 36,253, 34, 60, 36,109,110,230, 26, 15,235,204,226, 86, 74, 44,155, 47,230,211, 28,150, 67, 12,
-198, 95,143, 79, 84,187, 97,126,254, 65,163, 69, 74,149, 0, 96, 50, 25, 44,201,137,119,230,211,156,139,107, 75,212,125,190,245,
- 7, 6,133,132,141, 87, 42,212,202,162,234,143,152,178,179,238, 46,204,185,117,232,251,135,149, 86, 82,252,238,180,208,208, 80,
-239, 67,135, 14,213,104,215,174,221,237,228,228,228, 92,231,125,202,218, 70,157, 95,166, 89,134,102, 96, 84,179,103, 60, 52,234,
-151, 13, 70, 99,164,151,167,103,122,118, 86,214,226,212, 91,167,191,178,239, 83,163, 70, 13,207,181,107,215, 6, 15, 29, 58, 52,
- 37, 62, 62,190,192,149, 38,131,225,210, 96,113, 4, 88,183,110, 45, 40,165,197,147,108, 82, 12, 29, 50,180,204,253,194,229, 41,
-145,162, 40, 62, 11, 96, 56,165,244, 76,138, 37,252,169,170, 36,100,247,238,221,161, 22,139,165,133,213,106,109, 6,160,153, 82,
-165,105, 98, 52, 26,210, 9,232,115,143, 61,246,216,105,119,117, 56, 10, 44,251,118, 37,102,141,233,244, 11,128,222,229, 92, 88,
-179,146,140,161,149, 51, 72, 34,125,243,143,253, 27,228,222, 42,130, 90,205,159,156, 10,224, 31,105,176, 66, 66, 66,148, 0,158,
-227, 56,174,171, 92, 46,175, 99, 48, 24, 18, 0,156, 35,132, 44, 76, 74, 74, 74,169, 98,229,198,197,104, 36,207,171,148,170, 94,
-193,106, 89,179,212,220,252,100,157, 69, 60, 32, 18,243,199,149, 53, 68,181, 8,145,213, 12,247,222,247, 90,255,184,232,198,209,
- 53, 97,187,176, 31, 38,179,185,223,137, 84, 93,191, 37,167,211, 38,213, 34,164,217, 13, 74, 77,110,166, 43, 24,128, 64, 41, 77,
- 4,128,176,176, 48, 31, 81, 20,227, 0, 52, 1,112,134,227,184, 3, 73, 73, 73,247,101,216,254, 69,154, 33,162, 40,190, 16, 24,
- 24,248,120, 90, 90,218, 47, 28,199, 45,175,234,249,102, 60, 26,248,250, 5,189,252,229, 55,235, 29,211,214, 83, 81,148, 12,233,
-223,105, 4,128, 18, 6,203,219,219,239,185,111,215,252,170, 36,127,190, 97, 67, 54,110,212,192,209, 0, 30,138,193, 34,132, 16,
- 74, 41,102,205,154, 69,150, 45, 91, 54,178,122,245,234,181, 41,165, 87,103,206,156, 57,223,121,191,210,219,222,121,231, 29, 90,
-252, 93, 90,150,102, 84, 76,251,205,207, 63, 59,184,211,132,177,207,105, 84, 74, 37,244,122,131,223,162,101, 43, 63,249,106,249,
-170, 62,207, 62,213,173, 23, 0, 44, 93,186,116, 64,120,120,120,132,201,100,138,159, 57,115,230,202,138, 52, 25, 12,183, 12, 86,
-177, 75,199,245,203,103,240,203,207,219,112,252,204, 37,136, 78,197,169, 65,131, 6,106,153, 76, 54, 48, 76,198, 61,215,168, 89,
-155,246,253,158,126,142, 88,136, 10,115, 38, 15,173,244, 60, 88,167, 78,157,146,167,166,166,206,142,172,215,252,213, 78, 61,250,
-115,245,163,235,193,223,207, 7, 34, 39,195,138,223,174,249,237, 93, 50,242, 75, 0,109,220,246, 65, 4,120,113,228, 51, 8,149,
-161,247,143,219,142, 33, 53,215, 6, 66, 0, 66,138, 12, 97,161, 65,196, 27,163,218,191, 83,121,131, 68, 56,111, 21,193,196, 53,
- 6, 0,224,255,137, 39, 51, 56, 56,184,153,159,159,223, 87, 35, 71,142,244,169, 83,167, 78,176, 76, 38, 83, 25, 12,134,218,119,
-238,220,137,252,236,179,207,186, 7, 7, 7,127,144,154,154,186,161, 50,154,209,222,138,234,143,213,171,241,227,180, 49,207,181,
-172, 27, 17, 14,193, 88, 8,209,168, 13,191,125,235, 70,155,185,223,110,120, 49,198, 75, 50,228, 66,158,197,237, 14,137, 10, 15,
-233,155,111, 60, 63, 52,186,150,154,194,116,254, 16, 36, 60, 15,133,167, 15, 90,241, 60, 56, 66,235,191,115, 32,249, 13, 0,239,
-184, 81,233,190, 11,224, 13, 0, 68, 42,149,110, 8, 12, 12,188,218,182,109,219,198,131, 7, 15, 38, 13, 27, 54,196,153, 51,103,
-154,254,252,243,207,163,194,195,195,207, 90, 44,150,223,213,106,245,209, 27, 55,110,184,101,220,106,213,170, 37,211,106,181,173,
- 37, 18, 73,231,127,178,102, 72, 72,136,210,100, 50, 61, 27, 22, 22,246, 82,191,126,253, 26,245,237,219,151,212,173, 91, 23, 87,
-174, 92,105,254,235,175,191,190,211,164, 73,147,115, 73, 73, 73, 75,101, 50,217,119, 41, 41, 41,110, 77, 2, 60,184, 33,185,178,
-246, 60,173, 87,213,237,165,206,145, 55, 0, 37,165, 52,197,141,125, 3, 1,168, 41,165, 55, 31,182,230, 95,244,160,115, 9,128,
-175,253,165,245, 28,199, 57, 94, 96,239,252,105,255,219,102,179,105,239,220,185, 83,211,133,102, 93, 81, 20,221,110, 9, 32,132,
-208,212,212,212, 43,229,214,241,160, 50, 0,152,251,206,100, 36, 39,222,134,222,160,213,231,230,102,173, 40,189, 95,110, 78,246,
-170, 23,134,247,249,159, 76,166,144,132,134,215,192, 27,179, 62,129, 61,234,245,176,152, 53,107, 22,121,231,157,119,176,116,233,
-210,190, 0,226, 40,165, 7,162,163,163, 23,148,186,103, 57,182,189,243,206, 59,243,103,205,154, 69, 0,148,105,132,170, 69, 53,
- 25, 49, 98,200,128, 78,175,191,246,178,198,190, 78,169, 84,224,181,255,141,150,233,141,166, 54,139,190, 94,249,210,252, 57,211,
-150, 1,232, 2, 32,150, 82,122, 2,192,202,138, 52, 25, 12,183, 13,150, 72,129, 95,126,222,134,215,166,191,141,111, 86,124,135,
-239, 62, 28, 77, 98, 99, 99, 59, 80, 74,159,139,136,170, 53,240,201, 97,163,149, 17,181, 27,162, 80,244, 68,124,166,136, 83,191,
-175, 65,233, 39, 31, 87,108,223,190, 61,150, 82,124, 59,118,250,103,245, 26, 55,109,129,243,201, 86, 28, 74,180, 65,123,195, 6,
-129,215, 67, 20, 43, 63,196,220,222,236,215,188,121,115, 36,229, 88,113,224,138, 9, 60, 7,112, 92,209, 11, 93,121, 82,197,156,
- 18, 77,215,102,127,123, 42, 38, 51, 77, 4, 68,211,181,127,218,137, 12, 13, 13,237, 18, 21, 21, 53,239,127,255,251, 95, 80,106,
-106,170,239,241,227,199, 33,151,203,225,227,227, 35,248,249,249,213,155, 62,125,122,222,220,185,115,167, 4, 6, 6,158, 78, 75,
- 75, 75,112, 71,179,129, 70, 22,221,177, 89,204,225, 25, 51,223,241, 50, 29,251, 21, 57,107,214,129,231, 40,164,106, 13, 66,148,
- 74, 44,232, 17,225, 59,109, 79,226,134, 70, 74,101,244, 57,189, 62,217, 29,205,240, 0,223, 30,181,235,214, 67,206,198, 47,113,
- 61,223,136, 35, 25, 70,244,239,216, 18,181,124,149,104, 98,181,193, 79, 33,116,113,101,176, 8, 33, 62, 0,166,153, 76, 38, 78,
- 42,149, 18,133, 66, 49,112,197,138, 21,123,234,214,173,107,176,239,211,186,117,107,180,110,221,154,104,181,218, 38,135, 14, 29,
-106,178,113,227, 70,115,112,112,240,193,212,212,212,121,229,233, 42,149,170, 59, 6,131, 62, 92,165, 86,155,150, 47, 91,182,187,
-117,235,214, 84, 34,145,224,126, 52, 1, 32, 40, 40,104, 67, 68, 68,132,255,156, 57,115, 10, 90,182,108,249, 64, 52, 35, 35, 35,
-119,196,197,197,117,238,209,163,135,208,174, 93, 59,132,132,132, 56,182,249,251,251, 35, 46, 46,142, 36, 38, 38, 54, 62,112,224,
-192,194, 29, 59,118, 44,136,140,140,252, 61, 62, 62,190,135,171,243, 67,129,186,247,179,189, 20, 60,128,185,132,144,101,148,210,
- 67, 21,156,207,102, 0,134, 1,248,240,111,210,172, 16,165, 82,153,102, 48, 24, 2, 0, 64,161, 80,164,235,245,122,151,115,103,
- 17, 66, 52, 31,125,244, 81,128, 84, 42, 5,207,243,176,217,108,142,133, 82, 10, 81, 20, 75,116,134,253,240,195, 15,221,154,219,
-237,238,221,187, 90, 20,141,254,166, 78,139, 88,214,103, 68, 68,132,191, 59,154,201,137,183,225, 97,137,207, 10,244, 80,214,136,
-244,240,158,221,174, 93,187,217,206,219,219, 70,123, 1,200,135, 94,127,247,118,114, 34,252,254,134,186,205,123,217,178,101,207,
- 46, 93,186,180, 63, 33, 68, 91,156,191,141, 94,125,245,213,223, 75,229,121,163,226, 79,109, 72, 72,200, 94, 66,200,214,208,208,
-208,111, 1,220, 19, 29,246,210,120,140,158, 52,238, 69,205,255,217, 59,239,168, 42,174,181,141, 63,123, 78, 47,244, 94, 5, 20,
-164, 8, 54, 64,196,138,189,196,222,141, 37, 38, 26, 75, 98, 55,150,104,236, 81, 99, 76,108,177, 37,246, 30, 77,236,189,247,138,
- 21, 4, 20, 5,164,247,126,250, 57,179,191, 63, 0, 47, 26,133, 3,122,111,242,153,249,173, 53, 11,157, 51,243,204,158,153, 61,
-123,158,121,119, 3,128,121,251,179, 48,119,127, 38,190,235,105,133,169,159,200, 49,108, 80,111,249,230,237,191,143, 4,240, 91,
- 57,237,104, 95, 95, 95, 18, 21, 21,197,153, 43,142, 15, 19,193,186,253,224, 9, 54,111,221,134, 65,131, 6, 35,226,236,134,227,
-157,122, 14,233,216,184, 69,123,232,133,118,136,206, 32, 72,140,163,224,243,244, 96,192,226,197,157, 67,148, 97,152,109,111,104,
-188,115,216,132,227,199,143, 79,170,225, 89,127,201,183,115, 23,243, 30,167,139,176,229,138, 18, 6,117, 62,148, 89,177, 40,206,
-120,138,194,180, 39,200, 75,126,252,136, 97,152,185,198,106,254,245, 28, 0,150, 82, 16, 74, 74,138, 28, 80,252,165,209, 24,140,
-236, 18,170, 45,142,170,233,237,239,159, 43, 50, 0,218,226,168,202,143,253,225,187,153,190, 75,211,201,201,169,157,187,187,251,
-143, 35, 71,142,116,121,244,232,145,153, 66,161, 40,190,117,235,214,165,212,212, 84,123, 27, 27,155,196,254,253,251, 55,177,183,
-183,183,107,209,162,133,236,212,169, 83, 51, 1, 12,175, 76, 51, 64, 46,242,111, 30, 28,112, 99,225,210,159,228, 89,251, 86, 67,
- 19,251, 16, 55,178,148,120,148,173,164,206,166,121,164,159,175, 21,100, 34, 62, 70, 6,218,155,140, 63, 21,247, 67,233,203,172,
-210,115,247,112,180,175,165, 83, 42,160, 82,234,112,252,121,190,242, 70, 65,190, 29,243,240,101,230,212,174,193, 18, 94,102, 10,
- 28, 76, 4, 94, 85,189,158,132, 16, 72, 36,111,159, 30,206,194,194, 2,161,161,161,168, 89,179,166,112,224,192,129,173, 1,172,
-120,151,166, 86,171,113,100, 89, 10, 51, 51, 51, 97,155, 54,109, 8, 33,132,190, 57,129,121, 85, 53, 1, 64, 46,151,119,168, 95,
-191, 62,111,247,238,221, 69,105,105,105,241,159,124,242, 73,150, 68, 34, 97,223,216, 6,110,110,110,248,234,171,175,132,195,135,
- 15,175, 84,211,222,222,190,221,142, 29, 59, 64, 8,121,245,226,126, 19, 55, 55, 55, 56, 56, 56,160,115,231,206,252,222,189,123,
-183,171,232,122,246, 15, 32,209,101,230,169, 95, 0,169,240, 37,210, 47,128, 80, 2,196,188, 25,201,122, 83,147, 82,154, 77, 8,
- 89, 15,224, 0, 33,164,207,219, 12, 17, 33,164, 41,128,253, 0, 58, 81, 74, 51, 42,187,239,229, 53, 69, 34,145, 80,171,213, 90,
-190,105,124,170,170, 89, 62,226, 19, 30, 30,142,192,192, 64,148,255,171, 82,169, 94,205,189, 74, 8,177, 51, 54,127,242,120, 60,
-252,252,243,207,224,241,120, 16, 10,133, 16,137, 68,111,253, 27, 28, 28, 92,213, 50, 36,145, 16,194,212,168, 81, 99, 26,143,199,
- 27,174,209,104, 92,196, 98,113,138,193, 96,216,106,101,101,245,125,120,120,184, 14,128,197,219,230,134, 45,175,169, 84, 21, 43,
- 41,203, 74, 53, 26,149, 78, 42,151,186, 93,187,118,173,246,187,238,185, 90,173, 70,155, 54,109,144, 94, 88,156, 89,182,207,255,
-170,172,187,118,237,154, 91,141, 26, 53,188, 1, 52, 47, 93,117, 57, 57, 57,185, 69,185,255,151,231,114,114,114,114,167,210,127,
-199,188,124,249,210,173,204, 96,149,215,212,104,180, 30, 38, 38,114, 0,192,220,253,153, 80,239,168, 5,241,224,231,248, 60, 68,
- 13, 83, 83, 83, 24, 12,122,239, 9, 19, 38,108, 67,201, 51,113,135, 82,218, 99,194,132, 9, 62, 0,206,187,185,185, 29, 4,144,
-255,191, 46,231,255, 13,154, 31,165,193, 42,173, 82, 46,171, 90, 38, 44, 5, 6, 14, 24, 8,150, 2, 39, 79,158, 4, 91, 82,118,
-155, 37, 41, 45, 80, 20,103, 3, 62,195,130,207, 35,224,243, 0,128, 32, 59,233, 9, 52,197,217, 87,147, 52,206,113,172, 17,254,
-254,228,201,147,161,238,126,141,126,152,187,112, 25,179,249,178, 18,249, 10, 21,178, 34, 15, 35,245,246,166, 84, 86,175, 61,204,
- 48,204, 93,134, 97,238, 53,172, 87, 55,218,209,209,177,218,163,118,179, 20, 48,148, 55, 86, 44, 64, 62,178,232,174,139,139, 75,
- 39, 79, 79,207,197,163, 70,141,114, 11, 15, 15, 55, 45, 44, 44,204, 60,123,246,108,180, 86,171,189,207, 48,204,202,148,148,148,
-150, 59,118,236,144, 77,157, 58,181,189,183,183,183,247,233,211,167, 21,149, 70,174,228,194,122, 67, 62,237,127,163,251,168,113,
-146,200,223,215, 64,252, 36, 28, 27,158,230, 26,238,102, 42,103,170,138,244, 43,164, 50,126,211, 92,181,254,204,148, 16, 39,198,
- 81, 46,128,171,153, 32,204,216,244,138, 68, 18, 62,229, 75,160,209,232, 81,172, 99, 53,145,153,180,120, 82,203,186, 90, 42,183,
-145, 0, 0,159, 97,248, 70, 60,216,185,132,144, 31, 68, 34,209, 44, 66, 8,237,222,189,123,124,195,134, 13, 85, 0,160, 84, 42,
-161, 86,171, 33, 16, 8,160, 82,169,240,226,197, 11,220,188,121, 19,150,150,150, 85,186,174,185,185,185,112,115,115,131,137,137,
-201,123,107, 26, 12, 6,178,102,205, 26, 81, 68, 68,132,232,143, 63,254, 48,155, 50,101, 74,113, 72, 72, 72,194, 39,159,124,146,
- 97,102,102,166,127,240,224, 1,110,220,184,129,188,188, 60, 52,106,212,200, 40, 77,141, 70, 3, 62,159, 15,165, 82, 9,177, 88,
- 12, 62,159, 15,189, 94, 15,150,101, 95,153,174,162,162, 34,228,228,228, 64, 40, 20,226,109, 70,177, 60,101,102,169, 95, 0,161,
-191, 31,191,158, 1,176, 20,154, 66, 29, 52,249, 58,168,203,150, 92, 93,191,137, 63,213,255,253, 49, 37, 85, 40,132,111, 18, 66,
-250, 0,216,255,166,201, 42,103,132,250, 80, 74, 31, 84, 85, 83,171,213, 94, 45, 51, 62, 18,137,196,142,144, 18, 99, 40, 22,139,
-117,106,181,186, 85, 85, 52, 1, 32, 60, 60, 28, 13, 27, 54,228,149,106,150,111,102,195, 86,245,185, 36,132,128,199,227, 65, 44,
- 22,131, 97, 24,132,132,132,160,119,239,222,240,245,245, 69, 98, 98, 34, 78,159, 62,141,168,168, 40, 8,133,194,215,170, 10,141,
- 33, 44, 44,140,231,225,225,113,189, 93,187,118,254, 99,199,142,149,184,185,185, 33, 58, 58,186,198,218,181,107,167, 93,189,122,
-181,123, 96, 96, 96, 80,120,120,120,165,105, 78, 75, 73, 90, 61,160,123,216,103,121,185, 57, 59,106,248,154,207, 85,171,213,120,
-242,228,137,209,251,252,175,202,184,166, 77,155, 38, 80, 74,159, 81, 74,175, 16, 66,234, 38, 39, 39,183,112,118,118, 62, 65, 41,
-149,191,113,205,139,147,147,147, 59, 57, 59, 59, 23, 80, 74, 31, 17, 66, 98, 8, 33, 9, 73, 73,127,157,209,200,194,220, 44,179,
-168,168,216,222,196, 68,142,153,221, 45, 32, 30,252, 28, 99, 91,241,160,211,233,240,226, 69, 60, 60,220, 93,201,158,205,135,130,
- 0,220, 1, 16, 28, 30, 30, 14, 0, 65, 0,226, 18, 19, 19, 29,203, 12, 22, 7, 71,149, 35, 88,111,246, 2,180,171,219, 3, 53,
- 68,188, 94,143, 79,174,184,233,165,165,110,246,254,159,148, 70,162, 75, 34,213, 9, 15, 78,130,101,217,173,233, 70,244,202,187,
-113,227,134, 68,207, 98,243,212,111,231, 51, 27, 46, 40,145,158,150,130,148, 75, 75,161,204,120,178, 69, 42,149, 78,110,211,177,
- 75, 65,117, 78,164,124,143, 70,103, 97,146,191,133,181, 3,212, 90, 90,106,176, 94, 55, 89, 31, 11, 78, 78, 78, 93, 61, 61, 61,
-231, 31, 62,124,216, 77,169, 84,154, 94,187,118, 45,239,204,153, 51,207,180, 90,237,198,212,212,212,157,165,133,206, 97, 62,159,
-191, 0, 0, 76, 77, 77,249, 60, 30, 79, 90, 81, 35,205, 0,115, 97,195, 97,159, 13,186, 58,105,229,111,146,103,143, 31, 96,229,
-254,227, 16, 27, 52,134,200, 92, 77,143,199,133,186,163,165,155,157,239,236, 36, 75,166,160,174, 2,134,192, 74, 42,116, 8, 37,
- 68,114,131, 82, 85,101,105,182,113,117, 99,116, 53, 60,112, 69,175,130,137,169, 80, 4, 0,206,181,253,120,247,149, 58, 92,123,
-248, 4, 18,137,165,208,200,151,236,108, 59, 59,187,198,151, 46, 93, 34, 69, 69, 69,170, 71,143, 30,193,202,202, 10,246,246,246,
- 48, 55, 55,199,147, 39, 79,112,238,220, 57,196,196,196,128, 82,138,122,245,234, 85,233,218,166,167,167,163,160,160, 0, 61,122,
-244,108,157,146,146, 44,177,179,119,208,156, 63,119,246,108,117, 52, 89,150, 37, 0,224,239,239, 15,127,127,127, 65,114,114,178,
-197,209,163, 71, 77, 22, 47, 94,236,100,107,107,123, 71,169, 84,190,102,156,140, 53, 88, 0,160, 82,169,160, 86,171, 33, 20, 10,
- 33,145, 72, 32, 20, 10, 81, 80, 80,128,244,244,116, 20, 22, 22,190,138,184, 25,171,251,234,211,100,123,179,187,127,205, 28,159,
-217, 85,243, 75,247, 90,169,201, 58, 79, 8, 41,187,191,233,165,127,251, 84, 84,213, 87,137,230,107, 17,150,114, 81, 38, 65,117,
- 52, 3, 3, 3,203, 52, 94, 43, 37, 36, 18, 73, 70, 89,228, 74, 34,145, 24, 53, 85, 23, 33, 4, 44,203, 66, 40, 20,162, 94,189,
-122,152, 57,115, 38, 34, 35, 35,113,225,194, 5, 56, 58, 58,162,107,215,174, 16, 8, 4,136,143,143,127,173,125,150, 49, 55, 39,
- 62, 62,126, 90,251,246,237,253, 87,174, 92, 41, 73, 72, 72, 64, 84, 84, 20,204,204,204, 48,127,254,124,241,244,233,211, 61,175,
- 95,191, 62, 27,192,143,149, 94,195,156, 39,251, 75, 13, 46, 26, 52,104,240, 89,155, 54,109,254, 90,174,218,218,154,239,222,189,
-219,174,204,120,149,223,231,127, 69,114,114,114,222,220,185,115,151,251,250,250,174, 40,173, 22,108, 78, 41,149,167,164,164,132,
-237,223,191,159, 0, 64,159, 62,125,168,147,147,211,197,210,188,241,104,197,138, 21,173,162,162,162,232,220,185,115,223, 90,206,
-165,102,164,174,255,113,213,134,229,115,103, 76, 20,125,211, 89,134,207, 67,212, 96, 89, 22, 60, 30, 15, 43,215,109,214,197, 68,
- 62,122, 24, 20, 20,116,148, 82,218,163, 52,154, 89, 4, 32,134, 16, 18, 39, 18,137, 82, 94,188,120,193,185, 7,142, 74, 97,202,
-135,199,223,181, 81,198,163,131, 96, 89,214,209,194,214,217,106,228,167, 29,192,178,128,158, 5,244, 6, 10,165,162, 24,105,209,
- 23, 20, 26,141,198,168,135, 46, 59, 59,123,193,176, 9, 75, 60,239,190,228, 35, 53, 87,131,164,115,243,169, 58, 43,186,119,215,
-174, 93,135,183,105,211,166,160,218, 39, 82,218,243,209, 89,152,228,111,105,227,116,241,187,165,155,112,231,133, 6, 44,253, 79,
- 36,203,192, 2,236, 71, 18,192,114,118,118,246,178,180,180, 92,118,248,240, 97,119,145, 72,100, 26, 27, 27,107,184,120,241, 98,
-138, 78,167, 91, 91,102,174, 74, 77,216,160,128,128, 0,157, 76, 38,131, 66,161, 80,233,116,186,162,119,153, 43,127,169,212, 37,
- 48, 32,224,242,164,149,191, 73, 84, 26, 13,242,149,106,216, 58, 58, 24, 30,229, 42,122, 60, 42, 84, 31,125, 21,225, 50, 21, 52,
- 9,170,229,236, 76, 36,166,160, 0,146, 11, 53, 41,198,152, 43, 0,144,155,154, 51, 46, 65, 97, 8, 26,191, 26, 74,158, 57, 5,
- 0, 75, 59, 39,166,213,152,239,209,113,229, 37,168,249,166, 70, 91, 96, 62,159,175,246,242,242, 82,149, 22,170,200,206,206, 70,
-100,100, 36,114,114,114,176,122,245,106, 68, 71, 71,191,122,233, 86,205, 96,188,122,137, 35, 51, 51, 67, 76, 41, 69, 70,122,154,
-168,186,154,101, 6,171,220,189,195,232,209,163,249,197,197,197,146,242,230,170,170, 6,171, 44, 29,148, 82,104, 52, 26,228,231,
-231, 67,163,209,224,217,179,103,175,204, 85,105, 4,173,106,231,175, 41,212,189,117,189, 42, 71,247, 30,213, 9,215, 0, 8,203,
- 13, 82,104, 95, 93,115,245,134,241,169, 82,244,167,178, 8, 22,222,210,128, 89,169, 84,218, 83, 74, 73,120,120, 56,140,105,127,
- 85,222, 96,137, 68, 34,244,237,219, 23, 17, 17, 17, 72, 76, 76, 4,159,207,135, 74,165,130, 74,165, 66,163, 70,141, 32, 18,137,
-170, 26,193,162, 2,129, 96,208,216,177, 99, 37,113,113,113,200,202,202, 2,195, 48,208,235,245, 48, 24, 12, 24, 62,124,184, 84,
- 36, 18, 13, 66, 21, 27, 98,223,191,127,191,195,181,107,215,188,223, 92, 50, 51, 51,243,197, 98,241, 63,178, 12,220,191,127, 63,
-233,211,167, 15,237,211,167, 15, 45, 51, 90,198,146, 25,247,120,253,206, 61, 7,207,204,156,187,180, 40, 43, 59, 7,114,185, 28,
-153, 89,217,248,110,193, 50,221,133,171,183, 47,142, 30,254,105,232,242,229,203,151, 0,136, 41,221, 37,102,197,138, 21, 67, 71,
-140, 24,177,189,108,184, 6, 14, 14,163, 35, 88,101, 85,132,239,248,178,107, 96, 97,227,124, 97,198,162,223, 76, 14, 60,228, 33,
- 55, 53, 6,170,140, 24,184, 54,236,142,244,152,107,160, 6,221,159,145,145,145,197,149, 29,236,212,169, 83,181, 93,189,131,198,
-215, 15, 12,193,210, 99, 69, 40,138,220, 3, 77,110,220,186, 46, 93,186, 28,124,223, 19, 97, 41, 48,105, 80, 19,127, 75,107,199,
-139,223, 46,249,205,234, 72,132, 0,217, 41, 49,136, 62, 52, 13, 6,237, 95,106,197,142, 87, 85, 95,202,106, 68, 69,121,233,208,
- 20, 26, 32, 97, 20,146,191,251,198, 37, 39, 39, 63,243,247,247,223,246,235,175,191,142,170, 87,175,158,108,252,248,241, 79, 11,
- 10, 10, 22,166,164,164,252, 94,238, 69,222,186,102,205,154, 83,230,207,159,239,249,242,229, 75, 92,190,124,249, 25,143,199,187,
-243, 46,205, 8,165, 50,169,174,185,120,237,213, 93, 27,191,225,185,121, 99,239,220,169,250,235,143,159,116,139, 44,212,159,120,
-101,174, 76, 68,190,161,254, 94, 71,191, 30, 59,138, 49,220, 59,137,232,196, 12,164, 22,235,206, 25,157,238, 66,133, 78, 32,150,
-194,196,193, 29, 9, 42, 86,232,226,226,114,123, 68,207,174, 66,134,199, 7,195, 23,226, 69,158,218,232,151,184, 94,175, 23, 63,
-121,242,132, 0,120,205,220,169, 84,170,119, 70,124, 62, 36,198,106,190,173,125, 20, 0,232,116,186,106,107,150,143,216, 84,118,
- 44,150,101,161, 86, 87,161,175,136, 58,239,237,247, 64,153,165,251, 16,151,173,244,175,232,125,204, 85,153,241, 41,107,128, 46,
- 22,139, 95,153, 20, 99,163, 76, 21, 68,176,170,245,251,219, 12,186, 80, 40,132,143,143, 15, 46, 95,190, 12, 11, 11, 11,152,152,
-152, 64, 46,151, 67, 34,145,192,194,194, 2, 34,145, 8, 12, 83,165, 33, 2,169, 86,171,173,225,226,226,130,103,207,158, 65, 34,
-145,188, 90,196, 98, 49,124,124,124,160, 80, 40,156,241, 81,197,234,255, 59, 12,237,211,182,251,250, 93, 7,134,236, 61,112,116,
-140, 90,165, 10,240,241,246,162, 81,143,239, 61, 28, 61,124, 80, 71,238,234,112,124, 80,131, 85, 65,161,210,192,194,198,249,194,
-180,239,127, 53,219,119,143, 65, 94,106, 52, 18, 78,126, 91,104,208, 42,114, 89, 86,231,150,251,252, 42, 0,108, 53,242, 75, 62,
-184, 73,235,238,204,197, 40, 13,180,133, 41, 40,136,216, 27, 47, 22,139,167,127,136, 19,113, 21, 37,249, 91, 90, 59, 94,156,190,
-248, 55,171, 3, 15,249,200, 73,137,193,243,227, 51,242, 13, 90, 69,235,240,240,240, 87,227,104,217,251,247,192,231,211,150, 99,
-243, 15, 19,141,214, 30, 44, 18,117,239,239,103,209,101,120,243, 20, 24,136, 1,131,158, 68,117,114,106, 78,186,167, 92,161,135,
-254,206,155, 23, 17, 17,241,189,151,151, 23,163,215,235, 63,215,106,181,115, 83, 82, 82,246,151,139, 92,181,115,115,115, 91,186,
- 96,193, 2,151,132,132, 4,209,141, 27, 55,114,238,223,191,207, 26, 12,134, 37, 21,105, 62,202, 87, 79, 13, 48, 21,242,188, 92,
-157,198, 62, 75, 74,234,246,184, 64,127,178,236,183, 0,185,200,191,121,125,223,107, 11,230,126,107,170,185,186, 31,197,169,137,
- 88, 29,158, 86,192, 26,116, 51,140,140,186, 89,185, 9, 41,153, 49,226, 51,182,176,176, 16, 50,145,144, 77,140,126,206, 27,210,
-182,133,225,135,105,147,153,180,180, 52, 40,138,139,249,206,206,206, 86,201,201,201, 57,149, 68, 8,230, 3,104, 93,175, 94, 61,
-180,111,223, 62,126,222,188,121, 81,229,205,199, 63,204, 96,189,245,235, 90,171,213,146,234,106,150,143, 96, 85,102,176,170, 28,
-193, 82, 23,188,221, 72, 41, 50,223,215, 96,189, 36,132,212, 40,251,247,135,184, 7, 42,149,202,174, 92,213, 32, 40,165,213, 14,
-103,149, 70,176,170,253,123,121, 24,134, 1,165, 20, 34,145, 8, 49, 49, 49,112,112,112,128, 94,175,135, 92, 46,135, 76, 38, 67,
-105, 68, 25, 34,145, 8,124, 62,191, 42,201,100, 69, 34,209,203,152,152, 24,111, 75, 75, 75, 24, 12,134,215, 76, 86, 92, 92, 28,
-228,114,121,114, 85, 35, 88, 13, 26, 52, 56, 37,149, 74,221,222, 92,111,107,107,107,254, 79,125,121,149,143, 92,245,233,211,135,
- 78,152, 48,161,202, 26,171,190,255,102, 7,128, 29, 19, 38, 76,216,182,107,227,241,160,160,160,160, 99,190,190,190, 4, 0,184,
- 30,131, 28, 31,196, 96,149, 21, 74,101,127,203,218, 51, 57, 11,147, 26, 88, 88, 59, 93,152,178, 96,131,217,174,187, 12,242, 83,
-163,144,114,118, 86, 62,171, 85,180,102, 24, 38, 53,241,250,175,251, 1, 40,238,221,187,119,201,214,191, 7, 8, 41,233,185,247,
-182,145,220, 75, 11,250,134, 62,181,107, 99, 95,132, 30,170,180,135, 96, 8,221,218,182,109, 91,197,251,158, 68, 96, 96,160,191,
-165,181,227,197,169,139,126,181,218,119,159,143,220, 18, 19,152,207,106, 21,173,147,181, 46,175, 13, 82,202, 18, 96,243, 15, 19,
-193, 26, 81, 12, 15, 39,196,146, 39,151,172, 29,210, 62,184,159, 91, 45, 23,176, 84, 7, 86, 72,209,107,170, 13, 63,230,158,226,
- 96,141,246,188,223,217, 34,118, 76,210,141,191,111,244,241,103,207,158, 45,112,112,112, 56,144,150,150,246,170,117,170,139,139,
- 75, 39,119,119,247, 69,243,231,207,119, 79, 74, 74, 50,189,127,255,126,193,254,253,251,227, 24,134,153,159,154,154, 90,233,215,
-253,227, 66,237,100,127, 19,209,198,136, 34,253,171, 49,116,234,200,133,245, 62, 27, 50,240, 70,219,129,159, 73,158,159,221, 1,
-171,184, 39, 88,121, 47,221,144, 92,168, 26, 24,165,160,105,198,152, 43,177, 88,188,127,245,254,253,207,234,214,173, 75,138,139,
-139,161,211,233,144,149,149,133, 31,119,238,139,164,148,194,210,210, 18,103,207,158,101,199,143, 31,191,223,217,217,185,207,187,
- 76, 86,185, 97, 26, 32, 20, 10,137, 84, 42,245,136,143,143,143,119,119,119, 87,189,205,164,136,197,226, 42, 27, 44,169, 84, 10,
-150,125,119, 16,160, 42,154,122,189,158, 24,179,190, 42,154,101,105, 43,107,220,254,230,250, 50,120, 60, 30, 88,150,173,240, 92,
-254,234,222,222, 17,193, 82,100,188,151,193,162,148,186,149,117,164,249,167, 21,132,165,145, 48, 0, 96,223, 53, 20, 67, 85, 34,
- 88,165,102, 15, 34,145, 8,151, 47, 95, 70,215,174, 93, 65, 41,133, 88, 44,134, 76, 38,131, 68, 34,193,181,107,215, 32, 18,137,
-192,227,241,170, 18,197,162,122,189,126,231, 47,191,252,242,237,226,197,139,165,101,199, 40, 51, 88, 63,253,244,147, 82,173, 86,
-239, 52,198, 96, 17,203, 58,253, 45, 44,173, 6,231,229,101,111,109,226, 99, 81, 97, 47,194,183,237, 83,218, 30,235,191, 78,217,
- 48, 13,148,210,238,111, 14,197, 80,182,205,132, 9, 19,240,230, 16, 14, 21, 13,211,224,228,228,100,185,113,227,198, 17, 44,203,
-214, 41, 93,245,102,111,193,178,251, 88,246,126, 42,235, 85,248, 90, 47, 66, 14,142, 42, 71,176, 24, 2, 56,242, 95,250, 90, 88,
-187, 92,152,180, 96,131,217,182, 91, 60,228,167, 62, 65,214,133,239,242,169, 94,217, 58, 60, 60,252,190, 93,221, 30, 8,105,218,
-186, 89,219, 79,250,192,254,200, 62,220,185,126, 30, 63,174,222,140,111,198,126, 81,225,135,146,157,157, 53,178,174,171,160,203,
-125, 6, 66,200,189,247, 61,129, 70,141, 26,121, 89, 88, 57, 92,156,178,240, 87,171,221,225,124,228,165,252,199, 4,206, 88,115,
-225,254, 87, 35,134,190,182,189,177,211,227, 12, 22,137,186,251,215,118,217, 52,160, 83, 83, 75,115,162,135, 62, 33, 10, 27, 63,
-235,135,240,174, 90, 52,237,111,142, 70,157, 77,225,217, 64,210,239,248,111, 57,109,156,154,147,225,127,103, 52,171,188,185,114,
-114,114,234,234,226,226, 50,239,216,177, 99,110,122,189,222,244,242,229,203,133,251,247,239,127,174,215,235, 87,165,166,166, 30,
- 51, 58, 58, 86,164,121,101,174, 2,204,133, 13,135,127, 62,244,234,248, 21,235, 37,145,225,119,176,116,231, 17,152,241,116,134,
-187,105,170,190, 17, 69,255,169, 62,172, 48,163,241,249, 11,118,239,222, 45,247,243,243, 35,217,217,217,175, 34, 45, 90,173, 22,
-249,249,249, 40, 44, 44,132, 90,173, 70, 64, 64, 0, 51,119,238, 92,249,119,223,125,183, 0,192, 24, 99,211,107,107,107, 11,161,
- 80, 8,173, 86,251,202,164,136, 68, 34, 88, 88, 88, 32, 63, 63, 31,103,206,156, 65,101,131, 83, 10,133,162, 84,134, 33,174, 38,
-166,166, 58,185, 92, 78,229,114,249, 95,182,169,170,102,169,201,201,236,212,169,147,237,252,249,243, 5,129,129,129,175,214,151,
- 85, 17, 86, 71,147, 82,170,104,223,190,189,108,213,170, 85,112,115,115,131, 70,163,121,205, 72, 49, 12, 3,161, 80,136,196,196,
- 68, 44, 92,184, 16,148, 82,227, 63,100, 84,185, 58, 4, 12,181,131, 50, 91, 7,101,182, 14,170, 44, 45,138, 51,116,208, 41, 12,
-255,180, 2,172, 58, 13,208,141,136,132,217,189,111, 4,171,172,186, 82, 44, 22, 35, 62, 62, 30,167, 78,157, 66,104,104, 40,204,
-204,204, 80, 92, 92,140, 43, 87,174, 32, 57, 57, 25, 98,177, 24, 60, 30,175, 74,141,220,107,212,168,241,195,237,219,183,187,142,
- 27, 55,174,206,151, 95,126, 41,245,245,245, 69, 92, 92, 28,150, 47, 95,174,122,244,232, 81,172,165,165,229,124,160,242,121,102,
-157, 93,107,140,223,184,243,168, 96,216,192, 78, 99,129, 98, 24,211,139,240,245,125,254, 55,141,221,223, 49, 76, 67,167,119,108,
- 94,126, 8,135,215,134,105, 40,207,193,131, 7, 61,156,157,157,125, 81,210, 51, 16,248,107,111,193,242,220, 9, 15, 15, 15, 6,
-215,139,144,227, 67, 24,172,210, 2,122, 98, 72,239,153,102, 91,111,242,145,155, 28,129,252, 43,115, 94,153, 43,160,164,225,187,
- 93,221, 30, 48,176, 20,173, 59,246, 46, 27, 20,244,205, 66, 38,160,252,184, 85, 2,137,105,128,158, 10, 1,168,160,207,123, 14,
-145, 72,116,191,170, 9,126, 83,147,101,217,201,141,123,207,180,218,126,135,143,252,148, 39,200,188, 56, 59,159,213, 42, 90, 39,
-106, 92,238,127, 53, 98,168, 81,141,218, 9, 33,109,203,198,244, 24, 44, 18,125, 39,224,145, 89,159,180,104, 40,108,214,160, 54,
-228, 25,241, 72, 75, 74,193,222, 39,153, 57,177,185,234,225,215,136, 22, 9,207,213, 27, 59,143,176,178,178,116, 16,160,203, 40,
-107,171,155, 71, 10, 14, 58,183,102,180, 84, 75, 23,167, 92,165,115,223,212,252, 80, 84,166,233,236,236,236,101,106,106,250,227,
-201,147, 39,109, 69, 34,145, 89,100,100,164,225,192,129, 3,137, 6,131,225,167,212,212,212, 61,213,209,244,151, 74, 93,234,120,
-123, 92, 26,255,243, 58, 73, 81,177, 2,197, 26, 45,156, 92,157, 13,151,238, 69,245,142, 40,210, 28, 50, 70,211,222,222,190,213,
-192,129, 3,235, 5, 6, 6, 50,229,205,149, 70,163, 65, 65, 65, 1, 10, 11, 11, 81, 80, 80,128,130,130, 2, 36, 39, 39,163,105,
-211,166,140,175,175,111,128,189,189,125,171,244,244,244, 11,111,106,150, 27,166,225, 91, 0,140, 76, 38,139,185,126,253,186,170,
-119,239,222,144, 74,165, 40, 46, 46,134,139,139, 11, 88,150,197,149, 43, 87, 16, 19, 19,147, 7, 96,119, 90, 90,218,217,138,210,
-169, 84, 42,106, 16, 66,120,102,166,166,109, 59,116,232, 48,112,248,240,225, 22,229,183,175,142, 38, 0,100,102,102,186, 95,190,
-124,249,187,238,221,187,143,237,216,177,163,108,198,140, 25, 2, 15, 15, 15,232,245,122, 82, 93,205,220,220, 92,243,123,247,238,
- 45,107,214,172,217, 87, 29, 59,118,228, 47, 90,180, 8,230,230,230, 48, 24, 12,144, 74,165, 40, 40, 40,192,252,249,243,113,245,
-234, 85, 61,165,116, 77,126,126,254,148,138, 52, 95, 27, 7,107,210,207,245, 43,202,135,239, 26, 7,235,239,200,243, 74,165,210,
-190,170, 81, 49, 99,210,121,239,222, 61,250,230,120, 88, 21, 69,176,222,166, 89, 22, 93,226,243,249, 72, 75, 75,195,209,163, 71,
- 95, 27, 3,171,108,121, 87, 21,225, 59,210, 73, 47, 94,188,104, 32,132,132,234,245,250,105, 19, 38, 76, 24,174, 80, 40, 92,228,
-114,121,138, 86,171,221,106, 97, 97, 81, 54, 14,150,176, 50, 77,145, 72, 34, 32, 12, 3,169, 68, 46, 85, 42, 51, 19,222,214,139,
-240,141,107,157, 32, 18,217, 91,151,237,243,191,186,239,111, 12,211,240,218, 80, 12,111,236,243,218, 16, 14,111, 14,211, 80, 94,
-179, 71,143, 30,113, 0,162, 41,165, 12, 33, 36,250,205,222,130,229,100,189,195,195,195,131,131,130,130, 46, 81, 74,101,111,246,
- 34,252, 59,242,252,199,172,249,175, 49, 88, 0, 36,215,194,159,130, 17,103,160,240,214,143,175,153,171, 87, 79, 58, 11,220,185,
-126, 30, 44, 11,180,104,223,179, 82, 51,163, 87, 23,199, 46,216,251,162,129, 65,163,132,190, 32, 33,166,227, 39,157, 51,222, 39,
-241,182, 1, 61,225, 42,164,242,171,247, 98,193,151,100, 35,239,230, 15,121,196,160,110, 29, 30, 30,254,160,218,153, 6,152,177,
-238,196,126, 33, 49,183,194,195, 9,195,144,146, 87,140, 19, 47,114,127,167, 10,245,152, 29,180,164, 42,208, 37,148, 92,217, 52,
- 51,109,109,243, 94,230,253,108,156, 5,248,249,155,173,144, 76,183, 22, 54,106,211,226,111,157,163,176,172,225,251,198,141, 27,
- 71, 7, 6, 6,154,124,253,245,215, 79,243,243,243, 95,107,248, 94, 85, 34,148,202, 36,127, 83,209,186, 11,191,254,252,141,212,
- 63, 4,251, 23,206, 48, 92,190, 23,221,227,113,161,230,168,177, 26, 98,177, 56,108,204,152, 49,194,226,226,226,191,152,171, 55,
- 13, 86, 65, 65, 1, 30, 62,124,136, 62,125,250,136,163,162,162,194, 0, 92,120, 71, 4,103,118,233,128,147,124, 27, 27,155,204,
-117,235,214,117,223,190,125,123,175,225,195,135,139,195,194,194, 16, 25, 25,137,219,183,111,171, 53, 26,205,159, 66,161,240, 80,
-124,124,188, 81,173,188, 41,165, 6, 0,167,220,221,221, 47,173, 91,183,174, 59,203,178,175,230,179,124, 15, 77, 29,128,217, 86,
- 86, 86,203,246,239,223,191,244,252,249,243, 3,135, 12, 25, 34,209,233,116,228, 61, 52,245, 0, 38,216,218,218,206, 58,126,252,
-248,214,211,167, 79,247, 24, 60,120, 48, 51,110,220, 56,172, 94,189, 26,127,252,241, 7,107, 48, 24, 14, 9, 4,130,161,153,153,
-153,149,118, 64,121,109, 28,172, 10,198,185,170,236,119, 35,184,251, 95,200,250,239,173,249,102, 36,172, 97,195,134,246,229,123,
-105,150,255,107,108, 4,139, 16,130,160,160,160,215,254, 95, 54, 36, 3,143,199,123,109,169, 74, 21, 33, 0, 11, 74, 41, 11, 96,
- 13,128,213,120,125, 20,119, 30,254, 51,210,187, 81, 56,187,186, 33, 57, 17,214, 89,197,170,188,138, 39,123,182,183,118,118,117,
-251, 59,202,181,188,185,115,231, 46,159, 51,103,206,242, 55,135, 98, 40,191,221,155, 67, 56,204,155, 55, 15,239, 26,166, 33, 37,
- 37, 37,119,238,220,185, 63, 0,128,175,175, 47, 41,173, 22, 12, 66,105,111,193,114,154,219, 80, 50, 85,142,236,203, 47,191, 28,
- 2,224,157,154, 28, 28, 85, 49, 88,223, 22,133,175,212, 1,176, 38,132,204, 72,214,186, 68,254,181, 16, 1,126, 92,189,249,181,
- 73,161, 43,130,199, 99,102,100, 28, 25,182,138, 2,185, 60,130, 25,239,155,120, 75, 11, 51, 24, 10, 13, 51,139,239,173, 98, 41,
-165, 22,132,144,233,119,239,222,141,124,111,103,110,110,133,194,249,163,241, 71, 68, 10, 77, 43,214,245,220,161,121, 61, 82, 83,
-218,230,170,191, 83,115,178,215,210, 73,112, 96, 66,107,107,114, 44,103,200, 63,226,134, 70, 68, 68, 44,242,242,242,226,173, 95,
-191,254,115,141, 70,243, 90,195,247,106,107, 22,106,166, 6,152, 10,121,190, 30,174, 99,163,226, 19,186, 63, 46, 52,174, 90,176,
- 28, 34,103,103,231,199, 10,133, 2,132, 16,168,213,234, 87,198,170,176,176, 16,249,249,249,175,254,175,213,106,145,153,153, 9,
- 15, 15, 15,148, 27, 51,233, 93, 38, 35,181,188, 71,176,180,180, 60,185,106,213,170,129,171, 86,173,106, 3,224,156, 82,169,220,
-157,155,155, 91,173,161, 63, 74,141,206, 94,169, 84,246, 35, 33,196, 89, 44,145,106,174, 94,189,122,226,125, 52,115,114,114, 10,
- 1,140,146, 74,165, 11,126,249,229,151, 85, 18,137, 36, 56, 35, 35,227,189, 52, 75,205, 83,111,107,107,107,167,109,219,182,237,
-219,180,105, 83, 99, 62,159,127,147, 16,210, 55, 47, 47,175,202,147, 61,147,215,191,222,171,252,187, 17,252,241, 95,200,246,239,
-173,105,236,240, 11,198,162,215,235,139,230,204,153,147,241,182,121, 7,203,204, 84,249,117, 90,173,214,168, 97, 78, 28, 28, 28,
-140, 30,139,172,162,161,119, 0,128, 33, 68, 9, 64,250,237,188,101,165, 31,204, 70, 79,246, 12, 2,162,249, 95,150,107,115,230,
-204,161,243,230,205, 35,132,144, 67, 40, 25,143,234,217,155,141,208,203,255, 54,111,222, 60,204,153, 51,135,206,157, 59,183, 82,
-205,168,168, 40, 74, 8, 57, 7, 32, 14, 64,124,121,221,242,235,203,246,169, 72,147,131,163, 82,131,197, 82, 32, 89,235,146, 8,
- 96, 88,249,117,127,125,193,225, 47,109,174, 42,242, 88, 29, 59,118, 60, 7,192,247, 67, 37, 62, 47, 55, 31,196,170, 97, 66,110,
-110,246,224,140,199,135, 62,136, 38, 11,252, 56,188, 81,216, 55, 0, 8, 5,126,126,211, 92,189,246, 21,116,133, 30,114,108, 74,
- 22, 55,106,211, 98, 98,233,203,103,209, 63,225,166,190,173,225,251,251,242,182,134,239, 85,120,217,156, 22,139,197,164,176,176,
- 16, 74,165,242,181,104, 85, 65, 65, 1, 20, 10, 5,138,138,138, 80, 54,181, 71, 81, 81, 17, 76, 76, 76,160,211,233,170,244,165,
- 88,106, 82,214, 5, 6, 6,110, 44,173, 38,121,111,148, 74,133, 11, 0, 4, 6, 6, 10, 62,156,166, 50, 5, 64,175, 15,169,153,
-157,157,157, 2,160,137,167,167,167,200,216,201,162, 43,138,100, 85,247,119, 35, 88,255, 95,200,242, 59,240, 15, 35, 33, 33,193,
-239, 67,107,166,164,164,196,124, 72,189,236,172,180, 13, 95, 13,235, 51,166,108,210,103, 99, 38,123, 46, 51,102, 57,217,105, 27,
-254, 87,215,178,108,154, 17, 0,212,217,217,121,219,203,151, 47,221, 8, 33, 9,111, 70,146,222,252,109,238,220,185,120,215,152,
-127,229, 53, 1,192,195,195,227, 96, 98, 98,162,147, 80, 40, 76, 45,175,251,230,250,138, 52, 57, 56,222,150,209,254,107, 11,128,
-128,255, 39,154,109, 57, 77, 78,147,211,228, 52, 57, 77, 78,147,211,252,251, 52, 63,182,133,225, 44, 38, 7, 7, 7, 7, 7, 7,
- 7,199,135,133, 0, 8,120, 71,100,235,177,209, 34,132, 4, 84, 35,114,246,248, 31,164,105, 87,129,230,217, 74, 52,219, 86, 35,
-157,156, 38,167,201,105,114,154,156, 38,167,249,175,212,172, 76,251,163,233,157,200, 85, 17,114, 97, 94, 78,147,211,228, 52, 57,
- 77, 78,147,211,228,170, 8,185, 42, 66, 14, 14, 14, 14, 14, 14, 14,142,127, 52,239, 28,166,161, 87,221,146,238,195,127, 62,226,
- 58, 76,112, 0, 60, 30,111,113,139, 22, 45,198, 92,189,122,245, 39,157, 78, 55,191, 58, 26,132, 16, 39,123,123,251,239, 41,165,
- 77, 8, 33, 98, 62,159,255, 36, 61, 61,125,145, 78,167,187, 82,221,116, 17, 66, 92, 29, 28, 28,190,103, 89,182, 49, 0, 33,159,
-207,143, 72, 73, 73, 89, 72, 41,189,249, 30,154,102, 14, 14, 14,173, 88,150,117, 41, 57,117, 94, 70,106,106,234, 21, 74,105, 50,
-151, 19, 56, 56, 56, 56, 56,170,109,176,122,215, 33, 96, 0,212, 9,131,227,188,145,132, 63,103, 3, 77, 44,123,241,160,100, 48,
- 54, 95, 0, 81, 0,238, 82, 74, 11,222, 39, 1,255, 95, 52,255,233, 16, 66, 24, 11, 11,139,246, 50,153,108,124, 81, 81, 81, 3,
- 51, 51,179,136,210,233,113,142,150, 14, 74,248, 62,218,118, 3, 7, 14,156,190,113,227, 70,244,235,215,111, 22, 33,100, 57,165,
-180,168, 42, 26,214,214,214,221, 60, 60, 60, 54,172, 90,181,218,182, 89,179,102, 68, 42,149, 34, 42, 42,202,121,204,152,209, 65,
- 78, 78, 78,123, 83, 82, 82,190,170,106,186,108,109,109,251,214,170, 85,107,213,154, 53,107,108,155, 52,105, 66, 4, 2, 1,194,
-195,195, 93,198,143, 31, 31,226,232,232,184, 53, 53, 53,117,114, 85, 53,173,172,172,252,106,214,172,217,113,237,218,181,178,166,
- 77,155, 66, 44, 22,227,225,195,135,166, 35, 71,142,116,118,114,114,122,152,146,146,114,166, 42,122,129, 35,239, 9,132, 50, 45,
- 31, 0,180, 10,161, 62,124, 67, 67,157,177,235,184,226,137,131,131,131,227, 35, 50, 88,125,235, 16, 16, 0,254,205, 48,159,232,
-241, 45, 24,144, 9, 3,201,239,171,127,103,110,183,109,219,214,231,139, 47,190, 32,165, 83, 71,248,237,217,179,167, 55,143,199,
-139,102, 89,246, 22,128, 7,206,206,206,218,178,105, 9,222,164,131, 23,121, 53, 70,214,153,231, 16, 2,168,207, 48, 76, 72,101,
-154,237,106, 65, 75, 8,112,234,217,219, 35,105,237, 61, 9, 64,129, 51, 47,170,166,121, 58,246,227,136,204,153,154,154,122,217,
-218,218, 78,182,182,182,238, 20, 20, 20, 84, 48,106,212,168,248,200,200,200,167, 62, 62, 62,170, 77,155, 54, 45,210,233,116,107,
-107,215,174,125,166,176,176,112,217,123,140,139,229,174,211,233, 16, 29, 29, 13,134, 97, 4, 0, 60, 0, 60,170,130, 65,115,116,
-119,119, 95,127,225,218, 61,187, 2, 13, 15,207, 50, 41, 0, 5, 88,161, 3,214,109,222,107, 57,123,218,216,129,102,102,102, 87,
- 11, 10, 10,246, 86, 65,211,181, 86,173, 90,171, 30, 63,126,108, 39,145, 72,192,178, 44, 10, 11, 11,225,228,228,132, 77,155, 54,
- 89,126,243,205, 55,159,203,100,178,203, 10,133,226, 72, 85,140,121,205,154, 53, 59, 70, 70, 70,202,196, 98, 49,209,235,245, 68,
-173, 86,195,213,213,149,238,218,181, 75, 50,110,220,184,250, 98,177,248,165, 90,173,126,106,148,185,250,245,158,160, 32,235, 66,
- 40, 77, 84,206, 2, 0, 34,145, 46, 12,155,103,117,187, 32,235, 66,163,202,214, 5,254,138, 27,225, 95,114, 38,139,227,127,139,
-163,163, 99,160,165,165,229,254,188,188,188, 75,169,169,169,195, 75,103, 54,120,223,143, 63, 39, 62,159,239, 65, 41,181, 40,253,
-127,158, 94,175,143, 51,102,206,205,119, 97,227,217,170, 43,196,178, 97,160,108,125, 6, 0, 97,152, 7, 6,173, 98, 75, 86,204,
-133, 35,239,165, 41,146,126, 14,208,250, 12,192, 18,134,121,200,234, 21,191,101, 70, 93, 56,193,229, 12,142, 15, 22,193,170, 19,
- 2, 75, 2, 76,155, 49,234, 75,134,207,227,145, 69, 27,126, 29,112,231,250, 17,234, 88,163,254,171, 41, 55,154, 55,111,142,230,
-205,155,147,165, 75,151,250,158, 63,127,222,119,215,174, 93,186,235,215,175,135, 3,216,250, 54, 77, 74,129,150, 29,165, 47,245,
- 58,165,107,211,118, 82,149,123,227,181,187,154, 52,105,206,138,197, 98, 84,164,121,230,250,245,240,118,181,222,174, 89, 34, 12,
-212,106,192, 63,227,220,208,149,132,117,153,157, 96,172,230,187,210,249,255,204, 92, 93, 50, 53, 53,245, 28, 57,114,228,179,209,
-163, 71, 95,150,203,229, 20, 0, 20, 10,133,184,107,215,174,185, 61,122,244,200, 86, 40, 20, 88,183,110,157,235,170, 85,171,206,
-152,153,153, 37, 23, 20, 20, 52,170, 74, 84, 12,192,156,110,221,186,205,250,250,235,175, 81,163, 70, 13,140, 27, 55, 14, 58,157,
- 46,156, 16, 50, 27,192, 18, 99, 6,221,179,179,179,155,179, 98,197, 10,187, 98,157, 0,223,109,143, 69, 78, 81,201,128,162, 50,
- 17,131,175,218, 74, 48,118,236, 56,243,219,183,111, 47,197, 27, 35, 72, 87,132,131,131,195,247,107,214,172,177,149, 72, 36,160,
-148,162,168,168, 8,133,133,133, 40, 42, 42, 66,113,113, 49, 70,143, 30,109, 30, 17, 17,177, 2,192,145, 42,104,182, 90,187,118,
-173, 76, 44, 22,227,204,153, 51,222,106,181,154,167,209,104, 96, 48, 24, 12,181,106,213,138,254,250,235,175,197,143, 31, 63,238,
- 0,192, 40,131,229,152, 6, 65,190, 82,185,230,151, 31,190,177, 5,128,175,167,253,184, 6, 80,134, 80, 35,214, 57,166, 33, 24,
- 0,103,176, 42,206,159, 60, 0, 61, 5, 2, 65, 47, 79, 79,207,160,103,207,158,221,215,235,245,127, 2,248,179,116,122,162,247,
-209,110,227,228,228,244,125, 74, 74,202, 47,148,210, 29,255,150,107,106,103,103,247,231,129, 3, 7, 92,183,111,223,254,217,111,
-191,253,118, 28,239, 49, 74, 62, 33, 68, 0, 32,180, 81,163, 70, 54,189,122,245, 18, 56, 56, 56, 64,161, 80, 32, 54, 54, 86,118,
-246,236, 89, 91,137, 68,146,173, 86,171,111, 84,229, 94,217,120, 55, 53, 1,223,108, 79,104,171,182,205,250,245,238,105,106,111,
-109, 14,165,198,128,103, 9,169, 53, 78, 30, 63,220,210, 41,224,147,235, 90,109,254,128,172,152,107, 69, 85,213,108,213,177, 75,
-179,182,109,218,152,154, 91,152, 35,191, 88,139,231,241,201,110, 23,206, 28,105,238, 24,240,201,101,150,232, 6,167, 63, 58,173,
-224,158, 58,142,170,240,151, 70,238,251, 34,233,219, 30, 20,200, 77,228,111, 21, 48, 55, 55, 71, 88, 88, 24, 22, 45, 90, 36, 0,
-208,248,117, 83,245,159, 97, 19, 24, 0, 6,131,198,113,214, 87, 99, 33,226, 83,241, 39,157, 58, 16, 51, 51, 51,163, 52,121,239,
-208, 4, 0,202, 8, 97,111,165,111, 27,226,173,108,153,254, 96,220,160, 7,151,190, 15,208,168,242, 4,111,106,202,100, 50,120,
-121,121, 97,230,204,153,111, 75,231, 7,239, 18,250,191,208,164,148, 58,249,249,249, 21,174, 88,177,194,123,238,220,185,150, 42,
-149, 74, 14,192,213,179, 78, 35, 23,134, 97, 92, 85, 42,149,217,156, 57,115,108,151, 46, 93,234,109,107,107,155, 71, 41,181,173,
- 98, 58, 23,172, 89,179,102,246,161, 67,135,152,230,205,155,195,210,210, 18,173, 90,181,194,241,227,199,249, 63,253,244,211, 34,
- 0,179,140, 73, 39,195, 48,205,155, 53,107, 70, 88,150, 34,183, 72,135, 11,139, 3,113,237,199, 96, 40, 52, 44,114,243, 10,160,
- 82,169, 32,147,201,164,132, 16, 19, 99,207,157,101,217,198, 77,154, 52, 33, 64,201,200,239, 37, 75, 49, 10, 11, 75,254,106, 52,
- 90, 8, 4, 2, 83, 66,136,184, 10,154, 46, 77,155, 54, 5, 0, 40,149, 74,126,155, 54,109, 72,235,214,173, 73, 97, 97, 33,191,
-108, 26, 31,129, 64, 32, 34,132,240,141,209,212,200, 4,132,165,172,189, 92, 38,181,145,203,164, 54, 44,101,237, 1,192,152,117,
- 26,153,128,252,157,249,147, 16, 98,203,227,241, 54,123,122,122, 62,225,241,120,219, 8, 33, 14,239,163, 73, 8, 9, 38,132, 44,
-146,201,100,103,253,252,252, 18,229,114,249,121, 66,200, 18, 66, 72,104,117, 52, 9, 33, 34,153, 76,118,126,209,162, 69,251,238,
-223,191,223,239,220,185,115, 30,143, 30, 61,234,189,116,233,210, 61, 38, 38, 38, 87, 8, 33,178,247,121, 54, 61, 60, 60, 54,221,
-186,117, 43,184, 73,147, 38, 27, 43,202, 67, 85,209, 36,132,240, 8, 33, 13, 72,217,252, 56,255,128, 50,164, 60, 46, 46, 46, 78,
-254,254,254,174, 98,177, 24,205,154, 53, 3,165, 52,236, 61, 53, 67, 71,141, 26,229, 48,105,210, 36,193,131, 7, 15,176,113,227,
- 70, 28, 58,116, 8, 25, 25, 25,232,210,165,139,176,117,235,214, 14, 98,177, 56,180, 74,154,124,179, 61,227, 39, 76,236,248,205,
-184, 17,166, 15, 95,106,177,229,236, 75, 28,188,145,138, 12,133, 8, 93,123, 15, 53,239,208,189,127, 7,145,216,124, 79, 85, 53,
-167, 79,155,214,241,203,207, 63, 53,141, 76,101,113,248,102, 26,110, 70,231, 67, 47,176, 64,231,222,195, 45,235, 55,237,248, 9,
- 31,130,173,255,132,123,244,177,107,254, 43, 34, 88,115, 54,210,220,249,163,201, 15,139,214,253, 58,139, 33,132,186,212,238, 16,
-233,225,213,184,152,101, 89, 40,149,202,178, 23, 13,148, 74, 37, 18, 18, 18,112,235,214, 45,152,155,155, 87,120,160,147,177, 20,
- 11,191,250,207,225,242,242,243,225,236,226, 1,153, 76, 86,169,230,137, 10,170,243,248,180, 36, 26, 50,162, 79, 15,254,203,212,
- 84,254,245,123, 23, 2,247,174,220, 21,232, 90,171, 93, 84,253,176,169,143, 77,204,107, 40, 31, 60,120,128, 27, 55,110, 32, 55,
- 55, 23,141, 26, 53,250,104,110, 30, 33, 68,183,108,217,178,123, 41, 41, 41,228,234,213,171,245,231,175,216,229,241,168,160, 38,
- 47,179,136, 10,108, 77, 94,122,248,201,158, 26,242,243,243,227, 38, 79,158,124,193,193,193, 65, 61,118,236,216,150, 70,234, 74,
- 0,248,244,233,211,103,250,152, 49, 99, 16, 27, 27,139, 17, 35, 70, 40,111,223,190,157,221,164, 73, 19,235,223,126,251, 77, 58,
-105,210, 36, 92,186,116,105, 14, 33,228, 0,128, 56, 74,233, 59,231, 82, 99, 89, 86, 36,149, 74,129,130,146, 15, 85,173,190,108,
-110, 90,160,184,184, 24,124,228, 65, 36, 18, 49, 0,108, 1, 24,251,229, 41, 20,139,197,175,204, 85, 82, 70, 33, 18, 50,138, 80,
- 88,164,134, 82,169,131, 70, 5,136,205,236,121, 64,162, 53, 0, 99, 27,167,243,196, 98, 49,244,122, 61,180, 90, 45, 84, 42, 21,
- 84, 42, 21,212,106, 53,242,243,243, 81, 88, 88, 8, 62,159, 47, 3, 96, 6, 32,167, 82, 49,145, 84,207, 99,132,139,190, 93,184,
-102, 46, 0,240, 24,225, 34, 19,168, 88, 99,214,241, 68, 82,253,223,152,175,196,182,182,182, 23,246,237,219,231,231,229,229,133,
-184,184, 56,223,190,125,251,134, 16, 66, 26, 80, 74, 21, 85,212,146, 49, 12,243,195,176, 97,195,198, 12, 28, 56,144,212,174, 93,
- 27,124, 62, 31,122,189,222, 37, 54, 54,182,213,239,191,255, 62,141,207,231,255,102, 48, 24, 38, 27,219,174,143, 16,194,136, 68,
-162,189, 27, 54,108,104, 17, 18, 18,130,109,219,182,225,246,237,219,108,112,112, 48, 51,100,200, 16,184,185,185,133, 12, 25, 50,
-228, 32, 33,164,115,117, 34, 89,132, 16,183, 65,131, 6,185,242,120, 60, 52,105,210, 68,120,253,250,245,134, 0,174,191,231, 53,
- 53,113,113,113,185, 20, 22, 22,214,224,236,217,179,247, 8, 33, 97, 85,105,199,232,228,228,212,221,222,222,126,169,169,169,169,
-165,177,251, 20, 21, 21, 41,210,211,211,167, 36, 39, 39, 27, 53, 31, 41,165,180,113, 64, 64, 0,146,147,147,225,233,233, 9,161,
- 80, 24,234,236,236, 60,146, 82,218,145,101,217,153, 85,105, 98, 64, 8,113, 10, 13, 13,181, 9, 11, 11, 35, 75,150, 44, 1, 0,
- 8, 4, 2, 24, 12, 6, 48, 12, 3,129, 64, 0, 95, 95, 95,242,226,197, 11, 43, 66,136,147, 49,213,133, 54,158,173,186, 54,105,
-211,177, 89,139,144,122,204, 79,251,159,193,192, 26,192, 35,122,240, 9, 11, 86, 39,134, 88,200, 67,109,255, 32, 94,116,196,195,
- 16, 27,239,118, 93,179, 98,206, 28, 49, 70,179, 99,215,110,205,253,124,106, 51, 43, 15, 62, 71, 94,242, 19, 67,114,212,229, 44,
-134,199,192, 47,176,181, 77,237, 58, 13,120, 13, 66,194, 4, 41,113, 17,173,172,188, 90,182,205,121,118,137, 51, 21, 28, 85, 55,
- 88,132, 16, 74, 41,125,245,101, 53,123, 29,157,109, 99, 73,220, 35, 31, 63,100, 18,211, 52,197, 15, 31, 62,132,181,181, 53,236,
-236,236, 96,102,102,134,232,232,104,156, 61,123, 22, 49, 49, 49,160,148,162, 65,131, 6, 85, 58,112,122, 90, 26,178,115, 10,223,
- 91,243, 68, 44,197,130,209, 37,201,174,225,232,136, 26,142,142,252,172,220, 60,220,120,248,200,239,200,111,109,125,210,153,145,
- 91,148, 74,229,171,237,117,186,143,175,214,197,222,222, 94,255,213, 87, 95,231,124,185, 54,174,214,128,214, 78,188,238,161, 14,
- 56,120, 61,149,183,231, 34,143,206,254,162, 94,230,179,103, 79,141, 62,105,145, 72,244,125,167, 78,157,190,161,148, 10,198,143,
- 31, 15, 0, 24, 58,116,104,193,205,155, 55,107, 83, 74, 51, 8, 33, 78, 95,124,241,197,211, 11, 23, 46,200, 38, 78,156,200,211,
-235,245,145,124, 62,159, 18, 66,230, 83, 74,231,190, 53,147,241,249,247, 31, 60,120,224, 14, 19, 55,216,152,242,208, 97,214, 61,
- 0,128,137, 24,200, 76, 75,194,173, 71, 23, 97,109,109,109,222,188,121,243, 40, 47, 47, 47,117,106,106,234,248,226,226,226,173,
- 21,102, 92, 62, 63, 34, 60, 60,220,197,197,197,165,196, 96,101, 41,177,229, 6, 3,133, 90, 10, 64, 10,194,202, 97,102,231,110,
- 90, 91, 91,240,192,214,214, 86,171,209,104,166, 23, 20, 20, 84, 88,213,195,227,241, 50, 30, 63,126,108,234,234,234, 10, 0,186,
-131, 7, 15,242, 53, 26, 13, 40,165,134, 99,199,142,117, 76, 76, 76,108,224,225,225,193,184,184,184, 76,247,242,242, 82, 38, 39,
- 39,143, 80, 42,149,239,172, 66, 57, 57,206, 83,219,114,238,197,181,121,113,137,191, 3,128,115,136, 95,206,209,185, 13, 53, 45,
-231, 22, 85,186,238,228, 56, 79, 45,198,254,109,237, 4,135,125,251,237,183,126, 86, 86, 86, 24, 53,106, 20,230,205,155,135,217,
-179,103,123,141, 26, 53,234, 75, 0,203,171,240,146,149, 58, 56, 56,220, 89,185,114,165,111,211,166, 77,113,252,248,113,236,222,
-189, 27, 47, 94,188,208,123,120,120,240, 67, 66, 66, 48,103,206, 28,116,232,208, 97,196,216,177, 99, 91, 18, 66, 26, 26,105, 58,
- 62,159, 51,103, 78,247,102,205,154,225,179,207, 62, 83, 95,188,120,177, 31,128,211,103,206,156,105,125,233,210,165,253, 59,119,
-238,148, 46, 90,180,168,237,164, 73,147, 70, 1, 88, 93,141,243,239,209,162, 69, 11, 0, 64,179,102,205,176,116,233,210, 14,239,
- 99,176, 8, 33, 34,107,107,235, 99,219,182,109,107,224,237,237,141,193,131, 7, 55,236,215,175,223, 49, 66, 72, 59, 74,169, 81,
-243, 70, 58, 58, 58,254,176, 97,195, 6, 79,169, 84,106,244,113, 53, 26,141,213,200,145, 35,151, 0, 48,202, 96,177, 44,219, 56,
- 32, 32, 0, 7, 15, 30,196,200,145, 35,225,231,231, 87,175, 65,131, 6,235, 7, 13, 26,132, 81,163, 70,181,177,181,181,181, 47,
-157, 92,188,242, 23, 11,159,239,209,165, 75, 23,193,159,127,254, 9, 0,104,209,162, 5,218,182,109,139,199,143, 31,227,234,213,
-171,224,241,120,144,203,229,104,218,180,169, 40, 37, 37,197, 3, 64,165, 6,139, 17,203,134,117,239,210,217,244,240,205, 84, 24,
- 88, 61,130, 60,205, 16,226,107,135,232,164, 2,132, 63, 73,130, 65, 35,132,153,149, 53, 66, 91,182,183, 74, 75,126, 49, 12,198,
- 52, 15, 16,203,134,245,234,254,137,201,225, 27, 41,200, 75,137,162,207,110, 31, 56,175, 83, 21,143, 0,128,187,231,246,172,119,
-176,150,182,171, 29, 24,196, 11,107,215,205,242,207,221,105,195, 0,112, 6,139,227,253, 34, 88,101,100,231, 65,105,237,224,135,
-196,180,251, 37,255,207,206, 70,118,118, 54,106,214,172,137, 85,171, 86,189,182,173, 74,165,170, 86, 2,254, 27,154, 54,150, 22,
-232,214,170, 37,239,113,244, 58,158,146, 85,126, 16,205,127, 42,165,147,150, 50, 9, 89, 58,139,204,124,173,176,127, 43, 87, 42,
-224, 49, 24,208,170, 6,249,229, 72,130, 48,163, 88, 96,193, 48, 76, 2,203, 86,222,145,144, 16, 34,232,222,189,251, 55,123,247,
-238, 21, 68, 69, 69,161, 86,173, 90,208,106,181,184,121,243,102, 18,165, 52,163,244,120, 41, 60, 30, 47,133,101, 89,175,250,245,
-235, 99,241,226,197,240,245,245, 37,157, 59,119,158, 86,106,178,254,114,160,148,148,148, 69, 95,127,253,117,139, 95,183,236,177,
- 30,220,152,160,176, 80, 13,133, 66,129,232,199,119, 80,156, 94,140,245,235, 55, 64, 38,147, 17, 0,194,180,180, 52,225,164, 73,
- 19, 55,186,184,184,116, 73, 74, 74,234,245,174,180,166,164,164, 44, 28, 59,118,108,200,246,237,219, 45, 75,218, 93, 41, 81,168,
- 20,227,214,207, 37, 17,202,144, 73,183,241,219,175, 27,153,186,238,114,235,194,194, 66,140, 24, 49, 98,165,163,163, 99,211,212,
-212,212,145,239,210, 76, 77, 77,189, 50, 98,196, 8,231,223,127,255, 93,226,229,229, 21,147,159,159,143,156,156, 28,102,231,206,
-157, 99, 29, 29, 29,205, 15, 30, 60, 68,228,114, 57, 0,240,226,227,227,133, 95,127,253,213, 94, 7, 7,135,157,105,105,105,159,
-189,235,222, 0, 80, 19,130, 84, 39,167,154,158,138, 27,204, 92, 39, 39,213,213,139,115,146,183, 19,130,212,146,109, 64, 29, 55,
- 56, 14,122,185, 77,220, 76,173,102, 87,164,165, 37,196, 80, 10,138, 57,127, 95, 39, 12, 27, 27,155,177,221,187,119,199,146, 37,
- 75,112,228,200,145, 73, 86, 86, 86, 63,207,155, 55, 15, 78, 78, 78, 95, 19, 66, 86, 84, 97,178,219, 31,151, 47, 95,238,235,235,
-235,139,161, 67,135,106,206,158, 61,251, 45,128,131, 0, 18,174, 92,185, 82, 99,235,214,173, 93,247,238,221,187,100,229,202,149,
-146,213,171, 87,123,246,238,221,123, 5,128, 47,140,248,160,152, 56,112,224, 64, 44, 91,182, 12, 23, 47, 94,236, 77, 41, 61, 94,
-246,189, 69, 8,233,186,104,209,162,115,179,102,205,194,242,229,203,199, 87,213, 96, 17, 66, 76,252,252,252,190,235,216,177, 35,
-174, 92,185,130,230,205,155, 35, 52, 52,116, 18, 33,100, 21,165, 52,171, 26,230,138, 49, 49, 49,217,187,101,203,150,230,238,238,
-238, 88,184,112, 33,190,249,230, 27,108,218,180,169,249,224,193,131,247, 18, 66,122, 25,211,203,215,196,196,196, 68, 42,149, 98,
-201,146, 37,244,229,203,151,185, 70, 24, 50,203,239,190,251,142,152, 87, 86,181,240,159, 8,153, 84, 44, 22, 55,241,241,241,193,
- 79, 63,253,132, 43, 87,174, 96,220,184,113,240,241,241, 65, 82, 82, 18,186,117,235, 38,123,250,244,105, 31, 0, 91,140, 44,151,
-204,173,173,173,145,145,145, 1,129, 64,128,166, 77,155,226,224,193,131, 80,171,213,176,179,179, 67, 94, 94,222,171,218, 4, 62,
-159,111,110,100,105, 23, 96, 99,101,142,140,136,100,240,161, 71, 96,109, 27, 92,120,156, 13,173,142,133,157,181, 5,210, 50,210,
-209, 56,192, 5, 26, 77, 13, 80,202, 26, 53, 19,136,136,199, 4,138, 37, 82,228, 20,102, 33,249,201,197,108,173, 65, 61, 50,239,
-197,213, 68, 0,176,170,213, 98,228,221,171,103,238,246,253,164,133, 93, 81,177, 43, 8,101, 27,129,131,163, 10, 84, 58,208,232,
-219, 94,204,229, 35, 66,101,104,181,218,247, 74,200,127, 67,243,109,252, 55, 52,255, 1, 38,139,117,182,228,231,203, 37,140,254,
- 76,120,134, 65,167, 55,224,212,221, 52,131, 76, 76,244,150, 98, 77, 1,203,178,148, 16, 66,141,208,209,157, 58,117,106,219,184,
-113,227,240,243,207, 63,227,233,211,167, 16, 10,133, 8, 8, 8,112, 44,107, 31, 69, 8, 49, 15, 12, 12,180, 99, 24, 6,209,209,
-209,248,233,167,159,240,249,231,159,211,235,215,175,111,122,215,139,130, 82,122, 63, 53, 53,117,195,148,241, 35,243, 24, 69, 34,
-228, 52, 11,218,156,167, 96,149,153,248,118,206, 34,196,101,179,184,247,162, 16,247, 94, 20, 34, 75, 35,199, 79,191,108,230,249,
-251,251,119, 21, 8, 4, 29, 42, 72,235,205,212,212,212,109, 19, 39, 78,204,203,200,200,120,101,156,181,122, 22, 90,253,235,201,
- 48, 53, 53,197,250,245,235, 45, 92, 93, 93,251, 8, 4,130, 86, 21,104, 38,167,164,164, 60, 26, 51,102,140, 58, 53, 53, 21,249,
-249,249, 56,125,250,116, 59, 23, 23, 23,243,185,139,150,147,184,108,250, 42,157, 69,196, 26,155,119,254,201,171, 93,187,246,167,
- 2,129, 32,180,226,151,151,179,167,159, 95,173,125, 55,111,222,252,204,211,211,115, 76,153,177,162, 20, 20, 0, 60, 60, 60, 70,
-133,135,135,127,222,160, 65,157,125,246,246, 14, 62,127,103, 94, 34,132,180,234,223,191,191, 15,203,178,216,183,111,223, 35, 74,
-233,242, 3, 7, 14,220, 81,171,213, 24, 48, 96,128, 7,128,142, 70,234, 4,127,250,233,167, 99,154, 55,111,142, 9, 19, 38,104,
-207,158, 61, 27, 72, 41,253,153, 82, 26, 79, 75, 72,160,148,174,186,116,233, 82,253,177, 99,199,170, 27, 53,106,132,207, 62,251,
-236,115, 66, 72,243, 74,116,155, 12, 28, 56,208,151,101, 89,236,217,179,231, 97, 57,115, 85,118, 15,207,239,223,191,255,166, 70,
-163,193,160, 65,131,106, 18, 66, 90, 87,225,220,133, 98,177,120,223,130, 5, 11, 44,146,147,147, 49,100,200, 16,117,116,116, 52,
-230,206,157, 43, 53, 55, 55, 63, 94, 81, 27,193,119, 6, 72,196,226, 95,215,173, 91,215,189,110,221,186, 24, 61,122,180,102,237,
-218,181,227,198,140, 25,163, 9, 12, 12,196,154, 53,107,186,139, 68,162, 95,171, 20,249, 79, 79,207,187,120,241,162,117,101, 75,
- 90, 90, 90,186,145,209,111,153,151,151,215,141,218,181,107, 23,248,249,249, 5,233,245,122, 60,125,250,244,249, 31,127,252,193,
-250,248,248, 96,235,214,173, 88,191,126, 61,218,180,105, 3,134, 97,250, 84, 37,173,197,197,197,144, 72, 36, 16, 10,133, 8, 15,
- 15,135, 90,173,134, 76, 38,131, 68, 34, 1,143,199,131,133,133, 5, 76, 77, 77, 1,128, 26,119,127, 64, 11, 20, 58, 8, 4, 12,
-248, 12,139,168,132,124,104,117, 44, 36, 66, 30, 4,124, 2, 80, 22, 22,114, 1, 36, 34, 30, 24, 66, 88, 35, 53,145, 95,172,133,
- 72,200, 64, 32, 20, 17, 70,111,120, 21, 34,100,248, 6,169, 84, 42, 34, 54,102, 98, 72,132,220,152,220, 28, 31, 56,130, 5, 0,
- 6,195, 95,123,233,190, 45, 10,164,209,104,222, 43, 33,255, 13,205,119,132,205, 63,170, 27, 88, 80, 80,192,191,113,227,134,169,
- 80, 40, 20,119,111, 16,146,181,244,247,167,182,243,118,198, 64,204, 7,233,228, 79,211, 79, 28, 63, 34, 42, 44, 44,180,241,241,
-241,201, 54,242, 62,140, 32,132, 44, 4, 80,135,207,231, 31,221,178,101, 11,217,177, 99,135,229,192,129, 3, 99, 9, 33,201,254,
-254,254,110, 91,182,108, 49, 3,128, 85,171, 86,209,189,123,247,118, 0, 16, 65, 41, 77,171, 72, 55, 53, 53,117,150, 88, 44,190,
- 30, 29, 29,189, 74, 32, 16, 88,152,153,153, 89, 94,186,116,137,164,231,107,241,221,246, 23,175,122, 22,202,197, 60,204,232,101,
-135, 97,195, 62,231, 71, 70, 70,254, 8,224,212,187, 52,147,147,147, 39,201,100,178, 75,143, 30, 61, 90,110,234, 92,207,202, 38,
-116,146, 89,235, 25, 37,213,143, 14,150, 34, 48,165,101, 98, 94, 94, 30,178,178,178, 48,105,210, 36,139,201,147, 39, 79, 5,112,
-161,130,116,158, 22,139,197, 9, 17, 17, 17,237,249,124,190,216,196,196,164,193,141, 27, 55,200,203, 60, 29,102,108,125,142, 66,
- 85, 73,109,171,169, 68,128,121, 3, 93, 48,118,236, 88,126,108,108,236, 15, 0,154,189, 77,207,217,217,217,203,207,207,111,223,
-174, 93,187,252, 86,172, 88,145,243,236,217,179, 98, 39, 39,167,121,111,108,166, 94,188,120,113,246,246,237,219,189,135, 12, 25,
-178,207,193,193,161,223,123, 12,169,241, 94,152,153,153, 45, 25, 57,114, 36,246,238,221,139,220,220,220, 21,165,121,108,249,174,
- 93,187,246,140, 24, 49, 2,219,183,111, 95, 66, 8, 57,105, 68, 20,171,211,128, 1, 3,112,226,196, 9,156, 59,119,238, 59, 74,
-105,228, 59, 76,237, 83, 66,200,180, 67,135, 14,173, 28, 56,112, 32, 54,111,222,220, 17, 64, 69, 3,207,182,235,208,161, 3,142,
- 31, 63,142,236,236,236, 53,111,219, 32, 47, 47,111,237,225,195,135, 27,119,232,208, 1,139, 23, 47,110, 7,224,188, 17,230,202,
-215,220,220,124,203,202,149, 43,131,235,214,173,139, 79, 63,253, 84,165,213,106, 59,126,243,205, 55, 71,118,239,222,109,186,109,
-219,182,160, 47,191,252,242, 22, 33,100,184,177,131,216,242,120,188, 69,171, 87,175,254, 34, 44, 44, 12,147, 38, 77,210,159, 58,
-117,170, 27,165,244, 52, 33, 36,118,234,212,169,199,126,250,233, 39,222,178,101,203,190,224,241,120,153, 6,131,225,219,191,229,
- 11,155, 97, 22,204,159, 63,191,113,139, 22, 45,144,144,144,128,123,247,238, 65,175,215,111,191,123,247,238,229, 22, 45, 90, 44,
-208,106,181, 71, 36, 18,201, 80, 19, 19, 19,127,127,127,255,214,246,246,246,178,244,244,116,133, 17,215, 51, 47, 54, 54, 86,110,
-103,103, 7,129, 64,128,135, 15, 31,194,206,174,100,202,215,140,140, 12, 4, 4, 4,128,199,227, 33, 47, 47, 15, 0,242,141, 51,
- 67,204,163,216,248,148,154, 86,166,114,192, 32,193,253,232, 36,216,218, 88,194, 64, 24,164,165,165,162,129,143, 11, 8, 33,200,
-203, 78, 3, 33,196,168,185,116, 13,148, 13,127,153,146,225,108,109, 42, 70,221,198,237,173,111,156,204,220, 97, 94,171,217,151,
-124, 30,225,137, 37,102, 27,190,248,236, 51, 27,150,165,200,203, 78, 7,159, 97,110,115,150,129,227,131, 26, 44,150,101, 33,149,
- 74, 95,139, 48,189, 25, 5,146, 74,165, 80,171,213, 85, 58,176, 84, 42,133, 86,143, 15,170,105,204, 49, 63,180,230,223,137, 94,
-175, 55,157, 60,121,114, 72, 72, 72, 72,114,155, 54,109,226,188,189,173, 18,187, 52,150,218,172,220,116,160, 65,231,150,117,239,
-229,229,100,100,189, 48, 51, 83,199,199,199,219,253,246,219,111, 33, 58,157, 78,102,100, 68,236, 37,128,151,132,144,181, 29, 59,
-118,252,170,111,223,190,136,140,140,180, 83, 40, 20,118, 50, 89,137,196,142, 29, 59,176,119,239,222,159, 41,165, 70, 15,188,169,
- 86,171, 79, 2,240, 36,132, 88,212,168, 81, 35,221,202,202, 74,152, 90, 84,252,170,103,161,144,207,160,233, 55,119,144,155, 87,
- 0, 27, 27, 27,152,154,154,122, 84,166, 89, 58,206,213, 17,175,118, 83,235, 41, 31,109,184,184,117,203, 22,115, 0,224, 49, 4,
-182,230, 66,228,229,229, 33, 51, 51, 19, 89, 89, 89, 96, 24, 6,122,189,222,207,136,116, 62, 5,240,148, 16,226,212,186,117,235,
- 5,166,166,166, 96,115,138,145, 91,164,125,173, 10,178,168, 72, 1,119,119,119,152,154,154,190,181, 58,194,202,202,202, 84, 44,
- 22,111,221,184,113,163,175,169,169, 41,111,196,136, 17, 22, 35, 70,140,104,246, 46, 51, 38,147,201,120,155, 55,111,174,221,160,
- 65,131, 45,238,238,238,237,226,227,227,243,255, 87,121,169,116,200,131, 81, 83,166, 76, 9,146, 72, 36,248,229,151, 95, 94, 0,
-216, 89,250,243,190,181,107,215,206, 30, 56,112,160,207,184,113,227,252,103,205,154, 53,169,180,170,240,157, 99, 36, 9,133,194,
- 64, 63, 63, 63, 28, 56,112, 0, 0, 14, 84,114,248,253,215,175, 95, 95,217,165, 75, 23, 72, 36,146,224, 74,182,245,112,117,117,
-197,161, 67,135, 0,224,254, 59,182,185, 31, 29, 29,141, 94,189,122,129, 16,226, 97,196,185,119,111,223,190,253,254,197,139, 23,
-243, 77, 77, 77,241,197, 23, 95,104,110,221,186,213,153, 82,122,153, 16,210,106,208,160, 65,151,118,238,220, 41,191,116,233,146,
-239,247,223,127,127,157,199,227, 45, 50, 24, 12,179, 42,209,252,124,225,194,133, 51,122,244,232,129,121,243,230,209,223,127,255,
-253, 83, 74,233,233,210,231,235, 20, 33,100,136,165,165,229,206,153, 51,103,146,252,252,252, 25,132,144, 36, 74,233,186, 10,242,
-121,190,193, 96,112, 80, 40, 20, 70,125, 33, 26,187,189,181,181,117,167, 22, 45, 90,224,199, 31,127,196,184,113,227,176,117,235,
- 86, 10,224,104,106,106,234, 67, 0, 45, 74, 34,176, 78,166,225,225,225,254,205,155, 55, 23, 62,122,244,232, 19, 0,191, 27, 81,
- 54,197, 95,184,112,193,174,115,231,206, 66,153, 76, 6,131,193,128,236,236,108,168, 84, 42, 4, 4, 4,160,113,227,198,200,200,
-200,192,209,163, 71,181,121,121,121,241, 70,149,119,154,226,109,103,142,253,217,170,235,128,145,230, 82, 33, 15, 6,157, 8,233,
-233,153, 40, 52,232, 17,232,231,134,230, 13,106, 32, 33, 93,137, 83, 71,255,204, 45, 44, 84,108, 51, 70, 83,167, 86,108, 57,123,
-242, 72,203,230,157, 6,153,203,125,252,225,225, 56,174,193,221,235,103,207, 72, 68, 2, 50,104, 96, 63,139,166, 13,189,240,240,
- 69, 1, 78, 28, 61,144,155, 95, 80,176, 5, 28, 28,213, 49, 88,229, 27,184,151, 35, 99,210,164, 73,118,147, 39, 79,134,153,153,
- 25,178,179,179,161,211,233, 94, 69,155,196, 98, 49, 44, 44, 44,144,157,157,141, 61,123,246, 0, 64, 70,197, 95,116,162,212,133,
-107, 86,187, 18,158, 92, 35,150,202,168,149,236,253, 53, 1, 64,163,227,103,172,219,243,135, 85,167, 22,161,252, 26,142,142,111,
- 11,211, 87, 89,243,255, 3, 90,173,246,116, 92, 92, 92,240,128, 1, 3, 50, 93, 93, 93,149, 42,149, 10, 74,165,178,240,232,238,
-149,181,156,205, 70,191, 96, 24,134,154,154,154,178,118,118,118,249,231,206,157,179,211,235,245, 23,171,120,136, 73,253,250,245,
- 99,206,158, 61, 59,106,204,152, 49,196,203,203, 11,225,225,225,248,229,151, 95,232,182,109,219, 86, 2,152, 94,205,164, 23,169,
-213,234,215, 34, 32,229,123, 22, 22, 21, 21, 65,163, 76,135,174, 10, 61, 18, 98,207,254, 24, 93,179,102, 77,157,191,219,127,134,
- 19,201,205,205, 69,102, 86,214, 43,131,149,153,153, 9, 0, 85, 9, 97, 22,252, 53,157,255,169,121, 40, 46, 46,134, 74,145, 6,
-131,193,240, 86,205,156,156,156, 66, 39, 39,167,213,171, 86,173,250,105,193,130, 5,118,203,151, 47,207,137,138,138, 42, 96, 24,
- 70,245,198, 71,140,196,211,211,211,116,217,178,101,246,171, 86,173,202, 97, 89,118,245,255,216, 92,245,168, 91,183,238,214, 78,
-157, 58,153,142, 25, 51, 6,171, 86,173, 66,106,106,234,116, 74,169,190,180,108, 96, 9, 33, 83,215,172, 89,115,116,218,180,105,
-208,106,181,203,142, 31, 63, 62,143, 16, 50,138, 82,186,243,109,154,182,182,182, 46,124, 62, 31,247,238,221, 43,160,148, 62,175,
-196,208,167,121,123,123,167, 19, 66,236, 29, 29, 29,107, 85,180,173,149,149,149,167,169,169, 41,146,147,147, 1, 32,238, 29,155,
-197,167,164,164, 80,145, 72, 68,156,156,156,188, 42, 59,127, 75, 75,203,169, 27, 55,110,228, 95,184,112, 1,115,230,204, 73, 74,
- 72, 72, 24, 68, 41,189, 82,154,182,123,132,144,230,173, 90,181,218, 61,109,218, 52,239, 31,126,248,129, 68, 71, 71,143,198, 59,
-134, 40, 41,195,205,205,109,212,231,159,127,142,213,171, 87, 99,195,134, 13,163, 41,165,251,222, 56,231,221,132, 16, 75,107,107,
-235,213, 35, 71,142,196,150, 45, 91, 6, 1, 88, 87, 65,180,118, 90,255,254,253,103,231,228,228, 44, 50,230,158, 26,179,189,179,
-179,115,171,214,173, 91,123,170, 84, 42,236,219,183,239,249,254,253,251,115, 13, 6,195,158, 82,115, 85, 62,127, 28, 60,121,242,
-228,236,169, 83,167,226,194,133, 11, 91,156,156,156,120, 41, 41, 41,187, 43,185,167, 41, 18,137, 36,235,225,195,135, 14,190,190,
-190,140,163,163, 35, 26, 53,106, 4, 11, 11, 11,240,120, 60,100,100,100,224,242,229,203,108,108,108,108,150,177, 3,142,102,197,
- 92, 56,226, 80,183,243,181,123,183, 46,183,247,111,216, 84,224,108, 99,133, 80,127,103, 88,152, 8, 65, 0, 36,100, 40,113,254,
-252, 25, 93, 92,220,243, 27,198,244, 32, 44,211,116,170,247,201,117, 11,187, 26,237,235, 52,104,202,175,229, 83, 27,237, 91,212,
-183,180,148, 11,193, 82,138,135, 47,242,113,230,244, 73, 93, 74, 82,226, 5,174, 7, 33,199,135,142, 96,205,221,176, 97, 67,211,
- 77,155, 54,117,153, 52,105,146,233,208,161, 67, 33,149, 74, 81, 92, 92, 12, 87, 87, 87,232,245,122, 28, 63,126, 28,247,238,221,
- 43,100, 89,246, 40,128,107,111, 60,152, 1,229,199,173,154,177, 74, 81,163,100,240,202,226,166,243, 54,212,251, 32,154, 0,112,
-253,133,222,217, 41, 53,107,110,118,238,241,137,110,206,142,194, 14,205, 26,243,109, 44, 75,122, 51, 27,169,217,246, 67,143,233,
-241,191,208,212,235,245, 95, 16, 66,252,167, 78,157,186,212,217,217,217,105,222,188,121, 47,235,212,169,163, 44, 40, 40,160, 26,
-141,134,205,202,202,146,237,219,183,207, 35, 59, 59,187, 80,167,211, 13,161,148, 62,172, 74, 58, 41,165, 90, 0, 99, 8, 33,135,
-243,243,243, 79,125,243,205, 55,248,254,251,239,113,228,200,145,230,148,210,107,213, 61,119, 74,169,222,195,195, 35,239,254,253,
-251,246, 34,235,218,176,183, 16,162,227,119, 37,193, 8, 83, 49,129,178,184, 16, 81,143, 31,162,160,160,224,110, 21, 52, 53,206,
-206,206,249,233,233,233, 54,246,246,246, 37,230, 42, 51,243,149,185,202,201,201, 65,118,118, 54, 45,127,239,141,208, 44,246,244,
-244, 84, 68, 69, 69,137,120, 50, 87, 56, 88,138, 81, 82, 5, 73, 97,107,202, 71,113,113, 33,158,220,188,129,252,252,252,139,239,
-210, 76, 73, 73,217,227,228,228, 4, 0, 63,205,158, 61,219,166, 99,199,142,207,110,223,190,221,178,252,113, 2, 3, 3, 15,206,
-155, 55,239,147,239,191,255, 62,107,235,214,173,211, 82, 83, 83,119,252, 47,243,146,181,181,245,228, 99,199,142,153,106,181, 90,
-172, 90,181, 10, 63,255,252,243, 38, 74,233, 31,111, 92,139, 99, 60, 30,111, 13,195, 48, 95,125,253,245,215, 24, 57,114,164, 44,
- 40, 40,104, 82,185, 40,215,107,154,201,201,201,179, 2, 3, 3,103,103,100,100, 24,101, 8,158, 62,125,250,101, 96, 96,224,172,
-140,140,140,165, 21,157,187, 92, 46,151, 27, 12, 6,196,197,197,229, 82, 74,243,223,113,223, 84,181,107,215, 78, 54, 24, 12, 46,
- 50,153,204,170,178,252,153,155,155,187, 40, 40, 40,104,110,122,122,250,105, 0, 11,223, 28,114,132, 82,250,128, 16,226, 63,126,
-252,248,177, 75,150, 44,233,149,150,150,182,167, 50,205,132,132,132, 69,173, 90,181,250, 46, 38, 38,102, 43,165,116,195, 59,210,
-249, 11, 33, 68,187, 99,199,142,209,113,113,113,139, 43,210, 76, 73, 73, 57, 10,224,168,177,247,247, 93,219,151,215,100, 24,102,
-234,140, 25, 51,152,157, 59,119, 2,192,178,164,164,164, 13,239, 48,107, 15,157,157,157,183, 5, 5, 5, 13, 93,183,110,157,164,
- 77,155, 54, 35, 1,236,174, 44,127,170,213,234,155,215,175, 95,111, 28, 31, 31,111,211,170, 85, 43, 33, 0, 20, 20, 20, 32, 47,
- 47, 15, 71,143, 30,213,198,198,198,102, 21, 23, 23,223,172, 74, 25,162,215, 20, 12,188,126,254,208,238,248,167,143, 67,195, 58,
-118,183,212,104, 93, 32,206,230, 33, 47, 59, 13, 39,143,254,153, 27, 23,247,252,134, 66,145, 55,176, 42,154, 90,117,254,128, 27,
- 23, 14,239, 73,138,139,106,220,162, 85,103, 75,149,198, 13, 98, 33,131,236,244,100,156, 60,118, 40, 39, 46,238,197, 21,149, 78,
-253,217,223, 85,206,255,155, 52, 63, 58,104, 89,107,219, 10, 22, 0, 34, 0,159,152,154,154,174,154, 51,103,206,134, 91,183,110,
-109,232,210,165,203, 6,145, 72,180, 10,192, 39, 0, 68,239,216, 47,224,127,169,217,177, 17, 76, 63,239,198,108, 94, 48,154,175,
- 61,184,220, 71, 55,127, 20,168,145,154,109,141,185, 14, 85, 89,254,215,154, 0,154, 9, 4,130, 27,117,235,214,189, 96,106,106,
-154,233,238,238,126, 69, 32, 16,220, 6,208,226,125,211, 9,192,166,127,255,254,108, 97, 97, 33,237,215,175, 31, 5, 96,254,190,
-154, 98,177,184,117, 88, 88,152,238,101,106, 46,189,242, 32,145, 30,189, 20, 73,119, 29,185, 65, 55,236, 62, 69,151,175,217, 76,
-235,213,171,167, 1,224, 86, 21, 77,145, 72,212, 49, 44, 44, 44, 47, 43, 43,139, 70, 71, 71,211,203,151, 47,211,253,251,247,211,
- 13, 27, 54,208,181,107,215, 82, 39, 39,167,108, 0, 78, 85,209,148, 74,165,221, 59,118,236,168, 79,206, 44,162, 55, 35,211,232,
-217, 91,207,233,193,115, 15,233,158,163, 55,232,166, 29,127, 80, 95, 95, 95, 21, 0,251,202, 52, 29, 29, 29,251,247,235,215,239,
-153,183,183,247,250, 55,127,243,242,242, 90,211,175, 95,191, 4, 39, 39,167, 33,127, 71, 94, 2,208,209,217,217, 57, 90, 40, 20,
- 30, 3, 48,164,146,253, 6,240,249,252, 35, 14, 14, 14,119, 0,244,252, 95,231,121, 0, 93,236,236,236,110, 2,232, 86,201,126,
-101,219,245,248, 24,159,247, 15,161,233,228,228,212,218,213,213,245,178,147,147,211,204,202,246,243,243,243, 19, 58, 56, 56, 44,
-112,118,118, 62,238,232,232,216,166, 42,233, 4,224,100, 98, 98,210,204,196,196,164,171,137,137, 73, 87, 11, 11,139,102,229,159,
-195,234,156,187,117,237,182, 93,107, 52,236,118,208,181,254, 39, 9, 53, 26,116, 73,240, 8,236,126,208,186,118,219,174,239,171,
-233, 22,216,253, 80,141, 6, 93, 94,214,104,208, 53,190,102,112,247,131, 54, 62,109, 59,125,108,247,253,159,172,249,177, 45, 70,
-111,216,167,164,229,138, 9,128, 1, 12,195,252, 2, 96, 0, 0,147, 74,110, 64,128, 17, 55,233,131,107,118,108, 9,231, 49,125,
-120,199,167,127, 38,200, 52, 82,243,163,201,208, 0,186,243,249,252,235, 0,186,127,200,116,154,153,153,109,236,219,183,175, 65,
- 32, 16,172,254, 80,154,214,214,214, 63,133,134,134,106, 87,174, 92, 73, 15, 28, 56, 64, 55,108,216, 64,199,142, 29, 75, 3, 2,
- 2,212, 86, 86, 86,159, 85, 71,211,193,193, 97, 97,221,186,117,115,118,236,216, 65,247,236,217, 67, 87,175, 94, 77,231,206,157,
-203,214,168, 81, 35,211,202,202,170, 91,117, 52,237,236,236,126,109,214,172,153,246,215, 95,127,165,103,206,156,161,187,118,237,
-162,147, 39, 79,166,126,126,126, 42,185, 92,222,219, 88,205, 90,181,106,137,222,245, 91,195,134, 13, 5, 92,129,203,105,114,154,
-156, 38,103,176, 62,158,133,111,108,164,107, 95, 36, 69,239, 58,164,136, 0,123,254,120,194,238,239,229, 7,253, 31,145,239, 63,
- 86, 79,205,154, 53,139, 8, 33,123,158, 63,127,190,223,205,205, 77, 31, 31, 31,255,222,154, 39, 46,210,228,246, 30,164,243,153,
-120, 3, 31,128,222,248, 97,123, 62,138,136,228, 33, 0,135, 62,180,110,126,126,254,112, 66,200, 56, 74,169,242, 67,105,102,101,
-101, 77, 38,132,236,120,254,252,249, 50,185, 92,222,192, 96, 48,232, 84, 42,213,213,204,204,204, 73,148,210,196,234,104,166,166,
-166,206, 34,132, 28,152, 62,125,250,116, 0,245, 8, 33, 26,157, 78,119, 61, 35, 35, 99, 62,165, 52,181, 58,154,233,233,233, 95,
- 10,133,194,205,177,177,177,139,165, 82,105, 61,150,101, 53, 10,133,226, 98, 86, 86,214, 68, 74,105,186,177, 58,177,177,177,239,
-108,255, 21, 30, 30,206,205, 59,200,193,193,193,241, 47,106,131,245, 26,127, 68, 82,244,170, 75,208, 51, 0,250, 63, 30,125, 24,
-211,242,252,249,171,246,175, 31,116,106,144,211,113,244,131,107,114,213,201, 31,206, 92,149,211,124, 8,160,205, 7,214,188, 15,
-160,239,135,212,212,106,181,183, 0,132,113,185,128,131,131,131,131,227,131, 27, 44, 0,248,243, 17,229,174, 26, 7, 7, 7, 7,
- 7, 7, 7, 71, 5, 16, 0, 1,239,136, 2, 60, 54, 90,132,144,128,170, 30,184, 50,253,255,177,166, 93, 5,154,103, 43,209,108,
- 91,141,116,114,154,156, 38,167,201,105,114,154,156,230,191, 82,179, 50,237,143,166,119,226,127,181, 5,189, 17, 13,210,255, 33,
-154, 92, 67, 69, 78,147,211,228, 52, 57, 77, 78,147,211,228, 26,185,127,176,133,155, 96,137,131,131,131,131,131,131,131,227, 3,
-195, 25, 44, 14, 14, 14, 14, 14, 14, 14, 14,206, 96,113,112,112,112,112,112,112,112,112, 6,139,131,131,131,131,131,131,131,131,
- 51, 88, 31, 16,187,255, 39,154, 28, 28, 28, 28, 28, 28, 28, 28, 31, 12,242,111, 26,229,156,131,131,131,131,131,131,131,227,127,
- 1, 87, 69,200,193,193,193,193,193,193,193,193, 25, 44, 14, 14, 14, 14, 14, 14, 14, 14,206, 96,113,112,112,112,112,112,112,112,
-112, 6,139,131,131,131,131,131,131,131,131,131, 51, 88, 28, 28, 28, 28, 28, 28, 28, 28,156,193,226,224,224,224,224,224,224,224,
-224, 12, 22, 7, 7, 7, 7, 7, 7, 7, 7,199,223,111,176, 8, 33,109, 57, 77, 78,147,211,228, 52, 57, 77, 78,147,211,228, 52,
- 57,131,197,193,193,193,193,193,193,193,193,193, 25, 44, 14, 14, 14, 14, 14, 14, 14, 14,206, 96,113,112,112,112,112,112,112,112,
-112, 6,139,131,131,131,131,131,131,131,131,131, 51, 88, 28, 28, 28, 28, 28, 28, 28, 28,127, 19, 4,192, 91,123, 2, 80, 74,207,
- 26, 45, 82,141,222, 4,149,233,115,154,156, 38,167,201,105,114,154,156, 38,167,249,241,105, 86,166, 93, 21,255,241,143,134, 82,
-250, 95, 91, 0,180,229, 52, 57, 77, 78,147,211,228, 52, 57, 77, 78,147,211,252,183, 45,124, 46,136,199,193,241,255,156,253,132,
-135, 92, 31, 15, 80,234, 4,158, 40, 21,169,143,158, 99, 14,101,223, 91, 51,189,142, 27,164, 58,123,232, 37,153, 72,127,248,226,
-189, 53, 57, 56, 56, 56,254, 69,112, 6,139,131,227,255, 59,153,190,222,224, 99, 49, 24, 56,130,106, 99, 97, 91,103, 49,128,199,
-239,173, 41,100, 23,194,192,184,128,106, 99, 96,231,179, 4, 64, 36,119,177, 57, 56, 56, 56,140,227,111,105,228, 30, 28, 28, 28,
- 30, 28, 28,188, 32, 44, 44, 76,204,221, 2,142,255, 22, 97, 97, 97,226,224,224,224, 5, 33, 33, 33,225, 31,237, 73,238,168, 43,
- 3, 99,232,164,209,177,206, 39, 31,229,217, 41,212, 6,111, 48,250,206,216,236,109,242, 94,154,124,210, 94,165,101,107,236,188,
-173,176, 47,214,232,253, 64,241,126,154,165, 4, 4, 4, 88, 52,106,212,232,100,131, 6, 13,108,184, 28,202,193,193,193, 25,172,
- 15, 12,203,178, 13,237,236,236, 38, 41,149,202,132,160,160,160,110,255,166, 11,222,184,113,227,235,161,161,161,233, 77,154, 52,
- 73,111,210,164,201,189,202,214,127,140, 56, 57, 57,121,215,173, 91, 55,193,223,223, 63,166,252,122,187,250,189,154,248,181, 24,
- 58,199,198,191, 71,203,247, 61, 70, 80, 80, 80, 55,149, 74,149, 80,163, 70,141,137,122,189,190,225, 71,123, 49, 85,172, 61, 24,
- 94,171,136, 84,133, 44,181, 64,103, 31, 30,175, 48, 5,120, 97,208,192,177,218,154,249,172, 61, 64, 91, 63, 72, 82,202,175,231,
-216,218, 95,121,174, 54, 3,195,180,130,138, 56,188,111,114, 69, 34,209,104, 74,105, 59,129, 64, 48,129, 43,126,255,221, 16, 66,
- 2, 8, 33,221, 8, 33,193, 31, 80,243, 7, 95, 95,223,100, 66,200,120,238, 10,115,252,191, 49, 88,125,107,146,166,159,214, 34,
-151,250,215, 36,133, 3,106,145,162, 33,181,200,213, 62, 53, 73,235,234, 30,248,143, 63,254,144,110,223,190,221,174, 78,157, 58,
-123, 66, 66, 66,174, 6, 5, 5,213,174,142, 78,112,112,240,201,224,224,224,190,111,174, 11, 10, 10,234, 95,126, 93,163, 70,141,
- 34, 26, 53,106,148, 31, 28, 28,252,220, 24,221,192,192,192,103, 65, 65, 65,197,193,193,193,207,222,120,113,247,111,212,168,209,
-201, 55,142,215,247,205,117,239,130,199,227,185, 28, 57,114,196,238,216,177, 99,118,124, 62,223,254,213,141, 96,152,183,174,175,
-198,245, 24, 17, 28, 28,124,253,141,115, 25,254,230,186, 74,204,201,245,192,192,192,225,111,232, 94, 15, 14, 14, 30,241, 33,204,
- 85,139, 22, 45,174,222,191,127,191,134,169,169,169, 69,249,223, 28,172, 45, 58, 92, 63,186,102,210,103,125,219,143,182,171,211,
-179,110, 53,141, 85,237,198,141, 27, 95,245,244,244,220,179,120,241, 98,187, 57,115,230,200, 62,218,167,119,127, 29, 33, 8,219,
-130,165,212,246, 73,178,202,246,147,110,125,249,247, 19,149,182, 58,131,193, 10,224,133, 97,171,187,184, 90,154,124, 93,115,150,
- 82,251,115,241, 2,219, 86,253,198,242,206,199,243,109,117, 6,131, 53, 24,180,172,150,230,127,242,161,128,199,227, 77, 26, 57,
-114, 36, 67, 8,249,218,211,211, 83,244,111, 42,108, 67,156,137,115, 27, 47,254,237, 64, 39,210,244, 3, 26, 10,127,185, 92,126,
-151, 16,226,253,255,204, 92, 53, 4, 32,163,148, 30, 6, 96, 79, 8,225,127, 0,205,229,243,231,207,159, 26, 17, 17,225, 84,179,
-102,205,121,132, 16, 30,247,138,231,248,199, 27,172, 1, 53,201, 92,123, 7,231,211, 51,151,239,106,177,241,210, 11,147,181, 71,
-239,203, 39, 78, 91,212,212,193,218,246,200,160, 90,228,135,119,237, 87, 81, 87, 75,145, 72,132, 23, 47, 94, 96,213,170, 85,146,
-185,115,231, 54, 49, 55, 55,127, 24, 18, 18,178,162, 78,157, 58,242,138,210,242,166, 38,165,180,169, 64, 32,216, 24, 18, 18,178,
-165,172,192, 38,132, 52, 21,139,197,191,134,132,132,236, 40,171,134, 12, 12, 12,172,121,251,246,109, 51, 66,136,189, 49,233,108,
-212,168,145,227,221,187,119,101, 64, 73, 36, 32, 44, 44, 76,220,168, 81,163,237,206,206,206, 27, 0, 52, 5, 0, 79, 79, 79, 81,
- 72, 72,200, 22, 87, 87,215,223, 8,121,189,208,124,215,185, 19, 66, 96, 97, 97,129, 93,187,118,129,199,227,253,101,253,142, 29,
- 59, 64, 8,169,242,245,172, 83,167,142, 60, 56, 56,248, 15, 71, 71,199, 21, 44,203,134, 2, 64,221,186,117,101,141, 26, 53,218,
-239,226,226,178,178,108,157, 49,154,148,210, 80,161, 80,184,162, 81,163, 70,251,235,214,173, 43, 3, 0,150,101, 67,249,124,254,
-242,224,224,224, 63,170,114,143, 26, 54,108, 56,178, 94,189,122, 41,245,234,213, 75,241,241,241,249,222,222,222,254,226,234,213,
-171,173,203,159,123, 89,228, 42, 61, 35, 59,247,250,157,136,232, 73, 35,251,132,213,112,181, 31,100, 81,191,135,185, 49,231, 94,
-118,254, 33, 33, 33, 43,204,205,205, 31,206,152, 49, 35,116,225,194,133, 18,173, 86, 11,161, 80,136,234,228,207,234,242, 63,213,
-204, 34,118,160,180,109,116,154, 82,226,238, 23, 36,183, 11,234, 13, 59, 51,129,248,198,243, 98, 83, 16,180,129, 86,102, 91, 45,
- 77,194,111, 19,145,172,148, 90,250,119,150, 5,135,182, 0, 99, 93, 91,124, 49,166,216, 12, 12, 83, 61,205,255,208, 39, 52, 52,
- 84,212,182,109, 91, 56, 57, 57,241,204,205,205, 7,253,163,174,231,127, 81, 51,196,153, 56,155,154,136,110,253, 52,103, 98,144,
-147,149,236,144, 49, 38,203,136,238,243,254,118,118,118, 23,214,172, 89, 19,104,106,106,122,217, 24,147,245, 79,184,158,165,230,
- 74, 72, 41,189, 89,186, 42, 18, 64,243,247,212, 92, 62,119,238,220, 9, 51,102,204, 64, 65, 65, 1,134, 13, 27,102, 6,224, 39,
- 99, 53, 77, 77, 77,189,234,213,171,183,195,223,223,255,101,131, 6, 13, 52,117,234,212, 81,249,248,248,196, 7, 4, 4,108,149,
- 72, 36, 30, 31,123,254,252,167,104,254,235, 12, 86,191, 90,164,137,141,131,243,212, 31, 14,222,145, 26, 34,239,226,238,103, 45,
- 17,245, 85,103, 72, 99,194, 49, 99,220,183, 82, 51, 51,203,175,251,214, 34,173,170,115,240,152,152, 24,236,221,187, 23, 54, 54,
- 54,100,243,230,205,226,190,125,251,142, 54, 51, 51, 75, 12, 14, 14, 30,100,172, 6,143,199, 51,108,217,178,197,164,123,247,238,
- 3,172,172,172, 34, 2, 3, 3,107, 50, 12, 99,216,182,109,155, 73,255,254,253,251,106, 52,154, 39, 65, 65, 65,181,239,221,187,
-103,184,115,231, 14, 24,198,184,160, 93,120,120,184,254,196,137, 19,175,162, 34,148,210, 39, 75,150, 44, 25,112,224,192, 1, 83,
-115,115,115, 54, 48, 48,176,166,171,171,107,196, 15, 63,252, 48,104,255,254,253,166,102,102,102,172,145, 5, 1, 84, 42, 21,164,
- 82,233,107, 70,138, 16, 2,165, 82, 9,137, 68,242,154,241, 50, 50, 50,224,111,109,109, 29,181,120,241,226,238, 7, 15, 30,148,
-154,154,154, 34, 56, 56,216,207,194,194, 34,122,233,210,165, 61,202,214, 25,139, 80, 40,196,174, 93,187,100,159,126,250,105, 55,
-177, 88, 28, 21, 28, 28,236, 39, 20, 10,177,123,247,110,217,160, 65,131,186,200,100,178, 39,129,129,129,254,198,104,233,116,186,
-217,119,238,220,113,188,116,233,146,163,155,155,219,184,181,107,215,218, 11, 4, 2, 0,128,193, 96,120, 45,114, 53,168, 87,187,
-144, 9,179,215, 92, 80,170,212,154,133,211, 63, 15, 19, 24,208,216,200,168,221, 32, 51, 51,179,196, 47,190,248, 98,204,174, 93,
-187,196, 14, 14, 14, 76,120,120, 56, 10, 11, 11,171,124, 45,255,255, 68,175, 8, 15,124, 67, 67, 0,158,225,241, 74,155,250,109,
- 7,243, 17,123, 4,141, 60, 76,248, 23, 98, 10,237, 40, 67,221, 0,218, 8,243,194,248, 85,210, 20,208,250, 96,216,218,167, 99,
-137, 77,147,206,131,248, 9, 9, 9,240,168, 31,198, 59, 22, 3,123, 74,168, 7, 88, 4, 85, 73,179, 28, 2,129, 96, 78,191,126,
-253,228, 9, 9, 9,104,218,180,169, 76, 36, 18,205,254, 32, 81,188,245, 62,110,216,232,211, 18,155,189, 29,113, 41,236, 31,215,
-113, 39,196,153, 56,155,153,136,110,238,222,189,215,169,110,199, 47,201,134,161,238, 86,182,102,130, 67,239, 19,201, 42, 53, 87,
-231,111,221,186,101,221,190,125,123,204,157, 59,215,214,204,204,236,242, 63, 61,146, 85,222, 92, 17, 66,164,165,213,131,201, 0,
- 92,222, 67,115,229,220,185,115, 39,204,156, 57, 19, 55,111,222,196,210,165, 75,209,177, 99, 71, 88, 90, 90, 86, 90,126, 12, 25,
- 50, 68,214,180,105,211,240,110,221,186, 61,152, 56,113,226,160,163, 71,143,186,110,217,178, 69,248,217,103,159,137,251,245,235,
-231, 54,113,226,196,161,157, 59,119,126,220,184,113,227, 91,125,251,246,149, 84, 49,105,124, 0,162,210, 69, 80,146, 84, 66, 8,
- 33,124, 66,136,128,139,176,113, 6, 11,124,138,249, 95, 78, 94, 32,137,219,250, 51,210,247,254, 2, 94, 94, 58, 4,133,217, 80,
- 95, 61, 6,221,213,195, 24, 18, 26, 42,149, 18,178,176, 58, 7, 55, 49, 49,129, 80, 40,196,179,103,207, 16, 25, 25,137,206,157,
- 59, 11, 87,175, 94,109,225,239,239,255,107,211,166, 77, 31, 4, 7, 7,215, 51,198,176,120,121,121, 97,192,128, 1,162,241,227,
-199,215,146, 72, 36,247, 40,165, 2, 15, 15, 15,244,239,223, 95, 56,109,218, 52,119,137, 68,114,135,101, 89,161, 76, 38,123,103,
-116,232,109,186, 82,169, 20, 0, 4,181,107,215,190,187,103,207, 30,143,166, 77,155,242,207,156, 57,131,130,130, 2,190,183,183,
-247,131,221,187,119,123, 54,105,210,132,127,237,218, 53, 20, 23, 23, 83, 99,117, 21, 10, 5, 36, 18,201, 95, 12,150, 66,161,128,
- 88, 44, 54, 58,141,165,230, 98,132,167,167,231,157, 61,123,246,184, 52,111,222,156,119,241,226, 69, 20, 22, 22,194,205,205,237,
-238,158, 61,123, 92,154, 54,109,202,187,113,227, 6, 10, 11, 11,141,214, 20,137, 68,112,119,119, 71,191,126,253, 4, 83,166, 76,
-113, 17, 8, 4,119, 68, 34, 17,220,220,220,208,175, 95, 63,225,228,201,147, 93, 68, 34,209, 45, 35,171, 12,121,165, 70, 11,253,
-250,245,147,203,100, 50, 36, 38, 38,130,101, 89,176,108,137, 39, 77,205,204,126,116,237,206,227,168, 73,163,250,182, 44, 86,171,
-213,167, 46,222,125, 82,167,182,155, 11, 33,212,189,146,115,175, 23, 18, 18,242, 32, 44, 44,236,183,195,135, 15, 91,180,107,215,
- 78,112,231,206, 29,188,124,249, 18, 98,177, 24, 38, 38, 38,224,243, 63,210,142,178, 5,117,172,193,162, 93, 66,166, 70, 44,182,
-112, 49, 53,113,244, 6, 94, 94, 70, 77, 91, 49,120, 12, 79,114,231,133, 66, 14,208,118,168,145,101, 93, 53, 77,182,221,139, 12,
-141, 88,103, 21, 96,226,228, 82, 3,217,217,217,112,173,229, 11,149,200, 86,116,253, 89,177, 9, 72, 21, 53, 75,105,208,160, 65,
-115, 87, 87, 87, 7,119,119,119,100,101,101,193,203,203, 11, 38, 38, 38,150,129,129,129,237,170,125, 13,182,186,139, 81,128,166,
- 0,179, 12, 6, 50, 15, 58,254, 98, 60,203,108,136, 95, 3, 5,255, 56,115,181,103,175,179,117, 13, 63,224,216,231,176,183, 16,
- 99,211,232,134, 86,182,230,226,106,153, 44, 66,136,191,189,189,253,249, 91,183,110,217, 72, 36, 18,220,187,119, 15,117,234,212,
-193,207, 63,255,108,107,105,105,249,143, 53, 89,111,152, 43, 43, 74,169, 18, 0, 11, 96, 32,170,209,235,181,212,172,252,178, 96,
-193,130,113,223,126,251, 45,174, 95,191, 14, 23, 23, 23,100,102,102,162,121,243,230, 9,185,185,185, 21,190,151,252,253,253, 93,
-158, 62,125,154, 60,105,210,164,134, 59,118,236,144,202,100, 50,228,229,229,225,183,223,126,195,140, 25, 51, 64, 8, 1,165, 20,
-155, 55,111,150, 13, 27, 54,172, 81,108,108,108,178,187,187,187, 49,205, 55, 8, 0, 9, 0, 89,233, 34, 7, 32,219,189,123,183,
-121,247,238,221,205, 74,215, 73, 1, 72, 9, 33, 92, 71,175,127,179,193,162, 64, 61, 7, 15, 31,228,159,217, 7, 41,159, 64,202,
- 43, 93,248, 4,204,243, 71,112,149, 8,160,163,212,191, 58, 7, 55, 49, 49,121,181, 48, 12,131,212,212, 84, 48, 12,131,217,179,
-103, 75,198,141, 27, 87, 87, 36, 18,221,104,209,162,197,226, 10, 79,160, 52, 34,117,231,206, 29,212,174, 93,155,204,156, 57,211,
- 44, 44,172,228, 43,246,209,163, 71,240,244,244, 36,139, 22, 45, 50,237,218,181, 43,145,203,229, 70, 71,176, 24,134,129, 84, 42,
- 69,171, 86,173,200,150, 45, 91, 76,196, 98, 49,142, 29, 59,134,204,204, 76,180,111,223,158,191,101,203, 22, 19,137, 68,130,203,
-151, 47, 35, 63, 63,223,104,221,202, 34, 88,165,166,206, 40,154, 52,105,178,201,193,193, 97,197,246,237,219,197, 82,169, 20, 23,
- 47, 94, 68, 94, 94, 30, 6, 12, 24,160,223,185,115,167,196,204,204, 12, 55,110,220, 64, 94, 94, 94,181, 50,199,157, 59,119,224,
-229,229, 69,102,205,154, 37, 13, 13, 13,213, 1,192,253,251,247,203,174,179,212,204,204,108,121,179,102,205, 54, 85,164,193,178,
- 44, 82, 83, 83, 17, 17, 17,129,231,207,159, 35, 51, 51, 19, 89, 89, 89, 40, 44, 44,132, 94,175, 7, 0,200, 10, 11,142,253,178,
-229,200, 3,185, 84, 42, 11,169, 91,187,198,173,123,145, 25,114,169, 84, 86,219,163,134, 55, 33,243,222,122, 97, 67, 67, 67, 23,
-243,120,188, 27, 11, 23, 46,172, 55,107,214, 44,113,116,116, 52,238,221,187,247,151,124,245, 81, 26, 44, 66, 8,136,166, 54, 8,
-105,120,243,121,177, 85,243, 46, 3,133,120,113, 18, 96,117, 0,195, 71, 88, 61, 23,254,161, 71,197,246,160,168, 7, 53,124, 1,
- 35, 28, 59, 33, 4,208,122, 1, 36,232,244, 83,189,117,211,158,163,133,201,201,201, 16, 10,133, 16,139,197,104,216,186, 55,127,
-247, 3,157, 3, 8,234, 67, 11, 31,163, 52,203, 33, 22,139,191,251,252,243,207,229,229, 53, 59,117,234, 36,151,201,100,115,170,
-109,174,138,101,161,208,211,241, 17,201, 10,247,239,143,165,249,197,102, 40,125, 64,233, 36, 64,215,224,125, 77,150,155,155, 91,
-152,183,183,247, 11, 15, 15,143,102,239,101,174, 76, 69, 55,246,236,217,235,108,229, 90, 98,174,160, 87, 1, 2, 41, 28,108, 45,
-176,105, 98, 43, 43, 91, 11,105,149, 76, 86,169,185, 58,119,243,230, 77, 27,137, 68,130,240,240,112, 8,133, 66, 72, 36, 18,212,
-173, 91, 23, 27, 54,108,176,181,178,178,250, 71,152, 44, 66,136, 37, 33,164, 3, 33,164, 15, 33,164,119, 57,115,229, 1,160, 53,
- 33,164, 29, 0, 7, 0,151, 40,165, 15,140,212,108,198,231,243,143,213,175, 95, 63,133,207,231, 71, 46, 90,180,232,171,105,211,
-166, 97,229,202,149, 8, 11, 11,123, 62,109,218, 52, 68, 69, 69,233, 21, 10, 69, 55, 74,233,209,138,180,138,138,138, 14,207,154,
- 53,203,188,103,207,158,101,255,199,213,171, 87,177,109,219, 54,200,229,175,183,130,232,214,173, 27, 70,140, 24, 97,169,209,104,
-254,168, 72,211,222,222,190,205,205,155, 55,235, 0, 16, 2, 16,151, 25,172,199,143, 31, 91, 20, 20, 20, 88,152,152,152, 88, 56,
- 58, 58,154,150,153,172,158, 61,123, 90, 8, 4,130,102,224,248,119, 26, 44, 0,208,230,164, 67, 12, 3,164, 60, 2, 25,175,156,
-201, 2, 11,126,126, 70, 21,139,218,183, 27, 44, 83, 83,211, 87, 70, 75,169, 84, 26, 29,113, 41, 51, 54,150,150,150, 40, 44, 44,
-132, 78,167,123,245,112, 88, 90, 90, 66,173, 86, 3, 0,228,114, 57,170, 25,193,194,245,235,215,113,237,218, 53,240,249,124, 88,
- 89, 89, 1, 0,238,222,189,139, 71,143, 30, 65, 40, 20,194,202,202,170, 74,186, 90,173,246,173, 17, 44,173, 86, 11,177, 88, 92,
- 37, 19,168, 82,169,232,221,187,119,241,248,241, 99,136,197, 98,216,218,218, 66, 36, 18, 33, 49, 49, 17, 81, 81, 81, 16,137, 68,
-176,181,181,173,214,253, 49, 51, 51, 67,110,110, 46, 12, 6,195,171,107, 97,110,110,142,226,226, 98, 48, 12, 99, 84, 58, 89,150,
- 69, 74, 74, 10, 50, 51, 51,145,152,152,136,172,172,172, 87, 38,171,172,138,176, 90, 25,151, 97, 64, 8,193,189,123,247,232,249,
-243,231, 81, 88, 88,248,151,188, 84, 22, 33,253,232, 88,235,111, 14,157,160,125, 86,145, 78,156,169, 21,154,219,251,183, 5, 94,
-156, 0, 24, 62, 32,177, 68,227,128,154, 72,200, 53,200,163,211, 53, 18, 16,116,192, 26,111, 75,163, 52, 13,130,118,153,133, 58,
-113,188,214,214,204,175, 94, 32,210,211,211, 33, 22,139, 33, 22,139, 17,212,180, 45, 94,100, 27,100,145,201, 74, 25, 40,218, 27,
-165, 89, 74,195,134, 13,107, 73,165,210,208,134, 13, 27,146,242,154,161,161,161, 96, 24,166,110,131, 6, 13,124,171,116,254,171,
- 61, 69,208,202, 26,131, 79,199, 71,166, 42,156, 14, 61, 86,121,119,237,209,219,106,229,217, 12,191, 39,105,106, 15, 80,221,100,
- 80,109, 96,117, 77,150,187,187,123, 75, 19, 19,147,163,223,125,247,157,135, 88, 44, 62,225,225,225,209,188, 90,229,155,148,183,
-254,187,175, 6, 58, 91,150,153, 43,157, 2,224, 75, 1,129, 20,224, 75,225, 96,103,131,133, 35,218, 89,201, 36,130, 63,141,213,
-148, 74,165,187,215,172, 89, 99,251,166,185, 42, 91, 26, 54,108,136,217,179,103,219, 90, 89, 89,237,250,155,205,149, 21, 74,218,
- 85, 61, 4,240, 7,128,115,229,204,149, 23,128, 63, 75,163, 86,247, 40,165, 9, 70,106, 54,233,216,177,227,133,231,207,159,119,
-126,240,224,129, 99, 90, 90,154,239,228,201,147,177,114,229, 74, 76,155, 54,109, 23,165,212,123,223,190,125, 13,110,223,190, 93,
-151, 82, 90,105, 68, 44, 45, 45,237,211,105,211,166,101,101,101,101, 1, 0,234,214,173,139,188,188, 60, 76,153, 50, 5, 19, 38,
- 76, 40,139,188,130, 82,138,244,244,116, 44, 91,182, 44, 61, 45, 45,237,179,138, 52, 13, 6, 67,226,190,125,251, 26,105,181, 90,
- 23,148, 84, 11,138,243,242,242,204,114,114,114, 76,181, 90,173,156,101, 89,185,133,133,133, 9, 0,217,144, 33, 67,248,145,145,
-145,126,122,189, 62,153,179, 34,255, 82,131,197, 35,120,248,242,238,101, 88,249, 7,190, 22,189,146,241, 8,164,102,230,120,145,
-152, 0, 33, 72, 68, 85, 15, 76, 41,125,205, 96,149,189, 24, 83, 83, 83, 49,125,250,116,197,142, 29, 59, 30,105, 52,154,208,203,
-151, 47,207,168,244,195, 27,128,173,173, 45, 18, 18, 18,232,143, 63,254, 88,112,226,196, 9, 61, 0,216,217,217, 33, 49, 49,145,
-206,154, 53,171,112,239,222,189,180, 42, 6,139, 97, 24, 72, 36, 18, 92,188,120,145,206,153, 51, 39, 63, 53, 53,149, 90, 91, 91,
-195,218,218, 26,103,207,158,213,207,152, 49, 35, 63, 54, 54,246,213,186,170, 24,172, 50,195, 82,222,160,188,203,120, 85,196,213,
-171, 87,191,200,207,207,159, 56,101,202, 20,229,147, 39, 79,168,173,173, 45,108,109,109,177,117,235, 86,254,208,161, 67,149, 15,
- 31, 62,124,181,174, 58, 88, 91, 91, 35, 38, 38,134, 46, 90,180, 72,121,238,220, 57, 1, 0,216,216,216, 32, 42, 42,138,206,159,
- 63, 95,153,151,151, 55,241,234,213,171, 95, 84, 82,224,224,249,243,231,175, 34, 86, 42,149, 10, 89, 89, 89, 72, 76, 76,124,101,
-176,148,114,179,142, 95, 15,235, 90,191, 88,169, 84,220,122,244,244,101, 72,195, 58,118,197, 74,165,226,105,220,203, 24, 74,231,
-188,181,109,219,181,107,215,102,232,245,250,208, 35, 71,142, 60,218,176, 97,131, 34, 39, 39,231,173,134,253,163, 52, 88, 12,235,
- 0, 66,155, 93,121, 90,100,209,174,107,127, 17, 73,187, 13,104,139, 0,177, 37, 32,182, 4, 95,110,141, 78,205, 27,240,182,222,
- 44,112, 0,101,155, 64, 40,174,188,125,139,128,218, 3,108,243, 51, 49, 42,203,102,125,198,138,114,114,114,192,227,241, 94,153,
- 33,153, 92,142, 54, 61,134, 48,155,111,171, 29, 0,218, 20,132,103,116,155, 25,161, 80, 56,117,216,176, 97,194,220,220, 92, 48,
- 12,243, 74, 83, 42,149,162,103,207,158, 98, 83, 83,211, 89, 70,159,251,254, 58, 66, 8,196,141, 1, 58, 33, 58, 77,229,116,248,
-145,210,103,242,146, 77, 82,255, 6,141, 48, 50,204, 78,186,228, 88,134,255,131, 68,101, 77,192, 48, 17,122, 77, 80, 85, 77,150,
-135,135, 71,115,185, 92,126,236,208,161, 67,178, 86,173, 90, 97,202,148, 41,114,137, 68,114,194,221,221,189, 69, 85,111, 83,113,
-145,225,235,249,171,182,167, 63, 92,222, 1,208, 22,151, 24,171,114, 75, 70, 17,139,217,155,206,231,235,116,116,160,177,154, 74,
-165,114,232,240,225,195,179,255,252,243,207,191,152, 43,137, 68,130,184,184, 56,124,255,253,247, 57, 57, 57, 57,159,253,205,185,
-180, 1,128,251, 0, 84, 0, 90, 2,144,149,246, 20, 12, 5,112,150, 82,106,160,148,166, 83, 74, 83,141, 21,228,241,120,211,214,
-174, 93,203, 87, 42,149, 24, 49, 98, 4, 18, 19, 19,145,146,146,130,111,191,253, 54,142,101,217,161,165,154, 15, 40,165, 81,198,
-232,105, 52,154,232,220,220,220, 46, 29, 58,116,200,203,205,205, 69,189,122,245,208,181,107, 87, 56, 56, 56,192,201,201, 9,221,
-187,119,135,183,183, 55,178,179,179, 49,112,224,192,156,204,204,204, 14,148,210, 10,123,161,103,103,103,199,238,218,181, 43,102,
-236,216,177, 13,147,146,146,252, 0, 88, 23, 22, 22,202, 11, 11, 11,197, 26,141, 70,106,105,105,105,217,160, 65, 3,155, 47,191,
-252,210,228,254,253,251,126, 73, 73, 73, 69, 0, 18,192,241,239, 52, 88, 90, 96,246,182,125, 91, 85,162, 26, 94, 48,247,169, 15,
-153, 68, 2,169, 72, 4,169,165, 53,212, 44,139,141,113,105,138, 98, 74,103, 85,245,192,148,210,215, 34, 13, 6,131, 1,235,215,
-175, 87, 45, 92,184, 48, 47, 45, 45,109,212,229,203,151,235,223,185,115,231,161, 49, 70,168,160,160, 0,251,246,237, 83,110,217,
-178,229,185, 82,169,108, 40, 20, 10,117, 26,141, 6,187,118,237, 82,173, 88,177, 34, 94,161, 80, 4, 11, 4, 2,109, 85,204, 75,
- 89, 4, 75, 32, 16,232, 84, 42, 85,195,221,187,119,199, 30, 61,122, 84,105,102,102, 6,129, 64,160, 83, 40, 20,117,183,111,223,
- 30,189,123,247,110,165,169,169,105,149,140, 27,203,178,111,173, 34,100, 89,182, 74, 6, 11, 0,238,220,185,243,155, 86,171, 13,
-217,181,107, 87,210,166, 77,155, 84,102,102,102, 0, 0,157, 78, 23,188,109,219,182,164,117,235,214,169,171,210,192,189,180,224,
-129,193, 96,192,246,237,219,213,187,119,239, 78,210,235,245,193,101,235, 54,111,222,172,218,190,125,123,146, 86,171, 13,185,115,
-231,206,111,149,105, 25, 12, 6, 67, 65, 65, 1,248,124, 62,158, 63,127,174, 46,139,208, 61,123,246,236,149,193,178,179,177,170,
-211, 52, 56,192,247,231,245,251, 46,201,197, 98,113,135,176, 32,191,200,167, 9, 73,148,146,248, 74,206,253,225,245,235,215,235,
-231,228,228,140,218,176, 97, 67,222,206,157, 59, 85, 6,131,225, 53,147, 37, 18,137, 62,198,167, 86, 6, 2,233,211, 12,181,169,
-132,209, 19,196, 28, 44, 49, 87, 18, 11, 64, 98, 9, 72, 44,225,236,236,130,219,113, 10, 83, 48, 16,193,160,179, 51,226,129,148,
-131, 64,246, 56, 29,166, 2,145,148,164,165,165,189, 50, 66,101,139,135,151, 31,238, 37, 20,153,128, 80, 49,120,176,175,194,179,
-222,197,212,212,148,159,154,154,250, 87, 77, 15, 15,158, 78,167,235, 96,244,185,167, 24, 28, 1,246,171,152, 52,149,227,129, 7,
-197, 62, 19, 23,111,150, 74, 13,121,192,221, 85,240,175,229,132,137,125, 26,136,102, 30,206,244,191, 19,175,168, 5, 30, 29, 9,
-182,200,232,175, 11, 15, 15,143,102, 50,153,236,196,193,131, 7,101, 50,153, 12,207,159, 63, 71,221,186,117, 49,127,254,124,153,
- 76, 38, 59,238,230,230, 22, 86,149,219,116, 51,141, 38, 20, 21, 26, 66,167,238,123,153,246, 48, 85,255,154,185,202, 44,166, 24,
-254,195,225,188,220, 2, 85,239, 27, 47,117,231,171,112, 45,239,231,229,229,181,159, 53,107, 86,118,102,102,230,107,230, 42, 33,
- 33,161,204, 8,132, 81, 74, 35,254,230, 92, 42, 71, 73,227,117, 31, 0,158, 0,234, 83, 74,245, 0, 10, 41,165,213, 10, 93,215,
-169, 83,167,161,155,155, 27,214,173, 91,135,141, 27, 55,230,254,252,243,207,160,148,162,118,237,218,102,213,213, 76, 79, 79,191,
- 29, 29, 29,221,161, 94,189,122, 79, 86,175, 94,157,228,232,232,200,126,249,229,151, 24, 62,124, 56,108,109,109, 13, 43, 86,172,
-120,217,188,121,243,199,177,177,177,109,139,139,139, 31, 25,113,127,104, 86, 86,214,245, 95,127,253,245,102,235,214,173,101, 67,
-135, 14,181, 61,116,232,144,181, 66,161,112, 18,139,197,118, 26,141, 70,244,228,201, 19,222,254,253,251, 29, 34, 35, 35,227,148,
- 74,229,109, 90, 58,177, 31,199,191,208, 96,253,254,156, 94, 47, 46,204, 91, 58,127,243, 6,229, 11, 61,129,190,102, 29,168,172,
-157,113, 39, 79,137, 41, 79,146, 20,122,150,174,217,247,156, 94,168,110, 4, 75, 38,147,225,220,185,115,134,175,190,250, 74,117,
-251,246,237, 95,243,243,243, 93,239,220,185,179,211, 88, 29,150,101,121,159,127,254,121,209,181,107,215,246,165,166,166,250,135,
-135,135,191, 96, 89,150, 55,104,208,160,162, 51,103,206,252, 73, 8,241,187,123,247,238,211,106,132,184, 33, 20, 10, 65, 8,193,
-157, 59,119,226,114,114,114,252,111,222,188,185,123,198,140, 25, 69,148, 82, 94,120,120,120, 98,113,113,113,189,235,215,175,239,
-248,250,235,175,139, 40,165, 60, 99,117,203,204, 91,121, 35, 85, 22,205,170,170,193, 2,128,240,240,240,136,188,188, 60,191,219,
-183,111,159,248,242,203, 47, 21,165,230,227, 73, 97, 97,161,239,205,155, 55,143, 13, 29, 58, 84, 81, 21, 61,173, 86,139, 30, 61,
-122, 40,110,220,184,113,172,176,176,208,247,206,157, 59, 79,202,214, 93,187,118,237, 68, 94, 94,158, 95,120,120,184,177, 5,248,
-252, 21, 43, 86,164, 46, 92,184, 48, 53, 51, 51,243,231,229,203,151,103,218,218,218, 66,171,213,190, 50, 88, 25, 89, 57,231,155,
-124, 50,246,135, 29,127,156,189,179, 98,254, 87,173,164, 18,177,104,214,146,205, 23,117, 60,220, 52,210,100,238, 44, 40, 40,112,
-125,240,224,193,175, 19, 39, 78, 84,157, 62,125,218, 32,149, 74, 97, 98, 98, 2,177,248, 99,108, 67,106, 40, 0, 75, 82,250, 6,
- 89, 38,175, 88,251,155,250,241,139,244, 87,198, 10, 98, 11,220,137,205,195,119,171,247,177,223,119,179,125, 1,138, 68, 48,136,
-174, 92,147, 95, 0,150,100, 12,111, 36, 76,250,253,167, 9,234, 23,209,143, 94, 51, 66, 81, 15,239, 96,249,156,177,236,162,174,
- 86, 47,192,146, 20, 16, 68, 25,155, 90,189, 94,223,103,241,226,197,197,177,177,177,175,105,198,199,199, 99,201,146, 37, 74,181,
- 90,221,219,232,135, 82,204,175,111,160,212,110,231,141,236,218,163,190, 28, 38,149,234,115,128, 91, 63, 2, 2, 25, 32, 54, 71,
- 3,223, 90,152, 61,226, 19,193,228,253,105,254, 0,235, 6, 70,232,103,108, 58,249,124,254,177,197,139, 23,203,164, 82, 41,158,
- 61,123, 6,137, 68, 2,169, 84,138,160,160, 32,172, 92,185, 82, 38, 18,137, 78,148,181,239,172,178,201,218,253, 44,237, 97,162,
- 10, 16, 72,144, 85, 12, 12,255,225, 72,110, 78,190,178, 79, 85,204,213,155, 38,107,194,132, 9,217,233,233,233,144, 72, 36, 72,
- 76, 76,196,128, 1, 3,178,255, 33,230, 10, 0,138, 1, 56, 3,136, 1, 16, 11,224, 1, 33, 68,132,247,152,158, 45, 50, 50,242,
- 94, 66, 66, 2,190,248,226, 11, 12, 30, 60,216,242,211, 79, 63,197,139, 23, 47, 16, 19, 19,115,255,125, 18,170, 84, 42,239, 36,
- 37, 37,213,157, 48, 97,194,108, 23, 23,151, 45,214,214,214, 23,173,172,172, 46,184,184,184,108,158, 49, 99,198,119,169,169,169,
-245,181, 90,237,131, 42,220, 31, 74, 41,125, 22, 27, 27,123,120,251,246,237,225, 19, 38, 76,136,251,244,211, 79,147,198,143, 31,
-159,250,235,175,191,166,220,191,127,255,105, 94, 94,222,169,202,162, 97, 28, 31, 1,198,206, 10,221,199, 3, 77,135,213, 34,151,
- 62,173,137,194,129, 53, 81,244,185, 39,185,218,219, 3,173,171, 51,219,118,195,134, 13,169, 94,175,167,167, 79,159,166,157, 58,
-117, 42,110,214,172,217,213,192,192,192,218,213,153,193, 59, 44, 44,236,100, 80, 80, 80,223, 55,215, 53,106,212,168,127,249,117,
- 45, 91,182,140,104,217,178,101,126,139, 22, 45,158, 27,147,206, 22, 45, 90, 68, 53,109,218,180,184, 69,139, 22, 81,229,215, 7,
- 7, 7,119,111,221,186,245,177,242,235, 26, 53,106,212,237,205,117,239, 58,247,182,109,219, 38,198,196,196,208,151, 47, 95,210,
-206,157, 59,167,148,173,111,211,166, 77,226,163, 71,143,232,211,167, 79,105,199,142, 29, 83,170, 59,123,121, 80, 80,208,136,230,
-205,155, 95,127, 35,205,195,223, 92, 87,145,102,243,230,205,175, 7, 7, 7, 15,127,115, 93, 80, 80,208,136,247,157,101,221,209,
-209,209,187, 65,131, 6, 25, 43, 86,172,160, 53,107,214,204, 40,255,155,127,216,231,223,229, 21, 20, 21, 76,153,191,238,119, 91,
-191, 30,117,171, 51,115,123, 96, 96, 96,237, 22, 45, 90, 92,253,228,147, 79,138,111,223,190, 77, 41,165,180, 97,195,134,244,163,
-154,181,126,159,159,144,110,240,107, 74,215,251, 29,139,154,227,246,228,179, 16,185, 58,252,167,206,148,158,159, 74,111,174, 27,
- 78, 67, 61, 68,134,107, 83, 92, 99,232, 6,223, 19,116,179,119, 11,186,170,150,200, 40,205,141,158,205,233, 6,223, 19,145,179,
-221,158,244, 12,180,213,236,222,186,129, 62,123,246,140, 30,222,191,139, 54,174, 41, 43,209, 92,239,119,154,174,243,107,101,148,
-230,235,207,124,211,208,208,208,162,223,127,255,157, 62,123,246,140,158, 57,115,134, 54,109,218, 84,209,160, 65,131, 86, 70,159,
- 59, 64,232,186, 58, 61,244,107,125,174,204,104,107,146, 55, 60, 68,162, 30,216, 64,164,233,238, 47,212,182,247, 18,234,155,184,
-241, 13,245, 29, 25,214,207, 22,180,189,143, 84, 77,215,251, 92,166,235,253, 58, 24,155,206,218,181,107,191,116,119,119,167,239,
- 90,188,189,189, 51, 91,182,108,201,175,206,125, 15,177,135, 91, 91,111,113,234,185,249,173,105,215,122,166,217,141, 93,249,173,
-223, 55, 47, 1,104, 96, 99, 99,147,181,101,203, 22,106,111,111,159, 9,192,255, 31,145, 63, 75,214, 89, 1,232, 14,192,182,244,
-255, 38, 0, 90, 1,168,249, 30,154, 77,218,183,111,175,187,119,239, 30,125,254,252, 57, 61,121,242, 36,109,218,180,169, 30, 64,
-216, 63,230,217,228, 52,185,165,220, 66,254,155,209, 73, 66, 72,219,183, 13, 70, 22, 24, 24, 72, 59,116,232,160,188,116,233, 82,
-145, 70,163, 25,121,247,238,221,195,239,171,249,223, 72,231,127, 67,179,117,235,214,215, 25,134,169, 89,218, 5, 56,229,236,217,
-179, 13, 1,160, 85,171, 86,215,121, 60, 94,205, 82,211,155,114,238,220,185,134, 31,219,185,151,225,228,228,228,205, 48,204, 41,
- 0,234,164,164,164, 87,189,157,236,252,187,135, 90, 89,154,183,202,203,203,191,159,246,248,208,137,247, 73,103, 80, 80, 80, 55,
-177, 88,188, 33, 52, 52, 84,126,254,252,121, 89,120,120, 56,249,168,174,231,106, 79, 17, 68,162, 32, 80, 76,127,156,172,240,248,
-238, 72, 86,173, 79,218, 52, 21,108, 61,120,137, 93,218,203, 46,182,137,167, 60, 14, 2,246, 7, 16,245,109,124, 22,175, 54, 90,
- 83, 74, 26,193, 32,152,254, 32, 81,225, 54,229,207, 92,175,182,189,135,243,142,236,217,192,254,216,195, 58,182, 73, 45,147,151,
-160,248, 1, 98,197, 13,163, 53, 95,127,238,155,138,197,226, 19, 3, 7, 14, 52,217,189,123,183, 82,165, 82,117,185,119,239,222,
-133, 42,157,251, 38,223, 26, 48,144,133,160,212,181,242,175, 71, 60,131, 1, 11,241, 85,212,203,127,194,125,111,236, 64,220,228,
-230,226,163, 10,165,126,130, 49,145, 43, 99, 52, 9, 33, 13, 44, 45, 45,119,228,230,230,246, 55, 38,114,245,191, 60,119, 66,136,
- 45,128,224,210,168, 21, 1, 16, 97,108,212,166, 2,205,102, 60, 30,111, 90,173, 90,181,234, 61,127,254,252,177,193, 96,248,145,
- 82,122,241,223,240,238,248, 55,104,126,108,252, 45,125,216,165, 82,233,189,139, 23, 47,158, 20, 10,133,223, 95,187,118, 77,253,
-111,186,224,231,207,159,111,242,182,245, 23, 46, 92,104,242,111,185, 6, 41, 41, 41, 49, 0,220,222, 92,159, 17,113,232, 6,128,
- 27, 31,226, 24,119,239,222, 61, 28, 22, 22,118,250,218,181,107, 51,229,114,121,199,143,238, 34,142,141,213, 96,181,231, 93,136,
- 68, 75, 2,156,101,211,191,235, 76,201,226, 83,215,221,150,246,178,123, 89,153,185,170, 68,243, 54,164,186, 37,245, 93,101,211,
- 23,117, 7,249,225,196, 86,183, 31,123, 88,191,172,204, 92, 25, 67,120,120,248,181,192,192,192, 78,123,246,236,217,166, 82,169,
- 70, 84,102,174,222,138, 41,147,134, 98,221, 28,232,120, 1,160, 16, 85, 16,154, 87,128,225, 61, 70, 6,210,255, 41,183,236,102,
- 26, 77, 0,224,255, 33, 53, 41,165,247, 1,248,253, 19,179, 40,165, 52, 19,192,177, 15,172,121, 21,192, 85,238,213,205,193, 25,
-172,119,112,229,202,149, 64,238,210,115,252,183,185,120,241,162, 26,192,119,165,203,199, 71, 57,147, 21, 88, 67, 58,246,207, 81,
- 82, 5, 40, 73,130,128, 93, 81,101,115,245, 22,147,213,200, 77, 58,225,192, 72,169, 2, 20,105,160, 88,254, 62,230,170,188,201,
- 2, 80,179,218, 2,125, 34,181, 0,226, 64, 72, 60,230,226,221,141, 21,231,226, 85, 61, 6, 7, 7, 7,199,191,198, 96,113,112,
-112,124, 64,147,181,191,206, 29,100,241,166,128, 65, 77, 64,159,128, 98,125, 26,198,198,107,222, 83,243, 22,178,200,120,240,224,
- 13,145, 62, 22, 69,154, 52,140,122, 15,205, 15, 77,137,121,122,183,129,154,195,101, 13, 14, 14, 14,206, 96,113,112,112,188, 15,
- 37, 81,157,164,210,229,159,171,201,193,193,193,241, 47,130, 0,104,251,142, 15, 68,163, 27,175, 17, 66,218, 86,227, 3,244, 44,
-167,201,105,114,154,156, 38,167,201,105,114,154,255, 46,205,202,180, 63,154,198,243,255,205, 46,138,224,186,176,114,154,156, 38,
-167,201,105,114,154,156, 38,167,249, 47, 92, 24,112,112,112,112,112,112,112,112,112,124, 80,254,214, 54, 88, 50, 27,111, 71,240,
-153,122,132,165,190, 0, 64, 25, 18, 5, 61,251, 80,145, 21,147,250,190,218,196,190,174,204, 68,192,219, 85,164, 51,124, 74,211,
- 31, 41, 62, 68,122, 9, 33,205, 80, 50,188, 64, 66,105,119, 97,227,246,179,241, 54,177, 55, 55,105,175,209,104,189, 68, 66,126,
-106,122,161,230, 15,154, 25, 89,204,101, 63, 14, 14, 14, 14, 14,142,127,153,193,242,110,210,243,138,137, 76,238, 5, 0, 6,150,
-194,192, 2, 5,185, 25, 55, 18, 30,158,233, 9, 0, 78,254,109, 14,136,229, 54,161, 6,150,130,165, 20, 6,150, 66,167, 86, 62,
-203,140, 60,102,212,204,243, 38,118, 62, 61,219,182,111,219,171, 75,151, 79,124,234, 6,212,245, 4,128, 71,143, 31,197, 30, 61,
-122, 44,218,196,206,231,207,162,140,232, 3,239,115, 98, 38, 2,193,119,193,141, 66, 58,220,185,115,107, 38,128,111, 63,208,245,
- 18,210,171,157,183,147,102,199,219, 84,101, 39,123,115,147,246, 61, 58,183,247,157, 50, 97, 20, 25,254,205, 98,151,194, 43, 23,
- 38,201, 29,235, 22, 82,170,190,174, 76,127,118,143, 82,202,114, 89,145,131,131,131,131,131,227, 95, 96,176, 76,100,114,175,115,
- 7, 55,217, 29,184,154, 8, 0,104,219,208, 1,243,126,218,210,131, 16, 18, 13, 0,189,191,254,201,251,187,137,195,112, 61, 34,
- 3,148, 82, 52,240,178, 70,247, 79,199, 24,117, 80,169, 67,157,224,254,253,250,125, 58,101,202,228,110,207,158, 61,139,223,189,
-123,247, 21, 0,104,222,162,133,215,162, 69,139,250, 45,179,180, 18, 75, 29,234, 36, 43,211, 34,239, 84,203, 92, 57,120,218,248,
-249, 7, 15,223,189,241, 71,126,171, 78, 3,190, 48,113,240, 92, 94,148, 22,155, 85, 29, 45,177,171,127, 77,115,129,112, 30, 97,
- 24,190,185,157,187, 29, 0,152, 57,250, 29,183,243,108,102, 48,177,176,123, 80,172, 84,110,203,120,114,114, 99, 69, 19,118,106,
- 52, 90,175, 9, 95,127, 78,238, 63,207, 70, 77,255,102,204,170,197, 51,193,234,245,102, 19,103,204,111,127,235, 22, 0,224, 46,
-151, 21, 57, 56, 56, 56, 56, 56,254, 5, 6, 11, 0, 76,164,124, 68,191, 72, 3, 0, 88, 72,129, 47,135,246, 65,122,122,154,183,
-214,192, 98, 72,255,158,184, 23,149,138,232,184, 76, 80, 74,225,237, 34, 51,250,160, 60,176, 65,159,127,241,121,203, 83,167, 79,
-223,254,110,214,119,219, 9, 41, 25,189,123,195,175,191,133,206,158, 51,123,196,224,161,131,219,237,223,191, 63, 2, 64,181, 12,
- 22, 35,176, 88,241,195,162,185, 38, 73,153, 42,213,132,201, 83,121,147, 38,142, 91, 6, 96,104,117,204,149,159,171,203,247, 87,
- 78,239,151,201,100, 50,108,220,184, 81, 12, 28,194,192,110, 45, 68,157, 63,249, 4,181,125, 3,154,252,184,102,119,189,211, 34,
-209, 23, 54,222,237,122,102,197,156,121,107,213,166, 72, 36,124, 54,119,201, 47,190,212,194,151,204, 28,217, 9,117,106, 57, 34,
- 57, 51, 31, 45,218,119,231,221,190,125,183, 9,103,176, 56, 56, 56, 56, 56, 56, 62, 46, 42,108,228,110, 48, 80, 68,199,165, 34,
- 58, 46, 21,183,163, 50,161,101,121,248,105,225,116,252, 48,119, 42,178, 21,192,129,235,137,136,137, 75, 67, 76, 92, 26,178,114,
-139,254,178,255,155, 93, 45,127, 90, 34,107,184, 98,133,249,143,237, 91,200,195,172, 44, 45, 45,159, 70,108, 47,158, 61, 41,221,
-111,222,132, 68,161, 64, 98,159,100,105, 95,163,201,190,253,251,235,216,219,218,201,205,204,204,167, 90,249,182,223,100,225, 30,
-102, 94,145,230, 95, 76,161,131,127,203,174, 93, 59,119,118,176,183, 99, 71,173, 8,143,170,227, 91, 91, 95,219,219, 55,204,196,
-193,167,229,187,246,121,155,166,216,213,191,166,167,163,253,247,151, 78,238,151,169, 84, 42, 60,126,252, 24,217,217,217,165,219,
- 3,246,246,142,112,115,113,194, 47,139,167,200,230, 78, 31, 19, 40,150,200, 14, 17, 66,200,219, 52,211,243,139, 78, 31, 59,113,
- 38,253,216,158, 95, 88, 0,200,204, 45,198,133, 59,207,112,247, 73, 98,149,110,214,127,163,235, 42,167,201,105,114,154,156, 38,
-167,201,105,254, 19, 52, 63, 54, 42,140, 96,197, 38,230, 32,250, 69, 26, 6,119, 9,130,139,179, 35,110,199,228, 34,191, 88,135,
-188, 98, 45,242,138,181, 96,249,166, 72, 43,200, 67, 65, 78, 58,158, 38,100,161,178,137, 41,120, 98, 65,255, 9, 19,242,167, 20,
- 45,172,157,122,241,196, 88, 56,219, 62,173, 51,109, 90, 94,187, 21, 43,204, 53,118, 14, 22,126,163,135, 15,233,112,232,192, 31,
- 68,163,214,192,195,221, 85,210,188, 93,247, 97,191,109,217,233, 0,160,147, 49, 39, 99,107, 91, 71, 46, 54, 49,217,254,253,119,
-147, 37,139,127,143,142, 47,214,160,248,207,235,233,207,167, 76,159,109, 54,242,179,126,191,218,218,214,105,144,105, 68,227,114,
-177,171,127, 77, 55,107,235,239,175,158,218, 47,211,106,213, 72, 77, 77,133, 70,163,129, 94,175, 47,249, 93, 34,129, 88, 34, 65,
-129, 82,143,172,124, 53, 90, 54,111,194,107,120,234,170,175, 86,171, 29, 9, 96,253, 95, 50, 98, 86, 76,145,169,115,128,252,248,
-161,189,204,158, 51,247, 97, 33,151,226,250,189,103,184,123,249,184,129, 82,245,245,178,237, 76,157,106,123, 3,146, 83, 32, 68,
-252,106,103,194, 38, 21, 38, 61, 10,226,178, 42, 7, 7, 7, 7, 7,199, 71, 96,176,138, 20,197,207,134,142,154, 12, 79, 59, 7,
-243,238, 97,126,162,240,216, 60,100,166, 38,224, 89,204, 99, 40, 84, 58, 8, 45,107, 2, 18, 7,184,123,184, 33, 42,233,154,102,
-253,186,219,249,172, 94,245,236, 93,122,221,187, 59,185, 56,218,202,153, 31,151,214,184, 25, 19,157, 27,184,107,214, 22,124,250,
-169,137,205,143, 75,107,220,140,127, 46,103,100, 98, 67,147,161, 3,186, 19,232, 20,152, 54,109, 10,186,119,233,136,207,135,245,
- 35, 59,119,255,222,216,216,147,209,136, 36, 75,102,127, 55,223, 52, 45, 79,171,189, 29, 83,164,150,201,165,210,107, 79,139,138,
-253, 61, 44,165,221,250,143, 42, 56,184,123,205,124, 0,147, 42, 51, 87,142,102,102,223, 95, 63,251,135,140, 82,138,228,228,100,
-104,181, 90,232,116,186, 87, 6,203,194,194, 2,121,197, 90,104, 50, 20,200,200, 83, 67,111, 96,209,169, 99, 39,217,221,123,145,
-131,222,102,176, 0,128,101, 9,171,215,107,113,224,244, 93, 36,222,217, 71, 9, 17,190,106,228, 94,102,174, 28, 28,106, 92,238,
-210,107,136,173, 72, 82, 82,221, 90, 88,172,198,182,245, 75,185, 92,202,193,193,193,193,193,241,177, 24,172,152,235, 7,154, 3,
- 64, 96,219, 33,233, 38, 18,190, 29,159, 33, 72, 79,138,197,182,101,227,193,178, 20,157, 71,252, 8, 83, 15, 7, 72,133, 60,168,
-139,115,242, 83,239,239,179,175,232, 64,132,232,218,173,217,144,236, 49,102,116, 45,179, 93,187,138, 4, 0,176,107, 87,145, 96,
-244, 40, 87,179,181, 27,226, 60,154,180,105, 9,106, 48,160, 75,247,222,232, 63,160, 63,226,211, 20,248,227,242, 75, 40,148, 90,
-163,230, 63,147,216,123,187, 59,185,122,245, 30, 63,184,141, 41,159, 71, 72,109, 55,115, 94, 98,166, 78,207,227, 9, 12, 71,238,
-228,167,244,234,218,195,230,204,145,157, 29, 37,246,222,171, 85,233, 49,241,239,210, 49, 23, 8,231, 93, 59,253,135,140,199,227,
- 33, 33, 33, 1, 90,173,246,213,162,211,233, 74,140,143, 82,135,212,108, 53,132, 58, 37, 50,242,212,200, 45,214,194,209,204, 2,
- 58,157, 46,224, 93,186, 6, 86,125,164,107,207,193, 93,193, 80,134,165,244,160, 42,237,209,171, 52,148,153,171,142,221, 63,181,
-189, 28, 30,139,103,119, 79,228, 82, 86, 95,114, 48,194,114, 83,149,112,112,112,112,112,112,252, 63,195,168,129, 70,147,211,115,
- 96,109,194,135,173,147, 7, 6,141,255,169,196, 48, 24,116,160, 20,208, 27, 88, 24, 51,103, 61,165,130, 51, 95,141,246,136,115,
-247, 32,249,131, 62,149, 41, 1, 96,208,167, 50,165,187, 7,201,255,106,180, 71,156, 66,107,169,213, 27, 12,184, 22,145,129, 31,
-247, 62,193,236,173,143,112,242,174,241,195, 97,241, 5,210, 9, 63, 44, 94, 36,227,243, 8,137, 72, 40, 42, 74,202,214, 23,241,
- 4, 2,173, 76, 38,162, 26,202, 87,199,103, 26,178, 59,246, 29, 29,207,227, 9,198, 84,158, 86, 22,148, 82,168,213,106,104, 52,
- 26,104,181, 90,104, 52,154, 87, 6, 43,191, 88,135,212, 28, 21, 18, 51,149,120,153,169, 68, 82,166, 18,233,185, 42,188,171, 35,
-161,169, 83,109,111,107, 11,171, 11,214,150,166,211,173,204,204,166, 90,152, 88, 92, 44,169, 14,124,221, 92,221,140, 72, 65,236,
-253,179,233, 6,173,162, 95, 97,242, 3,251,194,228, 7,246, 92,245, 32, 7, 7, 7, 7, 7,199, 71,104,176, 88, 0, 79, 19,178,
- 32,226,179,112,113,247, 4, 45, 55,129, 61, 5,160, 55, 84, 60,169,125, 25,135, 14,165, 36,213,242, 42,102,167, 78,125, 25, 26,
- 80,215,250,225,232, 81,174, 81, 1,117,173, 31, 78,157,250, 50,180,150, 87, 49,171, 51,136, 12,148, 82,176, 20,165, 11, 5, 53,
-198,185,149, 66, 8,175,113, 3, 95, 55,254,188, 93, 79, 95,142, 89, 27, 19, 45, 20, 10,117, 46, 54, 50,226,102, 47,227,213,176,
-149,138,212, 58, 70,237, 83,183,145,150, 0, 13, 43,210,201,215,105,231, 52,235,208, 87,161,213,234,225,234,234,250,154,185, 42,
-171, 34,204, 87,104,145,154,171,194,203, 76, 5, 18, 51, 21, 80,168,245,120, 28, 19, 7,194,240, 30,191, 77,211,204,212,234,212,
-177,131,251,106,212,247,171,101, 87,199,219,221,110,227,214,237, 53, 36, 18,139, 83,166, 78,181,189,107,120,248,132,223, 58,251,
-187,237,205,136, 20, 36, 68,223, 77,211,171, 11,118, 23,167, 71,157,227,178, 38, 7, 7, 7, 7, 7,199, 71,108,176, 0,192,205,
-197, 30,183, 30, 39,192,205, 86, 2,115, 51, 83, 68,197, 38,129,199, 8,192, 16, 64,167, 55,222, 4, 81,173,110,239,207, 63,155,
- 47, 75,136, 51,220, 90,187,238,249,179,132, 56,195,173,159,127, 54, 95, 70,181,186,189, 64, 73,239,188, 18,147, 85, 98,180, 12,
- 85, 24,126,147, 82,214,206,214, 66,194,191,251,188, 56,155, 97,120,106,107,115, 9,107,109, 46,102, 28, 45,196, 2, 23,107,161,
- 80, 36, 98,224, 96,107,163, 7,165, 21, 86,101,170, 19, 35, 94,164, 22, 20,204,108,222,190,183, 66, 32, 16,192,195,195, 3, 26,
-141,230,181, 70,238, 25,153,185,175, 34, 88,169, 57,106, 72, 69, 12,238, 95, 59,167, 48, 24,116,219,222,166,201, 19, 8,205,109,
-108,172,241,237,130,159, 49,117,206,207, 72, 46,224, 67, 40, 22, 59,184,123,248, 63, 24, 58,102,150,236,235, 13,207, 48,180,133,
- 57, 20, 89,177,201,138,116,201,116, 46, 91,114,112,112,112,112,112,252,255,166,242,169,114, 40, 96, 34,147,128,242, 36,184, 18,
- 30, 11,159, 58,245,176,245,240,109,120,213,109,140,212, 66, 61,170, 50,157,225,228,233,138,123, 0,238,117,239,238,228,210,179,
-167,115, 59, 74, 5,103,214,174,207, 79, 2,128, 77, 71,122,129, 2, 96, 89, 90, 98,180, 74, 71,136, 55, 22, 2,164, 36,164, 23,
-154,122, 56,200, 17,153,164, 85,203,197, 66,198, 82, 46,226,217,154,139,132, 66, 62, 31, 6, 74,212,217, 57, 25,133, 0, 73,169,
- 76, 75,157, 24,241, 66,236,234, 63,179, 69,167, 1,223, 95, 57,249,187,204,211,211, 19,247,239,223,127,101,176, 10,139,138,145,
- 83,160,132,204, 10,240,118,145,227, 73,248, 21, 67,118, 70,114,100,110,204,201,141,111,211, 99, 89,240, 84, 90, 3, 30, 60,207,
- 71, 94,177, 14,121, 69, 90, 52,109,213, 85,216,180,109, 55, 92,126,156,133,220,124, 5,230,110,249,179,192, 64,117,253, 41,141,
-212,113,217,146,131,131,131,131,131,227,255, 55, 70,185, 35, 3, 75, 97, 99,109, 5,137,220, 12,113,233, 90, 20, 18, 59,228, 42,
- 40, 12,134,138, 35, 88,132,144,182,111, 91,127,232, 80, 74,210,193,131,153,155, 14, 29, 74, 73, 42,239,228,216, 87, 85,132,165,
-127, 89,106,180, 38,165,134, 19, 71,206, 92,207,233, 22, 98,107,201,240,120, 74,161,128, 81,243,133, 60,173,144,207,232,132,124,
- 70, 99,111, 38,224,157, 63,188,147, 33,132,158, 55, 70, 83,157, 24,241, 34, 46, 35, 99,102,235, 46, 3, 21,118,246,246, 24, 60,
-120, 48, 92, 93, 93, 1, 0, 38, 18, 2, 27,145, 2, 60, 85, 10, 46, 29,222, 92, 28, 21,126, 33, 28, 6,117,207,242,163,185,191,
-166, 73, 41,155,149,167,134, 82,163, 71,110,145, 22,185,197, 90,232,109, 67,113,240,122, 10,178,242, 53,136,189,190, 93,161, 86,
-228, 78, 80,165, 63,141,171,208, 68,190,227,220,223, 7, 78,147,211,228, 52, 57, 77, 78,147,211,252, 39,104,126,108, 24, 49,217,
- 51, 69, 45, 71, 57,188,156,229, 80,105,237,160,210, 24, 80,172, 50,160, 64,161, 69,129, 66,135,184, 52, 5,158, 94,120,255,132,
- 80, 0,148, 5, 8, 74,170, 10, 65, 74,140, 29, 37,198,237, 95, 44, 40, 88,246,227,162,185, 3,246,236,251, 19,227, 62,113,116,
-125, 24,167, 73, 33,132, 81, 50, 60,190,206,202,148, 47,120, 30, 27,157,122,233,244,254,160, 98,145, 98,184,177,105, 42,139,100,
-249, 52,108, 61, 15, 20,124,141, 50, 95, 62,189,105, 29, 60,120,240, 80, 21, 21,155,166,231, 73, 44, 30,178, 6,237,142,220,152,
-138,167,202, 97,132,146, 39, 55,195, 31, 53,150, 90,187,161, 72,169, 67,161, 82, 7,133,186, 36, 26,246,242,254, 33, 77, 94,114,
-212,239,133,201, 15,182,114,217,145,131,131,131,131,131,227, 95, 98,176, 20, 74,197,179,118,189,134,191,154,208,217, 96,160, 96,
- 89, 10, 67,105,132,137,165, 20,122,173,242,217,251, 38,196,192,178,183,215,109,221,211,185,126,131,198,188, 58, 53, 76, 80,144,
-155,137, 59,183,110,232, 41,203,222, 48,202,160,197,199,171, 77,236,125,251,245,235,221,115,207, 23,163,198, 21,180,104,209, 74,
-108,109, 99,166, 77,207,204, 40,216,185,113,183,225,232,159,123,130,192,178, 67,104,124,188,186, 42,233, 82, 39, 70,188, 0, 48,
-168,212,177,183, 6,234,180, 84,102, 62,237,162,200,136, 57,111,172, 70, 86,114, 98,175,159,126, 88, 24,223,109,208, 87, 34, 75,
-123, 79,104,116, 60,164,167,167,227,249,237, 3,170,162,148,136,131, 69,201, 15,134,115, 89,145,131,131,131,131,131,227, 95,100,
-176,158,222, 40, 25, 15,235,191, 77, 78, 78,250,224, 29,187,255, 92,184,115,239,225,166,106,173,214,153, 5, 47,209,160,211, 93,
- 18, 23,102,207, 54, 86,163, 40, 61, 42,146,184,187, 7,253,246,203,178,137,191,174,249,185, 13, 88,131, 15, 8,137, 35,132,158,
- 47, 18, 42,190,172,170,185,122,155, 87, 34,205,142,183, 7, 80,165,137,163, 21, 89, 81,105, 38,246,181, 92,119,255,186,244, 71,
-134,225,181, 55, 24, 88, 1,107,208, 61, 51,104, 85, 63, 40, 51,163, 15,211,170,116,151,228,224,224,224,224,224,224,248,255,111,
-176,254, 87,228,196,222, 42, 4, 48,238,125,117, 74, 77,212,226,210,229,131, 66, 41,125, 12,224,113,117,246, 45, 74,127,158,137,
-106, 76, 56,205,193,193,193,193,193,193,241,255, 15,134,187, 4, 28, 28, 28, 28, 28, 28, 28, 28, 31, 22, 2,224, 29,189,242,140,
-159, 41,187, 58,189, 9, 42,211,231, 52, 57, 77, 78,147,211,228, 52, 57, 77, 78,243,227,211,172, 76,187, 42,254,227, 31, 13, 45,
- 29, 49,253,191,177, 0,104,203,105,114,154,156, 38,167,201,105,114,154,156, 38,167,249,111, 91,184, 42, 66, 14, 14, 14, 14,142,
-127, 29, 54,222,221, 76,108,188,187,153, 24,187,189,109,157,190,246,182,117,250,218,115, 87,142,195, 88,248,220, 37,120,127, 8,
- 33, 98, 0, 44,165, 84,251,119,165,193,210,178,166,153,222,212,230, 0,195,170,127,200, 79,124,120,230, 67,159, 95,157, 58,117,
- 26, 0, 64,100,100,228,125, 74,233,251,246,198,132,220,222,103,160,165,153,197, 72, 45,171, 49, 40,138, 21,235,138,210, 98,246,
-127,200, 52,219,218,214,145,107,196,210,165, 32,180, 19, 40, 24, 74,200,121, 94,161,110, 98, 94,222,131,252,138,246,171,209,125,
-177,239, 23,253, 62,153,181,233,247, 99, 11, 95, 30,154, 17,245,230,239, 86,157, 86,155,142, 29,210,126,218,154, 61,135,150,100,
- 29,158, 90,196,229,254,170, 83,163,217,167, 22,122,190, 3, 47,229,226,178,236,170,236,231,226, 19, 26, 33, 16, 8,108,181, 90,
-109, 70,114,204,205, 0, 99,246,113,245,109,114,143,199, 99,156, 12,122, 54, 41, 49,250, 58, 55,113,186, 17, 72,237,106,133, 66,
-175,255,150, 2, 4,132,255,147, 42,251,249,123,141,116,232,228,228, 36, 53, 55, 55,111, 97,102,102,230, 42,147,201, 36,185,185,
-185,202,220,220,220,151, 9, 9, 9,231, 41,165,250,191,227, 28,109,253,123,204,224,139,152, 57,165,255,158,151, 25,113,112,113,
-197,219,119, 95, 72, 24, 50,163,244,223,139, 51, 35, 14,205,250, 39,220, 43,251,186,189, 66, 64,217,137, 12,195,107, 98,160,250,
- 69, 25,143, 14,173,173,202,254,161,161,161, 61,116, 58,157,184,236,255, 2,129, 64,125,227,198,141,131,220, 83,240, 55, 25, 44,
-151, 58,125, 45,117,124, 58,151,207, 99,122,179,148,154,166,222,223, 39,255, 39,159,160, 91,200,144,187, 12,195,184,148, 95,199,
-178,108, 82,194,173,237, 31,164,176, 37,132,184,252, 52, 33,112, 90,122,182,178,128, 16,178,224, 93,230,195,190,193,192,235,132,
- 33, 53, 9, 33, 96, 24, 2, 94,201, 0,170, 41, 47,111,237,104,248, 22, 77, 71, 51, 57,223,187,160, 88,255,152, 82, 90,233, 75,
- 72,106, 93,219, 73,102,237,124, 41,172,199, 88,143,187,167,183,248,153,216,251,182, 41, 74,143,138,252, 0,231,102,235,233,233,
- 25,236,237,237,109, 61,118,236, 88, 33, 0, 44, 95,190,220,203,203,203, 43, 59, 54, 54,246, 14,165, 52,179, 90,230,202,206,119,
-240,202,101,243,183,119,234,212, 25, 41, 89,197, 88,250,243,154, 48, 19, 7,239,190, 31,202,100, 17,167, 64,169,133, 92, 30,241,
-245,196,217,206,157, 91, 5,243,115,139,181, 56,126,254,246,160,253,155,126,104,109, 97, 81, 63,160, 34,147,197, 42,242,103,217,
-155,208,142,172, 34, 31, 0, 6,190,249,187,179,137,174,173,173,212,208,209, 81,204,191, 15,224,207, 74, 95, 46,193, 67, 79, 9,
-132, 66, 55, 66, 24, 48, 4,224,241, 8, 24, 66,192, 16, 64,175,211, 36, 60,187,178,185,195, 63,162,160, 14, 28,156, 70, 8,177,
-102,152,146,244, 17, 2, 48, 12, 3,126,201,200,191, 5,207,175,111,177,254, 0,249,201, 60,192,203,194,255,147,166,205, 54, 95,
-122,145, 35,175,209,114,226, 49, 66,153,181, 9,151,127,122, 96,204,254, 18,137,196,242,200,145, 35,182, 29, 59,118, 52,183, 15,
-232,113,201,152,125, 76, 68,146, 58, 71,143, 30, 22,118,236,216,161, 10,249,211,167, 29, 24,102, 7, 1, 4, 44, 75,151,243, 88,
-250,123, 81,118, 76,108, 85,135, 83,177, 11,232, 49, 31, 4,126, 70,239, 64,241, 36,227,241,193,217,213,188,182, 60,169,157,207,
-103, 82,137,100, 74,109, 31, 63,239,184, 23,177, 49, 5, 5,249, 63, 43, 51, 98, 54, 81, 74,217, 42,137,233,244,223,156,189, 18,
-222,137, 47, 16,144,142,109, 66,120, 0,222,203, 96,217,219,219,247, 88,189,122,117,173,208,208, 80, 0,128, 94,175, 55,219,183,
-111,159,195,130, 5, 11,228,198, 60, 67,111,195,217,217,217,217,220,220,188,134, 84, 42,117, 6, 0,165, 82,153,156,159,159,255,
- 50, 57, 57, 57,185,178,125, 29, 26,244,181, 97, 24,204, 63,249,231,175,124, 0,232,208,107,228, 66,143,176,111, 44, 9, 79,160,
-124,219,246, 6,189, 70,206, 16, 50,241,220,145, 45, 4, 0,218,116, 27, 54,221,182, 78,223, 95, 50, 35,247,165,255, 45, 31,244,
-125,251,242,108,158,106,123, 16, 74, 38, 5, 6, 5, 55,238,221,189, 19,252, 60,157,208, 99,192,232, 41, 0,170,100,176,116, 58,
-157,120,255,254,253, 46, 12,195,240,244,122,189,170, 95,191,126, 25,239,147,182,218,205,134, 94, 7, 33,174, 90,189,254,183,132,
-155,158, 11, 41,157,195,190,153,118,199, 56,254, 76, 16,102, 4,101,217,196,212,123,187,155,112, 6,171, 20, 27,239,110, 38, 60,
-177,240,113,171,230,141,173,167,143,238, 41, 90,255,251, 21, 56, 53,232,151,156,114,255,119,231,127,234, 9, 50, 12,227,114,112,
-215,106, 59,153,136, 7, 0, 40, 82,233,209,107,112,229,163, 65, 56, 7, 15,186, 8, 2,159,178, 58, 84,131, 65, 47,225,243, 5,
- 42, 2, 0,164,164,119,128, 84, 42,186,185,105,102,104,254,176,174, 53,135, 76,251,229,222, 86, 0, 22, 0,210,222,250, 80, 48,
-140,203,158,205,203,237,156,173, 37,224,243, 8,138,148,122,244, 28, 50,201,240, 54,195,182,105,102,232,252,193,157,220,251,219,
-117,252,163, 23,128, 19, 21,190, 64, 28,234,248,154,218, 56,157,233, 61,114,190,147, 2,102,248,110,225,114,187,107,167,247, 93,
-105,219, 99,184,246,101, 82,146, 66,175,213, 69,103,231,164, 78, 46, 76,137,121,106,108, 65,109, 98, 98, 82,203,196,196,164,126,
-167, 78,157, 36, 83,166, 76, 17,132,133,133,189,250,253,203, 47,191, 20, 94,188,120,209,113,217,178,101,157,157,156,156, 84, 69,
- 69, 69, 15,138,138,138,158, 83, 74, 13,198,222, 19, 7, 7,219,175,123,247,236,138,214,189,190,130,129, 37,248,114,204, 68,156,
- 58,241,231, 40, 0, 31,196, 96,153,240,152,121, 35,198,126,235,220, 34,180, 33,127,241,190,167,176,144, 9,209, 62,164, 33, 95,
- 34,248,198, 97,247,111,203,126, 6,240,249,219, 34, 87,172, 34,127, 86,128,141,102, 64,183,208,154, 56,188, 91, 51,192,165,237,
- 52, 48, 50,243, 87,145, 44,207, 78,227, 76, 45,165,210,213, 78, 22, 60, 59,177, 33,115,181,103,167,113,103, 99, 79,172, 42,172,
- 40, 45, 2,161,208,109,211,234,239,107, 91,154, 10,193,103, 8,120, 60, 2, 62,143,129, 74, 99,192,144,209, 51, 62, 84,132,145,
- 39,181,171,221,153, 1,134, 1, 0, 11,108, 81,102, 60, 61, 94,149,123, 66, 24,158,245,190,205,203,248,118,230, 98,240,120, 4,
- 60, 6,224, 49, 4,241,233, 74,140,157, 50,215,252,125,141,122,167,166,118,193, 23,127,105,217,161,113,128, 85,189,189, 55,136,
-121,227, 78,253,173,179, 84,178,207,246, 28,186, 48,160, 70,139, 73,183, 40,101,127, 76,188,178,226,116, 69, 58,106,181, 58,189,
- 67,199, 78,102,132, 47,151,157, 61,184,181, 5,159, 33,208, 25, 40,244,134,146, 65,144, 89, 74, 81,242,221, 82,242, 17, 67, 89,
-138, 17, 35,190, 64,135,142,157, 20,172,158, 77,170, 66,161,177,227,228,217,107,182,106, 29,139,101,171, 55,205, 47,206,207,156,
-255, 34,202, 58, 94,102,239, 61, 81,145, 30,115,216,248, 19,135, 95,204,245,125, 61,119, 29,189,137,128, 58,126, 37, 3, 53,179,
- 20, 62, 46,114,236, 58,118, 19,190, 62,190, 37,233,102, 41,188, 93, 77,208,242,147, 33,213,188,190, 97,124,185,189,239,238,110,
-125,134,246,233,213,103, 32,172, 44,205,160,209,170,189,207,157, 58,254,235,186,213, 75,155, 18, 66, 62,171,146, 57,164,134, 87,
-239, 5,202,178,239, 93,203,225,228,228,100, 27, 28, 28,252,234,255,122,189, 30, 30, 30, 30, 72, 78, 78,246,169,134, 89,147, 57,
- 57, 57,125,178,116,233, 82,187, 86,173, 90, 9,108,109,109, 1, 0,153,153,153,206,151, 46, 93,106,216,176, 97,195,140,148,148,
-148, 99,233,233,233,138,119,154, 10, 86, 37,228, 81, 62, 79, 44,150,150,250, 90, 48, 83,198,126, 90,207,214,214,246,173, 31,199,
-217,217, 57,162, 57,115,102, 19, 62, 95, 80,178, 61,165, 12,101, 13,239,156, 99,164, 73,147, 38,221,180, 90,173,228,109,191,101,
-233,109, 59,171, 88, 81,255,146,183, 8,192,231,241,114, 83,238,239,183, 53,218,180,215,235,222,222,145, 17,172,235,218,189,187,
-123,143,206, 97,112,180, 53,199,249,155, 49, 24, 63,243, 39,232,244,134, 21,213,185, 63, 60, 30,143,159,145,145, 17,111,105,105,
-233,240, 1,222,183, 53, 15,237, 90,101,119,225,202,221,233,191,136,247,140,174,213,108,152,174,164, 61, 82,201,204, 44, 62, 18,
- 51, 65,203, 30,109,205,172,156,125, 37, 27, 87, 47, 22,112, 17,172,242, 55, 66,196, 91,208,172, 73,176,245,244, 9, 95,136, 22,
-108,186,132, 27,167,142, 41, 83,238,239,251, 32,230,202,212,206, 39,148,240,248, 35, 9,143, 39, 39, 12, 17,177, 6, 54, 81,175,
-209, 44, 84,100,197,164,190,175, 54,203, 82,252,113,189,138,198,156, 82,175, 95,127, 89,102,103,111, 33,134, 74,107,192,176,175,
-191,195,134, 21,243, 77,109,205, 69, 80,107, 13,216,122,248,110, 86, 93,197,114, 58,172, 99,205, 33,223,111,138,248,243,199, 29,
- 81,127,150, 60,171,239,204,120,176, 51, 23,227,251, 61, 49, 48,147, 10, 96,105, 42, 4,195,188,221, 92, 13,235, 90,162,153, 87,
-168,209, 19, 66, 68,148, 82,205, 91,141,132, 99, 64,115, 51, 91,151,253, 61, 71,204,183,141, 73, 39,160,208, 34,214, 76,130,222,
-131, 71, 91,212,114,144, 66, 46,225, 33, 62, 49,213,227,155,169, 83,131, 36,142,190,193,170,212,168,151,149,157,182,187,187,123,
-175, 46, 93,186,200, 38, 79,158, 44,112,117,117,197,142,125,167,220,218,245, 25,215, 53, 57, 45,219,149,165,128,189,157, 85,226,
- 23,253, 59, 31, 57,126,252,120, 66, 98, 98,162, 96,233,210,165, 33, 7, 14, 28,168, 83,149, 47, 81, 3,165, 80,169, 13, 48,148,
-190, 24, 51,243,213,213,120,169, 16,230,221, 95,230,180,123,135,176, 96,254,242,131,207, 81,168,208, 67, 38,226, 35, 54,181, 24,
-161, 33,193,252,189, 27, 73,171,183,237,241, 69,191, 79,102,217,155,208,142,221, 66,107,194,206, 82,134,205,191,124,143,195, 55,
- 94,116, 76, 47, 34,176,233,182,116,164,163,152,223,206, 86, 38, 92, 29, 22,228,233,208, 58,208, 13,119,130, 60, 29, 46,135, 71,
-199,212,237,247,243,216,228, 34,193,217,156, 19, 99,223,106,180, 24,194,192,202, 84,136, 77,167, 18, 32,147,240, 33,151,240, 33,
- 23,151,252,101, 24,242, 94,249, 90,234, 84,199,149,199, 26,190, 48,115,170,243,197,128,126,125,157, 62, 29,208,151,130,199, 96,
-223, 31, 71,186,239,220,185, 35,213,196,193,103,163,129,225,109, 82,166, 68, 38, 86,126, 61, 1, 59,115, 17,190,217,248, 24,102,
- 82, 1, 76,101, 2,152,201, 4,104, 93,207,182,218,233, 36,132, 88,142,234, 94,171,243,195,237,109, 91,249,212, 48,169,253, 32,
- 54, 63,242,139,133,119, 87, 92,204,107, 53,225,151,229,117,172,139,242, 52,252,217, 83, 70,240,147, 82, 82, 90,237, 59,114,169,
-181, 83,163, 47,162,245,218,226,111, 51, 30,252,126,232,109,122,137, 81,215, 27,186,132,246,149,104,139,116,143, 30, 68, 39,121,
-230,170,197,136,136, 47,128, 92,194,135, 73,217,181,149,240, 33,151, 8, 96, 34,225, 35, 37, 41, 14, 57,197,188,171,201,214, 76,
- 43,122,241,122,149,170,162, 84, 90, 3,238,191, 40,130,187, 79, 3, 56, 58, 58, 65,211,121,144,251,173,243,127, 28,146, 59,250,
- 45, 46, 78,125,242,173,177, 58,187,142,222,196,130,197,203,159,130,224, 73,233,219,220,111,242,164,177,181,127,250,121,245,107,
-235, 70,127, 53,166,118,117,205,181,204,222,103,103,203, 79, 6,247,169,219,184, 61,158,199,197,225,196,145,187,104,211,174, 19,
- 58,119,237, 5,141, 70, 61,100,211,134, 85,119, 0,172,249, 75,153,235,232,215,172,110,128,223, 78,103, 39, 39, 87,150, 45,153,
- 3,150, 82,160, 89,203,214,152, 58, 97, 4, 88, 74, 81,191, 97,163,214,157, 7,140,165,148,150, 24,193,172,236,172,226,232,168,
-200,182,202,244,168, 91, 70, 95, 75,149, 74,151,153,153,137,251,247,239, 35, 38, 38, 6, 17, 17, 17,200,206,206,134,185,185,121,
-149,170,216, 45, 45, 45,205,130,130,130, 62,253,253,247,223, 37,230,230,255,241,252, 26,141, 6, 50,153, 12,221,186,117, 19, 52,
-107,214,204,121,232,208,161, 67, 45, 45, 45,119,229,230,230, 22,188,213, 48, 61, 60,154,226, 80,183,199,250,206,125,190, 28, 13,
- 0, 66,177,201,139,149,191,253, 25, 81,209,177,133, 18, 51,183,182, 61, 62,247, 4,165, 32,132,172,204,138,250, 51,237, 93,219,
-106,181, 90,233,222,189,123,157, 9, 33,175,189, 95,231,173,220,211,244,241,179,180, 54,235,230, 78,227,155,153, 72,144,153,167,
-198,200,209, 99,109,140, 54, 87,117,187,143, 9,110,216,112,205,119, 83, 70, 64, 46,147,226,244,173,231,152, 56, 99,137, 62, 39,
- 43,125, 59, 8, 89,158, 25,113,224,125,107, 45, 62,200,128,215,181,157, 77, 96,218, 33, 84, 50,162, 95,152, 68,163, 51, 32,175,
- 88, 7,181,214, 0, 3, 75,145, 95,172, 67,228,203, 66,216,152,137,176, 17, 31, 63, 85, 50, 88,124,129,168,203,184,207, 58,139,
-150,237,186,133, 27,167,118, 41, 83,238,237,147,149,253,230, 26, 52,224, 69,226,221, 61, 53, 95,247, 40,149,119,181,148, 58,213,
-113,229, 19,222,207, 45,195, 90,180, 31, 61,102, 12,124,106,185, 8, 13, 6, 3,125, 28,243, 66,183,117,211,230,207,204, 93,235,
-174, 40, 72,122, 60,171,236,101, 90,213,238,155, 44,203, 38,189, 25,177, 98,217,215,191,102,223,166, 73, 8, 96, 97, 34,194,250,
- 19,113,160, 20, 32,160, 48,151, 11,176,231, 98, 18,242,179, 83,178,234, 41,150, 95,251,162,163, 77,183,133,155, 34, 15,173, 61,
-146, 30, 14, 32,130, 82,154,254, 46, 77, 66, 8,248, 60, 2, 51,153, 0,230, 50, 33, 44,228, 66, 48,132,188,211, 92,125,247,235,
-195,173, 0,162,203,155,171,242,154,114,123, 31,127, 51, 27,183,131,189, 70, 45,182,124,248, 82, 11, 62,143,160,166,131, 20, 86,
-166, 66,104,244, 4,241,153,218,210,125,204,240,213,228,121,182,211, 38,141, 62, 78, 72, 88, 61, 74, 47,234, 43, 58,119,133, 66,
- 33, 26, 60,120,176, 64,167,211,105,135,141, 95,216, 62, 45, 35,187,251,138, 69, 83,197,182, 54,214, 40, 86,233,112,239, 73,130,
-223,146,101,191,212, 60,118,238,230,193,111,191,234,121,168, 99,199,142,230,123,247,238,101,171,114,223, 51,211,179,126,217,188,
-115,255,246,229,203, 22, 33, 58, 33, 23,155, 54,172, 1, 53,232,215, 87,236,119, 95,215, 92,189,122,181,125, 72, 72, 8,115,251,
-246,237,172, 55, 13, 40, 33,144,103, 23,168, 97, 33, 23, 66, 38,230,195,222, 82, 2,107, 19, 17, 68, 2, 6, 12,243,159, 66,164,
-188,230,166,223,143, 45,100, 21,249, 56,188, 91, 51, 96,243, 47,223,227,243,175,103,226,113,150,232, 36, 35, 51, 95,248,213,128,
- 94,211,109,165,134,142, 78, 22,140, 93,235, 64,119,200, 37, 66,204, 24, 55, 24,141,194,227,237,146,243,216,153,153, 74, 94, 3,
- 0, 51,223,150, 78,166, 52, 98,101, 42, 19,224,226,209,221, 25,197,133,121,249,132, 87, 82, 69,168,211,104, 19,140,243,250,127,
-189,158,114,123,159,233,129, 13,234,125, 63,250,203, 47,152,166,161,141, 40,195, 8,144, 85,168, 33,148, 2, 19,198,142,194, 87,
-163, 70, 56, 36,166,100,204, 94,179,102,253, 44, 19, 59,191, 5, 69, 25, 79,230, 86,164,201, 35, 12, 24,134,192, 68,194,135,137,
-180,196,176,152, 72,248, 80,105, 12, 32, 4, 60,151,192, 1,249, 32, 0, 33, 36, 37,241,206,110, 63, 99,210,233, 84,183,211,185,
- 75, 25, 66, 95,197,113,213,141,103, 79,239, 45,188,253,240,229,109, 74,105, 78,141,150,147,134,106,245, 20, 69, 42, 61,226,210,
- 21,208,107, 41,249,188,147, 27, 60,250, 16,159, 69,155,239,109, 39,132,152,149, 69, 92,222,212, 76,186,177, 79,101, 83,183, 87,
-255,229,171, 54,220, 89,246,253, 76, 94, 86,190, 6, 44,165,144,136,120,144,138,248,165, 11, 15,202,226,124,172, 89,247, 91,154,
- 30,164, 23,189, 88,113,158,255,107,161, 65, 7,245,236,220, 98, 15, 1, 68,132, 17, 38, 57,185,185,187,181,233,250,153,164, 77,
-183,193, 48,232, 53,211,229,246,190, 23,138,211,163,206, 25,163, 25, 80,199, 15, 32,120,146,241,232, 96,175,146,151,100,143, 63,
-125,125,124,107,191,185,206,203,203,167,182, 49,247,189,236,227, 66,106, 91,251, 75, 47,223,186, 83, 71,127,183,193, 61, 46, 85,
- 1, 43,215,218,136,120,116, 31, 39,246,254,114, 79, 89,152,187,236,196,225, 63,167, 46,248, 97,101,253,174, 61,250,225,208,129,
-189,147, 9, 33,107,105, 9,103,203, 69,167, 6,109,221,248,171,171, 64, 36,134, 78,207, 66,103,160, 37,127,245, 6,228,228,228,
- 66,167,103, 33,145,153, 66,207, 18,232, 12, 44,116,122, 22,106,141, 94, 62,106,240, 39, 99, 0,220,122, 91, 58, 61, 66, 6,223,
- 5, 67, 92, 74,214,151,172, 19, 49,230, 10, 71, 71,199,237, 0, 32, 22,139, 33, 22,139,193,178, 44, 30,165,144, 9, 78,193,131,
-102,128,150,190,217, 89, 54, 41,245,222,238,160,119,157,187,171,171,107,215, 55,205,149, 74,165, 66, 81, 81, 17,174,221,121,104,
-190,109,223,217,142,241,137,105,181, 88,131,157, 90,234, 80,191, 3,128,174,239,186,158,105,143, 14,142,169, 17, 54,129,153, 60,
-122,176,215,202,223,246,223,126,122,114, 65,133,225,228,154,109,167,107,166,142, 25, 24,244,195,202,205, 79,147, 46,173,152, 88,
-217, 61, 18, 10,133,130,204,204,204, 87,207,247,252,213,127,116,122,153, 94,208,102,217,247,179,132,247, 94, 20,225, 81, 92, 26,
-134,182,173, 97,244,243,238,232,223,211,199,205,195,117,197,138, 5,227, 17,147,162,196,234, 63,110,227,210,177,237,225, 90, 85,
-225, 39, 25, 17,135, 51,170, 83,134,188,175,193,170, 72,243,194,195, 44, 20,169,244, 80,107,244,208,177, 20, 5, 10, 29, 50,242,
- 52, 40, 80,104, 81,164,212, 99,104,187, 26,248, 55, 80, 37,131,101,208,235, 92,156,156, 28,193,210,164,178, 8,103, 73,212, 35,
-100,128, 98,226,151,125,165, 78, 13,250, 20,167,220,223,111,116,155, 44, 83, 59,239, 38, 82,169,236,216, 79, 63,253,132, 1, 93,
-155, 75, 95,102,233,138, 30,190, 84,166, 23,107,160,183,179,245, 22, 45, 92,180,196,100,201,210, 31,191, 58,122,152,205, 3,240,
-227, 91,195,207,193, 3,239,242, 72,185, 54, 86,132,128,178,108, 82,210,157, 93, 65, 0,240, 62,109,173,138, 84, 58,240,152,146,
-182, 51,132, 0, 10,149, 30,197,185,105,217,229,205,213,173,100,135,231, 60, 94,166,150, 82, 90, 97, 21, 4, 67,128, 2,133, 14,
-230, 50, 1, 44, 76, 4, 48,151,255, 39,130,245, 14,115, 21, 81,145,166, 80,171, 77, 52,232, 53, 42,106, 48,160, 75,176, 45,236,
- 44, 68,112,180, 20, 67, 44,226, 67,167, 7,148, 26, 22, 42,141, 1,241, 25, 74, 20, 42, 69,168, 23,214,223, 43,197,241,166,194,
-198, 61,120,107, 86,252,157,145, 21,222,103,131, 1, 59,247,159,242, 74, 73,203,236,126,104,251,207,226,140, 2, 45, 30,196, 23,
- 33, 35, 79, 13, 16,115, 76,159, 57, 75, 60,123,246,156, 30, 59,255, 56,157,208, 50,196, 47,161,170,215,181, 56, 35,106, 71,189,
-166,159,252,210,165, 75, 15,211,136, 91,199,241,244,254,185,239,138,210,171,214,254,202,203,203, 75,255,203, 47,191,216,110,216,
-176,193,203,206,206,238,101, 70, 70,198,139,178,234, 40,143, 58,161, 41,103,207, 93,177,110,209,180, 57, 63, 41, 75, 5,107, 83,
- 33,220,237,229, 8,191,113, 65,195, 16,114,242,109,122,165,213,128, 3, 93,218, 78,195,225, 27, 47, 58, 70,100, 75, 46,142,248,
- 98,104,194,233,203,209,217,171,183,159,254,193,217, 68,119, 95,194,102,174,190, 27,228,233, 48,125,236, 96, 44, 94,181, 3,151,
-194,163, 51,138, 25,199,239, 83,213,250, 51,115,251, 79,125,123,212,151, 1,248, 60, 2, 83,169, 0,197,197,121,249,143,207,174,
-245,254, 64,207,238,208,211, 7,119, 48, 57,133, 58, 36,102,169, 72, 74, 78, 33, 12, 44,133,133, 76, 8, 61, 75,145,151,147, 69,
-118,238,216,142, 59,119,110, 48,224, 49,195, 1,204,173, 36, 18, 2, 30, 67, 96, 34, 17,148, 68,128,164, 37,127,117, 6, 22,181,
-107,186, 98,229,252,113,102, 54,118,246,104,223,107,164,241, 17, 54,185,101,253,109,235, 22,226,226,141,251, 97, 23,158,237, 14,
-182, 11,168,191,202,165, 78,223,101,140,149,179, 74,173, 53, 32, 63, 47, 23, 34, 77, 34, 26, 57,103,194, 74,102, 64,124,129, 35,
- 30,167, 61, 53,169,172, 58, 43,235,209,159,247,109, 3,122,206,218,127,228,252,226, 14,237,194,240, 56,190, 0, 82, 17, 31, 18,
- 17, 15, 18, 17, 15, 2, 98,192,207,235,214,235,114,243, 11,187,100, 61, 62,152, 85,141,252,121, 22,192,171, 54,103, 38,246,181,
-108,119,172,154,181,109,196,212,165, 29, 58,246,252,140, 60,190,115,225, 91, 0,231,140, 42, 51, 89,106,212, 58,150, 53,238,221,
- 70, 8, 97,236, 60,131,118,109,217,186,187,127,157,218,174, 72,207,211, 33, 37, 87,139, 43,247, 98,177,109,227,172,188,220,244,
-231,131,160, 45, 42, 98,137, 62,255,212,201, 35, 39,191, 30, 63, 21,254, 1,245,221, 11,146, 10,204, 0,228,191,118, 76, 30,217,
- 48,228,139,145,253,237,237,237, 77,255, 19,193,162,240,246,169,131,206,221,122,227,212,161, 3,136,140,120, 8,150,150, 12,231,
-195,178, 20,121,185,217,105,122,157,102,235, 59,211,199,227,185,108, 89,191,204,142, 97, 8,180, 58, 22, 26, 61,139,233,211,103,
-105,198,207, 94,221,172, 67,211,122, 17, 60,176, 5, 47, 83,243, 44,194,163,211,234, 18,129,169,227,160, 81,211,132, 42,181, 1,
-249, 10, 29,206,238, 91,249,238,106,198, 90,245, 67, 61,252,154,125,241,229,204,245, 98, 49,143,209,250,123,187,190,104,217,216,
- 63,177,134,147, 77,225,162,149, 59, 27, 93,191, 23,221,185, 87,175, 94,146,254,181,252,136,147,181,196,116,212,152,177,245, 28,
-106, 55, 27,146,246,244,234,246,119,190,252,248,226, 60, 87, 23,215, 87, 85,137,118, 1, 61, 30, 2,112,123, 99,179,132,140,199,
- 7,235, 1,128,157,189,131,138, 8,196,133, 85, 48, 32, 20, 0,230,173,218,223, 57, 41,179,168, 79,153,185,186,255, 60, 31, 98,
- 33, 3,173,206,248,166,113, 6, 66, 39, 76, 27,251,185, 32,167, 88,143,139, 15, 51, 17,113,247, 2,213,107, 11, 62,163,132, 63,
-204, 54,160,199, 16, 2,120, 80, 32,142, 33,248, 85,195, 96,107,222,131,131,249, 85,175,233, 41, 73,143, 93,157, 94, 77, 8, 15,
-157,121,124, 97, 48,192,250,234,117, 58, 59,134,199,203, 74,123,176,191,210, 30,148,229,207,168, 56, 61, 6, 75, 23,205,198,202,
-141, 7,144,146,173,130,185, 33, 17,135, 54, 45,196,228,197,187,160, 84, 27,240,111,192,104,131,101, 95,183,123, 35,128,225, 57,
- 88,153,192,171,166, 43, 76,250, 14,147,186, 4,246, 47,230,241, 24,102,235,138,111, 37,217, 74, 62,248, 60, 94,177,209,133,175,
-189,111,136,169,169,233,241, 63,255, 56,128, 90, 53,236,132, 59,175,228,196,221,123,161,124, 21,210, 45,200, 76, 16,121,152, 41,
-248,189,122,246,148,157, 59,127, 97,194,187, 12, 22,143, 48, 46, 43,127,254,193,206, 84, 42, 0, 33, 64,161, 82,143,241,147,166,
-189,247,133,161,160,188,175, 39,205, 1, 41, 53, 87,133,249, 57,248,126,229,214,162, 94,206,231,175,150,153,171,211, 79,164,207,
-122,246,108,157, 31, 31, 31,159, 91,105,193, 72, 13, 73,125,134,142, 23, 50, 76, 73,181, 17, 67, 8, 40, 12,233,213, 49, 87, 0,
-144,155,251,162, 64,234, 80,175,231,142,229, 99, 55,214,112,118,182, 52,149, 73,136,137, 92, 76,252,124, 60, 37,141, 27,135, 74,
-106,120,250,139, 46, 71, 22,225,101,166, 18, 47, 82,242, 33,178,241, 23,244,111,217, 22, 59, 86, 78,235,108,204,249,159,191,241,
-184,235,218,101,179,196,105,121, 26, 68,189, 44, 66, 90,174, 10,169,185,106,164,229,168, 96, 34, 21, 32,180,109, 47,241,137, 51,
-251,186,182, 12,241, 91, 85,157,235,251, 60,246,197,129,248,228,212,207,234, 53,108,132,157,219,182, 52, 38, 46, 46, 18,154,148,
-164, 50,118,255,141, 27, 55,230, 4, 7, 7,219, 46, 89,178,164,216,199,199,167,129,143,143, 79,205,152,152,152,139, 94, 94, 94,
-221,214,174, 92,112,105,252,204,101,110, 60,162, 51,111,210,180, 25, 79, 34, 36,184,113,249,148,122,235,198,245, 41,218,188,162,
-169, 21, 26, 97,153,249,194,244, 34, 2, 91,103,231, 8, 19,145,161, 29,159,201,139,201, 57, 49,118, 59,128, 63, 61, 59,141, 59,
-123,225,110,116, 76, 80,120,188,221,249,240,103, 25, 57, 10,173,119,236,137, 73, 21, 22,184, 60, 66, 32,224, 49, 48,149,242, 95,
- 69, 44,237,235,247,125, 70, 9,177, 45,139,148, 18,148, 68,180, 72,201,103, 75, 74, 82,248, 94, 35, 26, 70, 19,202, 82, 32, 58,
-169, 24, 69,170,146, 16,188,139,141, 12,153,233, 73, 88,187,106, 43,238,221,189,131,246,157,186, 97,205,111, 59, 49, 98, 72,223,
- 74,175, 43,195,160, 36,130, 85, 46,122,101, 34,229, 3, 32,200, 43,214,225,143,171,137,240,172,201,128, 84,161,182,208,212, 68,
-138,252, 66, 37, 24,129, 9,162,174,108,151,157,184,112,123,198,220, 31, 55,125, 83, 80,148,246, 50, 54,242, 6,124, 44,179, 81,
-211, 89,139,136, 52, 51,220,205,246,128,143, 87, 45, 48,194, 59, 70,105,103, 69,212, 93,122,136,249,163, 75, 80,131, 58,161,110,
-118, 22, 80,106, 12,165, 81, 44, 30,182,108,222,142,248,184,164, 47,178, 34, 14,222,251, 16,133,100, 81,250,243, 76,137,125,237,
-175, 30,221, 58,247,162,231,167, 95,193,209,185, 70,253,170, 52, 79, 48,102,157,193, 8,131, 69, 8, 97,172,220, 27,108,219,182,
- 99, 95,255,154, 53, 28,112,230, 86, 28,110,199,100,195,198,198, 26, 60,153, 3,106,183, 28,102,241,232,228,202,222,202,172,162,
-109, 2,161,108,120, 72,227,166,160,148, 34,250, 73, 68, 78,126,190,249, 95,202,102, 69, 74,212,125, 0,102,229,215,201,108,253,
-234,155,152, 91,221, 87,107, 13, 72, 78, 78,194,181,235, 23, 27,150,110,103, 52, 98, 33, 15,167,239,101, 64,171, 99,161,213,179,
- 8, 9,244,215, 8, 68,210,230, 63,108, 60,214, 56, 61, 61,147,145,154,152,177,230,118,181,132, 86,186, 52,245,131,231,249, 66,
-173,142, 69, 45,167,138,191,203,101, 86,181, 22, 77,154, 60,222,143, 39,148,162,176, 88,173, 73, 77, 73,118,248,117,247,133,162,
- 39,209,145,206, 30,238, 53,204, 22, 46,152, 43,204, 87, 2, 25,249,106,228, 20,106, 73,191, 79,191,112,218,190,105,205, 32, 0,
-219,171,144,244,186,123,183,175,215, 89,154, 8, 73,161, 82, 71, 51,243,213,134, 49, 95,141,175,251, 62,121,167,204, 92,253,248,
-253, 76,225,189, 23, 69,120,240, 60, 31, 18, 33, 15, 34, 33, 3,141,145, 6,203,182, 78, 95,185,173,173,197,160,144,250,181,113,
-234, 94, 38,120, 60, 6,138,226,124,141, 68,108,242,216,215,183, 54,211,160,126, 0,194,154, 53, 65,236,139,120,159, 83,103,206,
- 47,191,125,231,222,247,182, 1, 61,167,102, 62, 62,176,166, 42,105, 77, 76,205,150,165,235, 93,199,219, 57,216, 4,116,235,222,
- 85, 92,195,217,158,216, 90, 89,192, 64,132, 24, 53,250,107, 59,163,243, 60, 45,137, 94, 46, 89, 48, 3,106,181, 6,182, 22, 34,
- 80, 10,108, 94, 53, 23, 26,141, 6, 78,214, 98,228, 23,235, 56,131,245,234, 6,215,235,217, 84, 42,150,159, 94,179,120, 2,147,
- 87,172,131, 68,200, 67,173, 90, 53, 49,118,252, 4, 89,155,250,182, 80, 18, 51,252,177,123,107,129,222,160, 59,106,140,158,204,
-161,118,144,169,220,236,212,182, 29,123, 89, 27,107,107,102,237,233,204,231,217,133,250, 87, 67, 28,196,220, 58,204,222, 61,245,
-171, 35, 5, 57, 41,145, 72,188, 52, 26,141,101,101, 55,116,243,233,132,210,198,185,228,131, 92, 24,134, 97, 12,191,174, 90, 0,
- 27, 51, 17,212, 58, 22,243,151,111, 47,236, 98,123,242,124,121,115, 21, 24, 24,152, 95,191,126,253, 60,134,169,124, 56,177,151,
-183,119, 54,121, 75,129, 89, 45,115, 85,134, 50,237,225, 29, 0, 1,175,107, 6, 10,108, 60,246, 77, 30, 48,104,200, 12, 7,255,
- 79, 76,227, 82,243, 33, 36, 90, 4,251, 57,226,226,169, 63,217,196, 23, 79, 70, 25,163,157,145,157,239,106, 99, 99,141,123,207,
- 11,145,156,173, 68, 90,169,185, 74,205, 85,163, 80, 89,136,250,238,182,200,203, 47,114,173,182,129, 37,244,224,169, 83,167, 62,
-235,220,189, 63,198,126, 51,175,211,198,181,203, 30, 74,237,253,134, 40,211,159,220, 54,102,255,125,251,246, 25,220,221,221,159,
-103,102,102, 54,154, 50,101, 74, 65,173, 90,181, 28, 22, 44, 88,240,101,173, 90,181,156, 90,183,106,149,127,251, 66,227,109,227,
-191,153,219,106,250,184,141, 53, 25,134, 73,167, 44, 61,156, 82,172,155, 67, 51, 35,149, 21,222,167, 67, 51,162, 72,157,121,159,
-181,107,110,123,216, 74,198,248,139,169,102, 0,169, 51,111, 47,141,156,163,141, 61,177,170,176,110,191,159,199,166,228,177, 51,
- 85,140,221,247,149,153,171,146, 8, 22,129, 70,111,128,169, 84,240,159,188, 73,225,184,118,245,207, 50, 91,115, 17, 4, 60, 6,
-124, 30, 65,129, 66,135,172, 2, 45,190,153,250,141,177, 87,144,213, 27, 40,148, 26, 61, 20,165, 95,131,133, 5, 89,152,241,205,
- 36,116,234,218, 19,195, 71, 77, 66,174, 18,184,251,162, 16, 90,157,174,210,135,130, 71, 8, 20,106, 61, 62,111,239,134,156, 34,
- 45,138,149,122,104,244, 44,100, 34, 62,248,124, 6,114, 9, 31,102, 50, 1, 8,161, 66, 71, 71,199, 47, 1, 64, 32, 16,168, 94,
-190,124,185,163,130, 47,120,120,184,218, 67,169, 99,208,168,255, 50,180, 13,245,198,131,179,155,248,151,110, 62,170,249,205,220,
-229, 24, 51, 48, 20,251,163, 60, 97,101,231, 6, 19,185, 20, 58,202, 0, 48,110, 8, 16, 74,231,176,142,190,189, 6,174,255,109,
-115,244,252,217,211, 37,121,197, 4, 98, 33, 15,231,207,157,197,141, 91,119, 87,102, 70, 28,220,241, 33, 11, 74, 1,101,236,205,
-204,204, 32, 17,241,160,209,170, 53, 70, 71, 30, 88, 10, 80,248,217,213,237,241,103,233,189,247, 51,176,120,203, 58, 90,153,185,
- 34,230, 78, 1, 91,214,111,220, 57,200,201,193, 14, 7,206, 61,196,150,223, 86,163,102,131, 46,184,122,108, 11,204, 61, 26, 67,
- 94,163, 25, 68,166,251,190,100,120,252,186, 95, 79,248,182, 87, 96,112, 40,174, 93, 57,143,140,180,212,245,148, 70, 25,213, 6,
-141, 39, 32,227, 90,183,235, 10,149,198,128,230,109,186,224,228,145, 3, 99, 81,218,121,194, 88,222, 52,225, 44, 11,253,215,195,
- 7, 8, 50,242, 52,130,204, 2, 13,146, 50, 21,136, 75, 87,224,208,158, 77,212,216,183, 54,195,231, 5,183,168,231, 34,248,114,
-233,249, 68, 87, 23, 71,181, 64,173,148,198,196, 62,247, 29,254,217, 32, 65, 77, 47, 95, 38, 35, 95,141,204,124, 53,178,242,213,
- 40, 82,233,225,229, 88,131, 81,235,249,161, 85,189,207,182, 22, 18,193,154, 35, 47, 96, 38, 23,160,137,175,117,181, 27, 97,179,
- 44,251,154,185,186,255,162, 24, 15, 95,228, 67, 44,228, 65, 44,100, 32, 22,242,160, 55, 80, 35,223, 69,250, 1, 35,135,245,151,
-106,116, 20,217,249, 26,240,121, 4, 14, 54,214, 98, 87, 71,111,108, 94,246, 53, 0, 96,196,180,181, 24,254,249, 96,248,120,123,
- 33, 63,191, 80, 58,124,244,248,159,241,150,118,119,239, 74,235,206, 67,151,235,220,125,156, 48,249,179, 97, 67, 5,253,186, 54,
-103,238, 63, 47, 64,106,142, 26,207, 99, 21,208,234,170, 54, 26,141,222,192,130,130, 98,235,222,163,144,138,248,200,204,215,130,
- 82,138,133,171,127,135,169, 84,128,212,220,146,106,125,206, 96,149,153, 43,145,228,244,246,213,223, 74,207,199, 0, 43,207,220,
-197, 39, 33,142, 16,242, 25,136, 77, 28,240,224, 69, 46,206,158, 59, 84,120,245,198, 45, 21, 24, 93,165,221,162,100,142, 62, 13,
-229, 82,179,179,107,126,221,166,183,177,179,195,142, 43, 57, 73,185,197,122,221,127,170,167,116,228,238,169, 95,107,234, 89, 93,
- 71,101,218,211, 74, 63,103, 89, 74,133,139,215, 29, 2, 64,193,178, 44, 40,203,130, 39, 20,203,221, 26, 15, 78, 47,209, 99, 37,
-124, 30,163, 42,255,228, 83,214,144,148,112,107, 87,133, 85,135, 4,128,185, 76,128,189,151,146,145,159,147,146,213,197,246,228,
-171,106,193,147, 17,226,103,129,129, 13,242,131,131,131,243,164, 82, 41,120, 60, 94,149, 47,252,251,154,171,119,191,120,194,117,
- 0,150, 56,249,182,236,214, 73,230, 31, 34, 98,248, 8,244,113,196,197,211, 7,216, 27, 39, 54,245, 84,164,199, 28, 51, 50,188,
-141, 34,165, 14, 41,217, 42, 36,103,171,144,150,171, 66, 90,142, 26,105,185, 42, 16, 66,160,210,188,223,240, 53,138,244,152, 35,
- 38,206,254,235,213, 90,140,106,209,190, 39, 38,207, 93,227,181, 99,253, 15, 87,228,118,181,131,139, 51,158, 62, 50, 70, 35, 62,
- 62, 94,109,111,111, 31,158,151,151,215,126,249,242,229, 69,126,126,126, 34, 19, 19,147,108, 0,210,103, 49, 49,194,243,199,247,
-197,101,166,164,140,212,106,181,119,140, 77,151,123,216, 48,177,239,255,177,119,214,225, 81, 92,251, 27,127,103, 93,226,196, 29,
-136,144, 64,130, 4,151,160,193,221, 10, 20, 41,165, 69, 90, 42, 72, 91, 40, 45, 82, 10,133,150, 34, 53,104,161,197, 29,138, 21,
-119, 11, 30,136, 64, 8, 16,119,221,205,102,125,103,230,252,254,128,228,166,220,200,134,210,223,189,151,158,207,243,204,147, 77,
- 50,243,206, 57,179,103,230,188,243, 61,102, 95, 60,217,207,166, 67,239, 0, 15, 37,252,108, 52,189, 67,109,239,126,227,214,227,
-195,165,249,103, 86,231,231, 24,217, 83, 5,122, 97,139,172, 50,177, 85,125, 1, 89,179, 41,237,245, 41,115, 33,100, 24,152,141,
-166,180,242,194,229,230, 32,197,194,109, 15, 96, 43, 23,195, 78, 33,130,173, 66,140, 78, 77,234,161, 14,175, 7,196,194,241,208,
- 25, 57,232,141, 44, 12, 38, 22, 46,190, 78, 88,191,117, 15,210,243,245, 56,120,179, 16,137,105, 26, 4,251,216,128,144,218,227,
- 78, 60, 97,181,175, 77,158,103, 39, 20, 8, 32,100, 32, 8, 13,170,143,226, 50, 19, 36, 34, 1,164, 82, 41,108,100, 34,216, 43,
-196, 16,139,196,184,113,239, 30,140, 70, 35,218,182,109, 43,175,217, 2, 62,141, 98, 5, 55,244,130,217,194,226,232,197, 4, 44,
-153, 49, 12, 61, 59,183,194, 71, 66, 41, 30, 24, 35, 96, 87,207, 14,188, 64, 0, 51,203,195,100,230, 0, 8,170,141,182,249,249,
-249,117,183,177,177,177,209,233,116,154,180,180,180,243, 57, 15,246,167,187,133, 13,153,124,252,228,217,173, 3,250,246,196,157,
-123,241,216,251,251,161, 75,133,206,234,217,229,199,132,135,135,183,115,113,113,177, 45, 42, 42, 42,141,141,141,189,241, 34,101,
-149, 97, 24,198,198, 61,244,195,246,157,186,162, 76,149,143,188,140,148, 35,214, 30,219,216,223, 14, 51,103,188, 23, 28,210, 40,
- 36,152,123, 54,146,170,137,159, 29,166, 78,123, 39, 56, 48,184, 81,112,249, 64,143,198,126, 53,207,119,105,227, 30,242,206,146,
-149,107,199,251,249,250,226,216,149, 7,248,106,222,212, 59, 54, 74,187, 6, 62,238, 78,142,146,176, 86,136,137,185, 10, 55, 72,
- 97,239, 30,236, 51,122,208, 20,159,222,125, 7, 33,246,238, 45,172,254,122,113,180, 86,168, 88,106, 77, 90,109,221, 3, 92, 91,
-180,238,252,186, 93, 61,119,168,212, 26,216, 57,185,161,113,179,214,175,219,186, 7,124,242,108,177,250, 23, 51, 27,132,192,104,
- 38, 40, 41, 51, 35,163, 64,143,212,220,167, 6,139,231,235,208,231,135,128,177,149,139, 68,245, 44,143,252, 98, 79,159, 37,254,
-190,238,204,215,139, 63, 18,154,241,180,179,120,129,218,136,130, 82, 19, 10,212, 38,148, 25, 44,168,103, 35, 2, 79,248, 58,191,
-109,151,148,153, 97,247,172,159, 44,199,191,184, 9, 88,184,106, 71,135,204, 2, 93,143,111,190,156, 39,185,155, 82,201, 92,137,
-159, 70,175,100, 18, 33, 56,222,186, 8,150, 80, 36,120,175,127,143, 54,200, 40,212, 63, 29,133, 44, 96, 16, 20, 22, 1, 23, 5,
-143, 30,163,230, 0, 0, 6,246,123, 58, 13, 73,114,142, 22,135,175,229, 0,128,196,218,180, 22, 21,105,100,191,159,186,243,193,
-142,245,223, 72,141,188, 24, 63, 31, 75,131,206,200, 66, 46, 17, 66, 38, 17, 66, 33,169, 91,253,198,114, 79, 7, 75,164, 23, 90,
-160, 51, 24, 80,170,183,128, 0,184,241,168, 12,122, 19, 11,181,214,130,118,161, 78,212, 96,149,155,171,205,223,125,170, 56,243,
-144,224,220,221, 34,140,136,244, 65, 81,126, 38,214,255,180,134, 39, 4,144,201,165,185, 28,203, 31,211,243,236,199,170,187,135,
-213, 53, 62, 36, 92,155, 52, 83, 40,149,103,151,175,254,217,236,230,238,205,239,191,166,202, 87,235,184, 63,197, 10, 57,163, 81,
- 64,120, 34,177,198, 92, 61,139, 52,153, 23,188, 55, 20, 60, 33, 88,184,122, 15,150,206, 30, 5, 91,133, 72,201, 48,140, 82,107,
- 96, 49, 99,209, 6,124,251,249, 36, 59,165, 76, 4,134, 1, 12, 38, 14, 83,223,179, 46, 74,160, 51,114,208,170,114,139,154,150,
-173,124,206, 92,181, 84,183,109,219, 86,229,228,228,132, 23, 49, 88, 85,153, 43, 15, 15, 15, 47,165, 82, 89, 47, 56,248,105, 95,
- 87,161, 80, 8,142,227,180, 73, 73, 73, 47, 52,233, 91,169,170,224, 64, 78, 74,108,219, 14, 93,251,227,194,201, 3,124,244,209,
- 13, 67,235, 50,196,220,209,193, 62,227, 78, 66, 90, 99, 6,182, 79, 35, 88,207,204,149,201,194,195,223, 93,137,204,140,116, 56,
- 58,216,102, 88,171,167,244, 8,238, 35, 32,194, 41, 60,131,245,186,220, 7, 71, 1,160, 44, 43,126,154,210,173, 81,108,124,252,
-221,213, 3,198,188, 39,237, 53, 98,154,100,221, 87,239,206, 1, 48,218, 90,221,188,188, 60,157,171,171,107,180,167,167,231,128,
- 69,139, 22, 25, 1,200,140, 70,163, 96,226,196,137,202,180,180,180, 25,132, 16,171,210, 24,249,230, 94, 23, 70,166,233, 27, 24,
-220,122,140,191,157,166,103,183,200,246,104, 31,230,139,140,200,246, 0,240,126, 90,153,109, 72,167,105,191,238,106,232,234,115,
-116,221,198,195, 75,223, 30, 21, 53,195,107,224,162,149,217,135, 23,212, 24, 17, 75,188,248,107,239,170,236,187, 72, 40,128,157,
- 66, 12, 91,133, 8,118, 10, 49,236,228, 98, 88, 88, 82,151, 38, 56, 98, 97,249,167, 17, 44, 19,139, 50, 61,139,179, 49,121,200,
- 85,155,160,210,152,161, 55,115, 32, 32, 48, 91,248,242, 89, 69,106, 54,171, 87, 55, 57,150,127,246,105, 57, 90,189,230,139,247,
-236,247, 93,206,172, 24,161,231,160,148,194, 78, 41, 6, 64,112,241,226, 69, 56, 59,215, 62, 45, 22,207,243,216,123,252, 6, 86,
-110, 58,139,227,191,125, 12,185, 68,136,102,131, 23,225,141, 33,109,193,243, 4,143, 19,227,243,130,155, 52,119, 23, 8, 20, 16,
- 48, 12,140, 22, 30, 0,169,246,122,154, 76, 38,231,244,244,244,210,160,160, 32, 15,111,111,239, 17, 66,161,144,200, 0,227,129,
-157,197,186, 51, 71,182, 43,181,122, 35,167,100,213,191, 5,229,232,251, 7, 7, 7,131, 97, 24,226,226,226, 34, 57,123,246,108,
- 89,211,166, 77, 93, 95,228, 62, 98, 24, 70,160,112,107,180,230,173,105, 31,142, 8, 12, 8,192,158,237,191,129, 16,102,159,181,
-199,111, 59, 28,141,149,171,254, 60, 98,112,234,180,119,130,215,173,253,233, 79,127, 27, 63,105,114,112, 77, 6,207, 39,188,251,
-199,161,161, 77, 16, 29,159,137,175, 63,155,118,199,144,159, 60,198,100,235, 60,197, 92,150, 51,179, 69, 68, 43,120, 56,219, 35,
-187,216,136, 65, 99,135,160, 99,167, 72,196,222,189,133,197,159,127, 20, 13,157,169, 87,109, 81,219,127, 25, 33,241,212,110,189,
-135,136,245, 70, 51,190,251,122, 62,166,204, 94,130,118,221, 7,138,227, 98,174, 77, 5,240,133,181,121, 54,154, 57,116,107,234,
-242,212, 52, 91,120, 28, 74, 22,138,170, 42,129, 34, 33, 35,104, 17,224, 8,189,137, 69,169,206, 82, 75, 4,139,201, 85,105,180,
-245,127, 88,250,161, 80,107, 96, 81,160, 54, 33, 95,109, 68,161,234, 95,198,170, 80,109, 68,129,218, 4,177,136,193,195,148,108,
- 8,133, 76,157,251,223,149,148, 89,208,166,145,211,211,123,244, 5, 91, 67, 10, 89,215,190,119, 31,102,247,248,122,241, 92,201,
-221, 84, 45,238, 37,151, 62,139, 92, 9, 33, 19, 11, 32,125,246,153,179,194, 95,185, 53, 25,212, 97,252,232,193, 97,246, 54,114,
-100, 63,212, 64, 36,124, 58,213,139,131,155, 47, 28,100, 6, 76,159, 54, 25, 46,206,142, 72, 47, 52, 98,205,239, 15,113, 47,225,
- 17,120,125,221,178,253,195,246,227, 67, 39,140, 27, 37, 19, 74,100,216,114, 36, 5, 50,137, 16, 34, 98, 66,252,181,139,198,188,
-204, 20,179,166, 84,101, 35, 18,137,173, 18,101, 0, 82, 30,153, 91,186,112, 14,118,110,250, 9, 39,110,231, 87,116,159,191,188,
-239, 91,124, 56,247, 75, 20,150,154, 0, 48,175,124, 24, 75, 84,147,185,146, 75,165, 39, 55,173,153,171, 56,243, 16, 56,127,239,
-169,185,210,151, 21, 98,203,175, 63,151, 17,240, 81,121,113, 7,173,126, 35,180,113,107, 20, 46,179,177,185,240,217,151,107,140,
-238,222,245,217,163, 49,165, 69, 26, 3,247,111, 97, 16,137,210,134,179,113,112, 53, 56,250, 71,172, 20,235, 77,243, 11, 10, 18,
-180,181, 69,154,120, 66,112,228,122, 46, 8,121,250, 74,180,251, 98, 22,132,130,167,205,133, 28,255,180,249,228, 84, 76, 62, 68,
- 2,198,234, 33,231, 12, 3,236, 62, 25, 83, 24, 94,133,185,106,221,186,181,202,222,222, 30,142,142,142,176,181,181,173,235, 3,
-187,202,200,149, 82,169,172,119,226,196, 9,185,189,189, 61,132, 66, 33,140, 70, 35,122,246,236,249, 66, 95,170,141,123,200,232,
-118, 61,134,125,213,177, 91,127,156, 59,177,159,143, 62,186,113,152, 46,191, 14,243,247, 0,232,219,185,217,225,229,223,126,223,
-240,163, 57,159,201,236,228, 34,220, 47, 51, 65,192, 48,240,119, 87,194,217, 86,136,232,179, 71, 12, 35,122, 54, 61,108,173,158,
-159, 79,253, 45, 43,190, 91,231,188,114,217,162, 94, 78, 78, 13,221, 75, 74,146, 75, 1, 64,151,255,112,157,173, 71, 72,162,143,
-223,201, 11,205,187, 12,133,187,119, 80,191,186,230,183,160,160, 32, 47, 44, 44,236,126,147, 38, 77, 90,141, 24, 49,130,124,245,
-213, 87, 78,153,153,153,123,172, 53, 87, 0,208,163,103,216, 12, 91, 41,215,174,158, 82, 16, 22,224,161, 68,251,176,167,173,159,
-163,250,119,130,175,159, 31,158,228,234, 90, 20,235,120,113,153, 73, 24,240,227,207,247,110, 54,112, 17,190,205,234, 77, 9, 0,
- 14,214,185,210,198,191, 58,190,151, 71,175,236, 20, 98,240, 79,203, 71,157, 12,150,209,204, 65,111,228,160, 55,177,208,154, 56,
-232, 76, 28,120,242,244,158, 96, 24, 6,102,150, 47, 63,101,157, 18,104, 95,207, 5, 1, 13,158,142,122,181, 83, 60,157,178,225,
-105, 19, 33,224,236,236, 12, 55,183,218, 27,119, 8, 33, 48,153,159,222,226, 38, 11, 95,209, 68,106, 50,179, 32,132,224,225,195,
-196,143, 83,147,147, 7, 7, 5, 7,117,110,210,172,121, 61,165, 76, 0, 0,213,154, 1,157, 78,199,217,217,217,185,213,171, 87,
- 79,144,149,149, 85,209,239, 49,168, 69, 55,246,247,253,251, 48,108,216,208,178,251, 55,238, 86,140,168,210,235,245, 76,199,142,
- 29,237,125,125,125, 5, 70,163,177,180,206, 81, 43,215, 70, 67,124, 67, 59, 44, 25, 63,113, 74,163,110, 81,125,112,238,204, 73,
- 28,220,191, 99,179, 54, 63,241,164,181, 58, 33, 33,161,255, 54,138, 48, 48,184,209,191,141, 34,172,223, 48,184, 90,131,229,224,
-208,204,190, 89,235,174,190,169,133,102, 28, 59,118, 20, 90,117,238,231, 38, 83,153, 14, 98,178,225,200,142, 31, 39,189,245,225,
- 34,251,174, 93, 34,225,100,175,132, 72, 36,196,237,155,209, 88,246,197,167,209,208,153,122,213,246,252,172,200,111,147, 38,146,
- 32,191,250, 31,248, 5,134,227,246,181, 75,120,252, 48, 46,254,238,205,232,176,160,166,237,224,234,229,255, 1,211,164,201, 50,
-146,144, 80,235, 74, 21,132,227, 50, 39, 76,158,249,236,251,127,250,183,246, 45, 26, 74,153,231,111, 0, 0, 22,214,204,109, 89,
-183, 44,191,242, 40,194,234,116, 13, 26,213,222,139,215,238,205, 30,216, 43, 82, 80, 88,106,122, 26,177, 82,155,158,109, 70, 20,
-150,127, 46, 53, 34,216,203, 22,143,227,238,243, 22,173,122, 95,221,238, 76,146, 55,237,157,247, 20, 79,211,206,131,240,164, 70,
-195, 95,109, 90, 57,201,235,235,190,152,195,220, 75,213,226, 94, 74,233,211, 38, 65,177,240,169,177, 18, 11, 42,204,150, 85,173,
-100, 2,193,215,227, 71,246, 70, 97,169, 25, 60, 15,136,132,130,103,155, 4,233, 26, 6, 25, 26, 29, 10, 75, 10,144,156,154, 6,
- 85,238, 99, 8, 4, 2,184,120, 53,130, 46,221,186,180,106, 56,219, 70, 22, 14,129, 35,251, 71, 10,127,143,206,133, 82, 38, 66,
-105, 81, 6,174,156,216,165,231, 89,110,157,201, 98,218,233, 70,164,113, 9,177,123,204, 86, 62, 58, 10, 74,181, 70,119,153, 88,
-136, 61,155,126,192,200, 55,166,149, 71, 32, 1, 0, 31,207, 91, 12, 8, 24,148,168,180, 0,152, 23,142,138,254,207, 27, 44,177,
- 64,120,106,227,234, 79,229, 9, 5,114,220, 72,204,193,136, 72, 31,232, 52,133,248,249,135, 53,101, 6,139,177,111, 65,236,193,
-186,133,219, 5,130,222,163,222,156, 29, 31,208,168,137,241, 92, 92, 89,138, 74,107,169,182, 31, 67,251, 17,159,197,223,250,227,
-251,126,106,203,147,119,108,189,194, 56,158,101,191,214,229, 39, 46,170,250, 45,153, 72, 23,173,217, 83,209, 60,248,201,178, 45,
- 79, 63,115, 28, 56,194,131,240,192,244,207,215,130,229, 57,240, 28, 7,158, 35, 96, 44,156,178,214,112,185, 92,114, 50,188,108,
-165, 67, 85,230,202,209,209, 17,206,206,206,112,118,118, 70,185, 33,250,171,205,130,193,193,193,176,181,181,197,165, 75,151,160,
- 80, 40, 96, 99,243, 98, 19,228,219,186,135,190,214,182,251,208,109,221, 6,190, 41, 56,253,251,207,220,245,243, 71, 70,232,243,
- 31, 88,109, 2, 56,142, 99, 44, 22, 11,122,119,109,153, 22,147,152,126,252,139, 69, 11,251,180,238, 62, 92,214, 33,196, 13,122,
- 19,139,172,204, 76, 68,159, 61,104, 8,242,115, 62,209,165,109,227, 52,139,197, 2,142,227,106,173,192, 13, 70, 83,145, 80,172,
-112, 30, 53,250,117,217,205, 27, 55,182,217,184,135,236, 16, 8,249,187,132, 19, 54, 3,200,107,205,154, 53,134,217,194, 67,167,
-211, 20,191, 72,190, 19, 18, 18,110,172, 90,181,170,145, 88, 44,246,221,189,123,119, 97, 73, 73, 73,157,150, 11, 58,121, 49,113,
-181,136, 41, 73,146,242,230, 49,254,118,154,158,233,157,218, 99,244,128, 78,216,249,199,101,156,191, 20,141,180, 50,219,152, 50,
- 86,116, 32, 35, 45,219, 24, 86,175,116,223,160,246,245,133,123, 54,149,236,115,235, 54,247, 53, 66,100, 39, 11,206, 47,208, 90,
- 95,121, 3, 26,189, 5,246,202,167,243, 53,149, 71,178,132, 12, 99,181, 19, 98,128,228, 75,209,183,195, 91, 5, 55,193,157,100,
- 53,242, 85, 70,232,141, 44,120,158,128, 7,129,179,157, 20,114,137, 0,233,169,201,224,137, 57,165,110,245, 12, 10,250, 14,159,
- 34,122,122, 30, 94, 36, 22,139, 64,158,213,139, 10,185,180,204,205,205,205,170, 8,150,153,101, 49,172, 79, 91,180,107,221, 12,
-131,167,172, 0, 0,156,217, 60, 7, 78,182, 98,236,221,187, 23,233,151, 87,109, 13,232, 48,237,100, 92,108,252,240,248, 59, 87,
- 95,239,219, 82,209,194, 67,148, 93,109,211, 70, 89, 89,217, 62,134, 97,164, 18,137,164, 79,231,206,157,235,237,219,183, 79,229,
-226,226,194, 75, 37,146,130, 65, 3, 7,240, 98,137,164,162,236, 92,185,114, 69, 60,101,202, 20,187,146,146,146,244,188,188,188,
-104, 66,136,165,230, 23,192,208, 40, 8,176, 3, 12, 35,183, 85, 40,211,218, 71,141,246,106,221,174,173,195,144, 97, 35, 33,147,
-202,112,234,228,113,124,183,106,217,238,178,156,251,111,214,229, 82,190,140, 81,132,106,181,131, 54, 41,225,110, 73, 74,190,201,
- 73,236, 24, 12,177,204,110, 10,227,224,181, 70, 40,179, 93,224,218,124,136,253,222, 67, 71, 17, 27, 23,135,122, 10, 11,158, 60,
- 78,210,197,197,220,249, 73,199,136, 23,145,130, 4,157,213, 17,230, 34,110,120,251,113,125,156,140,102, 14, 23,207,254, 97,224,
- 89,190, 79,244,133,163,143,125, 26,181,150,135,183,238,225, 84,120,112,195, 48, 0, 59,107,211, 73,185,190,245,223,186, 94, 4,
-180,125, 45,251,232,201, 11,182,158,254, 65, 66, 6, 66, 24,244, 58, 20,164,197,178, 6,117,174, 46, 47,246,128,151, 53,233, 75,
- 99,179, 62,255,252,171,181,239,180,106, 30,102, 67,136,228, 79, 17,171,114, 99, 85, 88,106,130,139,157, 20, 70,109, 9, 30,223,
-187,100, 40, 16,231,125, 90,243,179,206,162, 44, 42, 42,150,150,255,174, 40,115,172,175,118, 80,203, 42, 76,160, 16,112, 80, 59,
- 26,255,213,148, 86, 44,229, 56,139,210,154,219,211,193, 86,142,216,148,156,138, 14,237, 50,241,211,190, 87, 82,177,176,162, 31,
-150,149,247,121, 75,145,212, 22, 89, 69, 6, 48, 32,224, 57, 22,172,197, 4, 77,105, 41,178,178,115,145,151,155, 7,141, 70, 5,
-165,173, 19,194, 91,180,129,157,173, 13, 30,220, 62, 15,128,177,234,229,215,192, 75,130, 91,183,106, 37,142, 79, 43,131,217,194,
- 67, 12, 51, 46, 31,219,105,176, 88, 76, 3,243, 98, 15,156,173,235,115,152,229,201,233,184,196,180, 48, 31, 87, 79, 38,230,177,
- 26, 91,215,127, 15,211,179, 72,166,197,194, 33, 46, 93,139,156, 98, 29, 50, 51,210, 8,120,238, 52, 94,113,170, 53, 88, 44,203,
-202,253,252, 27, 96,244,148,177,248,233,167,181,120,248, 36, 29,191,252,248,204, 92,221,251,253,138,149,134, 34,170,124,174, 12,
-109,238,131,175,223,252, 41, 37,243,208,157, 98,129,222, 84,243,250, 83,114, 87,127, 68,190,249,237, 9,189,166, 88,202, 25,117,
-162,195, 91,223,220, 81,149,230, 83,223,198,152,150,204, 26, 5, 91,133, 8, 12,195,160,188, 89,240,199,197,147,161,148, 9,193,
- 48, 12,244, 70, 22, 99,103,172,196,214,149, 51, 65, 0,188,245,206, 44, 93,117,233,172,100,132,152,137,125, 26, 14,250,242,215,
-132,131,151, 83,157,159,244,239,223, 69,221,178,101, 75,149, 66,161,128, 66,161,128,189,189, 61,156,156,156,224,232,232, 88,107,
-222,159,253,238, 94, 91,159, 43,129, 64, 0, 27, 27, 27,216,218,218,194,198,198,230,223,140,219,243,154,255,102,174, 60, 26,141,
-108,211,109,232,142,238,131, 38, 9, 78,255,254, 11,127,235,252,225,145,250,252,196, 3,214,126, 71,207,154,117,238, 14, 27, 54,
-172,233,148, 41, 83, 36,159,190, 51,236,196,137,243,183, 31,238, 63,181,111, 96,177, 74,227, 75, 8,129,163,131,109,198,136,158,
- 77, 15, 71,182, 14, 73, 59,115,230, 12,191, 99,199, 14, 35,195, 48,177,181,165,179,176, 48,127,227,153,211,103,151, 71,118,233,
-138,245,155,118,244,143, 79,184,223,255,241,227, 36,248,250, 7,160, 65,195, 96,232, 24, 39,156,189,112, 9,154,226,220,141,214,
-164,179, 50, 77,155, 54,245,110,222,188,185,143, 74,165, 50,204,159, 63, 63,132, 16,114, 32, 60, 60,188, 85,203,150, 45,115,239,
-220,185,147, 89,221,176,255,202,154, 87,215, 14, 41, 0,176,185,126,215,137,187,179,204,170, 15, 0, 44,243,243,247,195,249, 75,
-209,136,190,124,125,109,161,210,111,209,155, 99, 39, 78,174, 63, 72,248,214,160,246,245,133,110, 78, 74,108,255,229, 91,225,161,
-232,212,149,169, 69,220, 6, 0,139,173,249,142, 42, 30,214, 26, 51, 58, 54,174, 7, 11, 71,192,147,167,166,203, 78, 46,174,178,
-137,176, 42, 77,145, 73,246,230,212, 41, 83, 30,135, 55,107,241,225,216,137, 83, 37, 45, 2,124,113,227,145, 10, 96, 24,212,243,
-176, 65, 78, 78, 14, 46,238,253,133, 45,201,122,176, 86, 40,228,191,168,203,245,204,188,189, 51,168,252,179,167,167,231,228,152,
-184, 56,156, 63,127, 30,229,198,202,213,213,181, 74,131,245,188,102, 73,137,230,202,226, 21,235, 59,190, 61,110, 48, 6,116, 13,
-195,133,155,143, 97,122, 54,223, 82,249,144,240,228,232,117,210, 15, 70, 5,152,222, 25,214,168, 84,111,145,166,126,158,162,190,
- 88,121, 18,217,231, 53, 9, 33, 38,134, 97, 14, 37, 38, 38,118,106,222,188,121,253,163, 71,143, 22,199, 95, 63,241,167,137,238,
-102,205,154,101,251,211, 79, 63, 41, 9, 33, 87,140, 70,227, 19,171,242, 46,192,246,219,183,110, 57,155, 45, 60, 46, 93,191,219,
-184, 71,199, 22,224, 9,112,243,230, 77,108,248,117,131, 33,246, 94,204, 10,109,158,199, 23,213, 77,110, 91,221,245,228,254,194,
- 40,194,114, 77, 66,206,179,182,238,161,107,175, 92,186, 48, 79,230,213, 10,161,253, 62, 29,148,117,247,208, 32,143, 38,189,225,
- 18,208, 1,217,247, 14,225,202,137,109, 71,121,150,157, 35,231, 5,105,218,130, 7, 90,107,239,247,114,100, 10,229,123, 77, 90,
-118, 65,122, 90, 42, 82,146,226, 54,235,139,146,178,109, 61, 66, 55,103,103,166, 77,109, 24,214, 17,151, 79,236,124,191, 58,131,
- 85, 91,153,119,147,107,214,158,187,124,117,116,214,158, 67,238,154, 50,189, 66, 36, 18,232,100, 34, 38, 79,162,123,188,203,218,
-116,146,132, 4,179, 91, 96,135, 97, 99,166,124,246,199,202,175,230,137,221, 29,101,200, 45, 49,160, 84,111,134, 70,103,134,128,
- 97, 16,228,101, 3,189,182, 20,209, 71,183, 88, 56, 67,209, 40,242,232,207, 17,183,202,154,174, 97,131,191,100, 24, 76,255,236,
-179,185, 16, 74,237,189, 26,246,248,212, 44,104,232, 1, 39, 60, 55,153,121, 61,160, 97,143, 79, 97,212,228, 13,252,236,179,185,
- 33,132,144, 30,174, 97,131, 53,229,107, 17, 86,151,247, 34,141, 25,175,119,243,133,153,125, 58,127, 24,203, 3, 28,255,244,133,
-159, 16,128,212,208,110, 95, 89,147, 0,146, 93,127, 92, 65,118,158, 10,122,147, 5, 70, 19, 11,179,133,131, 64, 40,132,163,147,
- 35,130, 27, 68,192,209,209, 1,249,133,133,184, 25,125, 25,215, 18, 99,146, 9,240,101, 97, 61,245, 54,107,190, 35, 70,100, 19,
-228,238,230,194,228,149,154,160,144, 10,113,237,246,121, 11, 1, 54, 90, 99,174,170,210, 84,235, 84, 43,231, 44, 94, 51,230,167,
-111, 23,120, 52,109,104,143,204, 66, 61, 50, 11, 12,208, 24,158,190,223,176, 28, 15,147, 94,141,196,155,199,114, 89,232, 86,254,
-115, 35, 88, 98,177,241,230,189, 68,217,156, 69,223,224,254,163,100,108, 88,251,189,214,104, 49, 91,109,174,170,226,183,119, 26,
-236,172,219, 17,207,230, 45,253, 34,181,150, 23,238,231,154, 5, 9, 15,158, 16, 28,190,158, 91,209, 44,200, 63,235, 81,121,231,
-177,170,182, 66, 35,254,230,189, 22, 31,151, 27,161,239,126,207,186, 38,147, 21,242,233,233,233, 37,219,182,109,171, 48, 61, 66,
-161, 16,229,163, 7, 77, 38, 83,173,163,138,156,236,165, 97,227,250,214, 31, 85,157,185, 18, 10,133,224,121, 30,246,246,246, 80,
- 40, 20,117,110,122,180,113, 11,233,217,166,251,208,157,221, 7,191, 37, 56,115, 96, 61,127,235,252,161, 17,101,249,137,191,215,
-245, 59, 42, 41, 41,137,103, 24, 38,105,197,138, 21, 45, 54,108,216,208,112,246,236,217, 79,214,127, 53,245,187,167,111,112, 79,
-151, 69,188,115,231, 14,153, 54,109,154,209, 96, 48, 36,151,148,148,220,182,102,145,107, 93, 94,226,138,223,126, 90, 30,146,145,
-149,243, 70, 64,120, 27,184, 54,108, 3,143,160,182, 40,209,152,113,227, 81, 54,158,220, 63,131,132, 43,123,119,233, 11,220,151,
-214, 37,189, 45, 90,180,240, 19,139,197, 3, 1,132, 40, 20,138,250, 12,195, 72,197, 98,241,107, 12,195, 36, 49, 12,115, 63, 36,
- 36,228, 12,170, 89,190,168, 42, 82,207,111, 52,214,239, 58,113, 77,154,198,174,219,147, 92, 93, 68,154,198,238,142, 78,230, 48,
- 51,255,204,106,163,123,175, 21, 43,137,185, 48,126,207,166,210,125,219,127,249, 86, 56,118,242, 44, 46, 78,237,244,129, 72, 33,
- 61,245,213, 27,214,143,230, 22, 48, 76,206,236,217, 31,253,107,154,134,103,145,171,103, 83, 54,100, 91,163,241,108, 61,197, 79,
- 20, 94, 97, 63,196,125, 48,101,113,179,214, 29,199,117,238, 59, 74,192, 74,108,113,226,247,117, 36,249,222,217, 61, 34,194,205,
-211,229, 63, 78,254,171, 15, 9,147,201, 84,171,185,170,178,233,214, 89,221,245,143,147,231,223, 56,114,252,194, 87,125,123,118,
-114,254,241,243,215,240,205,207, 7, 96,163,144,129,240, 28, 70,117,247, 27,113,127, 71,239,129,190,238,114,239,125,231, 50, 47,
- 78, 95, 21,247,137, 78,103,126, 88,219,218,121,207, 12,243, 37, 59, 59,187,130, 78,157, 58,181,147,201,100, 76, 97, 97,161,200,
-205,205,141,117,112,112, 48,101,102,102,234,140, 70,227, 62, 66,136,182, 46,249, 52, 91,120,164,228, 25,112,112,255, 62,220,189,
-126, 6,247,239, 39,106,238, 39,220,255,158, 17,145, 85,101,185, 15, 95, 40,178,202, 87, 57,138,144,212,121, 20,161, 86,168, 88,
-122,231,200, 55, 93,131,187,191,223,222, 57,176, 35,156,252,159, 6,138,212,153,113,200,184,185,231,160, 38, 91, 50,146,144,184,
- 23, 30,251,238,229,211, 48,152, 8,165,184,122,254, 15, 16,158, 95, 11, 0,132,231,215,222,185,124,116,106,219,126,111,161,158,
- 91,253,230, 12,195, 48,117, 93,143, 17, 0,100, 2,179,250,143, 77, 75,247,164,164,164,224,193,131, 7,120,244,232, 17,138,139,
-139,177, 61,229,162,186, 46, 58,249,143,175,158,114,111,212,185,247,152, 55,103, 28, 30, 58,124,168,220,175, 65,144, 32,196,199,
- 30, 46,182, 34, 36, 38,103,225,113, 92, 18,255,232,222, 69, 3,209,231, 15, 41,124,116,165, 90,195,231,218,100,164,187, 64,200,
-204, 57,115,232,233,218,130, 81,131,223, 12,249,120,250,236,118,245,156,157,170,124,142, 23, 23,149, 72, 23, 46,156, 31, 82,190,
-127,109,107, 17, 10,132, 66,205,228,169,239,217, 8, 24, 1,202, 47, 23, 41,111, 35,171,248,241,244,131, 68, 44,170,181,140, 78,
- 28, 26, 9,150,231,161,213, 91,160,209,155,160,214, 24,145, 83,168, 66,252,253, 71,184,126,233, 56, 82, 30, 39,105, 88,150, 61,
- 7,130,253, 5,206,234, 93,207, 79,172, 91, 99,249,132,208,175,158,147, 61, 82, 85, 6,200,165, 34,100,167, 63,102,205,172,225,
-133, 39, 89, 47,140, 57,148,227, 30, 62,184,215,196,119, 62, 61,222,185,115,164, 67,179,136, 86, 74, 23,123,123, 72, 68,192,227,
-244,124,220,187,125, 67,155,246, 48,166,148,179,232,251, 20,198, 29,250,203,171,180,252,207, 26, 44, 51,199, 70,205,250,116,217,
- 73,142,227, 20, 34,161, 80,111, 33,124,159,191, 98,174,254, 46, 8,225, 51,223,121,255,163,138,168, 46, 0, 88, 56, 94,241,214,
- 59,179,245,149,223, 16, 24, 11,167, 44,143, 92,213, 50, 82, 79, 88,160, 50,106,230,254,116,119,243,242,205, 9,123, 1, 36,252,
-213,145,125, 0, 80, 82,106,186,235,220,115,247, 96,141,142,101, 0,220,175, 66, 83,219,189,123,247, 10,179,245,172,185,206,234,
- 10, 66, 42, 87, 78,237, 54,240, 77,193,153,131, 27,248,155,231, 14,142,124, 17,115, 85,169, 2, 51, 3,184,206, 48, 76,220,188,
-121,243, 90,187,187,187,187,207,159, 63, 95, 94, 90, 90, 42,254,241,199, 31, 13,133,133,133,185,165,165,165,209,132, 88,223, 63,
-225, 89,165, 57, 81,225,222,120, 29,179,119, 67, 47, 39, 55,239,222,142, 46,190,141, 74, 10, 50, 31,151, 22,101, 30,103,120,156,
-210,228, 39, 70,215, 53,173, 49, 49, 49,233, 77,155, 54, 61, 32, 20, 10,111, 3,112, 1, 96, 71, 8, 41,102, 89,182, 68, 44, 22,
-231, 38, 38, 38,214,121, 65,214,212,243, 27,141,157,223,249,117, 71,177,142,151,152, 4,146, 29,169,231, 55, 26, 1, 32,239,228,
-108, 29,128,131,238,221,230, 12, 59, 20,157,250, 93,124,137,195,251,249,231,150, 30,170,171,126,214,157, 93, 65, 47,171,252,235,
-179,227, 51, 1,188, 97,227, 30,242,109,236,157,232, 5, 12,129,152, 3,251,165, 46, 47,233,214,203,208, 23,139,197,134, 86,173,
- 90, 85, 57, 90, 80, 38,147,213, 56,191,214,179, 7,253, 6,166,107,215, 77,199,207, 92,122,227,216,169,203, 95,181,107,223,201,
- 89,238,227, 13,127, 39, 51, 54,125,212,242,253, 51,119, 10,110, 12,250,232,226, 79, 79,178, 13,247, 8, 33,134,186,164, 77,163,
-209, 60,100, 24,166,164,172,172,108, 48, 33, 36,131, 97, 24,223,146,146,146, 24,139,197, 18, 91,103, 35,192,227,245,246,237,219,
-108,103, 24, 70, 68, 88,254,235,104,177,112,135, 33,231,126,230,139, 24,138, 63, 69, 87, 27,216, 99,242,212,105,193,129, 65,141,
-130,203,215, 34, 12,171,111,135,177, 19,223, 14,174,223, 48, 56,248, 95,235, 19,214,252, 66, 69,178,111,235, 25,247,166, 61, 19,
- 79,174,248,220,249,241,149,119, 20,245,124,108,181,133,169,197, 37,169,183, 86,232,242,221, 87, 60,191, 66, 67, 93, 73,121, 20,
-191,106,195,138, 79,102,231,100, 37,111,208,230, 63,140, 3, 0,109,254,195, 56,165,123,163,207, 11,115, 51,103, 23,229, 63, 89,
-241,162,215, 66,171,213,102,111,219,182,205,177, 99,199,142, 2,119,119,119, 20, 20, 20,224,220,185,115, 60,207,243, 89,117,213,
-202,123,120,241, 28, 19, 24, 88,111,199, 38,245,215, 34,133, 93, 63,150,131, 23, 33,128, 72,128, 28,179, 81,125,188,192, 81,255,
- 17,185, 23, 93,115,185,228, 57,134, 8,136,160,124,109, 65,158,231,153,111,126,216,146, 42, 20, 75,171,108, 82,229, 44, 38, 37,
-207,243, 86,175, 69,152, 39, 76,115, 14,183,132, 90, 53,138, 47,142,121, 80,203,203, 41, 57,209,161,239,248,222, 44,203, 89, 0,
- 24, 42,109,249,132, 48,103,193,112, 39, 11,235,105,162,235, 98,170,254, 84,207,155,205,142, 16, 74, 96,167,176,128, 1,131, 82,
-181, 74,230,202, 73,239,255,149,178,148, 23,119, 48,158,233,218,213,223,116,250,236,132, 11,151,174,142, 36, 60,215,128, 35, 0,
- 8,147, 98, 50, 27,246,228,219, 23,110,126,209,244,254,175,193,144,191,113, 62, 10,107,155, 75,254,219, 52, 25,134,145, 60,171,
-172,185,202,203,223,188,140,116,214,180,182,224, 95,201,187,157,103,227, 78, 50,185,242, 35,157, 78,179, 65,151,247,240,240,203,
-188,158, 12,195, 56,200,100,178, 8, 91, 91, 91,113, 97, 97,225,117, 66,136,250, 85,252,222, 43, 19,249,230, 94,151, 30, 61,195,
-102,156,188,152,184,250, 89,243, 97, 5, 62, 35, 87,201,199,245,235, 54,107,243,254,131,255, 54,138,240, 85,200,251,223,165,201,
-116,237, 42,114, 43,177,127,131,227,248, 47,187, 7,107,116,185,201,137,211, 46,197, 22, 92, 39,132,104,254, 74, 58,165, 82,233,
- 88,179,217,172,144, 72, 36,122,147,201,180,237,191, 37,239,110,225, 67,190, 0,131,198, 86,139, 16,220,207,143, 59, 48,191,214,
-103, 72,147, 38, 18,101, 1,156,116,133, 46, 69,117, 53, 86,255,145,239,157, 97,132, 77,155, 54,141,148, 72, 36,126, 28,199, 41,
- 77, 38,147, 78,175,215,167,164,166,166, 94,173,110, 65,242,191, 59,157,238, 77,135,172, 18,139,197, 31, 0,128,197, 98, 89,147,
- 23,123, 96, 70, 77,199, 86,183,255,255, 75,125, 52,114,164,144,236,217,195,253, 29,223,145,119,196, 8,149,197,194, 58,148,255,
- 46, 17,139,212,153,119,246, 58,254,167,202,210, 43, 7,121,182, 60,194,223,177, 1,136,162,154, 84,147,106, 82,205, 42,246, 21,
-208,235, 73, 53,255,147,154,158,141, 7,248,122, 54, 30,224,107,237,241, 85,237, 79,175, 39, 1,221,170,223, 68,212, 98, 82, 40,
-148,255,192,139, 29, 79,175, 2,229, 63, 73,118,194,225,140,191,115,127, 10,133, 1, 16, 85,205, 3,208,234,208, 31,195, 48, 81,
- 47,240,128, 61, 77, 53,169, 38,213,164,154, 84,147,106, 82,205,127,150,102,109,218,175, 76,211, 35,109, 34,164,154, 84,147,106,
- 82, 77,170, 73, 53,169, 38,109, 34,124,185,155, 0, 20, 10,133, 66,161, 80, 40,148,151, 10, 53, 88, 20, 10,133, 66,161, 80, 40,
-212, 96, 81, 40, 20, 10,133, 66,161, 80,131, 69,161, 80, 40, 20, 10,133, 66, 13, 22,133, 66,161, 80, 40, 20, 10,229,197,249, 91,
-103,114,167, 80, 40, 20, 10,133, 66,249, 39, 66, 35, 88, 20, 10,133, 66,161, 80, 40,212, 96, 81, 40, 20, 10,133, 66,161, 80,131,
- 69,161, 80, 40, 20, 10,133, 66, 13, 22,133, 66,161, 80, 40, 20, 10,133, 26, 44, 10,133, 66,161, 80, 40, 20,106,176, 40, 20, 10,
-133, 66,161, 80,168,193,162, 80, 40, 20, 10,133, 66,161,252,231, 13, 22,195, 48, 81, 84,147,106, 82, 77,170, 73, 53,169, 38,213,
-164,154,212, 96, 81, 40, 20, 10,133, 66,161, 80,168,193,162, 80, 40, 20, 10,133, 66,161, 6,139, 66,161, 80, 40, 20, 10,133, 26,
- 44, 10,133, 66,161, 80, 40, 20, 10, 53, 88, 20, 10,133, 66,161, 80, 40,255, 33, 24, 0, 85,142, 4, 32,132,156,182, 90,228, 5,
- 70, 19,212,166, 79, 53,169, 38,213,164,154, 84,147,106, 82,205, 87, 79,179, 54,237,186,248,143,255,106, 8, 33,127,219, 6, 32,
-138,106, 82, 77,170, 73, 53,169, 38,213,164,154, 84,243,159,182,209, 38, 66, 10,133, 66,161, 80, 40,148,151, 12, 53, 88, 20, 10,
-133, 66,161, 80, 40,212, 96, 81, 40, 20, 10,133, 66,161, 80,131, 69,161, 80, 40, 20, 10,133, 66, 13, 22,133, 66,161, 80, 40, 20,
- 10,229,197, 97,158,141, 6,160, 80, 40, 20, 10,133, 66,161,188, 36,104, 4,139, 66,161, 80, 40, 20, 10,133, 26, 44, 10,133, 66,
-161, 80, 40, 20,106,176, 40, 20, 10,133, 66,161, 80,168,193,162, 80, 40, 20, 10,133, 66,161, 80,131, 69,161, 80, 40, 20, 10,133,
- 66, 13, 22,133, 66,161, 80, 40, 20, 10, 53, 88, 20, 10,133, 66,161, 80, 40,148,255,188,193, 98, 24, 38,138,106, 82, 77,170, 73,
- 53,169, 38,213,164,154, 84,147, 26, 44, 10,133, 66,161, 80, 40, 20, 10, 53, 88, 20, 10,133, 66,161, 80, 40,212, 96, 81, 40, 20,
- 10,133, 66,161, 80,131, 69,161, 80, 40, 20, 10,133, 66,161, 6,139, 66,161, 80, 40, 20, 10,229, 63, 4, 3,160,202,145, 0,132,
-144,211, 86,139,188,192,104,130,218,244,169, 38,213,164,154, 84,147,106, 82, 77,170,249,234,105,214,166, 93, 23,255,241, 95, 13,
- 33,228,111,219, 0, 68, 81, 77,170, 73, 53,169, 38,213,164,154, 84,147,106,254,211, 54,218, 68, 72,161, 80, 40, 20, 10,133,242,
-146,161, 6,139, 66,161, 80, 40, 20, 10,133, 26, 44, 10,133, 66,161, 80, 40, 20,106,176, 40, 20, 10,133, 66,161, 80,168,193,162,
- 80, 40, 20, 10,133, 66,161,188, 56,204,179,209, 0, 20, 10,133, 66,161, 80, 40,148,151, 4,141, 96, 81, 40, 20, 10,133, 66,161,
- 80,131, 69,161, 80, 40, 20, 10,133, 66, 13, 22,133, 66,161, 80, 40, 20, 10, 53, 88, 20, 10,133, 66,161, 80, 40, 20,106,176, 40,
- 20, 10,133, 66,161, 80,168,193,162, 80, 40, 20, 10,133, 66,161, 6,139, 66,161, 80, 40, 20, 10,133,242,159, 55, 88, 12,195, 68,
- 81, 77,170, 73, 53,169, 38,213,164,154, 84,147,106, 82,131, 69,161, 80, 40, 20, 10,133, 66,161, 6,139, 66,161, 80, 40, 20, 10,
-133, 26, 44, 10,133, 66,161, 80, 40, 20,106,176, 40, 20, 10,133, 66,161, 80, 40,212, 96, 81, 40, 20, 10,133, 66,161,252,135, 96,
- 0, 84, 57, 18,128, 16,114,218,106,145, 23, 24, 77, 80,155, 62,213,164,154, 84,147,106, 82, 77,170, 73, 53, 95, 61,205,218,180,
-235,226, 63,254,171, 33,132,252,109, 27,128, 40,170, 73, 53,169, 38,213,164,154, 84,147,106, 82,205,127,218, 70,155, 8, 41, 20,
- 10,133, 66,161, 80, 94, 50,212, 96, 81, 40, 20, 10,133, 66,161, 80,131, 69,161, 80, 40, 20, 10,133, 66, 13, 22,133, 66,161, 80,
- 40, 20, 10, 53, 88, 20, 10,133, 66,161, 80, 40,148, 23,135,121, 54, 26,128, 66,161, 80, 40, 20, 10,133,242,146,160, 17, 44, 10,
-133, 66,161, 80, 40, 20,106,176, 40, 20, 10,133, 66,161, 80,168,193,162, 80, 40, 20, 10,133, 66,161, 6,139, 66,161, 80, 40, 20,
- 10,133, 66, 13, 22,133, 66,161, 80, 40, 20, 10, 53, 88, 20, 10,133, 66,161, 80, 40,212, 96, 81, 40, 20, 10,133, 66,161, 80,254,
-243, 6,139, 97,152, 40,170, 73, 53,169, 38,213,164,154, 84,147,106, 82, 77,106,176, 40, 20, 10,133, 66,161, 80, 40,212, 96, 81,
- 40, 20, 10,133, 66,161, 80,131, 69,161, 80, 40, 20, 10,133, 66, 13, 22,133, 66,161, 80, 40, 20, 10,133, 26, 44, 10,133, 66,161,
- 80, 40,148,255, 16, 12,128, 42, 71, 2, 16, 66, 78, 91, 45,242, 2,163, 9,106,211,167,154, 84,147,106, 82, 77,170, 73, 53,169,
-230,171,167, 89,155,118, 93,252,199,127, 53,132,144,191,109, 3, 16, 69, 53,169, 38,213,164,154, 84,147,106, 82, 77,170,249, 79,
-219,104, 19, 33,133, 66,161, 80, 40, 20,202, 75, 70, 84,213, 31,197,109,151,228,177, 44,235, 6, 0, 34,145, 40,223,114,227, 51,
-207,154, 68,124, 61, 61,123,112,192,122, 0, 16, 2,111,103,100,103,159,170, 66,243, 20,203,178, 78,207, 52, 75, 44, 55, 62,235,
- 93,147,166,184,205,151, 39,254,180,255,245,121, 61,171,136, 47, 10,197,109,190,204,126, 46,173, 94,117, 8,223,113,255, 31,233,
-252, 95,209,252, 39, 35,105,183, 36,207, 98,121, 90,142,196, 98, 81,190,249,122,205,229, 72,210,246,203,236, 63,237,127,109,158,
-123, 77,154, 74,133,172, 40,208,219,117,101, 77,154, 79,178, 11,103,106,117, 6,231,154, 52,255,103,238, 77, 43,241,240,240,104,
- 37, 16, 8, 62, 99, 24,198,190,210,159,239,101,101,101,125, 72, 75, 37,133, 66,121,229, 12, 22,203,178,110,183,127, 95, 0,173,
- 17,232, 49,254, 75,183,128, 33, 63,111,255,183,125, 12, 37, 82,125,210,129,166, 82,104,157, 20, 98,214, 62, 41, 41,137, 1, 0,
- 47, 47,175,245, 0,252,170,208,116,186,253,251, 2,232, 76, 64,231,209,139,156, 58,249,250,218,231, 10,133,179,100, 10, 69, 55,
-131,193, 16, 6, 0,114,185, 60,222,168,215,159,243,224,184,111,159,223,191,186, 12, 84, 78,107,247,113, 95,186,133, 14,249,249,
-125,142,231,165,250, 39,123, 58,243,154, 52,145,132, 51,253,248, 70, 78,206,177, 5, 0,103,205, 5,169,124,222, 46,163, 62,117,
-246,243,244,236, 46,149,203,155,219,217,219, 71,242,132, 52,230,121,158,225, 88, 54, 65, 91, 86,118,137,103,217,187,156, 69,231,
-124,251,192, 82,190,166,116, 62,159,151,145,128,232,154,135,199, 8,165,141, 77, 55,129, 72,212, 1, 0,120,150,189,170,211,106,
-207,181,203,205,221,107, 77,222,173,189, 62, 47,186,255, 63, 13,139,133,117, 75, 62,177, 0, 70, 11, 16, 49,252, 43,183,102,175,
-111,222, 14, 0,166,252,187,238,101, 73,135,218, 2,128, 77,224,128,235, 50,143,136, 60, 0, 16,165,229,184, 61, 60, 50, 15, 70,
- 11,208,120,192, 34,183,218, 52, 39,206,223,237,252,241,228, 97, 50, 0, 56,185,239,135, 70,103,247,175,237, 11, 0,221,135, 77,
- 59,214,107,248,244,135, 0,240,245, 47,251,157,119,126,245, 90,141,154,214,221,155,106,137, 58,233, 72,144,169, 52,199,209,215,
- 70,228,145,148,148, 36,168,203,189,233, 3, 56,228, 0,239, 10,132,194,200,192,160,160, 8, 0,228,201,227,199,119, 56,150,189,
-236, 9,252,248, 50,203,146, 80, 40,124, 63, 43, 43,107, 96,229,191,121,123,123,211, 2, 73,161, 80, 94, 77,131, 5, 0, 90, 35,
-112,225, 17,208,165, 93, 51, 76,126,189,159,109,229,255,237,255,117,177, 95,102,220,169,208,165, 27,191, 22,132,133,133,225,201,
-147, 39, 86,157, 76,103, 2,206, 39, 1, 50, 67,138, 93,190, 84,250,120,254,103,159,217, 71, 70, 70,138, 60, 61,159,190,132,231,
-231,231,183,187,124,249,114,171,133, 11, 23, 78,149, 25, 82, 74,116, 38,104,206, 39,213,174, 91,158,214,176, 70,245,241,217,244,
-215, 28, 0, 96,213,236,189,173,142, 94,189, 91, 47, 37, 37,165,199,210,165, 75,139,188,163,163,215,214,227,184,141,177,249,249,
- 25,214,164,115,215,137, 24,121,160,233, 84,192,136,137, 19,247,249,251,251,219,122,121,121, 49, 74,165, 18, 66,161, 16,165,165,
-165,126,137,137,137,125,239,222,189,171,189,116,237,160, 52,246,238,240, 39,153,194, 22, 6,107,242, 46, 97, 11,229,113,193,193,
-241, 35,250,246,245, 25, 48, 96,128,188, 65,131, 6, 0,128,148,148,148,224, 63,254,248, 99,244,209,163, 71,231, 75,216, 66, 86,
-103,130,161,182,188,151,107, 2,128, 28,232,224,232,230, 54, 86, 40, 22,135,177, 44,235,253, 44,186,144,197, 89, 44,241,170,252,
-252,109,207,239, 79,249,119,140, 22,224,126, 14, 16, 21, 25,129,113,195,162,108, 0,224,147, 81, 75,218,165,165, 60,146,152, 76,
- 38, 52, 10,105,220,113,241, 87, 43, 79, 64, 32,192,214,253,167, 43,246,183, 70,243,222,253,100, 44, 88,188, 10,217,177,123,219,
-113,234, 71,221, 52,165,106, 33, 0,216, 59, 56, 12,219,187,107,199, 57,175,166, 35,174, 61, 42, 52, 91,165, 89,211,189,121,124,
-215,247,158,153,113,231,154,252,116,242, 55,177,159,159, 31, 98, 99, 99,235,116,111, 66,157,104,199,123,122, 38,124,251,209, 71,
- 30,157, 59,119,134,173,173, 45, 68, 34, 17, 88,150,141,186,124,249,114,212,130, 5, 11,166, 65,157,168,181,246,222,180,130,111,
-189,188,188,186, 13, 30, 62,214,179, 91,239, 1, 24,214,167, 35, 45,136, 20, 10,229,213, 53, 88, 34,145, 40,191,231,132,165,110,
-145,109,195,113,243,238, 67,117,106,122, 78, 89,249,255, 84,247,247, 55, 26, 29, 21,216,100,221,209, 63, 96, 52, 26,113,229,202,
- 21,220,189,123, 23, 41, 41, 41,152, 55,111,158, 81, 8,188, 93,141,102, 73,231,209,139,156,100,198, 12,219,150,206, 25, 13,118,
-110, 63, 39,212,235,245, 56,127,254, 60, 74, 74, 74, 32,149, 74,225,227,227,131, 78,157, 58,137,206,159, 63, 95,111,212,152,177,
- 14,189,134, 76, 74, 54,202,124,203, 68, 34, 81, 73,181, 25, 16,137,242,123,140,255,210,173, 73,112,125, 60, 78,205, 86,127,246,
-213,175,101, 60, 79, 68,186,180, 76,243,133, 11, 23, 16, 17, 17,129, 93,187,118, 57,151,148,148,124,190,105,211,166,207, 60,191,
-223,184, 38, 39, 51,113,118, 13,122, 37,157, 71, 47,114,106,196,157,245,223,187,227, 55,201,221,187,119, 37,235,214,173, 67, 81,
- 81, 17,164, 82, 41, 28, 29, 29,225,225,225,129, 70,141, 26, 49,239,190,251,174,109,183,110,137,248,124,230, 36,255, 28,199,193,
-137,213,165,179, 92, 83, 98,202, 81, 6, 11,111, 5,174,223,188, 89,208,166, 77, 27,166,242, 62,126,126,126,232,218,181,171,124,
-232,208,161,129,211,222,125,143,143, 26, 58,229,177, 89,234,169,171, 77, 19,218, 12,133,179, 46,218, 43,106,244,232, 67,139, 22,
- 45,114,244,240,240,128,141,141, 13, 0, 64,173, 86,251,164,166,166,182,155, 63,127,254,240,235,247,118,137, 58, 15,200,200,134,
-141,175,190,166,235,249, 79, 69, 44, 22,229,151, 71,141,236,108, 20, 37, 25,153,121, 90, 0, 48,153, 76, 48,153, 76, 48, 26,141,
-120,103,218, 20,225,219,195,219, 4,249, 71,190, 31,147,146,149, 87,220,248,244,181,122,229,199,214,166, 41,210,165,168, 84,233,
-103,222, 94,240,209, 71, 30,238,238,255,106,249,219,186,101,139,176,184,184, 56,106,193,130, 5, 77,136,178,171,170,241,128, 69,
-142, 53,105,214,120,111, 62,252,163,193,226,233,189,155,255,252,213, 17,112, 28,135,232,232,104, 92,188,120, 17, 43, 87,174, 36,
-199,142, 29, 83,219,219,216,212,120,111, 66,157,104,215,201, 51, 55, 96,249,242,125,140, 76, 38,195,193,131, 7,241,224,193, 3,
- 8, 4, 2, 52,107,214, 12,227,198,141, 67, 84, 84,148,199,228,201, 83, 72,231, 62,163,158,192, 33, 68,243, 87,202, 18,195, 48,
- 2, 79, 79,207,247,223,249,240, 83,207, 97,163,223,192,247,223,124, 65, 13, 22,133, 66,121,117,168,178,247, 59, 32,104, 56,228,
-231,157,123,110,241,127, 52, 28,242,243, 78, 2, 8, 8, 32,176, 7,234, 71, 70, 70, 90, 84, 42, 21,185,113,227, 6,121,231,157,
-119,180,107,214,172, 57,247,199, 31,127,236,101,205,230, 13, 17,205,155,175, 32,128,160, 58,205,102, 14, 14, 14, 1, 1, 1, 5,
- 25, 25, 25,228,232,209,163,100,225,194,133,100,219,182,109,228,216,177, 99,228,244,233,211,228,216,177, 99,100,231,206,157,228,
-222,189,123,228,209,163, 71, 36, 48, 48,176,160,153,131,131, 67, 13,154, 66, 2, 8, 27, 13, 89, 55,123,223, 77,203,162,144, 33,
- 63,207, 32,128,176,177,187,123,104,207,158, 61,185,189,123,247,146,173, 91,183,146,205,155, 55,147,123,247,238,145,194,194, 66,
-226,237, 31, 80, 80,126, 92,117,233, 36,128, 32, 34, 34,162, 64,165, 82, 17, 95, 95, 95, 34,149, 74,137,187,187, 59,105,212,168,
- 17,105,215,174, 29,233,219,183, 47,121,253,245,215,201,231,159,127, 78, 84, 42, 21,241,247,247,207, 43, 63,174, 58,205, 1,158,
-158,138,192,192,192,244,216,216, 88, 82, 29,122,189,158, 20, 22, 22,146,179,103,207,146,192,192,192,244, 1,158,158,138,154, 52,
- 21, 64,203,166, 77,155, 22, 20, 22, 22, 18,179,217, 76,210,211,211, 73, 92, 92, 28,121,240,224, 1, 73, 79, 79, 39,122,189,190,
- 66,251,225,195,135, 36, 32, 32,160, 64, 1,180,172, 86,243,159,188,149,151,137,231, 54, 63,119,247,190, 30, 30, 30,250,125,251,
-246,145,172,172, 44,178,105,211, 38, 34, 0,150,252,219,190, 53,104, 74,129, 94,157, 58,117,226,162,163,163, 73, 76, 76, 12,153,
- 51,103, 14,233,221,187, 55,233,211,167, 15, 89,176, 96, 1,201,204,204, 36,153,153,153,164,111,223,190,156, 20,232, 85, 91,249,
-172,234,222,116, 0,252, 6, 12, 24,160, 55,155,205,228,201,147, 39, 36, 44, 44, 44, 83, 8,140,181, 1,154,116, 1,100,181,149,
- 79,111,192,201,211,211, 51, 39, 58, 58,154,236,223,191,159,248,251,251, 23, 8,129,137,246, 64, 67,123,160,161, 16,152,216,176,
- 97,195,130,232,232,104, 82, 84, 84, 68,252,252,252,114,188, 1,167, 23, 45, 75, 0, 4,158,158,158,191,125,249,245, 15, 36, 49,
- 83, 75,190,252,250, 7,226,233,233,153, 78, 8, 33,158,158,158,167,104,153,164, 27,221,232,246,191,190,137,234,100,198,108,108,
-150, 46, 94,188, 88,100, 48, 24,240,235,175,191,106,198,140, 26,181,223,209,209,145, 21,139,197, 96, 4,181, 15, 72,212, 56, 56,
-124, 48,111,238, 92, 71,163,209,136, 91,183,110,161, 85,171, 86,144,201,100,144, 72, 36, 16,139,197, 16,139,197,240,244,244, 68,
-126,126, 62,194,194,194, 48,117,234, 84,135, 31,191,255,254, 3,168,213,139,107,210,229,121, 34, 2, 0,142,231,165,245,189,188,
- 38,135, 54,109,186, 98,218,180,105, 2, 27, 27, 27, 24, 12, 6, 24,141, 70, 60,120,240, 0,206,206,206, 80, 42, 20, 86,229, 89,
- 32, 16, 8,108,109,109,113,246,236, 89,252,242,203, 47, 72, 73, 73, 65, 78, 78, 14,236,236,236, 16, 22, 22,134,198,141, 27,163,
- 75,151, 46,120,242,228, 9, 24,134, 97,106,211, 75, 16,139,223, 29, 55,122,180, 91,120,120,120,149,255, 55, 24, 12, 80,169, 84,
- 80,171,213,112,119,119, 71,223,190,125,221, 14, 31, 60,248, 46,128,111,171,218,223, 25,240,240, 9, 14, 62,116,227,198, 13, 23,
- 66, 8,182,110,221,138,178,178, 50,152, 76, 38, 8, 4, 2,200,229,114, 56, 57, 57,161,123,247,238,112,117,117, 69,112,112, 48,
-118,239,222,237,210,183,111,223, 35,206,249,249, 45,139,128,108,250,122, 81, 59,105,121,121, 39,123, 1, 46, 99, 95,127,253,216,
-221,123,247, 34,199,142, 29,139,188,188,188, 79,197,115,230,168, 44,192,170,218,142, 15, 1, 28,234,121,122,110, 92,190,124,185,
- 32, 55, 55, 23,179,102,205, 42,204, 78, 75,155,227, 0, 92, 2,128, 51,199,143, 71,110,219,182,109,217,214,173, 91, 93,182,108,
-217, 34,136,136,136,216, 24,146,158, 30,150, 8,168,235,146, 78, 13,240,254,234,213,171,229, 6,131, 1, 61,123,246,124, 34, 79,
- 73,105,206, 2,122,107,143,207, 1,222, 93,249,241,199, 30, 50,153, 12,179,102,205, 42,212,165,165,133,179, 64, 65,165, 93, 82,
- 93,147,147,143,143, 31, 63, 62,238,222,189,123, 46,171, 86,173,242, 24, 62,116,232,187, 0,150, 88,123,142,202, 29,218, 61, 61,
- 61,131, 7, 15, 31,235,222,168, 73, 83,236,223,185, 9, 63,173, 94,186,145,227,184,159,189,189,189,167, 11, 4,130,111,104,201,
-163, 80, 40,175,100, 19, 97,117, 56,187,186,182, 10, 13, 13,197,133, 11, 23,208,180,105,211, 27,142,142,142,172, 68, 38,131, 88,
- 44, 6,225,249, 90,143, 87,216,216,244,232,220,185,179,232,234,213,171, 8, 8, 8,128, 66,161,168, 48, 86,229,155, 68, 34,129,
-167,167, 39, 74, 75, 75, 17, 25, 25, 41,222,184,113, 99, 15, 0,139,107,211,206, 78, 77,180, 69,242,198,215,151,125,187,162, 97,
-155, 54,109,160, 86,151,130,231,121, 40,149, 74,152, 76, 38,136, 68, 34,152, 76, 38, 24, 76,164,212,154,188,114, 28,199, 9,133,
- 66, 4, 4, 4, 96,233,210,165, 48, 24, 12,144, 72, 36, 0,128,210,210, 82,168, 84, 42,196,197,197, 33, 53, 53, 21,228,217, 43,
-121, 77,216,216,218,246, 27, 52,104,144,180,170,255, 25,141, 70,168,213,106,168,213,106,168, 84, 42, 24, 12, 6, 52,107,214, 76,
-122,238,236,217,126,213, 25, 44,163, 92, 62,124,203,150, 45,110, 82,169, 20,122,189, 30, 26,141, 6, 25, 25, 25, 72, 75, 75, 51,
-228,231,231,179,118,118,118, 2,127,127,127,129, 76, 38,147, 13, 25, 50,132, 41, 45, 45, 5,195, 48, 24, 48, 96,128,243,246,173,
- 91, 95, 3,176,146, 22,127,235, 56, 9, 24, 91,154, 76, 3,219,182,105,115,246,198,205,155, 17, 31,124,240, 1,238,221,187,183,
- 92,185,107,215, 5, 29,112,183,166, 99,159, 0,239,174,168,100, 92, 72, 90, 90, 83,243,115,198,197,255,169,113,137, 45, 55, 46,
- 35,235,104, 92, 0,192,206,193,161,181,167,167, 39,142, 29, 59,134,244,148,148, 79,234, 98,174, 0, 64, 32, 20,118,234,220,185,
- 51, 14, 30, 60,136,204,180,180, 79,158, 51, 87, 0,128, 2,160, 64,244,228,201, 39, 27, 55,110,252,237,205, 55,223,132, 80, 36,
-234, 4,150,181,250, 28, 85,117,104,127,247,131, 79,112,112,223,182,141, 57, 57, 57,111, 17, 66,120, 0, 55,104,137,163, 80, 40,
-175, 2,117,154, 7,203,195,195,195,219,198,198, 6,217,217,217,104, 28, 26,154, 47,147,201, 32, 21,139, 33,151, 74,173, 58,222,
- 96, 48, 52,245,240,240,128, 90,173,134,139,139, 11, 36, 18, 73,197, 38,149, 74, 43, 62,219,217,217, 65, 32, 16,192,219,219, 27,
- 6,131,161,105,109,186,172, 42,201,237,248,166, 57,239, 28,222,183,165, 97,223,190,253,224,228, 84, 15,190,190, 62,112,115,115,
-131, 66,161,128,175,175, 47,130,130,130,200,250,245,235, 33,176, 15,178,234, 1, 94,217, 52,137, 68, 34,112, 28,135,188,188, 60,
- 36, 38, 38,226,222,189,123,136,142,142, 70, 76, 76, 12, 52, 26, 13,172,240, 87,208,234,116,205,171, 10,116, 25,141, 70,168, 84,
-170,138,232,149, 74,165, 66, 65, 65, 1,158, 60,121,130, 82,141,166, 69,117,122, 78,206,206,195,194,195,195,133, 0,160, 80, 40,
-208,162, 69, 11,252,252,243,207,236,225, 3, 7, 70, 53,137,142,174,231,123,226,132,227,250,117,235, 70,141, 24, 49,130,187,118,
-237, 26, 74, 75, 75,113,255,254,125,184,186,186,138,164,114,249,107,180,232,215,141,219,128,214, 69,163,233,211,161, 67,135,100,
-181, 90,141,111,190,249, 70, 32,182,179,251,101, 17, 32,172,197, 85,116,236,220,185, 51, 14, 29, 58,132,236,180,180, 57,105, 85,
- 24,151, 52,160, 32,253,201,147, 57, 27, 55,110, 68,175, 94,189,192,136, 68,117,238,136,212,174, 93,187,112,158,231, 17, 27, 27,
- 11, 71,224,122, 93,143, 15, 12, 10,138,176,181,181,197,131, 7, 15, 96,243, 44,186, 86,229,139, 2,112,233,206,157, 59, 80, 40,
- 20,104,220,164, 73,203, 58,158,230, 91, 47, 47,175,156,119, 63,248, 4,251,143, 95, 1, 0, 28,220,183, 45,175,146,185,162, 80,
- 40,148,127,166,193, 42, 71, 44, 22, 67, 42,147, 65, 42,149, 62, 53, 70, 50,153,213,199, 50, 12, 3,185, 92, 94, 97,168, 42, 27,
-171,202,159,149, 74,165, 85,198, 5, 0, 44,185, 87, 34, 95, 27, 57, 66, 42,145, 72, 96, 50, 25, 65, 8,129, 76, 38,135,163,163,
- 35, 2, 2, 2,160,211,105, 49,104,240, 48, 99,134, 74,114, 68,226,211,227,222,139,228,153,101, 89,104,181, 90,148,148,148,160,
-184,184, 24,165,165,165,208,235,245,176,162,117,176,162,170, 77, 79, 79,199,142, 29, 59, 80, 84, 84, 4,224,105, 7,234,114, 83,
- 85,254, 51, 57, 57, 25, 91,183,110, 69, 74, 74, 10,132, 66,161,213,223, 79,100,100, 36,142, 28, 57, 34,236,218,163,199,134, 83,
-254,254,217,167,252,253,179,187,246,232,177,225,208,161, 67, 66,111,111,111,164,166,166,226,214,173, 91, 40, 41, 41, 1, 33,132,
-161, 69,191,238, 60, 6, 74,116,197,197,111,126,250,233,167,196,214,214, 22,223,172, 88,209,124, 9, 48,198, 90,227,226, 80,131,
-113,113,248,107,198, 5,132, 16,240, 60, 15,142,227, 94, 40,111, 12,195, 48, 98,177,184, 46,229, 25,120,186,212,150,181,250, 2,
- 66,200,251,239,124,248,169,231,123, 31,205,199,185, 19, 71,202,255,158, 68,205, 21,133, 66,121, 21,169, 83, 19, 97,118,118,118,
-150, 86,171,109,232,239,239,143,204,204, 76, 55, 63, 63,191, 52,169, 88, 12,137, 84,106, 85, 31, 44,185, 92, 30,155,151,151,215,
-209,219,219, 27, 44,203, 86,152,169,231,155, 8,203,163, 50,247,239,223,135, 92, 46,175,117,156,185,128, 43,171, 31, 22, 22, 86,
- 17, 9,114,116,116,132,163,163, 3,100, 50, 57,150, 45, 91,198,111,248,229,151, 31,229, 97,239,170, 63,156,244, 49,185,189,100,
-195, 75,189,128,214, 86, 72, 74,165, 50,182, 65,131, 6,237,149, 74, 37,246,239,223,143,212,212, 84,148,148,148, 64,167,211,193,
-104, 52, 66,167,211,193,100, 50, 65, 46,151,163, 73,147, 38,168, 87,175, 30,226,227,227,171,205,123, 73, 81,209,254,216,216,216,
-246,109,218,180,169,136,160,116,235,214,141,233,214,173,155, 75,249,239, 58,157, 14,133,133,133,184,113,227, 6, 78,159, 62, 13,
-134, 97,144,148,148,196, 25,245,250,157,180,232,191, 24, 6,224,170,112,227,198,223,166, 78,157, 58,169, 99,199,142,224,128,190,
- 0,182,254,167,140, 75, 57,209,209,209,113, 28,199,117,108,212,168, 17, 84, 64, 91, 0, 7,235,100, 30, 31, 61,186,195,178,108,
-143,230,205,155, 99,255,158, 61,145, 0, 82,171,218, 79, 11, 68, 70, 68, 68, 64,175,215,227,126, 66,194,109,107,205,149,167,167,
-231,134,119, 62,252,116,226,176,209,111, 96,255,206, 77, 56,184,111, 91,198,143,107,150,251, 18, 66,204,180, 84, 81, 40,148,127,
-188,193, 42, 41, 42,186, 29, 23, 23,215,176,101,203,150,216,176, 97, 67,155, 14,237,219,103, 73,164, 82, 86, 42,145, 64, 96, 69,
- 5,162,215,106,207, 92,190,124,185,109,175, 94,189, 68,215,174, 93,131,135,135, 71,133,193, 42,255, 41, 18,137, 64, 8,129, 82,
-169,196,177, 99,199,204,122,173,246, 76,109,186, 28,203,113,130,103, 6,143, 16, 2,149, 74, 5,137, 68,130,245,235, 55, 96,211,
- 47,191,188,158,153,147,179, 55,184,149,211, 71, 0,228,255,177,138, 89,167, 59,123,230,204,153, 86, 51,103,206, 20,251,248,248,
- 64,165, 82,161,164,164, 4, 69, 69, 69, 40, 45, 45, 69,105,105, 41, 74, 74, 74,160, 82,169, 32,151,203,241,232,209, 35,139, 65,
-167, 59, 91,157,158,204, 96,216, 55, 97,194,132,143,239,220,185,227, 41, 18,137, 96,177, 88,192,243, 60,120,158,135,217,108,198,
-163, 71,143, 16, 31, 31,143, 7, 15, 30,160,184,184, 24, 98,177, 24, 66,161, 16, 49, 49, 49, 37, 54, 22,203, 30, 90,244, 95, 28,
- 49,176,255,242,229,203,147,198,141, 27, 7, 47, 31,159, 46,200,204,180,202,184, 28,168,193,184,168, 95,192,184,252,201,248,104,
- 52, 55,147,147,147, 59,118,237,218, 21,158, 62, 62,203,155,100,102,158, 74,168, 67, 63, 44,142,101, 47, 93,190,124,185,199,248,
-241,227,177, 97,195,134,229,174,201,201,199, 11,158,107,206,116, 5, 92, 27, 4, 6, 46,159, 56,113, 34, 78,158, 60, 9,142,101,
-171,141,200, 61,215,161,189,254,224,225, 99,125,105,135,118, 10,133,242, 79,162, 78, 77,132,140, 86, 59,119,222,188,121, 22,161,
- 80,136, 97,195,134,217, 29, 60,116,104, 68,204,221,187, 1,249,249,249,142, 28,199,213,170,101,167, 86,175, 89,188,120,177,202,
- 98,177, 32, 36, 36, 4,197,197,197,224, 56, 14, 34,145, 8, 34,145, 8, 12,195, 64, 32, 16,192,214,214, 22,241,241,241,216,181,
-107, 87,169,157, 90,189,166, 54, 93,158,231, 99,127,255,253,119,136, 68, 34, 34,151,203,193, 48, 12, 68, 34, 17,214,175, 95,159,
- 63, 55, 39,103, 63, 0, 8, 5, 2, 19, 0, 8, 4,140, 85,189,114, 25,134,169,181,125, 82, 42,149,130,127,218,185,191,214,125,
- 93, 45,150,213,235,214,173,211, 36, 37, 37, 65,171,213, 86, 68,219,202,202,202, 42, 58,205,171, 84, 42, 48, 12, 3,131,193,128,
-139, 23, 47,106, 92, 45,150,213,213,233, 21, 1,185,153, 73, 73,131,218,180,105, 83,148,156,156, 12,181, 90,141,216,216, 88,156,
- 62,125, 26,187,119,239,198,201,147, 39,241,232,209, 35,176, 44, 11,111,111,111, 16, 66,112,224,192, 1, 53,171,209,244, 45, 2,
-114,105,209,175,158,250, 30, 30, 61,220,221,220,210, 93, 93, 92, 50,235,123,120,244,120,254,255, 14,192,195,135, 15, 31,130,101,
- 89, 4, 4, 4,212,171,169, 31, 22, 97,217,203,151, 47, 95,198,248,241,227,225,219,176,225, 50,127,192,245,249,125,252, 1, 87,
-255,192,192,101,229,198,133,176,236,229,186,166,217, 14,248,238,163,143, 62,210, 75, 36, 18,236,218,181, 43,192, 18, 20,244, 64,
- 4,140,177, 5, 66,187, 2,146,218,142,247, 4,126,252,252,243,207,115, 25,134,193,182,109,219, 92, 28, 2, 3,227, 68,192, 4,
- 7,160,190, 3, 80, 95, 4, 76,112, 8, 12,140,219,181,107,151, 11,203,178,152, 49, 99, 70,174, 39,240, 99,117,122, 66,161,240,
-253,236,236,236,129, 89, 89, 89,157,179,179,179,125,127, 92,179, 28,231, 78, 28,193, 79,171,151,110,204,201,201,121, 43, 47, 47,
-239, 70, 86, 86,214,184,204,204,204, 56, 90,226, 40, 20,202,171, 8, 83, 85, 63, 39,113,219, 37,121, 0,113,235,210,174, 25,110,
-222, 77, 84,187, 56,217,159, 40,255,159,234,254,254, 70, 3,218,121, 52,251,230,155,111, 32, 18,137,144,145,145,129,132,132, 4,
-216,219,219,227,131, 15, 62, 48, 90,140,198, 65,229,235,157, 49, 12, 19, 69, 8, 57,253, 76,243, 20,203,178, 78, 50, 99,134,109,
-132, 83,114,195,173,155, 55, 10,237,236,236, 80, 86, 86, 86, 49,173,128, 82,169,132, 66,161,192,189,123,247, 48,254,141, 55,185,
-199,108,243,138,137, 70,203,215, 59,171,172, 9,134, 17, 2, 64, 95, 39, 39,229,125,153,108,150,179,187,251,236,247,222,123, 79,
-209,165, 75, 23, 72, 36, 18,180,106, 27,153,107,211, 98,246,119, 2, 1,195,102, 22,149,206, 11,172,239,229,144,144,148, 10,128,
-121,186,102,225,179,181, 8,171, 74,103, 83,249,189,128,173, 63,125, 97, 31, 22, 22,246, 52,223, 42, 21,242,242,242,144,159,159,
- 15,149, 74, 5,173, 86, 11, 0, 56,125,250, 52,206,222, 72, 46,205,177,237,249,164,186,116,254, 43,239,169,118,141, 21, 15, 27,
-124,183,122,165,208,209,209, 17,121,121,121, 40, 40, 40,128, 74,165,130, 94,175, 7,199,113, 40, 45, 45,197,161, 35, 71,185, 39,
- 92,211, 20,163,172,190,166, 54, 77,104, 51, 20,245,202,174,120, 71, 52,241, 39,147, 38, 77,178,179,183,183, 7,207,243, 40, 41,
- 41, 65,122,122, 58,146,147,147,113,241,226, 69,109,190,202, 4,173, 75,207,204,242,137, 70,171,188,158, 47,171, 80,253, 47,106,
- 62, 43, 75, 0,224,229,233,153,157,150,150,230,198,113, 28,188,189,189, 89, 85,113,241, 50, 41,112,210, 14,200, 1, 64, 10,129,
-207, 86,127,247,221,155,131, 7, 15, 70,235,214,173, 51,114,243,242, 26, 84, 85,150,192, 48,194, 16,192, 65,231,227, 19,127,227,
-198, 13,143,244,244,116,140, 31, 63,190, 48,237,241,227,138,105, 26,212, 64,164,127, 96,224,178, 93,187,118,185, 52,108,216, 16,
- 77,155, 54,205,149,151, 79,211, 80,117,249,172,254,222,124,248, 71,131,105, 67,195, 91,191,243,206, 59, 96, 89, 22, 23, 47, 94,
-196,245,235,215,145,150,150,134, 43, 87,174,168,236,109,108, 70,213,116,111, 66,157,104,215, 55, 88, 27,176,109,219, 86, 70, 34,
-145, 96,227,198,141,184,115,231, 14, 0, 32, 34, 34, 2, 19, 39, 78, 4,203,178, 24, 59,118, 28,249, 35, 81, 81, 49,209,104, 85,
-101,201,199,199, 39,156,231,249, 21, 12,195, 72, 8, 33,173,179,179,179,229,222,222,222,217,217,217,217,190,117,233,115, 69,203,
- 39,213,164,154,255, 28,205, 87,141, 90,215, 34,252,114, 45, 28,254,188, 28,199,219,217,191,255,186, 68,212,187, 79,223,208,121,
-159,206, 21, 68, 68, 68,192,215,215, 23, 17, 17, 17,184,115,231,142,172,113,227,198,181,173,119, 86,214,107,200,164,228, 94,189,
-122, 57,190,251,238,187, 14, 93,186,116, 17,123,121, 61, 93, 87, 55, 62, 62, 30,199,142, 29, 51,239,216,177,163, 52, 75, 26,169,
-186,114,236,215, 50,107,214, 59, 59, 86, 82,162, 3,240, 69, 51,147,233,151,207,231,205, 91, 16,214,180,233,164, 15, 63,252, 80,
- 96,107,163, 20, 47,153,247,150, 28, 0,190,252, 97,183,195,224, 17,175, 99,117, 16,208,101, 76,213,235,188, 85, 78,103,102, 78,
-126,218,152,137, 35,130,222,125,107, 12, 55,112,224, 64, 27, 91, 91, 91,248,250,250,194,201,201, 9, 41, 41, 41,136,141,141, 37,
-167, 78,157, 42,187, 29,159, 34,222,180,251,100,154,212,214,205,154,117, 3, 53,189, 6, 79, 72,153, 48, 97,130,211,208,161, 67,
-237,194,194,194,196, 98,177, 24,114,185, 28, 69, 69, 69,200,200,200, 48,159, 63,127,190, 44, 75,210,190,228,202,241, 77, 26, 43,
-215, 34,212,119, 30,189,232,209,165, 83, 11,103,196,199,198,142,227,129,230,102,179,217,155,227, 56, 70, 32, 16,228,240, 60, 31,
-107,214,104,126, 51, 70, 44, 92, 69,215, 34,180, 14,142,227, 36, 28,199, 65,165, 82,225,212,169, 83,162,199,143, 31,127,118,247,
-238,221,207,178,179,179, 97,177, 88, 48,124,248,112, 68, 68, 68,224,220,185,115, 40,200,203, 59, 92,147, 86, 34,160,150,101,102,
- 78,124,251,237,183,143,109,221,186, 85,112,247,238, 93,151,141, 27, 55,254, 90,149,113, 25, 55,110, 28,159,151,158, 62,209, 88,
-195, 28, 88,181,220,155,133,199,119,125,127,119,200,176, 17, 77, 22,206,255, 76,220,161, 67, 7,184,184,184, 32, 50, 50, 18,102,
-179,217,209,138,123, 83,211,185,207,168, 39,205,155, 55,183, 89,181,106,149,199,155,111,190,137,233,211,167, 3, 0,244,122, 61,
- 78,158, 60,137, 25, 51,102,228,166,139,218,106,111,159,219, 85, 99,249,124, 22,153,234, 9, 0,222,222,222, 23, 0,116, 6,240,
-132,118,104,167, 80, 40,255,104,131, 5,252,107,189,179, 75,215,227, 80,121, 57,142,167,184, 38,176, 46,195, 31, 79,157,189,188,
-169, 20, 90, 39, 49, 99,180,143,185,115,135, 73, 78, 78,174,241,100,229,235,157, 25,101,190,101,202,236,194, 54,223,173, 94,253,
-193,134, 13, 27,122,148, 79,197, 32,151,203, 99,245, 90,237, 25, 59,181,122,141,177,161,239,153,186,174,157,119,175,184, 56, 15,
-192,180, 80,142,251,238,141, 73, 83,190, 22,216,250,136, 63, 93,178,193, 32, 20, 8, 76,143,178, 11,176, 58, 8,176,177, 98,192,
-163,206, 4,196, 22,185,177, 9,232,154,184,124,209,162, 89,171,191,253,182,141,210,214,182,139,133,101,131,121,158, 7,225,184,
- 36,189, 94,127, 1,102,243,141, 76,175,201,223, 74,109,221,136,181,235, 6, 26,229, 13, 52,238,218, 11,109,246,237,217,243,254,
-177, 99,199,254, 45,239,158, 60,255,221, 19,251, 6,167,173,201,123,229,125, 12,192, 85,228,231, 95,173,246,109, 3,116, 45, 66,
-171,111, 10,158,159,236,228,228,180,165, 71,143, 30,242,168,168, 40,244,239,223, 31, 29, 58,116, 0,207,243, 32,132, 64,163,209,
- 96,247,238,221,248,250,235,175,147, 26, 0, 95,212,166,103, 4,206,200,142, 30,237,219,188,121,243,141, 53, 25,151,103,230,170,
-214, 62,135, 53,223,155,178, 36,214, 97, 80,234,232,119,151, 6,153, 74,115, 28,157,149,172, 71,124, 92,172,192,218,123, 19, 14,
- 33, 26,238,206,238,182,195,135, 14,125, 87, 40, 18, 69, 62, 27,209, 72,238, 39, 36,220, 46, 95,236, 25, 17, 19, 79,213,165, 44,
- 17,242,116,238, 57,218,161,157, 66,161,252,227, 13,150, 72, 36,202, 47,143,242,136, 68,162,252, 39, 7,166,188, 94,147,136,175,
-167,103,143,103,111,199,168,109, 45,194,242,207,119,213,106,205,179, 25,218,171,156, 68, 84,252,220,254,117,201,212,131,252,252,
- 68, 0, 3,128, 52, 32,241,105,119, 22,113,155, 47, 63,169,156,167,106, 47,200,159,206, 43, 41, 78,205,203,187,132,167,205, 57,
- 85,118,198, 21,251, 73,138,107, 75,231,243,121,191,156,145, 81,250, 44,223, 85,231,221,163,246,188,139,234,120,125, 68,127,225,
-122,254,211,200, 42, 44, 60, 0,192,214,231,200, 17,247,227, 71,142,188, 54,107,230,204,225,158, 94, 94,129, 46, 46, 46, 78,118,
-118,118,130,107,215,174, 37,179, 6,195,119, 45,128, 77,215, 1,157, 53,154, 70,224, 76, 72,122,122,216,200,161, 67,223,101, 68,
-162, 78,149,141, 11, 97,217, 43, 1,192,143, 70, 43,102,111,175,243,189, 41,171,251,189,153,249, 52, 29, 75,192,178, 75,112,239,
-222, 95,190, 55,121,158,255,210,219,219, 91, 67, 59,180, 83, 40,148,127, 20,127,231, 58, 60, 0,162,168, 38,213,124, 85, 52,159,
-122, 20,216,211,235, 73, 53,169, 38,213,164,154, 47, 95,243, 31,189, 22, 33,133,242, 15,127, 25,225, 0,148,210, 43, 65,161, 80,
- 40,148,218, 96, 0, 68, 85, 83,153, 88, 61, 58,128, 97,152,168, 23,168,172, 78, 83, 77,170, 73, 53,169, 38,213,164,154, 84,243,
-159,165, 89,155,246, 43, 51, 58,145, 54, 17, 82, 77,170, 73, 53,169, 38,213,164,154, 84,147, 54, 17,190,220, 77, 0, 10,133, 66,
-161, 96,209, 34, 70, 0, 48, 12,176, 72, 0,236, 21, 2, 35,133, 79,127,127,113, 70,142,100,170,156,132,246,253,247, 25, 59,122,
-197, 41,148, 87, 27,218, 7,235, 63,136,167,167,167,159,187,187,251,207,132, 16, 38, 63, 63,127,114, 78, 78, 78, 58,189, 42,255,
-125, 56, 59, 59,247, 96, 89, 22,106,181,250,204,171,152,191,176, 32,102, 40, 17,160,241,191,194,218, 72, 79, 72, 34, 91,170,218,
-183, 73, 48, 51, 30,204,191,230,210, 98,120,220,143,127, 68,126,183,246, 92, 12,195, 8,134,244,117, 93, 1, 0, 7,142, 21,204,
-254, 59,230,197,242,242,242,106,228,236,236,124, 66, 40, 20,138, 56,142,155, 22, 27, 27,123,164,122, 3, 52, 82, 8, 0,174,138,
-253,115, 29,235,185,204,249,124, 22, 35, 54, 25,191, 81, 25, 13, 6,181, 64, 36, 74,145, 74,148,151, 89,129,205,177,204,188,190,
- 9, 85, 29,191,103,207,158,106, 87,215, 14, 15,102,250,134, 54,105, 50,176,101, 83,197,147, 21,107,218,172,238, 18,224, 34, 78,
-206,136,177, 93,187, 37,253,103, 87, 39,239,129, 31,188, 37, 58, 34, 35,220,184,229,191,146, 50,122,151, 89,207, 87, 12, 83,207,
- 12, 52, 21,203,100,190, 28,203,186, 51, 0, 17,138, 68,121, 22,163, 49, 67, 2,220,155, 67,136,234, 85,215,148,200,100, 62, 28,
-203,186, 3,192,127, 99, 58, 41,181, 24,172,192,192,192, 91, 2,129,192,167,124,141,191,202,139,213,150,127,126,254, 39,199,113,
-153, 15, 30, 60,104,101,237,201, 27, 54,108,104,111, 48, 24, 94, 99, 24,230,117, 0, 32,132,108,151,203,229,187,147,147,147, 95,
-168, 35,113,195,134, 13,237, 9, 33,179, 21, 10, 69,119,131,193, 16, 6, 0,114,185, 60, 94,175,215,159,101, 24,102,197,139,232,
- 50, 12, 35,242,244,244, 28,105, 99, 99,211,141,101,217,110,132, 16, 70, 36, 18,157,211,233,116,103,115,114,114,246, 16, 66,216,
-186,106,122,121,121, 41,156,157,157,151, 4, 5, 5,141,121,247,221,119,139,234,213,171, 23,178,104,209,162,155,225,225,225, 59,
-138,139,139,231,101,103,103,235,255, 27, 10, 7,195, 48,129, 30, 30, 30,219,197, 98,177, 48, 35, 35,163, 27, 0,248,250,250,158,
- 51,153, 76, 92,126,126,254,235,132,144,199,117,209,115,117,117,181, 17,139,197,237,108,108,108, 90,217,216,216,116,230, 56,174,
-241,179,245, 19,239,107,181,218,139, 22,139,229,150,197, 98,185, 86, 80, 80,160,253,111,185, 65, 24,134,177,115,115,115,219,202,
- 48, 12, 24,134, 9, 38,132,104, 94,181,135, 0, 17,160,113, 66,252,131,144, 10, 19, 21, 22, 90,195, 5,129, 95, 21,251, 90,109,
-176,250,245,112,236, 51,112, 96,115, 1, 0,152,205, 55,251, 0, 56,250,178,205, 85,191,126,253,174,126,247,221,119, 78, 6,131,
- 1, 31,125,244,209,246,224,224,224, 31,147,146,146,230,214,116,156,157,157,221,140, 47, 22,255,160,124,246, 44,115,227,121,222,
- 45, 39, 39, 35, 56,241, 65,108,159,196,196,184,165,102,237,239,215,204, 68, 56, 69,165, 27,244,192,154,116, 52, 9,100, 6, 12,
- 30, 57,180,255, 23, 95, 44,196,152, 81, 99,234,199,199, 27, 20,222,246, 79,164,165,102,155, 32, 23, 23,159, 65,159,124,186,156,
-185, 22,125,126,208,158,221, 27,206,126, 50,137,233, 78, 77,150, 85,247, 34,243,165, 72,212,206, 41, 52,180,243,168, 3, 7, 96,
-235,235, 43, 18,201,100, 2, 0, 96,141, 70,223,178,140, 12,207, 93,131, 6,181, 93,196, 48,231, 23, 16,114,157,106,254,255,107,
- 82,172, 52, 88, 2,129,192,231,206,157, 59,110, 54, 54, 54,120,102,126,192,113, 28, 56,142,171, 88, 84,152, 16, 82,241,147,101,
- 89,116,237,218,213,170, 55, 88, 79, 79,207,238, 0,222, 8, 15, 15, 31, 62,123,246,108, 73,199,142, 29,193,113, 28,206,158, 61,
- 27,185,122,245,234,239,189,188,188,246, 3,216,148,147,147,115,198,218, 55, 92, 79, 79,207,222, 54, 54, 54,219, 62,251,236, 51,
-251,200,200, 72,145,167,167, 39, 0, 32, 63, 63,191,221,229,203,151, 91, 45, 92,184,112,154,167,167,231,216,156,156,156, 19,214,
- 94, 28, 31, 31,159,240,224,224,224,189,125,251,246,245,105,213,170,149,188, 81,163, 70, 32,132, 32, 38, 38,230,205,196,196,196,
-209, 71,143, 30, 93,224,227,227, 51,194,218,245,212, 24,134, 97, 2, 3, 3, 39,120,120,120, 44,153, 57,115,102,189, 33, 67,134,
- 72,227,226,226, 74, 2, 2, 2,152,253,251,247,187, 30, 62,124,120,218, 79, 63,253, 52, 50, 40, 40,104,222,227,199,143, 55,147,
-170,214, 49,122,142,224,224,224, 91, 2,129,192,199, 26, 3,204, 48, 12, 88,150,181,202, 4, 51, 12,211,162, 65,131, 6,187, 47,
- 93,186,212, 32, 53, 53,149, 27, 50,100,200, 22, 0, 56,123,246,108, 83,139,197,194,244,234,213,235, 24,195, 48,175, 17, 66, 98,
-172,201,187,183,183,119, 51, 87, 87,215,131, 67,134, 12,169,231,231,231,167,244,241,241, 97,228,114, 57,132, 66, 33,202,202,202,
-188, 18, 19, 19,163, 98, 98, 98,244, 87,174, 92, 41,246,246,246, 30,148,149,149,117,175, 14, 15,222, 14,110,110,110,227,196, 98,
-113, 56,203,178,222, 0, 32, 18,137,178, 44, 22, 75, 92,126,126,254, 86, 66,200,213, 23,189, 65,220,221,221,191, 95,178,100,137,
- 75,126,126, 62, 89,182,108,217,247, 0, 38,188,170, 15,131,237, 59,246,224,214,205,235, 0, 32, 97, 24,134,121,190,252, 49, 12,
-195, 52, 14,134,228,195, 15,103,162, 85,235,182,120,125,204,200, 90, 53,135,244,119,249, 66, 42, 20, 57,235, 76,198,235,133,106,
-193, 65, 63, 55,233,208,177, 35, 91, 61, 1,128,227,199, 98,135,182,109, 91,239,178,139, 3, 63, 88, 41,149,181, 53,113,108,209,
-129, 63, 10,231,215,197, 76,121,120,120,156,176,179,179, 83,150,148,148,228, 22, 21, 21,173,237,215,175,223,151,171, 86,173,114,
-122,242,228, 9, 50, 50, 50,240,198, 27,111,216,102,101,101,189,235,231,231, 23,157,158,158, 94,109, 36, 75,163,209,172, 89,178,
-120,230,124, 59,123, 39,161, 82, 97, 3, 91, 59,123, 52,104, 16,140,214,109, 34, 17,213,115, 16,158, 60, 73,108,183,123,231,134,
- 59,194,156,189, 95,113,210,136, 47, 85,170, 6,213, 62,151,194, 66,152, 46,229,230,106,254,252,133,120,248,224,129, 38, 53, 69,
-240,222, 31, 7, 68,202,190, 61, 66,101, 38,115, 89,234,181,232,243, 13,218,181,239, 10, 0,173,246,236,222,112,118,209, 88,166,
-199,130,109,175,158,121,127,153,230,234, 11,177,120, 66,239, 85,171,220, 34,166, 77,147,148,165,164,152,159,172, 91,167,203,187,
-120,145, 19,201,100,196,183, 79, 31,198,181, 91, 55,249,180,251,247, 37, 87,150, 45,235,188, 84, 42, 13,248,212,100,218, 70, 53,
-255,255, 52, 41,117, 51, 88,176,177,177,193,174, 93,187, 32, 22,139, 33, 18,137, 32, 22,139,171,253,236,231,231,103,141, 9, 26,
- 22, 22, 22,246,195,204,153, 51,221, 7, 14, 28, 8, 39,167, 63,175,178, 49, 96,192, 0,244,235,215, 79,146,156,156, 60,122,207,
-158, 61,163,183,108,217,146,235,233,233,249, 94,206,179, 5,155,107,168,188,187, 5, 4, 4,236,223,177, 99,135, 66,175,215,227,
-252,249,243, 40, 41, 41,129, 84, 42,133,143,143, 15, 58,117,234, 36, 58,127,254,124,189,209,163, 71,239,247,246,246, 30,144,149,
-149,117,174,182,180,122,120,120,180,114,117,117,189,240,203, 47,191,200, 67, 67, 67,153, 71,143, 30,161,121,243,230, 0,128,162,
-162, 34, 12, 24, 48, 64, 62,116,232,208,192,119,222,121,231,154,135,135, 71,151,220,220,220, 91,181,228,189,101,243,230,205, 55,
-247,233,211,199,107,206,156, 57,246,182,182,182, 72, 77, 77,205,241,240,240, 8, 46, 55, 63,131, 7, 15,150,246,236,217,211,115,
-237,218,181,107,142, 30, 61,250,145,167,167,231,132,156,156,156,219, 53,233, 10, 4, 2,159,219,183,111,187, 41,149, 74,228,229,
-229, 97,251,246,237,120,247,221,119, 33, 20, 10,145,159,159,143,221,187,119,227,189,247,222,131, 80, 40,132, 90,173,182,202, 4,
-219,216,216, 68, 53,111,222,252,215,179,103,207,250, 56, 58, 58,194,203,203, 75,240,249,231,159,135, 7, 4, 4, 40,234,215,175,
- 47,204,201,201,193,254,253,251, 3,198,141, 27,119, 80, 46,151,191,105, 48, 24,106,109, 58,115,118,118,254,109,243,230,205,126,
-119,239,222,197,186,117,235, 80, 92, 92, 12,169, 84, 10, 71, 71, 71,120,120,120, 32, 56, 56,152,153, 54,109,154,178,123,247,238,
-202,133, 11, 23,254, 6,160,133, 21, 15,221,230,110,110,110, 63,143, 30, 61, 58, 96,209,162, 69,142, 30, 30, 30, 40,127, 33, 80,
-171,213, 62,169,169,169,237,230,207,159, 63,194,221,221, 61, 57, 63, 63,127, 10, 33,228,110, 29, 31,234, 45,122,244,232, 49, 96,
-200,144, 33,194,156,156, 28,108,221,186,117, 0,195, 48, 45,172, 53,149,255,107,220,186,121, 29,147,223,249,160,204,203,215, 87,
-114,248,208,206,193,101,101,191, 92,182, 21, 56,138, 0,160,140, 87,177, 29,219,217,118, 26, 56,104,180,164, 95,255, 33,101,191,
-252,180,198,214, 26,131, 37, 21,138,156,119,109,155,154,113,241, 74, 82,227, 19,167, 83,163,134, 12,138, 18,136, 36, 33,129, 0,
- 48,107,230,219,210, 3,135, 78,255,216, 59,170,126, 78,231,142,193, 25,163,198,174,243,173,139,185, 10, 8, 8, 56,127,226,196,
- 9,119,169, 84,138,146,146, 18,231,141, 27, 55,174,108,219,182,173,224,241,227,199,120,240,224, 1, 82, 82, 82,160, 86,171,209,
-166, 77, 27,219,132,132,132,181, 0,170, 53, 88, 5,250, 97, 75, 2,220, 10,191,243,118,118,106, 96, 48,171,221, 56,182,168,201,
-217,211,119,155,237,219,163,139,112,243,240, 9, 30, 61,122, 50, 62,153,187, 92,252,251,190,205,243, 47, 92, 60, 9,160, 65,245,
- 51,248, 19,116,248,116,222, 92,148,106,140, 24, 59,230,109,140, 27,243,182, 51,129,201,147,112, 6, 27,147,190,196,209, 65, 18,
-127,100,243,206, 61, 67, 1,248, 84, 50, 89,103,168,201,170,158, 47, 68,162,182, 3,126,248,193, 53,252,173,183,100,119, 23, 45,
-210, 22, 94,188,168, 15,234,215,175, 36, 98,234, 84, 35, 0,104, 82, 82, 36, 15, 23, 44, 80,186,118,238,172,104, 63,123,182, 19,
-103, 50,121, 44,102,152, 54,159, 19,114,163,174,154, 13,198,140,225, 86,236,223,223,250,218,178,101, 93,177,120,177,176, 91, 68,
- 68,204,188,159,126,202,250, 43,154, 47, 51,157,217, 23, 46, 24,181,141, 27,163,233,240,225, 69,222,206,206,198,151,153,247,191,
-146, 78, 74, 21,117, 72,117, 65,146,144,144,144,188,196,196, 68,183,253,251,247,215,106,174,196, 98, 49, 60, 61, 61, 17, 25, 25,
-153, 31, 27, 27,235, 94,195, 67, 49, 35, 35, 35,195,135,101, 89, 72,165,210, 26, 19,166,209,104, 16, 27, 27,139, 81,163, 70,101,
-102,103,103, 87,251,224,173, 87,175,158,157,147,147,211,147,115,231,206,185,196,199,199,227,214,173, 91, 8, 8, 8,128,147,147,
- 19,196, 98, 49, 44, 22, 11, 74, 75, 75, 17, 18, 18, 2,133, 66,129,126,253,250, 21, 22, 23, 23, 7, 20, 23, 23, 87,251, 32,171,
- 95,191,190, 76, 44, 22, 39,237,219,183,207, 55, 60, 60, 28, 55,110,220,128,175,175, 47, 60, 60, 60, 0, 0, 41, 41, 41,184,124,
-249, 50,250,245,235,135,184,184, 56, 76,157, 58, 53,195, 98,177, 4,167,166,166, 26,171,109, 50,104,210, 36,103,207,158, 61,153,
-161,161,161, 6,173, 86, 43,200,203,203, 19, 95,188,120,145,213,104, 52,182,106,181, 90,172, 82,169,196,165,165,165, 34,173, 86,
- 43, 22, 8, 4, 18,163,209, 40,190,118,237,154,176,168,168,200,190,166,235, 20, 26, 26,154,247,224,193, 3,183, 67,135, 14,161,
-105,211,166,216,191,127, 63,102,205,154,133, 43, 87,174,192,215,215, 23,123,246,236,193,236,217,179,145,152,152, 8, 23, 23, 23,
-116,239,222,189,198,239, 8, 0,130,130,130, 30,197,198,198, 6, 74, 36, 18, 60,121,242, 4,153,153,153,229,235,217,161,160,160,
- 0,143, 31, 63, 70, 86, 86, 22,130,130,130, 48,102,204,152,199,153,153,153, 65,181, 21,180,150, 45, 91, 22,156, 57,115,198,165,
- 89,179,102,200,203,203,131,163,163, 35, 28, 28, 28,224,232,232, 88,241, 57, 32, 32, 0, 51,103,206, 68,179,102,205,242, 83, 83,
- 83,221,107, 51, 63, 77,155, 54, 61,113,230,204, 25, 23,123,123,123,228,230,230,162,180,180, 20, 34,145, 8, 74,165, 18, 46, 46,
- 46,144,203,229, 0,128,164,164, 36,244,239,223,191,240,201,147, 39,189,173, 53, 71, 12,195, 8,220,221,221, 31,220,187,119, 47,
-152, 16,130,244,244,116, 36, 38, 38,226,157,119,222, 73, 50, 24, 12,161,175,210,154,122,149,250, 85, 73, 38, 76,156, 44, 25, 50,
-104,176, 46,230,214,113, 94,129, 11,104,211, 66,161, 2,128, 27, 49,122, 71, 61,186,160, 69,171, 62,130, 3,135, 14, 42, 55,111,
-250, 69, 12, 30,238, 96,144,152,240,144, 44,174, 78,123, 64,111,199,241,179, 63,232,211,184,115,199,206,162,210, 82,226,241,235,
-150,245,109,210,146,159,184, 3,128,127,195,128,188, 73,227,223,190, 97,111,207,228, 94,188,114,145, 93,177,230,248,253, 35, 39,
- 84, 91,172,136, 44, 7,248,249,249, 69,255,246,219,111, 46,174,174,174,112,112,112,128, 86,171,133,217,108, 70, 66, 66,130, 97,
-215,174, 93, 22,123,123,123,187,220,220, 92,168, 84, 42,136, 68, 34, 68, 71, 71,167,231,230,230,250, 63,175, 85,222, 7, 11, 0,
-222,233,219, 88,220,164,123,176,147, 68,198, 42, 20,226,135,158, 96, 56, 25, 67,108,221,207,158,141,110,118,238,194,165,215,251,
- 13, 24,229,218,190,125, 55, 44, 95,250,137, 37, 61, 55, 47, 66,165, 27,244,160,170, 62, 88,141,131,153,238, 67,134, 15, 29,249,
-197, 23, 11,177,112,254, 34, 28, 57,116, 64,109,107, 35, 48,218, 59,138, 29, 58,183,235,104,152,249,238,224, 12, 93, 89,166,239,
-202, 31,215,143,233,217,123,164, 79,187,246, 93,113, 45,250, 60,246,236,222,112, 75,194, 89,104,115,225,115, 44, 98, 24, 39,199,
-128,128, 41,239, 39, 37, 73,238, 46, 92, 88,198,102,103,151,180,154, 49,163,176,170,125, 51, 79,157,178,145,122,121,217, 59, 13,
- 26, 84,111,141,191, 63,177,228,231,255, 92, 85, 31,162,170, 52,111,120,122, 58,254,126,238, 92, 15, 94, 36,234,242,238,244,233,
-138,168,168, 40,148,150,150,226,200,145, 35,216,177,125,187,209,195,221, 61,214,241,230,205, 59, 1, 57, 57,159, 89,171,217,106,
-198,140, 66,142,227,152,169, 75,151,246,124,152,145,209, 61,191,168,168, 62, 0,184, 57, 56,100,132,251,248,220, 90,181,109, 91,
-226,247, 13, 26,240,214,166,115,215,149, 43,238,199, 10, 10,222,114,116,116, 84, 20, 20, 22,138,100, 82,105, 81, 68, 80,208,158,
-175,166, 79, 63,111,186,115, 71, 34,247,241,177,119, 24, 48,160,206,121,111, 53, 99, 70,161, 90,167, 19,205,251,238,187,142,217,
- 69, 69,245,181, 38, 83,144,186,172,204,131, 53,155, 5,118, 10, 69,145,127, 80, 80,190,230,204,153, 28,255,178,178, 15, 86,107,
-181,249,180, 84,254,197, 8, 22,195, 48, 32,132, 88, 21,189, 18,139,197,127,234,163, 85, 3, 18,161, 80,136, 27, 55,110, 32, 63,
- 63, 31, 77,155, 54, 69,131, 6, 13,254,180,195,147, 39, 79,112,244,232, 81,168, 84, 42,180,108,217, 18, 0, 36, 53, 9,218,217,
-217,125, 56,119,238, 92, 71,163,209,136, 91,183,110,161, 85,171, 86,144,201,100,144, 72, 36,127, 50,127,249,249,249, 8, 11, 11,
-195,212,169, 83, 29,190,255,254,251, 15, 81,195, 26,114,132,144,233,163, 71,143,118, 11, 15, 15, 7, 0,100,100,100,148,167, 5,
- 0,224,234,234,138,152,152, 24,180,106,213, 10,238,238,238,232,219,183,175,219,193,131, 7,167, 3, 88, 81,109,198, 37, 18, 65,
-104,104,104,235,103, 17, 34, 8, 4,130,135,246,246,246,174,238,238,238, 54,246,246,246,255,150,199,141, 27, 55,170,164, 82,169,
-197,154,139,154,155,155,139,240,240,112,168,213,106, 0,128, 86,171, 69, 80, 80, 16, 74, 75,159,118, 57, 51, 26,141,240,242,242,
-130, 94, 95,115,215,174,230,205,155, 47, 12, 13, 13,237,213,181,107, 87,153, 88, 44,198,221,187,119, 17, 17, 17,129, 93,187,118,
-193,207,207, 15, 74,165, 18, 73, 73, 73,104,218,180, 41, 46, 92,184, 0, 87, 87, 87,132,133,133,201, 90,182,108,121,169,184,184,
-248, 92,106,106,234,194, 26, 34,109, 2, 91, 91, 91, 92,184,112, 1,191,253,246, 27, 82, 82, 82,144,157,157, 13, 59, 59, 59,180,
-104,209, 2, 77,154, 52, 65,135, 14, 29,144,148,148, 4,166,150,194,196, 48,140, 71,112,112,240,145, 27, 55,110,184, 16, 66,176,
-117,235, 86,148,149,149,193,100, 50, 65, 32, 16, 64, 46,151,195,201,201, 9,221,187,119,135,171,171, 43,130,131,131,177,123,247,
-110,151,190,125,251, 30,125, 22,129,202,173,237,154, 58, 57, 57,125,176, 96,193, 2, 95, 55, 55, 55,164,166,166, 66,173, 86,195,
-221,221, 29, 93,187,118,245, 62,125,250,244, 7, 0, 86,189, 42, 15,129,242, 14,237, 12,195, 48,135, 15,237, 28,236,231, 41,109,
-220, 38, 66,227, 31,123, 91, 20,120,244,244,163,102, 79,175,135,255,189, 54, 45, 53,143,111,220, 58,158,118,248,208,206,235,247,
- 31,226,160, 53, 77,216,133,106,193,193, 19,167, 83,163,154,133, 69, 10,191,251,113,193,224,201,147,122,203,234, 57, 69, 50,165,
-249,187,113,229,122,172,255,231, 11,231,184, 45, 94,184,236,240,137,211,169, 92,161, 90,176,196,154,244, 6, 6,212,251,126,223,
-122,145,139,198,244, 35, 98,174, 59, 0,226,246,104, 24,208, 8,165,165,165,144,203,229,242, 49, 99,198,112,115,231,206,213,217,
-219,219, 43, 69, 34, 17, 98, 98, 98,242, 5, 2, 65,239,218,116, 13,110, 78,132, 51, 91, 88, 34, 21,242,132,177,211, 51, 92,177,
- 52, 46, 33, 25, 93,186,244,205,107,221, 42, 98,233,178,111, 86,125, 26, 16, 16,226, 58,102,236, 20,241,138, 21,159,173, 3, 16,
- 89,149,206,253, 36,114,182, 73, 32,163, 0,208,255,139,197, 11,241,228, 73,146,211,228, 55, 84,139, 68, 50,133, 87,168,127, 71,
-187,117,191,157,235, 19, 20,212,160,254,228,137,111,254,241,203,198,223,250, 87,142,100,237,220,241,203, 65,134, 97,122, 88,115,
-109,255, 65, 52, 27,119,228, 8,202,210,211, 45,197,151, 46, 25,122,252,240, 67, 97,203,241,227, 87, 89, 88,214,165,188,174, 42,
-255,201, 48, 12,192,243,140,104,197, 10, 1,241,242,130,197,209,241,141, 57, 64,163,218, 52,151, 89, 44,195,134,180,104,209,255,
-215,109,219,224,239,239, 95,161,233,224,224,128,233,211,167, 99,218,180,105,178,123,247,238,181, 57,122,244,104,155, 45, 63,254,
-232, 62, 7, 24,102, 77, 58, 47,222,189,235,244,241,154, 53,243, 26,135,135,251,173,254,225, 7, 89,121,125,151,154,154, 26,252,
-195,247,223,251,119,143,138,202,251,228,227,143, 55,221,153, 53, 43, 12, 79,151,100,171, 86, 51,247,226, 69,211,177,226,226,183,
-246,236,221,235, 24, 18,242,180, 27,228,227,199,143,221,126,253,245,215,183,187,191,251,238,216, 89,163, 71,127,214,253,209, 35,
-149,125, 65,129,108,192,247,223,139,118,142, 28, 89,171,102,121, 58, 1, 96,248,236,217, 31,182,237,216,177, 73,223, 49, 99,234,
-121,121,121, 49, 10,133, 2,102,179, 25,121,121,121, 78,137,137,137,129,167, 85,170,210,147, 49, 49, 91,241,108, 17,119,202, 95,
- 48, 88, 0,192,113,156, 85,230, 74, 36, 18,253,171,112, 91,115, 82,145, 8, 94, 94, 94, 40, 44, 44, 68, 92, 92, 28,252,253,253,
- 97,177, 88,112,226,196, 9,168,213,106,136,197, 98, 72, 36, 18,152,205,181,175, 13,107, 99, 99, 19,213,185,115,103,209,213,171,
- 87, 17, 16, 16, 0,133, 66, 81,145,174,242, 77, 34,145,192,211,211, 19,165,165,165,136,140,140, 20,111,220,184, 49,170, 38,131,
-101,107,107,219,111,240,224,193, 21, 33,182,178,178, 50, 8,133,194, 10,179, 82, 86, 86,134,226,226, 98,168, 84, 42, 24, 12, 6,
- 52,107,214, 76,122,246,236,217,126, 53, 25,172,202,232,116,186,178,252,252,124,199,200,200, 72,167, 77,155, 54, 37,182,111,223,
- 62,164,242,255,207,159, 63,111, 48, 24, 12, 98,169, 84, 90,235, 58,119, 12,195, 96,219,182,109, 21,215, 62, 43, 43, 11,235,214,
-173,171,248,127, 82, 82, 18,190,251,238,187,138,121, 57,106,250,142, 66, 67, 67,251,110,221,186,181,213,150, 45, 91, 74,132, 66,
- 33, 18, 19, 19,177,125,251,118, 16, 66,224,234,234, 10,157, 78,135,188,188, 60,156, 59,119, 14, 44,203,194,214,214, 22,222,222,
-222,242,233,211,167,119, 90,180,104,145, 24,192,194, 26,202, 18, 39, 20, 10,225,239,239,143,249,243,231,195, 96, 48, 64, 34,121,
-234, 43, 75, 75, 75,161, 82,169,112,231,206, 29,164,166,166,162,182,202, 69, 46,151,143,216,178,101,139,155, 84, 42,133, 94,175,
-135, 70,163, 65, 70, 70, 6,210,210,210, 12,249,249,249,172,157,157,157,192,223,223, 95, 32,147,201,100, 67,134, 12, 97,202,141,
-230,128, 1, 3,156,183,110,221, 58,170, 54,115,196, 48,140,107,227,198,141, 63,125,251,237,183,229,149, 76, 55,114,115,115, 49,
-108,216, 48,229,213,171, 87,231, 50, 12,179,157, 16, 82,240, 42, 61, 12, 8, 33,164,172,236,151,203, 23, 15,254,208, 56,246,182,
- 40,208,100, 42,105,223,179,223, 7, 34, 0,184,122, 97, 99,251,216,219,113, 80, 48,108,218,177,147, 43, 46,219,218, 78, 38,181,
- 69, 0,251,245,112,236,227,231, 38, 29, 58,100, 80,148,224,215, 45,235,219, 76,158,212, 91,230,214,112, 61, 3, 0, 78, 18, 31,
-116,224,102, 9, 12, 70,173,252,215, 45,235,219, 12, 25,212,239,122, 74,114,218,170,254, 81, 78,191, 31, 61,163, 58, 94, 83,132,
-208,211, 77,228,237,100, 87, 8, 39,187, 8,248, 7,216,225, 78,204, 61, 28,220,127, 9,193,161,157, 96, 52, 26,193,178,172,205,
-192,129, 3,117,123,246,236, 49, 20, 21, 21,105,204,102,115,151,236,236,236,135,181,229, 63, 51, 51,129, 15,241,104,103,150, 40,
-100,172, 70, 45,209,205,249,108,239,200,150,109,123,181,114,242,244, 22,187,218,240,135,187,117,137,220,190, 99,219,207, 51,102,
-125,180, 24, 45, 90,180,111,127,255,209,177, 38, 0, 98,171, 52,173,143,201,145,240, 96,134,125,242,232, 81,255,180,212,212,204,
- 70,238, 30,166,199, 42, 98,249, 96,206,250,158,145, 93, 70, 52, 11,108,220, 89, 26,159,112,129,153,249,238,219, 59, 86,254,184,
-126, 76,185,201,186,120,241, 68,151,133, 11, 83,165, 0,140,180,122,122,246,114, 42,147,249,216,250,251,139, 82, 54,109,210, 7,
- 12, 28, 88, 2, 0, 22,150,117,137,190,118,205, 65,169, 84,130, 16, 2,139,197,242,167, 62,194,229,253,130,163,186,118,117,183,
- 70, 51,227,167,159,154,189,251,238,187,200,205,205, 5,203,178, 16,139,197,207, 63,179,161,209,104, 48,124,248,112,108, 92,187,
-182,157, 53,154, 28,199, 49, 31,175, 89, 51,111,250, 7, 31, 4,142, 29, 59, 86, 80,249,217,235,232,232,136, 95,214,175,151,110,
-218,180,201,103,249,111,191,189,209, 83, 38,123, 82,155,166, 38, 44, 12,142,177,177,138,114,115, 5, 0,129,129,129, 88,182,108,
-153,108,244,232,209,210, 9, 19, 38,124, 27, 31, 18,178,102, 97, 90,218, 35,231, 70,141,236,165, 50,153,143,181,215, 19, 0,202,
- 76,166,240, 5, 95,124,225,116,253,250,117,100,103,103,151,207,117, 5,134, 97,208,180,105, 83,102,228,200,145, 14,237, 90,181,
-106, 67, 75,228, 75,138, 96,113, 28,247, 39,163, 82,155,193,170,115,251, 36,195,192,211,211, 19,102,179, 25, 27, 54,108,128, 68,
- 34,169,168,116, 1,192,100, 50,213,170, 97, 48, 24,154,122,120,120, 64,173, 86,163, 81,163, 70,127,138, 92, 73, 36, 18,136, 68,
- 34, 72, 36, 18,200,100, 50, 24,141, 70,120,123,123,195, 96, 48, 52,173,197, 0,181,176,183,183,175,168, 88,141, 70, 99,133,185,
- 82,169, 84, 80,169, 84, 48,153, 76, 40, 41, 41, 65, 89, 89, 25, 84, 42, 21, 52, 26, 77,132, 53,121,230,121, 30,113,113,113,143,
- 67, 66, 66, 90, 8,133, 66,216,218,218,218,104,181,218,138,190, 67,197,197,197,216,188,121,179,118,252,248,241, 46,215,175, 95,
-183,106, 33,225,247,222,123, 15, 50,153, 12, 58,157, 14,107,215,174,197,251,239,191, 15,137, 68, 2,141, 70,131,117,235,214, 97,
-230,204,153, 16,137, 68, 48,153, 76,216,181,107, 87,245,145,140,132,132,148,107,215,174, 69,180,108,217,210,233,247,223,127, 47,
-232,217,179,167,107,239,222,189,161, 80, 40,160,215,235, 97,177, 88,208,174, 93, 59,132,134,134, 34, 63, 63, 31,199,142, 29, 43,
- 12, 14, 14,118,185,126,253, 58,159,155,155,155, 86, 91,229, 93,217, 96,115, 28,135,188,188, 60,168, 84, 42, 20, 20, 20, 32, 59,
- 59, 27,153,153,153, 16,137, 68,168,237,229,221,217,217,121,120,120,120,184, 16, 0, 20, 10, 5, 90,180,104,129,121,243,230,177,
-122,189,254, 53, 0,199,158,237,214,119,253,250,245,191, 95,190,124, 89,228,229,229,133, 7, 15, 30,192,213,213, 85, 36,151,203,
-107, 53, 88, 30, 30, 30, 27, 15, 31, 62, 92,175,220, 84,151,151, 85,157,238,233,215, 49,108,216,176,122, 91,182,108,217, 8,160,
-223,171,246, 64,176, 21, 56,138,218,180, 80,168,142,158,126,212,172,103,191, 15, 68,158,129, 11, 0, 0, 29, 0,209,169,163,107,
-154,245,139, 10,218, 83,222, 47,171, 38,134,244,117, 93, 49,112, 96,115,193,216,145,173,158,136, 36, 33,129,219,182,172,113,175,
-231, 20,249,175,135,132,176, 30,108, 20, 64,104, 32, 39,136,222,249,196,125,230, 7, 33,166,237,155,222,122,178,109,207,173, 40,
-137,228,110,119, 0, 51,171,211,142, 79,180, 28, 82,107,235, 53,118,144,156,103, 32, 31,132,136, 22,193,112,117, 85, 97,237, 47,
- 91,224,237,215, 17, 70,163, 17,246,246,246, 74, 0,102,179,217,188,205, 26,115, 5, 0,103,206,168,248,176, 48,149, 73,168,225,
-217,119,223, 95, 49,180,103,223, 65, 77,186,119,143,226, 79,158, 58,105,238, 24, 97,206,233,222,189,125,222,185,243, 23,147,114,
-115,179,130, 67, 67,155,225, 97, 98, 76, 31,128,137, 3,170, 46,176,113, 73,228,120, 96, 32,115,110,215,174,201,188,158,191,163,
-248,114, 73,108,223,254,253, 39,132,119,142,236,204,159, 58,125,214, 36, 69,225,125,219, 78, 29,178, 38,140,126,237,247, 93,251,
-127,239,117,238,236,145, 32,117,105,222,145,111,126, 36,212, 92, 85,126, 57, 99, 89,119,145, 76, 38, 40, 56,119,142,109, 58,105,
- 82,197,181, 81, 42,149, 56,120,240, 32,164, 82,105,197, 38,145, 72, 42, 62,187,187,187,131, 33, 68, 80, 23,205,156,156, 28,228,
-230,230,194,193,193, 1,174,174,174,200,205,205,197,213,171, 87,241,240,225, 67,136,197, 98,244,233,211, 7,130,106,234,205,231,
- 53,167, 46, 93,218,179, 81,227,198,126,207,155, 43, 60, 45,152, 40, 46, 46, 70, 84, 84,148,224,204,153, 51, 30,209,143, 30, 13,
- 2,176,173, 70,205, 65,131,138, 10,206,156,169,242,220,225,225,225,204,193,131, 7,101, 99, 70,143,158,177,232,251,239,127, 92,
-242,195, 15, 25, 28,203,122,212, 37,239, 12,195, 8, 24,134,129,175,175, 47,138,139,139, 81, 86, 86, 86, 30,112,128,147,147, 19,
- 44, 22, 11,120,158, 23,211, 18,105, 61,130,218,204,128, 53,230, 74, 44, 22, 67, 32, 16,188,144,201,170, 28, 33,120, 30,107, 12,
- 86,121,229, 39,151,203,255,116,131,149,155,181,202,159,203,223,118,172, 64, 88, 90, 90,138,125,251,246, 85, 20, 52,147,201, 4,
-181, 90, 13,149, 74, 5,181, 90, 13,131,193,128,148,148, 20,236,220,185, 19,217,217,217, 16, 10,133, 86, 77,218,250,228,201,147,
- 91, 13, 26, 52,104, 81, 94,121,119,235,214,205,231,226,197,139,217,229,215,224,179,207, 62, 43,108,215,174,157, 75,229,202,189,
-214,196, 10,133,184,122,245, 42,244,122, 61, 8, 33,144, 72, 36, 72, 76, 76, 4,203,178,224,121, 30, 34,145, 8, 5, 5, 5,181,
- 70,176,226,226,226, 38,190,249,230,155,171, 39, 77,154,116,238,227,143, 63, 62,213,173, 91,183, 12,134, 97, 96, 54,155, 97,111,
-111, 15, 15, 15, 15, 36, 38, 38,194, 96, 48,224,195, 15, 63, 76,223,178,101,203,233,181,107,215,158,219,176, 97,195,234,204,204,
-204, 55,235,242,125,179, 44, 11,173, 86,139,146,146, 18, 20, 23, 23,163,180,180, 20, 6,131,225,133,202, 80,100,100, 36,142, 28,
- 57, 34,236,209,163,199,175,254,254,254,185,254,254,254,185, 61,122,244,248,245,208,161, 67, 66,111,111,111,164,166,166,226,214,
-173, 91, 40, 41, 41, 1, 33,164,198, 19,136,197,226,110,227,199,143,239,228,231,231,199,152,205,102, 24,141, 70, 24,141, 70,152,
-205,102,240, 60,143,212,212, 84, 52,110,220, 88,224,239,239,223,158, 97,152,110,244, 17, 98, 61,165,249,187, 65,116, 63,128, 24,
-119,130, 47,253, 17,218, 23,156,140,164,164,164,100,201, 59,115,212,249,156, 49, 6, 9,177,231,161,209,121,195,167,225, 68,188,
-253,102, 55,220,184,118, 18,197,197,197, 72, 72, 72, 64,151, 46, 93, 36, 12,195,212,169, 92,158, 58,117,141,123,109,220,251, 35,
-186,245, 26,212, 42, 42,170, 31,123,226,196,105,211,237,155, 39,110, 5, 5, 58,229, 19,190, 44,207,209, 81,121,231,209,163,251,
- 8,110,212, 4,102,139, 37, 18, 88, 88, 99,121,122,252,152,152,254,248,195,147,123,109, 82,220,184,222,125,222,104,222,163, 71,
-111,203,137, 83,135,185, 75,231,246,222,233,221, 59,240,194, 87,107,118,251, 22,155, 66,195,228,246, 30, 71,219,119, 82, 70, 78,
-125,221,111, 50, 45, 41,213, 68, 3,228,114, 30,207,158,139,229, 93, 88, 42,155,171,231, 55,107,234,164,202,154,149,235, 34,149,
- 74,133,164,164, 36,124,243,205, 55,136,137,137, 1,199, 61,237,106, 87, 91, 55,139,202,154,137,233,233,221,223,127,255,125, 89,
- 85,230,170,168,168, 8,133,133,133,200,202,202,194,128, 1, 3, 36,197, 78, 78, 45,107,211,244,118,115, 51, 42,229,242,188,135,
- 15, 31,254, 91,122, 75, 75, 75, 33,149, 74,241,253, 15, 63, 72, 78, 60,120,240,206,137,179,103, 93,234,114, 61, 43,215,165,110,
-110,110, 8, 12, 12, 68, 68, 68, 4,154, 54,109, 10,185, 92,142,248,248,120,252,252,243,207, 16, 50, 12, 75, 75,226, 75,138, 96,
-213,197, 96,213,197, 16, 88,139, 53, 77,132,114,185, 60, 54, 47, 47,175,163,183,183, 55, 88,150,173, 48, 83,207, 55, 17,150, 71,
- 59,238,223,191, 15,185, 92, 30, 91,147,166, 82,169,140, 21, 10,133,237,219,180,105,131,253,251,247,227,220,185,115, 72, 78, 78,
-134, 78,167,131,209,104,132, 94,175, 71,124,124, 60,120,158, 71,120,120, 56, 28, 28, 28,160, 84, 42, 99,107, 75,171, 86,171,205,
- 17,139,197, 33, 10,133,226, 95,205, 29,158,158, 40, 42, 42,226, 45, 22, 11, 54,111,222, 92,234,225,225, 97,163, 80, 40, 80, 62,
-255,152, 53,230, 50, 63, 63, 31, 62, 62, 62, 21,125,176, 52, 26, 13,220,220,220, 96, 54,155, 43, 34,112,118,118,118,181,154, 75,
- 66,136, 1,192,172, 74,218,173, 71,142, 28,185, 99,215,174, 93, 13, 79,159, 62,141,235,215,175,195,213,213, 21, 75,151, 46, 77,
- 78, 77, 77, 29, 67, 8,185,249,178,191,115,107, 12, 86, 81, 81,209,190,216,216,216,246,109,218,180,169, 40,116,221,186,117, 99,
-186,117,235,230, 82, 57,164, 95, 80, 80,128, 27, 55,110,224,244,233,211, 96, 24, 6, 73, 73, 73,156, 94,175,223, 81,195,185, 37,
-254,254,254,155,230,205,155,103,203,178,108, 69,217, 86, 40, 20,144,203,229,144, 72, 36, 16, 10,133, 72, 77, 77,197,224,193,131,
- 29,126,248,225,135,141, 12,195, 4, 18, 66,204,175,202, 3,161,140, 87,177, 55, 98,244,142, 78, 78,254,247,174, 94,216,216,190,
-195,179,103,196,213, 11, 27, 89, 39, 39,255,123, 55, 98,244,142,157,125, 85,172,109, 45, 58, 7,142, 21,204, 54,155,111,246, 57,
-126, 44,118,232,172,153,111, 75,253, 27, 6,228, 93,185, 30,235,223,129,155, 37,176, 81, 0, 90, 61, 80,172, 2, 30, 60, 22,242,
-254, 13, 3,242,110,222, 78,148,126,187,114, 67,128, 78,111,250,253,232, 25,213,241,154,180, 51, 51, 51, 13,222,222,222, 67,102,
- 45, 82, 94, 24, 61,198, 77, 42,145,251, 66, 83,114, 27,245,253,157,241,218,240, 16,252,248,203,109,216,219,215,123, 26,193, 96,
- 24, 27,107,243, 94, 88, 88,200,236,219,121,105,210,248, 55,222,110,215,187, 87,127,246,248,137, 63, 68,231, 78, 30,186,186,241,
-151, 79,127, 39, 66,173,146, 33, 26,133,175,159,207,189,148,228,135, 99, 58,119,238, 5,133, 84, 25, 4,132, 86, 89, 96, 43, 6,
- 14, 16,164, 11, 4,144,143,127, 99,114,135,222,189, 7,177, 39, 78, 28,192,137,163, 91,174, 45, 88, 80,255,104,114,214,118, 73,
-244,205, 76,249,144, 17,211, 74,142, 28,187,111, 26, 62,176,193, 67, 47,155, 22,122, 90, 45, 61,247, 2, 41, 18,229,177, 70,163,
-175, 79,239,222, 66, 93, 90,154,216,214,221,157, 5, 0,139,197,242,111,166,170,114, 4, 75, 32, 16, 0, 2, 1,111,141,166,181,
-105,209,233,116,224, 1,214, 26,205,130,226,226,250,207,247, 49,182, 88, 44, 40, 42, 42,170,216, 84, 42, 21,228,114, 57, 74,158,
- 77, 26, 90,155,102,231,102,205, 54,175,252,246,219,217,191,172, 95, 47,169,108,174,202, 55,129, 64,128,185,159,126, 42,153,255,
-213, 87,211,134,137, 68, 31,212,229,122,150,191,172, 11,133, 66,136, 68, 34,164,165,165, 33, 61, 61, 29,105,105,105, 72, 75, 75,
-131, 66,161, 0, 97, 24,158,150,200,151, 96,176,202,191, 60,107, 59,185, 91,107, 8,202,223, 4, 94,150,193,210,106,181,167, 47,
- 95,190,220,182, 87,175, 94,162,107,215,174,193,195,195,163,194, 96,149,255, 44,111,118, 82, 42,149, 56,118,236,152, 89,171,213,
-214,184,144,164, 94,175, 63,115,230,204,153, 86, 51,103,206, 20, 79,156, 56, 17, 9, 9, 9,152, 50,101, 10, 84, 42, 21, 74, 75,
- 75, 81, 84, 84, 4,157, 78,135,182,109,219, 66, 46,151,227,209,163, 71, 22,189, 94, 95,219, 84, 5, 36, 63, 63,191,204,213,213,
-213,243,249,127,140, 24, 49,194,253,167,159,126,210, 61,120,240,192,210,177, 99, 71,123,107,141, 70, 57, 59,119,238,172, 48, 79,
- 15, 31, 62,196, 79, 63,253, 84,209,231,234,246,237,219, 88,177, 98, 69,197,220,101,117,140, 42,222, 12, 11, 11, 99, 45, 22, 11,
-130,130,130,202,155, 87,177,122,245,106,246,239, 48, 87,214, 98, 48, 24,246, 78,152, 48,225,147, 59,119,238,120,138, 68,162,242,
-208, 53,120,158,135,217,108,198,163, 71,143, 16, 31, 31,143, 7, 15, 30,160,184,184,184,226, 5, 32, 38, 38,166,196, 98,177,236,
-174, 78,215,213,213,245,179,223,126,251,205, 67,169, 84,254,169, 60, 11, 4,130,138,135,142, 68, 34, 65, 65, 65, 1, 28, 29, 29,
-209,163, 71, 15,183, 51,103,206,124, 6, 96,254,171,240, 48, 96, 24,134,233,216,206,182,211,123,211,222, 64,155,150,154,199,177,
-183,227,112,234,232,154,102,192,211, 78,238, 77, 91,134, 63,190,113,199, 14,125,123,205,238,116,229,218,148, 26, 59,185, 63,235,
- 67,117,180,109,219,122,151, 15, 28, 58,253,227,156,153,111,223,248,124,225, 28, 55,131, 81, 43, 15, 13,228, 4,192, 83,115, 21,
-125,199,198,176,120,225,219, 55,150,173,220,204,167,231,155,103, 92,191, 94, 82,237,232,222,202,166,197,201, 22,114, 15,223, 25,
-217,245, 3,186, 55,136,189,189, 1, 46, 14, 37,176, 11,234,136,190,189,219,226,244,153, 88,164,101, 25,144,159,159, 15, 0, 53,
- 78,123,240,224,222,239,227, 8, 67,252, 24,194,164, 51, 2, 34, 31, 55,225,173,200,254,253, 7,145, 35, 71, 14,177, 7,126,223,
-118,121,247,214,239,246, 10, 36, 98,145,222,228, 96, 98, 24,131,154, 23,216, 37,104,181, 69, 79, 31,158, 18, 73,245,203,221, 60,
-155,144,181, 73, 88,168,199,184, 9, 83, 28,250,245, 29, 76,142, 30, 61,192,239,222,181,249,220,238, 13, 77,183,241,130, 82, 73,
- 78,134, 78,166, 46,181,168, 9, 35,117, 44, 43,229,117,121, 79, 2, 13, 94,253, 71,152,105,181,244, 92, 61, 96, 52,102,150,101,
-100,120,214,235,210, 69,246,104,225, 66,165,123,219,182,134,242, 46, 44, 53, 25, 44,161, 80, 8, 2,240,214,104, 90,155, 22,189,
- 94, 15,194, 48,150, 23,209,100, 89,246, 79,230,170,220, 96, 61,123,214, 91,149,206,111, 62,252,240, 90,235, 55,222, 40,142,142,
-142,118,111,223,190, 61,163,209,104,160,209,104,254,100,178, 92, 93, 93,153,134, 1, 1,202, 19, 57, 57, 1,243,173,188,158,214,
-228, 93, 32, 16, 84,123, 61, 41, 47, 96,176,202, 35, 88,214, 24, 44,161, 80,104,141, 41,176, 88, 44, 22,184,185,185,161,176,176,
-176,218, 10, 95, 32, 16, 64,161, 80, 64,171,213, 2, 64,141, 35,233, 52, 26,205,234,197,139, 23, 79,239,214,173,155, 75, 72, 72,
- 8, 10, 10, 10,224,238,238, 14,185, 92, 94,209, 55,172, 92, 47, 46, 46, 14,187,118,237, 42,213,104, 52,171,107,201,247,170,117,
-235,214,189,219,175, 95,191,122, 46, 46, 46,112,114,114,194,189,123,247,224,228,228,132,210,210, 82, 36, 38, 38,194,206,206, 14,
- 12,195,192, 96, 48,224,226,197,139, 26,158,231, 87,213,114, 99,146, 43, 87,174,152,149, 74,229,189,130,130, 2, 97,113,113,177,
-168,164,164, 68, 84, 90, 90, 42, 86,171,213,226,227,199,143,187, 56, 56, 56,232,206,158, 61, 91,224,231,231, 39, 76, 73, 73, 17,
-154, 76, 38,129, 21,149, 34, 62,248,224, 3, 72, 36, 18, 24,141, 70,172, 94,189, 26,179,103,207,174,232,115,245,245,215, 95, 99,
-222,188,121, 21, 33,245,195,135, 15,215,213,100,193,108, 54,195, 98,177,192, 98,177, 88,101,122,255, 10,214, 24,117, 66, 72, 46,
-195, 48, 3,218,180,105,115,114,207,158, 61,206,118,118,118, 72, 77, 77, 69, 94, 94, 30,242,242,242, 80, 80, 80,128,178,178, 50,
-176, 44, 11,111,111,111,228,229,229,225,192,129, 3,106,141, 70,211,187,166, 17,132, 66,161,112, 66,100,100,164,232,249, 52,148,
-191,213,149,155,118,153, 76,134,236,236,108,116,235,214, 77,122,254,252,249, 9,255,235, 6,171,220,184, 52, 14,134,100,224,160,
-209,146, 22,173,250,232,110,220, 58,158,166, 96,216,180,126, 81, 65,123,128,167,211, 52,220,184, 99,135, 22,173,250, 8, 6,230,
-152,218,170, 74,126,105,209,164, 17, 99,174,105, 89, 29, 0,112,113,224, 7,247,142,170,159, 99,111,207,136, 22, 47, 92,118,248,
-215, 45,235,219, 68,239,252,215, 52, 13,139, 23, 62,157,166,161,119, 84,125, 54,225,193,195,193, 0,182, 88,107, 90, 6, 12,232,
-125,231,183,141,187,144,149,114,216,107,213, 23, 10, 41, 12, 37,128, 56, 4,145,237,236,113,243,199, 76,100,101,101,229,242, 60,
- 95, 99, 51, 46, 97,136, 95,124, 66, 92,163,166, 97, 77, 60,198, 77,152,108, 63, 96,192, 96, 28, 57,114, 16, 91, 55,111,184, 56,
-124,244,176, 95,179, 74, 74,133,110, 98,165, 68, 73,120,169, 80,226, 32,146, 43,149,249,230,236,236,167, 15, 79,145,216, 30, 24,
-201, 3,213, 71,134,167, 78, 30,235,208, 61,106, 48,254, 56,122, 16, 91, 55,255,114,225,243,176, 17, 27, 26, 68, 52,102,218,182,
-252,102, 90,131,134, 13,252,181,101,121,165, 2, 70,106, 54, 24,120,187,111, 54,167,174,124, 50,111,194,147, 59,113, 35,191,165,
-163, 8,255,196,189,173,253,250,181,121,255,241, 99,137,107,167, 78,138,236,115,231,148,214, 24, 44,145, 72, 4, 8, 4,172, 53,
-154,204,169, 83, 2, 0, 53, 14,174,146, 72, 36,208,233,116, 96, 25,198,108,141,166, 91, 76, 76, 70,106,106,106,176,163,163,227,
-159,204, 85,113,113,113,197,103,131,193, 0,147,201, 4,133, 92, 30,111,141,102,222,197,139,134,121, 19, 39,206,127,247,157,119,
-190,219,185,107,151,220,193,193, 1,106,181,250, 79, 6,203,100, 50,161, 77,219,182,146,141, 15, 30,140, 3,176,192,154,235,233,
-222,173, 91,173,253,125,159, 25, 86,218, 68, 88,151,250,172,182,166, 26,107, 71, 17, 86, 85, 49, 50, 12, 19,245,220,239,243,250,
-246,237,107, 72, 78, 78,134,159,159, 95,133, 73,169,124, 78,123,123,123, 56, 58, 58,226,193,131, 7,216,176, 97,131,158, 97,152,
-121, 53,105, 22, 23, 23,107, 12, 6,195,168,209,163, 71,235, 37, 18, 9, 66, 67, 67, 43,230,191,226,121, 30, 82,169, 20, 54, 54,
- 54,136,139,139,195,132, 9, 19,116, 6,131, 97,212,243,115, 96, 61,175,153,154,154,170,214,106,181,175,191,254,250,235,186,135,
- 15, 31, 34, 50, 50, 18,119,239,222, 69, 89, 89, 25,202,202,202,144,146,146,130, 38, 77,154,192,100, 50, 97,239,222,189,122,173,
- 86,251,122,106,106,170,186, 38, 77,141, 70, 51,112,249,242,229,194,163, 71,143, 54,240,241,241, 9,107,221,186,117, 72,143, 30,
- 61, 2,135, 14, 29,234,223,175, 95, 63,207,224,224, 96, 67,239,222,189, 93,251,246,237,235, 42, 20, 10,197,143, 31, 63,206, 33,
-132,244,173, 73,179,178, 41,121,248,240, 97, 69,147,160, 72, 36, 66, 97, 97, 97,197, 76,251,229, 15,163,170, 12,112,117,154,149,
- 77,118,185,177, 42, 55, 90,181, 61,251,171,210,100, 24,166,214, 10, 67, 42,149,150, 71, 56, 73,109,154,132,144,152,251,247,239,
-247,236,210,165, 75,204,164, 73,147, 52,185,185,185,176,179,179, 67, 64, 64, 0, 26, 53,106, 4, 23, 23, 23,152,205,102,252,254,
-251,239,218, 3, 7, 14,196,170,213,234,110,207,207,129,245,188,166, 64, 32, 72,169,234,225, 90, 30,189, 42, 55, 88,114,185, 28,
-222,222,222,229,215, 54,165, 46,215,243, 5, 35, 75,127,175,230, 51,227,210,163,123,239,134,253,250, 15,113, 56,112,232,160,242,
-251,181,155,238,119, 30, 60,125,157,139,255,172,253, 46,254,179,246,119, 30, 60,125,221,247,107, 55,221, 63,112,232,160,178, 95,
-255, 33, 14, 61,186,247,110,152, 16,255, 32,228, 79,235, 18, 86,145, 78,165, 84,214,182,115,199, 96,213,197, 43, 23,217,101, 43,
- 55,115, 29, 59,244,187,254,221,119,235,118,127,247,221,186,221, 29, 59,244,187,190,108,229,102,238,226,149,139,108,231,142,193,
- 42,165, 84,214,214,154,188, 79,157, 60,214,161,127,191,193, 56,114,228,119,118,199,214,213, 95, 31, 60, 97,234, 50, 98,178, 33,
- 47, 45,229, 54,129,110, 19, 92,237, 99,145,158,158,174,102, 89,182, 91, 85, 29,220,171,210,156,242,246,216,202,230,234,146,179,
- 71,228,250,251,247,193,157, 58,117,216,114,230,204, 29,253,165,152,124,245,173,132,194,226,162, 82, 67,178, 86, 83,106,226,121,
- 30,132,231,132,139, 22,129,169,233, 59,234,216,177, 43,206,158,222,142,205,155,126, 86,243, 60, 12, 35,246,236,225, 70,142, 92,
- 72,252,235,215,247,223,182,115, 59, 51, 96,208, 16, 7, 2,240, 3,135, 13,118,220,177,107, 7,211, 48,168, 97,253,128,128,167,
- 83,211,252, 79,150,165,191, 65,115, 1, 33, 37,165,105,105, 23,110,255,240,131,209,125,212,168,122, 82,119,119,123,240, 60, 83,
-254,124,175,110, 19,137, 68,127,138,184,212,164,233, 94,175, 94,214,137, 19, 39, 16, 18, 18, 2,111,111,239, 63,117,121, 41,159,
- 72,219,197,197, 5,167, 78,157, 2, 1,110, 89,163,217,196,203,235,246,143, 63,252, 96,226,121, 30, 37, 37, 37,255, 22,189, 42,
- 41, 41, 1,207,243,184,120,225,130, 73, 93, 86,182,217,218,188,183, 53,153,202,134,180,106,245,213,248,241,227,205, 41, 41, 41,
-224,121, 30,149, 35, 89,249,249,249, 80, 42,149,208,233,245,190,238,238,238, 74,107, 52,243,143, 31,183, 65, 45,207,117,129, 64,
-240,167, 38,194,191,227,123,255, 71, 69,176, 88,150,133,175,175,239,159,230, 25, 17, 8, 4,127,218,234, 50,130, 48, 43, 43,107,
-139,187,187,251,137,113,227,198,205,111,209,162,197,212, 25, 51,102, 8, 27, 54,108, 8,181, 90, 13, 39, 39, 39,184,185,185, 33,
- 37, 37, 5, 23, 46, 92,224, 84, 42,213, 58,142,227,190,200,203,203, 43,176, 66,247,156,183,183,247,128, 94,189,122,237,122,247,
-221,119, 29,186,116,233, 34,246,242,242, 2, 0,196,199,199,227,216,177, 99,230, 29, 59,118,148, 26, 12,134, 81,214,204,226, 14,
- 0, 57, 57, 57, 39, 61, 61, 61,135, 79,152, 48, 97,219,208,161, 67,237, 12, 6,131, 56, 37, 37, 5, 38,147, 9, 44,203,162,184,
-184,216,124,225,194,133, 50,157, 78, 55, 54, 39, 39,231,164, 21,122,183, 25,134,105, 98, 54,155, 39,220,185,115,103,201,240,225,
-195,157, 59,116,232, 32, 97, 89, 22,151, 47, 95, 46,136,136,136,112, 43, 45, 45, 53, 95,185,114,165,200, 96, 48,204,203,206,206,
-182,106,169, 28,134, 97, 80, 90, 90, 10, 23, 23, 23, 24,141, 70,240, 60, 15,147,201, 4, 91, 91,219,138,229,141, 8, 33, 47,220,
- 71,142,101, 89,161,217,108,198,232,209,163,193,243, 60, 86,175, 94, 13,150,101,235, 44,102,107,107,123, 43, 62, 62,126, 64, 88,
- 88, 88,133,105, 41, 47, 67, 50,153, 12, 46, 46, 46,112,118,118,198,233,211,167, 33, 20, 10,111, 89, 25, 93,187, 11, 32,130, 97,
-152, 14,177,177,177,227, 1,180, 48,155,205,222, 28,199, 49, 2,129, 32,135, 16,114,175,180,180,244, 87,107,151,202,201,207,207,
- 95,242,198, 27,111, 68,108,223,190,221, 86, 36,250,215,173, 33, 18,137, 32,147,201,224,230,230, 6, 7, 7, 7, 16, 66, 96, 50,
-153,240,217,103,159,149,106,181,218, 37,175,202,195,160, 85,235,182,248,229,167, 53,182,103,206,158, 40,184,159,132,131,149,167,
- 98,176, 5,112,229,218,148,131,170,146, 95, 90,100,103,100,216,182,106,221,214, 42, 77, 19,199, 22,141, 26,187,206,247,217, 82,
- 57, 75, 82,146,211, 86,109,223,244,214, 19, 0,248,118,229,134,128,244,124,243,140,132, 7, 15, 7,175, 93,119,190,173,137, 99,
-139,172,209,252,151,105,217,166, 6,129, 33, 43, 43,235,186,143,143, 79,131,200,193,230,121, 33,129,204,160,188, 66, 62,139, 97,
-152,247,178,178,178,158, 88,155,247, 78, 29,187,224,236,201, 29,216,186,121, 91, 41,225,133, 6, 23, 23, 23, 2, 0,247,239,187,
-144,251,247, 85, 4, 40,159,175,209, 81,235,170, 44,248, 98,222,220,169, 51, 53, 26,205,170, 31,191,169,121,194,217,102,205,219,
-161, 89,243,118,152,254,222,167, 14, 77,194, 66,253, 0, 96,207, 30,194,133, 7, 51,135,231,127,190,112,208, 23, 95, 44, 68,169,
-198,136, 47,190,120,186,172, 78, 98, 92,194, 31,143, 31, 19, 19,173,154,254,204,124,150,189,142,153, 51,131,117,197,197,174,157,
- 62,249,196, 69,244,205, 55,130,170, 58,185,151, 71,176, 42,223,191,214,104, 30, 63,115,230,143,143,102,206,204, 90,241,205, 55,
-189,151, 45, 95,174,104,220,184, 49,114,115,115, 17, 26, 26, 10,111,111,111, 92,185,114, 5, 39,142, 30,213,150,233,245,243, 60,
- 60, 60,214, 90,163,249,253,142, 29,137,157,187,119, 47,220,178,101,139, 87,247,238,221, 25,173, 86, 11,181, 90, 13,181, 90, 13,
-163,209, 8,137, 68,130,172,172, 44,146,158,145,113, 63, 51, 51,115,157,181,121,231, 10, 10,228,179,210,211, 51, 69,155, 54, 45,
-159, 50,121,242,236,153,179,102,201,124,124,124, 24,163,209, 88, 17,197, 50,155,205, 80, 42,149,102,141, 70,227, 12, 64,103,141,
-166,236,240, 97,182,168,168, 8,206,206,206, 21,211, 46, 85,158, 87, 80,171,213,130, 16, 58, 9,110,157, 94, 20,170,171,195, 67,
- 67, 67,111,137, 68, 34,159,202,209,172,234,126, 86,170,140, 51,227,226,226, 90, 85,118,184,132,144, 42,251, 59,249,248,248, 4,
-240, 60,191,180, 67,135, 14,195,223,126,251,109,230,194,133, 11, 56,123,246, 44,201,204,204,220, 43, 16, 8,230,101,102,102, 62,
-169,238,205,166, 58,205,122,245,234,217,217,217,217,125,104, 99, 99, 19, 85, 62, 21,131, 92, 46,143,213,106,181,167, 53, 26,205,
-234,234,102,111,175, 73,179, 97,195,134,246, 60,207,127, 96, 99, 99,211,179,176,176,176, 5, 0,184,184,184,196,104,181,218, 83,
- 2,129, 96, 77,117, 11, 72,215,164,233,229,229,165,176,181,181, 93, 82,175, 94,189,215,223,126,251,109,231, 11, 23, 46,228,196,
-196,196, 72, 74, 75, 75,183,179, 44, 91,237, 98,207, 85,105, 54,105,210,228, 79,107, 17,190,204,239, 8, 0,154, 55,111,126,100,
-224,192,129,253,199,142, 29, 11,139,197,130,181,107,215,226,212,169, 83,127, 36, 37, 37, 13,168,233,237,243,121, 77, 15, 15, 15,
- 23,111,111,239,243,227,198,141,243, 31, 50,100,136,210,222,222, 30, 66,161, 16, 90,173, 22,201,201,201,184,119,239, 30, 57,117,
-234, 84, 89,124,124,124,166, 94,175,239,154,155,155, 91,104,237,245,252, 43,111,201,207,107,138,197,226, 46,190,190,190, 59, 23,
- 44, 88, 96,215,179,103, 79,133,179,179, 51,132, 66, 33, 44, 22, 11,114,114,114, 16, 23, 23,135, 19, 39, 78,104,247,238,221,171,
- 45, 42, 42, 26, 77, 8,185,240,159, 72,231,203,212,108,210,136,249,252,185, 5,156,171,157,157,189,166,125,173, 73,103,255, 40,
-167,126,195,135,183,142, 2,128,125,251,110,158,254,227,116,201,209, 23, 77,103,109,105,181, 70,179,113,176,112, 65,124, 66,220,
-159, 38,162, 12,107, 18,254,176,113,211, 97, 95, 90,163, 85, 62,147,251,243,121,175, 52, 59,126,165, 55,130, 63, 55,167,150, 47,
- 8,253,233,188,185, 88,186,228, 43, 28,220,243,251, 31, 9,143,201,145,255,229,178,244,119,106,150, 47, 78,172,244,244,236,188,
-195,197,101,238,201,211,167,109, 43,191,168,149, 71,154, 43,191, 76,182,104,209, 34, 63, 38, 38,198,221, 26,205, 1,223,127,111,
- 54,216,217,201,150,173, 91,215, 69,103, 50,117,153, 53,107,150,232,246,237,219,216,177,109, 27,171,207,200,216,150,203,113, 31,
- 84,213,250, 81,147,102,224, 71, 31,201,151,110,223, 62,177,126,195,134,110,131, 7, 15, 22, 11,133, 66,104, 52, 26,100,103,103,
-227,234,149, 43,166,228,148,148, 4,157, 78, 55, 40, 51, 51, 51,219, 90,205, 1,223,127,111,118, 12, 8,128,210,213,149, 92,137,
-142,118,248,120,193,130,169, 30,158,158, 14,157, 34, 35,197, 74,165, 18, 37, 37, 37, 72, 79, 79,199,165, 75,151,242,159, 60,121,
-226, 69, 8,225,172,209, 60, 20, 27,219,236,236,245,235, 35, 62,254,248, 99,105, 72, 72, 8,236,236,236,160,209,104,144,144,144,
-128,171, 87,175, 26,119,238,220,169,214,106,181, 83, 51, 50, 50, 14,253, 93,223,251, 63,198, 96,253,127,221,120, 30, 30, 30,173,
- 4, 2,193,231,207,154,163, 22,215,182,166,223,171,244,208,241,244,244,244,115,114,114,250, 69,175,215, 19,163,209, 56, 37, 39,
- 39, 39,253,191, 45,157, 12,195,136, 90,181,106,245, 83,126,126,126, 7, 66, 8, 28, 28, 28,174,198,199,199,191, 67, 8, 97,235,
-170,201, 48,140,208,195,195,163,131,141,141, 77, 91, 27, 27,155, 46,102,179,185,241,179,126,120,247,117, 58,221, 5,139,197,114,
- 61, 55, 55,247, 42, 33,132,251, 79,230,157, 97, 24, 33,128,158, 94, 94, 94,111,241, 60, 31,196, 48,140, 35,199,113,176, 88, 44,
- 42,158,231, 31,169,213,234, 13, 0, 78,253,167,211,249,178, 52,195,130,152,161, 68,128,198,213, 25,129, 63, 25,154,231,140, 3,
-195,227,126,252, 35,242,187,181,233,100, 24, 70, 48,164,175,235, 10,224,233, 72,195,218,150, 28,250,147,193,178,194,180,212,217,
- 92, 6,137,222, 32, 12,241,251,243, 67,145, 73, 15,109, 54,116,235, 95, 49, 88,214, 18, 22,194,116, 1, 65, 7,158,224,250,253,
- 36,114,246, 85,125,214,189, 76,205,175, 24,166,222,158, 70,141,174, 10, 68, 34, 15,134, 97, 4, 0,192, 8, 4, 60, 15,112, 16,
- 8,216,202,205,130,149, 95, 40,107,211, 52, 3, 77,197, 50,153, 47,199,178,238,197, 18,137,237, 21, 27,155,150, 70,160,204,131,
-227, 62, 63, 93, 84,148,248, 34,233, 52, 3, 77,133, 50,153,223, 21, 59,187,193, 42, 39,167,102, 37,102,179, 43, 0,162, 80, 40,
-238,151,233,116,155, 83, 83, 83,127,172, 98, 81,245, 90, 53, 37, 50,153, 15,247,108,228,161, 64, 36,202, 63, 33,147,249, 22,184,
-186,142,215,233,245,254,114,185,220, 66, 8, 41, 53,155,205, 99,211,211,211,207,212, 37,239,233, 66, 97,147,123,118,118,145,156,
-189,189,179,133, 97,108, 76, 28,103, 54, 91, 44, 25, 70,163, 49, 86, 40, 20,174,204,204,204,124,252,119,126,239,175, 28,229,163,
-205,254,142, 13, 64, 20,213,164,154, 84,147,106, 82, 77,170, 73, 53,255,126, 77, 55, 55, 55,165,135,135,135, 31, 0,225,255, 98,
-222, 95,181, 77, 68, 45, 38,133, 66,161, 80, 40,255,251,228,229,229,233, 80, 69,159, 43,202,127,168,137, 16, 64, 84, 53,145, 45,
-171, 67,127, 47, 50,154,192,138,166, 4,170, 73, 53,169, 38,213,164,154, 84,147,106,190, 98,154,181,105,191, 50, 77,143,180,137,
-144,106, 82, 77,170, 73, 53,169, 38,213,164,154,180,137,240,229,110, 2, 80,170,115,214,238, 12,195,184,191,236,125, 41,175,118,
- 89,168,226, 88,111,134, 97,188,235,184,191, 39,189,234, 20, 10,133,242,191,205,255,123, 31,172,242,138,138, 16,146,247, 50,246,
-123,217,199, 62, 59,254, 43,134,193,199,207, 62,127, 77, 8,153,251, 50,246,173, 13, 47, 47, 47,223,122,245,234,189,225,226,226,
-210,177,168,168,232, 98, 78, 78,206,198,194,194,194,156, 58, 28, 31, 44,151,203,223, 17, 8, 4,225, 0,192,243,124,156,193, 96,
-248, 41, 59, 59, 59,233, 37,124,111, 12,128,201, 50,153,236, 53, 39, 39,167,160,226,226,226, 71, 38,147,105, 15,128,159, 95,100,
-214,105, 79, 79,207,150, 28,199,189,143,167, 35, 89,127, 46, 40, 40,184, 98,237,177,238,225, 67,118, 19, 32, 24,128,128,103,248,
- 17, 2, 34,216, 11,128,103,128,164,188,184, 3,175,189,228,242,250,194,223,111, 93,143,101, 24,102, 37, 3,124, 8, 6,228,175,
-150, 37, 10,133, 66,161,252, 15, 25, 44,111,111,239, 9, 0,102,227,233, 76,219,223,102,101,101,109,254, 59, 42,171,151, 88,169,
-173, 38,132,204,170,123,180, 2, 31,243, 60, 17, 0,128, 64,192,124,226,238,238, 30, 46, 18,137,140,207,239,203,178,172,140, 97,
-208,135,231, 9,243,108,223,143, 25,134, 89,243, 34,198,206,217,217,217,107,204,152, 49,219,190,248,226, 11,133, 82,169, 68,122,
-122,250,144,185,115,231, 70,121,121,121,141,207,206,206,206,168,237,248,134, 13, 27,142,105,218,172,197,204,185,159,126,110,235,
-234,230,102,195,178,156, 57, 35, 43, 83,249,205, 87,139,219, 54,108,216,112, 77,114,114,242,142,186, 24, 41,145, 72,244,154, 92,
- 46, 15, 52, 24, 12,143, 89,150,221, 43, 20, 10,123, 47, 89,178, 36,188, 95,191,126,242,210,210, 82, 41,203,178, 65, 91,183,110,
-157,249,219,111,191,245,101, 24,102,112, 77,195,237,203, 35, 56,132,144,172, 74,215,238,157,219,183,111,119, 23,139,197,204,179,
- 69,155,175,212,180,127,101, 8, 16, 28,127,121, 79, 83, 0, 8,235, 52,242, 97,252,229, 61,120,246,249,165,191, 12, 60, 95, 22,
-156,156,156,182,151,148,148, 36,212,102,228,171, 58,150, 97,152,239, 8, 33,185, 94, 94, 94, 29, 1,188,243,108,215,159,178,179,
-179,175, 48, 12,227, 33,151,201, 62,212, 27, 12, 12, 0,230,175,148, 37, 10,133, 66,161,252,239, 69,176,230, 62,124,248,208,142,
- 16,130,144,144,144, 57, 0,172, 54, 88,207, 87, 56, 66,161, 96, 78,207,158, 61, 39,202,100,178, 63, 85,204, 70,163, 81, 32, 16,
- 48,110, 28,247,244,207,117,169,104,202,207, 97, 50, 25, 5, 98,177, 20, 66,161, 96,102,139, 22, 45,250,230,229,229, 29,147,201,
-100, 95,167,164,164,228,191, 72,228,102,243,230,205, 17,206,206,206,255,102, 32,138,138,138, 4,125,251,246, 97,234,162, 55,145,
- 97,100, 70,153,172,173,132, 97, 60, 57,150,117, 4, 0,145, 72, 84, 18,228,238,222,229,179,185,115, 21,207,116, 81, 86, 86,134,
- 55,222,120, 67,249,232,209,163,177, 0,150,214, 18,185,106,212, 60,162,213,140, 29,219,183, 53, 46, 45, 46, 49,172, 95,245,243,
-109,189, 72,162,107,208, 36, 84,178,248,171,149, 78,159,125, 50,243, 61, 47, 47,175,152,170,150, 13,121, 46,175, 2, 0,191,127,
-248,225,135, 97, 3, 6, 12,144,106, 52, 26,185, 94,175,175,191,109,219,182,207, 90,181,106,101,219,162, 69, 11,233,206,157, 59,
- 25,181, 90, 13, 66,136, 50, 52, 52,148,188,246,218,107,134, 93,187,118, 77, 7,240, 93, 93,204, 50,207,243,194,170,202,161, 53,
-230,154, 1,146,194, 58,141, 4, 24, 4,197, 95,222, 35, 15,139, 28,105, 0,193, 35, 6, 72,122,246, 34,240, 5, 80,105, 94,167,
- 63,115, 63, 43, 43,235,133,214, 14,236,223,127, 0, 67, 8,249,221,203,203,235, 76, 97, 97,161, 29,195, 96,116, 29,162, 83,140,
-171,171,235,123, 0, 62, 37,132,124,120,238,220,185,246, 0,208,173, 91, 55, 9,128, 43, 14, 14, 14, 61, 76, 70, 35, 67, 31, 73,
- 20, 10,133,242, 15, 52, 88,132, 16, 25, 0, 92,186,116, 9,132, 16,249,139, 4, 5, 42,255, 50,107,214, 44, 56, 59, 59, 63,111,
- 90,112,246,236,153,106,143,169,235, 57,190,250,234, 43,199,252,252,252,209,191,254,250,235, 16, 15, 15,143,119,115,115,115,143,
-215,146,199, 60,134, 97,190,126, 22,113, 96,228,114, 69,201,164, 73,147,174, 62,251, 95,227,195,135, 15,219, 13, 28, 56, 80,195,
- 48,204,125, 0,144,203, 21, 93,132, 66,129, 19, 33,132, 16,130,175,107, 50,130, 35, 25, 38, 64, 42,149,118,159,242,253,247,108,
-203,129, 3, 69, 54,174,174, 12, 0,164, 61,120,224,242,221, 15, 63,116, 86,101,100,200, 68,118,118,101,121, 37, 37,166,135, 15,
- 31, 66, 46,151, 51, 2,129,160, 99,109, 25, 86, 42,149,239,207,154, 61,199,166,180, 88,165, 55,148,106, 76, 66,214, 98,180, 83,
- 40,185,188,220,252, 34, 91,133,141,110,242,187,239, 75, 23,124, 58,251,253, 74, 81,147,234,152, 62,115,230,204,198,109,218,180,
-241,222,189,123, 55,163, 86,171, 33, 18,137,108, 91,180,104,129, 86,173, 90,113,103,207,158,101, 26, 52,104,128,240,240,112, 92,
-190,124, 25, 87,175, 94,101, 34, 34, 34,148,251,247,239, 31, 87,149,193,170,202, 84,143, 25, 51,102,162, 84, 42,229,187,116,233,
-130,183,222,122, 11,132, 16, 68, 68, 68,116, 28, 55,110, 92,142, 94,175,183,202, 92,151, 55, 3,186,133, 15,185, 7,160, 41, 8,
- 30,229,199, 29,104, 86,105,151,198,137,137,137,237, 74, 74, 74, 42, 58, 27,150, 47, 44,222,185,115,231,186,148,247, 60,134, 97,
-190, 30, 56,112,192, 28,128, 65, 84, 84, 84,217,244,233,211, 73, 98, 98, 98,175, 33, 67, 6, 55, 72, 74,122, 84,109, 58,159, 47,
- 71, 83,167, 78,211,138,197,226, 55,188,188,188, 18, 24,134, 17,139,197,226,242,107, 36,170, 95,191,190,123,211,166, 77,231,122,
-122,122,234,132, 2,129,146,160,246,178, 68,161, 80, 40,148, 87,200, 96, 49, 12,147,125,247,238,221,250, 58,157, 14, 12,195,100,
- 91, 81, 65,157,174, 92,225,136, 68,162, 95,132, 66,193, 20, 0,104,221,186,141,118,249,242,229, 85, 53, 43,241,173, 91,183,209,
- 10,133, 2,155,167,149,151,240,103,150,101,243,170,210,172,166, 66,252, 70, 42,149,125, 4,128,241,241,241, 45, 59,120,240, 32,
- 63,124,248,112,124,243,205, 55,178, 57,115,230,252, 88,191,126,253,110,169,169,169,105,213,165,243,217,239,115,221,221,221,195,
- 55,111,222, 28, 49,105,210,164,171, 89, 89, 89,195,158, 69, 70,246, 3,104,199, 48,204,253,202,127,219,191,127,127,135, 9, 19,
- 38,220,201,203,203,155, 91,157,230,112,134, 9,244, 15, 13,237,254,197,197,139, 68, 96, 52, 50,133,151, 46,149, 22, 23, 20,152,
- 31, 23, 22,218,108,143,141, 29,253,241,162, 69, 18, 15,111,111, 92, 57,121,210, 46, 87,165,210,168,116, 58, 83, 74, 74, 10,207,
-113,220, 25, 43,242, 30,230,234,226,162,252,121,229,218,155,118, 98, 33,239,230,227,205,136,235,213, 19, 9,148,246, 82,161, 72,
- 96,108, 80, 63, 64, 10, 32,172,182,239, 72, 34,145,140,235,213,171,151,114,215,174, 93, 76,120,120, 56, 28, 29, 29,113,233,210,
- 37,196,196,196,160,164,164, 68, 96,177, 88,208,186,117,107, 44, 95,190, 28,126,126,126, 80,169, 84, 72, 79, 79,119,145, 74,165,
-174, 53, 92, 79,166, 82,249,193, 39,159,124, 2, 87, 87, 87, 88, 44, 22, 20, 23, 23,131,227, 56,216,216,216, 0, 0,114,115,115,
-113,240,224,129, 90,203,146,149,230, 8,237,219,183,175, 48,194,149, 35, 88,117,209,244,246,246,190, 84, 80, 80, 56,178,123,247,
-238, 40, 46, 46,102, 23, 46, 92,136,230,205,155,163, 81,163, 70,214,148,249,185, 50,153,236, 55,127,127,255, 77, 83,167, 78,173,
-239,228,228, 4,163,209,184,162,168,168, 8, 31,127,252, 49, 0,160, 77,155, 54,173, 9, 33, 49,147, 38, 77, 66,253,250,245, 53,
-185,185,185,133,247,238,221, 27,162, 82,169,238,189,104,222,173,188, 62, 84,147,106, 82, 77,170,249, 95,165,249,143, 54, 88, 0,
-242,188,189,189,235, 43, 20, 10, 0,168,243,219, 53,203,178, 83,221,220,220, 4,159,125,246,217,192,134, 13, 27,242,211,167, 79,
-191,146,146,146,242,167,142, 51, 13, 26, 52,216,243,195, 15, 63,116, 76, 78, 78,214,125,249,229,151,135,243,243,243,167,213,241,
- 75,255,132, 97,152, 85, 0,144,145,145, 81,116,224,192,129,200,139, 23, 47,126,181,106,213, 42,159,233,211,167,203,166, 79,159,
-254, 9,128, 90, 53, 69, 34,145,177,170,102,193,170,112,118,118,230,171,234,163, 85,206, 64,134, 81,216, 75,165,221,190,184,120,
-145,152, 82, 83,117,187,126,252, 81,177,238,230,205,249, 22, 66, 60,221,221,221,133, 93, 58,117, 50,218, 73,165,154,188,236,108,
-222,201,199,135, 73,126,252,216,214, 34, 20,154,143, 31, 63, 94, 86, 80, 80,176,205,138, 36,148,242,132,152,108,125,252, 44, 35,
-134,244, 12,191,121, 61,230,129,157,155,139, 32,162, 69,120,179, 7, 15, 83,111,131,231,204, 0, 74,107, 19,113,112,112,104, 84,
- 84, 84,132,210,210, 82,184,186,186, 98,245,234,213,240,240,240,128, 78,167, 67,124,124, 60,241,241,241, 97, 46, 94,188, 8, 31,
- 31, 31, 20, 20, 20,192,100, 50, 65,163,209,228, 27,141, 70,125,117,134, 87, 36, 18,253, 38, 16, 48,147, 24,134, 65, 72, 72,168,
-118,213,170, 85, 60, 33, 4,141, 27, 55,198,176, 97,195,176,111,223, 62,196,199,199,151, 71,154,248,192,192, 32,173, 64,192,216,
- 0,224,255, 74, 20,135,231,121, 84, 54,194,117,197,203,203, 75, 1,224,227,224,224,224, 81,175,191,254, 58, 43,145, 72,160,213,
-106,161,215,235, 17, 23, 23,199,246,239, 63,160,108,224,192, 1,182,127,252,241, 71,141,233, 52, 26,141,143,253,253,253,135,207,
-152, 49,227,228,207, 63,255,236, 60,111,222, 60,240, 60, 95,177,177, 44, 91,177, 40,247,129, 3, 7,240,232,209,163,185,149,205,
- 21,133, 66,161, 80,254, 25, 6,235, 47, 35, 22,139,191,248,227,143, 63,122, 45, 93,186, 84,220,163, 71,143,142, 94, 94, 94, 29,
-178,179,179,175, 62,171,212, 58,244,235,215,175,163,155,155, 27,214,172, 89, 99, 18,139,197, 95,188,160,179,174, 92,217,157,243,
-240,240,152,190,127,255,254, 67, 83,166, 76,129,167,167,103,219,255,239, 60,219,203,100, 17,147, 86,175,102,197, 22,139, 96,231,
-207, 63,203,150,158, 57,179,122,215,238,221,226, 54,173, 91,131, 0, 72,136,143,151,125,253,253,247,178,145, 3, 6,228,199, 63,
-122,132,227,167, 79,155, 84,197,197,217, 5,165,165,179,243,242,242, 10,172, 48,174,209,201, 41,201, 94,145, 93,218,123, 95,184,
- 17, 23, 51, 98, 72,191,238, 98,145,128,121,148,154,121,203,211,195,197,225,234,229,203,122,150,101,163,107,211,209,106,181, 41,
- 44,203,214, 35,132,184,158, 63,127, 30,174,174,174, 40, 41, 41,129,197, 98,129,201,100, 50,233,116, 58,121, 81, 81, 17, 12, 6,
- 3,140, 70, 35,236,237,237, 17, 27, 27,155,199,178,236,217, 26,210,246, 22,195, 48, 11, 9, 33, 72, 72, 72,200, 2, 0, 95, 95,
-223, 38,142,142,142,167,202, 23, 80,190,120,241, 98,175,204,204,204,248, 74,145,174, 26, 59,185, 91, 27,193,122, 81, 60, 61, 61,
- 91,202,229,242,175,231,204,249,196,171,121,243,230, 40, 40, 40, 4,207,243,176,181,181,133, 94,175,135,157,157, 29, 58,118,236,
-152,187,112,225,194,100, 66,208,151, 16,146, 91,147, 94, 90, 90, 90,174,159,159,223,232, 41, 83,166,124, 31, 28, 28,220,136, 16,
-130,224,224, 96,244,234,213, 11,199,142, 29,195,195,135, 15, 81, 86, 86,198,222,184,113, 99,125,118,118,246, 46,250, 88,162, 80,
- 40, 20,106,176,234, 76, 86, 86, 86,150,183,183,247,150, 59,119,238, 76,122,237,181,215,112,238,220,185,121, 0,250, 2,128, 92,
- 46,159,247,218,107,175,225,206,157, 59,184,127,255,254,150,172,172,172,172,151,113, 78,169, 84,170, 53,153, 76,120,118, 14,101,
- 29, 43,234,198,207,154, 6, 65, 8,105, 92,221,223,106, 66, 32, 18,121, 54,237,211, 71, 84, 18, 19, 83,186,234,242,229,197, 59,
-118,238, 20,183,109,211, 6,102,139, 5, 60,199,193,215,207, 15,221,163,162,100, 91,118,239,182, 97,181,218, 43,159,127,240,193,
-177,181,111,188, 81,118,173,172,236,145, 53,105,212,106,181,223,125,254,233, 39, 81,187,118,239,243,110, 18, 26, 88,239,248,201,
-115,119,156,157, 29,148,141,130,130,108, 84, 42, 53,183,114,197, 82, 81, 89, 89,217,247,181,233,232,245,250,223, 79,159, 62, 61,
-196,215,215,215, 53, 46, 46, 14, 38,147, 9, 28,199,161, 71,143, 30,229,253,239,120,145, 72,132, 7, 15, 30,192,108, 54,231, 39,
- 37, 37,101, 63,122,244, 72, 6, 96, 89, 45,215,240,249,239,113, 82,255,254,253, 97,177, 88,208,171, 87, 47, 28, 56,112,224, 77,
- 0, 51,106,216,255,133, 12, 86,229,239, 9, 86,118,110,247,242,242,234, 25, 20, 20,180,102,249,242,229, 2, 31, 31, 31,240, 60,
- 15, 39, 39, 39,232,116, 58, 20, 22, 22,161, 73,147, 38,240,245,245,197,178,101,203, 0, 96,103,109,230,170,156,244,244,244,251,
- 0,186, 5, 6, 6, 74, 13, 6, 67,199,168,168,168,173, 61,122,244,192,157, 59,119,112,245,234,213,238, 12,195,228, 26, 12, 6,
-139,183,183,247, 44, 0,142,132,144, 95,172, 25, 61, 74,161, 80, 40,148,255,113,131, 21, 24, 24,104, 39, 22,139,186, 78,155, 54,
-213,150,227,120,136,197,162,110,245,235,215,119, 72, 77, 77, 85,191, 64,229,183,102,219,182,109,175,175, 92,185, 82,214,191,127,
-255,102,158,158,158,189, 0, 96,228,200,145,205,236,237,237,177,109,219, 54, 35, 33,100,205,203,202, 36,203,178, 67, 90,181,106,
-133,226,226, 98,164,166,166, 94,173,203,177,135, 15, 31,182, 3,208,174,182,191,213,120,126,147,201,201,209,219, 91,144,117,238,
-156,185,184,180,212,171,220, 92, 9, 4, 2, 20, 23, 23, 35, 45, 53, 21,246,118,118, 72, 72, 76,148,173,125,255,253, 93,254,225,
-225, 98,206,100,114,182, 86,191,160,160, 64,235,225,225, 49,113,254,231,159,253,254,253, 15, 63,184,170, 74, 75, 31, 43, 20, 74,
-163, 76, 38,241,152, 63,127, 30,167, 86,171, 39, 20, 22, 22,150, 89, 33,181,108,251,246,237,125,250,244,233,115,207,207,207,207,
-173,160,160,192, 67,173, 86,147,226,226, 98, 6, 79,251, 82, 49, 0,112,239,222, 61,164,166,166,178, 28,199, 93, 4,240, 5, 33,
-196,100,109, 90,189,188,188,156,219,183,111, 63,212,205,205,173,162, 41,178, 69,139, 22, 67,189,188,188,150,100,103,103, 23,189,
-204,194,125,234,212, 41, 59, 66, 72, 59, 66, 8,250,244,233, 99,237, 97,239, 12, 24, 48, 64,192, 48, 12,244,122, 61,100, 50, 25,
-108,108,108, 97,103,103,143, 70,141, 66,144,149,149,133, 94,189,122,113,143, 31, 63,222, 33,145, 72,190,171,107,154,244,122,253,
-152,142, 29, 59, 46,154, 54,109, 26,120,158,199,224,193,131,145,145,145,177, 41, 57, 57,121,131,143,143,207,180, 73,147, 38,185,
- 59, 59, 59, 99,214,172, 89,202,202,166,147, 66,161, 80, 40,175,160,193,242,242,242,138,114,114,114, 90,225,232,232,110,123,226,
-196, 73, 17, 0,116,233,210,217,198, 98, 97,163,189,188,188,230,100,103,103, 31,174,203, 73,179,179,179,139,188,188,188,126,190,
-122,245,234, 7,195,134, 13,195,169, 83,167, 62, 5,128, 97,195,134,225,234,213,171, 72, 78, 78,254,249,101, 85,182,222,222,222,
- 19,186,116,233,242,110,155, 54,109,112,228,200, 17,112, 28,119,180, 46,199, 87, 30, 49, 88,213, 40,194,242,191, 89, 37, 38, 20,
-130, 97, 24,112, 28, 7,194,243, 40, 44, 42,194,131,196, 68,148,148,148,128,227, 56,232,117, 58, 75,112,195,134, 90,181,201,100,
-207, 60,157,107,204,106,114,115,115,211, 2, 3, 3,211,117, 6,189,155,179, 83, 61,189, 82, 41,131, 70, 83, 38,137,189, 23, 83,
-150,153,153,249,216, 74,227,107, 98, 24,166,203,177, 99,199,230, 11,133,194,215,188,189,189, 49,114,228, 72,166, 71,143, 30,144,
- 74,165, 48, 24, 12, 40, 41, 41,193,225,195,135,193,178,108, 67, 0,112,117,117,117,175, 95,191,254, 62,129, 64,144,151,156,156,
- 60,169,182,115, 48, 12, 51,126,224,192,129, 98,147,201,132,197,139, 23, 99,193,130, 5,232,219,183,175,248,246,237,219,227, 1,
-172,124, 89, 5,155,231,121,244,236,217,179,114, 39,247,251,181, 29,211,181,107, 87,145, 80, 40, 12, 9, 12, 12, 68, 65, 65, 1,
- 10, 10, 10,224,234,234, 10, 47, 47, 47,184,185,185, 97,229,202,149, 88,189,122,245, 13, 66,200,178,220,220,220, 7,117, 77,147,
-175,175,239,172, 55,222,120, 99,214,168, 81,163,160,209,104,112,245,234, 85,116,236,216, 17,203,151, 47,247,185,116,233,210,162,
- 86,173, 90, 65, 34,145,224,252,249,243, 96, 89, 54,133, 62,158, 40, 20, 10,229, 21, 53, 88,222,222,222,245,120,158, 95, 50, 96,
-192,128,129, 67,135, 14,197,242,229,203, 42,121, 5, 17, 54,110,220,228,176,127,255,254,117,190,190,190, 67,133, 66,225,156,212,
-212, 84,171, 59, 36, 43, 20,138,181,219,183,111,159,216,190,125,123,187,168,168,168, 96, 0,144,201,100,252,246,237,219, 53, 10,
-133, 98,109, 93, 51,242,252,164,143,158,158,158,157,164, 82,233,244,129, 3, 7,118,154, 56,113, 34,226,227,227,177,117,235,214,
-187, 94, 94, 94,135,234,168,123,191,182, 81,132,181, 69,179,132, 82,105,145, 42, 55,215,209,214,207, 79,236,236,224,144,125,238,
-220, 57,255,182,109,219, 34, 45, 61, 29,170,146, 18,232,245,122,196,199,199, 19,137, 72,148, 44,114,114, 98,210,162,163, 25,161,
- 84, 90,103,131,105, 35,103,130, 63,255,120,114,125,131,193, 16,166, 86,171, 89,177, 68, 34, 86, 72, 73,157,154,153, 8, 33, 70,
- 63, 63,191,193, 28,199,185,152, 76, 38,139,187,187,187,248,244,233,211,144, 74,165, 96, 24, 6, 77,155, 54,133, 84, 42, 53,249,
-248,248,104, 0,192,217,217, 89,176,108,217, 50,241,135, 31,126, 24, 95,155,118,203,150, 45,197,254,254,254,147, 66, 66, 66,112,
-245,234, 85, 36, 36, 36, 36, 94,187,118, 45, 36, 34, 34, 2,222,222,222,147, 90,182,108,249,253,237,219,183, 45, 47,163, 96, 19,
- 66,234,220,201,253,194,133, 11,196,203,203, 11, 2,129, 0, 2,129, 0, 60,207,163,160,160, 0, 13, 27, 54,196,218,181,107,177,
-122,245,234,159,114,114,114, 94, 40,178, 26, 24, 24, 40,109,222,188,249,187,163, 70,141,194,227,199,143,177,116,233,210,252,188,
-188,188,163, 39, 79,158, 28, 63,109,218, 52, 81,199,142, 29, 81, 84, 84,132,141, 27, 55, 90,238,220,185,243, 93, 78, 78,206, 90,
-250,120,162, 80, 40,148, 87,208, 96,249,250,250, 78,148,203,229,139, 70,141, 26, 37, 10, 9, 9, 65, 94, 94, 30, 52,154, 50,174,
-105,211,112, 14, 96,136,173,173, 13,163, 84, 42, 49,101,202, 20, 52,107,214,172,231, 39,159,124,210,195,203,203,235,171,236,236,
-236, 31,173, 57,241,227,199,143, 53, 94, 94, 94,223,205,156, 57,115,121,116,244, 85, 27, 0,136,137,137,209,102,103,103,127,153,
-157,157,173,169,163, 9, 42,159,156,146,177,177,177, 73, 10, 10, 10,178,244,239,223,223,121,232,208,161,112,113,113,193,157, 59,
-119,176,108,217,178, 59, 90,173,118, 76,106,106,170,229,255,251, 34,179, 70, 99,238,173, 3, 7,236,186,190,254,186,253,199, 67,
-134, 44,125,251,237,183,127, 92,176,112,161, 56, 48, 32, 0, 38,179, 25, 9, 9, 9,100,231,142, 29,230, 29,203,151,127, 11, 27,
- 27,113,244,190,125, 82,147,201,148, 86,151,115,248,248,248,116,233,215,167, 75,200,138,149,223,193,160, 47,195,245,171,127,160,
-164,164, 0, 63,255,178, 63,196,199,199,167, 75,102,102,230, 5,171,211,203,178, 1,123,247,238, 5, 0, 72,165, 82,124,241,197,
- 23,240,242,242,130,189,189, 61, 52, 26, 13, 38, 79,158, 44,253,240,195, 15, 1, 0,241,241,241,176,181,181,181, 54,202,214,111,
-242,228,201,142, 22,139, 5,199,142, 29, 51, 72, 36,146,215, 79,158, 60,121,181, 89,179,102,242,206,157, 59, 59,110,221,186,181,
- 63,128, 3, 47,203, 96,189,192, 49,156,183,183,119,242,201,147, 39, 27,142, 28, 57, 18, 18,137, 4, 37, 37, 37,176,183,183,199,
- 15, 63,252,192, 43,149,202,141,127, 33, 73, 82,165, 82, 41,227, 56, 14,187,119,239, 70, 94, 94,222,128,242,254,136,179,103,207,
-254, 50, 52, 52, 52,240,193,131, 7, 79, 12, 6,195,188,172,172,172, 71,244,209, 68,161, 80, 40,175,168,193,226,121,254,227, 19,
- 39, 78,136, 56,142,195,250,245,235,113,243,230, 77,146,151,151,247,173,217,108,254, 74,169, 84,178,197,197,197,179,223,126,251,
-237,169, 11, 22, 44, 16, 68, 70, 70, 34, 58, 58, 90,208,176, 97,195,233, 0,126,172,100,124,162,106,154, 43,163,164,164,228,104,
-110,110,206,143, 60,255,180, 50, 20, 8, 24, 27,169, 84,118,180, 22, 51,245, 39,205, 42, 38,179,108,244,213, 87, 95,229, 59, 59,
- 59,243,241,241,241, 88,187,118, 45,119,235,214,173,125, 60,207,127, 86, 88, 88,168,179, 70,243,101, 80, 89, 83,202,178,183,183,
-206,158,221,184,229,224,193,252,176,183,222, 50, 10, 68,162,119,150,174, 90,245,105,137, 74,229, 5,134, 33, 46, 78, 78,105, 27,
-150, 44, 89,220,161, 91, 55, 67,252,133, 11,242,152, 83,167,196,174, 22,203,221,186,164, 51, 51, 51,243, 66,112,160, 31, 54,173,
- 95, 9,179,217,136,156,172,167,254,172,176, 72,141,154,204, 85, 85,154, 2,129, 64,245,198, 27,111, 40, 77, 38, 19, 51,122,244,
-104,113,126,126, 62, 2, 3, 3, 1, 0,165,165,165,248,227,143, 63, 16, 26, 26, 10, 0,136,141,141,173,248, 92, 91, 58, 21, 10,
-197,164,142, 29, 59, 34, 45, 45, 13, 9, 9, 9,123,179,179,179,243,188,188,188,246,166,165,165,141,111,221,186, 53,246,237,219,
-247,102,117, 6,171,174,223,145, 53, 6,171,154,188,191,181,127,255,254,143,162,163,163,251,204,154, 53,139,233,214,173, 27, 0,
-160,172,172,140,207,201,201,209,188,136,102,229, 52,177, 44, 11, 0,144,203,229, 26, 0,120,102,166, 70,190,168,230,203, 40,159,
- 84,147,106, 82, 77,170,249,223,160,249,143, 49, 88, 0,204, 28,199,225,194,133, 11,216,191,127, 63,107, 48, 24,134,229,230,230,
-222,170,244,255, 47,125,124,124, 14, 13, 31, 62,252,104, 98, 98,162, 40, 33, 33, 1, 0,216,186,156,220,104, 52,154, 24, 6, 4,
-255,154,140,146, 24,141, 70,211,139,124,215,149,127,249,245,215, 95,145,147,147, 99, 76, 75, 75,219, 73, 8, 89,151,147,147,147,
-249, 23, 34, 33,127,121, 20,225, 70, 66,140,175, 51,204,233, 5,157, 58,245,156,127,234,148,236,181, 25, 51,204,195, 70,141,154,
-205,153, 76, 22,161, 68,194, 75,109,108, 4,156, 76, 38,142,191,112, 65,190,102,218,180,122,122,163,241,248,214, 58,116, 28,175,
- 20,193,194, 27,111,205,128,190, 82, 4, 43,250,230, 67,212, 53,130, 37, 18,137,252, 44, 22,139,140,101,217, 44,158,231, 49,126,
-252,120,240, 60, 15,189, 94, 15,141, 70,131,226,226, 98,195,123,239,189, 39, 0, 0,165, 82,137, 94,189,122, 73,173,209, 13, 8,
- 8,104, 32, 22,139,113,252,248,113,136,197,226,205, 0, 32, 22,139, 55,159, 58,117,106,252,152, 49, 99,224,231,231,215,132, 97,
- 24,166,182,197,163, 43, 22,123,102, 16,244,236,219, 15,114, 11, 31,114,175,210, 98,207,247, 35, 34, 34, 0, 43,250, 93, 61, 79,
- 70, 70, 70, 14,128, 25, 62, 62, 62, 27, 63,250,232,163,143,219,182,109,219,106,225,194,133, 96, 24, 70,248, 87,111, 54,158,231,
- 97,177, 88,254,210, 20, 18, 20, 10,133, 66,249,223, 55, 88, 43,187,117,235, 54,147, 16, 34, 98, 24,230,155,231,204, 85,121,212,
- 36,222,219,219,251,243,134, 13, 27, 86, 44, 0, 93, 71,243,146,199, 48,204,114,129,128,249,248,233,239,117,159, 88,178,146,198,
- 39, 79,205,129,120,215,173, 91,183, 62, 77, 75, 75,203, 34,132,176,127,245, 2,189,140, 81,132, 0,176,157,144,148,209, 12,115,
- 98, 86,120,120, 84,159,105,211,208,172, 79, 31,123, 47,127,127, 78,111, 54,243,177,151, 47, 51, 87,247,238,149,196,156, 58, 37,
-214, 27,141,199,247, 19,146, 94,215,116,102,102,102, 94, 8, 12,240, 57, 57, 98, 88,191, 94, 1, 13,188, 0, 0, 79, 82,178, 81,
- 88,172, 62, 89, 23,115, 5, 0,169,169,169, 70, 0, 70, 79, 79,207, 97,187,119,239,222,251,204,244, 84, 44, 59, 3,192, 40, 18,
-137,130, 1, 64,163,209,248,255,254,251,239,219, 69, 34, 81,173, 38,246,254,253,251, 27, 22, 44, 88, 48,229,201,147, 39, 59, 51,
- 51, 51, 19, 1, 32, 45, 45, 45,209,219,219,251,235,156,156,156,169, 25, 25, 25,107,137, 21,238,227,185,197,158, 17,127,121,143,
- 28, 64,211,242,197,158, 95,116,173,193,231,174,103, 28,128,177,222,222,222,221,122,247,238, 61, 29, 64,238, 95,209, 51, 26,141,
- 22,163,209,104,225,121, 94,108, 54,155,137,209,104,180,208,199, 15,133, 66,161,252, 3, 13, 86, 86, 86,214,102, 88,177,152,179,
-181,251,213, 96,144,230, 50, 12,179,166,220, 44,253, 85, 13,179,217,252,178,214,111,187, 63,104,208,160, 58,237, 95,219, 14, 59,
- 9, 73,123,159, 97,182, 28,249,254,251, 22,199,215,173,243,230, 88,214,153, 1,136, 80, 42, 45, 50,153, 76,169,174, 22,203,221,
-186, 70,174, 42,243,248, 73,102,111, 0, 8, 14, 14, 38,143, 30, 61, 2, 33,228, 47, 45, 30,156,147,147,115,210,199,199,199, 77,
- 36, 18, 73, 25,230, 79, 82,198,103, 38, 12, 0,238, 49, 12,211, 4, 64,173, 17,158,140,140,140, 85, 0, 86, 85, 81,134, 86, 3,
- 88,109,109,186, 42, 22,123, 6, 4, 60,195,143, 8,235, 52,114, 47, 0,190,124,177,231,151, 73, 86, 86,214, 57, 0,231, 94,130,
- 97, 51,212,175, 95,127,221,242,229,203,167,222,189,123,247,215,204,204, 76, 3,125,252, 80, 40, 20,202, 63,208, 96,253,127,242,
- 50, 22,181,125,217, 11,227,190,140, 40, 72, 85,124,247,212, 64, 93,251, 59,175,103, 82, 82, 18,243,178,180,158, 25, 1, 67, 45,
-215,158,160,142,205,195,127,133,242,197,158, 43, 17,254,191,112,179,165,166,166,126,213,178,101,203, 21,153,153,153, 52,122, 69,
-161, 80, 40,175, 56, 2,122, 9, 40,148,255, 63, 94,214, 52, 20, 20, 10,133, 66,249,239,134, 1, 16, 85,213, 63,234, 50, 58,128,
- 97,152,168,186,158,184, 54,125,170, 73, 53,169, 38,213,164,154, 84,147,106,190,122,154,181,105,191, 50,163, 19, 43,119, 94,126,
-217, 27,128, 40,170, 73, 53,169, 38,213,164,154, 84,147,106, 82,205,127,218, 70,155, 8, 41, 20, 10,133, 66,161, 80, 94, 50, 34,
-122, 9,170,166,133,167,112,177,159,143, 91,171,138, 40, 31,207, 3, 0,248,103,179, 8, 84, 76, 39,192,243, 32,132, 32, 59, 95,
-117,251, 94, 30,249,252, 69,207, 23,226,205,212,115,147,203, 87,243,132,116,122,246,167, 11,234, 34,227,140, 56, 53, 81, 89,171,
-209,216,131,105, 44, 23,224, 35,158,160, 25, 0, 8, 24,220, 51,240,248,230,126, 46,185,255, 87,175, 7,195, 48, 76,152, 43, 38,
- 75, 21,202, 81, 14,142, 78, 65, 37, 37,133, 73,102,131,113, 79, 66, 1,126, 38, 47, 48,177, 83, 96, 61,166, 29, 79,240, 41, 0,
-129, 88,128,111, 31, 22,145,115,180,212, 81, 40,148,255, 39,254,234,188,118, 92, 85,143,201,191,168, 73, 39,200,251, 39, 27,172,
- 48, 55,102, 26, 24, 44, 4, 64, 64,176, 40, 62,159,212,105,189,180, 48, 47, 38, 74, 46, 20,110, 0, 32, 52,152,185, 89,132,199,
-197, 42, 43,115, 1, 58,203, 37,194,111, 1,240, 6,142,155, 20,159,109,125,123,108,184, 15,211, 71,196, 11,182,242,132,136, 57,
-158,108, 6,193, 17, 91, 9,174, 68,103,146, 58, 13,139,247,243,113,107,117,224, 70, 78,175,115,107, 63, 64,219,102,129, 32, 28,
- 11,240, 22, 40, 35, 63,194,153, 85,227,209,182,177, 31, 8,111, 1,120, 22,182,125, 87,160,111,184,195, 11,223, 28, 33,222, 76,
- 61,127, 23,183,184,245,235, 55,120,120, 5, 52, 97,120,214,140,196, 27, 39,199,126,248,241,252,238,225, 14, 76,184, 53, 38,171,
-185, 23,243, 86, 96,195,144,143,102, 44, 92, 41,244,244,242,181,225, 45, 70, 54, 55,229,126,196,119, 95,207,223,215,220,139,249,
-246,110, 54,217, 96,173,145,106,226,138, 41, 34,153,116,164, 66,110, 19,164,211,105, 30,113,102,203,158,112, 47, 81,159,111, 86,
-172,110,209,181,103, 63, 91, 78,147, 43,176,240,104,178,123,215, 78,255,239,127,252,169, 31,195, 48,131, 8, 33,124, 93,242,204,
- 19,124,252,112,203,228,126, 98,145,144,105,252,230,122, 33, 94,112, 42,132, 38,238,204, 24,134, 32,178,214, 39, 23,131, 75, 9,
-121,100,199,139,156,163,177, 59,243, 43, 67,208, 8, 12,246, 50, 4, 59,227,243, 73, 62,125,116, 80, 40,175, 22, 62, 62, 62,231,
- 50, 51, 51,187,189, 76, 77, 47, 47,175,118,217,217,217,215,232,213,165, 6,203,138,218, 23, 95,198, 63,206,112, 2,103, 70, 88,
-163,128,197, 0,234,100,176,228, 66,225,230,155, 73,121, 30, 96,205, 88,191,228,157, 93, 38, 11,192, 90,204,224, 88, 11, 56,214,
- 2,150, 53,131,179, 88, 64, 44, 70,204,255,237, 28, 96,210,160, 85,120,240,102, 0,158,214,158, 67, 76, 4, 91,111, 95, 62, 89,
-143, 49,169,177, 99,237, 87,239,101, 20,148,189,119,250, 94,118, 97,152, 59, 51, 55, 33, 31, 27,235, 98, 4,206,173,251, 0,219,
-126,255, 35,115,205,175,218, 7, 60, 33,168,103,175, 8, 25, 59, 32,222,119,203,193,115, 25,171, 55, 27, 30, 0,128,131,141, 52,
-100,194,189, 36,191,191,242, 37,184,201,229,171,127,254,233,123, 15, 79,103, 5,195, 94, 93, 6,150,227,224,235,223, 95, 56,119,
-250, 88,207, 47, 87,109, 88, 5,224,141,154,142, 15,117,103,154, 52, 10,108, 60,107,243, 31, 87,253,180,165,249,166,147,219, 63,
-125, 12, 35, 44, 30,222,141,197,139,191, 90, 41,156,247,201, 7, 51, 67,221,153,235, 15,242, 72, 66, 45,230, 74,208,216, 13, 7,
-191, 90,182,162, 89,247,190, 3,108,249,178, 2,161, 65, 91,214,104,253,111, 27, 22,134, 54,107,163,140, 12,247,145,228,239,153,
-202,232, 53,197, 48, 11,228,178,238, 97, 81,246,250,113,163, 45,235, 55,109,155, 14,224,187, 58,189,254,145,127,149, 61,158,127,
-241,183, 73,134, 32, 50,230,218,185, 41, 92,246, 77, 16,206, 2,112,230,138,159,224, 44, 32,252,211,159,109,167,254, 6, 0, 47,
-100,176, 4, 4,189, 78, 95,190,233,153,151,155,211,122,213,138,165,115,155,184, 49,199,192, 97,235,253, 98, 92,168,171,177,164,
- 80, 40,255,189,120,121,121,177,217,217,217, 47,181,101,199,219,219,187, 95, 86, 86,214,209,191,152,174,143, 0,188,245,236,215,
- 13,217,217,217,223,252,213,116,181,110,221,218,135, 16,226,241,236,217,159,123,243,230,205, 76, 90, 2,254,147, 6, 11,144,131,
-240,192,222, 33, 0,160,168,235,201, 8, 32, 7, 35, 4, 44, 90, 12,238,219, 19, 46,110, 30,128, 69, 7,152,117,128, 69, 15, 88,
-180,128, 69,143,194,156, 52,192,172, 5,158, 28, 3, 75,136,172,206,185, 50,170,129,135,123,208, 35,194, 15,174, 14,114,124, 48,
-184,137,203, 47,199, 31,110,216,112, 50, 49, 10,192, 40,171,210, 74, 8,218, 54, 13,194,154, 13,218, 7,135,110,231,247, 6,128,
-254, 45, 92,142,183,109,226,239,187,122,179,225,193, 31,247,138,251, 0, 64,223,112,135, 99,109, 66, 60,253,248,191, 16,221,229,
- 9,137,244,170, 31,196,112, 49, 63,131, 47,205, 68,105,169, 30,153, 41, 91,224,228,221, 82,192,241,232, 82,219,241, 10, 33,230,
-188, 63,111,185, 88, 87,154,103,226,205, 5,156,171,176, 68, 40,146,242, 12,178, 46, 24,203,120, 21, 55, 99,242,120,118,214,231,
- 75,230, 0, 24, 91, 99, 52,200, 13,211,191,253,118,117,211,142,173, 66,221,114,247,125,192,148,149,228,129, 21, 42,101,131,219,
-119,132, 99,112, 19, 62,239,252,183,140, 52, 32, 10,142,206, 1,200,186,186, 29,169,215,246, 51,157, 34,134,201, 54,238,144,140,
-171,206, 96, 5,187, 50,157,122,119,110,179, 43,192,207,203,147, 16, 30, 60, 79, 64,120, 14,111,142,232,133,185,187,159,128,227,
- 56, 12,239,221,169,199,242, 41,221, 9,207,243, 32,132, 71, 70,110,145,238,236,245, 7, 61, 30, 23,147,235,214, 68,166,154,183,
-235,214,233,222,237,107,161,150,135,135,209,106,236, 87, 15, 24,224,114,165, 50,215,233,206,137,141,161,192,111, 47,102,224, 24,
-134,105,236, 6, 46,245,248, 50,248,117,158, 44,252,121,199,113, 87,117, 65,214,132,125, 91,126, 26,177,246,231,159,183, 1,152,
- 74, 31, 35, 20,202,171, 65,118,118,246, 75, 55, 89, 87,175, 94,205,254, 43, 38,171,117,235,214,157, 1,124,157,157,157, 93,110,
-182,190,110,219,182,237,252,202,117, 85, 37,212,132,144,177, 55,111,222,188, 88,147,230,204,153, 51,189, 0, 52,184,117,235, 86,
-249, 57, 26,180,110,221,186, 65, 85,251, 42,149, 74,174,121,243,230,169, 43, 87,174,204,166, 37,228,239, 53, 88, 15,210,247,124,
- 16, 97,204, 41, 3,128, 7, 86,152,148, 63, 53,237, 25, 44,220,178, 77, 11,199, 47, 11,171, 95, 15, 26,173, 9, 39,111,165,130,
-227, 44,224, 88,246, 89, 36,139, 5,199, 90,208,187,185, 11, 58, 24,166,226,187, 35,137, 96, 57,254,171,154, 52,159,199, 76,248,
- 49, 45,162, 94,219,205,243, 68, 42, 19, 11,212,141,124,157,221,102, 13,111, 46,248, 96,112, 24,244,102,246,181, 38,238,204,217,
-132, 60,178,222, 42, 77,254,223,231,206, 36, 85,253,141, 99,107,205,123, 13,209,167,182,163, 7,244,180, 39, 70, 53, 44,133, 79,
-160,209, 89,240,164,200,130, 92,131, 10, 50, 38,199, 42, 77,158,160,153,143,183,167,242,202,174, 79, 82,156,133,165, 34, 55, 33,
- 43,145, 10, 88,112, 60, 17, 18, 85,130,177, 94,104, 79,113,121,191,172,154,210,169, 80,218,141,239,220,171,191, 67,250,246,201,
-140,162, 81,111,184, 69,248, 34,229,226, 38,228,223, 58,130,162,236, 84,198,222,160,130,187,115, 32,250,142, 29,133,111, 70,181,
-134,166, 84, 3, 97,206, 99, 7,169, 88,230, 88,157, 38,225, 48,246,219,229, 75, 60, 69, 66,193,211,235, 89,190,113, 22,232,141,
- 70,128, 99, 33, 23,241, 96, 72,249,255, 44,224, 44,102,101,179, 97,159,188, 3,224,122,109,121, 79,200, 35, 59,194,220,152, 72,
-240,150, 80, 98,209,131, 1, 46,199,231,147, 10,211,211,196,157, 25,211,178,247,196, 72,194,224,210,139,124, 71,225,206, 24,208,
-170,129,173,141, 77,233, 3,100,238,125, 15,143, 33, 39,238, 29,223,194,152, 55,167, 43,127,249,229,151,129, 12,195, 76,171,220,
- 7,237,239, 24, 94, 76, 53,169,230,255,170,166,131,131, 67,195,250,245,235,207,183, 88, 44,157, 37, 18,137,187,217,108, 6,207,
-243,185, 82,169,244, 82,106,106,234, 23,106,181, 58,249,191, 45,239,199,142, 29,179,218,100, 89,163, 41, 22,139,113,230,204,153,
- 71,214,154,172, 42, 22,160,223,186,119,239, 94,236,222,189, 27, 0,112,238,220, 57, 4, 7, 7,219, 84,117,108, 70, 70,134,205,
-240,225,195,183, 2,240,173, 73, 51, 41, 41,169,225,146, 37, 75,176,119,239, 94, 0,192,150, 45, 91,208,168, 81,163, 42,211,115,
-247,238, 93,225,103,159,125,214, 16, 64,246,223,253, 29,253,211, 13,214, 19, 63, 39,105, 4, 12, 28, 0, 60,169,235,201, 18,114,
-201,242,230,158,226, 62,103,246,254,216, 89, 46, 17, 96,193,250, 89, 25, 5,197,154,118, 34, 6, 60, 0,176, 4, 2, 39, 91,105,
-244, 87, 19,154,251,149,148, 25,112,232, 70,214,197,248, 60, 82,167, 80,104,124, 54, 57, 5,192,241, 95, 21, 36,211,104,194, 55,
-167,118,238,156,211,167,217,140,193,205,112,240,106,234, 12, 0,235,107, 45,228, 60, 15,194,179, 21,157,218,159, 58, 25, 30,224,
-217, 63,189, 49,240, 32, 79,255,198,215, 45,130,213,149, 97, 68, 37,110,232, 91, 79, 41,253, 97,202,148,183,237, 45, 5, 73, 40,
- 54, 73,144, 81, 98, 64,174, 94,140, 50,145, 27,178, 30,196,114, 2, 6,167,106,143,178,160,148,176, 6, 71, 39,169,173, 32,188,
-231, 59,222,165,199, 63, 45,145, 50,172,208,126,232,151,142,133,103, 86,166,178,218, 2, 45,195,160,214, 9, 46, 29, 28, 28,131,
- 13, 69,169, 66,117, 73, 33, 28, 61,194,208,231,181, 1, 88,212,191, 9, 52,165, 90, 20, 20, 71,147, 32, 79,123, 38,237,210, 54,
-204,235,219, 24, 69,121, 57, 48, 90, 0, 70,107, 44, 54,152, 12,101,213, 94, 71, 1,126,254,112,246,199, 99,252, 61, 93,109,202,
- 7, 11, 16,158, 67,243,198, 1,232,217,185, 45, 78, 93,190,130,155,177, 15,193, 63, 27, 44, 64,120, 30,153,249, 37,121, 6, 51,
-183,169, 78, 23,148, 99, 65, 44,134, 42, 13, 24, 94,160,105,176,169, 59,163,228,128,207,219, 5,217, 77,154, 51,192,223,206, 70,
-198,192, 96,225, 96, 48, 89,160,185,242, 3,156,235, 55,133, 82, 46,103, 34,160, 23, 1,160,147,135, 82, 40,149, 24, 57,114,164,
- 60, 47, 47,239,124,255,254,253,155,244,236,217, 83, 25, 25, 25, 9,173, 86,139,147, 39, 79, 66,171,213,250,251,250,250,250,159,
- 60,121,114, 88,187,118,237, 18,124,124,124,186,238,217,179,167, 46,125,100, 69,248, 87, 39,117, 30, 0,251,108, 41, 47, 33,158,
-118, 52,231, 9, 33,220,139,166, 93, 42,149, 34, 58, 58,250,165, 71,178,110,220,184,241,232, 69, 34, 89, 90,173, 86,226,233,233,
- 9,103,103,103,112, 28, 7,173, 86,139, 3, 7, 14, 64,173, 86,131,231,121, 40, 20, 10,124,249,237,122, 60,184,115, 30,215,175,
- 95,135, 90,173,150,212,166, 89, 88, 88,200,132,132,132,192,104, 52,130,101, 89, 24, 12, 6,156, 62,125,186,226,119,145, 72,132,
-143, 23,175,194,195, 91,231, 17, 19, 19,131,194,194, 66,134,150,234,191,223, 96,253,101, 56,142,157,251,203,230,157,209,115,167,
-142,194,244,209, 81,190, 95,252,184, 63, 42,161,128,108, 6,128, 38,174,204,132,113,221,130,252, 28,149, 98, 44,218,126, 11, 32,
-100,238, 95, 61, 95, 92, 17,121, 24,230,193,204,248,253,250,255,177,119,222, 97, 81, 29,109, 27,191,231,108,103,119,233,125, 1,
- 65, 80, 17, 81, 81,192,174, 17, 21,187,198,104, 52, 70,141, 45,177, 27, 53, 26, 75,140, 70, 99,236, 38,182, 24,141,154,166,177,
-183, 24,123,199, 6, 54, 84, 80, 80, 20,145,186,244, 94,182,239,153,239, 15,202,171,134,178,160,249,222,188,230,252,174,107, 47,
-216,118,239,156, 57,101,238,243,204,204, 51, 9, 33,243,135,250,195,203,217,162, 81,131, 6, 68, 20, 27,107,194,154,127,172, 1,
-214,114,113,227,190, 45,237, 78,131,101, 97,101, 46,246,129,209, 0, 43,185,184,113,239,102,150,167, 0,192, 74, 42,244,169, 44,
-210, 85,101,184,183,158,112,188, 84,204, 31, 47, 11,112,174, 55,186,127,119,179, 62,253, 7,153,201, 5, 6,100,223, 60,139, 2,
-129, 43,244, 54,238,208,232,115,144, 28, 23,107,188,112, 35, 58, 37,171, 80, 51,171,198, 98, 82, 92, 73,137,123,108,239,233,215,
-221, 58,235,248,151, 25,158, 99,118,215,103,192, 50,133,187, 6,166,203, 28, 90,155,221,122, 22, 87,196,210,191, 70,112, 94,165,
- 32, 63, 63, 94,111,132,179,202,200, 55,143,189,244, 43,230,245,110,142,220,156, 12,168,117, 6,228,171, 12, 58, 39, 43,137, 88,
- 19,247, 0, 26,157, 1, 90, 61, 11,129,149, 11,206,134, 69,102,177,122,253,169,170, 52, 99,179,232, 61, 0,242, 23, 95,107, 96,
- 79, 90,204,181, 48,187, 7,189, 10, 9,201, 74,236, 56, 17,230, 95,246,185,186,223,157,178,134,210,110,230, 23, 34, 87,132,162,
- 83, 93, 6,183, 55,113, 36,173,205, 36,194,239, 87,127, 54,220,183,157,183,141,152, 77, 14, 3, 97,117,144, 25,249, 80,137,140,
-176,116,243, 2,171, 45,164, 37,106,117,222,195,255,199, 37,130, 56, 56,254, 23,240,241,241,113,178,180,180,124,248,249,231,159,
-219, 12, 28, 56, 16, 71,142, 28, 65, 65, 65, 1,126,251,237, 55,172, 95,191, 30,139, 23, 47,134, 94,175,199,182,109,219,164,135,
- 14, 29,106,189,121,243,230,100,119,119,247,166, 9, 9, 9, 53, 45,168, 78, 0,136, 1, 8,202,218, 46, 2,128, 61,121,242, 36,
-250,244,233,131,147, 39, 79,178,101,175, 25, 9, 33,122, 74,169,166,174, 6, 75, 36, 18,225,209,163, 71,111,196,100, 9, 4, 2,
-200,229,114,136, 68, 34, 60,126,252,184,214, 38,203, 96, 48,240,146,147,147,145,159,159,143,238,253,251, 99,221,138, 21,232,210,
-165, 11,186,119,239, 14, 74, 41,206,159, 63,143,224, 14,205, 48,244,221, 32, 68, 71, 71, 67,175,215,155, 84,222,180,180, 52,164,
-167,167,163, 87,255,254,216,190,121, 51,218,180,105,131,198,141, 27,195, 96, 48, 32, 36, 36, 4,131,123,118,128,228,189, 96,196,
-196,196,112, 7,245,255,138,193,122,144, 65,111,248,218,147,227, 31,246,108,221,175,127, 71, 95,108,223,119, 97,153,175, 47,217,
- 11, 0,182,230,226,165, 35,187,120, 33, 42, 49, 23, 23,238, 41,143, 71,101,210, 55, 50,251,130, 53,194,206,214, 66, 10,240, 68,
- 80,233, 88,131,197, 51,212, 56, 48,153,165, 20,210,119,230,226,163,254, 81,110,109,124,221,220,202,103, 17,202,251,172,197,168,
-200,167,245, 90, 53,118,170, 7,163, 30, 48,234, 97, 49,116, 55,240,141,172,198,114,116,244, 20,159,155, 59,235,179,246,189,223,
-251,192, 76, 36,181,132,177, 32, 9,250,180, 72,100, 63,185,130, 98,105, 35,164, 37, 60,195,254, 51, 55,243,159, 36,103, 23, 48,
- 12,206,166,231,107,102,199,230,208,162,154,116,213,122,172,248,234,203, 89,125,247,239,221,103, 46,246,234, 72, 98, 55,245,201,
- 23,241, 13, 98,251,250, 1, 76,137,196,142, 46,255,109,159, 69,177, 22, 43,107,210, 41, 41, 46, 56,124,254,236,233,161, 13, 61,
- 59,154, 63,191,125, 2, 42,181, 6, 26, 61,208,180,117, 16,140, 70, 42, 34, 12, 97, 45,120, 60,146,145,157, 11,162, 55,166, 95,
-189,255, 60,245,218,253,103, 60,141,121,205,218, 47, 29,116,132, 55,173,127, 80, 75, 64,175,194,187,239, 52,199,186, 93, 23, 62,
- 5, 48,230,245,118,114,105, 4,139, 2, 29,155, 58,144, 31, 1,116,188,243,199,122,159,192,247,102,160, 54, 17,172,102,246,164,
-119,179, 6,138, 95,215, 45,157,107, 99,235,218,136, 71, 88, 61,168,147, 31, 80,144, 76, 73,114, 24, 44, 93,218,192,168,232,128,
-109, 27,191, 45, 98, 89,186,183, 46, 41, 42, 56, 56,222,102,212,106,245,225, 85,171, 86,217,244,235,215, 15, 0, 80, 84, 84,132,
-176,176, 48,252,244,211, 79,144,201, 94,190, 78,246,233,211, 7,148, 82,155, 69,139, 22, 29, 6,208,174, 42,205, 14, 29, 58,244,
-223,184,113,163,178,101,203,150,207,202, 76,150, 16, 0,243,224,193, 3, 38, 41, 41,137, 88, 91, 91, 83,133, 66,161, 87, 42,149,
- 44, 0,227,216,177, 99,121,114,185,188, 97, 81, 81,209,229,186, 26, 44,145, 72,244, 70,198,100, 9, 4, 2, 16, 66, 32, 18,137,
- 32, 20, 10,145,146,146, 82, 43,147,101, 48, 24,248, 39, 79,158,196,157, 59,119,176,184,101, 75,124,230,226, 2, 27, 27, 27,132,
-132,132,128, 82, 10,153, 76,134,156,156, 28,236,221,187, 23, 93,187,118,133,193, 96, 16,154,162,123,240,224, 65,132,135,135,227,
-155,192, 64,124,102,105, 9,185, 92,142,243,231, 75,123,253,196, 98, 49, 18, 18, 18,112,254,252,121, 4, 5, 5,113, 7,245,223,
-109,176,130, 8,225, 19, 71, 56,233,180, 42, 80, 3, 5, 8, 20,190,190, 68, 24, 21, 69,117,181,253, 81,134,193,151, 27,119, 28,
-239,187,118, 70,127, 50,126,128,191, 98,201,175,151, 38, 1,192,199,239,123,187, 72,197,124,108, 56, 26, 69, 25, 6, 95,190,137,
- 13,244,245, 37, 66,134,193,164,238,109, 26, 67,153,167, 69,172, 50,239, 98, 20,165, 38,117,233, 92, 88,251, 17,118,254, 25,146,
-180,126,167,250, 17,165, 20, 86,114,113,227, 81, 17,177,245,126, 61, 25,158,248,221,126,245, 35,202, 82, 88, 73, 5, 62, 99,162,
- 59,212, 56,139,176, 85, 61,225,248, 47,230,206,238, 48, 96,204,231, 18,195,163, 3,208,198,158, 1,171, 83,161, 64, 39, 68, 30,
-207, 9,201,137,137, 88,190,237,120, 82, 65,177,118,232,131,140,218, 25,203,152, 44, 90,228,107, 79, 6, 46,255,122,254,185, 21,
- 75, 23,201, 85,207, 66,138,120,196,160,226,121,116,230, 47, 93,188,150, 20,106,180, 31,196,230,208,194,154,116, 52,230, 88,185,
-234,187,141,125,199,141, 24,244,200,187, 81,103, 91,163, 50,206, 86, 93, 80,144,177,251,116,184, 83,217,157, 33, 1,128,216,228,
-108,100,230, 23, 27,140, 6,253,101,115, 1,150, 60, 52, 37, 26, 88,134,151, 35,177, 31,216,201,111,184,189,185, 16,170,162, 60,
- 56,152, 11,208,179, 77,131,225, 94,142,100,238,179,116,154, 89,119,131,165, 7,213,171,112, 99,101, 87, 31,106,212,251,192,168,
-135, 46,226,247,218, 71,194, 8, 62,155,250,142,220,194, 90,251,156, 65,177, 12, 48,179, 3,177,112, 7, 44,235, 19, 65,147, 15,
-160,124,246,208,240,233,240, 17,217,113,241,201, 63,219,153, 97, 13,119, 9,225,224,120,153,132,132,132,145, 95,124,241,197,181,
- 54,109,218, 56,218,217,217,161,121,243,230,248,243,207, 63,241,249,231,159, 87,124,166,101,203,150,160,148, 34, 39, 39, 7,171,
- 86,173, 74, 83, 42,149, 35,171,211,124,248,240,225,163,157, 59,119,190,227,235,235,171, 19, 10,133,121, 0,196,121,121,121,146,
-156,156, 28,162, 86,171,193,178, 44,107,105,105,105, 84, 42,149,250,161, 67,135,106, 66, 67, 67, 27, 20, 23, 23, 39,188, 78, 4,
-171, 85,171, 86, 15,242,242,242,242, 25,134,121,237, 20, 14,229,230,170, 89,179,102,246,197,197,197, 44,128,220,186,164,112, 48,
- 24, 12, 8, 12, 12,196,153, 43,119,113,242, 66, 40, 10,148,143, 49,105,220, 72, 52,111,222, 28,103,206,156,169,243, 62,107,209,
-162, 5, 78,159,191,134,107,119,238, 35, 33, 38, 2,159, 78, 26,135,166, 77,155,226,244,233,211,220, 1,253,119, 27,172, 38,246,
-164,133,162,161,232,247, 69,189, 27, 52, 17,116, 95, 4, 34, 48,195,129, 70,167, 59,124,185,124,211,163,230,142,100, 68,100,122,
-205,179,189, 94,138, 98,165,211,135, 77, 29,200,158,251,209, 62,195,223,109,227,134,237,127, 74, 23, 2,192, 7,157, 60,113,235,
- 73, 38,110,198,100,236,121,152, 65, 31,190,238,198, 53,119, 36, 82, 80,236, 89, 53,109, 64,144,187,171, 19,126, 58,114, 13,132,
-224,176, 73, 13, 45,165,180,141,175, 59,214,239,124,117,198,160, 83,189,239,246,171, 31,157,121, 80,208, 27, 0,122, 52,145,157,
-106,213,192,186, 94, 77,145, 12, 51, 17,127, 66,239, 65, 31, 73, 12, 49,127, 2,241,231, 65, 12, 26,168,116, 44, 82,179, 10, 81,
- 98,233,134,144,176,251,170,124,181,118,198,195,140,186, 69,237,162, 50,233,179,150,206, 36,177,168, 88,229, 44,181,111,160,230,
- 49, 44, 91,164,161,184, 21, 21, 95,240, 48,149, 62, 54, 69, 35, 54,150,106,219,185,146, 78, 63,238,216,255,149, 64, 40,250,128,
- 71, 64, 28,172,100,246, 63,174,253, 6,230,230,114,176,218, 34,160, 56, 19, 3,167, 44,207,140, 76,209,121, 2,128,183, 29,145,
-191,227, 37,220,193,103, 72,242,197,167,218, 5, 53,253, 6,209, 99,226,136,158, 45, 5,172,182, 24,211, 86,237,195,214,185, 3,
-240, 81,183, 38,130, 19,215, 99, 38, 2, 88, 82,215,125, 77,141, 6, 80,189, 10,237,230, 95,121, 68,128,107, 20,232,120,103,255,
- 82, 31,224,174,201, 26, 1,132, 8,248,206,164,137, 95, 61,153,144, 77,190, 14, 54,249, 58,229,185,117, 0,169,247, 14, 33, 78,
-129,244,251,213,139,139,183,111,255,233, 44,203,224,235,154, 82, 94,112,112,252, 91,161,148, 62,179,178,178,234,213,167, 79,159,
- 11,103,206,156,177,105,214,172, 25, 0,160,124,198, 90, 96, 96, 32,188,189,189,145,158,158,142, 15, 63,252, 48, 43, 53, 53,181,
- 23,165,180,218, 49,189,133,133,133,113, 7, 15, 30,116, 44, 46, 46,110,185, 96,193,130, 12,119,119,247, 2,181, 90, 77,242,242,
-242, 88,131,193, 0,107,107,107, 81,203,150, 45,209,190,125,251,162,176,176, 48,143,164,164,164, 66, 0,241,117, 41,255, 39,159,
-124,130,195,135, 75,155,137, 55,145, 23, 75, 40, 20, 34, 56, 56,216, 37, 52, 52, 52, 5, 0,234,146, 23,235,197,230,229,254,253,
-251,184,124, 55, 25,124,173, 10,162, 76, 37,110, 28, 57,136,254, 19, 38,195, 96,168,251,104,133,251,247,239,227,143,243, 55, 32,
- 19,243,241,248,241, 67, 28, 60,120, 16,147, 38, 77,122, 45, 77,142, 26, 12, 86,131, 6, 68, 36, 46,194,162,158,129, 46,115, 62,
-232,216,128,167, 47, 80,130, 53,178,224, 9, 0, 7, 59, 11,252,254,251, 30,207, 61,251,246,133,181,112, 17,108,100, 13,134, 47,
- 35,211,105, 73, 45,126,123,209,218,125,215, 62,248,125, 86, 16,127, 82,111, 31, 27, 0, 16,242, 25,108,248,243,161, 1,192,162,
-215,217,168,118,174, 68, 82,164,199,120, 39, 91,203,133, 95,124,210,215, 38, 40,208, 27,151,111, 62,192,198,131, 97, 87, 68, 25,
-216,105,242, 65,205,234, 95,157, 2, 91,233, 44, 66,176, 53,143,167, 52, 26,169,147, 80,102, 13, 93,252, 37, 64,167,134, 90,163,
- 67, 82,182, 17, 73, 57,106,240,165, 66,220,137, 73, 86,217,166,225,120, 93,183,153, 16, 66, 58,122, 73, 20, 95, 45,251,206, 85,
-173, 42, 50, 20,228,102, 25,132,162, 27, 2,169,153, 56,181, 54, 58, 97,201, 84,221,217, 83, 24, 0,176, 60,145,132,150,204,159,
- 57, 90,150, 18,117, 6, 13, 25, 37, 8,165, 48,107,210, 23,230,102, 60, 97,167,250,194, 68, 0,168,239,100, 41, 90,245,245,231,
-150, 51,230,126, 93,227, 24, 47, 95, 66,132,205, 91, 57,205,104,230,110,141, 43,225,143,112, 37, 50,225,225,149, 59,143,155,118,
-105,174,128,183,171,213,116, 95, 66, 86, 70,209,218, 71, 68, 75,119,140, 1,208,171, 43,102, 17,250, 58,146, 97,173, 62, 88, 80,
-233,236,193,170,168, 15,176, 49, 70, 10,194,227, 1,132, 41,157,209,152,116, 29,124, 43, 47,186,103,255, 31, 37, 63,253,180,243,
-155,168, 76,202, 69,173, 56, 56,106, 32, 47, 47, 47, 66, 42,149,246,244,243,243,251,109,218,180,105,230, 35, 70,140, 80,140, 27,
- 55,142, 1,128,244,244,116,118,253,250,245,202,239,191,255, 62, 63, 43, 43,107,140, 78,167,139, 52,229,134,151, 16, 18,250,243,
-207, 63,103, 94,189,122,181,105,235,214,173,197, 1, 1, 1,172,181,181, 53, 95, 44, 22, 27,181, 90,173, 58, 38, 38,198,248,236,
-217, 51,231,188,188,188,167, 0, 98,235,210,125,175, 80, 40,192, 48,204, 18, 87, 87,215,175,148, 74,101,179, 55, 49, 6,171, 97,
-195,134, 10, 0, 79, 93, 92, 92, 26,214,182,123,240, 47, 13, 54,159,143,220,220, 92,148,164, 61,132, 36,249, 9,252,100, 12,124,
-173,229,176,176,176,120, 45, 51,148,159,159, 15, 20,167,224,218,181,251,128,193, 0, 75, 75, 75, 88, 90, 90,114, 6,235,239, 50,
- 88, 77, 29,200, 36,107, 17,214, 79,232,219, 64, 88,191,158, 43, 52,201,119,112, 63,169, 8, 95,182,109, 29,197, 19,155,171, 39,
-140, 28, 16, 56,104,176, 7,130,218,183, 34,245,157, 45,167,175, 92,187,101, 74, 83, 71,242,249,195,116,186,193,148, 31,126,152,
- 65,227,154, 56,144,159, 46, 69, 36, 79,116,149,170,192,178, 20,151, 34, 83, 17, 25,159,251, 83,116, 6,141,171,205, 70, 52, 85,
-144, 96, 62,152,125,148, 82,137,165, 76, 86,216,178,133,143, 93,112,187, 22, 76,175,206,129, 16,242,128,107,183,238,227,179,181,
-135,111,176, 44,237, 27,110, 98,247, 96,233,140,193,151,141, 83,233,140, 65,253, 75, 51, 6, 41,165,180,116, 22, 97,245,195,186,
-120, 60,146, 86,146,112,219, 73, 96,219, 8,170,216, 75,136,207,101,145,144, 81,136, 2,190, 19, 52, 41, 41, 0,101, 19, 67, 40,
-173,243,209,108,103,103,231,224,233,235,221, 96,211,142,131,208,149,228, 35, 46,228, 55, 20,229,166, 98,233,143,127, 54,112,117,
-117,237,156,156,156,124,185, 22,102,205,251,194,241, 61, 14,160, 0, 79, 32,198,137,205,251,145,101,107, 6, 59,169, 16,172, 42,
- 19, 19,102,140,176,236,221,125,132, 37, 0, 36, 60,190, 7,119,169,202, 36, 93,157, 45, 6,125,208,165,177, 21,244, 42,236, 56,
-125, 79,205, 0,189,118,158,125, 24,219,197,199, 74,242, 65, 71,119,235, 37,202,188,247, 81,199,100,160,229, 17,172,138,136, 94,
- 29,102, 15, 30,160,212,216,196,158,196,238, 11,205,144, 13,238, 30, 32, 21,242, 9,161, 69, 41,160,102,118,216,178,227, 64,145,
- 72,143,109,220, 37,131,131,195, 52, 74, 74, 74,194, 9, 33,205,103,207,158, 61,108,254,252,249,239,200,100, 50, 79, 0, 40, 46,
- 46,142,211,235,245, 87, 0,236,169,205,108,191, 50,195,244,148, 16, 18, 23, 27, 27,235,184,107,215, 46, 43, 0,146,178,183,213,
- 0,242, 0,164,191,206, 12,194,114, 51,165, 80, 40,190,122, 83,245, 80,110,166, 92, 92, 92, 26,214,229,251, 60, 30,207, 72, 8,
- 1, 33, 4, 98,177, 24, 87,175, 94,197,144,190,221, 17,125, 34, 15,205,172,228,104, 61,102, 2,246,157, 59, 7, 30,143, 7, 66,
- 8,120, 60, 94,173,218, 17, 62,159,143,107,215,174,225,163, 15, 7, 67,204, 7, 44, 45, 45, 49,123,246,108, 28, 61,122, 20,124,
- 62,183,154,222,223, 19,193, 34, 88,114,238,183,229, 66, 24,245, 56,246,219,183, 56,254,160, 72,251, 56, 19, 95, 54,206,196,250,
-131, 40,100, 51,215,238,156,120,238,218,131, 53, 99,135,246,147,118,237,210, 29, 93,131,186,240,155,182,234,188, 16,192,134, 23,
- 26,234,224,234,114,101, 24, 89,124,179,237,244,163, 9,251, 66, 98, 8,116,133, 24,218,163, 21, 53,178,248,166,134,198,255, 47,
-154,150,102,242,125,215,194,194,172,161, 43, 66,252,189,139, 18, 15,207, 6,128, 81,135,167, 79,159,224,251, 29, 71,216,144, 91,
-143,127,215, 26, 48, 45, 54,135, 22,155,170, 89,234,168, 12,176,148,137, 26,247,110,102,121,138, 5,133,149, 84,232, 67, 89, 35,
-172,164, 2,159, 30, 77,100,167, 40,165,212,220, 76,224, 67,141,250, 26, 53, 85, 90,195,214, 29,191,252,244,221,199, 31,127, 44,
-203, 74, 78,131,178,224, 1,138, 68, 46,208, 75,221, 16,123,239,138,170, 68, 99,168,177,241,174,174, 62,179,178,178, 50,194,111,
-230, 96,223,143, 43,160,215,106,144,145, 92,234, 81,149, 89, 5,176,176,115, 9,171,141,166,206,192,230, 15, 26, 49, 94,104,102,
- 14,179,143, 6,245, 19,197,102,107,224,175, 48, 47,189,200, 21,101, 34,250,252, 53, 4, 21,151,250,181,103, 73, 12,220, 91, 40,
- 76, 42,167,185, 68, 56,173,119,128, 11,226, 18, 83,113,245, 97,202,142,103,217, 84,233,101, 75,118,196, 42,243, 38, 14,104, 91,
- 15,235,142, 70,125, 90,149, 41,170, 74,211,215,145, 12, 3,208,177,116,144,187, 10, 20,232,232,235, 72,134,153, 50,115,176, 50,
- 77,190, 16,195,191, 59,149,176,224,192,237,172, 1,115,134,119,178,104,223,190,143, 8, 6, 45, 10, 85, 26,125, 84, 46, 45,120,
-157,125,244, 26,209, 73, 78,147,211,252,159,212, 44, 51, 59,191,151, 61,222,164,166, 18,175,228,101,122,221,109,127,177, 59, 80,
-169, 84,242,203,162, 87,213, 14,114,175, 73,243,197,238,192,148,148,148,147,101,209,171,106,163, 88,149,104, 42,219,180,105, 99,
-211,191,127,127, 24,141, 70, 60,121,242, 4, 9, 73, 73, 8,158,248, 41,172,172,172,112, 37, 34, 2,143, 31, 63,198, 87, 95,125,
- 5,150,101,113,227,198,141,228,154, 52, 5, 2,129,174, 69,139, 22,194,247,222,123, 15, 6,131, 1,207,158, 61, 67, 74, 74, 10,
- 62,251,236, 51, 88, 90, 90, 34, 60, 60,188, 66, 83,163,209, 32, 46, 46, 78,247,255,113, 44,253,123, 12, 22, 96,132, 81,143,252,
-115,139,176,225, 42,116, 58, 61,124, 30,102,208,231, 47,188,191,197,207,150, 28,139,120,240, 40, 46,252,122, 87, 17, 50, 34, 75,
-191, 83, 11, 98,178,104,106, 43, 55,126, 33,116,133, 22,120,118, 10,207,211, 11,139, 98,178,104,106,109, 55,130,178, 70, 2, 93,
- 9,144,122, 7,161, 87, 46, 35,228,198,125,220,142,124,100, 12, 13,143,217,199,176,248, 38, 42,139, 62,169,181, 38,165,144,247,
- 93,135,209,145, 79,235,181,242,118,172, 7,163, 1,148,213,195,114,232, 30,140,137,106, 95,175,149,151, 85,189,210,200,149, 30,
-214,159, 92, 4,190,147, 84,171,119, 59, 81,183,173,163,167,248,253,194,188,236,182,221, 58,183,147, 89, 54,233,141,172,167, 49,
-120,114,255,154, 42,252, 65,108,232,237, 68,221,107, 69, 71, 92, 92, 92,222,233,214,185, 49,134, 78,248, 2,186,146,124, 60, 11,
-249, 5, 69, 57,105,184, 26, 38,199,163,130,130,118, 0, 76,142, 96,133, 38,232,155, 2, 64,199,250,194, 68,115,104,156, 70,246,
-235, 15, 49, 81,131,213, 20,128,148,100, 33, 54, 69,155,255,254,143, 73, 70, 0,144,138, 9, 95, 70,243, 45, 76,209,245,117,183,
-109, 36,229,233,177,243,220, 67,176,108,233, 50, 75, 44,139, 45, 59, 47,198, 78,252,230, 35,127,248,214,179,110, 65, 8, 33,181,
- 9,237, 19,138, 78,183,247,125,237,163,190,176, 16, 96,117,184, 54,221,198,167,211,134,156, 78,117,141,132, 69,166,208, 20, 0,
- 19,155, 40,200,214,233, 27, 78, 47, 12, 60, 23,213,113,214, 39, 3, 44, 64,185,133,209, 57, 56, 56,254, 43,145,192, 9,115,231,
-206,221,202,227,241,236, 1, 16, 74, 41, 52, 26, 13,255,199, 31,127, 20, 24, 12, 6,134,199,227, 25, 37, 18,137, 33, 60, 60, 92,
-207,178,108,166, 78,167,155, 80,147,166, 86,171,141,221,180,105, 83, 3,189, 94, 95, 49,227, 80,163,209,224,151, 95,126,129, 70,
-163,129, 88, 44,134, 92, 46,199,179,103,207, 64, 8,209, 25,141,198, 88,110, 79,188, 73,131, 69,241,117,135,143, 22, 45, 2, 64,
- 64,177,248, 21,115, 5, 0,136,200,166,202,166, 14,228,179,166,173, 58, 47, 42,255, 78,109, 11,160, 54, 26, 7,183,106,238,189,
- 23, 0, 52,212,248, 81, 93, 54,162, 64,163,250,160,101,171,118,251, 88, 74,249, 6, 74,127, 98, 88, 28, 82, 27, 16,109,202,204,
-185, 42,239, 60, 50,242,194,203, 23,112,102, 65,255,211, 45, 88,150,142,129, 82, 74, 43,186, 5,191,149, 32, 43, 95, 83, 99, 30,
-167,107,113,154,238,173,234, 9,199,159,189,126,111,130,209, 72,157,120, 60,146,166,210, 26,182,190,174,185, 42,187,251,186,236,
-235, 64,206, 70,180,112,236, 97, 39, 45,139,106,149, 0, 89, 37, 56,155,156, 81,120,185, 46,154,185,197,250, 1,243,215, 31,253,
- 83, 36,224,241, 65,105,105, 34, 80, 74,161,214, 25,115,202, 77,152,159, 45, 81,204,254,195,176,151,199, 35, 9, 53,233,221,124,
-156,186,110,232,202,243,159, 63,140,207,253,233,121, 46,125, 0, 0,207,115,233,131,134,182,100, 97,108, 90,225,231, 15, 18,114,
-191,173,237,184, 9, 74,112,181,213,208, 69,127,121,237,117,235, 51, 90, 73,239, 3, 24,216,212,129,116, 31, 58,235,251, 89,132,
-128, 91, 38,130,131,227, 95, 68,121, 20,139, 97,152, 37,111, 74,179, 60,138, 5,224,105, 45,190,115, 19, 64,243, 55,185,109,225,
-225,225,217, 0,178,185,189,252, 95, 50, 88, 15, 51,232, 22,152,176,152,179,169,159,171,242,251, 74,122, 30,128,237,235,108, 68,
-153,134,205,155,172,152,136,116,186,240,239,168,240, 50, 51,245,183,140,229,137,202,160, 61, 1,160, 81,163, 70,244,233,211,167,
-160,148,190, 86,246,221,232, 76,122, 31,175, 44,185, 80,153,201, 6,208,201, 20,189,152, 44,250, 13,240,215, 46,224,167,217,116,
- 41,128,165,117,218,230, 58,102,106, 55,249,216,202,160,231,128,154,179,233,115,112,112,188,157, 38,235, 77,107,190,238,194,207,
- 28,111,129,193,226,248,223,229,201,147, 39,220,178, 6, 28, 28, 28, 28, 85, 99,252, 27, 52,185,164,195, 28, 47,193,112, 85,192,
-193,193,193,193,193,193,193,241,102, 33, 0,130, 43,181,226,181,152, 29, 64, 8, 9,174,181,213,175, 65,159,211,228, 52, 57, 77,
- 78,147,211,228, 52, 57,205,183, 79,179, 38,237,183,102,118, 34,125, 97,240,242,155,126, 0, 8,230, 52, 57, 77, 78,147,211,228,
- 52, 57, 77, 78,147,211,252,183, 61,184, 46, 66, 14, 14, 14, 14, 14, 14, 14,142, 55, 12,103,176, 56, 56, 56, 56, 56, 56, 56, 56,
- 56,131,197,193,193,193,193,193,193,193,193, 25, 44, 14, 14, 14, 14, 14, 14, 14, 14,206, 96,113,112,112,112,112,112,112,112,112,
-212, 29, 82,203,149, 73, 56, 56, 56, 56, 56, 56, 56, 56, 56,106,128,139, 96,113,112,112,112,112,112,112,112,112, 6,139,131,131,
-131,131,131,131,131,131, 51, 88, 28, 28, 28, 28, 28, 28, 28, 28,156,193,226,224,224,224,224,224,224,224,224,224, 12, 22, 7, 7,
- 7, 7, 7, 7, 7, 7,103,176, 56, 56, 56, 56, 56, 56, 56, 56, 56,131,197,193,193,193,193,193,193,193,193,241,223, 55, 88,132,
-144, 96, 78,147,211,228, 52, 57, 77, 78,147,211,228, 52, 57, 77,206, 96,113,112,112,112,112,112,112,112,112,112, 6,139,131,131,
-131,131,131,131,131,131, 51, 88, 28, 28, 28, 28, 28, 28, 28, 28,156,193,226,224,224,224,224,224,224,224,224,224, 12, 22, 7, 7,
- 7, 7, 7, 7, 7,199,127, 9, 2,160,210,153, 0,148,210,243, 38,139,212, 97, 54, 65, 77,250,156, 38,167,201,105,114,154,156,
- 38,167,201,105,190,125,154, 53,105,215,198,127,252,163,161,148,254,109, 15, 0,193,156, 38,167,201,105,114,154,156, 38,167,201,
-105,114,154,255,182, 7,215, 69,200, 97,106,148,210,145, 16,226,200,213, 4, 7, 7, 7, 7, 7, 71,205,240,223,164,152, 15, 33,
-109,214,188, 83,111, 81,159,203, 9,189, 76,104,176, 25,252,103, 12, 24, 91, 26, 76, 43,181,197,175, 97, 2,222,184, 38, 7, 64,
- 8, 89, 65, 8,230,148,253,191,154, 82,250,197,219,184,157,115,230,204, 25,236,239,223, 10,214,146,116,180,242,122, 2,228,238,
- 1,172, 63,192,130, 51, 93,208,202,191, 3,174,220, 77,194,149, 27, 15, 17,182,185, 63, 62,153,177, 8,106,181, 14, 89, 89, 74,
-220,191,118,250,224, 91,180,175,219, 10, 4,130, 15,172,173,173,205, 51, 50, 50, 46, 0,248, 19,192,187, 14, 14, 14,221,114,115,
-115, 11,245,122,253,126, 74,233,141,186,104,191,211,146,204, 21, 9, 5, 99,213, 58,253,170,107,247,232, 47, 65, 1,196,214,192,
- 98,165, 68,200,239,164,209, 26, 86, 95,189, 79,127,170,101, 89,201, 43,209,248, 90,159,235, 7, 9,225,153,250,217, 63,172,173,
-189, 45,228,242, 11, 18, 30,239,121, 74, 73,201,136,193, 25, 25, 73,131, 41, 53,190, 77,231, 64,215,174, 93, 71,243,120,188,101,
- 0, 96, 52, 26,191,188,120,241,226,111,111, 66, 87,161, 80, 12,163,148,202,202,246, 91,177, 82,169,220, 99,234,119, 3, 2, 2,
- 18, 0,212, 43,123,154, 24, 30, 30,238,110,202,123, 28,181,227,206,157, 59,212,221,221, 29,205,155, 55,127,156,150,150,246, 61,
-165,116, 11, 87, 43,255, 16,131,213,152,144,134, 19,251,180, 63,215,227,253,158, 50, 83,140,144,139,139,203, 74,123,123,251, 73,
- 37, 37, 37,106, 0,148,199,227,209, 38, 77,154,128, 16,130,242,235,166,209,104,204,124,244,232, 81, 51, 83,205,213,155,210,244,
-246,246,190,195, 48,140,235,139,215,239,154,254,103, 89, 54, 57, 42, 42, 42,176,166,114, 58, 59, 59,247,100, 24,102, 94, 77,159,
- 99, 89,118,101,106,106,234,153,234, 62,211,188,121,243,187, 50,153,204,145, 97, 24, 82,213,103, 94,108,115, 12, 6, 3, 45, 41,
- 41, 73,127,248,240,161,127, 45, 26, 49, 71, 66, 48,135,101, 41, 3, 0, 12, 67,230, 90, 91, 91,239,206,205,205,141, 42,127,191,
-236,119,210,107,115,188,184,184,184,140, 2,240, 57, 0, 10,224,187,148,148,148, 29,181,249,126,163, 70,141,238, 8,133, 66, 87,
- 30,143, 71, 94,221, 39,149, 61,103, 89,150,106,181,218,228,199,143, 31, 87,185,143, 66, 66, 46, 31, 88,189,122,245,221,109, 63,
-255,228,223,162,229, 96, 48,210, 46,208, 81, 11,220,141,215,160, 85, 11, 2,202,178, 80, 23,100,128,101, 89,148,168, 53,184,112,
-228,151,187,245,234, 55,240, 71,233, 88,198,183,193, 92,245, 26, 53,106,212,242, 85,171, 86,217,137, 68, 34,102,255,254,253,237,
- 62,251,236,179,177,235,214,173,115,249,224,131, 15,204,181, 90, 45, 59,119,238,220,119, 8, 33, 95, 83, 74,143,214, 70,187,125,
- 75,210,182,113,125,231,175,166,142,232,138,207, 87,236,157,218,177, 57,201, 50,147, 9,183,188,223,169,129, 85, 83, 79,107,124,
-189, 53,116, 26,128,159,106, 81, 86,226,230,230,214,210,209,209,177,190, 74,165, 50, 2, 64,211,166, 77, 41,143,247,178, 95,210,
-233,116,186, 71,143, 30,157,124,221,186,249, 92, 34,105,211, 73, 38, 61,247,197,196,113,102,185, 89, 89,142, 91, 15, 30,142, 56,
-232,224,224, 55, 24,136,127,155, 26, 4, 30,143,183,236,244,233,211,206,148, 82,244,236,217,115, 25,128, 55, 98,176, 40,165,178,
-212,212,212,242,107,160,172,150, 95,175, 23, 30, 30, 94,110,168,234,213,226, 61,147,105,215,174,157,196,160,211, 77,230, 49, 76,
- 15, 10, 52, 71,233, 73, 29,105, 4,206,241,249,252, 31,194,194,194,212,111,187, 25, 56,119,238, 28,198,143, 31,143,200,200,200,
-198, 39, 79,158,220,172, 80, 40,166,164,166,166,118,161,148,102,114, 86,233,191,104,176,154, 18,226,208, 47,160,241,213,201, 31,
- 13,150,178, 7,215, 19,140, 94, 80,173, 17,114,118,118, 94,213,169, 83,167,177,187,118,237,146,253,241,199, 31, 50, 15, 15, 15,
- 8,133, 66,240,120, 60,240,120, 60, 48, 12, 3, 62,159,143,119,223,125,215,164,134,235, 85,205, 11, 23, 46,200,188,189,189,255,
-210,200, 50, 12,131,222,189,123,215,168,201, 48,140,235,221,187,119, 29, 36, 18, 73,133, 73, 97, 89,246,165,199, 11,253,208, 48,
- 24, 12,232,212,169,147, 73,117,197, 48,204,188,232,232,232,119,138,139,139,171,237,187, 45,211, 59, 83,131,150,226,250,213, 11,
- 14, 68, 23, 7, 24,114, 64,121, 54,128,200, 19, 96,196,149,126, 62, 39, 39, 7, 93,186,116,225,189,206,190,238,219,183, 31,161,
-148, 30, 81, 40, 20, 23,178,178,178,204, 9,193,135,117,140,108,125, 17, 19, 19, 99, 78, 41, 69,227,198,141,231, 1,168,149,193,
-226,241,120,174,103,207,158,117, 16,139,197, 21,251,185,170,191, 70,163, 17, 58,157, 14,189,122,245, 50,212, 96,106,241,195,214,
- 95,252,213, 26, 61,212,212, 3, 15,163,139,113,234,212, 17,212, 47,214, 35,246,129, 26, 44,171,128,186, 48, 3,148, 82,168,212,
- 90,180, 8,122,223,159,101,223,158, 0,169,165,165,229,224,117,235,214,217,255,244,211, 79, 5,143, 31, 63,214,253,248,227,143,
-246, 19, 38, 76,240,209,233,116,152, 56,113, 98,102,227,198,141,133,235,214,173,179, 63,114,228, 72, 79, 0,181, 50, 88,124,130,
-111, 62, 28,208, 3,106, 61, 3,189,222, 96,239,108,111,254,251,244, 81, 65, 2, 74,181,216,121, 52, 28,122, 3,251, 75,109,205,
- 85,239,222,189,221,183,108,217,194,143,142,142,230, 55,105,210, 4, 70,163,177,226,193,178, 44,140, 70,163,201,231,101,117,140,
- 5,188,157,172,173,207,181,233,211,215,204, 73, 38,133,248,249, 83,244,183,150,153,159, 76,205,218, 5,160,253,219,214, 40,240,
-120, 60, 36, 37, 37,193,210,210,210, 44, 40, 40, 40,149, 16,178,248,210,165, 75,219,254,142,223,122,157,200,214,155, 34, 32, 32,
-160, 53,159, 97, 14, 45,156, 63,213,201,175,101, 75,158,131,163, 61, 98,158, 36, 66,200, 99,131,159, 62,138, 9, 90,254,237,150,
-233, 1, 1, 1,239,135,135,135,223,122,219,246,181,251,160,159, 54,179, 6,221,164,210,103, 86, 0,182,161,176,176, 16,159,124,
-242, 9,142, 30, 61,218,164,109,219,182, 43, 75, 79, 1,142,255,138,193,242, 37, 68,214,194,195, 41,228,155,207, 39, 88,211, 83,
-191, 50, 37,217, 25, 16, 86, 99,132,156,156,156,150,118,234,212,233,163, 93,187,118, 89, 19, 66,112,110,234, 88, 88,235,212, 80,
-124,181, 26,214,118,246,208,206, 27, 15,115,163, 1,126,151, 34, 76,189,216,254, 69,243,241,227,199,200,205,205,133,157,157, 29,
-164, 82, 41, 36, 18, 9,132, 66, 33, 68, 34,145,169,154,144, 72, 36, 56,127,254, 60,248,124, 62,120, 60, 30,248,124,126,197,227,
-197,231, 60, 30, 15,142,142,166, 15, 77, 98, 89,118,165,143,143,143, 95, 76, 76,140, 69, 94, 94, 30,218,182,109, 91, 64, 8,137,
-120,225, 78,207, 47, 34, 34,194,194,228,198, 70, 23,135,162,196, 31, 65,115, 15, 1, 86,131, 96,180, 24, 10, 53, 60, 43, 26,152,
- 23,255,178, 44, 91,151, 59,207,116, 66,200,234,254,253,251,205, 3, 8,130,131,131,139,166, 78,157, 74, 31, 63,126,220,227,189,
-247, 6,212,127,242,228,105,153,217, 35,115, 8, 33, 27, 76,141,100, 81, 74,197, 0,112,245,234, 85, 80, 74, 37,117, 57,246,196,
- 98, 49,194,194,194, 42, 34,148, 12,195,128, 97, 24,240,120, 60, 28,123,106,135, 98, 45,131,146,244, 7,248,180, 95, 61,120,122,
-122,254,197,112,255,101,223, 80,138, 41, 19,198,222, 93,178,106,189,191,209,104,196,169, 83,167,176,118,237, 90,104, 52, 26, 4,
-117,235,129,231,180, 5,154,121,218,129,101, 89,168,212, 90, 68, 92, 62,116, 87, 81,207,211,255,109,185, 24,228,231,231,255,238,
-237,237,205,203,204,204,188, 8, 32, 78,175,215,111,250,253,247,223, 29, 62,254,248,227,140, 93,187,118, 77, 5,224,182,102,205,
-154,158, 69, 69, 69,251,106,163,219,169, 5,233, 19,216,178, 89,219,122,110,110,184, 28,122, 11, 66,145,192,106,242,232,126,144,
-203,249,248,246,167, 19,108, 66,114,206,212,171,247,233, 14, 19,207, 77,226,236,236,236,215,163, 71, 15,183, 45, 91,182, 8, 1,
-224,193,131, 7,200,200,200,128,173,173, 45, 36, 18, 9, 4, 2, 65,197, 13,219, 27, 49, 87,118,118, 55, 15, 30, 60,104, 6,189,
- 30,155,190, 93,141,126,170,124,152, 17, 64, 11, 82,255,109,106, 12, 2, 2, 2,188,187,116,233, 34, 49, 26,141, 40, 46, 46,198,
-150, 45, 91, 44,205,204,204, 44,123,247,238,189, 8,128,201, 6,171,125,251,246,233, 90,173,214, 1, 0, 68, 34, 81, 70,104,104,
-168, 35,128,146,250,245,235,155,149,125, 68, 85,203,200, 86,226, 11,209,169,196, 90,188, 87, 35,129,129,129,173,154,120,215, 63,
-191, 98,197, 98,121, 94, 65, 26, 44, 45,211,193, 32, 15,219,182,253, 0, 51, 51, 11, 44, 90, 52,159, 31,216,166,141,203,244,207,
-230,159, 15, 8, 8, 8,126,219, 76, 22,107,208, 77,106, 17,248,159,123,132, 29,231, 54, 66, 99,233,143,148,197,139,177,126,253,
-122, 52,106,212,168, 53,103,147,254, 75, 6, 43,136, 16,190,171,141,252,216,230, 69,211,235, 51, 97,199, 5,170,196,167, 80,170,
-141,176,250,207,201,115,254,197, 11, 35, 0,198,209,209,113,242,158, 61,123, 44,202, 27,187,198,196, 8, 43,232, 80,191,105, 83,
- 72, 45,173,144,102,208,129,234,117, 16, 10, 4,149, 54,136,166,104,150, 71,192,132, 66, 33,132, 66, 97,197, 5, 87, 40, 20,214,
-168,249, 82,229,240,249, 96, 24, 6,231,206,157,131,193, 96,192,224,193,131,255, 98,174,248,124,254, 75, 93,144, 53,105,166,166,
-166,158,113,113,113,137,160,148,190, 99, 52, 26, 65, 8,137, 72, 73, 73,233, 92,254,190,179,179,115,207, 22, 45, 90,204, 99, 89,
-118,165, 73,229, 52,100,131,230,236,129,121,187, 44, 20,132,217,129,200,130,193, 18, 15, 68, 62, 73,197,197,219,241,200,204, 45,
- 70,128,183, 61,122,182,111, 0,163,209,104,242,182,191,136,139,139,203,213,204,204,172, 33, 93,187,118, 69, 78, 78,142, 97,241,
-226,197,104,209,162, 5,188,189,189,171, 50, 79, 53,106, 18, 66,148, 17, 17, 17, 30, 42,149, 10,132, 16,165, 9,134,236,124,101,
- 70,248,247,223,127,135, 90,253,215,232,189,117,231,229,248,124,144, 59,198,124,186, 3,171, 31,239,199,230,205,155,241,234, 16,
-157, 87, 53, 89,150,197,146,149,235,253, 85, 26,109, 69, 93,105, 52, 26,132,133,133, 65, 83, 82,136, 75,187,198, 85, 68, 47, 85,
-106, 45, 92,253,186,251,215,164,249, 38,248,255,210,164,148,134, 0, 8,121,161,126, 23,236,218,181,107, 8,128,195,148,210, 80,
- 0,161, 0,246,214,186,156, 4, 99, 62, 24,244, 30,248, 66,115, 60,122,154,140,206,237,252,225,232,224,128,136,232, 88, 36,164,
-228,164, 19,130,209,189, 58,136, 87,170, 84,218, 5, 87,238,209,159,107,210,116,118,118,246,220,182,109,155,224,197,136, 11,143,
-199,123,233, 92, 47,127,173, 50,147,101,106,125,142, 5,188, 93,172,173,111, 30,253,242, 75, 89,218,175,191, 34,191, 99, 71, 8,
- 90,183,197,246,115,167,145,153,171, 82,107,141,108,183,183, 97,191,151,155,171,160,160,160,208,165, 75,151, 90, 37, 37, 37,225,
-250,245,235,240,240,240, 64, 73, 73, 9,106, 26,218,246,170,166, 86,171,117,120,161,219,206, 1, 0,210,210,210,246,226, 63, 93,
-233,180, 54,229,172,110, 92, 85,109,198, 92,189, 90,206, 6, 13, 26,136,236,172,173, 15,172, 92,181, 68, 30, 21,125, 5, 45, 91,
-180,133,220,210, 23,172, 49, 13,217, 57, 69,200,125,170,196,210,165,171,177,104,241,151, 88,189,106,169,124,232,176, 49,135,218,
-181,107,215,240,197,238,194,255,245,253,206,240,133, 91,238,223, 9,157, 4, 0, 5,209,135, 49,125, 88,123, 20, 22, 62,197,196,
-137, 11,145,146,146,130, 39, 79,158,132,255,127,150,147, 51, 88, 47,152,155, 64,177, 96,247,222, 69, 83, 91,139,227, 35, 69,154,
- 7, 97, 80,106, 88,250, 91,146, 33,229,219,106,190, 87, 82, 82,162, 61,122,244, 40,206, 78, 25,139,134,196, 0,155,175,214,192,
-209,197, 5,121, 99,222, 69,161, 94,135, 6,167,110, 65, 44,151, 67, 36,147,215, 24,113,120, 81,243,210,165, 75,120,248,240, 33,
-248,124, 62,228,114, 57,228,114, 57,196, 98, 49, 68, 34, 81,133,185,170,202, 96, 85,113,240,128,199,227,225,193,131, 7, 72, 72,
- 72,128,149,149, 21,174, 95,191,142,110,221,186,253, 37,138, 85,199, 3,190,210,136, 82,217,184,171, 51,166,106, 64, 96, 7,216,
-124,132,194, 27, 10,192,122, 4,244,176,130,209,104,196,189,167,217, 24,255, 81, 95, 0,192,228, 5, 63, 34,184, 77,253, 10,115,
- 80,139,240,189, 25,128, 57,141, 26, 53, 26, 58,124,248,112,131, 80, 40, 68,113,113, 49, 84, 42, 21, 30, 60,120, 96,232,219,183,
- 95, 81,255,254,253,228, 39, 78,156, 96, 41,197,234, 90,142,195, 74, 87, 40, 20, 30,101,221,176,233,117, 56,254, 64, 8,193,254,
-253,251, 43,125,127,244,218, 40,240, 75,135,103, 97,203,150, 45, 48, 26,141,160,148,146,154,234,243,171,121, 51,238, 78,159,187,
-196,159,101, 89,116,235,214, 13,179,102,205,194,179,103,207, 48,100,200,144,138,104, 32,165, 20, 42,141, 6, 41,145,231,239, 58,
-187,213,247,127, 91, 47, 14,148,210,147, 0, 78,190,190, 16, 92, 28,156,220,192, 80, 61,148, 25,217,120,175,111, 15,240,132,114,
- 60, 79,202, 66, 11, 95, 47,231,225,239,118,112,230, 17, 3,230,172,220, 51, 25,192,207, 38,156,239,198,232,232,104,193,253,251,
-247,193,227,241, 96, 97, 97, 1,169, 84, 90,113,142,191,104,184, 94, 39,114,229, 98,109,125,243,207, 69,139,100, 13,175, 95, 71,
-195,131, 7,177,236,202, 21,168,122,247,198,190, 71, 79,212, 40, 41, 9,254, 86,173,142,249, 95,222,191,221,187,119,159, 0, 96,
- 17,165, 52, 47, 40, 40,200,113,217,178,101,214, 41, 41, 41,136,138,138,194,254,253,251, 51, 13, 6,131, 1, 0,161,148,126,253,
- 6,142, 37,246,197,200, 86,251,246,237, 51, 66, 67, 67, 29, 9, 33,197,229,145, 43, 66, 72,113, 29,162,110,130,130,188,212, 79,
-173,101,116, 0,159, 49,175,111, 40, 40,122,158,107, 96,142, 90,216, 59,126, 31, 30, 30,174,175,238,187,150,150,150,159, 44, 91,
- 50, 83, 97,103,199, 34,168,115, 87,164,166,235,176,124,230, 40,100,103, 23,226,231,237, 43, 0,136,160, 51,240,240, 78,208,251,
-112,112,112, 65,167,142,157,156, 46, 95,187, 58, 5,192,183,111,203, 57,158,112,248,147,201,132,144,111,234,213,171,119,249,199,
- 21, 43, 26,118,235, 86,122,207,112,225,194, 5,252, 50,108, 24, 22, 3, 35, 55, 18,146, 58,237, 45,157,216,244,143, 53, 88,245,
-197,242,203,219, 62, 27,210,214,214, 88, 34,208, 94, 59,134, 20, 13,107,248,246,169,174,228,118, 30, 29,246,109,229, 39, 24, 37,
-132,176,132, 16,214,211,211, 19, 22,122, 53,172,168, 22,142, 10, 5,204,109,108,145,163, 47,141, 92,137,100, 50,136,100,114,147,
- 46,142, 47,106,250,250,250, 34, 61, 61, 29, 34,145, 8,114,185, 28,230,230,230,127, 49, 87,166, 94,112, 9, 33, 96, 89, 22,124,
- 62, 31, 17, 17, 17,232,216,177, 35,220,220,220,176,127,255,126,244,236,217,243, 47, 93,134,166,154,182, 87, 27,243, 23, 35, 74,
-229,131,223, 77, 25,220,254, 18,162, 6, 48,152,127, 0, 70,218, 13,122, 88, 66,205, 58,149,118, 7, 82,138,147,183,210,241, 56,
- 33, 27,172,145,173,117, 23,161,179,179,115,128, 68, 34, 89, 61,111,222, 92, 69,139, 22, 45,144,153,153, 5,150,101, 33,151,203,
-161, 82,169, 96,110,110,142, 14, 29, 58,164, 45, 94,188, 56,142, 82,244,166,148,166,253, 55, 14,224,179,103,207,190,212, 61, 88,
-254, 40, 78, 77,198,152,105,187, 32,226, 3, 17, 17, 17,240,241,241,169, 57, 92,206, 82, 76,155,251,181,191, 90,163,133, 72, 36,
- 66,251,246,237,209,182,109,219,138,113,113,229, 6, 85,167,211,193,104,100,225,228,219,213,159,188,133, 23, 5, 66, 72, 43, 0,
- 31, 91, 90, 90,122,148,148,148,164,233,245,250,253,101,166,191,167, 64, 32,248, 64, 42,149, 58,229,231,231,199, 3,248,153, 82,
-122,187, 38, 61, 51,137,196, 86, 44,177, 0,107,208,128,207,231,195,205,173, 62,168, 81,139,220, 2, 21, 70, 15,237,143,187, 17,
-209, 56,125,233,134, 65,175,103, 55,154, 90, 70,111,111,111,100,103,103,131,199,227, 65, 42,149, 66, 38,147,161,113,227,198, 72,
- 74, 74,170, 48, 87,117,237, 34, 44, 51, 87, 55,202,205, 21, 61,120, 16, 49, 50, 25, 60, 37, 18,124,249,235,175,197,185, 5, 5,
-109,126, 1, 98,222,130, 93,253,245,169, 83,167, 28,248,124,190,147,209,104, 68, 98, 98, 34, 30, 62,124,136, 13, 27, 54,164, 23,
- 22, 22, 6,133,135,135,215,105, 27, 69, 34, 81, 70,121,228, 74, 36, 18,101, 84, 23,217,122,157, 49, 87,174,174,174, 94, 46, 14,
-226,115,191,109,152, 90,207,175,101,107,198,140, 39,207, 45,126,150,222,241,214,141, 27,237, 23,252,124,112,138,171,171,107,143,
-228,228,228,103, 85, 54,126, 12,211,187,133,127, 75, 62,104, 26,248,162,142, 88,189,106, 40, 50,179, 10,144,155, 83, 8,161, 80,
- 6,173,158, 7, 35, 75,208,190, 99, 39,252,186, 99, 31,154, 54,109,198,227, 1,221,223, 38,131, 85, 22, 1, 94,249,199, 31,127,
- 52,148, 72, 36, 88,182,108, 25,204,205,205,113,227,155,111,240,139, 80, 8, 51, 0, 91,116,186,121, 0, 56,131,245,255,101,176,
-100,142,141,135,237,253,168,123, 7, 95, 79, 23, 70,191,127, 3,146, 75, 12,234, 69,143,117,234, 71,133,244,221, 40, 74,175, 87,
-231, 43, 8, 33, 84, 40, 20,194,113,238, 55,112,111,214, 28,197,227, 7, 33, 71,175,131,215,137, 27, 16,203,229,120,212,221, 31,
- 84,171,197, 59,143, 50, 76, 53, 46,148, 16, 66, 1,192,222,222, 30, 66,161, 16, 18,137, 4, 98,177, 24, 98,177,184,194, 88,137,
- 68, 34,136, 68, 34,147,205, 16,203,178, 40, 44, 44,196,243,231,207, 49,126,252,120, 72,165, 82,148,133,186,225,238,238, 14, 62,
-159,143,148,148, 20, 92,188,120, 17,158,158,158, 16,137, 68,181,106,107, 95,104,176,253, 92, 92, 92, 46, 19, 66,252,238,220,185,
- 99, 17, 24, 24, 8, 83, 35, 88,165,173,161, 16, 26,184,131, 37,110, 47,141,181,210,235, 13, 47,109, 75,121,244,197,196,200, 85,
-247,134, 13, 27,110, 88,181,106, 21,227,234,234, 10,150,101, 97,109,109,141,146,146, 18,100,101,101,195,215,215, 23,110,110,110,
- 88,181,106, 21, 0,236,253,111,153, 43,160,180, 59,184,220, 96,189,104,180,166,189, 91, 15, 57, 57,114,240,120, 76,133, 97,174,
-113,159, 83,138,141,171, 22,221, 29, 62,126,150,255,140, 5,171,161,214,232,160,210,104,161,214,104,161,214,232,202,254,106, 81,
- 62,176, 61, 45,234,226, 91, 23,193, 34,132,244, 11, 14, 14,222,180,118,237, 90, 39, 39, 39, 39, 65,102,102,166,225,135, 31,126,
-232,249,195, 15, 63, 68, 77,153, 50,197,119,202,148, 41,214,246,246,246,252,180,180, 52,253,204,153, 51,123, 18, 66,230, 81, 74,
-247, 86,123,189,144,153,219,240,132, 50, 16,194,135,149,165, 53,248, 34, 25, 88, 3, 31, 70, 22,176,176,180, 71,232,221,131,184,
- 30, 89, 56, 33, 35, 27, 7, 76,185,169,106,214,172, 25,229,241,120,176,181,181,125,169,107, 16, 0, 28, 29, 29, 81, 80, 80, 0,
- 30,143, 87,241, 90, 93,204,213,177, 69,139,228, 13,202,205,149, 84,138, 8, 79, 79, 44, 75, 72,200,203, 42, 40,232,248,150,152,
-171,138, 27,135,184,184, 56,148,148,148, 32, 52, 52, 20,135, 14, 29,202,124,213, 92, 5, 7, 7,143,147,203,229,139, 85, 42,213,
-234, 51,103,206,108,168, 73,183,108,204,213, 27,163,178, 84, 12, 1, 1, 1, 2, 39, 91,222,153,179,135,215,185,155,179,247, 8,
-226, 63, 1,158, 20, 60,148,223,116,120,167, 91,171,190, 76,243,111,166,123,244,158,255,221,153,128,128,128,198, 85, 69,178, 40,
-165,254,102, 50, 57,128,116,132,223, 9,169, 48, 87,217, 57,249,208,232,120,208,104, 9,212, 58, 6, 93,131,123, 97,211,143,191,
- 35, 37, 61, 27,229, 51, 12,223, 38, 26, 53,106, 20,224,226,226,130, 25, 51,102, 64,189,103, 15,138, 0,244, 3,240,135, 78, 7,
- 0, 48, 7,102,113, 86,233,255,201, 96, 89, 57, 53,238,188, 96,238,244,245, 29,223,239,197,164,143,107,135,188, 34,141,102, 78,
-148,129, 77, 46,169,209, 92,129, 82, 74,125,124,124,192, 48, 12,228,150, 86, 48,179,176,128,250,133,200,149, 88,110, 14,170,213,
-130,213,105, 33, 52,241,226, 88,174, 73, 41,133,153,153, 25,132, 66,225, 75, 93,131,229,198,170, 54, 17, 44, 0,200,203,203,195,
-129, 3, 7,208,186,117,107, 72,165, 82,240,249,124,248,249,249, 33, 58, 58, 26, 94, 94, 94, 32,132,224,143, 63,254,192,192,129,
- 3,241,236,217, 51,248,250,250,202,235, 98,176,206,157, 59,103, 65, 41,125,135, 82,138,172,172,172, 58,237, 68,150,101, 81, 84,
- 84,132,179,103,207, 34, 53, 53, 21,142,142,142,200,205,147,194, 82,209,164,244,183, 94, 48, 89, 38, 50,185, 95,191,126, 12, 33,
- 4, 42,149, 10, 98,177, 24, 50,153, 28,230,230, 22,240,246,110,140,148,148, 20,244,232,209,195, 24, 27, 27,187, 71, 40, 20,110,
-172,109,121, 27, 52,104, 96,158,151,151,215,183,126,253,250, 66, 0, 48, 51, 51,235,231,225,225, 97, 25, 31, 31,159, 95, 75, 51,
- 80, 97,172, 8, 33, 21, 51, 80, 25,134, 1,159, 97,224,236,228, 80,241,188,108,219, 73, 77,245, 56,108,220, 44,127,214,168,197,
-206,181, 35, 65, 12,217, 48,192, 18, 26,184,192, 96,228, 85, 24, 88,153, 76,134,166,157, 63,120, 43, 35, 88, 66,161,112,212,246,
-237,219, 93,126,251,237,183,188,163, 71,143,230,183,105,211, 70,182,126,253,122,135, 77,155, 54,117,209,106,181,152, 49, 99, 70,
-198,205,155, 55,139, 7, 12, 24, 96,185,109,219, 54,151,134, 13, 27,190,139, 74,198,101, 17, 66,100, 0,134, 2,248, 40,168,181,
- 37, 63,175, 80, 5,214,160, 69, 92,252,115,228, 23,105,193, 26,117, 72, 76, 86,162, 72,109, 68,118, 78, 33,252,252,123,124, 31,
- 18, 18,242, 37, 33,100, 62,165,244,120, 77,229, 52, 26,141,184,113,227, 6,174, 95,191,142, 43, 87,174, 32, 33, 33,161,226, 61,
- 11, 11, 11,156, 59,119, 14, 93,186,116,121,163,230, 42,241, 45, 50, 87,101,215,160, 69, 61,122,244, 88,100,107,107, 43,217,184,
-113,163,165,187,187, 59, 12, 6,131,246,213,200, 85, 96, 96,224,130, 5, 11, 22, 56,191,247,222,123, 83, 1,108,168,235,239, 85,
- 21,217, 50,129,191,164, 98,200,204, 76, 27,247,253,246, 81,118, 50, 97,130, 18, 79,190,115, 41,139,197, 0, 37, 5, 64,200,110,
-144, 14, 11,159,143, 14,158,108,189,234,232,166,113, 0, 54, 87, 37, 28,251, 44, 9, 91,182,108,194,103, 51, 70,227,215,159, 87,
-131,101,249,208,232,121,168, 87,191, 45, 52, 58, 22,132,225,163,133,127, 32, 46,133, 92,133,128, 1,166, 79,184,249,214,153,128,
- 39, 79,158,220, 74, 72, 72,240, 89,184,112, 33,126,117,113,129,185,185, 57,102, 46, 90, 20,102, 48, 24,222,186, 25,178,255, 88,
-131, 21,224,237,245,141,165,141,245,216,246,173,154,216,206,156, 58, 78,240, 44, 77,141,139, 29,191,200, 59,184,106,174, 60,137,
-202,167, 36,208,188,235,181,137, 58, 24,150,204, 68,182, 81,139,250,199, 66, 33,150,203, 17,211, 51, 16, 84,171, 69,135,187, 9,
- 16,203,229,224, 75,204,234,114, 2,191,212, 29,248,234,115,134, 49, 45,113,189, 78,167,179,234,222,189, 59,186,117,235,134,247,
-223,127,191, 98,204, 85,203,150, 45,177,119,239, 94, 12, 26, 52, 8,247,238,221,131,179,179, 51,124,124,124,224,227,227,131,139,
- 23, 47,214,250,238,209,104, 52,162,103,207,158, 5,132,144, 8, 74,169,223,173, 91,183, 44,106,171, 81,222,216,156, 61,123, 22,
-125,251,246,133,151,151, 23,194,195,195,113,246,235,111, 33,181,169, 7,192, 10,172,209, 8,173, 86, 11,134, 97,106, 28,131, 21,
- 20, 20,196,231,241,120,141, 27, 52,104,128,204,204, 76,100,102,102,194,222,222, 30, 10,133, 2, 14, 14, 14, 88,187,118, 45,214,
-175, 95,127,139, 82,186, 50, 45, 45,237, 81,109,247,145, 66,161, 8,182,182,182,254, 86,165, 82, 9,203,203, 66, 8, 17, 56, 59,
- 59,135, 41, 20,138,121, 74,165,242, 88,109, 12,150, 78,167, 3, 33, 4, 39,226, 20, 40,214, 18, 20, 36,135, 99,250,187,238, 47,
- 25, 46,129, 64,240, 82, 90,141,170, 13, 22,197,158,237,223,221,157,247,197,199,254,200,217, 5, 67,246, 46, 16,235, 97, 56,244,
-176, 23,126,191,105, 11, 0,240,118, 98,240,221, 88,249, 91, 27,193,210,233,116,219, 26, 53,106, 4,173, 86,123, 1,192,246,136,
-136,136,129,169,169,169,235,254,252,243, 79,197,144, 33, 67,148,199,142, 29,251, 12,192,145,136,136,136, 49,203,150, 45,235,166,
-215,235,183, 85,209,237,240,235,204,153, 51,131,134, 12, 25, 66,132,140, 94,123,246,204, 14,190,193,160, 39,179,231,255,100, 12,
-185,118,153, 49, 24,244,228,253, 15,103,178, 39, 47, 70, 50, 19,166,173, 49,182,108,219, 23, 15, 30, 60,112,234,215,175,223, 82,
- 0, 38, 25, 44,129, 64, 80, 97,160, 43,249,253, 90,117, 17,126, 12,120,185, 90, 91,223, 56,182,120,177,220,235,218,181,151,205,
- 85, 98,226, 91,103,174, 0,224,194,133, 11, 91, 1,108, 13, 10, 10, 74,151,201,100, 40, 42, 42,250,203, 57,210,174, 93, 59,137,
- 66,161,144, 8, 4, 2,180,110,221,218,166,103,207,158, 49, 12,195,108, 56,117,234, 84,173,147, 80, 86, 22,217,170,107,154, 6,
-115,107,182, 95,203,182, 77,205, 31,155, 47, 54,151,240,213,247, 60, 98, 36, 22, 4, 64,190,198, 49, 46, 52, 97,104, 1,201, 16,
-183,108, 22,236, 1, 41, 35,233, 87,149,193, 34,132,220, 45,200,203,239, 93, 80,168,197,181,235, 15,240,225,208,134,208,232, 8,
- 88,150, 65, 81,177, 6,224, 9,192, 0, 24, 54,124, 20, 40,225, 35, 55, 43, 13, 4,136,124,219, 76,128,209,104,156, 55, 96,192,
-128, 86,203,150, 45,107, 50,115,230,204,242,253,210, 78,161, 80, 68,113,121,176,254, 31, 12, 86, 35, 47,215, 94,157, 91, 5, 78,
-251,114,254,151,230, 79,110, 93,193,151, 75,191,103, 27, 6,246,204, 95,185,231,143,194,124,121,189,110, 37,202, 71,247,106, 27,
-117, 16, 24,244,160, 6, 29,196,114,249, 75,145, 43,145, 76, 6,129,153,180, 86, 27, 65, 8, 1,165,244, 47,221,129, 47,154,171,
-218, 92,108, 69, 34, 81,222,213,171, 87, 29,146,147,147, 95, 26,208, 94,191,126,125, 16, 66,112,243,230, 77,220,184,113, 3, 31,
-126,248, 33,248,124, 62, 4, 2, 1, 34, 34, 34, 10,235, 18,193, 42,159, 69,232,236,236,220,179, 77,155, 54,149,206, 30, 52, 37,
-130,149,152,152, 8, 47, 47, 47,104, 52, 26, 88, 91, 91, 35, 39, 45, 14,207,158, 60, 66,137, 70, 15, 15, 7, 17,178,178,178, 80,
-158,215,171, 58, 46, 95,190, 76, 21, 10,197, 75,145,159,204,204, 76,120,122,122, 98,203,150, 45, 88,191,126,253,230,212,212,212,
- 90,223,197,186,184,184,216,176, 44,187,172, 95,191,126,253, 7, 14, 28,136,158, 61,123,190,244,254,174, 93,187, 44, 15, 31, 62,
-252,163,155,155,219, 64, 30,143, 55, 47, 62, 62, 62,189,166,125, 14, 0,191,252, 82,154, 62, 73,218,118, 17,230, 13,241,192, 71,
-147,119,224,187,239, 14, 67, 44, 22,191,212,216, 46, 89,178,164,230,122,164, 20,221,223,255,196,191,139,159, 22,198,236, 63, 96,
-209, 62, 23, 5,161,214,200, 47,244,199,205,181,125, 0, 0,205, 63, 62, 14, 74, 61, 0,224,173,140, 96, 81, 74,207, 1, 56,247,
-194, 75, 7, 9, 33,122, 66,200,112, 0,251, 40,165,135,203, 94,255, 9,213, 36, 6,109,219,182,109,203,249,243,231, 11,202,211,
-102, 40,234, 45, 51,232,116, 58, 22, 0, 26,251,189,243, 82, 95,245,211,167, 79,241,221,119,223,161,184,184, 24,194, 90,132,153,
-131,131,131, 43,198, 68, 10,133, 66,216,217,217, 65,167,211,193, 96, 48,212,122,252,149,157,171,235,247,119,174, 95, 55,138,126,
-216,160,162, 7, 15,154,197,152,153,189,213,230,234, 21, 22,245,233,211,103, 17,165,148,178, 44,187,240,133,155, 45,177,181,181,
-245,213,239,191,255,222,214, 96, 48, 96,214,172, 89, 86,217,217,217, 86, 19, 39, 78,156, 7,160, 74,131, 85, 69,154,134,170,142,
-183, 58,165,105, 96, 89,120,203,229, 22,200, 70, 50, 52,118,250,150,121,182,134,156,115,169,227,238, 41, 18,252,125,101, 70,189,
- 39, 83,160,133,165,196, 28,148, 82,239,170,126,219,192,178,167, 30, 69, 69,245,168,231,214,144,247,231,241, 43, 24, 48,112, 8,
- 52, 26, 6,106, 61, 1,225, 9, 64,120, 66, 52,247,243,135, 79, 83, 63, 80, 0, 49, 15, 35, 12,198,151,207,141,255,121,220, 7,
-253,180,217,181,255, 15,147, 0, 96,214,134, 11,248,242,155,117, 24,241,126, 79,140, 25, 51,134,203,131,245,255, 97,176,234,213,
-171,103,229, 32,151,254, 50,229,227,177,230, 9,247,195,144, 28, 17,134,235,215, 98,114,119, 31, 58,154, 82,144,159,249,113,109,
-204,213,139, 17, 44,175, 93, 39,224,226,236, 92, 17,185,106, 31, 30, 15,177, 92,142,144,230, 46, 96, 53, 26,244,120, 94, 80,235,
-141,169, 44,106, 37, 20, 10,235, 52,211,175,220, 84,189, 58,160,125,194,132, 9,216,190,125, 59, 58,116,232,128, 70,141, 26,213,
-250, 78,249, 69, 83,244,226,152,168,218,204, 30,172, 76,171, 94,189,122,136,140,140,132,165,165, 37,118,238,220, 9, 87, 87, 23,
-140,233,229, 5, 30,175,180,107,139, 97, 24,147,198, 96, 81, 74,141, 46, 46, 46,113,103,207,158,245, 28, 50,100, 8,132, 66, 33,
-114,115,115, 97, 97, 97,129, 77,155, 54,177, 82,169,244,215,218,150,207,205,205,109,140, 68, 34,249,122,232,208,161,252,198,141,
- 27, 35, 61, 61, 29,150,150,150,108,217,210, 70,176,177,177,102,165, 82, 41, 38, 76,152, 0, 63, 63,191,238,115,231,206,237,166,
- 80, 40, 86, 40,149,202, 31,106, 50, 89,123,247,150,246, 78,125,188,225, 17,180,218,210,161, 22,155, 55,111,134,179,179,243,203,
- 93, 1,177,177, 53,207, 34,100, 89,156, 59,244,211,221,201, 83,135,250, 19,235, 97, 40, 8,181, 6,181,252, 16,233, 69,230,216,
-117, 57, 3,151,239, 38, 84, 36, 26,125,219, 34, 88,132,144, 1, 40, 29,122,113,146, 82,122,132, 16, 50, 24, 64,207,242,231,168,
-101, 98, 81,131,193, 64, 25,134, 33, 73, 73, 73, 58,169, 84, 74,108,108,108,248, 98,177, 24, 26,141,166,194,104, 61,125,250, 20,
-199,143, 31, 71,114,114, 50,108,108,108, 24, 75, 75, 75,232,116,186, 92, 19,239,186,255,146,158,161,236,119,107,125, 62,142, 6,
-154,109, 94, 60,223, 67,197,207,181,204, 26,211, 21,236,189,235,170,200, 76,141,217,191,196, 92, 33, 36, 36,100, 43,128,173,229,
-207,187,118,237, 58,134,207,231,127, 9,192,114,219,182,109, 86, 86, 86, 86,228,216,177, 99,250,109,219,182,229,241,120,188, 92,
- 0,235,170,211,171,108, 48,251,235, 80, 89, 42, 6, 74, 17,149,147, 31,231, 46,176, 82,176,247,213, 52,116, 70,210, 60,159, 92,
- 65, 67,123,210,180, 25, 6,102, 68, 95, 27, 99,136,109,159,153,150,193, 80,208,168,170,116,243,243,243,127,250,117,199,129,217,
-251,247,253, 82, 79, 44, 23, 99,194,196,249, 56,113,250, 18, 8, 35,192,213,208,155,208,234,140,200,202,201,199,208, 97, 35,224,
-234,108, 7, 20,165,100, 10, 68,162, 31,222,166,125,255, 82, 30,172,192,246,184,126,120, 13,246,198,212, 67,202, 55,223,112,121,
-176,254, 78,131,229,225,225, 33,150, 9, 48,222,198, 76, 56,103,202,240,247,236, 51, 98, 31, 34, 57,250, 46, 0, 64,163, 81,233,
- 83, 99, 46,183, 48,225,162, 29,252,106,174,140,242,174, 27, 27,123,135,138,200,213,139,179, 7, 89,141, 6,172, 78, 11, 84,209,
-157, 83,149, 38,195, 48,127, 49, 86, 47, 94,120,107, 83,206,242,232, 72,101, 9, 70,221,220,220,176, 98,197,138,191,228,193, 50,
-165,156,101,119,105, 61, 9, 33,126,229,198,136, 82,234,231,236,236,220,211,148,153,131, 85,105,150,103,172, 62,117,234, 20,162,
-162,162, 64, 41, 69,191,126,253, 32, 16, 8, 96,110,110, 94, 97,178, 42, 27,131, 85,153, 38,195, 48,159, 28, 62,124,120,118, 88,
- 88, 88,175, 89,179,102,145,242,177, 44, 69, 69, 69,108,106,106,106, 97,109,203,201,178,236,156, 51,103,206,240,141, 70, 35,182,
-111,223,142,219,183,111, 83,169, 84,186, 82, 32, 16,172,144, 74,165, 6,189, 94,255,249,184,113,227, 38, 46, 94,188,152,233,212,
-169, 19,194,194,194, 24, 79, 79,207,169, 0,126,168,105,219,111,222,188, 89,218,229,156,147,136,201,243,246, 65,102,198,199,163,
- 71,143,144,147,147,243,151,228,163, 53,151,147,194,191,203, 16,127,150,234,160,147, 15, 1, 99,214,181,116,169,156,231, 26,180,
-242, 43,141, 58,170, 10, 50, 43,234,177,178, 8, 86, 85,229,124, 77,243,243,183,106, 18, 66,250, 55,105,210,228,139,168,168, 40,
-215,230,205,155,251, 18, 66,130,154, 53,107,214, 42, 50, 50,178,252,185,128, 82,186,191, 54,154,183,111,223, 62,184,105,211,166,
-137,163, 71,143, 22,178, 44,107, 76, 72, 72,208, 3, 32, 78, 78, 78,188,219,183,111,179,127,254,249, 39, 84, 42, 21, 92, 93, 93,
- 25, 23, 23, 23,114,238,220, 57, 54, 58, 58,250, 38,165,116,190,169,219, 94, 30,153, 22, 8, 4,224,241,120, 80,169, 84, 38,153,
-171, 87, 53,221, 27,121, 45,239,220,222,195, 45, 75, 25,129,132,132,120, 36, 6, 54,212,111,222,124,188, 86,230,234,127,113,191,
- 87,115,115,185,228,208,161, 67, 46, 26,141, 6, 66,161, 16, 7, 14, 28,208,237,216,177, 35, 42, 63, 63,191, 99,120,120,184,170,
-174,229,172, 77, 2,210,154, 52,139,242,120, 39, 78,159,121,208,138,215,235, 39, 76, 86,102,118,172, 48, 94,132,216, 28,118,244,
-237, 40,109,221, 60,197,252,202, 26,166, 4,234, 19, 85,105,198,198,198,106, 3, 3, 3,135,204,157,179,232,194,215, 75,191,150,
- 47, 92,180, 8,215,111, 70, 34, 59,175, 8, 44,229,129, 37, 4, 95,126,185, 16, 78,118, 54,176, 17,233, 75,178,139,201,192, 87,
-151,204,249, 95,223,239,175,147, 7,235,239, 40,231,191,198, 96,153,243,241,160,163,175,151, 75, 39,255,166, 18,190, 81,133,228,
-232, 88,228, 20,171,113,238, 97, 66, 30, 67,153, 95, 95,231, 71,121, 60, 30, 44, 45, 45, 33, 20, 10,209, 46, 50, 5, 34,161, 16,
- 98,185, 57, 0,148, 70,174, 40, 5, 35, 18,215,246, 0,170,212, 96,213, 21,163,209, 8, 71, 71,199,151,150, 93,121,177,193, 46,
- 55,138,181, 77,209,192, 48,204,188,176,176, 48,139,196,196, 68, 80, 74,113,228,200, 17,139, 65,131, 6,205,171, 75,244,138, 82,
-138,236,236,108,176, 44, 11,177, 88,140, 94,189,122,161, 83,167, 78,208,149,205,254, 40,111,128,106,155,201, 61, 41, 41, 41, 21,
-192,103,174,174,174,191,206,158, 61,123, 78,155, 54,109, 2, 23, 47, 94, 12, 82,139,133,113, 95, 65,103, 52, 26,113,249,242,101,
- 28, 62,124,216,160, 86,171, 7,165,165,165,221,121,225,253,165,174,174,174,127, 14, 26, 52,232,228,227,199,143,249, 81, 81, 81,
- 0, 96,168, 73, 84,165, 82,161, 81,163, 70, 48, 24, 12, 88, 53,217, 13,133,133,205, 97, 48, 24, 96, 52, 26, 33,147,201, 94,202,
-251,101,202,126, 98, 41,139,187,151, 14,220,117,111,217,211,191,166,165,114,222,178, 8, 86,175,168,168, 40,215,225,195,135,103,
- 68, 70, 70,186, 30, 63,126,220,170, 95,191,126,178, 97,195,134,101, 68, 70, 70,186, 18, 66,222, 1,176,191,150,231,207, 23,132,
-144,211,203,151, 47,159, 55,109,218,180, 54,163, 71,143, 22, 8, 4, 2, 54, 37, 37,197,176,103,207, 30,210,168, 81, 35, 70, 40,
- 20,146, 51,103,206,176,183,110,221,186, 97, 48, 24, 86, 81, 74,175,214,246, 58, 82,110,174,234, 26, 73, 94, 7,140,106,156,152,
-220,113,255,146, 53,140,160,137,179,238,216,169,155, 73,119,239, 60,127, 6,157,113,198, 47,192,179,127,105,187,176,127,200,144,
- 33, 99, 6, 13, 26,100,214,186,117,107,241, 79, 63,253,148, 95, 82, 82, 82,169,185,170,140,218,164,105,168,109, 2,210,114,148,
- 74,229,207, 43,150, 92,153,241,145,207, 48,175, 79,236, 60,112,190, 56, 3,185,124, 30, 99, 97,197,192,223,157, 7, 85,222,115,
-251, 11, 55, 15, 61, 79, 85, 42,171,205,171,118,231,206,157,219, 1, 1, 1,193, 31,125, 52,230,208,132,143,199, 57, 44,252, 98,
-174,224,224,159, 39, 1,131, 14,183,174, 94,133,149,148, 80, 67,113,106,122,182,150,188,247, 54, 46,149,147,112,248,147,201, 0,
- 38, 19, 66, 62, 92,180,104,209,158,201,147, 39,131,101, 89,132,132,132,224,135,185,115,177,216,104, 28,185,145,144,146,105,148,
- 78,230,236,210, 27, 52, 88, 96, 72,225,141, 39, 9, 69, 55,159, 36, 20,129,165,148,165, 84,195, 48, 72, 42,214,233,150,199, 60,
- 75, 62,243, 58,251,180, 87,175, 94,204,171,198,165,138,110, 6, 83, 7,215, 37, 4, 7, 7,191, 49, 77,150,101,147, 59,118,236,
-248,151,134,185,170,255,203,116,147, 77, 10,201,178,236,202,118,237,218,253,229,181, 58,133,119, 89, 54,174, 91,183,110,186, 87,
- 77, 87,117,207,141, 70, 99,178,169,250,201,201,201, 15, 0,140,112,113,113,233,210,179,103,207,169, 0,234,154,142, 97,109,151,
- 46, 93,102, 82, 74,249,132,144, 53,175,152,171,242,223,122,232,226,226,178,208,211,211,179, 98, 1,232,154,182, 61, 56, 56, 88,
- 87,211, 34,207, 47, 14,128,102, 89, 54,185,122, 77,138,122, 45,122,248,235,244,165, 38,173,186,165,114,170,138, 96,253,143,178,
-143, 16, 34, 0,144, 27, 21, 21,245, 78, 89,228, 42,249,193,131, 7,231,247,238,221,235, 8,212,156, 62,161,138, 27,128,171, 0,
-174, 18, 66, 58,109,222,188,249,139, 9, 19, 38,180,254,240,195, 15,249, 65, 65, 65, 56,113,226,132, 49, 36, 36,228,166, 74,165,
- 90, 89, 91, 99, 69, 8, 41,122,245, 28,170,166, 12,213, 46,210,235,205, 48,155, 86, 8,132,146,113, 7, 46, 23, 93, 22,146, 80,
-163,202, 48,255, 55,224,193,191,185, 81, 56,119,238,220,231,237,218,181, 91,120,224,192, 1,165,151,151,151, 88, 32, 16,104, 77,
- 53, 87, 64,237,210, 52, 80, 74,217, 58, 30, 91, 6, 71, 71,199, 62,187,134, 79, 62,218, 98,202,232,250,189, 58, 4, 74, 93, 60,
- 28, 92, 30, 63,207, 66,114,228,249,226,103, 33,155,226,141,234,156, 1,148,210, 26,111,212,194,195,195,111,181,107,215,174,225,
-230,109, 63, 78,230, 49, 76, 15,131,209,232, 55,115,242, 8, 74,128, 72, 22, 56, 39, 20,139,222,250,197,158,197, 66,225,200, 41,
- 83,166,224,247,223,127,199,145,245,235,209, 51, 57, 25,123,133, 66,152, 9,133,216,162,211, 77, 2,192, 25,172, 55,105,176, 34,
-159, 60, 15,248, 59,126, 48, 42, 42,170,221, 63, 93, 51, 42, 42, 42,240,239,170,240,215, 25,107, 85, 73, 57,255, 95,166,209,166,
-164,164, 92, 2,112,233, 53,190,191, 3, 38, 44,230,108,234,231, 0,224,209,163, 71,111,124,219,169,216,114, 72,226,253,179,121,
- 78, 77,186, 90, 25, 12, 6, 16, 66,160, 86,171,113,227,198, 13,104, 74, 10, 17,178,123,124, 69, 38,119, 80, 32, 45,250, 98,158,
- 83,253,102, 86,255,235, 23, 1, 74,233, 21, 0, 87,202,204,203, 64, 66, 72, 31, 0,103, 40,165, 7,223,144,126,133,209,218,182,
-109,219, 12, 74, 41, 10, 10, 10,214,215,214, 88, 85, 92,155, 34, 35, 47,190,169,109,143,103,217,139, 11, 75, 74,186,102,179,236,
-140,159, 13,181, 91,112,252,109, 38, 44, 44, 76,221,173, 91,183, 95,151, 45, 91,214,150,101,217,223,222,132,230,107,164,105,168,
-148,244,244,244,231,132,144, 22,236, 55, 27,198,134, 91,153,247,165,122,166, 49,209,243,143, 17,109,246,137,180,180,180, 95, 40,
-165,198,218,108,111,217, 77,221,119,255,198,253,125, 63, 50,178, 39, 0,244,238,221, 27,170, 89,165,105,175,118,252, 39, 15,214,
- 22,238,140,120,211, 17, 44, 14,142,127, 25, 41, 49,225, 7, 1, 32, 45,186,180,253,254,254,251,239, 1, 0, 61,123,246,252,203,
-172,199,242,207,164, 61,127,187,130, 29,101, 3,218,143,252, 77,218, 87, 1, 92,253, 39,109,111, 8,165,253,184, 35,191,114, 46,
- 92,184,240, 70, 19, 76,190,233, 4,164,101,199,148, 17,192,246,178, 7, 71, 29,241,246,246, 38, 0, 96,103,103,135, 5,181, 88,
- 78,141,163,122, 24,174, 10, 56, 56, 56, 56, 56, 56, 56, 56,222, 44, 4, 64,112, 21,119, 6, 38,207, 14, 32,132, 4,215,225,206,
-227, 60,167,201,105,114,154,156, 38,167,201,105,114,154,255, 46,205,154,180,223,154,217,137,229, 25,174,255,142, 7,128, 96, 78,
-147,211,228, 52, 57, 77, 78,147,211,228, 52, 57,205,127,219,163,154, 49, 88, 7,121, 41, 41,176, 16,137,164, 66, 0,208,106, 75,
-116, 46, 46, 40, 0, 6, 27,193,193, 81,155, 48, 41, 33,142,101,102, 62,253, 77,126,150,131,131,131,131,131,227,159, 10,191, 42,
-115,149,149, 37,181,227,243,115,189,141, 70,181, 15, 0,240,249,204,163,172, 44,235, 24, 59,187,131, 89,111,218,100,245,238,221,
-123, 62,165,212, 81, 32, 16,156,112,114,114, 10,217,186,117,171,254,223,108, 52, 94,199,100,252,127, 24, 20, 91, 91, 91,133,163,
-163,227,112, 43, 43,171,160,252,252,252,171,105,105,105, 59,179,179,179,149, 85,148,103, 5, 33,152, 83,246,255,106, 74,233, 23,
-213,148,221,228,207,190,138, 66,161,104, 36,145, 72, 38, 51, 12,211, 12, 0, 88,150,125,160, 86,171, 55, 43,149,202, 39,255,182,
-147, 90,161, 80,152, 81, 74,223, 19, 8, 4,163,108,108,108, 90,103,102,102, 46, 78, 73, 73, 89, 87,199, 99,150, 15, 96,150,149,
-149,213,135, 86, 86, 86,158, 57, 57, 57,207, 10, 10, 10,246, 3,248,142, 82, 90,227,121,250,245,116, 69,187,160,158, 65, 11, 66,
-206,132, 44, 93,180, 65, 25,246,151,247, 63, 87,216,246,232,222, 97, 97,200,177,208, 37, 95,108, 74,201,169,101,217, 24,252,103,
- 28, 41, 91,122,216,255,115, 71,232, 58, 56, 56,180, 45, 75,164,202, 48, 12,243, 93,122,122,250,165,127,242,113,100,111,111, 47,
-115,114,114, 90, 69, 8,233,207,227,241,162,210,211,211,199, 43,149,202,228, 55,116, 45,100,220,221,221,205, 19, 18, 18, 10,235,
-154,170,225,223, 72,187,118,237,210,117, 58, 93,181,217,241,133, 66, 97, 70, 88, 88,152, 35, 87, 91,255, 80,131,149,146, 2, 11,
- 62, 63,215, 59, 35, 45,114,168, 50, 53,226, 3, 0, 80, 56,251,237,119,112,106,190, 47, 37, 69,164,107,213,125,144, 92, 32,229,
-111,230,241, 4, 45,213, 90,141,157,128, 47,200,210, 25,244,247, 24, 45,157,156,250,232,112,162, 41, 63,220,191,127,127,111, 0,
-150,254,254,254,183,181, 90,109,235,117,235,214, 57, 31, 58,116,200, 47, 60, 60,124,216,187,239,190,123,140, 82,122,230,216,177,
- 99,170, 90,157,180, 65, 65,124,135, 60,155,145, 60, 62,191, 63, 0, 63, 74, 1, 16, 94, 4,171,211,158,204, 16,218,252, 70,195,
-235,110,220,218, 53,178,245, 38, 84, 55, 91, 64,104, 39, 61, 37, 87, 41, 17,174, 9,123,146, 29, 83,139, 11,138, 73,230,225,117,
- 76,198, 43,223, 93, 79, 41,157,245,166, 15, 24, 39, 39, 39,187,193,131, 7,239, 90,186,116,169,204,220,220,156,196,199,199, 15,
-252,226,139, 47,122, 42, 20,138,143,148, 74,101,210,171,102,143, 16,204, 97, 89,202, 0, 0,195,144,185,142,142,142,205,248,124,
-190,230, 85, 93,131,193, 32, 38, 4,189, 88,182,116, 57, 27,134, 33,115, 8, 33, 27, 76, 49,138,158,158,158,195,154,251,181,156,
-249,197,252,133,114,123, 7, 7,153,193, 96,212, 37,165, 36, 75,215,172,248,166,141,167,167,231,134,184,184,184, 61,181,221, 78,
- 66, 8,113,117,117, 29, 42, 16, 8,250, 1,104, 82,246,114,180, 94,175, 63,158,156,156,188,207,212,134,188, 69,139, 22, 87, 24,
-134,241,168,205,111, 27,141,198,196,136,136,136,142,117,217, 63, 46, 46, 46, 67, 92, 92, 92,126,105,219,182,173,180,101,203,150,
- 16, 10,133, 88,189,122,245, 44,212,176,188, 73,185,145,146, 74,165, 67,101, 50,153, 87, 81, 81, 81,172, 74,165, 58, 36, 18,137,
-130, 55,108,216,224,214,161, 67, 7,243,244,244,116,194,227,241, 28,143, 31, 63, 62,114,227,198,141, 61, 9, 33,221,106,202, 51,
-148, 31, 75, 23,136,251, 55,233,148, 31,123,105, 1,128,222,127,217,239,106,201, 40,202,115,235,167,162,119,147, 80,139, 41,242,
-132, 16,198,213,213,117,131,163,163,227, 24,149, 74,165, 38,132, 80, 66, 8,109,222,188,121,249,251, 0, 0,173, 86,155,251,248,
-241,227,198,213,105,213,111,103,115,135,199,240, 92,171,220, 31,172, 49,249,121, 88,206,107,167,110, 49, 26,141,115,162,162,162,
-250, 8, 4, 2,210,162, 69, 11, 30,106,145,250, 68,161, 80,120, 19, 66,190,164,148,222, 78, 77, 77,221, 92,182,164, 85, 23, 74,
-105,197,181,162, 44,157, 10, 92, 92, 92, 54, 55,108,216,240,221,167, 79,159,110, 73, 73, 73, 89,250, 26, 70,125,235,242,229,203,
- 63,232,217,179, 39, 47, 59, 59,219,165, 71,143, 30,187, 1,116,122,157, 58, 8, 8, 8, 16,164,165,165,205,106,209,162,197,167,
-173, 90,181,114,126,248,240, 97,154, 66,161,216,232,228,228,244, 93,120,120,120,141,215,103, 63, 63, 63, 5,159,207, 31, 3, 96,
- 36, 0, 30,165,116, 47,128,223,238,222,189,251,175, 72, 10,171,211,233, 28,206, 47, 93, 8,194,231, 67,210,177, 27, 88,150, 69,
-214,154, 69, 48,228,100,193,110,233, 70, 24, 12, 6, 4, 7, 7, 59,128,227,159,107,176, 68, 34,169,208,104, 84,251, 40, 83, 35,
- 62,120,167,243,247,150, 0,112,229,242,167, 31, 56, 56, 53,125, 32, 18, 73, 99,196, 22,146,195,131,250, 7,183, 28,220,175, 51,
-113,117,118, 64,114,106,134,227,207,123,207,244, 58,126,230,210, 97, 0, 38,229,207, 42, 40, 40, 88,230,238,238,110,127,225,194,
-133,120,145, 72,100, 38,145, 72,200,144, 33, 67,204,134, 13, 27,230,123,241,226, 69,175,211,167, 79, 15, 30, 48, 96,192,105,161,
- 80,120,226,192,129, 3, 53,174, 79,230,216,124,160,175, 19,223,233,224,128,247,122,123,244,237,238, 32,114,119,178, 7,101, 37,
-120, 20,167,171,119,238,234,221, 94, 39, 78,157,153,227,224, 59,240,253,140,168, 35, 38,175,134,222,172,153,165,149,153,138,206,
- 52, 19,210, 15,123,181,241,173,223,191,123,123,226,233,233,137,152,199, 49, 94,151,174,223, 30,211,197,199,252,185, 74, 71,246,
-170,204,200,218, 7, 15,242,243,170,139, 42,189,104, 52,120, 60,102, 94,247,238,221,199,136,197,226,151,238,220, 52, 26, 13,195,
- 48,196,193,104, 44,125,185, 54, 38,163,252, 55,180, 90, 13, 35, 16,136,192,227, 49, 51, 91,182,108,217, 59, 61, 61,253,148, 88,
- 44, 94,253,252,249,243, 90,229,157,153, 70,136, 40,151,207, 15, 96,196, 98,103,163, 86,107, 11, 0, 68, 36,202,173,103,107,219,
-246,171,175,190,146,243,120, 60,100,103,103, 67,173, 86,147, 79, 62,249,196, 44, 54, 54,118, 52,128, 37, 53,153,150, 29, 59,118,
-248,219,218,218,254,229,142, 53, 59, 59,155,233,221,187, 87,173,243,118, 42, 20, 10,239, 22,254,129,159,237,217,189,171, 73, 65,
- 78,174,122,251,186,173,225,122,137, 84,227,217,164,177,224,155, 21,107, 45, 23,204,157,249,169, 66,161,184,167, 84, 42, 77, 54,
-195,206,206,206,245, 60, 60, 60, 14,207,159, 63,191, 89,199,142, 29, 5, 14, 14, 14, 72, 79, 79,199,227,199,143,155, 93,191,126,
-253,189, 63,254,248, 99,150,179,179,243,160,212,212,212, 26,111, 38, 40,165,141,142,174, 89,225, 32,182,177, 5,171,215,195,198,
-207,191, 34,249,107,234,165,179, 48,234,116, 96,245,122,184,245,125, 15,101,145, 55,116,237,218,181, 78, 25,243, 93, 93, 93, 21,
-222,222,222,191,207,155, 55, 79,168,213,106,113,247,238, 93,132,133,133,177, 25, 25, 25, 43,107, 50, 87,132,144,179,139, 22, 45,
-114,237,216,177,163,121, 86, 86, 22,140, 70,163,221, 31,127,252, 49,217,223,223,223,194,205,205, 77,180,115,231, 78, 20, 21, 21,
-193, 96, 48,216,120,121,121,217, 12, 27, 54, 76,187,115,231,206, 89, 0, 86, 85, 21,185, 42,136,165, 11,210,136, 87,175,198, 1,
-163,144, 70, 78,247,154,217,219,249,148, 69, 3, 82, 17,201,234,221,160,129,185,151,143,108,174,220,162,185, 77, 65,202,249,185,
-189, 27, 52,216,126, 42, 54,214,148,165,152, 24, 23, 23,151, 13,125,250,244, 25,190,101,203, 22,105,116,116,180,180, 73,147, 38,
- 96, 89,182, 34,147,127,249,202, 5,157, 58,213,236, 7,120, 12,207,245,250,225,135, 14,102,102,102, 21,107,132,150,255, 45, 46,
- 46, 70,207, 81,109,255,142,235,109,109,247,241,215,161,161,161, 67, 78,157, 58, 53, 98,233,210,165,141, 0, 76,101, 89,118, 97,
-116,116,116,103, 0,104,210,164,137, 8,192, 37,133, 66, 49,118,210,164, 73,147,166, 78,157,138,145, 35, 71, 46, 36,132, 44,171,
- 75, 84,143, 16,194,107,218,180,105,159,158, 61,123,242,244,122, 61,204,204,204,160,211,233, 26,188,206,198,251,250,250, 10, 75,
- 74, 74, 14, 45, 89,178,164,223,128, 1, 3,192,231,243,193,178,172,211,149, 43, 87, 86,204,154, 53,171,125, 64, 64,192,192,170,
- 76, 86, 64, 64, 64, 75, 0, 75, 26, 54,108,216,115,212,168, 81,188, 14, 29, 58,160,168,168, 8,103,207,158,253,242,240,225,195,
- 95, 6, 4, 4,132, 2, 88, 24, 30, 30, 30,242,182, 55,218, 60,185, 57, 30, 15,234, 2,175,232,108, 0, 64,218,230, 53, 0, 0,
-139,175,190,229, 28,205,255,130,193,170,137,146,146, 18,255, 47,166,141, 4,195,148,182,135, 13, 61,235, 97,197,252,241,228,232,
-241, 51,254, 53,132, 55,215, 26,141,198, 70, 54, 54, 54,179,213,106,181,100,253,250,245, 18,165, 82,233,115,240,224, 65,122,255,
-254,125, 8,133, 66, 88, 90, 90,162, 91,183,110,226, 94,189,122, 53, 8, 13, 13,173,119,248,240,225, 1,125,251,246,253,237,196,
-137, 19,199,170, 51, 87,118,246,246,151,191, 93, 58,206,166,153,167, 23,116,122, 61,146, 50, 82, 64,137, 8,206, 14, 50,124, 52,
-176,165,176, 99,160,200,235,219, 31,206,135, 56, 54, 27,240, 78,250,131,163, 15,107,218,198, 78, 13,101,183, 6, 6, 52, 8,232,
- 31,220,158,105,212,216, 23, 66,137,180,226,189,230, 45,253,209,188,165, 63, 25, 63,166,208,243,254,253,251, 11, 78, 95,190, 57,
-191, 83, 67, 89,248,213,167,197,213, 45,140,249,146,121,152, 53,107, 22,108,109,109, 95, 53, 25,184,120,241, 66,149,223, 49,229,
-186,248,226,147, 21, 43, 86, 88,101,100,100,124,248,243,207, 63,191,231,228,228, 52, 37, 45, 45,237,180, 41, 34, 35, 9,241,128,
- 88,220,109,204,119,223,177, 45,223,125,151,103,229,228,196,176, 70, 35, 73,142,141,181,251,110,253,250,224,194,164, 36,169,202,
-220,188, 40, 51, 63, 95, 27, 19, 19, 3, 51, 51, 51,194,227,241, 58, 84, 98, 46,210, 9, 33,171, 25,134,204, 37,132, 16,137,196,
- 44,247,227,143, 63, 14, 45,123,175,201,177, 99,199,204,251,247,239, 95, 72, 8,137, 6, 0,137,196,172, 51,143,199, 88,211,210,
-142,158,213,166, 24, 75,169, 84, 58,109,214,231,243,100, 5, 57,121, 42, 93,113,177,222,222, 66, 78,136,220,156, 87,144, 95, 88,
-152,146,154,169,153,244,233, 12,222,130,121, 51,167,193,196, 76,196,206,206,206,245,124,124,124,110,109,223,190,221,193,214,214,
- 22,121,121,121,200,206,206,198,173, 91,183,192,178, 44,122,247,238, 45,246,247,243,243,255,110,237,218, 48,103,103,231,118,166,
-152, 44,137,173, 29, 14,190,211, 18, 0, 48,228, 89,118, 69,132,229,212,208,255,164, 96, 26,150,144, 95,250, 89,137,164,214,203,
- 47,189, 80,223,237, 58,116,232, 32, 4,128,153, 51,103, 22, 20, 23, 23,175, 32,132,236, 86, 42,149, 41, 53,124,117,214,130, 5,
- 11, 92, 60, 61, 61,221,119,239,222,141,162,162, 34, 0,112,240,244,244, 68,227,198,141,141, 33, 33, 33,240,246,246,134,185,185,
- 57,174, 92,185,130, 27, 55,110, 32, 32, 32,192, 92, 40, 20,126, 80,149,193, 10,234, 25,180, 64,220,191, 73,167,198, 1,163, 32,
-183,112,198,246, 61,251,240, 56,124, 71, 39,141, 46,122,193,138,169, 46, 31,169,168,120,180,107, 35,243,121, 30,129,157,109, 27,
- 54,125, 23,238, 1,119,237,212,198,171,113, 11,167,120,173,228, 75,212, 59, 22,125,171,204,174,202, 92, 57, 57, 57,173,233,221,
-187,247,144, 45, 91,182, 88, 1, 64,100,100, 36,210,211,211, 97,111,111, 15,137, 68, 2,129, 64, 80,177,126,168,169,152,153,153,
- 33, 53, 53,181, 98,153, 41,163,209,136,194,194, 66, 56, 57, 57,149,186,155,175, 9,179,104,145,105, 93, 89,206,206,206, 29,253,
-253,253,119,185,186,186,186,189,248,122,207,158, 61, 49,126,252,120, 80, 74,209,161, 67,135,110,227,199,143,167,148, 82,176, 44,
-139,244,244,244,162,200,200,200,238, 41, 41, 41, 55,171,216,110, 85, 90, 90, 26, 38, 77,154,132,196,196,196, 41, 10,133, 34,129,
- 97, 24, 73,249,114, 96,132, 16,145, 66,161,240,246,246,246,222, 48,126,252,120,196,199,199, 35, 38, 38,230, 86, 93,187, 76, 41,
-165,198,182,109,219, 62,213,235,245,129, 6,131, 1, 42,149, 10,189,122,245,146,248,248,248,164, 11, 4,130, 71,121,121,121, 35,
-202,150,212, 50,197,172,241,157,157,157,157, 4, 2,193,150,113,227,198,245,105,223,190, 61, 30, 61,122,132, 83,167, 78, 97,192,
-128, 1, 8, 10, 10,194,130, 5, 11,250, 46, 88,176, 96, 22,128,170,110, 6, 14, 30, 58,116,168,190,171,171,107,197,146, 72, 22,
- 22, 22,248,248,227,143, 49,114,228, 72,156, 60,121,178,253,242,229,203, 15, 5, 5, 5, 57,132,132,132, 24,222,230, 70, 91, 28,
-216, 30, 94,209,217,120,214,164,180,253, 40, 55, 90,229,207,225,226, 15,142,127,176,193,210,106, 75,116,124, 62,243, 72,225,236,
-183,255,202,229, 79, 43,186, 8, 1,230,145, 86, 91,162, 43, 13,155, 83, 20,148, 24, 96, 38,102, 16,159, 86,136,135,207,178, 42,
- 59, 73,207,191, 98,204, 62,219,184,113, 35, 86,175, 94,221, 91,165, 82, 21,197,197,197,165, 22, 21, 21, 21,127,244,209, 71,132,
-207,231,227,250,245,235,120,254,252, 57,154, 55,111, 14,107,107,107,116,236,216, 81,216,163, 71, 15,183,177, 99,199,126, 4,224,
- 88,101,154, 36, 40,136,239, 44,182, 63,188,102,233, 80, 27, 48, 49,136, 73,204, 67, 3,215,214,176,179,114, 67, 74,102, 17,110,
- 71,157,196,147,216, 19,104,224,226,142,241,195, 27, 90,173,219,122,253, 56, 9,152,208,224,197,238,194,202,166,132, 74,120,198,
- 86,139,247,220,135, 49, 39, 22, 52, 63, 17,180,248,175,171,196, 72,237,220,224,211,206, 17, 82, 43,123, 38,242,209,186, 86, 85,
-109, 59,165, 52,157,207,231,111,227,241,152, 9, 0,208,170, 85,235,226, 85,171, 86, 85,118,177,102, 91,181,106, 93,204,227, 49,
-178,210, 8, 22,111,171,193, 96, 72,175,174,156,175,152,153, 53, 34,145,120, 54, 0,226,234,234, 86,116,244,232, 81,246,253,247,
-223,199,154, 53,107,196,243,230,205,251,193,195,195,163, 75,124,124,124, 66,117,251,104, 16, 33,245, 92, 26, 52,232,177,236,250,
-117, 42,208,235, 73,206,173, 91, 5,133,233,233,250,148,194, 66,201,111,119,239, 14,158, 50,103,142,196,201,203, 11,161,231,207,
-155,167,229,230, 22,230,149,148,104,227,226,226,168,209,104,188, 90,197,182,127,225,232,232,216,108,199,142, 29,254, 31,127,252,
-113,104, 74, 74,202,160,178,110,140,195, 0,218, 18, 66,162, 95,124,237,240,225,195,237, 71,141, 26,117, 55, 61, 61,253,139,234,
-202,249, 2, 77,237,237,236,164,123,182,238,140,176, 49, 55, 99,236, 93, 21,140,192,202,138,111, 16,153, 9, 89, 64, 85,207,173,
-190, 12, 64,211, 42,234,236,213, 69,195,137,135,135,199,225, 95,127,253,213, 65, 32, 16,192,104, 52,194,222,222, 30,207,159, 63,
- 71, 94, 94, 30, 10, 11, 11, 17,247, 40, 26,245,221,220, 48,125,252, 39,206, 95,127,187,246, 48, 33, 36,240,197, 70,172,210,197,
-184,117,186, 87, 27,156,170, 22, 8,135, 41,229,172, 10,150,101,159, 43,149, 74, 72,165, 82, 52,105,210, 68,126,251,246,237,171,
- 41, 41, 41, 41, 53,105, 74, 36,146, 15, 58,116,232, 96,190,103,207, 30, 4, 4, 4,192,210,210, 18, 33, 33, 33,136,140,140,132,
- 78,167, 99,138,138,138, 96,110,110,142,149, 43, 87,194,221,221, 29, 5, 5, 5, 72, 76, 76,180, 21, 8, 4,118, 85,105,134,156,
- 9, 89,154, 31,123,105, 65, 26, 57,221,107,251,158,125, 24, 55,108, 40,156,232,179,171,150, 13,200,210, 30,253, 59,124, 69,121,
-110,253,100,230,126,214,141,154,245,135, 80, 36,199,212, 57, 75, 16,243,224,152,117, 73, 97,196, 20, 98, 76,114, 3, 48,253, 85,
- 77, 82, 90, 65,140, 66,161,248,100,235,214,173,230, 21,119,244,101,107, 18,190,104,172,202, 31,149,213,105, 85, 11,166,235,116,
- 58,232,116, 58, 24,141, 70,100,101,101,161,176,176, 16, 86, 86,101,137,250, 23, 1, 4,132,208, 42, 86,161,127, 81,147, 97,152,
- 17,251,246,237,115,147, 74,165,175,126, 6,101,209, 65, 72,165, 82,176, 44, 11,157, 78, 7,131,193, 0,141, 70, 35, 15, 10, 10,
-154, 12,224,102,101,154, 60, 30,111,230,164, 73,147, 58, 28, 63,126,220,107,233,210,165,208,233,116,107, 50, 51, 51, 49,126,252,
-120,176, 44,139,142, 29, 59,182,165,148, 62,158, 62,125, 58, 0, 96,241,226,197,250,162,162,162,137,117, 61,150, 28, 29, 29,125,
-251,247,239,239,117,225,194, 5,116,234,212, 9, 26,141, 6, 95,125,245,149,197,234,213,171, 45,246,239,223,111,191, 98,197,138,
- 95, 0,244,172, 78, 51, 32, 32, 64,144,158,158, 62,119,196,136, 17,179,130,131,131, 45, 19, 19, 19, 97,102,102,134,163, 71,143,
- 98,235,214,173,167,116, 58,221,130, 67,135, 14, 45,219,182,109, 91,175, 1, 3, 6, 96,235,214,173,211,202,134, 69,176,149,104,
- 42,220,220,220, 16, 17, 17, 1,107,107,107,216,217,217, 33, 63, 63, 31, 55,110,220,192,173, 91,183,224,227,227, 3, 66,136,117,
- 89,155,102,120,157,243,168,150, 70,244,255, 93,179,124,134, 26,251,194,177, 75, 41, 45,221,104, 90,247,114, 18, 66,248, 10,133,
- 98,128,149,149,213, 20, 74, 41, 63, 55, 55,119,171, 84, 42, 61, 24, 27, 27,171,253,255,218,246,127,133,193,114,113, 65, 65, 86,
-150,117,140,131, 83,243,125, 14, 78, 77,203, 82, 85, 51,143,120, 60,235, 24, 71,199,146, 2, 0,208, 25, 40, 66, 31,229, 33,226,
-105, 26, 34,159,166, 65, 38,174,249,174,219,214,214, 22,237,219,183,199,209,163, 71,145,148,148, 36, 95,185,114,101, 35,157, 78,
-167,235,223,191,191,210,195,195, 35,183, 99,199,142, 16, 8, 4,184,125,251, 54, 10, 10, 10,192, 48, 12,196, 98, 49, 88,150,173,
-242, 86,212, 33,215,122,212,168,241,205, 61,237,172, 24, 28,187,118, 26,109,125, 6, 66, 42, 22, 32, 51, 79, 5, 2,130,103,207,
-207,131, 53,200,113, 63, 58, 30,237,253,164,120,167,181,149,107,209,133,156,241, 0,126, 48,165,130,116,113, 33, 16,249, 14, 2,
-216,166,160,185,177, 96, 11, 82, 64,165, 14, 40,102,205,144,165, 76,192,163,171, 7, 64,117, 53, 15, 21, 51, 24, 12, 19, 29, 28,
- 28,152, 5, 11, 22,244,247,244,244,100,167, 78,157,122,253,249,243,231, 67, 94,252, 76,253,250,245, 15,108,218,180,169, 67, 92,
- 92, 92,201,210,165, 75,143,101,100,100, 76,170,229,137, 57,151, 16,178, 14, 0,146,146,146,178,255,248,227,143, 78, 87,174, 92,
- 89,177,110,221, 58,215,169, 83,167,138,167, 78,157, 58, 23,192,164,234,186, 5,101, 98,113,240,178, 43, 87,168, 33, 57, 89,115,
-100,235, 86,222,250,176,176,121, 58,150,173,103,239,224,192, 15,234,212, 73,109,103,101, 85,156,158,150,198, 90, 41, 20,228,121,
-108,172,156, 21, 8,116,167, 79,159, 46,204,201,201,169,114,153, 17, 62,159,175,169,172, 91,176,138, 99,132,173,108,140, 86, 53,
- 20,176,148,234,172, 60, 61,105,143,110,237, 26, 62,125,252,236,153,196,202,138,215,168, 97,253,198, 15, 31, 61,191, 69,141, 6,
- 53,128, 2, 19,187,216,134, 46, 90,180,168,185,133,133, 5, 88,150,133,165,165, 37, 50, 51, 51,161,213,106, 81, 80, 80, 0,109,
- 97, 62,180,249,249,136, 76,120,142, 14, 65, 65,232,209,174,109,147, 19,122,253, 80, 0,123,171,211,181,241,243,175,136, 92, 29,
-240,250, 79,212,242,195,248,188, 10,179,117,178,117, 3,136,228, 50, 52,159,241, 69,157, 79,230,212,212,212,187,238,238,238, 39,
-123,247,238,221,103,194,132, 9, 76, 90, 90,218,105, 71, 71,199, 14,233,233,233, 81,213,125, 79, 46,151, 55, 40, 55, 20,150,150,
-150, 88,191,126, 61, 28, 29, 29, 81, 82, 82,130,219,183,111, 83, 87, 87, 87,114,233,210, 37,184,186,186, 34, 43, 43, 11, 58,157,
- 14,197,197,197,105, 90,173,182,202, 3,191,172, 27,176,247,204,222,206,167, 30,135,239,232,228, 66,226,110,127, 48,171,243,211,
-199,145,143, 18,207,158,187,254,141, 65, 45, 73,202, 75, 62, 63,215,179,213, 93,187, 41,179,191,198,166, 53,139,240,248,230,149,
- 28,199,122, 5, 63,152, 17,205,111,109,186, 87, 27, 65, 87, 63,122,244,200,252,254,253,251, 32,132,192,210,210, 18, 82,169,180,
- 82,147,101, 42, 70,163,177,226,111, 86, 86, 22, 50, 51, 51, 17,155, 16,131, 67, 23,119, 64,111,208,219,253,218,198, 34,205, 75,
- 40,140,176,203, 39,243,179, 30,208,187, 53,156,135, 91, 63,252,240,195,161, 46, 46, 46,230, 47,190,222,162, 69, 11,140, 24, 49,
- 2, 59,119,238,196,157, 59,119, 42,186, 49, 41,165,200,204,204, 76, 53, 26,141,191, 85,165,153,152,152,152,231,234,234,218,235,
-147, 79, 62, 9, 63,114,228,136,197,183,223,126, 11,163,209, 8,131,193, 80,209, 45, 90,254,119,247,238,221, 8, 15, 15, 95,152,
-150,150,246,168, 46,199,145,147,147,147, 79,255,254,253,175,252,240,195, 15, 86, 25, 25, 25,200,202,202, 66, 81, 81, 17,138,139,
-139, 97, 52, 26, 81,191,126,125, 98, 48, 24, 26,215,212, 29,200, 48,204,209,139, 23, 47,246,106,212,168, 17, 0, 64,175,215, 35,
- 52, 52, 20,227,199,143,207,150, 74,165, 31,196,199,199, 23, 43, 20,138, 47, 79,156, 56,209,171,101,203,150,240,243,243,115,202,
-200,200, 48, 7,144, 95,197, 13, 4,140, 70, 35, 50, 51, 51,145,153,153,137,159,127,254,207, 58,206, 26,141,166, 44, 56,160, 37,
-173, 90,181,170,127,251,246,237,231,111,107,163, 29,255,251,118,196,207,255, 20, 30, 87, 31, 3, 0,194,125, 75,135, 92,185, 95,
-142, 46, 29,126, 48,106, 84,173,244, 20, 10,133, 45,165,116, 92,112,112,240,140, 94,189,122,217, 43, 20, 10,216,216,216, 32, 50,
- 50,178,195,153, 51,103,190,119,117,117,253,209,104, 52,254,104, 74,180,158,195,164, 46,194,193, 70, 59,187,131, 89, 41, 41, 34,
-157, 72, 36,141, 41,143,106,149,154,171,193, 70, 96, 15, 12, 58,125,217, 5,130,150, 61, 76,235,214, 80,167,190, 15, 86,245, 39,
- 28,164, 3,176,109,219, 17,100,100,100, 8,215,175, 95,239,113,228,200, 17,215, 17, 35, 70, 36, 54,108,216, 48, 63, 40, 40, 8,
- 59,118,236,128,147,147, 19, 52, 26, 13,216,106,196,205,109,140,131,219, 54,111,200,123,146,240, 0,129,222,131, 81, 95,209, 17,
-207, 82,242,145, 83,168, 65,118,190, 10,141,189,103, 35, 61,187, 4,249,197,106, 68, 62,222, 13, 23, 39, 79,134, 39,136,237,101,
-170,193, 82,223,223, 5, 77,228, 62, 8,189,186, 64,212,116, 40, 4,174,237,144, 20, 25,130,123, 39,191, 67,242,195,107,160,172,
- 17,142, 30, 77, 76,218,118,129, 64,176,228,196,137, 19, 61,150, 47, 95, 46,232,214,173, 91, 7,133, 66,209, 94,169, 84,134,150,
- 29,228,237,251,244,233,211,193,193,193, 1, 27, 54,108,208, 10, 4,130, 37,117,188,251,121,177, 91,237,146,147,147,211,212,195,
-135, 15,255, 57, 97,194, 4, 56, 59, 59,183,169,238,187,153, 2, 65,139,209,203,151, 83, 1,143, 71, 79,252,242, 11,153,127,242,
-228,198,157,191,255, 46,234,208,161, 3, 8,128,136,200, 72,201,202,245,235,205,134, 14, 24,144, 17,243,252, 57,206, 94,188,168,
-201, 72, 75,203,202, 44, 46,158,243,166,102, 23,213, 22,131,193, 16,150,152,148,232, 18,216,166,165,253,221,232,184,135, 61,187,
-182,111,207, 48, 12,243,248, 89, 66,168,189,189,133,244,234,213, 43, 58,131,193, 16,102,226,254,233,215,177, 99, 71,126,110,110,
- 46, 20, 10, 5, 50, 51, 51,145,146,146, 2,189, 94, 15,117,126, 46,116,249,249,208, 23,228,193, 88, 92,132,184,219,183,224,235,
-230, 34, 62, 91, 58, 8,126,111, 77,119,156,149, 69,168, 94,140,100,137,205,229, 16,203,229, 47, 45, 78,109,226,197,113,128,133,
-133,197,220,194,194,194,147, 41, 41, 41, 75,181, 90,237,212,229,203,151,183, 90,178,100,137,221,188,121,243, 44,230,204,153,115,
-192,195,195,163,101,124,124,124,149,166,181,168,168, 40,214, 96, 48,216, 1,112,184,112,225, 2, 28, 28, 28,144,159,159, 95,186,
-221,106,181,182,164,164, 68,146,157,157, 13,141, 70, 3,173, 86, 11, 11, 11, 11,220,185,115, 39,215, 96, 48,252, 89, 83,249, 44,
- 26,144,165, 26, 93,244, 2,219, 38, 50,165,206, 96,221, 57, 35,135,205, 93,244,173,114, 9,128,239,122, 55,104,176, 93,199, 94,
-137,123,242,224,152,245,243,219, 33, 57,202, 39,197, 94,219, 79, 60, 43,172,166, 30, 41, 33,132, 37,132, 80,111,111,111,100,102,
-102,130,199,227, 65, 42,149, 66, 46,151,195,199,199, 7, 73, 73, 73,117, 54, 88, 6,131,161,194, 92,157, 11, 59,142,236,162, 84,
-108, 95,179, 7, 46, 78,110, 12, 0,251,148,180,164,238, 99,103, 13,105,227,217,209,122, 69,220,181,220, 42,199,181, 41,149,202,
-123, 0, 44, 94,190,105,117,233, 98, 99, 99,115, 81,171,213, 34, 62, 62, 30,103,207,158, 13, 74, 78, 78,190, 92,155,125,157,156,
-156,252,204,197,197,165,215,123,239,189,183,163,121,243,230, 13, 40,165,240,241,241,193,128, 1, 3,112,232,208, 33, 68, 69, 69,
-161,160,160,128,189,122,245,234,175,169,169,169,181, 26,144, 67, 8, 33,148, 82,234,236,236,220,184, 95,191,126,215, 54,109,218,
-100,157,149,149, 5,149, 74,133,226,226, 98, 28, 60,120, 16,157, 58,117,130,141,141, 13,254,248,227, 15, 67,121,143, 66, 85,230,
-138, 82,122,244,200,145, 35,189,188,188,188,240,232,209, 35,156, 59,119, 14,158,158,158, 16, 8, 4,232,215,175,159,237,190,125,
-251,166,250,250,250,174, 21, 8, 4,223,244,233,211, 7, 70,163, 17,119,238,220, 73, 77, 72, 72, 40,172,201, 4, 87,134, 74,165,
- 2,165, 20,122,189,126, 61,195, 48, 31, 4, 4, 4,244, 8, 15, 15,191,245,182, 52,212,174,174,174, 77, 5, 2,193,116,107,107,
-107,100,103,101, 33,159, 5,114,114,114, 64, 41, 69, 62, 91, 26,184,146,101,255,167, 87,189, 81,163, 70, 39, 84, 42,213,252,228,
-228,228, 42,215,242,114,113,113,241,147, 74,165, 51,250,247,239, 63,162,111,223,190, 60,189, 94,143, 99,199,142, 97,211,166, 77,
-232,213,171, 23, 26, 54,108,136, 57,115,230, 88,170,213,234,121,167, 79,159,158,219,164, 73,147,211,133,133,133, 95, 84,167,201,
- 97,146,193, 42, 53, 89, 46, 46,200, 45,187,163,177,179,177,177,217,100, 52, 26,187, 0, 95,193,156,111,137, 71,119,111, 35, 39,
-155, 7,141,202, 8,150,150,154, 44,147,186, 49, 84,127,194,194,155,162, 32,134, 64,175,215,195,209,209, 17, 43, 87,174, 68,126,
-126, 62,127,236,216,177,245,191,254,250,235,123, 90,173, 22,197,197,197, 80,169, 84, 80,169, 84, 48, 26,141, 85, 26, 44,161, 88,
-211,188,158, 99, 35, 20,170, 90, 67, 42, 22, 33,167, 64, 83,106,174,242,212, 56,244,231,135,208,148,168, 96,212,233, 96,208,234,
- 33,119, 28,136, 6,190, 93, 0, 60,109,102,162, 89, 41,253,203, 26,160,125,122, 14,218,167,231, 32,235,178, 0, 71,151,143,120,
-229,196, 55,109,114, 98, 74, 74, 74,138,139,139,203,206,187,119,239,126,252,193, 7, 31,224,210,165, 75, 95,162,108,102,149, 68,
- 34,249,242,131, 15, 62,192,221,187,119, 17, 29, 29,189,179,170,174,157,218, 34, 18,137,138,181, 90,109,121, 87,144,180,134,207,
-186,180, 26, 52,136,201,191,123,183, 96,249,197,139,139,126,251,237, 55,209, 59,157, 58, 65,175, 47, 53,211,245,235,215, 71,143,
-158, 61,197,187,246,239,151,171,242,242,110,207,159, 58,245,207,205,163, 70, 21,220, 42, 42,122, 96, 98,125, 54, 41,235, 26, 4,
-165,180, 73, 85,175,213,134,226,226,226,141,243,231,205, 10, 62,120,232,168, 91, 61, 55, 23,139, 51,231, 46,223, 23,155,137, 24,
-175,250, 13,120,133,133,121,252, 77,235,191, 51, 43, 42, 42,250,222, 68,185, 38,118,118,118, 72, 75, 75,195,211,167, 79,161,209,
-104, 74,183,189,164, 24,218,220, 60,104,243,115, 64,212, 42,136,141, 70,168,179,210,225,225,229, 9,252,103,134, 97, 77, 13, 88,
-165, 6,171,252,175,153,133, 5,132, 50, 25,120, 2,129,201, 99,176,156,157,157, 3,252,253,253,247,111,219,182, 77, 56,115,230,
-204, 54, 30, 30, 30,155,210,210,210, 18, 92, 93, 93,187,173, 89,179,230,214,178,101,203,196, 35, 70,140,104,188,117,235,214, 81,
- 0,182, 86,121, 19,161, 86,239, 63,113,226,196,112,119,119,119,135,200,200, 72,168,213,234,242,241,102, 0, 32, 41,255,220,227,
-199,143, 85,106,181, 58,227,193,131, 7, 5, 9, 9, 9, 90,152, 48,235,111,209, 6,101,216,204, 33,174,131, 28,157, 92,110, 72,
-204, 60,234,211,162,187, 3,103, 14,113, 93,179,246, 64,178,250, 84,108,108,225,194, 41, 94, 43,139, 11, 35,166, 88,185, 22,253,
-112,234,216,179, 66, 83, 14,163,178, 25,131,176,181,181, 5,159,207,135, 64, 32, 64,249, 88, 36, 71, 71, 71,228,231,231, 87,219,
- 69, 88, 85,227, 93, 80, 80,128,252,252,124, 60,121,254, 8,217, 69,169, 56,187, 39, 12, 70,163, 17,106,181,186,212,204, 58,186,
-226,252,222, 91,230, 65,131, 91,205,183,245, 35,151,178, 35,232,109, 83,143, 83,134, 97,102, 12, 26, 52, 8, 58,157, 14, 3, 6,
- 12,192,158, 61,123,102, 0,184, 92,219,227, 61, 37, 37,229, 6, 33,164,209,211,167, 79, 45,244,122,253,187,253,251,247,255,173,
- 79,159, 62, 8, 11, 11,195,133, 11, 23,130,180, 90,109,140,209,104, 84, 57, 59, 59,175,112,118,118,118, 32,132,172,168,110,130,
- 71, 89, 42,134,205, 77,155, 54,125,183, 75,151, 46,247,251,244,233,211,108,211,166, 77, 86, 25, 25, 25,229,147, 26,144,156,156,
-140,147, 39, 79,166, 30, 59,118,172,128,101, 89, 91,134, 97, 78,100,101,101,125, 81, 85,183,160, 78,167, 59,114,236,216,177, 94,
- 94, 94, 94,184,124,249, 50,150, 47, 95,142,230,205,155,227,196,137, 19,240,240,240,128,143,143, 15,108,108,108,166, 23, 20, 20,
-180, 91,189,122,117, 31,127,127,127, 28, 57,114, 4,233,233,233,223, 87,151,178,193, 96, 48,212,104,176,186,118,237, 58,126,230,
-204,153,232,223,191,255,217,192,192,192,214,119,238,220,249,159, 79,211,162, 80, 40, 86, 6, 7, 7,207,109,209,162, 5,126,255,
-253,119,168, 3, 58, 64,246,235, 49, 60,232,215, 1, 20,128,226,215,163,160,148,226,225,128,119, 64, 1,212,239, 54, 24,115,231,
-206,237, 51,112,224,192,122,168, 98,120,132, 66,161,248,246,163,143, 62,154, 53,114,228, 72,132,135,135, 99,235,214,173,184,119,
-239, 94, 69,155,167,215,235, 17, 29, 29,141,232,232,104, 56, 59, 59,163, 95,191,126,100,194,132, 9,189,123,247,238,109, 15, 32,
- 16, 28,175,107,176, 42,194,197,118,214,214,214, 15,127,248,225, 7,219,214,173, 91,243, 12, 6, 3, 46,133,132, 96,241, 87,179,
-208,187,231,199,208,177,150, 48,104,133, 96,133, 18,211,126, 81,220, 15, 5, 49, 4,172,176, 15,180, 90, 45,198,237, 22,192,138,
-100, 96,253,104, 71, 0, 32,106,181,186,194, 88,149,223, 61, 85, 23,193, 42,204,151,233,244,122, 10,101, 70, 2,146, 83, 31,194,
- 66,238, 6,202,115, 67, 70, 78, 9, 8, 28, 97,208,196,192,168, 47, 53, 64, 26, 85, 50, 74,180,228,181, 42,204,152,243,215,217,
-192, 70,131,233, 99, 42, 41,165, 27,118,237,218, 53,124,237,218,181,226,190,125,251,250, 57, 59, 59,247, 0,128, 33, 67,134,248,
- 89, 88, 88, 96,215,174, 93, 26, 74,233,134, 55, 24,225,121, 47, 48, 48, 16, 57, 57, 57,136,143,143, 15,173,118,219,180, 90, 91,
-185,131, 3, 47,227,210, 37,125, 78, 97, 97,189, 78,101,230,138, 97, 24,228,230,230,226,249,243,231,144,203,100,120, 16, 21, 37,
-254,110,210,164, 93, 62,126,126, 76,249, 12, 67, 83, 56,118,236,152, 57,128,182, 53,189, 86, 27, 50, 51, 51,139,157,156,156,198,
-124, 57,127,254,145,239,191,255,222, 50, 61, 35, 61, 70, 44, 18, 25,228,114,137, 98,250,244,201,252,130,130,130,225, 89, 89, 89,
- 69,166,234,229,230,230, 34, 46, 46, 14,102,102,102, 16, 10, 4, 96, 85, 37, 48, 22, 23, 65,157,147, 9,158, 78, 11,145,209, 8,
- 27,169, 24,110,142,142,168,103,111,103, 90,215,221,165,179, 21, 3,218, 95,236, 22, 60,221,190, 49,196,114, 25,196,114, 57, 58,
-252, 81, 58,132, 77, 40, 20, 2,235,183,153,210,141, 99,167, 80, 40,254,220,180,105,147, 48, 59, 59, 27, 15, 31, 62,188, 31, 31,
- 31,159,111, 99, 99, 99, 46, 16, 8,216, 39, 79,158,156,127,244,232, 81, 63, 79, 79, 79, 80, 74,107,154,253,245,221,225,195,135,
-187,119,236,216,209, 80,191,126,125, 89, 70, 70, 70,189,252,252,124,146,154,250,242, 24,230,219,183,111, 75, 18, 19, 19,139, 89,
-150, 61,130,210, 60, 88, 53, 30,248, 51,135,184, 74, 66,239, 98, 90,231,158, 30,205, 45,236,252,144, 99,184,219,252,198,253,212,
-105, 51,135,184,110, 92,123, 32, 89,109, 70, 52,191, 17, 99,146, 27, 95,162,222, 97,226,249, 67,125,125,125, 65, 41,197,173, 91,
-183,112,237,218, 53, 92,185,114, 5, 9, 9, 9, 21,159,177,180,180,196,185,115,231,208,165, 75, 23,147,143,163,146,146, 18, 56,
- 59, 59,195,218,218, 26,135, 47,237,196,246, 53,123, 42, 6,186,151,147,149,149, 5,169, 84,138,101,159,175,149,143,157, 51,248,
- 27, 0, 61, 76,209,118,115,115,243,236,208,161, 67, 95, 71, 71, 71,228,230,230,194,193,193, 1,173, 90,181,234,239,232,232, 88,
- 63, 61, 61,189, 78, 93, 89, 90,173,118,114,151, 46, 93,150,126,254,249,231, 48, 24, 12,248,240,195, 15, 17, 23, 23,183,255,217,
-179,103,235,221,221,221,167, 77,153, 50,197,209,206,206, 14,147, 39, 79,150, 1, 24, 84,141,193, 90,177,122,245,234,225,193,193,
-193,140, 94,175,127,231,194,133, 11,136,143,143,135, 86,171,133,193, 96, 64,124,124, 60, 22, 45, 90,148, 90, 80, 80,208, 57, 57,
- 57, 57,182,166,114,165,165,165,205,250,227,143, 63,250,120,123,123,227,204,153, 51,152, 56,113,226, 9, 11, 11,139,166,126,126,
-126,245,234,213,171,135, 63,255,252, 19,102,102,102,112,118,118,118,156, 55,111, 94,191,158, 61,123,226,252,249,243, 88,178,100,
-201,113, 39, 39,167,239,106, 50,193,124, 62, 31,122,253,203, 55,180, 60, 30, 15,247,238,221, 67,215,174, 93, 49,119,238, 92, 0,
-192,249,243,231, 45,122,244,232,241, 32, 40, 40,200, 34, 36, 36, 68,131,255, 97,100, 50,217,152, 95,127,253, 21, 79,159, 62,197,
-213,171, 87,145,149,149, 5,173, 86,139,188, 50, 43, 42, 46,139,100, 81, 23,119,180,159, 53, 31,195,250, 13, 66,106,106, 42, 24,
-134,177,171,230,134,111,196,252,249,243,113,234,212, 41,172, 90,181, 10,249,249,249,149,126,206,204,204, 12,173, 90,181, 66,203,
-150, 45, 17, 23, 23, 7, 0,118,224,120,115, 6,203,218,218,122,253,230,205,155,109, 59,116,232,192, 43, 51, 59,104,221,170, 21,
- 70,141, 25,131,115,135,143,195,193,187, 23,136, 86, 14,131, 84,100, 90, 4,203, 98, 7,178,245,217,144, 8, 37, 16,107,181, 96,
- 89, 51, 68, 36,171, 43, 92,179, 74,165, 66,185,201, 42, 46, 46,134, 76, 38,171,222, 64,104, 69,225,209,113, 6,183,252,194,123,
-184,113,119, 39,244, 90, 61, 26,120,207,135, 74,111, 11,153,253,199, 80,107,255,132, 49,175,116,230,174,200, 34, 8,105,105, 89,
- 0,136,169, 17,151,191,158,228,133,127, 29,236,206, 26, 77,207,187,170, 84, 42,179, 21, 10,197,214,208,208,208,233,131, 6, 13,
-194,185,115,231,230, 3,192,160, 65,131, 16, 26, 26,138,184,184,184,173, 74,101,229, 51,168,106,139,139,139,203,168,206,157, 59,
- 79,105,221,186, 53,142, 31, 63, 14,163,209,120,210,148,239,241, 4, 2, 74, 8, 65,249, 12,167,156,220, 92, 60,126,252, 24, 57,
-217,217, 48, 26,141, 40, 81,169, 12, 77, 27, 55, 46,160, 44,107, 94,155,242,188, 56, 99,176,178, 89,132,229,175,213,118, 59,211,
-210,210, 18, 26, 52,104,144, 88, 82, 82,108,111,109,101, 93, 40, 18,137,140, 5,133,133,249, 79, 99, 30,105, 77,105, 20, 94, 32,
- 58, 42, 42,170, 89,114,114, 50, 18, 19, 19, 97, 40, 46, 4, 79,163, 5,163, 41, 65,183,246,237, 96, 6, 10, 9, 88, 8, 88, 61,
- 4, 60, 1, 10, 75,103,219, 69,215,120,204,191,208, 32,148,155, 43, 66, 8, 36,114, 57, 68,114, 25,196,230,242,151, 34, 90,166,
- 76,252, 50, 51, 51,219,189,117,235, 86,103, 39, 39, 39,172, 93,187, 22,206,206,206, 62,193,193,193, 37,157, 59,119, 54,179,179,
-179,131,183,183, 55, 2, 3, 3,113,233,210, 37, 16, 66, 98,107, 56,206, 13,132,144, 30, 87,175, 94,157,117,253,250,245, 33, 10,
-133,130,140, 28, 57, 18,189,122,245,130, 68, 34, 65, 73, 73, 9,114,115,115,113,226,196, 9, 98, 52, 26,253,203, 12,158,187,135,
-135,199, 30, 66, 72,242,243,231,207, 63,120, 85,115,231, 58, 63, 69, 70, 14,251,177,163,147,203,192,206, 61, 61,154,119,237, 25,
- 12,207, 70, 93,209,181,103, 34, 0,172,180,225,199,127,184,102, 65,179, 35,118,110, 54,191,156, 61,125,110, 81,199,206, 93,191,
-156, 55,193,122,233,202,173,185, 53,142,151, 35,132, 84, 52,182, 12,195, 84, 26,165,226,243,249, 21,179,205,106,188,105, 98,141,
-201,189, 70,183,171,120,174, 55,232,237, 92,156,220,152,242,200, 21, 0,228,231,231, 35, 41, 41, 9,122,189, 30,182,182,182,208,
-235,117,126,181,232,126,156, 54,116,232, 80,162, 86,171, 49,107,214, 44,124,251,237,183, 24, 48, 96, 0,185,121,243,230, 52, 0,
- 51,234, 16,209, 88, 51,101,202,148, 89, 99,198,140, 65, 94, 94, 30, 46, 94,188,136, 46, 93,186, 96,203,150, 45,246, 23, 47, 94,
- 92,222,190,125,123,240,120, 60,156, 59,119, 14, 58,157,238,113,181, 13, 0,159,255,110,112,112, 48,147,148,148, 4,161, 80,136,
-192,192, 64, 36, 39, 39,163,164,164, 4, 25, 25, 25,248,250,235,175,211,242,243,243,131, 82, 82, 82, 98, 77,216, 47, 76,135, 14,
- 29,166, 55,108,216, 16, 23, 47, 94,196,164, 73,147, 78,201,100,178, 65,217,217,217, 19,212,106,245,198,161, 67,135,194,199,199,
- 7, 49, 49, 49,232,219,183, 47, 90,181,106,133,139, 23, 47, 98,206,156, 57, 39,164, 82,233,251, 53,228,193,122, 18, 18, 18,210,
- 44, 48, 48, 16, 37, 37, 37, 40, 40, 40,128, 64, 32,128,149,149, 21,162,163,163,209,168, 81, 35,204,157, 59, 23,107,215,174,197,
-204,153, 51,217, 30, 61,122, 24,116, 58,157, 80, 36, 18,253,207, 55,210,197,197,197, 52, 53, 53, 21, 22, 22, 22, 56,112,224, 0,
- 34,207,159,193,201, 79, 63,134,100,193, 26, 80, 74,145,180,116, 30,186,205, 89,128,182,247,159, 33, 53, 53, 21, 59,118,236, 0,
-195, 48, 21, 51, 98,171,106,219,242,243,243,209,178,101, 75,220,186,117, 11, 59,118,236,192,186,117,235, 42,162,181, 2,129, 0,
- 65, 65, 65,232,222,189, 59,158, 60,121,130,173, 91,183,194,194,194,130,115, 76,111,218, 96,177, 44,219,181, 85,171, 86,188,162,
-162, 34,168,213,106,164,165,165, 33, 62, 62, 30,102, 82, 51, 36,101,165,160,133,191, 14,105,108, 1,162,239, 63, 52, 18,158,224,
- 94, 77,119, 32, 90,173, 22, 90,173, 22, 17, 17, 17,165, 83,223, 27,173,168, 24,232,169,215,235,161,209,104,160, 82,169,112,241,
-226, 69, 42, 22,139, 33,147,201, 72,117,125,239,172, 65,115,234,226,181,251,125, 70, 12,236, 34, 58, 23,178, 29,122, 45,139, 2,
-181, 5,138, 84, 26, 20,169, 5,208,136,123,130,144,171, 96,120, 98,180,111,217, 16, 23,175,197,168,141,122,157, 73,233, 10,192,
- 26,193,119,246,131, 33, 53,226, 63, 47,189, 50,155, 80, 40,149,131, 53,214,110, 86,176,153,153,217,150,221,187,119,143,105,215,
-174,157,121,112,112,112, 35, 0, 16,139,197,236,238,221,187, 11,205,204,204,182,212,118, 39,190,154,189,221,217,217,185,163, 72,
- 36,154,218,191,127,255,142, 99,198,140,193,195,135, 15,241,251,239,191,223, 87, 40, 20,213,142,153,225,137, 68,217, 69, 25, 25,
- 86,242,250,245,249, 86,230,230,202, 51,103,206,120,188,211,185, 51, 18,226,227,145,147,147, 3,149, 74,133,168,232,104, 42,100,
-152, 68, 98, 97,193, 60,190,123,151,225,137, 68,217,181, 40,103,116, 77,179, 8,235, 26,205,146,153,145, 6, 11,230, 78,240, 84,
-171,213,205, 10, 10, 10, 12, 2,129, 64, 32, 21,209,132,218,104,232,245,250,227, 87,175, 94,125,175, 67,135, 14,226,152,136,123,
- 48,228,231, 67,155,159, 11, 33,107,132,141,127, 11,240,116, 26, 64,171,135, 75, 19, 10,117,158, 20,215,239, 61,211,235,245,250,
-227,166, 26, 44,134,199,123,121,220,149,133, 28, 98,115,115,136,228,242,151, 94, 39, 53,244,107, 57, 58, 58, 74,123,247,238,221,
-205,223,191, 52,167,214,154, 53,107,160,211,233, 68,122,189,190, 98, 38, 92, 81, 81, 17, 14, 30, 60,136,157, 59,119, 94,183,180,
-180,252,213,132,155, 9,131,171,171,235, 84,150,101, 29, 12, 6,131,206,222,222, 94,184,127,255,126, 72, 36, 18, 48, 12,131,150,
- 45, 91, 66, 34,145,104, 20, 10,133,174,172, 12,250,181,107,215,242, 63,254,248, 99, 97,101,122,141,155,251,204,246, 52, 88,119,
-150,152,121,212,183,176,243,131,103,163,174, 0,128,238,253,198,194,179, 97, 61, 20,100, 69,212, 87,171,226, 7, 10,249,185,214,
- 15, 55,166, 68,153,245,109, 54,166, 56, 35,228, 9,128,159, 76, 58, 53, 89, 22,193,193,193,232,217,179,103, 69,119,160,131,131,
- 3,180, 90, 45,140, 70, 99,173,198,178,149, 39, 17,253,250,107,194, 96, 17,240,107, 27,139, 52, 0,246, 47,154,171,196,196, 68,
- 36, 38, 38, 86,220, 8,178,212,180, 20, 42, 10,133,194,204,211,211,115,116,179,102,205,112,225,194, 5, 68, 68, 68,164,132,132,
-132,184,180,110,221, 26,174,174,174, 99, 20, 10,197,124,165, 82,105,114, 66,101,123,123,123, 89,167, 78,157, 62, 29, 51,102, 12,
- 30, 61,122,132,121,243,230,101,167,166,166, 30, 57,118,236,216, 39,159,125,246, 25,211,185,115,103,100,100,100, 96,203,150, 45,
-198, 91,183,110,125,107,109,109,189,164,134,253,254, 72,169, 84,186,170,213,106,228,228,228,192, 96, 48,160,164,164, 4,167, 79,
-159,198,153, 51,103,210,243,242,242,130,148, 74,229, 83, 83,202,230,238,238,110, 30, 24, 24,232,248,228,201, 19,236,217,179, 7,
- 58,157,110, 65,124,124,188,206,210,210,114,215,242,229,203, 23, 89, 90, 90,218, 4, 7, 7,163,252,184,253,243,207, 63,177,120,
-241,226, 19,102,102,102,131,162,162,162,116, 53,200, 15,252,230,155,111,190,177,179,179,251, 96,248,240,225, 76, 96, 96, 32,238,
-220,185, 3,163,209,136,110,221,186, 85,152,171,211,167, 79,239, 62,125,250,244, 96, 0, 66,185, 92, 46,249, 95,143, 94,149,163,
- 86,171, 17, 19, 19, 3, 71, 71, 71, 52,108,221, 14,115, 31, 60,199,213,208, 48, 80, 74,209,241,225,115, 20, 21, 21,227,215, 95,
-127, 69,120,120, 56,120, 60, 30,188,188,188,106,212,212,233,116,120,250,244, 41, 50, 51, 51, 49, 96,192, 0,140, 24, 49, 2,171,
- 87,175,134, 78,167,195,151, 95,126,137,156,156, 28,108,219,182, 13, 79,159, 62, 5,159,207,135, 92, 46,231, 28,211,155, 54, 88,
-101,221, 76, 96, 89, 22, 41, 41, 41,184,115,231, 14,158, 63,127, 14,153, 76, 6,149,193,200,110, 57,127,141, 37, 68,152,204, 82,
-122,157, 26, 74,179,136, 87,231,196,245,122, 61,225,243,249, 8, 13, 13,197,179,103,207, 96,222,144, 86,152,171,242, 8, 86, 73,
- 73, 9, 4, 2, 65, 81, 88, 88, 88,124,120,120,184, 39,159,207,215, 86,165,153, 97,157,187,227,220,133,243,179, 3, 90,250, 54,
-234,222,121, 49,142, 31, 95,132,220,252, 2,148,104, 5, 40, 84,233, 80,172,162,112,177,104,132,214,126,126,200,204,209,226,201,
-195,240,228, 44,161, 77,141,125, 48,122,202,228,239, 94, 57,209,242,221, 17,147, 96,230,241, 14, 52, 15, 15,128, 45, 76, 3, 91,
- 88,218,109, 34,146, 89,192,220,206, 13, 69, 37,106, 92,123,240, 12,122,202,228,155, 90,233,177,177,177,133, 10,133, 98,227,204,
-153, 51, 87,133,133,133,202, 0,224,222,189,123,197, 74,165,114,169, 82,169, 44,172,205, 14,124, 33,123, 59,145,201,100, 79, 26,
- 54,108,168,239,219,183,175,237,192,129, 3, 97,103,103,135,187,119,239, 98,229,202,149,119,139,139,139,135,197,199,199,235,107,
-232,118, 72, 9,255,227, 15,139,160,145, 35,173,230, 13, 24,176,114,242,228,201,223, 47, 89,178, 68,216,160, 97, 67,176, 70, 35,
-162,162,162,232,174, 93,187, 12, 63, 45, 92,184, 70, 36,147,241,111, 29, 61, 42, 48,104, 52, 41,255,237,131,216,213,213,181,115,
-159, 94,157,155,124,187,118, 35,212,170, 34,220, 12, 61,129,220,220, 76,108,221,118,184,137,171,171,107,103, 83, 7, 19, 39, 39,
- 39,239, 59,116,232,208, 44, 63,223, 38,254, 94,110,110,136, 76,120, 14, 17,107,132,208, 96, 0, 79,167, 1, 99, 80,195,173, 25,
- 5, 97,204,145,150, 86,136, 45,103, 46, 62, 72, 78, 78,222, 87, 99, 36,177,247,187, 24,150,144, 15, 66, 8,206,118,242,133,196,
- 92, 14,145, 76,134,246,135, 46, 87,152,170,132, 21,159, 67, 32,147,195,186,245, 59, 53,150, 51, 61, 61,189,164, 97,195,134,119,
- 30, 61,122,212,170,113,227,198,248,250,235,175,145,148,148, 4, 74, 41, 50, 50, 50,212,153,153,153, 41,217,217,217,241,132,144,
- 35, 74,165,114,187,169, 75,145,176, 44,235,112,236,216, 49, 0, 16, 2,192,133, 11, 23,160, 80, 40, 96,105,105,137,130,130, 2,
-140, 28, 57, 82,252,213, 87, 95, 1, 0,238,220,185, 35, 48, 51, 51,171, 82, 43, 50, 60,250,219,188, 66,154, 75,139,238, 14,204,
- 49,220,109,222,181,103, 18,186,247, 27,131,115,199,127,197,197, 51,231, 97,195,143,127, 14, 89,225,169,172,231, 89, 5,201,197,
-141,126,108, 18,240, 9, 47,181,248,204,143,211, 6, 88,243,156,157,217, 3,243, 54, 87,157,184,183,252, 14,156,199,227, 85,140,
-193, 42, 31,208, 94, 91,115,245, 34,139, 22, 81,150,128, 16, 47,161, 48, 34, 37, 45,169,187,194,209, 21,233,233,233, 72, 74, 74,
- 66, 98, 98, 34,146,146,146,208,176, 97, 67, 60, 79,120, 6,145, 72,120,207,196, 40,248,240,254,253,251,155,107,181, 90,252,241,
-199, 31, 6, 66, 72,191, 99,199,142,221,105,209,162, 5,191, 75,151, 46,230,191,254,250,235,112, 0,219,107,115, 47, 33,151,203,
-133, 58,157, 14,191,253,246, 27,146,147,147, 59,167,165,165, 69, 43, 20,138, 31, 39, 78,156,184,185, 73,147, 38, 13,163,163,163,
-159,168, 84,170,201, 74,165, 50,162, 38,177,188,188,188,177,189,122,245, 58,192,178,172,123,199,142, 29,101,139, 22, 45,178,120,
-252,248, 49, 60, 60, 60, 64, 41,141,172,205, 82, 83, 9, 9, 9,133,215,174, 93, 75,111,218,180,169,163,179,179, 51,132, 66,225,
- 74,103,103,231,165,114,185,252,219, 46, 93,186,216,236,218,181, 11,103,206,156,129, 64, 32,192,179,103,207,148,143, 30, 61, 90,
-239,228,228,180,193,148, 12,238,225,225,225,113, 0,134,181,110,221,122,241,186,117,235, 22, 48, 12,243,209,217,179,103, 33, 16,
- 8, 0,160,194, 92,213,175, 95,127,212,129, 3, 7, 70,188,101,237,180, 94,171,213,194,214,214, 22,153,153,153,200,200,200, 64,
-189,122,245,208,174, 93, 59,232,245,122, 28, 61,126, 2, 87,175, 94, 5,165, 20,118,118,118,176,180,180,196,253,251,247, 1,160,
-186,217,195,122,157, 78, 7, 27, 27, 27,228,229,229,225,254,253,251,112,112,112,192,204,153, 51,161,213,106,177,127,255,126,220,
-187,119, 15, 12,195,192,193,193, 1,230,230,230,166,104,114,212,214, 96,241,120,188, 75,151, 46, 93, 26,236,231,231,199,127,250,
-244, 41,158, 62, 45,189,153, 81,169, 84, 6, 62, 15, 7,211, 35,254, 24, 86, 77,227, 31,252, 98,174, 12,145, 72,180,101,240,224,
-193,147,199,142, 29,139,169, 83,167,130, 16,130, 95,238,105,145,152,200, 66,175,215, 35, 61, 61, 29,145,145,145,180, 85,171, 86,
-132,101, 89, 93, 80, 80,208,184,240,240,240,214, 60, 30,175,160, 42, 77, 26, 18, 98,112,108, 62,240,253, 31,182,108,191, 60,122,
-244,104,155,254, 3,126,192,189,232, 40,228,151,216, 3,148,194,197, 94,142,214,222,159, 35, 35, 91,141, 51,167,142,231,178, 6,
-245,251,244,193, 94,125,117,229, 4,128, 76,190,202,225,199,157,135,214,236, 61,112,120,220,248, 49,195, 37, 65,193, 35, 33,204,
-138,132, 65, 25, 14, 23,223,142,160,124, 51,220, 10,191,139,136,167, 73,234, 18, 29,111,123,129, 80, 53,187, 38,205, 23,201,205,
-205, 61,153,150,150,250, 67,249,228, 0,134, 33, 50,145, 72,124,178, 6, 51, 21,252, 74, 94,160, 87, 51,196,123,175, 88,177, 34,
-195,214,214,150,125,248,240, 33,182,108,217, 98,188,115,231,206, 33,150,101, 23,100,101,101,149,212,164,105,175,215,223,223, 61,
-111,158,111,235, 65,131,232,192,113,227,212,140, 68, 50,121,229,218,181,243,179,243,243, 93, 0,192,198,202, 42,105,235,226,197,
- 75,122,247,233, 83,248,240,218, 53,179,208, 63,254, 48, 19, 25, 12,225, 53,149,243, 77, 80,157,102,114,114,242,229, 70, 13,234,
-225,183,237,107,161,211,105,144,154, 82, 26,184,202,202,206, 71,117,230,234, 47,199, 82,233, 44,170, 65,235,214,111,184, 49,105,
-228, 71, 78,239,116, 11, 70,226,253,123,208,229,100,130,232, 13, 16, 16, 62,138, 51,164,200, 72, 47,194,138,147,231, 51, 84,106,
-245,160, 87, 19, 57, 86, 85,206,138,110, 65, 11,115,136,100,165,227,174, 94,140, 90, 9,205, 45, 32,144,201,193, 19, 10, 43, 27,
- 12, 31, 92, 73, 78,185,247,199,143, 31, 31,113,242,228, 73,235, 97,195,134,225,221,119,223,189,155,151,151,215, 37, 39, 39,167,
-176,174,245,201, 48, 76, 70,159, 62,125, 28,180, 90,173, 97,232,208,161,252,172,172, 44,148, 79,177, 47, 42, 42,194,169, 83,167,
-208,184,113,233,236,252,135, 15, 31,162,105,211,166, 85,106,126, 50, 39, 50, 5,192,146,153, 67, 92,215,220,184,159, 58, 13,192,
- 74,207,134,110,184,120,230, 60,174, 94, 12,157,215,182, 25,187,177,207,136, 86,223, 72,187,124, 48,187, 73,192, 39, 60,185,133,
- 51,118, 28, 62,196,139, 14,255,105, 89, 73, 73,100, 3, 0,159, 87, 85,206,242,238,235, 87, 83, 50,168, 84, 42,147,204, 85,117,
-199, 18, 5,165,118,249,100,254,216, 89, 67,218,156,219,115,211, 92, 46,151, 67,167,211,129, 82,138, 6, 13, 26,128, 47,224,227,
-231, 35,223, 23,231,229,101, 45, 52, 69, 83, 38,147, 77, 13, 10, 10, 66,108,108, 44, 34, 34, 34, 14, 41,149,202, 8,133, 66,113,
- 40, 46, 46,110,104,155, 54,109,176,111,223,190,169, 85, 25,172,170, 52,203, 51,214, 83, 74, 97, 52, 26,115, 0, 64,169, 84,222,
- 55, 37,250,251,170,102, 89,178,208, 14, 0,208,164, 73,147, 36, 71, 71, 71,139,251,247,239,195,217,217, 25, 58,157,174, 77,109,
-142, 37, 74, 41,171, 80, 40, 54,220,186,117,107, 69,203,150, 45,241,225,135, 31,118,191,115,231, 78,247, 22, 45, 90,192,203,203,
- 11,215,175, 95,199,217,179,103,127,103, 89,118, 98,106,106,170,186,186, 36,168, 85,109,251,173, 91,183,158, 2, 24, 25, 16, 16,
-240, 1,159,207,135,133,133, 5, 47, 37, 37,133,119,246,236, 89, 0, 24,127,224,192, 1, 99, 93,246,251,223,113, 93,122, 83,154,
-132,144, 47, 71,141, 26,245,227,132, 9, 19, 36,109,218,180,121, 41,162,122,242,228, 73,176, 44, 11, 91, 91, 91,216,218,218,226,
-233,211,167, 56,114,228,136, 54, 63, 63,127,189, 80, 40, 92, 89,157,230,200,145, 35,127,156, 48, 97,130,164,117,235,214,200,207,
-207,175, 48,111,199,143, 31, 7, 33, 4,118,118,118,176,181,181,197,147, 39, 79,112,228,200, 17,117,110,110,238, 90,173, 86,187,
-250,239,220,246,127,157,193,202,201,201,153,254,197, 23, 95,116, 25, 55,110,156,109,113,113, 49,207,214,214, 22,105,105,105,134,
-211,167, 79,231, 20, 22, 22, 78,175,205,143,133,134,134, 78,233,215,175,223,250, 95,126,249,101,219,246,237,219, 59, 15, 29, 58,
- 20, 35,251,246,197,164,182, 82,104, 52, 26, 16, 66,112,230,204,153,199,151, 46, 93,242, 20, 10,133,154, 69,139, 22,177, 0,110,
-212,120, 71, 31,121, 36,202,177,249,192,206, 27,191,223,124,208, 63,176,173,187, 71,125, 15,113,123, 87, 75,232,244, 70,164,103,
-100,227,114,232, 67, 77, 76,212,189, 20,170,211,189,159, 17, 85,115, 22,119, 0,136,138,162, 58, 0,211,125,125, 45,190, 94,253,
-227,174, 45, 59,247, 28, 28, 56,126,196, 32,190,127,139,110,136, 11, 61,130, 43, 55, 46, 26,114,213,244, 72,161,128, 55, 41,234,
-105, 65,110,109, 43, 94,163,209,104, 9, 1,197,127,178,175, 83,141, 70,163,173,203,249,248,226,147,159,127,254, 25,169,169,169,
-154,132,132,132,189,148,210, 31, 83, 83, 83, 77, 78,159,176,145, 82,237, 32, 66,206, 47,232,216,177,215,130, 51,103, 36, 67, 62,
-253, 84, 59,240,253,247,103, 67,163,209, 65, 36,162,124,153,140,129, 88, 44,120,120,237,154,217,134, 73,147,108,136, 86,123,238,
- 87, 74, 77, 14,193,255, 29,179, 8, 95,136, 96, 97,244, 39,159, 65,245, 66, 4, 43,236,118, 12,106, 19,193, 2,128,212,212,212,
- 68,103,103,231,182, 75, 55,108, 60,220,187,109,235, 38,141, 20,206, 98,219,250, 30,144, 59, 57, 33, 39, 43, 11, 55,239,197,234,
-191, 63,127,249,129, 74,173, 30,100,106, 94, 24,150,101, 43,102,185,249,126, 58, 23, 12,143, 87, 97, 4,202,147, 6, 90, 4,118,
- 4,225,243, 97,164, 20, 58,157,174,198, 65, 88, 74,165, 50,217,197,197,229,253, 79, 63,253,244,194,111,191,253,198, 4, 5, 5,
-181,252,243,207, 63, 95,107,209,220,228,228,100,215,178,110,173, 2, 11, 11, 11,254,152, 49, 99,160,215,235, 81, 82, 82,130,252,
-252,124,100,103,103,107,102,204,152, 33, 6, 0,161, 80,168,239,213,171, 87,141,215,143,181, 7,146,213, 51,135,184,110,180,225,
-199,127, 88,144, 21, 81,223,134, 31,255,188,109, 51,118,227,218, 3,201,234,175, 63,179, 90,154, 21,127, 57, 38,181,248,204,143,
- 59, 14, 31,226,141, 26,248,190,209, 85,254,100,158,196,129, 30,236,218,191,198, 70,232, 47, 73, 69,235, 26,185,122,149,172, 7,
-244,174,103, 71,235, 21, 93,134,180,158,191,116,214, 90,185,131,131, 61, 12, 70, 3,158, 39,198,225,151,195,155,138, 11, 53,185,
-203,178,163,232, 29, 83,180, 60, 61, 61,235,243,120, 60, 28, 61,122, 20, 0, 54,149,189,188,233,244,233,211, 67,135, 13, 27, 6,
-119,119,119, 95, 15, 15, 15,113,117,105, 52, 42,139,222,233,245,122,188,233,117,173, 9, 33,207,182,108,217,226, 98, 99, 99, 67,
-174, 94,189,106, 96, 24,230, 88,109, 53,156,156,156,190, 59,113,226, 68, 39, 74,105, 47,127,127,127,184,187,187,151, 93, 79,163,
-112,245,234,213, 61, 41, 41, 41,163,223,208,226,206,148, 16,130,130,130,130,242,129,118, 58,185, 92,254, 86, 46, 26,157,146,146,
-178,211,209,209,241,204,226,197,139,191,106,208,160,193,196,241,227,199,243,188,189,189,145,159,159, 15, 11, 11, 11, 40, 20, 10,
-164,164,164, 96,231,206,157,198,140,140,140, 95, 24,134,249, 90,169, 84, 42,235,170,105,109,109, 13,103,103,103, 36, 39, 39,151,
-107,110,211,235,245, 75, 50, 51, 51,211,193,241,102, 13, 86, 90, 90, 90,150,147,147, 83,211,159,127,254,121, 67,105,154,134,210,
-168, 86, 97, 97,225,244,180,210, 17,227,181,226,248,241,227,177, 0,130,250,245,235,215,224,224,193,131,219,118,239,222,221,121,
-192,128, 1, 24, 58,116, 40, 12, 6, 3,122,247,238, 61,250,213,168,149, 41,164, 71, 30,137, 34, 65, 65, 77,239,220,188, 50,242,
-238,157, 27,253, 40,165,126, 0, 8, 97,152,255, 44,246, 28, 85,251,197,158,163,162, 10,114, 1,124,224,239,106,225,181,108,211,
-174,237,102,124,182,163,202,192, 92, 83,105,152,113,119,147, 11,234,188,192,104, 89,230,245, 85, 12, 67,230,148, 62, 55,109,105,
-152, 42, 52,230, 2, 0,159, 47,216,119,231,206,157,249, 9, 9, 9, 41,166,204,240,170,140,195,148, 38,142, 36,228,236,108, 63,
-191,110,253,102,204, 16, 4,244,232, 97,110,227,230,198, 82, 74,141,207,111,222, 36, 97, 71,143, 10,194,142, 30,149,232, 53,154,
- 11, 7, 40,173,213, 12,168,191, 99, 22, 97,121, 4,171,129,151,235,217,193,131,250,244,240,170,175, 0, 0, 60,123,174, 68, 86,
- 78,254,217,218,230, 26, 42, 55, 89,132,144,192, 63, 13,134,161, 2,129,160, 31, 41, 75,197, 64,235,176,216,179,209,104, 76,110,
-219,182,138,205, 91,180,178, 42, 67,150,110,226,133, 55, 68,161, 80,124,212,190,125,251,149, 74,165,242,112,102,102,102,241, 27,
-186, 46,244,222,189,123,247, 73,150,101,205, 94,137,112, 21, 40,149, 74,243,178,134,212,253,244,233,211,123, 8, 33, 53, 26,248,
-181, 7,146,213,107, 22, 52, 59,162, 86,197, 15, 36,242,146, 35,107, 55,148,206,106, 89,180, 46, 47, 31,192, 79,211, 6,218,176,
-209,225, 63,173,118,177,120, 50,103,195,145,156, 95,106,210, 99, 24,230, 73,155, 54,109, 42,140, 86, 13,245,175,172, 75, 5,196,
- 93,203, 93,105,235, 71, 46,125, 60,119,240, 55, 90,157,174, 5, 67, 64, 5, 66,225,253,188,188,172,133,166,154,171, 50, 99,241,
-195,172, 89,179,166,199,198,198,238, 41,207,121,167, 84, 42, 67, 21, 10,197,119,137,137,137, 83,146,146,146, 54, 37, 37, 37,153,
-108,174,228,114,185, 90,165, 82,177, 6,131,129,209,104, 52, 16,137, 68,186, 55,213, 24, 20, 23, 23, 15,223,188,121,243,207,122,
-189,190, 9, 33,228, 88, 94, 94, 94,173,179,222,134,135,135,235,125,125,125, 7,156, 56,113, 98,250,131, 7, 15,102, 58, 58, 58,
- 58,166,167,167, 39, 36, 38, 38,174, 72, 75, 75,251,233, 13,153, 43,132,135,135,139, 3, 2, 2, 52, 47,212,139,197,219, 50,222,
-170,210,246, 45, 61, 61, 19,192, 84, 87, 87,215,245,179,103,207, 94,214,162, 69,139,193, 99,199,142, 37, 82,169, 20,251,247,239,
- 71,124,124,252, 17, 74,233,252,218,116,233, 86,165,105,102,102,134,253,251,247,211,248,248,248, 3, 12,195, 44, 80, 42,149,255,
-138,133,180,255, 14,200,155,190, 11,170,109,248,180, 95,191,126, 13,178,178,178,182,105, 52,154,119, 0, 20, 71, 68, 68,152,255,
-183, 67,178,213, 17,228,107, 47, 11,137,170,185, 33, 51, 85,243,213, 1,234,117,209,172,141,134,169,154, 85, 45,246,204,106, 52,
- 74, 91,131,225,206, 70, 74,181,166,106,186,184,184, 44,129,137,249,162,202,136, 78, 73, 73,249,170, 46,245,217,168, 81, 35,250,
-244,233, 83, 80, 74,201,155,220,239,127,199,177,244,111,210,220,185,206, 79,209,184,185,207,236,200,240,232,111,203,186, 15, 43,
-248,122,154,141,121,199,174, 65, 11,175, 93, 12,249,102,209,198,151,187, 56,223,134,109, 39,132, 48,149, 25,139,242,228,158,181,
-213,172, 87,175,222,143,254,254,254,227,238,222,189,251,115, 98, 98,226,248,127,234,182, 19, 66,136,187,187,187,168, 54,209, 57,
-238, 60, 50, 77,211,201,201, 41,144, 97,152,133,101, 55, 28,203,146,147,147,111,189, 65, 77, 35,165,116,105,106,106,234,221,255,
-239,109,255,215, 69,176,254,110,202, 35, 90,239,190,251,174, 3,143,199,251,199, 47,210,105,138,185,170,109, 20,234,159,160,241,
- 42,101, 6, 42,244, 77,104,189,106,150,254, 78,158, 60,121, 66,184,211,250,159,199,200,207, 34,148, 0,102, 4, 86,146,154,170,
-204, 84,205,238,242,238,219,185,237, 85, 69,109,234,186, 16,115, 98, 98,226, 68,133, 66, 49,179, 54,179, 15,255, 75,219, 77, 1,
-104,184,163,255,205,147,150,150,118, 7, 64,255,127,186, 38,103,176,254, 33,252,249,231,159, 25,220,238,224,224,224,224,168,153,
-127,186,185,226,224,224, 40, 29, 32, 29, 92,197,221,135,201,161, 63, 66, 72,112, 29,238,110,206,115,154,156, 38,167,201,105,114,
-154,156, 38,167,249,239,210,252,215, 80, 62,139,233,239,120, 0, 8,230, 52, 57, 77, 78,147,211,228, 52, 57, 77, 78,147,211,252,
-183, 61, 24,206, 98,114,252,221,124, 63,136,184,124, 63,136,184,252, 93,159,231,224,224,224,224,224,248,167,193,127,219, 54, 40,
- 48, 48,208,151, 82, 58,156, 16, 50,184, 44, 66,119,144, 16,178,251,206,157, 59, 38,101,160, 53, 51, 51, 75, 87,171,213, 14, 0,
- 32,145, 72, 50,212,106,181,211,139,209, 82,224, 47, 75,100,208,210,159,169,122,192,170,167,167,103,186, 70,163,113, 48, 33,154,
-120,153, 16,114,133, 97,152,203,117, 73, 47,208,181,107,215,209, 60, 30,111, 25, 0, 24,141,198, 47, 47, 94,188,248,219,223, 85,
-207,132,144, 54,110, 10,167, 95,117,122,157, 33, 61, 51,103, 33,165,244,104,101,159,219,220,159,172,224, 19,204, 46,251,127,205,
-228, 99,180,218,169,223,181,253,124, 53,229, 11, 20, 8, 4, 83, 29, 29, 29,123, 39, 39, 39,223, 1, 48,135, 82, 90,227, 49, 96,
-229,226, 59, 82, 32, 16,140,208, 27,141, 94, 2, 30,239,153, 94,175,223,149,151, 18,181,147,187, 84,112,112,112,112,112,252,109,
- 6,171, 93, 35, 91,111, 66,117,179, 5,132,118,210, 83,114,149, 18,225,154,176, 39,217, 49,175, 83, 0,133, 66,225, 70, 8, 9,
-162,148, 54, 97, 24, 38,146,101,217,179,181, 93,236, 56, 32, 32,192, 13,192,135, 0,134,181,109,219,182,217,164, 73,147,208,176,
- 97, 67,168,213,106,220,186,117,107,222,174, 93,187,230, 5, 4, 4, 60, 0,176, 7,192,222,240,240,240,164,170,180,212,106,181,
- 67,185, 87, 34,132, 56, 12, 30, 60,248,214,139,166,170,108,113, 89, 66, 41, 13, 35,132,132, 26,141,198, 27, 7, 14, 28, 72,242,
- 33,164,205,132,250,194,131,211,227,180,174,175,106,106, 52, 26,135,227, 51,167,128, 82, 22,234,236, 44,116, 88,185,161,226,189,
- 83,189,218,130, 49,234, 33, 18, 11, 47, 7, 29, 11,187, 2,224,114,217,163,214,240,120,188,101,167, 79,159,118,166,148,162,103,
-207,158,203, 0,252, 45, 6,139, 16, 34,110, 27,216,226,210,177, 67,123, 36, 69, 57,233,232, 53, 96,232, 46, 66,200,104, 74,233,
-161,151,204, 82, 31,226, 72,248,152, 61,105,249,110, 30, 0,108,158, 63,124,206,250,158,100,227,140, 51, 52,205,197,197,165, 11,
-165,116, 78,153,222,234,148,148,148, 75,155,251, 16, 71,240, 48,119,210,242,221, 4, 0,182,204, 31, 62,123,115, 31,178, 97,242,
-201,218,205,146, 36,132, 76, 30, 61,122,244,198,101,203,150,241,156,157,157,145,146,146,210,203,215,215,215,155, 16,226, 75, 41,
-173,114,112,176, 77, 61,191,125,189,122,245,246,252,112,200, 32,169,189,157, 53,146, 83,179, 44,126,223,181,123,130, 77, 61,191,
-222, 57,137, 17, 67,185,203, 5, 7, 7, 7, 7,199, 27, 51, 88,205,154, 89, 90,153,169,232, 76, 51, 33,253,176, 87, 27,223,250,
-253,187,183, 39,158,158,158,136,121, 28,227,117,233,250,237, 49, 93,124,204,159,171,116,100,175,202,140,172,125,240,160,250,245,
-195, 70,251, 19,189,222, 88,250,155, 66, 62,140, 23, 51, 93,143, 4, 7, 7,215, 31, 59,118, 44,252,253,253,113,231,206,157, 46,
- 7, 14, 28,152,238,230,230,118, 91,175,215,159, 20,139,197, 33, 53,229, 80, 9, 8, 8, 88,233,226,226, 50,103,214,172, 89, 36,
- 48, 48, 16, 98,177,184,226, 61,185, 92,142,110,221,186,161, 91,183,110, 72, 79, 79,111,118,233,210,165,102,187,119,239, 94, 17,
- 16, 16,176, 58, 60, 60,124,158, 41, 21,180,112,225,194,192, 74, 94, 62, 77, 8,137, 53, 24, 12,247,252,252,252,146, 26, 19,210,
-112, 98,159,246,231, 38,119,104, 36,171, 38, 58,133,219,203, 74, 87,215,120,209, 96,209,146, 66, 8, 44,204, 47, 11,228,242,191,
-152,171, 38,132,180,104,107,205,252,250, 83,142,209,175, 22, 38, 11, 73, 73, 73,176,180,180, 52, 11, 10, 10, 74, 37,132, 44,190,
-116,233,210,182, 55,124,220,180, 89, 60,123,178, 48, 55, 62, 2,105,143,194, 48,115, 72, 71,233,140,239,255,252, 6,192,161,234,
-141, 15,195,252,246,204,110,222, 12, 96, 58,203,178, 11,163,163,163, 59, 3, 64,147, 38, 77, 68, 0, 46,237,120,106,221,103,116,
-147,252, 58,167, 89, 32,132, 8,121, 60,222, 15, 59,118,236,248,100,228,200,145, 72, 72, 72,192,181,107,215, 32,151,203,177,100,
-201, 18,143, 89,179,102,173, 0, 48,189,170,200, 85,207, 94,125, 60,183,124,187,192,183, 48, 39, 95,179,245,135,253,183, 21,205,
- 26, 51, 51,166, 77, 49,215, 26,116, 78, 86, 46,190, 35,185, 72, 22, 7, 7, 7, 7,199, 27, 49, 88,157, 26,202,110, 13, 12,104,
- 16,208, 63,184, 61,211,168,177, 47,132, 18,105,197,123,205, 91,250,163,121, 75,127, 50,126, 76,161,231,253,251,247, 23,156,190,
-124,115,126,167,134,178,240,171, 79,139, 91, 87,165,167, 55,130,191,123,247,110, 0,192,119,159, 15,231,253,112, 53,166,254,139,
- 11,198,118,238,220, 25,157, 59,119,102, 86,172, 88,209,230,210,165, 75,109,246,238,221,171,115,113,113, 89,159,146,146,114,160,
-154, 98,206, 57,112,224, 0,225,241,120,224,241,120, 85,126,200,209,209, 17,221,187,119,135,179,179, 51,249,252,243,207,231, 0,
-168,212, 96, 73, 36,146, 12, 66,136, 3, 0,216,216,216, 24, 23, 47, 94,124,143,210,138, 30, 64, 74, 41, 13, 99, 24,230, 6,203,
-178, 55,143, 30, 61,154,220,148, 16,135,126, 1,141,175, 78,254,104,176,148, 30, 92, 95,165, 57,208,228,229, 84,250,186, 72, 38,
-189, 44,146,201,174,136,205,204, 94, 50, 87, 77, 9,113,109,219,184,254,217,205,159, 13, 55, 55, 49,138,231,221,165, 75, 23,137,
-209,104, 68,113,113, 49,182,108,217, 98,105,102,102,102,217,187,119,239, 69, 0, 42, 12,150, 47, 33,205,223, 87,240,198, 47, 78,
- 49, 76,169,131,129,177,234,212, 46, 48,254,251,149,139, 44, 2,219,118,194,147, 75,191, 35, 39,167, 16,249,121, 69,120, 53,235,
- 55, 0, 76, 62, 73,211, 55,247, 39,107, 54,127, 49,124, 46, 97, 24,210, 98,224, 28,244,244,166,211, 20, 10,197, 67, 66,136,160,
-124,249, 24, 66, 8,223,213,213, 85,225,237,221,114, 77,163,158, 62,216,242,229, 71,160,165,139, 52,174, 49, 53,122, 69, 8,113,
- 48, 55, 55, 63,122,246,236,217, 54,173, 90,181,194,141, 27, 55, 16, 23, 23,135,201,147, 39,107,167, 76,153, 34, 28, 53,106, 20,
-153, 57,115,230,167,132,144,131,148,210,235,175,126, 95, 32, 16,140,248, 96,208,123,162,162,188, 2,181, 86,163,211,218,216, 89,
-177,154, 98,117, 73, 86,110,129,250,163,225, 35,180,247,238,132,143, 0,240, 23,131,245, 58,245,201,193,193,193,193,241, 47, 53,
- 88, 18,158,177,213,226, 61,247, 97,204,137, 5,205, 79, 4, 45, 78,251,203,103,164,118,110,240,105,231, 8,169,149, 61, 19,249,
-104, 93,171, 87,162, 54,213, 78,213, 44, 55, 87, 91,135, 43,154, 22,231,166, 10, 1, 64,102,237,172, 27,191, 43,229, 97,171, 86,
-173, 96,111,111, 47, 12, 13, 13,157, 9,224, 64, 53,154, 68, 27, 25,142, 71,253,218,163,193,163, 28, 72,165, 82,136, 68,162,151,
- 62, 16, 19, 19,131, 43, 87,174, 32, 49, 49, 17, 94, 94, 94,192, 43,227,168, 94,212, 84,169, 84,142,189,122,245, 10, 89,189,122,
-117,231,239,190,251,238,193,142, 29, 59, 58, 87,213,173,228, 75,136,172,133,135, 83,200, 55,159, 79,176,166,167,126,101, 74,178,
- 51, 32,172,162,156,237,151,173, 69,251,101,107, 1, 0,251,125,157, 33,177, 48,135, 68, 46,191, 28,124,230,206, 95, 34, 87, 1,
-132, 88,120, 57,219, 94,220,180,120,186, 12, 23,247,137, 48,110, 73,181,245, 25, 16, 16,224, 29, 20, 20, 20,186,116,233, 82,171,
-164,164, 36, 92,191,126, 29, 30, 30, 30, 40, 41, 41,121,105,189, 50, 95, 66, 28, 91, 55,118, 63, 59,127,214, 24, 75, 0, 83, 76,
-217, 71, 47,153, 16, 30,239,155,111, 23,207,177,176, 20, 83,196, 94, 63,130,184,216,231,184, 21,245, 92,191,243, 92,132, 81,171,
- 55,142,173,172, 62, 39, 31,163, 95,204,234, 38,254,245, 78,161,215,177,126, 93,166, 52, 90, 58,204, 17, 58,157,110,123,102,102,
- 38,198,143, 31, 15,150,101,209,177, 99,199, 14,148,210,148,105,211,166,193,203,203, 11,219,206,196,148,240,115,110, 6,237, 10,
- 45,184, 99,202,177, 68, 8,105,230,238,238,126,246,210,165, 75,142, 46, 46, 46, 8, 9, 9, 65, 90, 90, 26,156,156,156, 48,101,
-202, 20,209,202,149, 43,119, 20, 20, 20, 12, 89,182,108,153,228,193,131, 7,123, 9, 33,110,101,166,185, 66,211,200, 26, 21,158,
- 30, 10,249,161,189,103,238, 91,155, 75, 81,207,203, 77,200,147, 91, 24, 41, 72, 73, 61,103,123,161,145, 53, 42, 42,217,255,175,
- 85,159,166,194,105,114,154,156, 38,167,249,111,208,252, 87, 25,172,114,116,113, 33, 16,249, 14, 2,216,166,160,185,177, 96, 11,
- 82, 64,165, 14, 40,102,205,144,165, 76,192,163,171, 7, 64,117, 53,231,189, 19,240, 96, 88, 48,101, 56,223, 74, 2,136,204,237,
-117,133,133,133,144,201,100, 40,206, 77, 21,206,250,182, 34,178, 37,188,116,233, 18,194,195,195,161, 80, 40, 76, 42, 35,213,150,
-246, 34,106,181, 90,104,181, 90,164,245,105, 13, 89,219,119,144,251,209, 20, 92,184,112, 1, 25, 25, 25, 16, 10,133, 16,137, 68,
- 48, 24,106, 78, 22,207,148,173, 26, 91, 30,181,170,236, 51, 65,132,240, 93,109,228,199, 54, 47,154, 94,159, 9, 59, 46, 80, 37,
- 62,133, 82,109,132,149, 9,245, 41,150,203, 32,146,154, 93, 22,201,101,149,153, 43,129, 76, 46, 57,246,235,210,153, 78,188,187,
- 23, 36,170,167, 17, 21,166,237, 69,186,119,239, 62, 1,192, 34, 74,105, 94, 80, 80,144,227,178,101,203,172, 83, 82, 82, 16, 21,
- 21,133,253,251,247,103, 26, 74, 55,148, 80, 74,191, 6,128,118,132, 72,234,217, 91,157,217,244,213,116,115, 92,218, 39,194,199,
-181, 79,174,110,217,164,255,137,247, 71, 77,154,178,113,122,127, 20, 23,170,176,251,220, 93,156, 14,143,125, 23,192, 53, 74,105,
-149, 25,238,191,187,160,121,234,226,226,210,109,220,184,113,247, 14, 31, 62,108,247,237,183,223,194,104, 52,194, 96, 48,192, 96,
- 48, 84,252,111, 52, 26,177,103,207, 30, 92,187, 19, 53, 77,169, 44, 48,105,189, 55, 66,136,162,126,253,250,231,111,222,188,105,
- 47,149, 74,113,238,220, 57,228,229,229, 85, 68,174, 70,143, 30, 77,242,242,242, 62,220,178,101,203,251,241,241,241,223, 94,189,
-122, 53, 27, 0, 15,128,225,229,125,206,143, 53, 24,244, 62,206, 77, 26,242,135,244,239,212,169, 40, 59, 2,114, 91, 63,132,221,
-143, 61,150,155,155,167, 98, 24,126,236,139,159,127, 19,245,201,193,193,193,193,241, 47, 55, 88,234,251,187,160,137,220, 7,161,
- 87, 23,136,154, 14,133,192,181, 29,146, 34, 67,112,239,228,119, 72,126,120, 13,148, 53,194,209,163,230,165,230,126,187, 75, 5,
- 10,133, 34, 92,169, 84,226,238,221,187,136,141,141,133, 68, 34,249,203,231, 46, 92,184, 0, 0,112,114,114, 50,105, 35, 68,129,
-237,225,118, 63, 21, 73, 45,156, 1, 0,110,247, 83, 1, 0, 43,230,207,135, 80, 40,132, 80, 40,172, 88, 20,214, 20,131, 69,202,
- 62,204,150,118, 83,209,202,222, 15, 20, 11,118,239, 93, 52,181,181, 56, 62, 82,164,121, 16, 6,165,134,165,199,210,141, 39,124,
- 77, 49, 88, 82,233,101,145, 92,126, 69, 40,147,189,100,174, 0,128, 10, 4, 59,127,255,122,170,159, 44,253,153, 76,125,251, 2,
- 82,213,172,206,162,114,153,175, 79,157, 58,229,192,231,243,157,140, 70, 35, 18, 19, 19,241,240,225, 67,108,216,176, 33,189,176,
-176, 48, 40, 60, 60, 60,230,133,242, 50,173,204, 68,251,119, 46,153,238,201,143,184, 44,209,196, 62,168,212,180, 85,135,125,243,
-129, 61,223, 13,106,113, 98,194, 71, 95,226,189, 62, 61, 48, 42,200,151, 62, 87,230,168, 1,156,163,148, 26,107,250,126, 74, 74,
- 74,138,139,139, 75,247, 65,131, 6,237,106,218,180,105, 19, 74, 41,124,124,124, 48, 96,192, 0, 28, 58,116, 8, 81, 81, 81, 40,
- 44, 44,212, 93,189,122,117,189, 82,169,252,197,148, 50, 17, 66,164,214,214,214,167, 47, 94,188,104, 47,149, 74,113,246,236, 89,
-168, 84, 42, 56, 59, 59,191, 20,185, 90,177, 98,133,228,249,243,231,155,206,156, 57,227, 1,128,169,108, 33,108,157, 65,179,237,
-151, 29,123, 55,206,252,116,156,203,197, 27, 81, 23, 52, 69,133,150,238,238, 73, 5,246,214,114,243,101, 43, 86,213,211, 25,180,
- 19, 42,175,207,144, 58,213, 39, 7, 7, 7, 7,199,191,220, 96,149,119, 49, 81,214, 0,237,211,115,208, 62, 61, 7, 89,151, 5,
- 56,186,124,196, 75,159, 51, 26,245,117, 42,128, 90,173,134, 80,110,171,251,238,243,225, 66, 0, 96, 5,178,138,213,225, 89,214,
-180,133,215,107,179,164, 87,109, 12, 86,153,238, 95,204, 67,125,177,252,242,182,207,134,180,181, 53,150, 8,180,215,142, 33, 69,
-195, 26,190,125,170, 43,185,157, 71, 87,207,175, 66,243,120,247,214,208,231,102, 65, 98, 46,187,220,235,210,131, 74,103, 11,214,
-151, 88, 92,216, 63,115, 88, 71, 39, 33,132,218, 19, 7,160,212,176,154, 31,227,245,191,108,168, 98,155, 41,165,136,139,139, 67,
- 73, 73, 9, 66, 67, 67,113,232,208,161,204, 87,205, 85, 89,121, 67,126,158, 51,162,141, 69, 97,154, 80,123,251, 60,148, 26, 86,
-227,109,138,169,242, 27,216, 65,200,144,179,132,225,153,245,233,228,139, 25,227, 6, 98,221,207,127, 26,180, 14,157,250,109, 60,
-122,242,131, 34,141,110,190, 41,230,234, 5,147, 21, 1,192,215,195,195, 67,108, 48, 24,186,244,239,223,255,100,159, 62,125, 16,
- 22, 22,134,243,231,207, 55,210,233,116,169, 0,160, 80, 40,150, 0,112,100, 24,102,117,114,114,242,179, 42,246, 17, 35, 20, 10,
-247,158, 63,127,190,169, 66,161,192,249,243,231,161, 82,169, 48,105,210, 36,237,212,169, 83,133,163, 71,143, 38,249,249,249, 21,
-145,171,208,208,208,236,170,204, 21, 0, 20, 36, 63, 58,101,237,214,180,125,151,206,237, 6, 54,106,212,208,226, 89, 97, 65,134,
- 84, 42, 49,187,116,249,170,240,230,141,155,155, 10,146,163,111, 85, 94,159, 23, 76,174, 79, 14, 14, 14, 14, 14,206, 96, 85,139,
- 49,231,175,109,158,209, 80,247,117,154,219,205, 61,243,208,204,204, 12, 91,182,108,129, 84, 42,173,181,113, 42, 57,117, 4, 73,
-147,135, 87, 68,174,202, 35, 89,232, 53,250,181, 12, 22,203,178,161, 0, 94,114,121, 50,199,198,195,246,126,212,189,131,175,167,
- 11,163,223,191, 1,201, 37, 6,245,162,199, 58,245,163, 66,250,110, 84, 37,131,167, 43,208,107, 33,145,149, 70,174, 42, 51, 87,
-114, 39,239,247,119, 12,235, 18,212,162,113, 3,198,176,111, 45, 82, 74,244, 69,243,162,117,186,103,197,244,112, 21,166,114, 81,
-143, 30, 61, 22,217,218,218, 74, 54,110,220,104,233,238,238, 14,131,193,160,125,213, 92,201, 28, 27, 15,219, 55,186, 87, 7,111,
- 39,107, 70,127,240,123, 36,169,140, 37, 27,158,233,119,252,104,130,185,178,179,148,159,249,113,249,100, 51,169, 88, 0,181, 90,
-141,149,155, 15,226,236,245, 7,253, 50, 35,143,156, 1,112,166,174,251, 91,167,211,125, 18, 28, 28,188,110,246,236,217, 48, 24,
- 12,248,240,195, 15, 17, 31, 31,127,246,233,211,167, 27, 92, 93, 93, 63,159, 60,121,178,194,222,222, 30, 19, 39, 78, 20, 2, 24,
- 93,133,204,170,221,187,119,247,107,209,162, 5, 46, 95,190,140,188,188, 60, 56, 59, 59, 99,234,212,169,162, 21, 43, 86,236, 40,
- 40, 40, 24,178,124,249,114, 73, 92, 92, 92,181,145,171, 23,201,163,249, 75,127, 90, 55,241,243,214,109, 59, 48, 79,159,198, 24,
- 18, 91,119,102, 46,156, 63,121, 37,215, 65,188,227,165,250, 28,211,187,214,245,201,193,193,193,193,193, 25,172, 26,163, 67,198,
-194,191, 14,118,103,141, 38, 7, 50, 76, 54, 78, 70, 19, 53, 89,141,186, 38,195, 84, 43,131, 85, 54, 6,235, 52,165,244, 37,131,
-101,229,212,184,243,130,185,211,215,119,124,191, 23,147, 62,174, 29,242,138, 52,154, 57, 81, 6, 54,185,164, 6,115, 5,128, 49,
-234, 46, 11, 44, 44,174, 8, 95,153, 45, 8, 0,102,142, 13, 91,207,251,236,211,205, 93,135,245, 39,153,147, 58, 34, 55, 79,165,
-249,252,161,129,164,168,232,144, 40, 74, 47, 85,166,119,225,194,133,173, 0,182, 6, 5, 5,165,203,100, 50, 20, 21, 21,253,165,
- 94,203,203,219,225,253, 94, 76,250, 39,109,144, 83,172,211,204,121,104,128, 82,197,238,173,201, 92,217, 91,153,159,249,113,217,
-100,169, 50, 57, 30, 66,161, 16,114,185, 28,231,174, 69, 34,243,193, 31,103, 94,231,128,115,117,117, 93, 60,109,218,180, 69,163,
- 71,143, 70,110,110, 46,206,157, 59,135,174, 93,187,226,135, 31,126,112,191,120,241,226,186,246,237,219,131,199,227,225,220,185,
-115,208,235,245, 79,170,216,159, 3,199,143, 31,255,249,251,239,191,143, 91,183,110, 33, 53, 53,245,165,200, 85, 94, 94,222,135,
-155, 55,111,126,255,249,243,231, 53, 70,174, 94,196, 5,104,237,217,160,165,240,139,133,223, 65, 83,146,193,207, 76,185,113,249,
-194, 57, 26,230,158,147, 35, 5,144, 95,215,250,228,224,224,224,224,224, 12, 86, 37,238,197, 8,190,179, 31, 12,169, 17,255,121,
-233,149,217,132, 66,169, 28,172,177,102,227, 50,218,159,232,199, 52, 0,127,109,111, 6, 66,185,173,174,221,220, 51, 15,171,250,
-172, 92, 46, 55,181,139,208, 40,236,243, 62,175, 65,207,247,240,172,185, 19,168, 94, 87, 17,201,194,252,249, 47,153, 44,161, 80,
- 8,173, 86, 11, 84,210,237,247, 10, 55, 9, 33,241, 0,194, 40,165, 52,192,219,235, 27,137, 76, 54, 38,208,175,129,221,140,201,
-159, 8,158,103,104,112,177,227, 23,121, 7, 87,205,149, 39, 81,249,148, 4,154,119,189, 6, 67,121,185,207,213, 71,127,137, 92,
-249,123,123,125, 41,145, 74,198,181,109,230,237, 52,111,230,100,193,243,116, 13,185,216,122, 78,193,161,213,115,164,113, 48,255,
- 60,137,230, 94, 50, 97,251, 23,245,233,211,103, 17,165,148,178, 44,187, 16, 0, 94, 44,239,204,169,227, 4,207,210,212,184,208,
-241,203,220, 67,171,230,154, 39,161,250,242,218,251, 13,236,224,104,109,113,230,199,229, 83,164,169, 41, 9, 16,139,197, 48, 55,
- 55, 71, 82,122, 62, 4,124,158,234,117, 14, 54, 15, 15, 15,113,155, 54,109,230,142, 26, 53, 10,209,209,209,152, 55,111, 94,170,
- 82,169, 60,124,244,232,209, 73, 51,103,206,228,119,238,220, 25, 25, 25, 25,216,178,101,139,254,214,173, 91,203,211,210,210,214,
- 84,122,208,242,249,159,124,243,205, 55, 84,169, 84,146,184,184, 56, 56, 59, 59,227,211, 79, 63, 21, 45, 95,190,188, 98,204, 85,
-109, 34, 87,229, 36, 39, 39, 95,110,212,160, 30,222, 61,181, 30, 6,189,230,114, 94,118,226,149, 71,207,114, 47,219,136, 68,179,
- 58, 6,248,213,169, 62, 57, 56, 56, 56, 56, 56,131,245, 23,244,148,201,223,189,114,162,229,187, 35, 38,193,204,227, 29,104, 30,
- 30, 0, 91,152, 6,182,176,212,192,136,100, 22, 48,183,115, 67, 81,137, 26,215, 30, 60,131,158, 50,249,213,234, 25,193, 95,250,
-195,127,102, 11, 90, 89, 89, 33, 63, 63,255,165,200,139, 84, 42,133, 66,161, 64, 65, 65, 1, 14, 30, 60, 8, 90, 67,100,136, 82,
-250,205,168, 81,163,190,154, 60,121, 50,211, 96,216, 88, 20,221,184,250,106, 52, 10,102,102,102,144, 72, 36, 72, 78, 78,198,227,
-199,143, 89, 74,233, 55, 53, 68,188,110, 26, 12,134,251,123,247,238, 77,110,228,229,218, 43,168, 85,235,105,243,191,152,103, 30,
-117,245, 44, 22, 46,223,196, 54, 12,236,153,191,114,207, 31,133,249,242,122,221, 74,148,143,238,213, 84,201,132,144,191, 38, 17,
-245,172,215,181,157,127,203,217, 11, 23,126,105,241,240,234, 57,124,181,250, 71,218,168, 69,112,254,234, 67, 71, 11,178,164, 30,
- 61, 84,233,255, 25,243, 83, 29, 33, 33, 33, 91, 1,108, 45,127,254,106,121,231, 45,217,192,122,183,234,149,187,114,207,161,226,
- 2,243,122,193,213,149,215,193,119, 80,123, 55,103,155, 51,223, 47,157, 40, 77, 75, 73,132, 88, 44,134, 92, 46, 71, 98,106, 30,
- 22,173,223, 95,172, 99,217, 94,175,121,188,137,101, 50,153, 88,167,211,225,183,223,126, 67, 74, 74, 74,187,212,212,212, 68, 39,
- 39,167, 31, 39, 78,156,184,177, 73,147, 38, 62,143, 31, 63,126, 82, 84, 84, 52, 37, 45, 45,237, 81, 85, 34, 86, 86, 86,237,236,
-237,237, 73, 88, 88, 24, 38, 78,156,168,253,244,211, 79,133,163, 70,141, 34,185,185,185,117,138, 92,189, 16, 93,235, 60,160,111,
-123,116,232, 62,233,178, 86,157,119,229,249,163, 29,151, 25,122, 93, 18,208,210,175, 78,245,201,193,193,193,193,193, 25,172, 74,
-201,228,171, 28,126,220,121,104,205,222, 3,135,199,141, 31, 51, 92, 18, 20, 60, 18,194,172, 72, 24,148,225,112,241,237, 8,202,
- 55,195,173, 59,119, 17, 17,155,164, 46,209,241,182, 23, 8, 85,179, 95, 49, 22,193,213,229,202,200,207,207,135,135,135, 7,246,
- 76,106,220, 84, 83,144, 33,172, 7,128, 73,177,212, 93,140,233,243,240,202,149, 43, 69, 0,182, 55,106,212,232, 64,117,154,119,
-239,222,253,186,101,203,150, 71,191,248,226,139, 21,141, 26, 53,234, 53,126,201, 15, 16,206, 24, 5, 85, 84, 4,164, 65, 67, 96,
- 99, 99,131,236,236,108,220,186,117, 11,133,133,133,167, 41,165, 95,220,187,119, 47,178, 58, 77, 74,233, 13, 63, 63,191,228,122,
-245,234, 89, 57,200,205,126,153,244,241, 40,243,132,136, 27, 72,143,185,143,235,215, 98,114,119, 31, 58,154, 82,144,159,249,113,
-117,141,235,139,154, 12,195,188,100,174,188,189,237,228, 50,177,245,206, 41,227,199, 90, 36, 70,222, 66, 70,204, 61, 92,189,254,
- 36,119,207,222, 35,153,217,217,233, 99,170, 50, 87, 53,213,103,101,229,189,113,245,113,238,222, 3, 71,146, 11,139,115, 63,169,
-172,188, 47,106,202,101,130,217, 71,127, 91, 42, 85, 38, 39, 84,152,171,132,212, 92,124,181,126,111,177, 74,171,239,149, 25,113,
-196,164, 72, 77,117,229,100, 89, 22, 6,131, 1,148, 82,136, 68,162, 2, 0, 40, 51, 83,221, 76,213,204,202,202, 10,137,143,143,
- 31, 32,151,203, 43, 34, 87,249,249,249, 67, 86,174, 92, 89,171,200,213,171,229, 76, 78, 78,190,220,192,211,117, 85,234,208, 33,
- 26,103,103,251,203,199, 78,221,142,116,144,155, 61,170,107,125,190, 41, 56, 77, 78,147,211,228, 52,255, 13,154,255, 42,131, 21,
- 21, 69,117, 0,166,251,250, 90,124,189,250,199, 93, 91,118,238, 57, 56,112,252,136, 65,124,255, 22,221, 16, 23,122, 4, 87,110,
- 92, 52,228,170,233,145, 66, 1,111, 82,212,211,130,220,154,126, 76,192,131, 97,248,240,225,124, 0, 16,241, 97, 88,219,175, 95,
- 72,211,166, 77, 59,182,213,103, 8, 23,109, 44,141,108,125, 61,109,184, 48,228, 86,200, 1,177, 88,188, 53, 46, 46,174,192,148,
-141, 40, 51, 76,189, 91,181,106,245,206,231,159,127,190,170, 79,125,215,214, 3,219,119,129, 64, 32,192,173, 91,183,144,157,157,
-125,139, 97,152,185,119,239,222,189, 98,138, 94,100,100,100, 86,211,134, 30,211,109,204,132,179,167, 12, 31,104,159, 25, 27,133,
-228,232,187, 0, 0,141, 70,165, 79,141,185,220,162, 54,149, 92,190,112,179,175,175,175,208,168, 41, 26, 45,225, 91, 44,156,244,
-225, 0,135,236,231,143,144,244,176, 52,221,147, 70, 93,162, 75,138,185,232, 83,151,157,232,225,225, 33,150, 9, 48,161,210,242,
-106,213,250,180, 39,209, 45, 77,209, 41,209,104,151,127,189,110,103,143,165,179,199,136, 45, 44, 44, 16,254,224, 41, 22,174,221,
- 83, 43,115, 85, 19,148, 82,232,245,250, 90,205,252,172,132,185, 45, 90,180,104,188,108,217,178, 70,101, 99,185, 94, 43,114,245,
- 34,177,113,201,243,130,130,130,124,159, 62, 14,239, 98, 99, 38,220,245, 58,245,201,193,193,193,193,193, 25, 44, 84,111,180, 10,
-114, 1,124,224,239,106,225,181,108,211,174,237,102,124,182,163,202,192, 92, 83,105,152,113,119,147, 11,158,153,250, 99,191,221,
-165,130, 87, 95,243,245,245,149, 61,229,163,168,252,249,211, 28, 64,169, 84,174,174,203,198,220,190,125,251, 10,128, 54,254,254,
-254, 3, 79, 18, 50, 31,120, 6, 74,233,242,187,119,239, 30,169,141,142, 57, 31, 15, 58,250,122,185,116,242,111, 42,225, 25, 85,
- 72,142,142, 69, 78,177, 26,231, 30, 38,228, 49,148,249,181,174,149,205,232, 74,238,119,242,109, 80,239,157,128,166, 82, 1,209,
- 34, 57, 42, 28,249, 42, 45,206, 62, 76,200, 7, 33,117, 30, 40,253,166,202,155, 22,241,199,109,123,191,129,193,132,144,243,243,
-167, 14, 19, 47, 90,187,247,141,154, 43, 27, 27,155,146,180,180,180,108,181, 90,109,155,158,158,174,181,177,177, 41,169,163, 73,
-123, 74, 8,105, 62, 99,198,140, 37,159,127,254,249,236, 85,171, 86, 9,235, 50,230,170, 42,114, 83, 18,142,188,211,244,205,239,
-127, 14, 14, 14, 14, 14,206, 96, 85, 74,153,153, 10, 10,242,181,151, 93,123,156, 89,252, 38, 10, 16, 21, 21, 85, 60,218,159, 84,
- 68,182, 4, 60, 24, 94, 87,179,204, 80, 29,169,179, 0, 67, 10,111, 60, 73, 40,186,249, 36,161, 8, 44,165, 44,165, 26,134, 65,
- 82,177, 78,183, 60,230, 89,114,221,103,209, 17, 98,188,253, 52, 81,117, 39, 54, 73, 77, 89,150,178,148,106, 9, 65,154, 94,207,
- 46,127,240, 44,254,232, 63,161,188,153, 17, 71,174, 59,249, 14,234,116,253,230,131,153,197,197,186, 77,153, 81, 71, 66,223,212,
-193, 22, 30, 30,174,119,118,118, 30,209,191,127,255,177, 44,203,254,152,146,146,162,175,171, 22,165, 84, 11, 96, 46, 33,228,112,
-100,100,228,254,208,208,208,212, 55, 97,174,254,214,253,207,193,193,193,193,193, 25,172,234, 8,137,122, 51,230,170,156,202, 34,
- 91,255, 77, 34,159, 60, 15,248, 59,116, 31, 60,121,222,236,127,161,188,105, 81,135,239, 0,248,240,239, 40,107,106,106,234, 89,
- 0,103,223,148, 30,165,244, 54, 33,164, 62, 0,222, 27, 49, 87,127,227,254,231,224,224,224,224,224, 12, 22, 7,199,255, 12,180,
-116, 64,151,129,171, 9, 14, 14, 14, 14,142,127, 10, 4, 64,112, 21,141,150,201,179, 3, 8, 33,193,117,104, 20,207,115,154,156,
- 38,167,201,105,190, 37,154, 25,213,104, 62,168, 65,179,170,200,182,195,255, 80,125,182,172, 66,115, 85, 13,154,115,171,121,251,
- 30,119,124,190,157,154,255,166,187,255,191,237, 1, 32,152,211,228, 52, 57, 77, 78,243, 95,160,217,140,171,207, 55,170, 57,151,
-171,207,127,159,230,219,246, 96, 56,139,201,193,193,193,193,241,183,117,147, 16, 34, 38,132,136,235,250, 62, 7,199,255, 42,181,
- 30,131,213,186,117,235,134, 0,112,235,214,173,167,127,227, 9, 57,213,217,217,121,188,159,159, 95, 19,161, 80,200, 20, 22, 22,
-126,125,241,226,197,197,175,126,238,157,166,130, 59, 60, 6,174, 47,124, 19, 32, 60,128, 97, 96,164, 72,190,114,191, 36,144,219,
-197,255, 93,156,157,157,207, 72, 36, 18,119,150,101, 97, 96, 41,140, 6, 99,233, 95, 35, 11,189,145, 66,167, 85, 39,104,138,243,
-123,214, 73,187,229,160,122, 6, 35, 93, 9,176,155, 9,152, 73, 20,236, 22, 66,153, 73,148,193,102,194, 98, 34,248,250, 53, 48,
- 8, 62,231, 11,249, 95, 42,195, 15, 36,189, 13,245,121,240,224, 65,222,235,124,127,240,224,193,149, 46, 19,229,239,239,127, 92,
- 34,145, 52,168,234,123, 37, 37, 37,169,247,239,223,239,242, 54, 31,171, 78, 78, 78,239, 48, 12,243, 61,128,166,175,188,245, 8,
-192,116,165, 82,121,225,117,127,163,181, 84,202,183,227,241, 38, 8, 8,153, 3, 0,122, 74, 87,103, 25,141, 91,111,149,148,252,
- 99,198, 16, 58, 56, 56, 92,225,241,248,141,138, 75,138,139, 11, 11, 10,188,204,205, 45,158,153, 73,165, 50,163,193,248, 36, 43,
- 43,227,157, 90, 94,203, 39, 3, 88, 83,246,255,108, 74,233,230,218,188,207,193,241, 86, 27,172,128,128, 0,111, 0,157, 9, 33,
-157, 41,165,239,248,248,248, 56,150,148,148, 32, 32, 32, 32,157, 16,114,133, 82,122, 25,192,229,240,240,240,152, 55, 81, 32, 30,
-143,247,237,134, 13, 27,102,125,250,233,167, 21,139, 52, 71, 68, 68, 84,254, 89, 6,174,151,142,157,119,184, 29, 25,131, 86,193,
-131,203, 12, 22, 3, 20,167,162, 75,247,214,117,250,125, 27, 27, 27,115, 7, 7,135,175, 9, 33, 67, 24,134,169,177, 49, 99, 89,
-214, 72, 41, 61,144,145,145,177, 40, 39, 39,167,176, 54,191,213, 42,208, 79, 95,234, 8, 43,131, 26,111,223,137,168,118,118,165,
-143,143,207, 29, 30,143,231, 90,118,113,122,245,194, 86,233,255, 70,163, 49,249,225,195,135,129,166,214,133, 68, 42,157, 77, 24,
-126, 48, 40, 91,154, 4,149, 48,143, 40,107, 56,175, 46, 41, 89, 99,202,246,138,197, 98,247,240,187,247, 26, 69,197, 60,131, 87,
-253,122,208,234, 12,208,234, 12, 56,122,254, 22, 90,248,212, 71,255, 62,221,235,124,172, 24, 41,249,122,225,244, 17, 93,150,109,
-216,221,234,203,233,195,101,203, 54,236,110,245,229,140,225,242,101, 27,119, 7,126, 57, 99,132,124,233,198, 93,129, 11,102,140,
-176, 88,182,113,183, 14,192,199,117,249,141,143,155,187, 23, 51, 70, 67,165,119,215, 44,143,175,249, 57, 50, 65,246,223, 56,113,
-199,142, 29,235, 93, 92, 92, 28, 53,182, 95,235,111,154,120, 56, 86, 58,254, 39, 47, 59,221,225,201,131, 91, 11,249, 18,153,239,
-123,179,127,169,246,252, 20, 10,133,158, 87,174, 92,105,196,178, 44,140, 70, 35, 12, 6, 67,197, 95,173, 86,139,247,223,127,255,
-141, 76,136, 9, 12, 12, 28, 75, 41, 93, 86,122, 88,146,165,119,238,220,217,244, 26, 55, 98,114, 62,159,255,153, 72, 36,234,108,
- 48, 24,154, 0,128, 64, 32,136,214,104, 52,151, 13, 6,195, 58, 74,105, 81,109,244, 24,134, 89,127,251,246,109, 95,185, 92, 14,
-157, 78, 87,177, 48, 60,143,199,243,105,211,166,205, 15, 0, 26,189,238,246,219,241,120, 19,218,119,236,184, 97,236,140, 25,188,
-220,219,183,241,253,246,237,235,145,155, 11, 0, 63,212,244, 93, 87, 87,215, 59,132, 16,215,218,252, 30,165, 52, 57, 57, 57, 57,
-176,118,215, 96,126,163,132, 36,165,131,187,155, 2, 0, 32,149, 74,101,183, 31, 60,119, 8,104, 90,191,214,145, 43, 0,107, 40,
-165,102,101,245,187,161,125,251,246,237, 8, 33, 6, 0,148,101, 89,134, 16, 50,140,101, 89,126,217,231,215, 16, 66,126,161,148,
-106,184,166,153,227,173, 54, 88, 1, 1, 1, 39, 1,116,246,241,241, 49,235,222,189, 59,252,253,253,225,238,238, 14,137, 68, 2,
- 0,200,201,201,113,140,138,138,250,224,222,189,123, 31,132,133,133, 33, 32, 32, 64, 5,224, 90,120,120,120,165,209,136,224,254,
-157, 62,149,200,197, 27, 1, 32, 51, 57, 59, 53, 57, 46, 99, 99,106,106,234, 26, 74, 41,251,194, 9,233, 53,106,212,168,153,211,
-166, 77,195,241,227,199,177,103,207, 30,104, 52, 26, 20, 22, 22,226,226,197,139, 85,220, 90,103, 32,247,226, 74, 64,246, 28, 72,
-188, 12, 72, 29, 0,153,227,235,220,189,125, 61,116,232,208, 25,255,199,222,117,135, 69,113,181,223,115,103,182, 23,122, 95, 80,
- 81, 16, 21, 84,164, 40,246, 30,187, 81, 99,139,189,151, 88,163,137, 49,198,196,154,216, 75,140, 93, 99,141,189,247, 22,123, 23,
-176, 34,130,130, 74, 89,122,103,217, 58, 59,243,251,131, 18, 36,148,133,248,125,201,247,203,158,231,153,103,119,103,102,207,220,
-185,115,231,222,115,223,251,222,247,250,248,248, 20, 69, 29, 55, 24, 12, 96, 24, 6, 6,131, 1, 25, 25, 25,152, 49, 99, 70, 97,
-229, 5,150,101,113,245,234,213, 41,179,102,205, 2,128, 47, 75,227,252,164,141,103, 48,143, 16, 55,246, 15, 81, 22,119,249,102,
- 84, 32, 64,232, 71,193, 79, 72,233,226,171, 17, 93,113, 69, 72,187,133,134,134, 58, 10, 4, 2,147,238,141,101, 89,248,251,251,
-155,116,174,171,171,107, 59,153,220,114,255,103,131,198,216,248,249,251,241, 93, 93, 92, 96, 96, 24, 68,191,141,105,242,228,113,
-136,223,165,211, 7,199,186,186,186, 14,138,143,143, 47,119, 65,106,163,145,197,147,176, 72, 92,185,253, 24, 61,249, 98,168, 52,
- 58,168,212, 58,236, 57,117, 23,113,201, 89, 85,126, 78, 65, 65, 65,174, 82,218,161,201,148, 81,189,101,203,127,217, 45,155, 50,
-170, 55, 86,172,223, 83,240,185, 91, 54,101, 84, 47,172, 88,191, 75, 62,101, 84, 47,252,188,113, 71,211,160,160, 32,215, 7, 15,
- 30,196,151,197, 87,214, 51,162,140,140,104, 91, 88, 60, 13, 0, 41,155, 55,195,144,156, 12,197,188,121, 0,128,177, 62,174, 38,
- 15,107, 52,104,208, 32,152,199,227, 85,216, 56, 50, 12, 19,247,252,249,243, 64, 83,196, 21,195, 48, 28,143,199,251,254,246,111,
-139,142,180,240,171,243, 65,102, 70, 68, 68, 88,253,240,195,247,253, 14,133,228,112, 3, 2, 44,194, 78,172, 24, 85,174,200, 98,
- 89,150,210,106,181,136,140,140, 44, 53,202, 62, 69, 81,198,170, 60,167,182,109,219,138, 84, 42,213, 62,185, 92,238,171, 82,169,
- 70,113, 28,247,195,245,235,215,157, 40,138, 66,199,142, 29,127, 8, 12, 12,124, 43, 22,139, 55,170,213,234,199,114,185,124,208,
-245,235,215, 77,106, 92, 9, 33,173, 45, 45, 45,247, 28, 63,126,220,198,223,223,159, 74, 77, 77, 69,205,154, 53,145,158,158,222,
-228,230,205,155, 1,163, 71,143, 30, 77, 8, 25,198,113,220,205, 74, 36,183,174, 84, 42,229,134, 15, 31, 78,140,198, 63,110,247,
-215, 95,127, 69,128, 75,146,231,132, 46,178, 60,141,142,203,250, 61,210,106,130, 64, 32,184,253,238,221,187, 74, 23, 96, 62, 33,
-179, 70, 77,159, 78, 11, 18, 18, 32,139,136, 64, 15, 66,120, 91,243,173, 89, 27, 76,184,103,183,213,235, 86, 56, 10,133, 66, 48,
- 12, 83, 36, 2, 11,235, 40,131,193, 0,189, 94, 15,131,193, 0,163,209, 8,131,222,128,109,155,119, 84,249, 29,147,202,164, 82,
-103, 23,151, 36,137, 84, 38,253, 24,141,141, 72, 36,226,237,222,189,123,144, 80, 40, 4, 0,232,116, 58, 52,104,208,128,152,155,
- 97, 51,254,141, 22,172,174,215,175, 95, 7,195, 48,176,176,176, 0, 77,211, 37,173, 27,104,221,186, 53,130,130,130,208,177, 99,
- 71,188,122,245, 74,178,108,217,178, 50,205, 17,131,103,246, 64, 53,175,124,225, 99, 48,176, 46,119,206, 62, 94,250,235,162, 35,
- 14, 0,102, 22, 55, 24,140, 31, 63,158,164,165,165,161,127,255,254, 55,181, 90,237,167, 28,199,149,185, 92,142,145, 69, 92,187,
-207,135,128,229,136,100,205,131,109, 68,167, 81,115, 20, 69,169, 11,135, 8,171,216, 43,238,175, 80, 40,112,224,192, 1,232,116,
-186, 63, 29,183,180,180,196,139, 23, 47,138,139, 28,248,249,249,209,132,144,254,101, 9, 44,138, 16,183,243,215, 95, 23,205, 8,
- 26,248,169,159,160, 83, 27,207, 36, 30, 37,228, 0,144,239,190,251,174, 72,176, 1,192,130, 5, 11, 76, 78,175, 64, 32,192,171,
- 87,175, 64,211, 52,222,180,200,239, 96, 55, 8,141, 5, 77,211,120,226,155,223, 3,109,254, 58, 19, 52, 77, 67, 46,151,155, 42,
-174,218, 58,185,184,157,248,118,222, 18, 11,141,129,195,217,171, 15, 17,163,188, 12,142,227,224,226,104,139,230, 1,254,252,250,
- 13, 27, 57,254,186, 97,249, 9, 87, 87,215, 94,241,241,241,215,203,226, 50, 48, 70,120,123,213,194,238,227, 55,177,120,227, 81,
-164,101,171,145,147,151,159,175, 29,154,250, 96,123,213, 45,157, 43,234,186,187, 87,219,121,232, 2,154, 53,109,140, 93,135, 46,
-162, 89, 80, 99,228,255, 14,194,174, 67, 23,208,188, 89,254,103,125,111,207,234,233,239,178, 86,160,156,216, 94,127,122, 70,189,
-242,159, 81, 77, 90, 80,212, 0,188,155, 56, 17, 0,138, 4, 86,165, 94, 52, 30,207,237,241,227,199,142, 21,157,231,231,231,103,
-146,229,138, 97, 24, 36, 39, 39,147,204,204, 76,206,218,218,186, 95,113,145, 85, 40,174, 14, 6,103, 67,125,127, 61,249,237,212,
- 13,118,200,167,109,194, 78,172, 24,229,211,175, 95,191,151,165,241,234,245,250,183,157, 58,117,226, 10, 26, 62, 87,161, 80, 40,
- 40, 33,192, 20, 45, 90,180,248,147, 64,171,104,232, 80,165, 82,237,219,186,117,107, 31, 79, 79, 79,124,246,217,103,151,124,124,
-124,132, 82,169, 20, 23, 46, 92, 64,181,106,213,236, 45, 44, 44,206, 45, 89,178, 4,171, 87,175,174,126,233,210,165,253, 0,250,
-152,240,142,118,108,215,174,221,129, 51,103,206,136, 5, 2, 1,212,106, 53, 94,188,120, 1, 43, 43, 43, 8,133, 66,244,234,213,
-139,110,209,162,133, 93,219,182,109,143, 18, 66, 6, 85,102, 70,147, 70,163,225,230,204,153, 3,169, 84, 10,169, 84, 10,153, 76,
- 6,153, 76, 6,137,128, 37,155,167,213,148, 76,221,154, 41,249,114,222,230,165,123, 54,206,191, 86,189,122,245, 31, 98, 98, 98,
- 50, 43, 91, 22, 50, 30, 61,130, 44, 34, 2,154,224,224, 74,151, 35, 43,153, 45,102,207,158, 93, 81, 89,131, 64, 32, 64,243,230,
-205, 43,228,243,246,246,222, 76,211,180,195,135, 98,154,208,223,127,247, 45,243,252, 69,132, 76,111,228,100, 26, 45,131,197, 11,
-191,103,104,138,162, 27, 52,104,112,156,227,184,148, 23, 47, 94, 76, 48,193,122,166, 37,132,124, 77, 81,212,207, 34,145,136,231,
-238,238,254,254,251,239,191,191,151, 63,212, 0,112, 28, 71,185,187,187, 55,145, 72, 36, 53,180, 90, 45, 3,224,107,179,245,202,
-140,127,139,192,130, 92, 46,199,163, 71,143, 64, 8,129,133,133, 5, 44, 45, 45, 97,101,101,133,236,236,108,132,133,133, 33, 60,
- 60, 28,239,222,189, 3, 33, 4, 30, 30, 30, 40,124,113,138,189, 96, 69, 21,219,190, 85,103, 32,150,139, 64, 8,224,223,222, 23,
-190,173, 27,160,241,195,168,105, 10,133, 98,171, 82,169,140, 36,132,240, 26, 52,104, 48,186,105,211,166, 88,189,122, 53,180, 90,
-237,234,210,196, 85,113,206,155, 47, 12,129, 0,160, 80, 40,190,218,123,225,141,116,104, 23,207, 60,165, 82,185,178,178,153, 80,
-178, 2, 78, 77, 77, 5,203,178, 38, 91,133, 50, 51, 51,203,229, 44,105, 17, 88,188,116,141,117, 78, 86, 18, 22, 45,219, 11,131,
-193,128,153, 51,103,130,101,217,162,173, 52,190,210,210, 89, 56,244, 71,211,244, 7, 2,184,162,223,229,113, 58, 56, 56,200, 68,
- 98,233,254,175,190, 91,100,241, 52, 34, 14,103,174, 62, 4,199,113, 56,185,245, 7, 0, 64,175,113, 11, 17,159,152,138, 22, 1,
-245, 48, 98,194, 12,139, 53, 63,205,217,239,224,224,224,153,146,242, 71,240,217,226,156, 6,134,197,209, 11,247,160, 76,203,197,
-240,207, 58, 64,163,213, 35, 37, 57, 17, 59, 54, 44,199, 23, 35,142,194, 70, 46,113,246,240,240,136, 40,158, 71, 28,199, 17,129,
- 64,112, 59, 34, 34, 98, 76, 89,233, 52, 24, 12, 93,191,157, 49, 22, 63,111, 59,138, 6,181,157,113,250,242, 93, 4,214,175,129,
-243, 87, 31,162,105,195,154,184,120, 35, 4, 77,125,107,225,198,253, 23,152, 62, 97, 24,190,158,118,187,107,101,158,209,143, 75,
-214, 88,231,100, 39,225,204,143,187,145,188, 97, 3,222, 79,158,140, 38, 5,231, 60, 36, 4, 2, 55, 55,192,162,226,252, 44,137,
-151, 47, 95, 66,171,213,150,214,187,135,183,183,119,133,207,168,208,114,149,148,148, 68,146,146,146, 32,147,201,200,203, 23,207,
-141,222,245, 27,244,227,194,143,108, 3,128,124,203, 85, 54,242,238,174,131,250,222, 47, 16,212,124, 74,109, 91, 56, 65, 55,246,
-135,205, 97,197, 26,183, 15,210,249,228,201,147,162,252,105,218,180,105,248,237,219,183,235, 22,150,175,130,161, 66, 1,195, 48,
- 94,133,195,134, 12,195, 64,171,213, 98,208,160, 65,116,121,247, 46,145, 72,124, 61, 60, 60, 16, 18, 18,130, 9, 19, 38, 8,219,
-181,107,135,215,175, 95,131, 16,130,145, 35, 71,194,199,199, 7, 41, 41, 41,104,220,184, 49,110,221,186,229,103, 66,153,183,144,
-201,100, 59, 78,159, 62, 45,166, 40, 10, 57, 57, 57, 96, 89, 22, 45, 90,180, 0, 69, 81,120,254,252, 57,190,251,238, 59, 28, 59,
-118, 12, 39, 78,156,144, 4, 4, 4,236, 32,132,120,115, 28,151, 99,194, 51,226, 52, 26, 13, 39, 18,137, 32, 18,137, 32, 22,139,
- 33, 22,139, 33, 20, 10,161,214, 83, 24,183,230,189,150, 22,219,179,245,253, 90,122,142,156,250, 19,181,242,251, 81, 87, 1,156,
- 44,224,124,110, 74,125, 97,224,184,229,235,183,111, 95,215, 29,249, 19,140, 14,231,228,176, 6,142, 91,110,202,187, 9, 0,185,
-154, 44,212,240,112,195,209,131, 39,208,119, 96,239, 82,197, 21,159, 47,128,128,207,135,165,173,172, 66, 78, 62,159,111, 31, 26,
- 26,106, 93,188,126, 96, 24,230,229,148, 41, 83, 60,122,247,234,238,116,232,216, 25,122,232,192, 94, 70,103, 39,135,212,216,216,
-247,175, 1, 88, 7, 4, 4,112,166,150,121,142,227, 54,250,249,249,249, 31, 63,126,124,212,236,217,179,131,191,250,234,171, 69,
-197,143,175, 88,177, 98,225,185,115,231,106,244,233,211,103,207,227,199,143, 55, 22,251,223,178,143,221,216,253, 39, 66, 7,152,
- 57,205,168,178,192, 42,222,248,100,103,103, 35, 59, 59, 27,177,177,177,216,188,121,115,193,139,204, 7,143,199, 3,143,199, 43,
-242, 87, 40, 11, 87, 78,223,250, 5,192, 47, 1, 1, 1,252,103,247, 14,159,159,181,117,106,135,192,142,254,116,200,239,207,250,
- 1, 88, 12,160,235,240,225,195,237, 1, 96,247,238,221,169, 0,206,255, 29, 25,194,113,220,225,200,200,200,233, 46, 46, 46, 69,
- 62, 40,197,135, 9, 25,134,129, 88, 44, 70,161,175,138, 86,171,197,190,125,251, 24,142,227, 14,151,151,127, 17, 47,174, 34,242,
-197,181,252,255,177, 44, 88, 99,254,255, 53, 26, 13,230,207,159, 95,124,234, 43, 38, 78,156, 8, 84, 98, 45,228,178, 44, 87,205,
- 34, 51,192,227,241,112,171, 86,190, 18,232,150,194,253,201, 87,235, 79, 67, 24, 66,241,204,110,159, 13,177,101, 56,186, 72, 92,
-229,223, 67,190,224, 20, 10,120,144,136, 4,136,136,138,129,187,107, 0, 58,116,235,109,115,229,204,209,153, 0, 74, 53,187,233,
-141, 44,186,182, 13,192,134,131,215,145,157,171, 70, 86, 70, 58, 82, 98, 94,226,229,211, 71,224,241,120, 8, 14, 14,182,176,180,
-180,178,168, 85,171, 38,140, 44,139, 59,247,130,193,129,224,244,169,227, 30, 53,106,214,194,251,183,209, 99,202, 16,182,188, 22,
-129, 62,200, 77,139, 3, 77,211,104,238,231, 9,154,166,209, 42,176, 14,104,154, 70,203,198,117,193,227,241,208,182,169, 15,106,
-215,174,141, 66, 63,143,242,159,209,239,136,124,113,189,152,216,229,192, 1,208, 39, 36,252,185,161, 76, 72, 0,103,225, 88,217,
-178,133,111,190,249, 38, 51, 33, 33, 65, 95, 82,208, 41, 20, 10,193,177, 99,199,172, 43, 90, 4, 91, 38,147,249,240,120,188,176,
-244,244,116, 86, 42,149, 82, 44,107,100,189,235, 55,160,111,255,182,232, 72,225, 57, 11, 23, 46, 58, 50, 32,192,178,223,222,195,
-103, 56,129,123, 75, 66,248, 34,102,236, 15,155,133, 60,177,204,199,196, 78, 3,165,213,106,241,234,213,171, 10, 23,229,230, 56,
-174,220, 2,165, 82,169, 70,244,237,219,247,210,196,137, 19,197,132, 16,220,186,117,171, 72,240,211, 52,141,168,168, 40, 80, 20,
-133,173, 91,183, 66,171,213, 78, 52,193, 18, 56,253,232,209,163, 86, 66,161, 16, 57, 57, 57, 69,239, 13, 77,211, 8, 15, 15,199,
-202,149, 43, 49,124,248,112,196,196,196, 64,161, 80, 96,230,204,153,242,165, 75,151, 78, 7,176,208,132, 91,127,170,211,233, 2,
-165, 82, 41,196, 98, 49, 10,133, 22, 0,132, 36, 56, 61,143,142,142,110,104,111,111,239,236,112,227,204,169,230,237, 62,109,100,
-231,224,210,172, 80, 96,153,138, 24,131, 97,171, 82,165,154,219,127,199, 14,199,155,167, 78,177,207, 79,157,138,227, 25,141, 91,
- 76, 46, 67, 6, 10,239,163,226, 16, 16, 16,128,144,144, 16, 4, 4, 4,124, 96,205, 22, 10,133, 16, 8, 4, 16, 8, 4,176,183,
- 49,201, 85,130,163,105, 26,137,137,137, 31,236, 27, 55,110,220,251, 33, 67,134, 56, 2, 64,130, 50,142,251,114,250,148,248,212,
-212, 84,206,201,169,124,206, 70,141, 26,221,164, 40,202,189,132, 40,182, 25, 63,126, 60, 50, 51, 51,187, 77,156, 56,177,101,190,
-149,140,138,223,176, 97,195, 80, 0, 16, 10,133, 85, 30,130, 54,195,140,255,121,129,101, 10, 42, 18, 88,133, 8, 9, 9, 49,184,
-186,186,110,139,124,252,174,131,167,175, 7, 36, 50, 81, 39, 66,200, 47, 34,145,104,198,176, 97,195,112,255,254,125, 60,127,254,
-252,215,191,186,236, 73,195,134, 13, 47,138, 68,162, 26,165, 29,211,106,181,239,159, 61,123, 86,170,175, 88,114,114,242,188,135,
- 15, 31,162, 60, 39,247, 1, 3, 6, 20,111,140,138,156,220,203,172,193, 88, 14, 6,189, 1,170, 60,245, 31,141,119,129,192, 82,
-169, 84, 24, 56,112,224, 7, 22,172,228,228,228, 42,221,115,101, 44, 87,101,129,162,233,206,190,141,252,249, 87,239, 62,253,160,
-113,237, 61,126, 49, 68, 2, 30,164, 34, 1,196, 34, 62, 36, 34, 1, 98,227,147, 80,175, 94, 3,193,141,139,103, 58,151, 37,176,
- 12, 12,139,229,191,158, 5, 0, 28, 62,125, 21,129, 53,165, 88, 48,247, 27,244,239,223, 31, 66,161, 24, 71,143, 30,198,202, 13,
-187, 49,161, 70,254,163,106,210,216, 15, 43, 54, 29,192,162,133, 11,168,195,135, 14,183, 52,161,193, 5,143,199, 3, 77,211,127,
-250, 44,252,110,138, 53,146, 99, 57,232, 75, 62, 35,150, 3, 56, 14,110, 63,254, 8,183, 31,127,196,195, 2,113,234,163, 82, 65,
-173, 86, 3,109,125, 43, 37,174,116, 58, 29,148, 74,165,254,201,147, 39, 78,165, 52, 76, 73, 58,157,174, 66, 65,179, 99,199,142,
-136, 81,163, 70,249,216,218,218,134, 61,125,242,196,224,219,168, 17,191,164, 15, 86,157, 58,117,178, 22, 46, 92,116,100,104,255,
- 30,253, 54,127,251, 57, 51, 97,225, 30,158, 41,142,238, 69,162, 88,175,127,219,177, 99, 71,147, 36,190, 90,173, 78, 44,235, 88,
- 96, 96,224, 40, 66,200,143,117,234,212, 17,181,107,215, 14, 55,111,222,196,143, 63,254,200, 50, 12,147, 10, 0,205,155, 55,119,
- 88,180,104, 17, 9, 11, 11,131,181,181, 53,146,147,147,119, 5, 6, 6, 46, 42,207,241, 93, 40, 20,182,109,220,184, 49,165,213,
-106,255, 36,174,150, 46, 93,138, 65,131, 6,161, 78,157, 58, 96, 89, 22,185,185,185,104,215,174, 29,127,221,186,117,109, 77, 17,
- 88, 20, 69, 77,235,208,161,195, 74,228,207, 34, 44, 46, 28, 95, 2,248,186,192,186,157,216,163,239,240, 23,173, 58,126, 22,232,
- 94,187,129, 75, 69,156, 78, 78, 78,223, 82, 20, 53, 0, 0, 13, 32,150,178,181,173,237,224,224,224,212,186, 71, 15,228, 18, 66,
-111,185,112,129,240, 36, 18, 57, 0,147,134, 26, 53, 6, 21,106,120,228,187,242,245, 29,216, 27, 33, 33, 33,232,247,121, 31, 8,
- 4, 2,240,120,124, 8,248,124,240, 5,249, 22, 44,107,123,203, 42,213, 35, 5,157, 71, 98,101,101, 5,112,128,165,149, 85,161,
- 37,147, 0,224, 40,138,226,202, 41,231, 94,123, 39,143,115, 20, 88, 90,129,101, 12,168,254,105,191,162, 50, 29,185, 99,163, 4,
- 44, 43,201,141,121,139,105,215, 30,242, 97,134, 25,102,129,101, 26,138, 59,133,150,134,246,237,219, 79,177,176,176, 88, 87, 80,
-241, 34,246,126, 60, 98,239,199,195,187,110,253, 22,254,141, 2,179, 6, 13, 26, 4, 59, 59, 59,124,245,213, 87, 28,128, 95, 43,
-123,253,168,136, 23,114, 0,156, 66,161,248,170,192, 34,208,232,225,195,135, 14,143, 30, 61, 66,227,198,141,139, 55, 30,104,217,
-178,236,118,187, 96,102,220,151, 40,195,159,170,138, 86, 49,232,245,122,228,229,169,161,211,233,193, 24, 88, 48, 12,131,128,250,
- 22,216,179,117,118,254, 62,166,208, 90,150,111, 37, 19, 9,180,104,211,180,154, 1,132, 82,223,184,247,190,220,154,178, 52,203,
- 21, 77,211,184,237,145,255,183, 78, 9, 6,147,133, 22,199, 26,235, 58, 59, 57, 33,230,194, 3, 0,128, 92, 42,198,197,221,139,
- 32,147,230, 79,110,232, 54,124, 14, 36, 34, 1, 36, 34, 62,244,122, 61,156, 28,107,130, 49, 26,234,150, 41,188, 13, 58, 93, 13,
- 39, 43,184,116,107,138, 39,143,238,225,203, 41, 99, 49,106,212,104, 8,196, 22,184,113,227, 26, 98,148,201,120, 29,151,129, 41,
-243, 54,194,192,176,208, 51, 70,232, 13, 70,172,221,117, 22,122, 35, 87, 97, 35, 47, 16, 8, 48,115,230, 76, 73, 89,199, 15, 28,
- 56,160, 54,253, 25, 25,160, 82,169,161,213,106,161,215, 49,208, 27, 24, 24,107, 9,176,104,238, 96, 48,122, 6,121,159, 55,131,
-222,192,128,157,222, 7,122,157, 1,177, 82, 30,213,178,177,194, 0, 80,234,219,143,226, 44, 43,226, 47, 20, 5,229, 9, 48, 83,
- 80, 40,178,124, 27, 53, 10, 27,209,189,201,210, 59,247, 30,165,220,185,247,232, 79,231,121,212,111, 18, 61, 97,201,129,217,149,
- 17, 87,192,135,195,133,127,177,220,255,112,253,250,117, 39,185, 92,142,136,136, 8,208, 52, 13, 66, 72, 90, 72, 72,136, 19, 0,
-204,159, 63, 63,149,207,231,219,209, 52,141,233,211,167,131,199,227, 57,124,241,197, 23,223, 3, 88, 95, 78, 71,206,219,194,194,
-226, 3,235,149, 64, 32,192,236,217,179, 49,116,232,208, 34,113, 37, 16, 8,176,107,215, 46, 4, 6, 6, 66,167,211,121,155,146,
-222,184,184,184, 71, 0, 90,153, 32, 64, 72,129, 40,175,176,124, 82, 20, 53,226,201,196,137,181, 53, 15, 31,226, 11,150,245,169,
- 91,183, 46, 52, 26, 77,209,113, 79, 79,207,234,113,113,113,137, 10,133,226, 55, 0, 27,149, 74,229,227,242,248, 12, 26, 22,239,
-163,226, 10, 59,171,104,210,164, 73,145,197,170,184,245, 74, 32, 16, 64, 34,148, 87,250,153,177, 44,139,236,236,108,122,215,174,
- 93,181,124,124,234, 19, 0,240,246,174, 79,206,158, 61, 87, 93, 46,151, 71,219,218,218,234, 43,124, 39, 45,173,112,101,244, 64,
- 0, 64,255,246, 93, 10,173, 88, 8, 94, 52, 7, 60, 62, 31,141,102,204, 1,240,176,232,124,157, 78, 7,150,101,105,152, 97,134,
- 89, 96,149,241,226, 27, 12,229, 30, 95,189,122, 53, 26, 54,108, 88,110, 3,180,110,221, 58,236,221,187,119, 53,199,113, 81,149,
-189,126,143, 14,254,245,177,230,248, 11,143, 58,249,149,194,194,233, 61, 41,149, 74,133, 59,119,238,192,202,202, 10,175, 95,155,
- 22,182,235, 63, 17,166,129,227, 0,189,129,129, 42, 79, 3,157, 78,135,233,179, 76,154,153, 78,244,186, 28, 94,247, 46,173,203,
- 20, 15,133,195,125, 20, 69, 85,232,131, 85,209,208,224, 7, 22, 12,131, 1,133, 77, 71,110,158, 6,237, 7,127,139,135, 39,215,
- 2, 64,190,184, 18,243, 33, 17, 10, 32, 17,242, 64, 17,128,160,108,110,131, 58,251,211, 53,139,102,221,218,244,235, 30,183,222,
-173,199, 98,202,228, 41,224, 9,165,176,177,115, 0,195,114,168,174,112,196,155,248, 12, 28,253,101, 86,193,168, 40,135,214, 67,
-230, 99,245,220,177, 88, 49,175, 98, 35, 38,143,199,195,250,245,235,213, 37,173, 86,197, 63,185,138,219,193, 63, 4, 86,158, 26,
-106,141, 22, 95,125,187,209,244,103,212,185,149,196,148,147,203, 19, 80, 21, 9,176,210, 68,150, 41,239,111,163,222,152,251,119,
- 86, 48, 44,203,226,236,217,179, 69,207,163,172,103,104,170,181,149,101, 89,188,127,255, 30, 47, 94,188, 64,211,166, 77,145,149,
-149, 5, 62, 69, 97,230,179,103,240, 25, 54, 12, 58,129, 0, 44,203, 66, 40, 20, 98,252,248,241, 38,231,103, 37,149, 99,129, 31,
-155,177, 92,114, 23, 23,151, 85,245,234,213,171, 29,149,145,129,144, 39, 79,208,100,220, 56, 0,192,237,219,183,139, 91, 0, 49,
-120,240, 96, 97,116,116,244,232,240,240,240,209, 46, 46, 46,171, 19, 18, 18,102,150,249, 62,113,218, 34, 31,172, 1,131,251,162,
-118,189, 90,216,187,115,127,209,241, 25, 95, 79, 3,159, 47, 0, 95,192,135,181,149,117,165,111, 45, 59, 59,155,183,106,213,106,
-223,160,160,166,146, 33,195, 70, 82,122,134,195,162,101,107,233, 67,251,247,216,237,222,179, 87, 34, 22,139, 95, 86,248,140, 12,
-250, 63,213, 83,132, 16,240,248,124,240,132, 2,128,101,193,113,156,108,197,138, 21, 11, 95,188,120,209,184, 94,189,122,208,106,
-181,195, 8, 33,161,230, 56, 88,102,252,171, 4, 22, 77,211, 21, 90,167, 40,138,170,112,136,112,198,140, 25,176,176,176, 40,171,
-225,225,158, 61,123, 22,150,144,144,176,149,227,184, 42,197,197, 57,243,123,232,139, 5, 95,246,201, 1,160, 6, 0,107,107,235,
-212,246,237,219,231, 2,208, 31, 58,116,232,131,115,181, 90,237,251,178,120, 28, 29, 29, 23, 44, 95,190,124,106,215,174, 93, 41,
-138,162,254, 84,185,151,220, 12, 6, 3, 78,159, 62, 61,117,201,146, 37, 40,203,234, 85,216,120,231,169,212, 80, 23, 56, 56,191,
-121,126,196,212,202,188,194, 83,158, 54,114, 45,213,114,245,137, 82, 15,154,166,113,222, 49,255, 62,186,165, 84,204, 69, 40, 58,
-226,237,251,216, 38,206,246,214,200,200,202,133, 72,200,135, 68,244,135, 53, 95, 34,206,183, 94, 73, 68,124,216, 88, 91, 32, 45,
- 45, 9,124, 62, 63,162, 28,225,240,158, 16,210,106, 96,159,110,151, 40,154, 39, 46,126,140, 47,177,148, 94,190,243,204, 38, 41,
- 93,133,226,198, 0,150,229, 48,117,209, 78,211, 10, 48,143,135, 73,147, 38,149, 41,112, 78,157, 58, 85,105, 11,150, 90, 83,201,
-103,100, 34,127,121, 67,128, 21, 29,175, 8,133,179, 11,101, 50,153, 79,129,248, 50, 25,141, 26, 53, 58, 47,149, 74, 77, 14,114,
-100,106,208, 81, 66,200,194,246,237,219,255,232,230,230,230, 56,113,226, 68, 66,211, 52, 2, 3, 3,237,127,248,225,135,172,124,
-203,136,183, 69, 97, 29,179,102,205, 26,188,124,249, 50,133, 16,178,168, 60, 78,161, 80, 24,110,101,101, 21,216,174, 93, 59,100,
-101,101, 33, 54, 54, 22, 50,153, 12, 62,171, 86,225,217, 23, 95,160,209,230,205,160,218,183, 7, 33, 4, 66,161, 16,207,158, 61,
-131, 68, 34, 9, 47,139,207,213,213, 53,136,203,119, 50,111,129, 63,134, 5, 57, 0,119, 8, 33,179,226,227,227, 31,148, 82,223,
- 81, 0, 96,100, 89,174,130,251, 31,252,237,183,223,130,146, 72,224,210,172, 25,212, 81, 81,208,235,245,104,218,180,105,145, 85,
-189,105,211,166,160,105, 26,181,107,215,134,173,173, 45,142, 29, 59, 54, 24, 31,206,172,254, 0,154, 92, 61,222, 71,197,161, 89,
-179,102, 69,150,170,238,221,187, 23, 89,176,248,124,126,145, 37,139, 24, 43, 22,172,132, 16,174, 68, 93, 76,132, 66,129,104,248,
-200,209,212,172,175,190,100, 13,140,129,165,105, 62,245,213,220, 37,212,235, 87,207, 69, 42,149,138, 34, 21,244,214,170,247,234,
-143,254, 29,242,141,160, 71,107, 59,128, 46, 16, 86,189,158,199, 21, 61, 23,203, 51,191, 11,151, 46, 93,218,175, 94,189,122,249,
-195,237, 0,207, 28, 7,203,140,127,147,192,138,124,242,228,137, 87,253,250,245, 17, 19, 19,243,167,153,109,133,239,152, 76, 38,
-131, 68, 34, 41,180, 16, 69,150, 69,118,245,234,213, 95, 0,252, 82,248, 91,161, 80, 52,107, 55,160,237,221, 38, 93, 26, 99,223,
-146,253, 89, 9, 9, 9,190,133, 49,177, 8, 33, 68,161, 80, 12,229, 11,121, 3, 61, 26, 84,111, 3,150, 93,126,229,212,237,249,
-229,221,136, 71,157,250,185, 0,212,197,102, 17,174,172, 74,134, 16, 66,250,119,237,218,149, 10, 11, 11,195,192,129, 3,177,119,
-239,222, 50,207, 29, 58,116, 40, 14, 28, 56,128,206,157, 59, 83, 75,151, 46,237, 95,145,192,202,183,142,232,254, 99, 15,179, 52,
-203, 85, 73,145, 88,161, 16, 96,153, 43,207, 30,135,248,249, 6, 54,231,191,139, 75,130, 88,200,131, 88,244,199,140,125, 73,129,
-255,149, 68,196,135,179,131, 13, 30,222,189,174,103, 24,195,149, 10,196,197,123,148, 18,164, 81,100, 97, 31,241, 73,139,134, 54,
-165,253,103,213,183,195,208,240,224,170, 10,211,203,231,243,177, 99,199, 14,117, 89,214, 43, 83,243, 32,223,202,104, 64, 94,158,
- 26,121,106,205, 71,123, 38, 78, 78, 78, 14,142,142,142,155,172,173,173,197,165, 9,168,146,199,255,138,184, 42,136,139, 21, 54,
-106,212,168, 74,137, 44,161, 80, 88,243,206,157, 59, 69, 65, 70,203,251,212,233,116, 24, 48, 96,128, 73,150,239,224,224,224, 29,
-254,254,254,111, 28, 28, 28, 46,251,248,248,136,222,188,121,131,197,139, 23, 19, 62,159,111, 89, 88,127,228,228,228,128,166,105,
-100,100,100,128, 16, 50, 34, 56, 56,248, 66,121,156, 90,173,246,198,141, 27, 55,252,122,246,236, 73,135,135,135,131,166,233,252,
-116, 53,107,134, 70,155, 55,227,249,151, 95,162,205,187,119,208,232,245, 16,139,197,184,120,241,162, 62, 47, 47,239, 70, 57,247,
-190,245,222,189,123,245,197, 98, 49,244,122, 61, 88,150, 5, 69, 81,132,199,227,181,244,241,241, 89, 7,160,113,137, 14,152,227,
-248, 25,203,234, 26, 25,198,152, 16,243, 38,197, 4,139, 16,246,238,221,139,166, 77,155,162, 77,155, 54,136,143,143, 71, 84, 84,
- 20,186,117,235, 86,116,206,147, 39, 79, 16, 26, 26, 10, 79, 79,207,138, 45,120,148, 1,158,117,107, 66, 32, 16,128,207,231, 67,
-192,207,255,204,223,242, 45, 87, 2,190, 0,124, 30, 31, 98,137,216, 68,237,255, 97,153,180, 42,176,124, 73,165, 18,182,118,237,
-218, 97,175,223, 68,249,128, 3,101,105,105,101,146,175,109, 33, 31, 33,164, 72, 92,241,133,130, 34, 75, 22, 0,100,101,101,105,
-122,247,238,253,155, 86,171, 29,137,143, 56,146, 98,134, 25,255, 43, 2,171,219,152, 49, 99, 54,119,234,212,169,195,204,153, 51,
- 33,151,203,145,144,144, 80,244,130, 9,133, 66, 84,171, 86, 13,121,121,121,184,121,243, 38, 50, 51, 51,175, 2, 24,111,234,133,
- 19, 18, 18,238,191,126, 28,153,214,174, 95,115,187,250,205,235, 90,199, 70,198, 53, 5,112,183, 64, 92,253, 58,104, 70,183,145,
-237, 62,107, 2,129,144,143,216,215,137,255,181, 12,161, 40,138, 38,132, 96,224,192,129, 38,157,255,249,231,159,227,198,141, 27,
- 40,111, 56,177,200,130,149,167,129, 74,253,241, 58,103,132, 16, 24,141, 70, 52,141, 72,255, 96,102, 86,161,229,170, 80, 88,152,
- 98,185, 42,234, 33,231,229,173,184,117,229,228,184,122, 13, 26, 57, 52,245,243,194,235,232, 56, 44,159, 51,182,232,248, 87, 19,
- 6, 97,215,193, 83,112,117,182,135, 38, 47, 7, 23,206,157,206,202,206,206, 94, 81,213,123,216,125, 34, 63, 14,100,171,193, 31,
-206, 17, 24,248,229,207, 38,253,159,207,231, 99,228,200,145,101, 90,176, 46, 95,190,172, 54,101,120,148,227, 56,232,117, 6,228,
-170,212, 80,231,125, 28,129,165, 80, 40, 26, 53,109,218,244,242,150, 45, 91,236,236,237,237,161, 84, 42, 63, 16, 88, 10,133,162,
- 81, 80, 80,208,229, 45, 91,182,216, 57, 56, 56, 32, 54, 54,214,228,240, 32,165,136, 43,164,164,164,144,140,140, 12,214,198,198,
-166, 82, 34,139,162, 40,104,181, 90,188,124,249,210,212,119,196,228, 25, 95,114,185,124,231,146, 37, 75, 68,201,201,201,160,105,
- 26, 47, 95,190,252,160,172, 22,110,223,126,251, 45,230,204,153,179, 9, 64,141,242,248, 24,134, 89, 61,116,232,208,209,241,241,
-241, 54,142,142,142, 72, 72, 72,128, 80, 40, 4,199,113, 32,237,218,161, 85,116, 52,244, 70, 35, 36, 18, 9, 34, 34, 34,176,117,
-235, 86,149, 86,171, 93, 93, 26,151,167,167,167,144,162, 40, 47,129, 64,128, 33, 67,134,124, 88, 46,119,239, 70,179, 26, 25,129,
-227, 62, 17,229, 50, 16,107,147, 36, 93,207,211, 52, 77,198,127,181,188, 78, 80,235,238, 13, 94, 61,127,240, 38, 37, 41,238, 78,
- 5,183,111,208,233,116,168, 87,175, 30, 30, 61,122,132, 43, 87,174,160,125,251,246,104,221,186, 53,174, 95,191,142,224,224, 96,
-132,134,134,130, 16, 2, 59, 59,187, 66, 55,139,114,125, 45,116,121, 12,146,149,105,127,178, 86,149,252, 45, 16, 8,160, 85,235,
- 77,122, 70,197, 69, 19, 33, 4,182,182,182,218,181,107, 86,136,228,114,185, 17, 0,228, 50,169,241,208,238, 13,176,183,179,213,
-114, 38,154, 88,139,134, 5, 11,196, 21,205,231,127,224,166,192,113, 92,206,211,167, 79,199, 17, 66,158, 18, 66, 10,235, 15,115,
- 28, 44, 51,254, 29, 2, 43, 36, 36, 36, 26, 64, 71,127,127,255,193, 55,111,222, 92, 61, 99,198, 12,135,150, 45, 91, 34, 61, 61,
- 29, 53,106,212,128, 66,161,192,163, 71,143,240,228,201,147, 84,142,227,102, 6, 7, 7,239, 45,229, 37,235, 88, 86,172, 12,142,
-227, 56,133, 66,113, 88,155,155,251, 69, 64, 27,111, 92, 61,116,107,137,139,139,203,120, 87, 87,215,233, 35,230,244, 26,217,182,
-119, 99, 68,132,190,197,253, 75,207,144, 20,147,138, 17,173,102,149,203, 89,210,201,221,218,218,122,180, 84, 42, 21, 2,208,151,
-210, 11,254, 96, 22, 97,113, 78,150,101,141, 58,157, 14, 7, 15, 30, 52, 73,100,237,223,191, 31, 26,141, 6, 44,203, 26,203,186,
-119, 35,203, 18, 30, 95, 4, 69,181,122,208,235, 85, 96, 89,211, 39, 72,114, 21,228, 39,195, 48, 88,176, 96, 1,190,254,250,107,
- 44, 90, 84,246,232, 10,143,199,195,134, 13, 27, 80,209, 51, 74, 79, 79,207, 81, 40, 20, 67, 15,108,255,249,200,144,177, 83, 45,
-220,154,251, 98,231,161,243, 48,232,245, 16,137,248,176,177,148,161,118, 77, 55,232, 52, 42,108, 94,191, 38, 91,163, 86, 15, 45,
-233,123, 86,222,115, 47,137,225,189, 91, 99,233,214,147,184,181,239,143, 73,136,173, 6,207,195,111, 43, 38,195,223,127, 71,185,
-156, 70,163, 17, 60, 30, 15, 7, 14, 28, 80,151, 54,123,144,166,105,240,249,252, 50, 45, 88, 31, 62, 35, 35,225, 11,196,168, 86,
-195, 7, 58,109,238, 71,121, 70,118,118,118, 95,111,223,190,221, 78,163,209,224,213,171, 87,120,249,242, 37, 8, 33, 69, 42,166,
-240,120, 94, 94, 30,158, 63,127, 94, 40,112, 94, 86,230, 61, 42,180, 92,165,164,164,144,132,132, 4, 72,165, 82,234,233,211,167,
- 26, 95, 95,223,176,242,222,239,226,156, 90,173,246, 93,135, 14, 29,202,178, 24,185,138, 68,162, 15,102,124, 21, 6, 29, 45, 57,
- 84, 88, 90, 58,243,242,242,158,173, 94,189,186, 86,227,198,141,177,101,203, 22,157,133,133,133,112,198,140, 25, 28, 77,211,100,
-237,218,181,200,200,200,208,205,158, 61, 91,120,235,214, 45,168, 84,170,199, 21,221, 59,199,113, 57,132,144,113,205,155, 55,223,
-125,225,194, 5,169,151,151, 23,178,179,179,193,113, 28,118,237,218,133,201,147, 39, 67, 44, 22, 35, 34, 34, 2,159,126,250,105,
- 94, 94, 94,222,184,226, 49,176,138,115, 50, 12, 67,248,124, 62,199,178, 44,190,255,254,251,162,160,162,133, 65, 70, 37, 2, 35,
-182,206,240,144, 77,219,150, 37, 27,252,195,182, 97, 0, 96,100, 24,227,171,231, 15,222,236, 90,255,195, 53,129, 64,112,179, 24,
-103,131,146,177,176, 8, 33,223,253,244,211, 79,155, 90,180,104, 33,145,203,229,240,242,242,194,157, 59,119,112,231,206, 29,220,
-186,117,171,176, 12,192,214,214, 22,153,153,153,136,141,141, 85, 19, 66,190, 43, 47, 63,133, 82, 62, 60,234,212,204,159, 45, 88,
- 96,177,226, 23,155, 61, 88,220,154, 37,224,243, 43,124,223, 75,186,119,216,218,218, 50, 1, 1,254, 97,106,181,154, 46,212, 82,
-246,246,246,207, 11,206,229,170, 85,171,166, 43, 81,228,255,196, 25,185,125, 3,130, 23,127,151, 63, 44,248, 44,182, 72,108, 93,
-251,196, 31, 60,129, 0,213,122,244, 45,222, 14,108, 36,132,236, 40,248,174, 45,198,249,205,199,142,133, 85,153,122,201,204,249,
-247,112,254,155, 44, 88, 0,128,208,208,208,125, 13, 26, 52, 56,191,116,233,210,165,199,143, 31, 31, 59,117,234, 84, 98,105,105,
-137,195,135, 15,115,105,105,105, 59,133, 66,225,215,247,238,221,203,168,202,197, 57,142,219,121,253,216,221,137,195,103,247, 38,
- 51,214,142,104, 25,252,251,243,240,134,205,189,208,176,185, 23,130,175,134, 97,253,156,253,123,141, 6,227,247, 9, 9, 9, 49,
- 21, 80,105, 59,182,168, 91,210,201,221,238,198,181,223,237, 42, 59,139,144,227,184,195,199,143, 31,159,218,173, 91, 55,234,225,
-195,135,127,242,185, 42, 92, 30,135,101, 89, 92,190,124, 25,122,189, 30,135, 15, 31,102,203,139,131,197,130, 59,185,121,227,138,
-225,155,183, 31, 19, 10, 5, 4,247,110, 30, 69, 86, 70,249, 86, 57,129,128,143,223,246,159,212,243,120,244,171,114,210,250, 62,
- 52, 52,212,110,249,242,229, 52, 33, 4, 27, 55,110, 4, 69, 81,101, 58,180, 63,127,254,156, 53, 24, 12, 21, 62, 43,165, 82,121,
-217,217,217,249,243,141,171, 23,236,106,215,185,151,181,119, 61, 31,158,163, 99,117,240,104,130,140,180, 84, 4,223,191,197, 92,
- 56,123, 50, 83,171,213,142, 80, 42,149,151,255, 74, 1, 92,178,229, 68,169,251,251, 78, 93, 93,145, 21,133, 49, 24, 12, 60,153,
- 76, 6,134, 97, 74, 13,213,208,190,125,123,201,157, 59,119,212,122,189, 30, 52, 77,151,171,152, 88,224,163, 63, 35,163,209,232,
-157,145,145, 1,149, 74,133,144,144, 16,110,253,250,245, 41,153,153,153,115,138, 31, 79, 79, 79, 71, 78, 78, 14,130,131,131,185,
- 45, 91,182,164,100,103,103,207,169, 76,254, 21,198,197,202,200,200, 96,165, 82, 41,101, 48, 24, 12,190,190,190, 98,153,204,180,
-152, 87, 0,240,248,241,227, 46,101, 29,107,209,162, 69,228,157, 59,119,106, 27,141,198,226,107, 20, 10, 52, 26,141, 87,175, 94,
-189,120, 38,164,111,240,165, 75,151,246,221,186,117,171,161, 86,171, 29,157,156,156,188, 27, 64,117, 30,143,135,215,175, 95,167,
-232,116,186,190,223,125,247,221, 78,149, 74,245, 76, 46,151, 15, 54,177,222,184, 64, 8, 25,226,237,237,189, 99,193,130, 5,242,
- 54,109,218,240, 20, 10, 5, 26, 55,110,140,136,136, 8,156, 61,123,214,176,113,227, 70, 85, 94, 94,222, 40,142,227, 46,151,211,
-233,224, 0, 16,134, 97, 32, 20, 10,139, 54,145, 72, 4,129, 64,128, 60, 29,133, 49,171,162,212, 12, 36,234,213,243,199,157,229,
- 0,146, 24, 27,149,154,156, 24,251,128, 16,114, 83,169, 84,102,149,101, 25,211,104, 52,126, 28,199,241,178,179,179,215,106,181,
-218, 17, 51,102,204,112, 89,190,124, 57,124,125,125,145,154,154, 10, 91, 91, 91,184,184,184, 32, 55, 55, 23,209,209,209, 70,189,
- 94,191,217,104, 52, 46, 76, 74, 74, 42,119,216, 49, 51, 53, 27,110,206,213, 63,176,116,114, 28, 7,206, 8, 24,180, 70, 24,245,
- 28,116,196, 0, 62,223, 0, 19,151,208,226, 24,134, 65,143, 30, 61,112,230,204, 25,244,238,221,155, 3, 80,166, 21,233,204,153,
- 51, 21, 15,185,179, 44,248, 34, 33,120,130, 63,134, 5,243,173, 89,249,251, 40,242,167,231,105,182, 90,153,241,239, 20, 88, 5,
- 13,115, 38,128,241,141, 27, 55,222, 61,101,202,148, 51, 44,203,242, 89,150,237,254,248,241,227, 91,127,229,226, 9, 9, 9, 33,
- 10,133,226, 91, 39, 55,155,165, 93,135,182, 68, 93,191, 26, 48, 50, 70,220, 57,247, 24, 59,127, 58,113, 32, 62, 54,126, 68,241,
-181, 10,203,126,159,217,107, 45, 2,235, 82, 0, 4,197,134, 95,216,170,204, 34, 76, 78, 78,158,183,120,241, 98,252,248,227,143,
-149,158, 69, 88,214, 57,119, 31,197,143,111, 22,232,226,246,121,223,246,157, 41, 66,113, 90,157,182,156, 94, 1,184, 66,175, 8,
- 30,143,126,117,227,126,172,111, 89,231, 38, 38, 38,118,152, 56,113,226,239, 20, 69,213, 40,110,154, 47, 11, 70,163, 49, 33, 45,
- 45,173,147, 41,249,144,152,152,120,222,205,205,173,206,141, 11, 39,191,189,125,229, 92, 91,163, 81,239, 73, 64, 32, 16, 8,222,
- 24,140,204,117,131, 78,183, 36, 46, 46, 46,227,175, 22,192,111,199,247,198,123,101, 42,120, 60, 58, 63,176,103,193,227, 62,186,
-110, 6,252,253,127, 43,243,127, 34,145,232,252,142, 29, 59,122, 12, 31, 62,156, 20,250,157,113, 28,247, 65,133,254,224,193, 3,
-181, 78,167,195,206,157, 59, 57,137, 68, 82,110,224,218, 15,159, 17,225,180,229,248, 67,153,250,140,114,115,115, 71,245,234,213,
-107, 23, 0, 17,128,215, 89, 89, 89, 19,148, 74,101, 92,241,227,189,123,247,222, 5, 64, 68, 8,249,211,113, 83, 80, 24,178,193,
-198,198, 38,172,192,114, 37,174,138,163,123, 57,229,155, 46,107,248,208,148,161,194,130,181, 5, 63, 43,252, 29, 24, 24,184,112,
-226,196,137, 69,139, 61,135,134,134,222, 6,224, 81,133,206,217,101, 66, 72,253,239,191,255,254, 75,177, 88,220, 46, 47, 47,175,
- 78,129,160,139,208,106,181,215,212,106,245, 26,142,227,202,141, 45,245,230,205, 27, 93,173, 90,181, 34, 24,134,105,224,224,224,
- 0, 30,143, 87, 36,178, 0,224,126,140,109,112,124,124,124,227,202,166,237,220,185,115,238, 54, 54, 54,157, 8, 33,253, 56,142,
-171,155,147,147,163,253,225,135, 31,238,222,184,113, 35, 59, 60, 60,188, 75,171, 86,173,136,179,179, 51,222,190,125,203,229,230,
-230, 30,161, 40,234, 59,165, 82, 25,101,194, 61,199,237,220,185,179,178,249, 84,110,121,210,233,116, 41,247,238,221,179,189,114,
-229, 10,109, 52, 26,113,225,194,133,162,142,100,105,163,129, 81, 81, 81,208,233,116,229,142,161,235,179, 50,224, 59,237, 27,112,
- 5,179, 57, 11, 81,189,123, 95, 16,112,224,116,102, 61,101,198,191, 3,228, 63, 50,141,185,146, 38, 68,133, 66, 49, 80, 44, 19,
- 77,170, 81,199,197, 87, 25,149, 28,150,147,149,183, 55, 33, 33, 97, 11,199,113,198,170,114, 86, 38,208,168,217,204,251,247,112,
- 10,165,150, 23, 9, 45,168, 81,102,227, 96,212,191,215,229,101,119, 46,141, 51, 40, 40,200, 85, 32, 16,172,208,106,181, 93,203,
-139,210, 78,211, 52, 35,145, 72,206,107, 52,154,175, 75, 46,246,252,191,152,159, 71,142, 28, 41, 85,244,155, 58,139,176, 95,191,
-126,198,202,164,179, 81,163, 70,215,164, 82,105,169, 1, 53,243,242,242, 98,158, 60,121,210,233,159,144,159,133, 51,219, 76,241,
- 17, 42,206, 89,149, 89,132,101,112, 22, 13, 17,186,187,187,139,244,122,189, 63,128, 58, 0,172, 1,164, 27, 12,134, 11, 41, 41,
- 41, 73,206,206,206,129, 20, 69,125, 95, 32, 94, 23, 37, 38, 38, 6,255,157,239,166,155,155,155,216,210,210,114, 5, 69, 81, 46,
-166,252,159,101, 89, 93,114,114,242,140,212,212,212,196,210, 56,235,215,175, 31, 76,211,116,133,139,154, 27,141,198,184, 23, 47,
- 94, 4,150,147, 78,243, 16,225,191,144,243, 95,105,193,250, 79, 67,169, 84, 30, 4,112,240, 99,114,150, 21,169,221,140,127, 14,
- 10,197, 83, 85, 80, 32,150, 62,255,183,229, 89,161, 64, 42,101,255, 75, 0,228, 99, 95,207,148,112, 12,255, 4,112, 85,236, 41,
- 22, 8,168, 86, 31, 51, 45,239,222,189,211, 2,184, 91,176,125,128, 2, 65,213,243,159,146,111,113,113,113, 26, 0,147, 63, 22,
- 95,121,162,201, 12, 51,254,109,160,204, 89, 96,134, 25,102,152, 97,134, 25,102,152,241,113, 65, 0,116, 44,163, 71,104,178,233,
-143, 16,210,177, 10, 61,206, 43,102, 78, 51,167,153,211,204,249,255,132, 51,185, 28,206,231, 21,112, 54, 40,227,144,227,255, 80,
-126,250,149,193,185,172, 2,206,111,202, 57,252,216, 92, 62,255,127,114,254,107, 80,232,204,248,159,216, 0,116, 52,115,154, 57,
-205,156,102, 78, 51,167,153,211,204,105,230,252,183,109,230, 33, 66, 51,204, 48,195, 12, 51,204, 48,195,140,143, 12,147, 5,150,
-220,217,219,219,193,189,209, 46,219,106,190, 79,109,171,249, 62,117,112,111,180, 75,238,236,237,253,111,204, 52,133, 66, 33,113,
-113,113, 25, 92,189,122,245,203,126,126,126,217,174,174,174, 95,154,139, 82,229,209,150, 16,222,231,132, 76, 26, 78, 72,204,112,
- 66, 98, 62, 39,100, 82, 91, 66,254,223, 45,155,177, 96,154,162,217,173, 11, 67,206, 47,152,166,104, 86,234,241,175, 20,118, 15,
- 46, 15,248,121,201,100, 87,219,143,113, 61, 66,136,133,147,147,211, 86,103,103,231,119, 78, 78, 78,239,157,156,156,118, 16, 66,
-172,204, 37,206, 12, 51,204, 48,227,191, 7,147, 26, 51,219, 26, 13,199,120,215,171,251,245,226,249,115,136,179,163,189,148, 49,
-178,250,183,239, 98,125,230, 45, 94,122,196,182, 70,195,213,233,239,159,109,175, 66, 35, 64,220,220,220, 6,242,249,252, 30, 0,
- 10,133,218, 75,131,193,112, 38, 46, 46,238,160,169,179,130,124,125,125,111,211, 52, 93,189, 50,215,102, 89,246,221,147, 39, 79,
- 90, 87, 37,195, 92, 93, 93,251,187,186,186,238,104,218,180,169,212,207,207, 15, 2,129, 0,203,151, 47,159, 9, 96,141,201,247,
-222,182, 45,207, 49,211,118, 24,205,227,245, 4,224,203,113, 0, 8,253,148,213,235,206, 37, 11,108,119,113, 33, 91, 12,166,240,
-184,184,184,204, 33,132,140, 64,254,180,242,237, 74,165,114,197,127,162,144, 40, 20,138,106,132,144,118, 28,199,213,163, 40,234,
- 25,203,178,151,148, 74,101,218, 95,229,117, 2,198, 55,111,217,242,231,225, 51,103,210,234,155, 55,241,243,142, 29,107,145,157,
- 13, 0, 27, 42, 91,150,130,130,252,250, 89, 88,160, 7, 1,252, 65, 64, 40,112,143,211, 51,169,115,143, 30,133, 30, 52, 37,150,
- 90, 89, 8, 8, 8, 56, 11,160,112,225,184,115, 33, 33, 33,221, 43,203,145,245,134,155, 43,234,233,221, 42,235,205,181,185, 0,
-186,150, 60,206,104,196,195, 57,186, 90, 15, 53, 23, 26, 11, 96,213, 95,201, 83, 66,136,212,193,193,225,233,201,147, 39,221,154,
- 52,105,194, 3,128,224,224,224, 97, 61,122,244,104, 95, 16, 74, 32,251,239,168,104,154, 53,107,102,195, 48,204,110,154,144,166,
- 44,203, 90, 3, 0, 69, 81,153, 70,142,187,207,227,241,134, 87, 53, 88,177, 25,102,152, 97,198,255,172,192,146, 59,213,243,169,
- 95,223,123,230,133,227,187,171,101,166,103,106,126, 89,185, 59, 68,197, 19,230,121,249,120, 9,126, 89,179,194,102,210,180, 25,
-211,229, 78,245, 30,228, 38,133,135,153,122, 81, 23, 23,151,234,238,238,238,199,230,204,153,211,160,101,203,150,124, 71, 71, 71,
- 36, 37, 37,225,213,171, 87, 13,238,220,185,211,251,196,137, 19, 51, 93, 92, 92, 62, 51, 33,130, 59,100, 66, 65,173,131,203,151,
- 56, 11,173,172,193, 25, 25,216, 52,240,203, 31,255,100, 89, 36,222,184, 2,163, 94, 15,142, 53,194,173,203,167,133,226, 10, 65,
- 65, 65,130,170,100,150,155,155,155,162, 78,157, 58,123,103,207,158, 45,208,233,116, 8, 13, 13,197,189,123,247,216,228,228,228,
-165, 38,139,138,134,125,124,156,121,206, 71,122,245,238,234,222,253, 19, 71, 97, 13,103, 7,112,172, 24,225,209,250,234,151,111,
-133,118, 57,123,254,226, 44, 71,159, 62,125,147,195,142, 63, 43,143,167, 65,131, 6, 77, 41,138,250, 49, 62, 62,190, 80, 4, 45,
- 15, 10, 10,250,161,248, 57, 37, 53, 42,203,178,224,241,120, 73,121,121,121, 3,159, 63,127, 30, 90, 26,239, 8,127, 98, 48, 24,
-243,203,133,128, 7,227,213, 20,183,227, 29, 59,118,172, 57,106,212, 40,248,251,251, 35, 56, 56,184,221,225,195,135,167, 85,171,
- 86,237,145,193, 96, 56, 39, 18,137,174, 23, 76, 75,175, 52, 4,192,172,225, 51,103,210,242,119,239, 32,127,242, 4, 67,178,179,
-121,203,128, 89,149, 17, 88, 1, 1, 1,181, 58,117,244, 63,210,251,179, 54,222,206,206, 62, 2, 62,223, 30, 28,199,193, 96, 72,
-175,147,146,242,178,159,149, 21,102, 55,105,210,164,239,195,135, 15, 77,138, 52,219,184,113, 99, 39,150,101, 55,115, 28, 39, 32,
-132, 76, 1,208,237,194,133, 11, 48, 26,141,232,222,189,123,183,128,128,128, 90, 28,199,253, 34,151,203, 57,181, 90, 61,250,209,
-163, 71, 73,229, 89,174,178,223,112,115, 19,137, 71,151,186, 1,195,145, 72, 46,116,153,209,213,229,188,165, 39, 89, 60,239,103,
-229, 61, 0,232,234,233,105,225, 81, 79,246,141,220,178,161,109,118,252,149,111,186,122,122,110, 59,255,230, 77, 78, 85, 58, 44,
- 5,229, 96,197,158, 61,123,170, 5, 5, 5, 21,197,203,242,243,243,163, 87,172, 88,225,250,229,151, 95,174, 5, 48,210, 68, 81,
- 93,199,206,206,238, 34,203,178,218, 23, 47, 94,212, 41,220,239,216,232,179,230,118, 22,178, 14, 41, 25, 57, 55, 83, 95,156,184,
- 97, 10, 87, 96, 96,224, 40, 1, 69,109, 93,243,253,100,186, 94,195, 70,144, 58, 56, 64, 31,167,132,202,104,176,189,255,228, 69,
-247,101,107,182,166, 4, 6, 6,142, 11, 14, 14,222, 97,174,146,205, 48,195,140,127,141,192, 18,137,132,179,231,125,247, 13,201,
- 76,203, 84,107,178,115,116, 6,141, 70, 67, 9, 56,205,179,176,232,100,138, 71,103,126, 57,109,170,197,236,111,191,155, 13, 96,
-136,169,226,170, 94,189,122, 15,183,109,219,230,104,107,107,139,172,172, 44,164,165,165,225,225,195,135,224, 56, 14, 93,187,118,
- 21, 53,106,216,192,127,245,154,181,247, 92, 92, 92,154, 85, 36,178,120,124, 30,225, 75,165, 56,218,198, 31,148, 64,128,190,225,
- 9,249,226,194,160,199,249,129, 61, 0, 0,180, 80,136, 1,145,249,147,124,196, 98,113,149, 51,139,227,184,102, 45, 90,180, 16,
- 0,192,140, 25, 51,178, 85, 42,213, 18, 66,200, 62,165, 82, 25,111,170,184,178,119,112,184,177,114,241, 88,219, 6,181, 60,160,
- 55, 24, 16,155, 28, 15,142, 8,225,226, 40,195,208, 62,126,130,150,129, 66,143,149, 27,174, 92,119,106,208,171,117,210,243,147,
- 47,202, 20,150, 50,217,238,181,107,215,226,208,161, 67, 0,128,107,215,174,193,203,203, 75, 86, 81, 26, 94,189,122,229, 49, 98,
-196,136, 3, 0,106,151,118,220, 96, 4,111,223,190,125, 0,128, 85, 95, 13,166, 55,220,138,168, 41,145,252,177,150,114,155, 54,
-109,208,166, 77, 27,106,201,146, 37, 65,215,174, 93, 11, 58,112,224,128,222,213,213,117,109,124,124,252,225,170,228,169,250,230,
- 77,200,159, 60, 1,110,220,168,244,127, 3, 2, 2,106,213,171,103,119,127,245,170, 31,236, 79,159,121,129,149, 43,119,224,205,
-155, 55, 0, 0, 15, 15, 15, 12, 30,212,159,191,239,183,205,245,103,207,158,127, 55, 32, 32,160,101, 72, 72, 72,133,209,205, 89,
-150,221,252,213, 87, 95,125,234,234,234,138,185,115,231, 70,212,170, 85, 11,150,150,150,216,178,101, 11,108,108,108, 96, 48, 24,
- 34,150, 47, 95,206, 83, 42,149, 88,183,110,221,175,197,172, 91,127, 66,219,206,109,231,138,122,122,183,170, 27, 48, 28,114, 75,
- 23,108,219,127, 16,175, 66,118,183,210,234, 95,206, 93, 50,217,117,168,154, 19,141,112,243,178,152,237, 30,216,198,174,118,253,
- 79, 81, 35, 32,212, 94, 99,188, 21,253,253, 36,143,165, 60,177,102,247,188,149,127,182, 18,146,254, 71,232, 6,217,225,182,207,
- 47, 35,141,227,230,177, 5,194,170, 40,254,149,145,195,167,173, 91,183, 46, 18, 87,239,222,189,131, 86,171,133,183,183, 55,165,
-211,233, 76,138,105,165, 80, 40,234,180,110,221,250,246,222,189,123,237, 90,181,106,245,193,210, 45,206,118,214,157,111, 28, 91,
- 59,245,199,159,127,171,231,232,211, 39,179,162,142, 64, 96, 96,224,168,134,117, 61,183,175, 93,254, 3,161,115, 98,193,179, 78,
- 1,140,169, 72, 56,248, 43,136,212, 22,221, 39,204, 64,227,160, 32,122,234,151,115,182, 55,110,220,152,123,244,232,209, 78,115,
-181,108,134, 25,102,252, 43, 4, 22,203,177,190, 78,142,118,146,181, 43,119, 61,162,245, 58,157,204,218, 74,199,183,178,100,137,
-133, 21,173,215, 25,114,107,120,212, 16,178, 28,235, 91,134, 32,185, 82,178,151,237,238,238,126,108,231,206,157,142,124, 62, 31,
- 44,203,194,193,193, 1,111,223,190, 69,102,102, 38,114,114,114,240,230,229, 75,212,172, 94, 13, 83,199,141,117, 89,180,114,213,
- 49, 66, 72, 96,241,225,194,146,156, 28,203,129,101,152,146,189,121,160,148, 37, 99,202, 90, 70,198,212, 41,165, 44,203,190, 85,
- 42,149,144, 74,165,240,246,246,150, 63,122,244,232, 86,124,161, 9,169,162,123,111,219,150,231, 34,114, 56,182, 98,241, 64, 91,
- 80, 17,136,136,201,132,167, 91, 19,216, 91, 87, 67,124, 74, 46, 30,133,157, 67,228,155,179,240,116,173,129,113,131,107, 91,175,
-217,114,231, 12, 9, 24,239, 89,124,184,176, 56,103, 78, 78,142,188, 70,141, 26,112,117,117, 5,203,178, 48, 26,141, 8, 11, 11,
-131,209,104, 44,250, 93,252,115,215,209,171, 96,178,223, 99,248,176, 97, 72, 79, 79,151,155,122,239,133,226,106,203, 96, 69,125,
- 85, 70,130, 0, 0,100, 54, 46,250,113,191,197,191,104,220,184, 49, 28, 28, 28, 4,119,239,222,157, 1,224,112,101,243, 83, 15,
- 44,255,121,231,206,117, 67,178,178, 40, 0,216, 78, 8,171,207,143,170,109, 82, 89,234,216,177,209,209,181,107,191,183, 39, 92,
- 24,108,173,150,225,225,195,247,208,235,243,139, 74, 90, 90, 50,166, 76,202, 6,143,103,129, 85,171,231,219, 13, 24, 48,225,104,
-193, 16, 25, 91, 94, 58, 57,142, 19, 92,189,122, 21,131, 6, 13,194,129, 3, 7,120, 52, 77,227,193,131, 7,144, 72, 36, 24, 57,
-114, 36,234,215,175,207,147, 72, 36,184,125,251, 54,178,179,179, 73,121,233,188,126,241,250,226,172, 55,215,230, 38,146, 11, 93,
-182,237, 63,136,177,131, 6,194,153,139,186,101,229, 73, 22,119,234,217,226, 7,142,174,214, 67,102,225,107,227,213,160, 39, 4,
- 66, 57, 38,207, 90,136,136,231,167,109,242,114,158, 78, 34,198,216,106, 0,166,149,228,228, 14,247, 51,174,219,127, 55,224,114,
-245, 71, 53, 20, 1,227, 31, 0,120,250,135,192,242,224, 17,202,104, 85,104,189,124,253,250, 53,222,188,121, 3, 30,143, 7,181,
- 90,253,193,162,190,197, 57,253,253,253,199, 27,141,198, 31, 0, 64,167,211,237,114,114,114, 26,245,203, 47,191,216, 21, 46, 65,
- 84,220,114,149,158,153,157,113,247,209,139, 87, 51,198,247,107,123,243,254,243, 88,235, 70,189, 99, 50,159,156,200, 42, 45, 63,
-155, 53,107,102, 35,164,233,173, 63,175,152, 71,140, 81, 87, 33,242,110, 11,158,220, 11, 70, 67, 60, 52, 25, 42,104,162, 19,160,
-219,178, 30, 30, 19,191,196,138,101, 63,146, 65, 67, 71,111,245,244,244, 60,246,166,152, 5,239, 63, 49,221,219,204,105,230, 52,
-115,254, 51, 57,255,117, 2,139, 16, 42,219,104,100, 69, 2, 7, 71,205,232, 1, 29, 26, 94,186, 18,252, 88,106,111,201,235,220,
-214,191,205,195,103,209,247, 8, 69, 12,132, 80, 38,249,117,184,185,185, 13,156, 55,111, 94, 67, 75, 75, 75,176, 44, 11, 43, 43,
- 43,164,164,164, 64,167,211, 33, 43, 43, 11,218,156,108,232,115,178,241, 36,246, 29, 90,180,105,139,142,205,154,122,159, 55, 24,
- 6, 2, 56, 80, 22,167,145,162, 57, 59,255, 38,232, 31,149, 6, 86,175,195, 97, 15,187, 34,171,213,231,239, 50, 65, 8, 1,171,
-215,225,124, 80,109, 8,229, 50, 52,250,122, 94,149, 51, 43, 33, 33, 33,180, 70,141, 26,231,187,118,237,218,117,252,248,241, 84,
- 98, 98,226, 5, 39, 39,167, 22, 73, 73, 73, 21, 14,143, 58,102,216, 12, 31, 62,174, 97, 45,123,107, 10,167,111, 95, 64,211,122,
-125, 32, 21,241,145,146,169, 6, 1, 65,212,219, 43, 96, 25, 57,158,188,124,135,230,190, 82,180,110, 98,237,150,251,123,250, 56,
-148, 61, 92, 70, 50, 50, 50,144,156,156, 12,131,193, 0,131,193,128,126,253,251, 99,207,238,221, 80,169, 84, 80,171,213,208,233,
-116, 48, 26,141,160, 40, 10,151,207, 28, 70,108,244, 75, 52,111,214, 12, 40, 39,226, 55,159, 6,179,234,171,193, 60, 0, 16, 90,
- 56,232,115,114,114, 32,147,201,160,202, 72, 16,204, 92, 89,100,217, 18, 92,187,118, 13, 33, 33, 33, 80, 40, 20, 38,149,163,210,
-240, 6,216,250,214,104,156,219,245,248,113,199, 59,199,143,179,247, 79,159,142, 19,229,228,108, 49,229,191, 65, 65,126,253,166,
- 78,233, 94, 87, 34,150, 32, 46,102, 45,234,213, 19, 96,230,151,118, 88,178, 44, 21, 0, 48,117,138, 27, 26, 7,218, 35, 59,243,
- 8,236, 29, 61, 49,115, 70,111,207,220, 92,110, 24,128, 93,229,151,119, 50,229,233,211,167, 17, 78, 78, 78,188,208,208, 80, 8,
-133, 66, 72, 36, 18, 72, 36, 18,136,197, 98, 36, 38, 38, 66,167,211,225,208,161, 67, 76,193, 16, 98,153, 40, 24, 6,236, 58,163,
-171,203,249, 87, 33,187, 91,185,210,209, 79,250, 78,110,249,238,233,253,208,156, 75,151,239, 44, 98, 52,226,216,204,184, 43,223,
-212,106, 28,106, 63,233,235, 5, 88,191, 98, 30, 94, 61,184,153,238, 84, 61,123,131,132,104,119, 5,125, 82,138, 85,172,237, 2,
-222,164,239, 7, 48,227, 71,244,181, 62,237,116,119,252, 57, 30, 73, 73, 76, 13, 89,137,183,161,106, 81,109,255,161,117, 60, 40,
-221,213,171, 87, 37,173, 91,183,134, 70,147,191,100, 28, 77,211,216,187,119, 47,203, 48,204,181, 82,173,150, 6,195, 15, 33, 33,
- 33, 46,106,181, 26,159,127,254,249,212,249,243,231,203,248,124,126,254,251,101, 52,126, 96,185, 90,188,102,207,197,233, 63,108,
-184,118,241,192, 50,197,226,217,163,218, 14,153,252,227, 53, 0, 23, 74,227,101, 24,102,247,218,101,223,210, 34,107, 3, 72,227,
- 78,208, 39,169,241,126,219, 88,232,178, 53,168,179,104, 1, 0, 33,116, 6, 10,103,123,245, 3,101,171,192,152, 86, 45,120, 91,
-110,222,222, 13,160,183,185,106, 54,195, 12, 51,254,255, 91,176, 88,246,230,235,232,119,221, 58,117, 12,114, 59,115,227,217,163,
-241, 35,187,119,166, 40,138, 60, 14,123,127,195,179,134,179,253,181,235, 55, 57,150,101,111,154,114, 49, 62,159,223,163,101,203,
-150,188,140,140, 12, 40, 20, 10,164,164,164, 32, 62, 62, 30, 6,131, 1,154,172, 76,232,114,178,161,203,206,130, 81,149,131, 55,
-193, 15, 81,175,186,155,232, 74,190, 19,252, 1, 83,248, 75, 90,168, 10, 23,253, 5, 33, 16, 89,200, 33,146,203, 43, 94, 9,190,
- 4, 20, 10, 69, 47, 75, 75,203,111,114,114,114,206,197,199,199, 47,214,233,116,147,126,250,233,167, 71, 11, 23, 46,180,159, 61,
-123,182,229,172, 89,179, 14,187,187,187,251, 85,228,135,100, 97,107,236,215,180, 97,109, 58,242,253,115, 4,214,233,135,154,138,
-150,136,138,207, 66,122,142, 22,105, 89,106,212,173,243, 53,146,210,242,144,165,210,224,217,171,125,112,117,174, 69,209,252, 55,
- 93,202, 17, 88, 72, 74, 74,250,224,158, 15,236,223,143,188,172, 44,120,122,122,194,219,219, 27, 14, 14, 14,120,255,254, 61,110,
-223,190,141, 33, 3, 62, 5,159,223, 23,201,201,201,229,222,239,174, 80,142,175, 80, 40, 66,148, 74, 37, 66, 67, 67,241,230,205,
-155, 82,135, 85,127,255,253,247,252,134,215,217,217,228,188,116,114,114,250,150,162,168, 1, 0,104, 0,177,148, 66, 81,219,193,
-193,193,169, 69,239,222,200,226,243,233, 95,174, 93, 35, 60, 43, 43, 57,128,204,138,184, 44, 45,209, 61, 48,176,165, 48, 51, 99,
- 7,128,124,163,212,168,145, 14,232,218,197, 9,132, 18, 65,225, 98, 1, 66,137, 64,136, 16,121,170,171,240,169,239, 43,176,176,
- 56,214,163, 60,129, 85,232,208, 94,191,126,125, 76,152, 48, 1, 39, 78,156,192,174, 93,127,156,222,183,111, 95,124,246,217,103,
-200,205,205,133,147,147, 19, 79,169, 84, 70, 5, 4, 4, 84,232,248,110,233, 73, 22,107,245, 47,231, 90,123,201, 82,140,176,111,
-158,107, 16,165,205, 91, 25, 53, 15,192,170,174,158,158,219,244,236,205,232,200,231,167,109,222, 62,186,158,174,140, 84,121,108,
- 59, 27, 85,166, 15,214,141, 27, 96,157,124,111,232, 63,237,210,134,215,187,103,187, 60, 87, 55,167, 58,191,108,208,237, 77,119,
-181, 91,236, 94,221,109,200,188,159,190,209, 15,237,211, 74,255,205,204, 41,252,250, 62,222, 36, 59, 59, 27, 7, 15, 30,100,206,
-159, 63,159,192,178,236,244, 50,104,233, 2,161,133, 1, 3, 6,200,164, 82, 41, 98, 99, 99, 81,175, 94, 61,176,108,126,222, 38,
-164,164, 61,187,243,232,121,248,140, 9,253,219,236, 59,117,237,229,197,235,193, 47,123,119,105,209,136, 16,206,189,172,180,210,
-132, 52,245,241,245, 5,199,197,131,230,215, 65,220,222, 81,208,164,229, 64,171,210,128,226,203,160, 51,208,208,179, 4, 34,223,
- 38,120,125,226, 20,106, 15,174, 15, 30, 33, 45,204,213,178, 25,102,152,241,255, 1, 21,170, 13, 90,163, 91,242,213, 55,115, 97,
- 99, 37,177,106,226,239,229,124,242,194,141,224,155,119,131, 95,186, 87,179,119,224, 12, 58,155,229,171,215,187,145, 60,181,169,
- 78,222,222,246,246,246,208,235,245,120,253,250, 53,226,226,226,160,215,235,193,168, 84,208,102,102, 66,147,145, 1,163, 42, 7,
- 2,163, 17,234,148,100,216,136,133,192, 31, 51, 12,203, 51, 85,254, 33,166, 74, 17, 92,132, 16, 72, 44, 45, 33,178,176, 0,197,
-163, 77,206, 28, 23, 23,151, 0, 63, 63,191, 67, 87,175, 94, 13,106,217,178,229, 34,119,119,119,171,196,196,196,247, 73, 73, 73,
- 29, 86,172, 88,161,117,112,112,192,144, 33, 67,234, 26, 12,134,225, 21,113, 9, 68,218,134,213,157,188, 80,205,233, 83, 40,236,
-155, 34, 61, 91,139,228, 76, 53,146,210,242,112,240,216, 64, 92, 58,247, 57, 30,223, 30,134,215, 15, 70, 33, 53,215, 18, 98,219,
-118, 0,184, 6,229,113,222,189,123, 23,155, 55,111,198,230,205,155,177,105,211, 38,172, 95,191, 30, 25, 25, 25,104,208,160, 1,
- 98, 98, 98,112,254,252,121, 36, 36, 36,192,222,222, 30,143, 31, 63,198,150, 45, 91,240,240,225,195, 74, 23, 18,141, 70, 3,129,
-220, 78,191,234,171,193, 88,245,213, 96,176,124,153,190,152, 0, 55,189,176, 81,212,136,132,222,189, 27, 38, 88, 91,251,248,250,
-250,118, 29, 48, 96,128, 71, 80, 80, 80,209,113, 79, 79,207,234, 60, 30, 47, 81,161, 80,108, 87, 40, 20,126,229, 43,127,206,223,
-198,214, 27, 58,109,120,193, 51,230,131, 16, 49,218,127,242, 18, 45, 90, 5, 67,111, 16,128, 34, 34, 80,148, 24, 12,147, 6, 75,
- 11, 39,112, 28,105, 80, 65, 18,187, 93,184,112, 1,155, 55,111,198,219,183,111,139,132,101,143, 30, 61,166, 12, 26, 52,232,152,
-209,104,196,153, 51,103,112,226,196, 9,212,172, 89, 19,141, 26, 53,130, 94,175,239, 86,209,125,207,251, 89,121,111,223,234,243,
-159,243, 13, 54,126, 98,137,123, 77,168,228,189, 38,181,117,144, 1,192,249, 55,111,114, 28,171,103, 47, 85,229, 60,141,177,118,
-203, 93, 86,145,131, 59,199,205, 99, 67, 34,195,239,239, 59,126, 33, 43, 57, 41,131,239,223,176,190,122,201,194,175, 5,238, 53,
-107, 47,159,247,205, 4,231,248,108,113,230, 39, 83,207,135, 31,187,240, 48,119,232,200,177,204,232,113,147, 53,231, 47, 92, 62,
-206,178,108,195,178,102, 16,178, 44,139,132,132, 4,188,120,241, 2, 81, 81, 81, 72, 73, 73, 65,106,106, 42,114,114,114,138,134,
- 21,165, 57,217,103,215,239, 60,253, 68, 38,145, 72,131, 26,122, 85,127, 16, 26,150, 44,147, 72,164, 94, 53,171,215, 33,100, 1,
- 85, 6,175,181, 88, 34, 6, 64,144,243,252, 38, 52,233,185, 80,103,230, 66,147,145, 11,173,158,134, 70, 75, 65,173,163, 96,223,
-170, 19,114, 85, 26,104,210, 50,192,114,156,141,185, 90, 54,195, 12, 51,254, 21, 22,172,212,212,136, 92, 75, 7,159,207,190,156,
-245,195,249,253,191,254,226,168,213,230,197,216,217,200,141,114,169,208,126,244,248, 31,145,147,155,209, 39, 55,221,244, 89, 79,
- 25, 25, 25,136,142,142,134, 68, 34,129,128,207,135, 81,173,134, 81,173,130, 58, 35, 13,148, 94, 11,129,209, 8, 91,169, 4, 53,
- 20,206,112,119,170,216, 58, 66,179, 70,162,188,124, 14, 23,135,246,249,211,176,224,133,230,117, 33,146,203, 32,182,182, 65,139,
- 19,183,242,133,142, 64, 0,204,171,120,145,118,103,103,103,123,133, 66,113,106,253,250,245,130,180,180, 52,188,120,241,226,201,
-187,119,239,178,108,109,109, 45,248,124, 62, 27, 25, 25,121, 37, 60, 60,188, 71,173, 90,181,192,113,156,103, 69,124, 57, 89, 50,
-189,193,192, 65,153,252, 30,113, 9, 47, 96, 41,175, 6,142,174,134,228,244, 60, 16, 56,129,209, 70,192,104,200,119,183,210,170,
-227,144,167, 51,109,221, 94,189, 94, 15,189, 94, 15,131,193, 0,173, 86,139,161, 67,135,226,206,221,187, 56,112,226,119, 68,191,
-137, 64,221,154,206, 24, 54,108, 40,252,252,252,240,232,209,163, 42, 23,148,102,223, 92,124, 33,145, 72,176,105,211, 38, 72,165,
-210, 15,196,173,137, 98,117, 85,135, 14, 29,106, 71,168, 84,120, 17, 30,142, 38,253,251, 3, 0,110,223,190, 93,116,142, 90,173,
-198,224,193,131,133,209,209,209,163,195,195,195, 71,187,184,184,172, 78, 72, 72,152, 89, 22,231,217,179,247, 48, 97, 66, 24, 82,
- 82,242,253,176, 15,238,175, 95,116,236,109,180, 30, 93,186,231,143, 92, 89, 91, 91, 99,245,234, 6, 38,165,211,104, 52, 98,235,
-214,173, 69,195,130, 0,192,227,241, 90,204,152, 49,227,179,210,206,247,241,241,169,144,115, 70,127, 55,241,227,247,146, 73, 86,
-181,221,235, 91,218,251, 34,205, 16,218, 32, 52, 62, 97,202,140,254,110,107, 87, 31,142,211, 72,136,118, 23, 49,198, 86,227,137,
- 53,187, 77, 73,227,155,243,235,116,214,238, 35,119, 39,166,100,127, 55,121,236, 96, 59, 75,107, 71,213,246,245, 75,108, 40,154,
-226, 78, 5,235, 51,235,123,216, 89,247,106,250,115,238,132, 47,191, 15,213, 49,177,147, 17,123, 42,162,188, 80, 21, 44,203, 66,
-169, 84, 34, 37, 37, 5, 49, 49, 49, 72, 77, 77, 45,120,247, 83,139,134, 8,171, 2, 66, 8,116, 49, 49, 72, 58,177, 29,206, 67,
-134,162,206,194,133, 48,178, 60,104,242,140, 56,210,186, 3,178, 51,213,208,177, 4,214, 1,205,209,233,204, 45, 16,214, 8,220,
-191,107,174,149,205, 48,195,140,127,135,192, 2,128,236,148,176, 40,187, 26,190, 74,149, 90, 37,117,114,116,208, 74,197, 34, 54,
- 43, 59,135, 14,125,246, 68,159,155,240,250, 85, 37,174,247, 50, 44, 44,172, 65, 92, 92, 28, 98,222,191, 7,163, 86,129,210,234,
-192,105,242,208,177,101,115,136, 1,136, 41, 2, 1,171, 7,143, 22, 34, 39, 55, 27, 0, 94, 86, 68,202, 26, 12, 31, 84,234,132,
- 16, 16,138,130, 88, 46,135,208, 66, 6,145,165,197, 7, 22, 45, 83, 32,145, 72,246,109,217,178,197,197,217,217, 25,171, 87,175,
-134,139,139, 75,189,142, 29, 59,230,181,105,211, 70, 98,111,111,143, 58,117,234, 32, 48, 48, 16,215,174, 93, 3, 33,228, 77, 69,
-124,140, 78, 24,242, 50,154,169,150,149,243, 24,247, 67,247,192,160, 51,192,179,206, 28,168, 13,118,144, 57,140,134, 70,119, 10,
-198,204,235, 0, 0,161,101, 91, 36, 38,166, 2, 32,207, 43,243, 48, 57,142,195,211,167, 79,177,255,228, 13,184,212,240, 70, 76,
-100, 56,194,175, 93,193, 29, 7, 59,184,251,212,135,193, 96, 48, 89, 16,153,122,158,169, 13, 48, 33,100,240,216,177, 99,145,201,
-227, 1,221,187, 67, 16, 21, 5,189, 94,143,166, 77,155,162,113,227,198, 0,128,166, 77,155,130,166,105,212,174, 93, 27,118,118,
-118, 56,122,244,232, 96, 0,165, 10, 44,142,144,199,172, 49,173,158,135,135, 71,145,192,218,189, 39, 5,161,193,159,128, 64,136,
-117,235,255,136,202, 80,189,122,117, 36, 38, 70,131, 16,174,162,252, 60,215,189,123,247,110, 54, 54, 54, 24, 53,106, 20,196, 98,
- 49,250,244,233, 3,141, 70, 51, 0, 0,150, 46, 93,138,111,191,253, 54,223, 42, 53,111, 30,230,207,159,143,188,188,188, 50,135,
-134,247,172,241, 85, 36,167,179,163,157,156, 93,251,180,179,119,111,216,190,115, 71,212,242,106,143,246,157, 99, 0,224, 39, 91,
-222,187, 1, 43,230, 54, 56,110, 95,205,118,199,165, 11,151,231,181,108,211,254,187,217,227,109, 22, 47,221,146, 81,161, 79, 99,
-214,251, 93, 57,175,132, 3,215,252,178,121,207,154, 31,190,157, 38,142, 73,209,101,196,103,112,185,114, 17, 79,238,233, 68,228,
- 83,102, 45,138, 86, 42,163,102, 34,246, 66,132, 41,207, 48, 42, 42,170,200,103, 79,163,209, 64,165, 82, 33, 54, 54,182,232,249,
-170,101,150, 93, 38,143,236,217, 72,165, 86,231, 61,120, 22, 25, 51,119,234,144,102, 42,181, 58, 47,242,109, 76, 4,199,253,204,
-150,241,204, 51,243, 84,121,182,218, 44, 13,178,158,188,130, 93,251, 26,208, 51, 4, 90,163, 17, 25,169, 57,208, 49,128,129,230,
-195,173,223, 48, 24,192, 67,118, 74, 34, 40, 66,204,241,176,204, 48,195,140,127,143,192, 34,132,144, 70, 13,107, 40, 86,204, 27,
-226,198, 50, 76,221,228,212, 36,134,199, 19,241,171, 89,169, 19, 42,115, 49,131,193,112,230,214,173, 91,189, 91,182,108, 41,138,
-124,246, 4,186,172, 44,232,178, 50,193,103, 25,216, 74, 2, 65,233,181, 32, 58, 29, 92,235,177,208,228, 72,112,247,225, 43,131,
-193, 96, 56, 83,174, 16, 0,199,177, 76,190,192, 34, 20,245,193, 80,161,200,202, 2, 34,185, 28, 34, 11,139, 82,135, 16,203,130,
-147,147,147,180,107,215,174, 29,252,253,253,193,113, 28, 86,172, 88, 1,189, 94, 47, 52, 24, 12, 69, 22,163,220,220, 92, 28, 57,
-114, 4,123,246,236,185, 99,101,101, 85,225,212,114,150,209,158,191,122,251, 73,183, 33,125,218, 9, 47, 95,223, 6,131,142, 69,
-182,198, 18,185,106, 45,114, 53,124,104, 69,157, 65,200, 45, 80,180, 8,205,253,106,227,234,237, 8,141,209,160,191, 80, 89, 33,
-164,209,104, 16, 27,243, 14,113,111, 34, 32,207, 78,132,131,165, 20,121, 81, 17,240, 27, 54, 28, 58,157,174,194,123, 31,225, 79,
- 12, 51, 26,128,183,186, 43, 5,129,220, 78,223,236,155,139,101,134,138,144,203,229,149, 26, 34, 76, 77, 77,197,233,211,167,209,
-180,105, 83,180,105,211, 6,241,241,241,136,138,138, 66,183,110,127,140,178, 61,121,242, 4,161,161,161,240,244, 44,223, 40,152,
-157,205,157, 75, 79,127,221,191, 87,175, 94,130,251,247,239,131,227, 56,120,121, 89,194,210, 66, 6, 66,137,224,237,237, 8, 32,
- 95,251,183,109,219, 22, 58, 93, 60,163, 82,225, 92,121,156, 33, 33, 33,221, 3, 2, 2,106, 25, 12,134,136, 54,109,218,240, 94,
-191,126,141,126,253,250,225,224,193,131, 0,128,217,179,103, 99,246,236,217, 31,252, 39, 55, 55, 87, 83, 22, 95,221,134,245,190,
-174,197,216,180, 17, 75,220,107, 90,218,251,162,150, 87,123, 0,192, 39, 61, 70,161, 86,237,234,200, 78,125, 90, 83,163,126,215,
- 71,192,203,176,121,186, 46, 62, 76,210,189,193, 72, 77,242,245, 72, 0,166, 4,238,229,212,145, 7,147, 98,248, 67, 15,157, 56,
-117,126,124,183, 30,159,242, 13, 70,134,105, 80,131,111,125,248,248,217,228,248,247, 49, 63, 35,230,194,243,162,215,164,124,129,
-101,204,206,206,134, 76, 38, 67, 84, 84,148,182,103,207,158, 34,181, 90,141,215,175, 95, 23, 9, 44, 71,123, 91,159, 22,141, 27,
-212, 91,188,102,207, 69,153, 72, 36,234,220, 54,208, 59, 44,242,125, 28,199,145,119,101,242,114,220,253,215, 47, 95,117,119,116,
-169, 13,229,141,251,144,182,236, 6,173,150,130, 70,199, 66,203, 0, 12, 45,128, 85,163, 32, 72, 60,188,193, 1,120,249,236, 9,
- 24,142,187, 99,174,150,205, 48,195,140,127,141,192,178,183,183,119,244,247, 15,244,220,246,235, 33,112, 28,135, 87,161, 43,145,
-145, 28,142,239,127,186,231,233,230,230,214, 38, 46, 46,238,134, 41, 60,113,113,113, 7,143, 30, 61, 58,211,215,199,199,191,166,
-155, 27,158,188,123, 11, 1,103,132,192,104, 4,165,215,130,103,212,193,173,129, 17, 20,145, 35, 33, 33, 27, 91, 46, 92,121, 30,
- 23, 23,119,176,220,198,129,208,168,214,179, 47, 6,125,210, 29,156, 65,143, 75,173,124, 32,182,144, 67,100,109,141,230, 71,174,
-131, 16, 2,142, 49,224,253,146,175,192,151,201, 97,219,172,226, 80, 64, 73, 73, 73,121,181,107,215, 14, 14, 15, 15,111, 92,183,
-110, 93, 44, 88,176, 0,177,177,177,224, 56, 14,201,201,201,154,148,148,148,248,180,180,180,119,132,144,227, 74,165,114,155, 41,
-145,194,147,109, 50,118, 95,254,253,202,215, 1,126, 62, 94,159,180,153,143, 51,103,230, 33, 35, 43, 27,121, 58, 62,114,212,122,
-168,212, 28, 92, 45,189,208,196,215, 23, 41,233, 58, 68,190, 8,137, 75, 21,216,110,173,140,245,138,162, 40, 60,121,242, 4, 30,
- 10, 11, 68,220,186, 1,123, 41, 31,141, 20,206, 80,180,104,137,168,168, 40,211, 68,176, 17,188,226,179, 5,173,173,173,145,149,
-149,245,129,144,147, 74,165, 80, 40, 20,200,206,206,198,145, 35, 71,192,153,214, 40, 26,116, 58, 29,234,213,171,135, 71,143, 30,
-225,202,149, 43,104,223,190, 61,218,180,105,131,167, 79,159,226,210,165, 75, 8, 13, 13, 5, 33, 4,118,118,118,133,190, 63,101,
- 70,180,127,248,240,201, 97,185,156,204, 25, 57,114, 98,253, 33, 67,134,224,232,209, 3, 24, 53,178,110,129, 99,187, 8,159,246,
-172,139,133,139, 30, 33, 40,168, 45, 28,236, 5,184,124,229, 69, 52,143,103,181,199,132,124,252,229,151, 95,126,225,169,213,106,
-228,230,230, 66, 46,151, 35, 45, 45, 63, 28, 85, 25, 22,172, 50, 3,171, 61, 11,121,185, 50, 51,135,203,224,114, 67,251,164, 51,
-161, 13,219,119,142,197, 39, 61, 70,226,242,153,157,184,122,241, 10,108,121,239,222, 66,150,115, 62,245,109,106,118,130,202,107,
-179,119,192, 24, 58, 78,117,113,243,212, 94, 54,180,139, 11,123,120,246,198,172,204,114,210,201, 17, 66, 72,122,216,222, 83,199,
- 57,124,218,188, 89, 80,237, 6,213, 93,132, 25,169,201,220,145,147,231,159,235,223, 30, 61, 93, 40,172, 76, 88, 21, 97,225,218,
-181,107,127, 0, 0,150,101,119,173, 89,179,102,204,215, 95,127,237,160, 84, 42,139, 4, 86,114,106,250,213,230,221,167, 24,211,
- 50,179,116, 59,214,204,234, 39, 17,139,132,115,151,238,184,110,160,113,191,204,202,133,199, 27, 62,103,211,111, 41, 71, 15,239,
-164,237,197, 2,220,153, 61, 15,111,174, 92,131,158, 18,160,243,165, 7,208,233,141,200, 78, 73,195,181,209,147, 96,237,108,131,
-115,169,145,198,172,156,236,225,230,106,217, 12, 51,204,248,255, 0,147,166,212,165,166,166, 38,223,188,249, 0,215,207, 44,198,
-141, 51,139,241, 34,244, 9,148,241, 58,196, 39,105, 96,105,105,121,175, 28,203, 87,199,146,141,130, 70,163,249,108,205,218,181,
-137, 82,153, 12,173, 59,116,128,179,131, 35,164, 2, 62,104,134, 5, 77,248,200, 77,177, 70,228, 51, 53,150, 28, 63,147,172,214,
-104, 62, 43,217, 56,148,228, 44,182, 31, 32, 4, 18, 75, 11, 8,229,114,136,139, 91,173, 8,129,192,194, 18, 2, 11, 75,208, 2,
- 97,133,233, 4,128,188,188,188,190,227,198,141,203,200,201,201,193,160, 65,131,112,255,254,253,208, 11, 23, 46, 88, 94,185,114,
- 69,242,236,217,179,218, 74,165,178, 83,124,124,252,150,178,196,213,159,238,253,250,117,134, 99,244,125, 55,108,218,150,174, 54,
- 56,161,103,175, 13,176, 20,166,193,192, 24, 1,142,131,171,131, 28, 77, 90,124,133,100,109,115,156, 57,125, 38,131,101, 52,125,
- 75, 46,153, 83,156,147,227, 56,206,206,206,238, 3,171, 28, 69, 81,184,126,253, 58,250,247,235,139,206,125,122,195,161,166, 7,
- 28, 59,118, 67,231, 49, 19,176,101,203, 22, 80, 20, 5, 91, 91,219, 15, 44, 26,101,229,103, 33,178,178,178,224,238,238,142, 7,
- 43,186,213, 63, 63,163,158,127,245, 55,191,248, 75, 31,175,170,127,245,234, 85,172, 90,181, 42, 55, 34, 34, 98,181,151,151,215,
- 87, 21,229, 39, 33,228,187,159,126,250, 73,253,254,253,123,200,229,114, 48, 12,131, 59,119,238, 96,227,198,141, 88,181,106, 21,
- 66, 67, 67, 97,103,103,135,218,181,107,131,162, 40,196,196,196,168, 9, 33,223,149, 83,150,216,156, 28, 94,223, 75,151,142,167,
-245,236,217, 26, 59,118,172,135,179,115,115,240,121,206,224,241, 29, 32,147,215,195,246,109,203,208,189, 91, 0, 94,134, 63, 78,
-207,205,229,245,189,126,253, 58, 99, 66, 58,245,207,158, 61,195,177, 99,199,176,112,225, 66,102,193,130, 5,200,202,202, 42,178,
- 96, 21,174,146, 62,127,254,124, 0,128, 86,171, 21,149,197, 57,102,214,179,248,175, 23, 63, 95,152,148, 24,223,244,198,181,123,
-131,175, 94,188,130,232,200,171,184,122,241, 10,110, 93,189, 59, 59, 41, 49,190,169,127,147, 58,130,207,198, 76,254,122,247,177,
-163,180,220,210, 5,187,143, 29,165, 7, 77,153,254, 99, 96,231,246,223,153,240,140, 56, 0, 92,110,114,210,183, 63,173,252, 37,
-151,209,107,168, 21, 63,111, 80,170, 83, 18,190, 67,225,212,202, 50,172, 87,197, 57,163,162,162,182,188,125,251, 86,241,246,237,
- 91,197,251,247,239,191,139,143,143,111,189,100,201,146,148, 2,193,149, 47,176, 94,156,188,247,242,214,206,159, 28,237,109, 36,
-205, 27,215,175,187,122,203,145,235, 49,177, 73,191, 21,198,192, 42, 45,157,247,238,221,203,208, 26,152,113, 95,205,154,207,101,
-102,234, 80,119,218,108, 48, 34, 57,180, 12,160,103,105,232,193, 67,232,226,213,176,176,179,192, 29, 46,131,211,210,212,216, 55,
- 37,156,252, 43, 42,159, 85,129,153,211,204,105,230,252,103,114,254, 43, 45, 88,174,174,174,173,123,125,218, 17,109,123,204, 5,
-199,113, 8, 15, 89,142,140,148, 87,112,117, 22, 33, 42, 38,187, 25,128, 27,166, 94, 48, 33, 33, 33,198,197,197,165,233,226,181,
-235,142,117, 14,106,226,237,229,234, 34,178,118,175, 1,153,163, 35, 82, 83, 83,112, 63, 56,194,176,233,210,213,231,106,141,198,
-164,165,114, 88,150,229, 88,150,133, 64, 32, 0, 71,211,240,153, 58, 27,132,162, 64,241,121, 69,150, 29, 16, 2,203,128, 22, 32,
-124, 62, 12, 38,250, 12, 41,149,202, 56, 87, 87,215,190, 83,166, 76,249,125,215,174, 93, 84,219,182,109,253, 78,157, 58,197,254,
-149,204, 78,122,118, 60,204,169, 97,159, 54,235,126,217,120,196, 63,176,105, 13,247,154,238,162,230,110, 86,208, 27,140, 72, 74,
- 78,195,141,187, 47,180, 17, 97,143,227, 57,189,190,111,114, 88,217, 81,220, 1,192, 96, 48,196,184,185,185, 57, 45, 88,176, 0,
- 12,195,128, 97, 24, 24,141, 70,164,166,166,226,222,189,123,104,216, 56, 8,222, 35, 71, 35, 37, 37, 5,235,214,173,131,155,155,
- 27,126,250,233, 39,228,228,228,224,230,205,155,101,230, 43,159, 6, 51,120,112, 65, 28, 44, 30,152,213, 61,122, 92,175, 95,191,
-126,203,166,134,100,193,188,117,249,150,173,105, 99, 7, 11,174,199, 92, 63, 44, 18,137,182, 68, 71, 71,151,235, 47,228,233,233,
- 41,212,104, 52,126, 28,199,209,217,217,217,107, 53, 26,205,136, 25, 51,102,184, 44, 93,186, 20, 94, 94, 94, 72, 77, 77,133, 76,
- 38,131,151,151, 23,114,114,114, 16, 29, 29,109,212,235,245,155,141, 70,227,194,164,164,164,148,242,184, 31, 62,124,248,218,223,
-223,191,105,114,210,166, 99, 19, 39,116,246, 50, 48,129, 66, 75,203, 86,224, 56, 3, 50, 51,226, 0, 60,213, 31, 63,113,229, 77,
-102, 38,253, 89,112,112,112,164, 73, 61, 14,138,154,176,102,205, 26, 20, 46,149, 19, 31, 31, 95,100,250, 43,205,130,101, 10, 86,
- 31,142,211, 0,216,191,226,203,230, 95,102,167, 62,245,178,229,189,123,219,180, 1,187,110,245,225, 56,205,130, 47,173, 23,167,
-190,187, 17,145,160,186,184,121,247,177,163,244,240, 62,125,141,110,242,200,217, 98, 71,238, 72,251,158, 21, 90,219, 56, 63, 63,
-191,106,132,164,215, 74, 78,123, 21, 60,106,204,248, 1, 86, 2,245,185, 70,110,105,158, 84,117,127,113,104,104,232, 91, 83,215,
-244, 44, 81,246, 35, 20, 10, 69,235,149, 43, 87, 94, 4,240,129,143, 89,114,106,250,213,102, 61, 38,115,153,153, 89,143,147,195,
- 78, 62,171,136, 43, 56, 56,120, 71, 96, 96, 32,134, 13, 29,181,117,236,232,177,116,131,169, 95, 35,254,250, 85,192,104, 64,226,
-173, 27,144,200,141, 56,147,250,206,152, 71, 83,227,130,131,131,205, 81,220,205, 48,195,140,127,151,192,138,139,139,187,225,233,
-225,118, 41, 34,162,117,167,234,110, 14,249,189,222,183, 74,196, 39,105, 47,153, 58, 60, 88, 82,100, 17, 66, 2,207, 50,204,192,
- 75,124,126, 15, 82, 16,138,129,171,194, 98,207,121,121,121, 73, 77,155, 54, 45, 35,246,194, 79,165,238, 53, 26,141,113,166,112,
-199,199,199, 95, 87, 40, 20, 67,155, 55,111,190, 84,169, 84, 30, 75, 73, 73, 81,253,213, 12, 79,122,118, 60,140,180,109, 91, 63,
-248,193,205, 97,161,193,247,123,112, 28,231, 11,128, 16,138,250, 99,177,231,176,138, 23,123, 86,171,213,227,231,206,157,187,133,
-199,227, 85, 71, 65,224,208,194, 44,211,235,245,244,142, 29, 59,196, 58,157,142, 6, 64, 4, 2, 1, 35,151,203, 53,119,238,220,
- 97,140, 70, 99,140,193, 96, 24, 95, 22,239,174, 80,142, 95,114,159,143,143,143,236, 53, 15,185,133,191,211,212,128, 82,169, 92,
-110,202,253,158, 59,119,206,221,198,198,166, 19, 33,164, 31,199,113,245,114,114,114,180, 63,252,240,195,221,107,215,174,101,191,
-122,245,170, 75,171, 86,173,136,179,179, 51,162,163,163,185,220,220,220, 35, 20, 69,125,167, 84, 42,163, 76,205,207,208,208,208,
- 40, 66, 72, 35, 85, 30,247,185,133,252, 66,119,150, 67, 35,128, 35,132,144,103,185,185,228,156,139,139,199,111,151, 47, 31, 54,
-121, 42, 92,193,218,130,189, 10,127, 7, 4, 4,156,123,245,234, 85,183, 66, 11, 86, 73, 31,172, 74, 65,154,123, 74,163,126,215,
-151,200,243,142,175,254, 57, 78, 3, 0,243,214,100,102, 1,216, 62,181,143, 45,251, 50,100,251,114, 87,203,200, 89, 63, 31, 79,
- 55,105, 77, 62,127,127,127, 15,138,162, 6, 2,104,224, 40,202,172,237, 32,204, 50, 18,194,181, 35,132,178, 7,240,212,199,199,
-231, 12,128,184,170, 36, 85,169, 84, 70, 0,168, 81,114,127,242,139,147,247, 0,220,171, 12, 87,112,112,240,142,102,205,154,157,
-220,176,117,243,110,154,144,166,196,104,180, 54, 78, 24,244,199, 98,207, 34,225,240, 96,243, 98,207,102,152, 97,198,191, 81, 96,
- 1,192,155,168,184,206, 0,224,229,229,197,189,126,253, 26, 28,199,145,191,114,225, 2, 1,117, 0, 38, 6, 17, 45, 11,207,159,
- 63,247,255, 79,102,144, 82,169,220, 15, 96,255,199,228,228,242,135,170,118, 20,108, 85, 66,124,124,252, 51, 0, 65,255,141, 66,
- 18, 22, 22,166, 26,225, 79,138, 44, 91,124, 26,140,169,255,237,212,169,211,123,189, 94,127, 5, 64, 44, 33,196, 26, 64,186, 94,
-175,191,152,146,146,146,228,236,236, 28,248,254,253,251,239, 11, 44,145,139, 18, 19, 19,131,171, 88,150, 88, 0,251, 10,182,143,
-138,144,144,144,238, 10,133, 34,212,206,206,206, 83,163,209, 8, 53, 26,141,160,184,246,151, 72, 36, 41,166,114, 89, 91,144, 93,
- 2, 94,134,157,181, 5,249,211,115,183,117,197, 81,181,234,121, 93, 91, 87, 28,173,140,184,244,243,243,219, 75, 81, 84, 77,142,
-227,156, 0,206,138,227,144,194,113, 92, 42,143,199,139, 15, 11, 11,139,255,167, 84, 52,247,242, 5, 84, 15,115,149,107,134, 25,
-102,152, 5, 86, 25,136,140,140, 36,230,108,251,247,161, 52,203,150, 41, 40,136,112,127,183, 96,251, 0, 5,130,170,231, 63,253,
-222,149, 74,229, 71, 17,241, 99,102, 61,139, 7, 48, 61,176,148,121, 22,243,214,165,231, 0,248,186,221,167,149,227,124,252,248,
-113, 12,128, 24,115, 9, 53,195, 12, 51,204,248,103,129, 50,103,129, 25,102,152, 97,134, 25,102,152, 97,198,199, 5, 1, 80,234,
- 76,128,202,172,148, 93,149,217, 4, 21,241,155, 57,205,156,102, 78, 51,167,153,211,204,105,230,252,255,199,249,175, 65,225,180,
-243,255,196, 6,160,163,153,211,204,105,230, 52,115,154, 57,205,156,102, 78, 51,231,191,109, 51, 15, 17,154, 97,134, 25,102,152,
- 97,134, 25,102,124,100,148,233,228,238,225, 81,205,135, 50,178, 45, 56,142,162, 57,138, 51,144,108,245,193, 55,233,233, 31, 4,
- 1,172, 94,189,186, 53,159, 66, 79,194,113, 50, 66, 88, 35, 75, 83,119,162,162, 98,195, 76,185,176,143,143,143, 0,192, 8, 62,
-159,223,210, 96, 48,184,240,120,188, 4,141, 70,115,155,207,231,239, 10, 11, 11,211,255,147, 50,169,101,203,150,131,142, 28, 57,
- 98,221,163, 71, 15,173, 94,175,103, 68, 34, 17,111,223,190,125,162,145, 35, 71,102,222,190,125,187, 74, 51, 12,253,252,252,218,
-175, 88,177,162, 86,251,246,237,209,178,101, 75, 85,183,110,221, 4,129,129,129,130,175,191,254, 58,250,241,227,199, 87, 43,195,
-229,228,228,228,195,227,241,246, 16, 66,104,142,227,134, 21,204, 48,252,143,128, 16, 50, 8, 64,127, 0, 46, 0, 18, 1, 28,226,
- 56,110,127, 21,185,186, 32,223,201,221,183, 96,215, 83, 0,167, 57,142,187,240, 23,210,215, 5, 64, 79,154,166,253, 0,192,104,
- 52, 62,254, 88,156,124, 62,191, 17, 0, 24, 12,134, 39, 31,139,147, 16,210,168,192,146, 92, 37,206,128,128,128, 31,132, 66,225,
- 88, 0,208,233,116, 59,228,114,249,146,210,206,187,113,227,134,174,172,208, 39, 62,181, 8, 23, 54,171, 94,254,247,229,225, 0,
-128, 10,127, 71, 87,113, 22,241, 22,111,174, 52, 94,140,127, 89,229,201, 51, 10,133,226,139,110,221,186,125,115,225,194,133, 31,
-227,226,226,182, 86,246,255, 71,142, 28,161, 77, 57,239,243, 89,219,123,200,229, 54,223,231,102,103, 45, 61,176,114,212,241,194,
-253,253,250,245, 51,194, 12, 51,204, 48,195, 20,129,229,225, 81,205,167, 95,239,207,126,154, 48,126, 34,161,105, 10, 47,195,195,
-121,147,166,126,217,201,219,219,219, 85,166,209,120,115, 0,171,150, 72,158,211, 52, 21,191,105,195, 47, 22,117,235,212, 49, 26,
-141, 44, 54,111,217,212,213,195,163,218,156,138, 68,150,163,163, 99, 45, 23, 23,151,181, 83,167, 78,117,236,212,169, 19,229,228,
-228,132,184,184, 56,203,227,199,143,215,254,245,215, 95,123, 56, 58, 58, 78, 79, 78, 78,142,174,202, 13,185,184,184,180,114,180,
- 70, 39,185,152,235,128,108,130, 92, 35,126, 79,214,226, 82, 66, 66,194,173,170,102,146, 78,167,155,146,151,151, 23,228,237,237,
-205,109,222,188,153,140, 29, 59,150, 35,132, 16,181, 90,189, 11, 85, 12,225, 32,149, 74, 55,180,111,223,222,171, 69,139, 22, 81,
-119,239,222,237,198,113,220,185,126,253,250,121, 72,165,210, 72, 0,117, 42,195, 69,211,244,206,176,176,176, 70, 26,141, 6, 1,
- 1, 1,191, 2, 8,248, 15,137,171, 95,237,236,236,216, 77,155, 54,109,105,216,176,161,167, 74,165,202, 27, 51,102, 76,103, 66,
- 72,123,142,227, 70, 87,130, 71, 6, 96,157,149,149,149, 96,241,226,197,247,219,182,109, 27, 35, 20, 10,165, 17, 17, 17,220,212,
-169, 83, 71, 17, 66,250, 1,152,202,113,156,170,178,156, 10,133,194,114,217,178,101,175,252,253,253,239, 10,133, 66,193,219,183,
-111, 49,109,218,180, 9,127,133,179, 94,189,122,210,101,203,150, 61,241,246,246, 78, 19,139,197,130,247,239,223, 99,198,140, 25,
- 99,104,154,238,199,178,108,149, 56, 29, 29, 29,101, 75,150, 44,121, 22, 24, 24,152, 41, 22,139, 5,111,222,188,225,190,252,242,
-203,177,149, 73,103,155, 54,109, 62,167, 40,106,193,205,155, 55, 1, 0,205,154, 53,251, 65,167,211,205, 45,121, 30,199,113,104,
-217,178,165,166, 77,155, 54, 99,111,220,184, 81,106, 88,148,221,162, 89,131, 0,224,235, 31, 10,126, 23,236, 47,237,247,112,237,
-242, 74,151,121,159, 90,132, 3,128, 73, 95,109, 28,154,255,153,191,127, 83, 65,232,222, 13,181, 8, 87, 25,209,230,234,234, 58,
-190, 73,147, 38,223, 62,120,240, 96,119, 96, 96,224,180,173, 91,183,242,123,244,232,177, 88,161, 80,120,118,233,210,165,223,189,
-123,247, 86,132,135,135,111,248,152,229,223,217,185,218,250, 85, 63,111, 85, 76,159, 60,122, 41,128,227,230,230,195, 12, 51,204,
-168,180,192,162,140,108,139, 9,227, 39,146,129,131, 62, 79, 76, 72, 74,102,229, 22, 86,131, 14, 29, 62, 44,173, 83,167, 14,165,
-249,229, 23, 48, 41, 41, 48,206,156,217,252,198,141, 27,134,201,211,103,170,181,154,188,157, 46, 78,142,210,131,251, 15, 56, 31,
- 59,122,164, 5,128,176,242, 44, 87, 46, 46, 46,107,143, 30, 61,234, 92,171, 86, 45,232,116, 58,164,165,165,193, 96, 48,160, 79,
-159, 62,116,211,166, 77,157, 71,141, 26,181,214,199,199,231,179,202, 88,178, 28, 28, 28,156,188,170,243,207,204,155,222,181, 78,
-251, 54, 1, 50,103,215,154, 64, 28,139,248,232,215,141,175, 60, 8,153,218,210,211, 45, 34, 50, 91,215, 35, 37, 37, 37,169,178,
-153,148,150,150, 54,107,252,248,241, 71,125,125,125, 29, 68, 34, 17,156,157,157,201,152, 49, 99,146, 19, 18, 18, 22,252, 5,177,
-146,159,215, 20,101, 44,254,105,234,130,212, 37,224,102,101,101, 5, 43, 43, 43, 0,112,253, 43, 5,162,127,255,254,116, 76, 76,
-204, 88,150,101,189,139,239, 79, 72, 72,240,112,112,112, 72,122,251,246, 93, 35,181, 78, 31, 56,113,242,156,249, 3,251,117,180,
-190,123,247, 46,186,119,239, 78, 17, 66, 6, 85,194,146,181, 46, 40, 40, 40,114,233,210,165,130,200,168,183,245,239, 63,122, 12,
-153, 88, 96,116,115,115, 21, 61,125,250, 84,184,108,217,178,164, 31,127,252,113, 29,128, 81,149, 72,250,186,254,253,251,103, 76,
-159, 62, 61, 47,226,205,219,154, 15, 66,159,113,114,145,192,224,228,228, 64,223,189,123,151,191, 97,195, 6,242,221,119,223, 85,
-154,115,204,152, 49, 9,211,167, 79,231,165,164,101,214, 78, 76, 74,229,132, 2, 90,111,109,109,205,187,124,249, 50,181,115,231,
- 78,253,212,169, 83, 43,205,217,189,123,247,164,217,179,103,243,195, 35,163, 60,238,135, 60,131, 92,196, 55, 56, 59, 59,210,247,
-239,223,167,215,173, 91,199,204,155, 55,207, 36, 78,142,227, 54,175, 92,185, 18, 39, 79,158, 4, 0,236,223,191, 31, 30, 30, 30,
- 31, 12,251,171, 53, 90, 80, 4,120,251,246,173,116,194,132, 9,155, 81, 74,220,185,176, 89,245,176, 27,192,240,225,195, 19, 77,
-179, 66, 45,175, 92,161,218,226,205, 21, 10,171,137, 19, 39,150, 21,155,107,168, 79, 37, 68, 86,139, 22, 45,190, 57,120,240,160,
-253,225,195,135,191, 58,126,252,120, 97,167, 69,186,126,253,250, 47,122,245,234,133,209,163, 71,127, 3,224,163, 10, 44,161, 64,
- 36, 34, 20,129, 68, 44,181, 52, 55, 29,102,152, 97, 70,149, 4, 22,199, 81, 52, 77, 83, 72, 78, 74, 53,124,210,177,211,168,245,
- 27, 55,138,132, 66, 33,116, 58, 29, 84, 87,175,130,211,104, 96, 45,149,162, 91,183,110,252, 6, 13, 26, 88,142, 31, 51,102, 76,
- 82,162,114, 11, 77, 83,206, 28, 71, 85,100,110, 31, 49,117,234, 84,199, 90,181,106,125,176,211,104, 52, 34, 61, 61, 29, 22, 22,
- 22, 24, 48, 96,128,253,222,189,123, 71, 0, 48,201,220,239,228,228,228, 94,199,195,233,206,145,237, 51, 93, 28,173, 41, 32,229,
- 8,240,254, 53,176, 79, 12, 47,199,234,240,106,215, 86,214,171, 73, 67,255, 1, 43,118,132, 58, 57, 57,181, 72, 74, 74,122, 87,
-153, 76,122,251,246,237,109,133, 66, 49, 70,173, 86,159, 4, 64,221,185,115,135,139,137,137, 25,159,152,152,248,190,170, 25,207,
-178, 44, 50, 51, 51,193,178, 44, 93,240,187,240,243,111, 43, 12,253,251,247,167, 99, 99, 99,199,123,123,123,215,222,182,109, 27,
-146,147,147, 33,145, 72, 96, 52, 26,209,188,121,243,234, 29, 58,116,120,147,146,150,105, 99, 96, 12,186,132,184, 55, 77, 14,108,
-125,151,215,200,203,235,238,161, 67,135, 26,218,217,217, 13, 48,197,154, 71, 8,233, 98, 97, 97,193,251,233,167,159, 40, 11,107,
-231,238, 77,130, 20,252,103, 97,175,222, 9, 68, 60, 54, 43, 43, 59,237,201,147, 39,225,243,230,205,107,117,234,212,169, 68, 66,
- 72, 23, 83,134,204, 8, 33, 93,156,157,157, 45,166, 77,155,166,146, 88,216,183,108, 28,228,200,123, 30,246, 58,158, 47,160, 12,
- 45, 90,180,104,119,239,222,189,157, 51,103,206,244, 61,123,246,108, 86,101, 56,107,215,174, 45,153, 62,125, 58,109,101,109,223,
-209,193, 89, 65, 59,216, 90,123, 2, 64, 84, 84,212,222,164,164,164,200,137, 19, 39, 54, 62,123,246,108, 78,101, 56,237,237,237,
-165,179,103,207,230,213,244,168,219,215,195,171, 46,117,229,250,131,103, 66, 33,101, 80,171,213,233, 47, 95,190,124,253,205, 55,
-223, 4,158, 61,123, 54,219, 20,206,188,188, 60, 11, 87, 87, 87, 56, 57, 57,129, 85,171,145,149,149,133, 99,199,142, 33, 39, 39,
- 7, 70,163, 17, 18,137, 4, 63,174,222,130, 55,207,239,227,214,173, 91, 80,171,213, 22, 31,163,156,248, 44, 15, 71,216,120,211,
-197,213, 38,118,242,208,114,132, 21,138, 9,175,161,216,226,205,149, 55, 92, 88,204,114, 21,119,248,240, 97, 71, 79, 79, 79,180,
-109,219, 22, 0, 48,106,212, 40,116,236,216, 17, 39, 79,158,196,165, 75,151, 98,154, 53,107,246, 58, 54, 54,118, 85,124,124,252,
-150,143,113,223, 70,206,168, 7, 0,145, 88, 36, 10, 15, 15, 39,245,234,213,227,204, 77,136, 25,102,152, 81, 22, 74,117,114,231,
- 8, 81,189,120,249,146, 47,183,182, 30,186,126,227, 70, 17,159,207,199,251,247,239, 17, 22, 22,134,188,223,127,135,250,238, 93,
- 36, 37, 37, 33, 55, 55, 23, 14, 14, 14, 88,178,124,185, 76, 32,145,141,138,124,253,154,230, 40,206, 80,172,135,253,167,169,154,
- 66,161,176,101,183,110,221,202,116,174, 79, 76, 76, 68,167, 78,157,120, 60, 30,175,101, 25,189,246, 43, 37, 26, 45,162,112, 32,
-167, 15,111,157,230,226,200,123, 6,188,158, 1,228,132, 2,156, 22, 96,116, 64, 76, 56,112, 98, 53, 92,211, 34,201,254, 41, 3,
-156, 93, 37,130,211,164,132,153,168,162, 41,165,110,110,110, 30, 30, 30, 30,219,251,245,235, 71, 1, 64,203,150, 45,137,135,135,
-199, 86, 55, 55, 55,143,114,172, 11,229,114,106, 52,154,251, 25, 25, 25,232,209,163,135, 93,243,230,205,175,244,232,209,195,174,
-112,127, 85, 57, 11, 96,215,190,125,251, 52, 15, 15,143,253,238,238,238, 34, 19,172, 32, 69,156, 49, 49, 49, 99,235,213,171, 87,
-123,219,182,109, 52, 77,211,216,182,109, 27, 14, 30, 60,136,219,183,111, 35, 57, 57, 89, 58, 99,198, 12,235, 51, 87,238, 95,184,
-115,251,225,169,149,115,191,178,235,211,161,173,135, 77, 86, 74,182,173,173,109, 55, 0,206, 38,166,179,231,220,185,115,111, 60,
-126, 25,229, 72,241,248, 2,145,128, 47,113,176,183,174,225,236, 96, 83,219,213,206,166,182,133,144,111,157,157,157, 29,125,226,
-196, 9, 6,197,130,144, 86,196,185, 98,197,138,151,225, 81,177,118, 20,205,227,243,105,190,208,218, 74,110,247,105,143, 78,237,
- 0, 64, 66, 19, 81,118,118,118,236,222,189,123, 43,197,185,116,233,210,144,132,148, 12, 71,190, 64,200, 19, 9,248,226,194, 3,
- 54,150,114, 39,153, 72, 36,201,203,203,123,191,125,251,118, 93, 37, 57,159,188,136,124,111, 79, 40,208, 20, 8,223,198,198,194,
-209,193,218,194,217,209, 82,238, 44,166, 32,206,206,206,126,183,127,255,126,189,169,156,201,201,201, 8, 15, 15, 71,181,198,141,
-113,229,202, 21, 84,175, 94, 29, 3, 6, 12,192,231,159,127, 14,137, 68,130,246,205, 26, 98,206,156, 57,120,243,230, 77,153,207,
-189,208, 31,170, 60, 40, 20,138,235,149, 41, 75, 64,254,176, 96,121,226,170, 36,103,105,231,149,228,108,209,162,197, 55,199,142,
- 29,179, 95,179,102,141,223,151, 95,126, 25,117,236,216, 49,248,250,250,226,229,203,151,112,117,117,197,129, 3, 7, 48,121,242,
-228,168,249,243,231,251, 93,190,124, 89,161, 80, 40,102,153,250, 30, 13, 27, 54,172,101,255,254,253,111,245,239,223,255,241,192,
-129, 3,183,142, 31, 63, 94,241,129, 21, 87, 25, 23,172,211,233,208,200,191,177,116,209,175, 15,134, 84,225,221,172, 20,204,156,
-102,206,127, 27,231,191, 66, 96, 25, 88,156,158, 50,109, 70,222,238,221,187,165, 66,161, 16,239,223,191, 71, 98, 98, 34,142, 31,
- 61,106, 28,220,176, 97,206, 48, 63,191,236,227, 71,143,114,122,189, 30, 28,199,161,118,237,218,232,214,173,155,100,204,184,137,
-201, 36, 91,125,176,130,135,226,232,224,224, 80,180,104,238, 7,166,173, 17, 35,192, 48, 12, 44, 44, 44, 64, 8,113, 52,229, 6,
- 92, 92, 92,250,143,250,186,131,155,101, 13,203, 36, 46,113,119, 58,104, 49,192,179, 0,120,150,128,196, 18, 16,203, 0,129, 24,
-218, 71,183,211, 57,180,120,215,217,191,191,171,139,139, 75,255,202,100,146,189,189,253,247, 71,142, 28,113,120,250,244, 41,151,
-147,147,131,164,164, 36,238,155,111,190,113,176,183,183,255,190,170, 25,175, 84, 42, 23,141, 26, 53, 42,169,111,223,190, 86,187,
-119,239,174,214,183,111, 95,171, 81,163, 70, 37, 41,149,202, 69,127,229,129,242,249,124,250,234,213,171,182, 95,125,245,213,231,
- 6,131, 33,184, 67,135, 14,105,254,254,254,193,206,206,206, 53, 76,176,170,121, 23,138, 43, 0,160, 40, 10, 66,161, 16, 66,161,
- 16, 86, 86, 86,153, 81, 81, 81, 70,119, 39,137, 80,204,228, 26,109,120, 20,191,166,139,179,157,181,179, 75, 91,149, 74,117, 27,
- 64,130,137, 73,244,109,219,182,173,152, 97,105,227,196, 17,237,107, 79, 30,217,190,230,182,165, 19,125, 55,252, 52,177,254,202,
-133, 19, 90, 45,253, 97,244, 48,194, 48, 57, 53,107,214,244,192, 31,206,239, 21, 89,134, 26,249,250,250,138, 56,240,241,228, 69,
- 84,220,219,152,248,236, 46,237, 91,212, 45,186, 96,147,166,159, 59, 58, 58,126,234,225,225,209, 17, 64,103,147, 76,187, 60, 94,
-163,134, 13, 27, 74,120,124, 17, 28,237,173, 60, 44,228,178,162,161, 87, 27,123,199,142,206,110,110,163,121, 64,154,139,139,139,
- 27,143,199,107,100,106, 58, 3, 3, 3,197, 44, 4,112,118,176,181,117,176,183,177,236,214,161,165, 79,139, 86,205, 27,250, 55,
-111,217,206,191, 89,139,145,148,209,152,225,238,238,238, 90,232,252, 94, 17, 78,156, 56,129,117,235,214,161,101,253,250,112,119,
-119,135,131,131, 3,126,255,253,119,252,254,251,239,144,203,229,200,204,204,196,166, 77,155,112,241,226,197,191, 92, 89, 20, 10,
-162, 34,199,244,143,128,146, 34,171, 34,177,119,251,246,237, 99,135, 15, 31,134,167,167, 39, 70,142, 28,233,177,115,231,206,168,
-168,168, 40,200,229,114, 60,121,242, 4, 95,127,253,117,212,252,249,243, 61, 70,140, 24,129, 3, 7, 14, 32, 62, 62,254, 55, 83,
-210, 49,112,224,192, 73,126,126,126, 87, 19, 19, 19,155,165,167,167, 55, 56,118,236,216,168, 62,125,250, 68, 15, 26, 52,168, 67,
-145, 5,203, 96,216,119,246,212, 81,116,255,244, 51,212,173,223, 96,243,136, 57,123, 27,154,155, 16, 51,204, 48,163,204,118,164,
-180,157, 49, 49, 49,153,222,222,222,174,158,158,158,148, 78,167, 67, 86, 86, 22, 46,158, 63,111, 60,112,232,208, 89,157, 78, 55,
-149,162, 40,193,174, 61,123, 54, 59,187,184,180,251,172,111, 95, 98, 48, 24,208,177, 99, 71,225,213,171, 87,237,158,198,196,228,
-148,119, 65,154,166,139,172, 71, 95,124,241, 5,214,172, 89, 83,216,123,252, 67,224, 25, 12, 38,251, 34, 73,228,108,183, 54, 29,
- 27, 88,198,202,126,177,212, 55, 55,228,186,191,177,184, 47,203,149, 4,130, 18,242, 32, 17,131,213,137,153,200,204,142,193,111,
-222,214,244,145,104,146,107,182,168, 27,132,131,247,143,119, 3,112,200,212, 76,146, 72, 36, 77,164, 82, 41,194,195,195,211, 3,
- 2, 2, 50, 45, 45, 45,173,188,188,188,236, 37, 18, 73,147,170,102,124, 82, 82,210, 91, 87, 87,215,214,159,125,246,217,100,138,
-162, 58,178, 44,123, 37, 45, 45,109,125, 82, 82,210, 91, 83,254,239,234,234, 58,145,227,184,121, 0,142, 20,238,211,233,116,160,
- 40, 10, 28,199,161,103,207,158, 88,186,116,169,207,149, 43, 87,112,243,230, 77,219,193,131, 7,223, 87, 40, 20,153,132,144,209,
-241,241,241,101, 90,201,210,210,210,176,121,243,102,240,120, 60, 88, 91, 91,195,194,194, 2, 98,177, 24,109,219,182, 77, 90,185,
-114,165,215,254,253,251, 13,153,201,201, 68,146,147,165, 37,118,118, 98, 40,170,119, 25, 58, 96,224,125, 0,135, 77,189,119,185,
- 92, 46, 17, 66,155, 67, 25, 53,212,138,249, 27,120, 82,129,128,136, 5, 60,136,216, 60,122,206,210,197,156,152,112,252,194, 33,
- 83, 83, 33, 22,139,133, 50, 33,167,229,139, 40,131,148,226, 62,202, 56, 43,143,199, 19,137,248, 80,151,117, 92, 64, 17,154, 16,
- 34, 1,160,173, 76, 58,229, 66, 99,153,231,139, 41,208, 20, 69,137,203,226,236, 95,159,112,135, 39, 23, 10,156, 34,163, 26, 24,
-134, 65,147, 38, 77,112,224,228, 53,156,251,253, 46, 82,223, 63,197,212,137,163,224,229,229, 85,161,184, 42,244,193, 50,161, 83,
- 0,133, 66,113, 93,249,131, 85,197, 39, 23,248, 93, 85, 52, 52, 88,156,211,103,121,120,185,179, 19,221,220,220,198,249,249,249,
- 13, 63,126,252, 56,218,181,107,135, 30, 61,122,160,110,221,186, 30,131, 7, 15, 6, 0,180,110,221, 26,223,127,255,189,199,231,
-159,127,142, 19, 39, 78,224,220,185,115, 8, 12, 12,156,166, 80, 40,146,149, 74,229,198,114,196,213,252, 49, 99,198,204, 93,191,
-126, 61,248,252,252, 21,161,122,247,238, 93, 88, 63,238,232,223,191,127, 90,225,185,135,183,199,221,173,229,225,213,124,210,212,
-175,132,147, 39, 12,155, 13,224,115,115, 51, 98,134, 25,102,152, 44,176, 0, 64,164,215,215,213,110,222, 12,213,149, 43, 16, 94,
-186,132, 51,141, 26,229, 50, 12, 51, 83,169, 84,198, 2,128,147,147,211,244, 67,135, 15,223,233,248,251,239,150,186,240,112,184,
- 61,123, 6, 94,157, 58,126,166, 94,120,201,146, 37, 69,162, 0, 0,246,236,217,131,172,172, 44,100,101,101,129, 97, 76, 94, 75,
- 24,124, 33, 90, 58,218, 85, 71, 2, 34,193,242, 40,249,187,186,121, 77,229, 26, 11,165,107,140,147, 42, 75, 80, 7,225,113,245,
-101,234, 76,109, 83, 66,235,160, 73,205,131, 91, 75, 47,240, 80,250,240, 99,153,102, 62,138, 42,108, 28,211, 67, 66, 66,122,182,
-108,217,242, 52, 0,251,194,253, 85, 69,124,124,252,107, 0, 83,171,242, 95,154,166,231,221,186,117,203,241,208,161, 67,147,127,
-254,249,103,174,184,192, 42,252,206,227,241,192,113, 28,100, 50, 25,120, 60,158,211,137, 19, 39,156, 62,253,244,211, 13, 0,202,
-124, 78, 82,169, 20,142,142,142, 16, 10,133,176,176,176,128, 42, 59, 67,182,233,167,185,109,165, 54, 78,182, 83,167,205,164,198,
-141, 27, 23,182,118,237,218,106,206,117,235,122, 63,127,254,252,109,159,129,159,223, 61,121,242,164,186, 18, 14,238, 79,195,195,
-195,105, 47, 79,119, 1,107, 80,179, 50, 1, 32,126,242, 51, 43,180,112,134,152,166,193, 35,224, 36, 82,153, 99,108, 66, 66,140,
-169, 86, 49,142,227,158,188,123,247,142,184, 41,156,120, 57, 42, 77,166,140,199, 10,163, 31, 61,124, 89,171,113, 19,111, 0,208,
- 60,186,123, 92, 84,183,190,133, 50, 59, 71,226,234,234, 26,101, 10, 39,195, 48, 79,226,226,226,136,173,173, 45, 63, 50,242,245,
-111,118,150, 22, 10, 91, 39,167,182, 0,160, 75, 79,185, 73,212, 26, 37,159,207,119, 77, 73, 75, 75, 96, 24, 38,198,212,116, 70,
- 71, 71, 19, 55,133, 19,239,244,217,115, 7,156,101, 82, 23,107,137,200, 74, 76,129,136, 57, 54, 75,200, 48,137, 18,169, 76, 17,
- 23, 31,159,196,113, 92,153,126,130,155,216,201, 67,243,191,253,186,183,132,117, 7,215,130,163, 97, 69, 27,193, 55,168,112,255,
-216, 33,124, 54,229, 75,147,222,167, 21, 11, 71,236, 95,177,112, 68,153,225, 25, 74, 8, 34, 40,199,255,197,154,103,139,247,245,
- 63,113, 42,203,119,112,239,210,165,203,119, 91,183,110,149, 22,254,126,249,242, 37, 90,182,204,127,149, 23, 44, 88,128,206,157,
- 59,163, 81,163, 70,120,249,242, 37,106,212,168,129, 99,199,142,129,166,105,254,184,113,227,190, 1,176,177, 28,203,109,207, 45,
- 91, 62,116,211,210,235,245, 96, 24, 6, 6,131,193,133, 97, 24,151,194, 78,223,207, 63,175, 75,189,116,241, 12,190,153,179, 0,
-142, 14,206,126,230, 38,196, 12, 51,204, 40, 83, 59,148, 89,233,112, 28,203,164,167,131,211,230,119,164, 5, 2, 1,199,113, 92,
- 81,229,198,231,243,165, 86, 86, 86,132,239,230, 6, 34, 42,112,245, 33,228, 47,199,131,225,241,120, 48, 26, 77,167, 49, 26, 65,
-131,232,193,225, 15,127, 83,149,152,224, 71,251, 14,152, 42,251, 18,137, 66,171,226, 45, 28, 56,134,133, 17,149,179,142, 16, 66,
- 56,149, 74, 5,173, 86,107,227,233,233,121, 86,163,209,216, 20, 52,152,127,155,147, 43,195, 48, 81, 60, 30, 15, 35, 70,140, 0,
-242,151, 60,130, 78,167,195,227,199,143,161,213,106,161,211,233,112,231,206, 29,100,101,101, 65,167,211,225,242,229,203,168, 81,
-163, 6,120, 60,158, 75,121,188, 44,203,194,193,193, 1, 78, 78, 78,208,170,178,101, 71,183,174,237,190,124,254,183,246,131, 60,
- 57,234,215,117,171, 88, 79, 79,207,140, 6, 13, 26,216, 74, 36,146,140,128,128,128,204, 19, 39, 78,156,170, 76,136, 6, 0,167,
-103,207,158,237, 27, 20, 20,228,110, 45,151,233, 69, 66, 26, 34, 70,197,137,180,105, 28, 79,157,202,213,112,115,215, 67, 38,111,
-210,183,111, 95, 35,128,211,166,114, 78,157, 58,181,186,183,183,183,189,181,165, 44,155, 71, 33, 94, 96, 52,198,103, 4,223,189,
- 12, 0, 2,123, 71, 53,100,242, 38,131, 7, 15, 54, 84,134,115,230,204,153,158,174,174,174,118, 20, 69, 50, 25,189,254,125, 81,
-121,208,168,147,104,145, 88, 5,145,184,213,232,209,163,153, 74,166,211,195,215,215,215,206,198,202, 50,147, 79,145, 24,129,145,
-137,149,112,198, 56,161, 65,159, 34,114,116,202,133, 76,222, 98,208,160, 65,101,166,179,208,122, 85,210, 50,196,227,241, 16, 31,
- 31,143, 60,229, 83, 8,226,195,209, 72,206, 71, 83,103,123,200,100,178,138, 5,214,248,151, 36, 44,154, 35, 97,209, 28,193,248,
-151,164,180,223,165,136,172,114,203,126,185, 67,125, 91,188,175, 87,133,243,220,185,115,203,122,245,234,101, 24, 56,112, 32, 46,
- 95,190, 12, 66, 8,110,223,190,141,248,248,120,116,238,220, 25, 28,199,225,241,227,199, 69,226,171, 95,191,126,232,209,163, 71,
-222,133, 11, 23,126, 52,181,112,110,221,186, 21, 12,195,128,207,231, 67, 34,145,192,210,210, 18,182,182,182,112,114,114,122,227,
-232,232,248,124,201,230, 19,175, 59,117,238,129,244,180, 84, 36,167, 36, 62, 54, 55, 33,102,152, 97, 70,165, 5,150, 65, 36,122,
-193, 78,153, 2,235, 83,167,192,143,140, 68,191,207, 62,179, 20,137, 68,235, 92, 92, 92, 2, 20, 10, 69, 11,137, 68,178, 97,230,
-140, 25, 22,246, 75,150, 64,113,243, 38, 18,175, 92,129,129,207,127, 84,153,139,171,213,234, 66, 1, 3,109,129,144,179,182,182,
-174,148,192, 98, 25,220, 75, 72,137,132, 16,238, 96,193,229, 94,200,110,253, 96, 80,212, 92,199, 51,217,181,188, 94,171, 4, 94,
- 11, 29,154, 58,174,171,209,242,129,138,240,114,133,214, 98, 40,227,149, 48,130,189, 87,153,116,106, 52,154, 44,149, 74,133,218,
-181,107,219,133,132,132,120,122,121,121,217, 22, 8,154,135,127, 37,243, 21, 10, 69, 51,127,127,255,195, 1, 1, 1,111,253,253,
-253, 15, 43, 20,138,102,149,248,251,175,143, 30, 61, 2, 77,211, 24, 55,110, 28,114,114,114,160,215,235,145,150,150,134,152,152,
- 24,232,116, 58,196,197,197,225,213,171, 87,208,233,116,120,247,238, 93, 81, 30,151, 7,131,193, 0, 11, 11, 11,100,166, 37,203,
- 14,110, 90,213,125,241,252,239, 36, 89,111, 66, 16,167, 76, 2,107, 84, 43,191,255,254,251, 40, 79, 79,207,219, 90,173,182, 30,
-195, 48,221, 56,142, 59, 88, 9,161, 74, 1,120,236,229,229,213,105,229,202,149, 45,191, 95,186, 93,100, 65,231,112, 66, 11, 17,
- 43,180, 16,114,194,122, 77, 49,102,222,122,241,234,213, 43,238, 5, 7, 7,103,153, 56, 51,143, 2,240, 56, 32, 32,160, 89, 98,
- 98, 98,203, 70,141, 26,249, 57,215,174, 35, 22,185, 42, 82,133,138, 26,105,156, 58,239, 10, 85,189,102,207,157, 59,119,222,186,
-121,243,102, 82,101, 56,157,156,156, 90,110,222,188,217,191,122,245,234,141,197, 86, 86,146,220,204,204,173,218,204,244,237,124,
-123,103, 9,101,103,223,255,232,209,163,191,159, 61,123, 54,173, 50,156,117,235,214,109,177,100,201,146, 70,254,254,254, 1, 46,
-117,234,138, 37,174,110, 41, 2,215, 26,201, 18,223, 64, 49, 85,195,163,223,246,237,219,175,221,185,115, 39,213,212,128,163, 20,
- 69,129,207,231, 67, 38,147,225,198,141, 27, 24,244, 89, 23, 56, 59, 90,162, 78,221,186,104, 59,126, 10,206,158, 61, 11,161, 80,
-136,191,106,109, 45, 9, 83, 4, 81,101,197, 87, 69,156, 74,165,114, 99,112,112,240,207, 3, 6, 12, 64,199,142, 29,241,228,201,
- 19,204,154, 53, 43,234,236,217,179, 0,128, 39, 79,158, 96,241,226,197, 81,247,238,221,195,200,145, 35,209,178,101, 75, 60,126,
-252,120,119,101,130,143,142, 26, 53, 10, 6,131, 1,185,185,185, 72, 79, 79,199,153, 51,103,208,168, 81, 35, 78, 42,149,126, 70,
- 87,235,244, 99,255, 49,115,154, 55,240,245,195,134,117, 43,117, 66, 30,127,169,185, 9, 49,195, 12, 51, 42, 37,176, 60,109,109,
- 45, 52,154,188,184,155, 55,111,234, 41,138,130, 84, 42, 69,255,129, 3,169,159,126,250,169, 85,239, 70,141,174, 14,110,214,236,
-252,161,131, 7,253,253,252,253,243,215,219,161, 40,156, 60,121, 82,157,149,149,153, 86,189,122,117,107, 83, 47,158,146,146, 82,
-212,251, 86,171,213,224, 56, 14, 22, 22, 22,149, 18, 88,234, 92,234,202,173, 27, 97, 25,156,241,139,152,110,175,215,232,151, 38,
-246, 14,202,100,141,188, 44,163, 1, 89,106, 14, 57, 26,240, 30, 80,182, 65, 35,188,250,232,163, 59, 6,189,122,240, 54, 52, 77,
-199,233, 42, 53,251, 33, 35, 35,227,187,137, 19, 39,166, 57, 57, 57, 17, 11, 11, 11, 56, 57, 57, 81, 99,198,140, 73,141,141,141,
- 93, 88,213,140,247,241,241,249,188, 89,179,102,167, 67, 67, 67,251, 29, 58,116,200,253,240,225,195,253,154, 53,107,118,218,199,
-199,199, 84,159,142, 67,203,150, 45, 83, 9,133, 66, 52,109,218, 20, 57, 57, 57,208,233,116, 21,110, 21, 10, 86,150,133, 88, 44,
-198,225,237,107, 59, 45,158,255,157, 36, 61,252, 1,158,222,190,140, 11,111,181,121,243,150,254,124, 95, 44, 22, 87,233,126,189,
- 28,101, 13, 27, 42, 44, 94,126, 57,106,160,114,246, 55,223, 88, 61,123,246, 76, 58,227,203,233,156, 50, 37,147, 19,119, 95, 77,
- 83,109,191,167, 94,104,236, 73,175, 30,237,241,227,130, 89,157, 96,194,208,169,143,163,172, 97, 3,133, 69,216, 87,227, 6, 69,
- 77,157, 58, 85,186,108,217,178,188,150, 45, 91,102,102,101,101, 73,172,156, 92,252, 69,142, 78, 65,202,140, 76, 89,243, 22, 45,
- 30,143, 26, 53, 74, 85, 89,206,239,191,255, 94,118,235,214, 45, 81,151, 46, 93,114,178,179,179,101, 98,185, 60, 72, 96,105,221,
- 58, 37, 43,203,178,107,215,174,161, 3, 6, 12, 48, 84,133,243,213,171, 87,162,230,205,155,231,100,101,101,201, 44,157, 92,154,
-136, 29,157, 91,197,167,103, 88, 52,109,214, 44,116,236,216,177,186,242, 56,251,175,255, 67,156, 72,165,210,116,111,111,111,204,
-157, 59, 23, 11, 22, 44, 64,255,254,253, 17,253, 54, 26,109, 70,142, 67,173, 17, 19,112,250,222, 3,196,199,199, 99,206,156, 57,
-240,242,242, 2, 69, 81, 9, 31,179,242, 40, 79, 16,149,229, 8,239, 83,139, 92, 47,207,207,170, 34,145,213,169, 83,167,145,189,
-122,245,194,201,147, 39, 49,107,214,172,168,249,243,231,123, 12, 25,146, 63,161,207,207,207, 15, 51,103,206,244, 88,185,114,101,
-212,234,213,171,209,172, 89, 51,184,185,185,125, 90, 9,171, 48,118,236,216, 1,134, 97, 32,151,203, 97,107,107,139, 30, 61,122,
-224,249,243,231, 19,118,238,220, 25, 78,243,249,131,187,127,218, 23,103, 79, 29,195,171, 23,207, 39,236,250,105,232, 51,115, 19,
- 98,134, 25,102,148,133,210,227, 96, 89, 74, 6,110,221,184,193,106,242,244,153, 42,111,111,111, 27,103,103,103, 16, 66,208,165,
- 75, 23,210,236,194, 5, 11,190, 66, 1,187,134, 13,139, 22, 52,188,117,243, 38,174, 94,189,170,218,187,227, 87,215, 81, 99,198,
-244, 4,202,246,153, 45, 62,172,150,150,150, 6,103,103,231,162,217,106, 74,165, 18,206,206,206, 16, 8, 4,160,105,154, 87,176,
-244, 75,185,106,203,217,217,121,207,210,197, 47,102,199,249,206,172, 21, 36,165,200,121, 85, 34,140, 28, 7, 62, 49, 2,106, 14,
- 6, 35,160, 53,112, 8,172, 73,219,254,174,131,205,131, 23,151,162,157,157,157,247, 84, 38,147,162,162,162,174,185,184,184,140,
-207,203,203, 59, 2,128,186,127,255, 62,251,246,237,219, 73,166, 58,164,151, 6,137, 68, 50,235,200,145, 35,182, 11, 23, 46,204,
-184,122,245,106, 86,251,246,237,173,150, 46, 93,106,251,249,231,159,207, 66, 41,193, 32, 75,105,136,212, 10,133, 98,119, 66, 66,
-194,164,198,141, 27, 35, 61, 61, 29,122,189, 30, 33, 33, 33,240,242,242, 66,112,112, 48,234,212,169,131, 71,143, 30,161,110,221,
-186, 48, 26,141,208,104, 52, 48,154,160, 94,149,177,239,229, 82,109,134,165,242,193,121, 68, 60, 11,193,185, 40,109,222,138, 29,
- 7,207, 53,244, 11, 84, 21,206, 48,172, 12,234, 58,201,234,187, 58,218, 93, 90,186,224, 7,199,119,215, 14,226,216,142,245,236,
-181,115,231, 26, 72, 44, 49,188,197,192,105,159,235, 13,112, 7,129,168,117,139,230,232,105, 27, 97, 20, 84, 67,210,239, 47,202,
-143,100, 94,215, 73, 86, 95,225, 96,119,113,197,146,133, 22,111, 46,236,194,161, 45,171,185, 35,123,246,251,107,128,250,158,158,
-158, 61,105,154,118, 2,160, 54, 26,141,111, 96,226, 18, 52,165,113,254,126,230, 76,128, 6,168,239,230,230,214,147,207,231, 87,
- 3,160, 53, 24, 12,239, 63, 6,103,237,218,181,123, 18, 66, 92, 1,104, 10,124,174, 42,181, 84, 78,199,142, 29, 87,108,223,190,
-125,134, 86,171,181, 45,102,109, 37, 39, 79,158,132, 94,175, 39, 2,129,128,149,201,100,136,137,137,225, 0, 36,112, 28, 55,225,
- 99, 85, 28,125,251,246,197,253,251,247, 23, 0,152, 87,222,121,233,233,233, 60, 91, 91, 91,166, 34,225,101, 42,231,131, 7, 15,
-150,141, 29, 59,246,235, 11, 23, 46,196,205,159, 63,223,111,196,136, 17, 56,113,226, 4,170, 87,175,142, 87,175, 94, 97,198,140,
- 25, 32,132,120,172, 92,185,242,241,129, 3, 7, 92, 18, 19, 19, 87,153,114, 63, 70,163, 17, 12,195, 96,208,160, 65, 48, 24, 12,
- 72, 73, 73, 65, 68, 68, 4,110,221,186,133, 9, 19, 38,136, 1,192, 69,225, 22, 40, 20, 10,241, 36,244, 81,222,247,163,131,126,
- 51, 55, 31,102,152, 97, 70,165, 45, 88,132, 37,124,175,218,181,141,186,188,220,157, 99, 70,142,204,123,241,226, 69, 81, 5,164,
-121,248, 16,170, 11, 23, 96, 52, 26,193,113, 28, 30,220,191,143,169, 83,166,228,106,242,114,183,215,172,233,206, 17,142,147, 21,
-241, 16,210,177, 36,183,174,152, 25, 69,173, 86, 67,173, 86,131,199,227,193,194,194, 2,201,201,201, 16, 10,133,144, 72, 36,104,
-212,168, 17,229,230,230,214,227, 79,105, 43,193, 25, 18, 18, 98, 64,182,182,223,201, 17,211, 18,220,242, 24,110,188,117, 77,212,
- 16, 72,138,102, 33, 58, 91, 18,124,218,136, 15, 39, 65, 42,247,116,215, 32, 37, 97,178,250,133,132,132, 24,202,227, 44, 9,133,
- 66, 81,199,199,199,103, 99,223,190,125, 41, 0,104,213,170, 21, 85,191,126,253, 95, 20, 10, 69,153, 75,218, 84,196, 41, 22,139,
- 69, 0,112,229,202,149,244, 91,183,110,117,185,114,229, 74,122,241,253,166,112, 82, 20,181,117,211,166, 77,144, 74,165, 96, 24,
- 6, 58,157,174,200,255,170,248,167, 94,175,135,189,189, 61,126,255,253,119,176, 44,123,182,162,116,122, 55,240,205,205,226, 89,
- 39,237, 62,125, 21,231,223,233,115, 43, 43,174,138,115,214,118,145,215,117,182,183,187,188,226,167, 69, 14, 25,175, 67, 16, 23,
- 23,199, 93,188,112,246,158,154,227,226,211,178,184, 31,211,115, 56,159, 92, 13, 39, 13,172,137,216,179,191,204,224,190,106, 6,
- 6, 4, 92,121,156,245, 93,228,117, 93, 29,236, 46,174, 90,241,147, 69,230,235, 16, 36, 36, 38,226,220,217,211,143,213, 28, 23,
-207,113,220, 5,142,227, 38, 50, 12,211,132, 97,152, 38, 28,199, 77, 44, 75,180, 84,150, 83,175,215, 7,233,245,250,160,143,201,
-201,178,108, 16,203,178, 38,115,254, 49,131, 16,152, 59,119,238,195,155, 55,111, 14,120,248,240, 97,135,194,237,249,243,231,237,
-163,163,163,219,199,197,197,181,139,158, 37,162,159, 61,123,198,123,244,232, 17,255,209,163, 71,213,131,131,131, 47,152, 90, 62,
-203,121, 23,138,139,252,249, 74,165,146,148,202, 57,254, 37,217,176,242,139,189,135, 15, 31,118,250,104,156, 0,194,195,195, 55,
-108,223,190,189,134,171,171,171,203,231,159,127,142, 93,187,118, 97,251,246,237, 0,242, 35,217, 23,179, 92, 57, 6, 7, 7,215,
- 42, 45,200,104,105,247,110, 48, 24,192, 48, 12,246,239,223, 15,134, 97,224,224,224, 0, 31, 31, 31, 76,154, 52,233,218,152, 49,
- 99, 54, 2, 0, 77,104, 1, 0,104, 53, 90,109,201, 32,163, 85,205, 79, 83,223, 35, 51,167,153,243,223,192,249,239, 16, 88,132,
- 53, 26,141, 44, 28,157, 28, 45, 82,146,147,215, 79,156, 56, 33,109,225,194,133,154, 27, 55,110, 64, 23, 30, 14, 77,104, 40, 46,
- 95,190,140,105,211,166,229,141, 27, 63, 62, 65,147,151,187,214,217,201,209,222,104,100, 65, 8, 91,174,133,132,162,168,168,200,
-200,200,194,222, 54,214,175, 95,207,232,245,122, 88, 88,228, 7,153,222,182,109, 27,203,113, 28, 58,116,232, 32,227,243,249, 38,
- 45, 65, 18, 31, 31,255, 52, 59, 70,217,249,232,192, 9,111, 94, 30, 60,149,225,155,166,199, 16,137, 2, 3, 3, 0, 31,139, 24,
-196, 63,248, 53,227,238,198,222,111,242,210, 99,187,196,199,199, 63,173,108, 38, 57, 57, 57,205,219,183,111,159, 99, 72, 72, 8,
-167,213,106, 17, 31, 31,207,205,154, 53,203,209,201,201,105, 94, 85, 51,158,227, 56,146,153,153, 9, 66, 8, 91, 80, 88,217,194,
-253,166,114,196,197,197, 61, 63,124,248,240,201,107,215,174,193,205,205,173, 72,100,149, 20, 88, 60, 30, 15,132, 16,108,218,180,
- 41,147, 16,242,109, 69,188, 34,145, 8,219,142, 92, 56,255,213,166, 99,135, 14, 93,121,120,172,170,150, 43, 0, 16, 82,212,252,
-101,139,126,112, 76,125,121,159, 60,191,119,149, 61,248, 36, 33,137, 49,114,147, 75, 61, 57, 71,201, 21, 20,202,242,125,123, 40,
-122,254,178,159, 22, 90, 21, 14, 95,238, 11, 81,102, 19, 35, 55,229,175,189, 9,255, 35,156,127, 35,242,103,250, 41,137, 66,161,
-192,209,163, 71, 43,237,131,229, 83,139,252,201,185,189,170,156, 74,165,114,249, 39,159,124,162,156, 63,127,254, 70,141, 70,163,
- 42,232,188,233, 87,173, 90,181,114,242,228,201, 73,241,241,241,171, 76,126, 76, 20,181,167, 83,167, 78,220,205,155, 55,209,187,
-119,111, 24, 12, 6,196,198,198, 98,219,182,109, 96, 24, 38,187, 67,135, 14, 44, 0,168, 53,121,217, 28,203, 65,167,215,106, 97,
-134, 25,102,152, 81, 1, 74, 29, 34,100,105,234,206,230, 45,155,186, 30,220,127,192,153,166, 41,231,232,232,183,143,134,141, 30,
- 29,127,243,230, 77, 91,126,237,218, 77, 40,138, 98,117,179,103,223,203,205,206, 74,223,179,115, 71,141,154, 53,221, 27, 21, 44,
-246,204,177, 52,117,167,188, 11,166,167,167,239,154, 62,125,122,147,221,187,119, 11,150, 47, 95,174,138,143,143,191,116,255,254,
-253,174, 27, 55,110, 20,111,219,182, 45, 47, 39, 39,231,212,185,115,231,122,181,107,215,142,209,233,116,121,166,222, 72, 82, 82,
- 82, 24, 33,196,155, 90,181,125,240,171, 77,251, 62,225,104,210, 2, 90, 1, 8,199,220,161, 24,213,229, 36,165,114, 31,199,113,
- 76, 85, 50, 73, 34,145, 52,146, 72, 36,120,253,250,117, 70,147, 38, 77,116, 66,161, 80,224,238,238,110, 39,145, 72, 26, 85, 53,
-227, 57,142,227, 50, 50, 50,192,113, 28, 15, 0, 97, 89,150, 87,176,191, 82, 49,156, 4, 2,193,231,163, 70,141, 58,185,113,227,
-198, 78, 29, 59,118,132,135,135, 7, 12, 6, 3,234,212,169, 3,157, 78, 7, 47, 47, 47,104,181, 90,172, 93,187, 22,185,185,185,
- 51,226,227,227, 51, 42,226, 20,139,197, 16, 10,133,168,235,221, 32, 79, 44, 22,163,170,226, 10, 0,100,124,202,227,213,153, 29,
- 72, 78, 75,101, 15, 61, 73, 74,202,211, 27, 59, 71, 38,171, 94,148, 60, 47,207, 8, 85,187,145, 83,227, 1, 64,203, 34,183, 92,
- 78, 33, 60, 34,206,110, 67, 82,114, 42, 14,134, 38,100,170,244,108,151, 87,165,112, 86, 42,157,255, 35,156,253,215,135,163,237,
- 23,166,159,123,120,252,199,169, 40,138, 91,149, 76, 69, 88, 52, 71,176,197,155,195,150,245,165,198,184,170, 10,103,177, 78,213,
- 22, 0, 91, 0,192,205,205,237,205,212,169, 83,191,142,143,143, 95, 83, 16,239,170, 82, 29,159,131, 7, 15,174, 29, 53,106,212,
-133,158, 61,123,126,195,178,172,111,177, 30,122,180,163,163, 99, 81, 14,166, 36, 37,206, 30, 63,122,208,236,220,220,140, 69, 48,
-195, 12, 51,204,168,138,192,138,138,138, 13,243,240,168, 54,231,216,209, 35, 45, 56,142,162, 57, 66, 84, 0,117,250,197,139, 23,
-153,197,207,243,180,181,181, 24, 53,118,212, 64,194, 18, 62, 33,172,145,165,169, 59, 81, 81,177, 97, 21, 84,140,207,134, 15, 31,
-190,190, 93,187,118,163,141, 70,227,242,200,200,200, 75,117,235,214,125,220,165, 75,151,175, 24,134, 89,249,230,205,155, 75,245,
-234,213,187,124,240,224,193, 89, 70,163,241,135, 74,138, 22, 6,249,254, 95,187, 63,102, 38, 81, 20,181,144,227, 56, 43,137, 68,
-146, 21, 28, 28,188,191,117,235,214,131, 56,142,179,162, 40, 42,171,170,156, 58,157,110, 74, 78, 78,142,253,231,159,127,110, 32,
-132,212,237,211,167,207,236,200,200, 72,190, 74,165,138,170, 12,207,187,119,239,180,238,238,238,189,190,248,226,139,237, 2,129,
-160, 3,242, 67, 54,112,197,242, 4, 28,199,193,104, 52,158, 82, 42,149,229,230, 11,159,207,207,237,218,181,171,188, 66,171,148,
- 80,152,107,106,250,114,116,198,233,155,174,190, 88,162, 49,112, 28,195,114,227, 95, 37,169, 74,157, 66,246,240, 21, 87,223,100,
- 78, 13, 59,125,221,197,176, 37, 90, 3,203, 50, 44, 55,161, 44,206,202,224,127,133, 19, 0, 38, 82,235,247, 98,203,250, 34,135,
-247,194, 97,195,146,191,255, 83, 40,176, 56,113, 0, 42, 94,236,188,192, 98, 85,209,218,133,149,226, 44,129,130, 89,130, 91,255,
-202, 61,237,216,177, 35, 18, 21, 44,176,125, 96,229,168,227, 0,142,155,155, 13, 51,204, 48,195, 84, 81,242, 31,219, 0,116, 52,
-115,154, 57,205,156,102, 78, 51,167,153,211,204,105,230,252,183,109,148, 89, 98,154, 97,134, 25,102,152, 97,134, 25,102,124, 92,
- 16, 0, 29,203,176,108,153, 28, 43,170, 42,179, 9, 42,226, 55,115,154, 57,205,156,102, 78, 51,167,153,211,204,249,255,143,243,
- 95, 3,243, 16,161,153,211,204,105,230, 52,115,154, 57,205,156,102, 78,243, 16,161,121,136,208, 12, 51,204, 48,195, 12, 51,204,
- 48,227, 31, 13,179,192,170, 2, 8, 33,195, 8, 33, 23, 8, 33,207, 9, 33, 23, 9, 33,195,254, 2,151,132, 16, 50,187, 24,223,
-121, 66,200, 44, 66,136,200,156,211,255,232, 50, 64,155,115,193,140,170,162, 32,120,113, 72,121,193,138,205, 48,195,140,255,109,
-240,202, 58,224,233,233,121,151,162,168, 90,133,139,196, 22, 70, 70, 47,252, 94,242, 55, 0,112, 28, 23, 29, 22, 22,214,188, 44,
-206, 90,181,106, 21,113, 22,110,132, 16, 24, 12, 6, 11,154,166,115, 74,227, 52, 26,141,113,175, 94,189, 10,252, 7, 53,172,123,
-109,109,109,217,205,155, 55,111,240,245,245,173,157,147,147,147, 55,118,236,216,110,132,144,142, 28,199, 13,173, 36, 87, 3, 66,
-200,158,198,141, 27, 31,155, 60,121,242, 97, 31, 31, 31, 75,181, 90, 45,220,191,127,191,243,230,205,155,111, 17, 66, 70,113, 28,
- 23,102, 46,166,255, 28,184,184,184,248, 19, 66,214,123,121,121, 5, 42, 20,138, 71, 0, 38, 41,149,202, 39,230,156,249,175,190,
-131, 99,132, 66, 97, 23, 47, 47,175, 38, 90,173, 54, 35, 58, 58,250,161,209,104,252,129,227,184,196,143,196,111, 5,224, 7,145,
- 72, 20,228,233,233, 89, 45, 50, 50, 50, 86,175,215, 63, 0,176,144,227,184,172,143, 33,174,130,130,130,110,255,244,211, 79,118,
-223,126,251,237,109,133, 66,209, 82,169, 84, 70,152,159,172, 25,127, 7,170, 87,175,110,173, 82,169,182,243,120, 60,127,145, 72,
-228, 44,151,203, 33,151,203, 19, 69, 34,209, 99,169, 84, 58,250,236,217,179,153,230, 92,250,200, 2,139,166,105,183,135, 15, 31,
- 58, 22, 46,190,204,178, 44, 88,150, 5,199,113, 69,159,133, 40,136,179,132,118,237,218,233,203,189, 24,143, 87, 45, 36, 36,196,
- 81, 46,255, 35,212,146, 94,175,135,175,175, 47, 27, 26, 26,234, 88,114, 33, 97,157, 78,135,128,128, 0,238,159,146, 89,132,144,
- 33,118,118,118,170,247,239, 99, 90,107,180,250,160,177, 83,190,157, 51,164,223, 39, 54,119,238,220, 65,207,158, 61,105, 66,200,
- 48,142,227,246,152,200, 37, 33,132,252, 58,103,206,156,101,124,161,212,241,232,217,219,244,218,173,123,223,251,213,169, 73,166,
- 78,157, 36,159, 60,121,242, 35, 31, 31,159, 29,132,144, 86, 28,199,153, 35, 71,255, 51,158, 63,175, 90,181,106, 39,151, 44, 89,
-226,154,152,144,128,213,107,214, 52, 5,176, 17, 64, 83,115,238,252,215,158,193,236, 5, 11, 22, 44, 25, 60,120, 48,140, 70, 35,
-212,106,181,226,245,235,215,245,231,206,157,219,135, 16,210,132,227,184,168,191,200,239,224,229,229, 21, 62,125,250,116,219, 38,
- 77,154,128,162, 40,100,101,101, 41,110,221,186,213,244,215, 95,127, 29, 70, 8,169,199,113, 92,202, 95,185,134,141,141,205,111,
- 43, 87,174,180, 19,137, 68,216,185,115,167,221,128, 1, 3,110, 41, 20,138, 86, 85, 21, 89,132, 16,202,206,206,110, 42,128,246,
- 44,203, 10, 1, 60,200,200,200, 88,204,113,156,222, 92, 98,204, 40, 15,246,246,246, 99,114,114,114, 54, 72,165, 82,129,165,165,
- 37,164, 82, 41,248,124, 62,132, 66, 97,117, 27, 27,155,234,114,185,188,219,160, 65,131, 38,237,223,191,127,187, 57,183, 62,162,
-192,162, 40, 10, 18,137, 4,135, 14, 29, 2, 77,211,224,243,249,224,243,249, 16, 8, 4,165,126,175, 94,189,186, 41, 21, 1, 0,
-224,244,233,211,176,180,180,132,149,149, 21,234,213,171, 7, 66, 8, 68, 34, 17,126,255,253,119,240,249,124,240,120, 60,240,249,
-124, 4, 6, 6,126, 96, 41,251,111,160,127,125,194, 1,165, 7,111,236, 94, 95,142,158, 83,126,234,155,167,209,119, 0,160,202,
-204,200,200,120,116,236,152,210,175, 78, 29,193,161, 67,135, 26,217,218,218, 14, 2, 96,234, 66,210,211,154, 54,109,122,138, 19,
-200,156,134,143, 24, 57,124, 52,143,210, 15, 27,255,213,143,177, 9,169,170,113,227,198, 29, 59,117,234,212,240,117,235,214, 69,
- 78,154, 52,105, 42,128,229,166,166,223,221,221,253, 46, 77,211,133,150, 71,229,235,215,175,253,255, 33, 13,163, 2,192, 10, 0,
- 6, 0,203, 56,142, 11, 47,118,172,142, 64, 32, 88,174,215,235,211, 1,204,227, 56, 46,246,159,248,178,184,186,186,214, 27, 58,
-116,168,125,122,106, 42, 86,175, 89, 83,184, 59,208,148, 69,201, 63, 54, 2, 2, 2,106,137,197,226, 21, 0,252,181, 90,173, 43,
- 0, 72, 36,146,120,142,227,142,171,213,234,239, 66, 66, 66,212, 85,124, 78,213, 0,212, 71,254, 12,227,210,192, 45, 89,178, 36,
-114,246,236,217, 81,255,109, 78, 66,136,187,147,147,211, 79,253,251,247,199,217,179,103,113,238,220, 57,131, 68, 34,225,141, 24,
- 49,130, 76,154, 52,201,102,250,244,233,221, 0,252,252, 23,179,182,219,130, 5, 11,108,189,189,189,113,228,200, 17, 60,125,250,
- 84,237,229,229, 37,105,219,182, 45,120, 60,158,237,156, 57,115,186, 2,216,245, 87, 46,144,145,145,177,120,209,162, 69,187,215,
-175, 95,111, 17, 29, 29,141,133, 11, 23,218, 79,158, 60,249,134, 66,161,104, 99,170,200, 42,112, 33,152, 10,160, 29, 77,211,173,
- 70,140, 24,193, 76,153, 50,133, 79, 81,148, 97,205,154, 53, 14,191,254,250,235, 64,123,123,123,255,212,212,212, 92,152,129,114,
- 12, 9,122,150,101,249, 0,196, 28,199,105, 43,250,253,255,233,222,237,236,236, 38,102,100,100,108, 84, 40, 20,112,112,112, 40,
-106,107, 89,150,133, 74,165,130, 90,173, 70,173, 90,181, 4,222,222,222,219, 38, 79,158,204, 95,191,126,253, 38,115,137,249, 72,
- 2,139, 16, 2,150,101,193,231,243, 63, 16, 88,133,226,167,228,247, 82,107,205, 18, 83, 53, 41,138, 34,185,185,185, 69,226,202,
-210,210,178,200, 18,102, 48, 24,254,196,107, 52, 26, 65, 81, 20, 87, 30,103, 25,105,159, 8,224,119,142,227,222,152,146, 9,197,
- 57, 15, 79,174,135,221,162, 89,131, 10, 67,158,119,251, 42,255,115, 55,128, 43,175,199, 47, 95,222,162, 69,181,169,223,175,155,
-175, 78, 83,166,206, 25,218,211,221,203,217, 78, 34,203, 76,206,178,169, 91,183, 39,128,164, 74,164,179,229,184,113,227,142, 28,
-187,242, 66, 44, 22, 11, 4, 60,154,230,183,108, 88,199,174,154, 21,109,101, 1, 88,197, 70, 69,222, 29, 54,108,216,216, 73,147,
- 38,217, 22, 10, 44, 83,238,157,207,231,187, 61,120,240,192,145,199,227,161, 69,139, 22,198,202,220,251,199, 66, 25,156,115,147,
-146,146, 62,215,104, 52, 8, 12, 12,252,148, 16,210,142,227,184,199,132,144,134,189,122,245,186,117,248,240, 97,139,208,208, 80,
- 52,109,218, 84, 2, 96,192,223,152,206, 63, 65,161, 80, 92, 2,240, 9, 77,211,208,105, 52,186, 21,171, 62, 88,230, 46,184,184,
-184,250,111,164,211,207,207,175,158, 84, 42,189,187,106,213, 42, 75, 31, 31, 31,194,231,243,193, 48, 12, 34, 35, 35,171,237,221,
-187,119,252,163, 71,143,186, 6, 4, 4,248,148, 92,212,220,196,123,175,127,235,214, 45,149,135,135, 71,169,101, 39, 59, 59,155,
- 87,167, 78,157, 54, 0,162,254, 6,206,184,164,164,164,222,159,124,242,201,132,196,196,196,112,134, 97,190, 1,208,192,222,222,
- 62,244,179,207, 62,131, 68, 34,105,103,138,192, 42,239, 25, 57, 58, 58,246,106,222,188, 57,214,175, 95,143,101,203,150,117,228,
- 56,238,119, 66, 72,135,236,236,236, 43,159,126,250, 41,172,173,173,123,151, 38,176, 42, 81,150,234, 52,105,210,100,219,140, 25,
- 51, 44,206,158, 61, 11, 47, 47, 47,100,101,101, 97,228,200,145,142,235,214,173,187,174, 80, 40,218, 22,138,172,178, 56, 9, 33,
- 62, 34,145,104,215,254,253,251,229, 30, 30, 30, 30, 2,129,128,242,240,240, 64,122,122, 58, 52, 26,141,232,199, 31,127,108, 40,
-145, 72,158,252,252,243,207,187, 0,124,246,119,190, 71,132,144, 44, 0,150, 0,172, 43, 51,188, 90,206,189,103, 1, 16, 21,171,
-239, 32, 22,139, 33, 22,139, 33, 18,137, 16, 29, 29,125,148,166,233,145, 5, 29,185, 10, 57,201, 31, 61,248, 70,132,144,135, 52,
- 77,151,251,187,228, 82,102,127, 71,189, 68, 8,113, 35,132,172, 5,208, 14,249,126,212, 55, 28, 29, 29,167, 37, 38, 38,190, 55,
-149, 83,161, 80,216,229,230,230,254,172, 80, 40,224,232,232, 88, 40, 54, 17, 24, 24, 8,141, 70,131, 23, 47, 94,128,101, 89,188,
-121,243, 6,150,150,150,104,216,176,225,207, 11, 22, 44, 56, 50,111,222,188,180,255,228,189,255,107, 4, 86,161,146,229,241,120,
- 31, 8,172,146, 91,161, 24, 34,132, 84,184, 80, 49, 33,132,210,233,116, 69,226,202,202,202,170,232,191, 12,195,148, 42,176,170,
-168,204,125, 89,150,173, 69, 8,217, 98,170,200, 42,137,225,195,135,255,201,159, 99,246,236,217,113,169,169,169,108,223,206,141,
-100,225,231,149, 9,158, 54,114,137,131,133, 69, 77,177,141,173,117,110,110,238, 77, 0,242, 74, 92,194,213,219,219,219,106,195,
-238,243,202,177, 95, 46, 89, 20,232, 97,103,233,235,102,111,227,108, 37, 17,202, 41,162, 18, 51,134, 56,153, 76,230, 3, 32,173,
- 50,233,166, 40, 10,150,150,150, 56,117,234, 20, 10,253,231,254, 33,176, 81,171,213,200,200,200,192,230,205,155, 45, 39, 76,152,
-112,141, 16, 50,173,119,239,222,235, 15, 31, 62, 44,203,204,204,132, 94,175, 7, 0,245, 63,240, 61, 89,100, 99, 99,211,186, 93,
-187,118,194, 3,135, 14, 9, 57,142, 83, 33,127, 57,162, 92,142, 43, 99,225,234,255, 32,196, 98,241, 87,139, 23, 47,182,244,241,
-241, 33,105,105,105, 96, 89, 22, 20, 69,193,222,222, 30, 95,127,253,181,120,238,220,185,174,175, 94,189,154,131, 42, 44, 59, 3,
-128,148, 37,132, 0,192,210,210,146, 65,229, 39,199,148,202,201, 48, 12,105,209,162,197,215,169,169,169, 13,213,106,245,143, 38,
- 52, 60, 12,128, 83, 5, 91, 97,157,242, 36, 60, 60, 92, 61, 96,192, 0, 73,205,154, 53,131,254,106,222,214,169, 83,167, 25,159,
-207,199,131, 7, 15,180, 0,110, 20,236,190,241,244,233, 83,237,103,159,125, 38,170, 86,173, 90, 51, 83,185, 20, 10, 69, 29, 79,
- 79,207,203,246,246,246,146,194,105,219,221,187,119,231,175, 88,177,194, 34, 46, 46, 14,122,189, 30,179,103,207, 70,143, 30, 61,
- 96, 99, 99,131, 81,163, 70, 57,109,221,186,245, 55, 0, 1,229,212,161, 98,161, 80,184,231,245,235,215, 94, 46, 46, 46,146,251,
-247,239,195,215,215, 23,169,169,169, 72, 76, 76, 68,110,110, 46, 18, 19, 19, 49,122,244,104,199,213,171, 87, 43,254, 65,239, 80,
-166, 64, 32,128, 84, 42,181,206,204,204,204,250, 11, 60, 34, 0,194,226,226, 74, 36, 18, 65, 36, 18,161,164,139,201,255, 71, 16,
- 66, 92, 9, 33, 97, 2,129, 64, 36,149, 74, 5, 20, 69, 65, 38,147,117,174, 86,173,218,139, 97,195,134, 53,216,179,103,207, 59,
- 83,120, 52, 26,205, 30,137, 68,194,119,112,112, 0, 0,116,234,212, 9, 35, 70,140, 64, 74, 74, 10,171, 84, 42, 81,175, 94, 61,
-234,250,245,235, 72, 74, 74,194,147, 39, 79,208,164, 73, 19,190,173,173,237, 30, 0, 93,205,178,233, 35, 90,176,120, 60, 94,209,
- 86,154,229,170,112, 43,233,248, 94, 22,167,209,104,132,147,147, 19,164, 82, 41,164, 82,105,113,103,246, 63,241,115, 28, 87,165,
- 33, 66,153, 76,134,193,131, 7,115,155, 54,109,154, 80, 32,178, 94,155,250,223,254,235,195,139,172, 86, 37,225,235,235,123,231,
-187,239,190,235,114,241,226,197,140, 64,143,154, 60,153,242,125,174,216,210,218, 26,110,213,187, 15,235, 63,240, 46,128,253,149,
- 72,166, 82,171,213, 10, 60,221,164, 58,138,210,144,234, 34,158,133,139, 76, 32,114,182,177,113, 21,232,180,201,150, 54, 54,194,
-130, 33, 51,101, 69, 68,133,147, 7, 8, 33,176,182,182,230, 23,124,194,209,209, 81,212,160, 65,131, 36,138,162,192,113,156,242,
-217,179,103, 38, 15, 23,122,120,120, 4, 83, 20,229, 70, 8,249, 96, 66, 66,241,141,101,217,184, 23, 47, 94,152, 58, 1,225,187,
- 70,141, 26,181,217,184,113,163,131,151,151, 23, 54,111,222,108,121,228,200,145, 93,191,253,246, 27, 50, 51, 51,241,238,221, 59,
-140, 30, 61, 58, 27,249,195,136,255, 40,216,218,218,222,238,223,191, 63,182,109,219,198, 21,116, 34,100,132, 16, 95, 43, 43,171,
- 87, 97, 97, 97,255,117, 63, 23,138,162, 58,215,171, 87,143,100,101,101,129,101, 89,208, 52, 93,212, 17,162,105, 26, 95,125,245,
-149,100,244,232,209,115,155, 53,107,246, 53,159,207,207,102, 24,230, 64,110,110,238,143,207,159, 63,255, 71, 57,171,182,106,213,
-234,203,216,216,216, 30, 53,106,212, 56,253, 23,122,251, 92,227,198,141,117, 0, 36, 52, 77,243, 63, 66, 3, 70, 23,212, 71,154,
-194,197,225, 57,142, 99, 2, 2, 2, 52, 5,141, 59, 93,137,114,243,219,222,189,123,221,220,220,220, 96, 48, 24,192, 48, 12,114,
-115,115,113,253,250,117,104,181, 90, 48, 12,131,122,245,234, 97,217,178,101,154, 73,147, 38,137, 15, 30, 60,152,172, 86,171,135,
- 84, 64, 59,237,200,145, 35, 50, 23, 23, 23,137, 90,173, 70, 84, 84, 20, 2, 2, 2,144,147,147, 3,149, 74,133,188,188, 60,232,
-245,122,100,103,103, 91, 27,141, 70,221, 63,166,161,225,241, 32, 18,137, 32, 16, 8, 50,107,212,168, 1, 66,136,248,221,187,119,
- 85, 25,114,179, 4,144,205,231,243,133,197,133,149, 72, 36,194,179,103,207, 14,150,101,189, 42,175,252, 84,230,247, 63, 64, 96,
-173, 21, 8, 4, 34, 91, 91, 91, 65,225, 62,189, 94, 47,176,177,177, 65,205,154, 53,215, 3,232,102, 98, 29,226,103, 99, 99, 3,
- 66, 8, 4, 2, 1,198,142, 29,139,135, 15, 31, 30,143,139,139, 27,150,156,156,140,188,188,188, 61, 86, 86, 86,125,146,147,147,
- 97, 52, 26,241,246,237, 91,248,249,249,249,153, 37,211, 71,182, 96,149, 37,168, 74, 10, 46, 83,172, 37,122,189, 94,222,189,123,
-119,182,120, 35, 93,240, 63, 82,142,192,170, 82, 1,231,243,249, 22, 19, 39, 78,204,217,180,105,211,120, 66,200, 86,142,227, 34,
-171,154, 73,167,143,238,119, 90,246,195,236, 31,108, 21, 53, 61,191,249,230, 27,222,103,159,125,118,117,231,206,157,141,109,189,
-189, 63,185,118,105,175,211,250,111,230,156, 56,121,242,100,158,169, 14,238, 5,184,115,252,248,113,151, 25, 83, 39, 9,126,248,
-106,218, 5, 75, 47,123,161,156,216,202,196, 90, 85,138, 28,156, 90, 84,187, 94,143, 51, 23, 47,198, 2,184,109, 66,229,229,246,
-224,193, 3, 71,107,107,107, 0,249,147, 3,172,173,173,177,105,211, 38,155, 66, 75,161, 41,195,133, 37, 94, 64,183,208,208, 80,
- 71,185, 92, 14,149, 74, 85,212, 32,112, 28, 87, 84, 89,182,110,221,186, 50, 13, 97, 20, 33,164,245, 23, 95,124,113,115,227,198,
-141, 14,158,158,158, 88,180,104, 17,210,210,210, 16, 19, 19,131, 33, 67,134,100, 71, 69, 69,181, 43,238,155,245, 79, 64,195,134,
- 13,185, 59,119,238,224,194,133, 11,248,244,211, 79,201,201,147, 39,245, 70,163, 81, 16, 31, 31,255,236,239, 74, 19,195, 48, 22,
- 2,129,160,104, 88,189, 80, 88, 21,110,110,110,110,184,114,229, 10, 47, 47, 47,143,151,154,154, 42,253,245,215, 95,167, 4, 7,
- 7,187, 0, 24,244,119,230,229,166, 77,155,106,140, 29, 59, 54,134,199,227,113, 93,186,116, 25,250,254,253,251,222, 46, 46, 46,
-191, 95,187,118,109, 21,128, 74,135, 43,104,208,160, 65, 48,143,199,115,227, 56, 78,112,226,196, 9,131,209,104, 20, 52,108,216,
- 48,169, 68, 48, 68, 48, 12, 19, 23, 17, 17, 17,104, 10,159, 88, 44, 22,108,221,186,213,160,209,104, 4,190,190,190, 73,197,120,
- 4, 39, 79,158, 52, 24, 12, 6, 65,221,186,117,131, 77,153,217,156,158,158, 62,100,250,244,233,183, 14, 29, 58,100, 79,211, 52,
-222,191,127,143,180,180, 52, 88, 91, 91, 99,207,158, 61,168, 89,179, 38, 46, 95,190,156,206, 48,204,152,109,219,182,205, 85,171,
-213, 67, 76,240,193,106, 29, 20, 20, 84, 35, 51, 51, 19,214,214,214, 80,169, 84, 8, 14, 14,134,143,143, 15,148, 74, 37, 40,138,
-130,181,181, 53, 54,110,220,152, 71, 8, 73,255, 39,188, 67, 52, 77, 23, 89,153,138,137, 34, 77,179,102,205,112,251,246,237,125,
-149, 17, 69, 28,199,233,248,124,254, 7,194,170,240, 59, 77,211,149, 30,242, 48, 26,141, 2, 66,136, 31, 10,252, 3, 43,250,253,
- 15, 64, 27,169, 84, 42, 40,165,172, 9,234,212,169,211,202, 84, 18,161, 80,104, 39,145, 72,242, 9,219,180, 65,114,114,178,209,
-195,195, 99,224,128, 1, 3, 12, 0, 48,126,252,248,129,201,201,201, 26,134, 97,104,154,166,145,146,146,130,154, 53,107,218,153,
- 37,211,127,192,130, 85,158,229,170,184, 5,171,162, 66, 72, 81, 84,102, 72, 72,136, 76, 38,147, 21,237, 51, 24, 12,240,243,243,
- 99, 89,150, 37, 37,175, 83,152,142,170,130,207,231, 91,124,251,237,183,153, 27, 55,110, 28, 6,224, 59, 83,254,115,120,114, 61,
-236, 46, 33,174, 54, 47, 91,184,254,151,101,139,109,223, 92,216,137,237,235, 86, 26,249, 66,121,176,159,159, 95,235,172,172, 44,
-173,181, 76,139,196, 52, 28,231, 56,238,183, 74,244, 66, 40, 0, 7,239,221,187,247,184, 83,167, 78,247,119, 28, 60,102,171,140,
-138,186, 39,202, 78, 77,176,172,237,197, 19,184,214,232,163,210,233,248,125,250,244,145, 3, 88,103, 2, 31, 98, 98, 98,112,247,
-238, 93, 88, 90, 90,194,210,210, 18,214,214,214, 69,223,171,146,135,133,195,182,103,206,156,129, 76, 38, 67,193,212, 93,200,100,
- 50, 8,133, 66, 20,127,134,149, 16, 89, 17,132,144,105,199,142, 29, 59,176,100,201, 18,164,167,167, 67,165, 82, 97,222,188,121,
-136,138,138,154,206,113,220,227,127,210,203,225,235,235,203,221,187,119, 15,119,238,220,129, 74,165,194, 47,191,252, 2, 23, 23,
-151,246, 0,190,255, 59,211,197,178,172,160,208,162, 88, 92, 88, 21,183, 98,209, 52, 13,177, 88, 12,123,123,123,204,153, 51, 71,
-240,233,167,159,246,248, 59,211,188,124,249,242,218,107,215,174,253,117,247,238,221,231,135, 12, 25,114,232,249,243,231, 35,173,
-172,172,158, 93,189,122,117,177, 72, 36, 98,171,104, 21,113,123,252,248,177, 99,241, 87,158,101, 89, 41,195, 48, 96, 24, 6, 6,
-131, 1,121,121,121,232,216,177,163,201,124, 15, 31, 62,148, 2,192,247,223,127,207, 7, 32,101, 89, 22, 70,163, 17,133,156,121,
-121,121,252, 14, 29, 58,184,153,100,162, 86, 42, 35, 20, 10, 69,171, 1, 3, 6,220, 61,112,224,128, 77,141, 26, 53, 16, 31, 31,
-143,248,248,120,212,174, 93, 27,235,214,173, 83,113, 28,215,162, 64, 84,157, 52,241,182, 21, 54, 54, 54,252,152,152, 24, 48, 12,
- 3, 63, 63, 63,108,220,184, 17, 3, 7, 14, 68,131, 6, 13,144,157,157,141,176,176, 48,236,218,181,203, 70, 32, 16,244,253,187,
-223, 33,138,162,254, 36,174,138,111, 85,236, 96, 88,138,197,226,108,145, 72, 36, 44,244,191,122,248,240, 97,165,173, 87,197,234,
-165,199,149,249,253,119,194,194,194, 2,114,185, 28, 6,195,135,183, 41,147,201, 80,187,118,109,147,121,228,114, 57, 41, 52, 98,
- 24, 12, 6, 36, 36, 36, 24,159, 63,127,110,244,247,207, 31,228,112,113,113, 49, 62,120,240,192,168,209,104,104, 11, 11, 11, 20,
-140,138, 16,152,241,241, 44, 88,133,214,138,242, 44, 87,133,223, 11, 45, 81, 21,189,108, 52, 77,227,194,133, 11, 69, 5,165, 94,
-189,122, 69,215,250,216, 2,203,206,206, 78, 21, 20, 20,100, 25, 27, 27,187,191, 42,255, 47, 20, 87, 75, 22,205,179, 77,127,121,
- 31,113,202, 4,164, 39, 27, 66,110, 63,123,123, 9,192, 37, 0,192, 22,239,235, 24,255,210,100,113,229,237, 32,109,212, 80, 97,
-113,252,147,110, 61,170, 13, 24,247, 37, 53,105,210,164,166, 35, 71,142, 76, 27, 50,100,200, 36,137, 68,226,205, 48, 76,218,153,
-139, 23,223,244,233,211,199,153, 97,152, 17, 28,199,153,226,147, 20, 55,120,240, 96, 1, 33, 4,142,142,142,252,221,187,119,219,
- 88, 90, 90, 98,228,200,145, 25,111,223,190, 53, 20,244,196,146, 42,121,251,113, 45, 90,180,248,211,176, 96, 97,195, 94,104, 25,
-168,164,104,243,235,209,163,199,182, 67,135, 14, 33, 53, 53, 21, 42,149, 10,124, 62, 31, 43, 86,172, 64, 76, 76,204,207,132,144,
-231,255,148,202,172, 81,163, 70,220,131, 7, 15,240,236,217, 51,104,181, 90,140, 25, 51,166,184,143, 97,167,191,123,164, 32, 62,
- 62, 30,123,247,238, 5,203,178, 24, 50,100, 8,106,212,168, 81, 36,172, 18, 19, 19,177, 99,199, 14, 24,141, 70,140, 29, 59, 22,
-213,171, 87,135,193, 96, 16,183,109,219,150,119,253,250,117,230,239, 72,240,140, 25, 51,222, 28, 63,126,252,124,108,108,108,215,
-101,203,150,181, 33,132,176, 95,127,253,245, 82, 75, 75,203,191, 52,251, 50, 35, 43, 7,175, 94,191, 47, 18, 64, 37, 55, 7,123,
-219, 74,243, 69, 70,197, 22,253,223,104, 44,206,103,132,157,173, 77,165,248, 18, 18, 18,242,210,210,210, 84, 99,198,140,177,222,
-182,109, 27,169, 93,187, 54,162,163,163,193,231,243, 97, 97, 97,145, 23, 30, 30, 94,217,208, 12,241,233,233,233, 94, 52, 77, 11,
- 94,191,126, 13,119,119,119, 4, 5, 5,225,199, 31,127, 68,106,106, 42, 24,134,129,163,163, 35,107, 48, 24, 66,117, 58,221,205,
-191,251, 61, 42,110,101, 42,190,221,185,115,103, 31, 77,211, 20,128,211, 0, 42, 37,176, 57,142,211, 85,175, 94,253, 3,238,170,
- 88,175,254,131, 22,187,255,216,204,196, 58,117,234,220,144,201,100, 61, 94,189,122,245,129, 21,107,240,224,193,122, 79, 79,207,
- 91,166,242, 88, 90, 90,102, 8, 4, 2, 59,141, 70,131,123,247,238,193,219,219, 91,144,149,149,181,132, 16, 50,187,160,115,185,
- 36, 41, 41, 73,160, 80,228,187,241,213,173, 91, 23, 57, 57, 57, 25,102,201,244,145, 5, 86,105,150,171,210, 68, 22, 77, 87,236,
-154, 64, 8,129, 90,173,134, 76, 38, 43,218, 10,253,172, 74, 19, 88, 5,190, 63, 85, 26, 34, 44, 16, 87,146, 3, 7, 14,236, 91,
-183,110,221, 29, 83,255, 87,220, 7,107,203,170, 69,203, 10,197,213,211, 59,151,113, 50, 60, 43,117,214,146, 53,107,171,154,217,
- 62, 14, 50, 95,103, 39,251,235, 43,126, 90,104,249,230,194, 46, 28,218,178,154,123,250,240, 97,227, 9, 15, 31,246,157, 48, 97,
-130, 45,128, 4, 0,241, 0,238, 1,248,217, 68,113,133,136,136,136,162,224,174,254,254,254,177, 54, 54, 54, 54, 18,137, 4, 74,
-165, 82,251,248,241,227, 42, 57,186, 70, 70, 70,126,212,224,174,132,144, 58, 61,123,246,188,121,244,232, 81, 89,102,102, 38,222,
-191,127,143,175,191,254, 26, 27, 54,108,128,165,165, 37,206,158, 61,107,209,163, 71,143,235,132,144,230,127,119,112, 85, 63, 63,
- 63,238,209,163, 71,120,247,238, 29, 24,134, 65,175, 94,189, 42,156,192,241, 95,182, 96,113,211,167, 79,199,182,109,219, 64,211,
- 52,134, 13, 27,134,236,236,236,162,227,182,182,182,165, 29,163, 11,222,247,191, 69, 96,241,120, 60,238,198,141, 27,203,218,180,
-105,131,216,216,216,174, 1, 1, 1,191,140, 28, 57, 50,254,175,242,218, 88, 89,160,145,143, 7,180, 90, 45,180, 90, 45, 20, 10,
- 5,114,114,114,240,230,205, 27,104,181, 90, 56, 57, 90, 87,154,207,191, 65,237, 34, 62, 71, 71, 71,168, 84, 42,188,125,251, 22,
- 58,157, 14,246,246, 54,149, 41,243,213, 58,119,238,124,109,223,190,125,118,251,246,237,211,125,246,217,103,194,133, 11, 23, 18,
- 75, 75, 75, 36, 39, 39,163,138,238, 61, 55,110,223,190, 93,163, 99,199,142,117, 95,190,124,137, 27, 55,110, 64,167,211,193,223,
-223, 31,145,145,145,104,214,172, 25,114,115,115, 31, 60,122,244,232,212, 63,161,172, 22, 14,223, 21,110,193,193,193, 7, 5, 2,
- 1, 7,160, 74,214,166, 66,196,196,196,136,124,125,125,181, 98,177, 88, 88, 32,214,254, 18,223, 71,174,235,254,210,204,196,242,
-224,225,225, 49,221,205,205,173,163,191,191, 63, 94,190,124, 41, 16,137, 68, 24, 58,116,168,190, 91,183,110,122, 30,143,103,242,
-132, 27,137, 68,242, 82, 46,151,183,214,106,181,208,233,116,184,124,249, 50,236,236,236,102,245,236,217,115, 90, 66, 66, 2,148,
- 74,165, 80, 40, 20, 22,249,223,182,109,219, 22,105,105,105, 47,205,146,233, 35, 9,172,194, 50, 98,202,240,160,169, 62, 88, 20,
- 69, 65,167,211, 65, 38,147, 65, 42,149, 66, 38,147, 21, 93,135, 16, 82,170,192,170, 10,170, 85,171,134,160,160, 32,201,161, 67,
-135,126, 91,185,114,229,221,170,112, 28,217,183,215,197,138,205,171,166,124,112, 14, 17,207, 66,112, 60, 44, 51,117,214,146, 53,
- 83,123,246, 29,148, 84, 82,144, 29, 30,111, 66,207,195, 81,214,192,213,201,238,250,170,229, 75, 44,211, 95,222, 71, 66, 98, 34,
-206, 61,120, 20,162,205,247, 13,251,241, 35,190,220, 40, 28, 91,255, 39, 65, 36, 18, 77, 63,114,228,136, 44, 51, 51, 19, 81, 81,
- 81, 24, 50,100, 72,230,187,119,239,190,232,221,187,247,134, 75,151, 46,217, 88, 91, 91,227,210,165, 75, 22,213,170, 85, 91, 2,
-160,199,223, 88, 57,114, 70,163, 17,233,233,249,238, 43, 45, 90,180,248, 71,137, 43, 0, 8, 14, 14, 22,244,236,217,243,119, 0,
-237, 95,190,124, 9,150,101,239,134,132,132,180, 40, 60, 94,222, 49, 83,244, 91, 78, 78, 14,223,194,194,162,212,198, 74, 32, 16,
- 8, 42,107,113, 40,206,121,231,206,157,165,171, 86,173, 58, 62,115,230,204,215,127,145,179, 84, 11, 86,143, 30, 61,160,214,234,
- 17,151,148, 5,163,145,129, 90,159,252,151, 44, 88, 61,122,244, 64,158, 70,135,152,132,116, 48,140, 17, 57,106,198,212,114, 36,
-253,228,147, 79, 46, 30, 56,112,192,249,222,189,123,208,106,181,108,112,112,240,219,113,227,198, 89,142, 30, 61,218,174,172,208,
- 54, 38, 96,221,160, 65,131,250,221,185,115, 39,189,110,221,186,182, 15, 30, 60, 64,114,114, 50, 24,134, 65,251,246,237, 33, 20,
- 10, 99,150, 44, 89, 34,128, 9,174, 5,255, 45,129, 37, 18,137, 16, 22, 22, 86, 40,172,134,127, 44, 33, 36, 20, 10,171, 60,204,
-248,191,138,223,126,251, 45,126,231,206,157, 62,174,174,174,107,135, 15, 31,222, 78,161, 80, 80, 34,145,232, 6,143,199,155, 6,
-224,189,169, 60, 2,129, 96,164,181,181,245, 27,138,162,232,248,248,120,188,126,253, 26,209,209,209, 0, 32,204,203,203,131,163,
-163, 99,145,209,100,208,160, 65,168, 86,173,154, 49, 50, 50,114,164, 89, 50,125,100, 11,214,194,133, 11,177,101,203, 22,140, 31,
- 95,190,138, 56,125,250, 52, 80, 98,136,176, 96,249,152, 43,197, 27,127,163,209,136,121,243,230,125,240,191,194,225,167, 47,190,
-248,226, 3,206, 19, 39, 78,252,105,136,176, 36,103,105, 72, 78, 78,126,121,248,240,225, 71,203,151, 47,127, 96, 98,101, 88,196,
- 89,232,131,213,111,240,208,132,245, 75,127,120,190,251,244,213, 6, 9,106, 46, 97,214,146, 53, 51, 75,138, 43, 83, 57,189,157,
-229,222,110,142,118, 55, 86, 46, 95, 98, 85,104, 13, 59, 16,154,152, 5,134, 27, 95,153,135,101,202,189, 51, 12, 19,231,231,231,
- 39, 0, 76, 27, 22, 52,133,179, 10, 34,229, 79,156, 90,173, 22,247,239,223, 7, 0,140, 26, 53, 42,243,221,187,119,173, 57,142,
-123, 65, 8,121,217,185,115,231, 27, 23, 47, 94,180, 97, 89, 22, 40, 35, 44,197,127, 43,157, 5,249, 6, 30,143, 7, 47, 47,175,
- 74,139,171,255, 86, 58, 19, 18, 18,198, 79,152, 48, 97,139, 86,171,229,169, 84,170,241,166, 30,171, 40,157,135, 15, 31,126,237,
-229,229,213, 6,101,135, 98, 96, 11, 44,172, 85,230, 92,187,118, 45, 0,212,253, 43,156,101, 89,176, 14, 30, 60, 8,150,101, 81,
-205,217, 26, 90,173, 22, 82,169,180, 82,156, 37, 45, 88,135, 14, 29, 2,203,178,168,238, 98, 11,157, 78, 87,102,231,165, 36,167,
-157,157,221,234,221,187,119,187,133,135,135, 35, 46, 46, 14,107,214,172,121,159,146,146,210,141,199,227,137,126,249,229,151,235,
-221,187,119,119, 98, 24, 70, 91,217,231,206,113,156,150, 16, 50,178,121,243,230,123, 22, 47, 94, 28, 93,175, 94,189,234, 45, 90,
-180,176, 78, 75, 75, 75,121,252,248,241,219, 45, 91,182,200, 25,134, 25, 89,214,208,211,127,243, 61, 2,128,248,248,248, 83, 0,
-248,149, 21, 86,166,164,243,225,195,135,135, 10,184,207,153,194,253,223,186,247,191, 58, 51,177,162,116,142, 28, 57, 50, 14, 37,
-226,155, 85, 54,157,151, 46, 93,122, 55,120,240,224, 69, 13, 26, 52,152, 47,151,203, 17, 17, 17, 81, 20, 22,169,176,140, 19, 66,
-208,191,127,127,124,241,197, 23,184,120,241,226,162,126,253,250,189,251, 79,231,231,191, 70, 96, 25,141,198,216,119,239,222,185,
-236,222,189,155, 38,132,224,183,223,126, 67,241, 41,251, 52, 77,131,162, 40,240,120,249, 20,247,239,223,103, 42,138, 57,101, 52,
- 26, 99,131,131,131,157,118,237,218,197, 47, 52, 25,199,199,199,131,101, 89, 54, 41, 41,137,218,183,111, 95,145, 53,140,199,227,
-225,254,253,251,140, 94,175,143,169,236, 77, 69, 68, 68,124,148,222,219,205, 23,239,166, 93, 60,119,194,190,105, 80,171, 76, 75,
- 91,219, 82,187,174,133, 17,223,203, 45,220, 60,234,199,101, 63, 45,180, 46, 20, 87, 7, 67, 19, 51, 53, 90, 99,187,151, 41,121,
- 79, 63,246, 3,125,250,244,105,243,127,104, 89,155,215,166, 77, 27, 22,128, 61,128,185,133,179, 58, 11, 68, 86,211,218,181,107,
-207, 4, 32, 1, 48,239,239,180, 94, 21, 15, 13,242, 79,179, 92, 21, 71, 72, 72, 72, 52,128, 14,149, 61, 86, 17,250,245,235, 23,
-133, 82, 2,126,254, 21,252, 39, 56, 11,145,158,153,141,168,119,241,200,119, 70,103, 97,124,159, 84,228, 55,101, 48, 48, 72,207,
-174, 84, 24, 57,100,100,229,224,205,219,248,130,165,193,140, 48, 26,149, 5,124,249,142,238, 92, 70, 94,133, 28,124, 62,191,229,
-218,181,107,187, 81, 20, 69,221,191,127, 95,187,124,249,242,216,148,148,148, 94, 28,199,197, 0,128, 66,161,104,123,226,196,137,
-223, 76, 8,201, 80, 86,199, 55,140, 16,210,236,155,111,190,153, 10,160, 37,128,234, 0, 98,144, 63,227,120,221, 63, 44,226,248,
-240,255, 81,238, 42,227,127,101,102,226,190,125,251, 22,124,241,197, 23,188,160,160,160, 57,141, 27, 55,166,222,190,125,139,228,
-228,100,240,120, 60,212,169, 83, 7,157, 58,117,130,187,187, 59,123,246,236,217,159,250,244,233,179, 0,102,124, 60,129,149,154,
-154,218,121,248,240,225,151, 41,138,170, 89,124, 24,175,180, 79, 0, 96, 89,246, 93, 82, 82, 82,185, 65,200, 82, 83, 83, 59,207,
-155, 55,239, 50,143,199,171, 89, 44,254,149, 54, 45, 45,237,139,254,253,251,111,228,243,249,162,226,214, 46,150,101,223, 39, 36,
- 36,252, 87, 29,138, 75,198,193,234,220,173,119,234, 95,229,148, 11, 40,207,136,179,219,144,148,156,138,131,161,137, 25, 57, 58,
- 99,219,136, 20,213,243,127, 83, 65,227, 56, 46, 25,192, 23,101, 28,123, 13, 96,252, 63, 32,141,164, 64,100,153,103,203,252, 15,
-128, 97,152,184,142,237,219,162,100, 88,134,146,191,141, 70, 99,156,169,124, 29,218,181, 41,147,167,240,123, 69,124, 52, 77,207,
- 12, 10, 10,162,103,206,156,153,116,254,252,249,223, 51, 50, 50,102,112, 28, 87,164,204, 10,102, 13, 6,252,197,178,170, 69,254,
- 10, 15,203,205, 37,225, 31, 89,223,253, 79,204, 76,220,184,113,227,247,179,102,205,218,229,230,230,182,183,101,203,150,117, 61,
- 61, 61, 45, 45, 44, 44,144,157,157,157,147,145,145,241,234,204,153, 51, 67,134, 15, 31, 30,109,126,162, 31, 89, 96,165,164,164,
-168, 0, 52,251,152, 23,171,128,179,198, 63,166,203,165, 93,190, 31, 91,150,127,176, 14, 97,161,248, 42,245,119, 5,210, 32, 75,
-205, 76, 90,119,241,197, 74, 45,195,177,122,134, 29, 21,145,172, 10, 51, 23,189,127,108,197,104, 22, 87,255, 35,120,254,252,121,
-224, 63,145, 79,167,211, 77,107,222,188,249,207, 70,163,113,149,193, 96,184,109,126, 82,102,252,147,177,124,249,242,232,194,118,
-185,127,255,254, 52, 0, 28, 62,124,216,104,206,153,255,160,192,250,183,226,240,139, 63, 26,216,146,194,169,162,223,101,225, 85,
- 98,238,141,191,218, 99, 53,195, 12, 51,254,103, 68,122, 12,128, 94,230,156, 48,227,127,174,253, 51, 11,171,143, 10,202,156, 5,
-102,152, 97,134, 25,102,152, 97,134, 25, 31, 23, 4, 64,199, 50,122, 97, 38,207, 14, 32,132,116,172,236,133, 77, 88, 49,220,204,
-105,230, 52,115,154, 57,205,156,102, 78, 51,231,255, 51,206,127, 13,138, 59,114,126,236, 13, 64, 71, 51,167,153,211,204,105,230,
- 52,115,154, 57,205,156,102,206,127,219,102, 30, 34, 52,195, 12, 51,204, 48,195, 12, 51,204,248,200, 48, 59,185,155, 97,134, 25,
-102, 20,131, 66,161,232, 9, 96, 1,242, 93, 40,150, 40,149,202, 67,230, 92, 49,227,255, 19, 28, 28, 28,100,118,118,118,191, 83,
- 20, 85, 3,248, 48,228, 82, 41,193,189, 97, 52, 26, 19,210,211,211, 59, 37, 38, 38,166,254, 55, 57,255,117, 2,171,125,109,235,
- 86, 30,181,220,247,165, 36,167,134,230,106,178, 71,255,254, 42, 39,189, 42, 23, 38,132,216, 9,133,194,129, 50,153,172, 35,199,
-113, 30, 52, 77,135,103,101,101, 93, 49, 24, 12, 7, 56,142,203, 53,191, 2,102,252,221,240,243,243,107, 40, 20, 10,103, 17, 66,
-154, 50, 12,227,198,231,243,149, 0, 30,104,181,218, 21,161,161,161,161,230, 28,250,255, 1, 66, 8,229,226,226,242,179,181,181,
-117, 80,102,102,230, 16, 0,115, 34, 34, 34,124, 41,138,130,143,143,207, 28,133, 66,241,198,210,210,114,123,118,118,246,221,132,
-132,132,105,149, 89, 59,206,140,127, 46, 60, 61, 61,131, 41,138,114, 43, 92,146,173,164, 32, 40, 77, 32,112, 28, 23, 29, 22, 22,
- 86,102, 48,103, 55, 55, 55, 15, 75, 75,203,141, 0, 26,151, 20, 21, 37, 81, 48,204,246, 40, 59, 59,251,139,184,184,184, 82, 3,
-241,218,218,218, 90, 56, 58, 58, 46, 32,132,244,167, 40,170,194, 5,127, 89,150, 53,114, 28,119, 56, 57, 57,121, 94,122,122,122,
- 78, 89,231,217,217,217, 93,185,121,243,102, 99,123,123,251, 10,195,210, 48, 12,131,248,248,120,135,238,221,187,223, 4, 80,239,
-191,201,249,175, 19, 88,224,168,161, 43,190, 27,235,154, 18,251,198,117,206,218, 99,117, 90,213,179,111,123, 43, 60, 53,177, 50,
- 20, 18,137,100,160,175,175,239,186,159,127,254,217,206,221,221,157, 72,165, 82, 36, 36, 36,212,123,252,248,113,159,249,243,231,
-207,227,243,249, 35, 13, 6,195,229,191, 88,105, 90,219, 74,121,179,210, 84,134,111,205, 85,137, 25,149, 65,255,254,253,233,216,
-216,216,249,246,246,246, 95,205,158, 61, 91, 84,179,102, 77,200,229,114, 36, 39, 39, 87,127,253,250,117,181, 13, 27, 54,244,108,
-222,188,249, 47, 58,157,110,110, 72, 72,136,193,156, 99,255,219,112,113,113,249,249,228,201,147,147,235,214,173,139,214,173, 91,
-223,245,243,243,179,148, 74,165,184,112,225, 2, 60, 61, 61,235, 91, 90, 90, 62,216,188,121, 51,127,193,130, 5,141,142, 29, 59,
- 6, 0, 83,204,185,246,191, 15,138,162,220, 66, 67, 67, 29,165, 82, 41,140, 70, 99, 65,244,126, 22, 28,199, 21,125, 22, 23, 67,
- 70,163, 17,237,218,181,211,151,199, 41, 22,139, 55, 60,123,246,172, 99,225, 58,126,197,132, 84,169, 80, 42,149, 29,219,181,107,
-183, 1, 64,169, 1,181, 29, 29, 29, 23, 12, 24, 48, 96,122,131, 6, 13, 0,160, 40,157,133,159,169,169,169,152, 52,105, 82,209,
- 53, 88,150,197,205,155, 55,167,126,249,229,151, 0,240,101, 57,247, 94,195,222,222,158, 84,180, 4,222,252,249,243, 49,127,254,
-124,172, 91,183,142,240,120, 60,235, 10,242,243,163,115,254,235, 4, 22,161,200,185,245,155,119,141,158, 49,160, 41, 89, 62,174,
-149,215,119,219,175,223,235, 88,203,166,245,149,232,140, 88, 19,197,213,212, 9, 19, 38, 44, 93,184,112,161,248,213,171, 87, 8,
- 11, 11, 3,195, 48,176,176,176,128,175,175, 47,117,238,220, 57,151,105,211,166, 29, 17, 10,133,163,116, 58,221,177,170,222,152,
-179, 37,127,133, 76, 68, 13, 22,242,120, 15,116, 12,115,234,159,152,249,238,238,238,151, 12, 6,195,178,248,248,248,107,255, 43,
- 5, 70,161, 80,180, 16, 10,133,243,222,189,123,215,133,227, 56,230,255,227, 75, 17, 19, 19,179,176,101,203,150, 51,230,207,159,
- 47,122,251,246, 45, 34, 35, 35,161, 84, 42, 81,179,102, 77,184,187,187,147,117,235,214,137,127,249,229,151, 41, 79,158, 60,225,
- 3,152, 81, 25, 75,137,179,179,243,152, 14, 29, 58,244,181,183,183,183,138,143,143,207,186,115,231,206,201,132,132,132,173, 85,
-205, 75, 66, 8,101,111,111, 63,162, 71,143, 30,125,109,109,109,109, 19, 19, 19, 51,174, 92,185,114, 34, 57, 57,121,251, 95,177,
-180, 16, 66, 92, 0,248, 2,176, 43,216,149,224,238,238,254,226,237,219,183,201, 31,145, 83,233,238,238, 30, 86, 21, 78, 7, 7,
- 7, 25,143,199, 59, 68, 8, 81,148, 99, 33, 80, 50, 12, 51,160, 32,192,113,153,176,180,180,108,234,229,229,133,144,144, 16,204,
-157,251,127,236, 93,123, 92, 84, 85, 30,255,158,123,231,197,188, 96, 24, 64, 96, 24, 5,149, 55,152,138, 6,152,226,170,169,105,
-202, 90,138,149,181,165,105,166,100, 46,110, 9,169,176,226, 35,205, 30,102,143, 13,113, 85,220,245, 85,150, 86,102, 25,161,109,
-186,105,226, 11,197,215,240, 88, 69,112, 16, 70, 30, 34,143,153,185, 51,115,239,254, 1, 51,226,198, 99,134,220, 36,155,239,231,
-115, 62,115,239,157,225,203,185,231,156,251, 59,223,251, 59,191,115, 78,170,114,228,200,145, 40, 44, 44, 4, 33, 4,175,188,242,
- 10,137,136,136,224,151,151,151, 99,240,224,193,200,201,201,121, 8, 78, 56, 82,231,187, 0, 40, 0, 76,227, 56,238, 70,171,235,
-158, 0, 62, 7, 80,201,113,220,228,123,149, 63,177, 88,140,157, 59,119,130,207,231,131,207,231,163,166,166, 6,106,181,218,118,
- 46, 16, 8,108,199,189,122,245,234,148,143,101,217,104,154,166, 81, 95, 95, 15,139,197, 98, 75,181,181,181,224, 56, 14, 34,145,
- 8, 22, 75,243,182, 75,214,239, 88,150,141,238,160,252,166,170, 84, 42,236,216,177, 3, 70,163,177,173,182,139,252,252,219,155,
-130,208, 52,141, 1, 3, 6, 80,132,144,169, 29, 9, 44, 66, 8, 7, 0,179,103,207, 6, 77,211,182,173,239,172,199,214,100,177,
- 88,144,158,158,222, 28,176, 77, 81,157,213,245, 93,231,252,205,183,255,142,212,245,200, 64,247,196, 17,113,177,111,185,136,120,
- 98,214,108,130,197,108, 2,107, 54,130, 38, 44,226,194,123, 32,170,151, 11,170,107,110, 33,117,107, 94,157,182, 74, 31,147, 93,
- 80,165,233,164, 2, 2, 98, 98, 98, 78, 29, 60,120, 80,113,224,192, 1,104, 52, 26,188,254,250,235, 0, 0,169, 84,138,253,251,
-247,131,166,105,176, 44,139,113,227,198,233,180, 90,109, 24,199,113,213, 93,120,168,253,135,247, 83,159,220,189,104,184, 50,114,
-238,167, 37,215,111, 26,251,114, 28,215,237, 22, 80, 83,169, 84, 28,159,207,111, 52,155,205,241,191, 5,145,165, 82,169,134,242,
-249,252,253,102,179, 89,194,231,243,197, 87,174, 92, 49,220,111, 15,196,192,129, 3, 31, 80, 42,149, 63,237,217,179,199, 37, 55,
- 55, 23, 53, 53, 53,168,172,172,196,252,249,243,145,145,145,129,200,200, 72, 72,165, 82, 8,133, 66,188,244,210, 75, 77,183,110,
-221, 26,113,226,196,137,227,118,180, 73,122,248,240,225, 59,182,109,219, 22, 96, 54,155, 41, 0, 48, 26,141, 40, 45, 45,181, 44,
- 89,178,228,234,137, 19, 39,166, 57, 42,178, 8, 33,212, 67, 15, 61,180,117,219,182,109,129, 66,161,144, 98, 89, 22, 38,147, 9,
-133,133,133,150, 37, 75,150, 92, 57,121,242,228,211, 93,105,247,132,144,129, 18,137, 36, 34, 49, 49, 81, 55,105,210, 36, 6, 0,
-142, 31, 63, 78,157, 57,115,198,181, 79,159, 62, 37,105,105,105,167,186,192, 57, 72, 46,151,135,190,248,226,139, 55, 38, 78,156,
-104, 18, 8, 4,236,143, 63,254,200,211,104, 52,174, 1, 1, 1,197,139, 23, 47, 62,227, 96, 91,220,183,103,207,158, 17, 42,149,
-202, 2,128,179, 26,120,138,162,184,150, 79, 20, 23, 23,243, 18, 18, 18,254,165,213,106,255,216,225,203,152,143, 79,184,175,175,
-239,161,180,180, 52,165,181,147,106,157,172,117,149,158,158,206,148,151,151,199,106,181,218,211,112,194,222,122, 63, 6, 32, 26,
-192, 57, 0,163, 56,142,187,209, 34,174,190, 7, 16, 1,224, 71,142,227,134,221,139,188,133,134,134, 86,228,231,231,247,248,226,
-139, 47,192,231,243,241,221,119,223, 33, 35, 35, 3, 59,119,238,108, 83,100,249,250,250, 34, 46, 46,174,236,244,233,211, 61,219,
-227, 12, 12, 12,188, 89, 84, 84,228,122,243,230, 77, 88, 44, 22, 28, 59,118, 12, 27, 55,110, 68,143, 30, 61,224,233,233, 9, 47,
- 47, 47, 68, 71, 71, 67, 42,149,218, 68,214,212,169, 83,235,138,138,138,220,218,226, 11, 15, 15,215, 62,243,204, 51,190, 39, 79,
-158,132,201,100,106, 83, 96, 37, 37, 37,181,246, 34, 65, 42,149, 98,210,164, 73,229, 23, 46, 92,104,247,229, 35, 50, 50,178,252,
-220,185,115, 62,103,206,156,185,163,173,183, 37,136,104,154,134, 92, 46,199,144, 33, 67, 42, 78,159, 62,237,243,107,114,222,215,
- 30,172, 96,127,159, 37,139,230, 60, 38,134,133, 1,103,106, 2,152, 70,128,169, 7,107,108, 4, 17,136, 1, 83, 19,148,194,106,
-188,255, 92, 31,215,213, 95, 92,185, 48,170,175,215,132,131,197,186,253,237,241, 41, 20,138,244,245,235,215, 43,242,243,243,161,
-209,104,176,118,237, 90,172, 88,177, 2, 2,129, 0,213,213,213,136,143,143,199,145, 35, 71,192, 48, 12, 82, 83, 83,149, 41, 41,
- 41,243,208, 28,108,234,160,247,138,151,241,201,230,247,149, 74,186, 10,207,143, 58,225,241,183,236,203,137, 0, 62,232,142, 21,
-240,214, 91,111, 73,146,147,147,247,250,249,249,117,107,145,165, 82,169,134,138,197,226,253, 73, 73, 73,210, 55,222,120,227,174,
-136, 85,181, 90, 29,201,227,241, 62, 54, 26,141,175,148,151,151,127,219, 5,227,221, 59, 38, 38,230,141,243,231,207,127, 86, 95,
- 95,191,171,173,223,200,100,178,169,161,161,161,143,157, 56,113, 98, 9,199,113,151, 59,227, 20,137, 68,243, 23, 46, 92,232,114,
-237,218, 53,212,214,214, 66, 40, 20,218,118,153, 39,132, 64, 36, 18,129,162, 40, 8,133, 66, 60,251,236,179, 46,155, 54,109, 90,
- 0,224,169, 78,219,164,143,207,204,173, 91,183, 6, 48, 12, 67, 53, 52, 52, 64, 32, 16, 64, 32, 16,224,129, 7, 30,160, 23, 46,
- 92,216,115,254,252,249,115, 0,124,232,200,253,187,187,187, 63,183,117,235,214, 64,161, 80, 72,149,151,151, 99,232,208,161, 56,
-118,236, 24, 98, 98, 98,232,228,228,228, 94,243,230,205,155, 13, 32,195, 81, 47,147, 68, 34,233,247,253,247,223,151,246,236,217,
-211,246,246,213,187,119,111,203,132, 9, 19,170, 47, 94,188, 24,122,244,232,209,170, 33, 67,134, 92,117,128,211, 79, 34,145,132,
-125,253,245,215,229,203,151, 47,127, 56, 51, 51,115, 18, 0, 68, 71, 71,127,185, 98,197,138,131,213,213,213,145,135, 15, 31,174,
-142,139,139, 43,115, 32,171, 30,222,222,222,230,196,196, 68,121,123, 63,216,178,101, 75, 21,128, 30,157,180,235,120,138,162,150,
- 69, 70, 70,186,142, 28, 57, 18,135, 14, 29,194,203, 47,191,108, 48,153, 76, 5, 0, 48,122,244,232,144,244,244,116,225,201,147,
- 39,161, 80, 40,248,229,229,229,155, 85, 42,149, 51,240,221,126, 76, 2,240, 47, 0,145, 0, 14, 18, 66,158, 0,240, 41,128,112,
- 0, 26, 0, 9,247, 50,115, 22,139, 5, 60, 30, 15,101,101,101,216,180,105, 19, 86,173, 90,133,224,224, 96,152, 76, 38,155,192,
-226,241,120,224,243,249, 32,132,216,189,149,150,217,108,198,241,227,199,177,245,159,255, 68,234,146, 37,144,203,155,155, 41,195,
- 48,168,174,169,129,139,139,139,205,131,213, 17, 56,142,219, 85, 88, 88,152,164, 86,171,239, 24, 26,180,126,182,216, 56,176, 44,
- 11,179,217, 12,131,193,128,191,255,253,239,102,142,227,118,117,242, 76,218, 60, 94, 73, 73, 73, 48, 24,110,191, 43,247,239,223,
- 31, 0, 16, 16, 16,128, 1, 3, 6,216,206,173, 30, 42,123, 56,255,254, 80, 63, 52,181,250,117,104,250,219, 86,155,143,208,208,
- 80,248,250,250,218,197,121, 95, 11,172,130,171,149,107,146,151,189,247,182, 84, 72,243,103,140, 15,135,202,149, 15,136,149, 16,
- 12, 79, 1, 81,248, 55, 55,128,234,255, 0,217, 41, 72, 29, 91, 69,189,214,196,124, 62, 62, 80,233,245, 77, 81,187,193,117,209,
- 61,123,246,196,225,195,135,209,167, 79, 31,164,165,165, 33, 44, 44, 12, 82,169, 20, 21, 21, 21,104,104,104,128, 84, 42, 69, 93,
- 93, 29,162,162,162,104,185, 92, 62,210, 81,129, 69, 8,137,154, 21, 31, 19,205,243, 14,199,208,135, 99,145,189,116,132,116,203,
- 15,215, 22, 17, 66, 54,183,222,112,181,187, 32, 33, 33, 1,215,175, 95,151,172, 91,183,174,203, 34, 43, 32, 32, 32,155, 97,152,
- 49,118,184,195,191, 47, 42, 42, 26,213, 85,113,181,119,239, 94,169, 92, 46,199, 27,111,188,113,183,196,213,191, 31,121,228, 17,
-215,111,191,253,118,143,175,175,239,227,142,136, 44, 66, 72,239,169, 83,167,126,181,113,227,198,144, 81,163, 70, 89, 0,180,105,
- 80, 34, 34, 34,166,100,103,103, 79,158, 53,107, 86, 63, 66,200,196,206, 68, 22, 33,228,161,222,189,123,163,180,180, 20, 21, 21,
- 21,208,235,245,168,168,168, 0, 0,148,149,149, 65,173, 86, 67,161, 80, 64,173, 86, 35, 36, 36,132, 80, 20, 21, 99, 79,126, 71,
-142, 28, 57, 9, 0, 85, 92, 92, 12,157, 78, 7, 55, 55, 55, 72,165, 82,168,213,106,140, 24, 49,130, 23, 24, 24,248,168,163, 2,
-107,252,248,241, 83, 36, 18, 9, 85, 90, 90,138,203,151, 47,195, 96, 48,160,160,160, 0,110,110,110,120,248,225,135,249,129,129,
-129, 19, 29, 21, 88, 0,250,205,158, 61,187,162,181,184,178, 66, 42,149,146,144,144,144,106, 15, 15,143, 65, 0,174, 58,194, 57,
-111,222,188,202,213,171, 87, 15,207,201,201, 73,177, 94,204,201,201, 73, 6,128,247,222,123,239,176,151,151,215, 32, 0,142, 8,
- 44,112, 28,199,206,154, 53,171, 80, 32, 16, 64, 40, 20,218,146, 72, 36, 2,159,207, 7, 77,211,110,118,208, 44,214,104, 52,253,
-101, 50, 25, 52, 26, 13,104,154, 6, 33,164, 80,171,213,246, 7,128,148,148,148,162,166,166,166,190,122,189, 30, 9, 9, 9, 36,
- 62, 62,254,129,181,107,215, 46, 1,208, 45, 4, 22, 33,228, 65, 0,107, 1, 24, 1, 44,225, 56,238, 88,119,178,111, 28,199, 85,
- 16, 66, 70,180, 18, 89,167, 1,136, 90,196,213, 8,142,227, 42,238, 97,217,129,101, 89,240,249,124,188,253,246,219, 96, 24, 6,
-219,182,109,195,167,159,126, 10,138,162,108,129,238,174,174,174,120,255,253,247,127, 22,248,222,153,112,219,178,101, 11, 82,146,
-147,109,226, 10, 0, 4, 2, 1,124,188,189,225,225,233,137,226,226,226, 78, 5, 86,101,101,229,210,220,220, 92,116, 20,228, 62,
-121,242,237, 17,214,214, 65,238,246,228,147,166,105, 24, 12, 6,140, 25,115,187,251,152, 55,111,158,237,184,186,186,218,250, 76,
-128,216,121,243, 52, 77,163,137, 3, 30,115,185,125,237,209, 87, 94,177, 29,223,184,113,195, 97,206,251, 82, 96, 13, 47,170,254,
-240, 8,193,128,228,231, 31,158,174,242,116, 5, 87, 95, 1,193,168,165, 56, 91, 45,193,186,245,205,125, 97, 82, 66, 20,250,141,
- 94, 9, 99,214, 88,204, 28,104, 17, 46, 40,199, 66, 0,105,109,241,121,122,122,122,152,205,102, 16, 66, 32,149, 74, 17, 30, 30,
- 14, 23, 23, 23,232,116, 58,188,252,242,203,216,191,127, 63, 24,134,129, 64, 32, 64,159, 62,125,192, 48, 76,223, 46,120,175, 54,
-190,251,214, 42, 69,213,169, 29, 56,249,159, 90, 72, 60,122, 98,201,180,104,247,244,109,185, 75, 1, 36,119,199, 74, 24, 48, 96,
- 0,150, 47, 95, 46, 89,186,116,105,151, 68, 22,195, 48, 43,248,124,254,208, 85,171, 86,137,167, 77,155,246,179,239,243,242,242,
-144,144,144,208,164,215,235, 95,239,170,184,250,242,203, 47,165, 74,165, 18,165,165,165,248,165,207,132, 85, 92,109,223,190,221,
-213,223,223, 31,145,145,145, 46,239,188,243,142,221, 34,139, 16,210,127,242,228,201,187, 55,110,220,232, 63, 99,198,140,146, 19,
- 39, 78, 84, 16, 66,218, 19,226,218,231,159,127,190, 36, 43, 43, 43,132, 16,242, 85,103, 34,203,108, 54,247,146, 72, 36,208,233,
-116,248,243,159,255,124, 71,128,170,117, 56, 27, 0, 52, 26, 13,212,106, 53,244,122,189,159, 61,247,172, 84, 42,221, 1,224,133,
- 23, 94, 64,105,233,237,112, 69, 63, 63, 63,148,150,150,194,108, 54, 43, 29, 45, 71,165, 82,169, 52,153, 76,136,139,139,131, 94,
-175, 7, 0, 60,241,196, 19,224,243,249,168,172,172, 4,195, 48, 30, 93,168, 30,207, 9, 19, 38,104,219,251,210,213,213,149,113,
-119,119, 15,119,144,211, 35, 62, 62,254,218,134, 13, 27,126, 54, 84,151,155,155,251, 71,165, 82,153,163, 84, 42, 67,186,144, 87,
-182,181,160,178, 30, 11,133, 66,171,199,193,174,183, 99,150,101,177,111,223, 62,208, 52, 13, 30,239,182, 73, 76, 75, 75,123, 81,
-161, 80,120, 31, 58,116, 8,215,175, 95, 71, 67, 67, 3,234,235,235, 17, 20, 20,212,103,244,232,209,121,215,175, 95,191,114,254,
-252,249,199,239,181, 19, 28,128, 53, 46, 44, 3,192,128,238,102,223, 90, 68,214, 84, 0, 39, 90,196,149, 17,192,148,123, 41,174,
- 90,215, 61,143,199,179, 61,231, 46, 46, 46,136,138,138,178,137, 41, 66, 8, 26, 27, 27,193,227,241,172,241, 66,118, 25,191,218,
-218, 90,248,250,248, 64, 46,151, 35, 40, 56, 24,133, 5, 5, 0, 96, 59, 22,137, 68, 32,132,192,108,238, 56, 42,160,101, 38,224,
- 2,116, 16, 79,213, 69,113,201, 89,197, 80, 39,246, 31, 44,203, 90,109, 62,119, 55, 56, 61, 61, 61, 81, 95, 95,111, 23,231,125,
- 43,176,150, 17, 66, 29, 9, 82,110, 74,158, 62, 98,122, 92,136, 59,244,186,203, 16,201, 61, 65, 20, 1, 88,183,254, 91, 92,184,
-210, 28, 26,181,238,211, 83,216,178,232, 17, 64,172, 68, 95,153, 6,158, 82,201,227,237, 9,172,234,234,234, 6,147,201,164, 20,
-139,197,224,241,120, 16, 10,133,168,170,170, 66, 90, 90, 26, 62,249,228, 19, 4, 4, 4,192, 98,177, 64, 36, 18,161,178,178, 18,
- 2,129,192,161,217,137, 60, 30,153,144,254,194,248,222, 82,159, 96, 84,125,183,162,249,162,247, 64,204,142,167,132,239,236, 62,
-251, 28, 33,228, 29,142,227, 42,187, 91, 37,200,100, 50, 68, 71, 71, 99,238,220,185,146,245,235,215,255, 3,128,218,145,191,215,
-106,181, 63,170, 84,170,177, 75,150, 44,201,190,118,237,154, 56, 54, 54, 22, 50,153, 12, 50,153, 12, 23, 47, 94, 68, 82, 82,146,
-222,104, 52, 78,236,138,119,140,207,231,103,141, 31, 63, 94, 42, 18,137, 80, 84, 84, 4,165, 82,249,139,238,213, 42,174,118,238,
-220,233, 26, 18, 18,130, 75,151, 46, 97,200,144, 33,240,245,245,117,121,245,213, 87, 59, 21, 89, 45,111, 60,239,125,252,241,199,
- 1, 60, 30,143,124,246,217,103,189, 1, 36,217,243,191,183,111,223, 30,186,107,215,174,181,132,144,199,184,118,130, 15, 5, 2,
- 65,153, 78,167, 11,236,217,179, 39, 54,109,218, 4,138,162, 80, 94, 94,142,197,139, 23, 99,245,234,213,136,137,137,129, 92, 46,
- 71,207,158, 61, 81, 84, 84, 4, 23, 23,151,114,123,254,247,181,107,215,170, 89,150,237,177,127,255,126,232,116, 58,219,117,127,
-127,127,212,212,212,192, 96, 48, 84, 57, 90,150,101,101,101, 85, 0,188,243,242,242,112,229,202, 21,140, 27, 55, 14,159,127,254,
- 57, 6, 15, 30,140,150,120,172,170, 46, 84,145,133,166,105,174,147,242,119,191,155,156, 45,157,150,163,156,224, 56,142,107, 45,
-168,172,199,214,196,227,241,236, 9,242, 95, 21, 22, 22,182,172, 79,159, 62,225,169,169,169,124,154,166, 49,108,216,176,144,133,
- 11, 23,150,184,184,184,120,188,246,218,107,146,182,156,193, 0,250,135,135,135, 75,187,129,249,104,237,165,235,150,147, 78, 8,
- 33, 61, 90, 60,126, 66, 0, 76,203,231, 78, 66,200,168,214,129,239,247,210,131,181,108,217, 50,204,153, 51, 7,222,222,222, 72,
- 73, 73, 1,143,199,179, 37, 66,136,205,163,229, 8,122,120,123,119,248,189, 53, 6,171,147,151,168,255,203, 50, 13,246,138,161,
-230,126,149,103,151,247,238,255,193,121, 95, 10, 44,171,184, 74,121, 46,110,250,176, 16, 87,228, 28, 58,129,145,125, 41,192, 40,
-236,192,132,154, 64, 4, 82,120,203, 41,117, 7,174,195,188,146,146,146, 94, 10,133, 2, 12,195, 64, 40, 20, 34, 50, 50, 18, 71,
-143, 30,133,209,104,132,193, 96,176, 25,199,243,231,207,131, 97,152, 67, 14, 60, 44,180,183,156,255,126,114,234, 10, 57,242, 55,
- 67, 33, 21, 98,228,160, 64,192, 35, 12,116,181, 6,107, 23,196, 43, 95, 92,179,103, 29,236,136,151,185, 23, 2,171,176,176, 16,
-153,153,153,141, 6,131,225,185,174,112, 88, 69, 86, 70, 70, 70,182, 66,161, 16,255,225, 15,127, 64,126,126, 62, 94,125,245, 85,
-189,209,104,156,208,213,248, 46,147,201, 52,227,171,175,190,218, 31, 24, 24, 40,141,139,139,187,195,221,221, 21,113, 69,211,244,
-191,103,206,156, 41, 15, 8, 8, 64,113,113, 49,220,220,220, 32,147,201,208,187,119,111,236,216,177,195,229,233,167,159,238, 80,
-100,113, 28,199, 17, 66, 18,159,124,242,201,189, 89, 89, 89,254, 51,102,204, 40,217,189,123,247, 94, 0,237, 25, 19,249,228,201,
-147,227,179,178,178,252,103,205,154,165, 1,240, 23,174,131,153, 29, 44,203, 30, 41, 42, 42,234, 27, 22, 22, 70, 66, 66, 66, 32,
- 20, 10,225,231,215,236,164,234,223,191, 63,194,195,195,193,231,243, 1, 0,133,133,133, 0,144,107,207,189, 31, 62,124,248,203,
-130,130,130,153,131, 7, 15,166,125,124,124,108,193,179, 2,129, 0, 43, 87,174,100, 74, 74, 74,246, 57, 90,158, 7, 15, 30,252,
- 60, 63, 63,255,133, 97,195,134,241,220,221,221, 33, 18,137,208,175, 95, 63,168, 84, 42,172, 92,185,146,185,124,249,242,190, 46,
- 84,211,213,252,252,124,151,224,224,224, 54, 45,191, 88, 44,118, 5,224,168,231,161,244,248,241,227,194,216,216,216, 47,191,249,
-230,155,200,214, 95, 68, 71, 71,127, 41,147,201,220, 0,148,119, 33,175,108,107, 65,101, 77,214, 33, 67,123, 4,150, 86,171,221,
-235,227,227,243, 31,111,111,239, 31, 35, 34, 34,220,242,243,243,145,154,154, 42, 48, 24, 12,189,114,114,114,108, 29,113, 27,237,
- 16, 13, 13, 13,226,110, 96, 62,146, 0,188, 11, 64, 2, 32,165, 27,138, 43,111, 52, 7,180,135,162,121, 88,240,137, 22,177,101,
-141,201,186,167, 34,139,227, 56,240,249,124,132,134,134, 98,193,130, 5, 88,179,102, 13, 18, 19, 19, 17, 28, 28,108,171,123,107,
-144,187, 35, 30, 44,129, 64, 0,111,111,239,230, 73, 39, 45,222, 43, 0, 40, 44, 40, 0,143,199, 3,203,178, 48, 26,141,157,122,
-176,122,244,232,177,236,205, 55,223,156, 63,126,252,120,234,127,103,220, 89,151,149,104,157, 76, 38, 19,246,238,221, 59,127,245,
-234,213,176,199,235, 69,211, 52,250,247,239,127,199,176,224,135, 31,222,142, 84,136,138,138,194,152, 49, 99,236, 18, 77,173, 57,
- 67,211,223,190, 99, 88,240,107,175,219,197,214,243,217,217, 8, 94,245,129, 67,156,191, 85,180, 57, 71,242, 72,144, 98,101,202,
- 51, 67,167, 15, 11,146,227,187, 67,167,177,238,235,203,151, 74,202,171,192, 86,228,131,213, 93, 68, 82, 66, 20,194, 3,148, 8,
- 15, 80, 34, 41, 33, 10,108,229, 57,112, 53,197,224, 68, 10,148,214, 66,219,129,219,116,205,138, 21, 43,106,149, 74, 37,196, 98,
- 49,132, 66, 33,202,202,202, 16, 17, 17, 1,145, 72,100,123, 3,165, 40, 10,169,169,169, 58,157, 78,183,222,222, 27,145, 10,169,
-217,107, 94,121,194, 91,224, 34, 3, 74, 15,193, 85, 46,195,166,191,189, 13,212,107, 1, 90,128,248, 63, 12,160,125, 61, 21,163,
- 8, 33, 33,221,173, 18,138,139,139, 49,127,254,252, 70,189, 94,255,139, 2,221,181, 90,237,143, 12,195,140, 93,189,122,117,211,
-246,237,219,127,177,184,178,114, 26,141,198,113,239,190,251,110, 67, 81, 81,209, 47, 18, 88, 60, 30,239, 53,147,201,228,154,153,
-153,201, 14, 26, 52,200,242,216, 99,143, 89,198,142, 29,107, 25, 50,100,136, 37, 34, 34,194, 50,101,202, 20,139, 94,175, 23, 73,
- 36,146, 55, 59, 49,138, 23,118,239,222, 61,122,214,172, 89,154,172,172, 44,255,152,152, 24, 21,199,113, 75,219, 74,131, 7, 15,
-246,182,138,171, 93,187,118,117, 26,131,101, 48, 24, 62,204,200,200,208, 91,103,185, 8,133, 66,120,121,121,217,132,176, 64, 32,
-128, 72, 36, 2,195, 48,248,232,163,143,154,154,154,154,214,217,115,239, 85, 85, 85,155,147,147,147,175,102,103,103,155,234,234,
-234, 64, 8,193,181,107,215,176,114,229, 74,102,195,134, 13,215,106,107,107, 55, 56, 90,158,117,117,117, 89,201,201,201, 87,246,
-237,219,103,162, 40, 10, 53, 53, 53,112,117,117,181,113,222,186,117,203, 97,206, 33, 67,134, 20,149,148,148,184, 54, 54, 54,182,
-229,205, 36, 82,169,244, 65, 0, 7, 29,225,140,138,138, 42,190,122,245,170,124,229,202,149, 63,140, 30, 61,122,141, 92, 46, 47,
-144,203,229, 5,163, 71,143,126,243,131, 15, 62,248,151,139,139, 75, 52, 0,135, 55,135,165, 40,138,109,109, 55, 90,199, 96,137,
- 68, 34, 8, 4, 2,187,150,169,112,115,115,219,146,145,145,225, 86, 94, 94, 14,131,193,128,188,188, 60,228,229,229,161,172,172,
-204,214, 9,183,177, 15, 27, 26, 27, 27, 93,238,181,237,224, 56,238, 95, 28,199,245,231, 56, 46,144,227,184,238, 56, 73,230,211,
- 86,226,106, 4,199,113,249, 0, 70,180,156, 71, 2,248,226, 94,122,176,172, 2,139,199,227, 97,218,180,105, 56,112,224, 0,130,
-130,130,108,129,237,173,131,220, 29, 17, 4,102,179, 25,253,250,245,131,193,104,188, 67,160,243,120, 60,120,245,232,129,162,162,
- 34,187, 60, 88,132,144,169,227,199,143,167,206,159, 63,143,176,176, 48,156, 58,117,202,150,242,242,242,112,246,236, 89,156, 59,
-119, 14, 23, 46, 92,192,160, 65,131, 80, 82, 82,130, 71, 30,121,196,186, 76, 67,135, 77,199, 94,111,147,117, 38,160, 29,222,166,
-255, 7,231,253,231,193, 82,123, 73,102, 12,237, 77,240,221,225,211,120, 63, 91,187,133,227,184,221,251,243,235,190,154, 51,200,
- 12,102,215,211,232,151,240,207,230, 97, 65, 0,108,229, 57, 48,187,254, 4, 34,241, 68,110,133, 16,117,122, 83,187,111,205, 12,
-195, 28,115,119,119,223,185,121,243,230,153,207, 63,255,188, 16, 0, 36, 18, 9,254,242,151,191,128,227, 56, 8,133, 66,208, 52,
-141,185,115,231,214, 87, 86, 86,190,203,113, 92,145,157, 15,138,216,207, 93,152,250,204, 75,105, 46,200,219, 0, 80, 2,220,144,
- 69,161,255, 35, 51, 81,169, 57, 10, 84, 93, 4,104, 1,214,167,191,224,249,199,121,111,111, 0, 16,215, 93, 42,224,220,185,115,
-152, 55,111,222, 47, 22, 87,255,235,201,218,177, 99,199, 63,140, 70,227, 11,119,145,115, 92, 74, 74,202,126,111,111,239, 46, 15,
-139,148,148,148, 60,235,239,239, 63,179,179, 7,175,184,184,184,211,161, 14,142,227, 46, 19, 66, 38, 94,185,114,229,245, 75,151,
- 46,125,222,222,239, 46, 93,186,244,249,152, 49, 99,232, 99,199,142,189,102,207, 44,194, 83,167, 78,157,138,141,141,205, 88,183,
-110,221,220,164,164, 36,177, 72, 36,130,171,171, 43, 52, 26,141,109, 29, 28,163,209,136, 69,139, 22, 53,153, 76,166, 45,199,143,
- 31, 63,106,103, 71,104, 38,132, 60, 53,103,206,156, 89, 33, 33, 33,127,100, 89,214,195,104, 52, 86,149,148,148,236,187,117,235,
- 86,151,214,193,226, 56,142, 37,132, 60, 61,119,238,220,233,193,193,193, 83, 24,134,241,176, 88, 44, 85, 87,175, 94,253,178,174,
-174,110, 83, 87, 56,143, 28, 57,162,251,232,163,143,254,163,211,233,194,212,106,245, 77,153, 76,102, 52, 26,141,180, 88, 44,118,
-149, 74,165, 81, 0,142, 2,184,224, 8,231,201,147, 39,175,175, 95,191,254,138,193, 96, 8, 93,191,126,253, 97, 87, 87,215, 3,
-132, 16, 34, 16, 8,220,197, 98,241, 72, 0, 63, 0, 40,116, 52,175, 52, 77,119,232,193,130,157,241, 29,183,110,221, 58,150,158,
-158, 62,104,224,192,129,200,200,200,168,150,201,100,242, 41, 83,166,240,106,107,107, 73, 71, 30,172,238, 32,176,126, 3,168,106,
-241,242, 78,178,198, 92,181, 10,124,255, 20, 64,237, 61, 22,168,119, 8,169, 94,189,122,217,206, 91,167, 86, 49, 88,118,193, 98,
-177, 64, 32, 16,128,199,227,193, 87,165,178,137, 57,142,227, 80, 84, 84,132,234,234,106,187, 4, 22, 69, 81, 52, 33, 4, 79, 62,
-249,164, 93,255,247,169,167,158,194, 15, 63,252,128,206,134, 19, 91,207,248, 11, 8, 8,232, 84, 12,181,228,197,238, 89,132,106,
-181,250,174,112,222,151, 2,235,170, 78,191,114,193,134,227,139,138, 43, 13,187, 31, 42,172, 89,144, 14,112,128,123,118,152,146,
-140,141,163,202, 96,216, 48, 12,196,181,185,179,225,234,203, 65,164,222, 40,135, 26,239,101, 23, 95, 55,113, 76,135,222,135,218,
-218,218,164, 15, 63,252,144,206,206,206,126, 98,245,234,213,110, 97, 97, 97,248,211,159,254, 4,163,209,136,179,103,207, 98,206,
-156, 57,213, 58,157, 46,179,182,182,118,141,189, 55,225, 41,227,253,117,221,203, 99, 61, 40, 83, 61,112,253, 20, 32,114,131,167,
-187, 12,103,114, 15, 1,215, 79, 2,180, 0,160,133, 24,252, 64, 24,250,135, 7,134, 17, 66,134,113, 28,247,239,238, 80, 1,143,
- 63,254,248, 93, 19, 87,173, 5, 17,128, 62,119, 51,159, 86,145, 53,125,250,244,253, 44,203, 74,186,226,222,109, 89,147,201,114,
- 23,141,227,101,116, 50,228,219,178,124,195, 46, 71,120, 77, 38,211,162,252,252,124,204,157, 59,119,238,179,207, 62, 43, 14, 9,
- 9, 65, 64, 64, 0, 10, 10, 10,160,209,104,144,153,153,217,100, 54,155, 55,213,214,214,190,218,133,251,207,108, 73,119,171, 12,
- 88, 0,155, 91,210, 93, 65, 98, 98,226,153,226,226,226, 42, 47, 47,175, 24,129, 64,240, 0,154,227,124,174,183,252,143,194,174,
-112,206,153, 51, 39,175,184,184,248,134,159,159, 95,108, 11,167, 2,192, 53, 0, 27,187,200, 89,149,151,151, 23, 24, 29, 29,205,
-242,120, 60,174,197,195,192,241,249,124,142,207,231,115, 0,144,157,157, 45, 2,208,105,204,101,121,121,249,159,247,236,217,131,
-156,156,156,152,250,250,250,103, 0,252,163,177,177, 49,250,230,205,155,182, 78,184, 29,111,167,200,169,159, 58,109,159,143,181,
-115,189, 2,192,176,110,144, 63, 44, 95,190, 28,153,153,153,232,108, 5,242,189,123,247, 2,157, 12, 17, 90,219,138, 85, 60, 49,
- 12,131,115,231,206, 89,247,222,179, 13, 11, 90,151,104, 48,155,205, 29,174,244,206,178,172,197,104, 52,226,227,143, 63,182, 75,
-100,237,216,177, 3,122,189, 30, 44,203,218,101,103, 91, 22, 38, 69,117,117, 53, 84, 42,149,213,227,220,218, 41,226,112,153,210,
- 52,141,208,208, 80,220,184,113, 3,158,158,158, 0,154,135, 5,109,222,189,134,134,223, 77,251,239,112,161,209,214, 24, 17,160,
-112,163, 4,100,207,195, 65,130, 17, 19,251,201,209,211, 75, 6,158, 80,132,202, 58, 11,254, 93, 92,143, 79,142,234, 74,141, 22,
-203,196, 3,154,154,124, 59,189, 78,177,190,190,190,139, 45, 22, 75, 36, 69, 81, 18,142,227,234,105,154, 62,173,213,106,151,113,
- 28,119,206,145,155, 80,136,233, 66,119, 41,237,198,231, 11, 57, 11,203, 2,160, 0, 98, 77,116,243, 39,213,124,222,164,103, 4,
- 22,142,236,174,208,221,152,117,175, 11, 63, 36, 36, 36,187,161,161,225, 55,183,146,187, 84, 42, 93, 90, 88, 88,120,223,174,228,
-110,197,131, 15, 62, 56, 88, 44, 22, 47,102, 89,246, 65,189, 94,239, 35, 22,139, 43, 8, 33, 39,110,221,186,245,198,233,211,167,
-127,114,118,159,247, 14,119,115, 37,247, 54,218,120, 60,128,101, 30, 30, 30, 33,103,207,158, 21,181,246, 96,181,182,151,142,172,
-139,228, 68,247, 67,120,120,248,177,237,219,183, 15,238,213,171, 23,213, 58,144,157,162, 40,219,226,152, 20, 69,217,102,150,254,
-244,211, 79,230,196,196,196,163,121,121,121,195,219,227, 12, 10, 10,202,206,201,201, 25, 83, 91, 91,251, 51, 33,213,122,101,119,
-235,121, 83, 83, 19,254,250,215,191,126, 87, 88, 88,216,230, 86, 57, 97, 97, 97,239,166,166,166,206,127,244,209, 71, 41,138,162,
-126, 22,115,101,221,214,199,154, 24,134,193,238,221,187,217,172,172,172,247, 47, 94,188,216,110, 12, 86, 84, 84, 84,233,169, 83,
-167,212,214, 37, 19,218, 75,173, 17, 27, 27, 91,254,211, 79, 63,169,126, 77,206,223,141,192,106, 49, 40,100, 84,144,226, 9,142,
- 35, 83, 9, 72, 63,138,112, 66, 51, 7, 13, 1,178, 37,141,162,143,246,106,181, 77,206,199,214,137,251,242, 65, 33,132,114,110,
-242,251,251, 66, 80, 80, 80, 97, 97, 97, 97, 96, 7,109,194, 41,176,126,227, 34,221,203,203,235, 0, 69, 81,254, 86, 17,221,222,
-103,139, 55,233, 74, 69, 69,197,195, 21, 21, 21,237,174,167,168, 86,171,251,186,184,184,252,141,101,217,104,123, 54,123,166, 40,
- 42, 87,175,215,191,244,107,111,246, 28, 25, 25, 89,148,155,155,219, 87, 44, 22,223, 17, 87,104,189,231,255,205,251,229,203,151,
- 49,121,242,228,146,188,188,188,128, 95,147,243,119, 37,176,156,112,194, 9, 39,126, 47,240,243,243, 59,198, 48, 76,152, 94,175,
-231, 27, 12, 6,190,217,108,190,163,131, 19,139,197,186,198,198,198, 30,206,146,114,226,183, 6,149, 74, 21,162, 80, 40,190,229,
-243,249,162,182, 94, 28,254, 23, 22,139, 69, 95, 85, 85, 53, 78,171,213,106,126, 77,206,223, 60,218,154, 33,115,183, 18,128,209,
- 78, 78, 39,167,147,211,201,233,228,116,114, 58, 57,157,156,191,183, 68, 57,181,188, 19, 78, 56,225,132, 19, 78, 56,225,196,221,
-133, 83, 96, 57,225,132, 19, 78, 56,225,132, 19, 78, 56, 5,150, 19, 78, 56,225,132, 19, 78, 56,225,132, 83, 96, 57,225,132, 19,
- 78, 56,225,132, 19, 78,252,174,240,223, 1, 0, 29, 13,182,141,194,138, 6,132, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130,
+137, 80, 78, 71, 13, 10, 26, 10, 0, 0,
+ 0, 13, 73, 72, 68, 82, 0, 0, 2, 88, 0, 0, 2,128, 8, 6, 0, 0, 0, 64, 11, 6,158, 0, 0, 0, 9,112, 72, 89,115, 0,
+ 0, 13,215, 0, 0, 13,215, 1, 66, 40,155,120, 0, 0, 10, 79,105, 67, 67, 80, 80,104,111,116,111,115,104,111,112, 32, 73, 67,
+ 67, 32,112,114,111,102,105,108,101, 0, 0,120,218,157, 83,103, 84, 83,233, 22, 61,247,222,244, 66, 75,136,128,148, 75,111, 82,
+ 21, 8, 32, 82, 66,139,128, 20,145, 38, 42, 33, 9, 16, 74,136, 33,161,217, 21, 81,193, 17, 69, 69, 4, 27,200,160,136, 3,142,
+142,128,140, 21, 81, 44, 12,138, 10,216, 7,228, 33,162,142,131,163,136,138,202,251,225,123,163,107,214,188,247,230,205,254,181,
+215, 62,231,172,243,157,179,207, 7,192, 8, 12,150, 72, 51, 81, 53,128, 12,169, 66, 30, 17,224,131,199,196,198,225,228, 46, 64,
+129, 10, 36,112, 0, 16, 8,179,100, 33,115,253, 35, 1, 0,248,126, 60, 60, 43, 34,192, 7,190, 0, 1,120,211, 11, 8, 0,192,
+ 77,155,192, 48, 28,135,255, 15,234, 66,153, 92, 1,128,132, 1,192,116,145, 56, 75, 8,128, 20, 0, 64,122,142, 66,166, 0, 64,
+ 70, 1,128,157,152, 38, 83, 0,160, 4, 0, 96,203, 99, 98,227, 0, 80, 45, 0, 96, 39,127,230,211, 0,128,157,248,153,123, 1,
+ 0, 91,148, 33, 21, 1,160,145, 0, 32, 19,101,136, 68, 0,104, 59, 0,172,207, 86,138, 69, 0, 88, 48, 0, 20,102, 75,196, 57,
+ 0,216, 45, 0, 48, 73, 87,102, 72, 0,176,183, 0,192,206, 16, 11,178, 0, 8, 12, 0, 48, 81,136,133, 41, 0, 4,123, 0, 96,
+200, 35, 35,120, 0,132,153, 0, 20, 70,242, 87, 60,241, 43,174, 16,231, 42, 0, 0,120,153,178, 60,185, 36, 57, 69,129, 91, 8,
+ 45,113, 7, 87, 87, 46, 30, 40,206, 73, 23, 43, 20, 54, 97, 2, 97,154, 64, 46,194,121,153, 25, 50,129, 52, 15,224,243,204, 0,
+ 0,160,145, 21, 17,224,131,243,253,120,206, 14,174,206,206, 54,142,182, 14, 95, 45,234,191, 6,255, 34, 98, 98,227,254,229,207,
+171,112, 64, 0, 0,225,116,126,209,254, 44, 47,179, 26,128, 59, 6,128,109,254,162, 37,238, 4,104, 94, 11,160,117,247,139,102,
+178, 15, 64,181, 0,160,233,218, 87,243,112,248,126, 60, 60, 69,161,144,185,217,217,229,228,228,216, 74,196, 66, 91, 97,202, 87,
+125,254,103,194, 95,192, 87,253,108,249,126, 60,252,247,245,224,190,226, 36,129, 50, 93,129, 71, 4,248,224,194,204,244, 76,165,
+ 28,207,146, 9,132, 98,220,230,143, 71,252,183, 11,255,252, 29,211, 34,196, 73, 98,185, 88, 42, 20,227, 81, 18,113,142, 68,154,
+140,243, 50,165, 34,137, 66,146, 41,197, 37,210,255,100,226,223, 44,251, 3, 62,223, 53, 0,176,106, 62, 1,123,145, 45,168, 93,
+ 99, 3,246, 75, 39, 16, 88,116,192,226,247, 0, 0,242,187,111,193,212, 40, 8, 3,128,104,131,225,207,119,255,239, 63,253, 71,
+160, 37, 0,128,102, 73,146,113, 0, 0, 94, 68, 36, 46, 84,202,179, 63,199, 8, 0, 0, 68,160,129, 42,176, 65, 27,244,193, 24,
+ 44,192, 6, 28,193, 5,220,193, 11,252, 96, 54,132, 66, 36,196,194, 66, 16, 66, 10,100,128, 28,114, 96, 41,172,130, 66, 40,134,
+205,176, 29, 42, 96, 47,212, 64, 29, 52,192, 81,104,134,147,112, 14, 46,194, 85,184, 14, 61,112, 15,250, 97, 8,158,193, 40,188,
+129, 9, 4, 65,200, 8, 19, 97, 33,218,136, 1, 98,138, 88, 35,142, 8, 23,153,133,248, 33,193, 72, 4, 18,139, 36, 32,201,136,
+ 20, 81, 34, 75,145, 53, 72, 49, 82,138, 84, 32, 85, 72, 29,242, 61,114, 2, 57,135, 92, 70,186,145, 59,200, 0, 50,130,252,134,
+188, 71, 49,148,129,178, 81, 61,212, 12,181, 67,185,168, 55, 26,132, 70,162, 11,208,100,116, 49,154,143, 22,160,155,208,114,180,
+ 26, 61,140, 54,161,231,208,171,104, 15,218,143, 62, 67,199, 48,192,232, 24, 7, 51,196,108, 48, 46,198,195, 66,177, 56, 44, 9,
+147, 99,203,177, 34,172, 12,171,198, 26,176, 86,172, 3,187,137,245, 99,207,177,119, 4, 18,129, 69,192, 9, 54, 4,119, 66, 32,
+ 97, 30, 65, 72, 88, 76, 88, 78,216, 72,168, 32, 28, 36, 52, 17,218, 9, 55, 9, 3,132, 81,194, 39, 34,147,168, 75,180, 38,186,
+ 17,249,196, 24, 98, 50, 49,135, 88, 72, 44, 35,214, 18,143, 19, 47, 16,123,136, 67,196, 55, 36, 18,137, 67, 50, 39,185,144, 2,
+ 73,177,164, 84,210, 18,210, 70,210,110, 82, 35,233, 44,169,155, 52, 72, 26, 35,147,201,218,100,107,178, 7, 57,148, 44, 32, 43,
+200,133,228,157,228,195,228, 51,228, 27,228, 33,242, 91, 10,157, 98, 64,113,164,248, 83,226, 40, 82,202,106, 74, 25,229, 16,229,
+ 52,229, 6,101,152, 50, 65, 85,163,154, 82,221,168,161, 84, 17, 53,143, 90, 66,173,161,182, 82,175, 81,135,168, 19, 52,117,154,
+ 57,205,131, 22, 73, 75,165,173,162,149,211, 26,104, 23,104,247,105,175,232,116,186, 17,221,149, 30, 78,151,208, 87,210,203,233,
+ 71,232,151,232, 3,244,119, 12, 13,134, 21,131,199,136,103, 40, 25,155, 24, 7, 24,103, 25,119, 24,175,152, 76,166, 25,211,139,
+ 25,199, 84, 48, 55, 49,235,152,231,153, 15,153,111, 85, 88, 42,182, 42,124, 21,145,202, 10,149, 74,149, 38,149, 27, 42, 47, 84,
+169,170,166,170,222,170, 11, 85,243, 85,203, 84,143,169, 94, 83,125,174, 70, 85, 51, 83,227,169, 9,212,150,171, 85,170,157, 80,
+235, 83, 27, 83,103,169, 59,168,135,170,103,168,111, 84, 63,164,126, 89,253,137, 6, 89,195, 76,195, 79, 67,164, 81,160,177, 95,
+227,188,198, 32, 11, 99, 25,179,120, 44, 33,107, 13,171,134,117,129, 53,196, 38,177,205,217,124,118, 42,187,152,253, 29,187,139,
+ 61,170,169,161, 57, 67, 51, 74, 51, 87,179, 82,243,148,102, 63, 7,227,152,113,248,156,116, 78, 9,231, 40,167,151,243,126,138,
+222, 20,239, 41,226, 41, 27,166, 52, 76,185, 49,101, 92,107,170,150,151,150, 88,171, 72,171, 81,171, 71,235,189, 54,174,237,167,
+157,166,189, 69,187, 89,251,129, 14, 65,199, 74, 39, 92, 39, 71,103,143,206, 5,157,231, 83,217, 83,221,167, 10,167, 22, 77, 61,
+ 58,245,174, 46,170,107,165, 27,161,187, 68,119,191,110,167,238,152,158,190, 94,128,158, 76,111,167,222,121,189,231,250, 28,125,
+ 47,253, 84,253,109,250,167,245, 71, 12, 88, 6,179, 12, 36, 6,219, 12,206, 24, 60,197, 53,113,111, 60, 29, 47,199,219,241, 81,
+ 67, 93,195, 64, 67,165, 97,149, 97,151,225,132,145,185,209, 60,163,213, 70,141, 70, 15,140,105,198, 92,227, 36,227,109,198,109,
+198,163, 38, 6, 38, 33, 38, 75, 77,234, 77,238,154, 82, 77,185,166, 41,166, 59, 76, 59, 76,199,205,204,205,162,205,214,153, 53,
+155, 61, 49,215, 50,231,155,231,155,215,155,223,183, 96, 90,120, 90, 44,182,168,182,184,101, 73,178,228, 90,166, 89,238,182,188,
+110,133, 90, 57, 89,165, 88, 85, 90, 93,179, 70,173,157,173, 37,214,187,173,187,167, 17,167,185, 78,147, 78,171,158,214,103,195,
+176,241,182,201,182,169,183, 25,176,229,216, 6,219,174,182,109,182,125, 97,103, 98, 23,103,183,197,174,195,238,147,189,147,125,
+186,125,141,253, 61, 7, 13,135,217, 14,171, 29, 90, 29,126,115,180,114, 20, 58, 86, 58,222,154,206,156,238, 63,125,197,244,150,
+233, 47,103, 88,207, 16,207,216, 51,227,182, 19,203, 41,196,105,157, 83,155,211, 71,103, 23,103,185,115,131,243,136,139,137, 75,
+130,203, 46,151, 62, 46,155, 27,198,221,200,189,228, 74,116,245,113, 93,225,122,210,245,157,155,179,155,194,237,168,219,175,238,
+ 54,238,105,238,135,220,159,204, 52,159, 41,158, 89, 51,115,208,195,200, 67,224, 81,229,209, 63, 11,159,149, 48,107,223,172,126,
+ 79, 67, 79,129,103,181,231, 35, 47, 99, 47,145, 87,173,215,176,183,165,119,170,247, 97,239, 23, 62,246, 62,114,159,227, 62,227,
+ 60, 55,222, 50,222, 89, 95,204, 55,192,183,200,183,203, 79,195,111,158, 95,133,223, 67,127, 35,255,100,255,122,255,209, 0,167,
+128, 37, 1,103, 3,137,129, 65,129, 91, 2,251,248,122,124, 33,191,142, 63, 58,219,101,246,178,217,237, 65,140,160,185, 65, 21,
+ 65,143,130,173,130,229,193,173, 33,104,200,236,144,173, 33,247,231,152,206,145,206,105, 14,133, 80,126,232,214,208, 7, 97,230,
+ 97,139,195,126, 12, 39,133,135,133, 87,134, 63,142,112,136, 88, 26,209, 49,151, 53,119,209,220, 67,115,223, 68,250, 68,150, 68,
+222,155,103, 49, 79, 57,175, 45, 74, 53, 42, 62,170, 46,106, 60,218, 55,186, 52,186, 63,198, 46,102, 89,204,213, 88,157, 88, 73,
+108, 75, 28, 57, 46, 42,174, 54,110,108,190,223,252,237,243,135,226,157,226, 11,227,123, 23,152, 47,200, 93,112,121,161,206,194,
+244,133,167, 22,169, 46, 18, 44, 58,150, 64, 76,136, 78, 56,148,240, 65, 16, 42,168, 22,140, 37,242, 19,119, 37,142, 10,121,194,
+ 29,194,103, 34, 47,209, 54,209,136,216, 67, 92, 42, 30, 78,242, 72, 42, 77,122,146,236,145,188, 53,121, 36,197, 51,165, 44,229,
+185,132, 39,169,144,188, 76, 13, 76,221,155, 58,158, 22,154,118, 32,109, 50, 61, 58,189, 49,131,146,145,144,113, 66,170, 33, 77,
+147,182,103,234,103,230,102,118,203,172,101,133,178,254,197,110,139,183, 47, 30,149, 7,201,107,179,144,172, 5, 89, 45, 10,182,
+ 66,166,232, 84, 90, 40,215, 42, 7,178,103,101, 87,102,191,205,137,202, 57,150,171,158, 43,205,237,204,179,202,219,144, 55,156,
+239,159,255,237, 18,194, 18,225,146,182,165,134, 75, 87, 45, 29, 88,230,189,172,106, 57,178, 60,113,121,219, 10,227, 21, 5, 43,
+134, 86, 6,172, 60,184,138,182, 42,109,213, 79,171,237, 87,151,174,126,189, 38,122, 77,107,129, 94,193,202,130,193,181, 1,107,
+235, 11, 85, 10,229,133,125,235,220,215,237, 93, 79, 88, 47, 89,223,181, 97,250,134,157, 27, 62, 21,137,138,174, 20,219, 23,151,
+ 21,127,216, 40,220,120,229, 27,135,111,202,191,153,220,148,180,169,171,196,185,100,207,102,210,102,233,230,222, 45,158, 91, 14,
+150,170,151,230,151, 14,110, 13,217,218,180, 13,223, 86,180,237,245,246, 69,219, 47,151,205, 40,219,187,131,182, 67,185,163,191,
+ 60,184,188,101,167,201,206,205, 59, 63, 84,164, 84,244, 84,250, 84, 54,238,210,221,181, 97,215,248,110,209,238, 27,123,188,246,
+ 52,236,213,219, 91,188,247,253, 62,201,190,219, 85, 1, 85, 77,213,102,213,101,251, 73,251,179,247, 63,174,137,170,233,248,150,
+251,109, 93,173, 78,109,113,237,199, 3,210, 3,253, 7, 35, 14,182,215,185,212,213, 29,210, 61, 84, 82,143,214, 43,235, 71, 14,
+199, 31,190,254,157,239,119, 45, 13, 54, 13, 85,141,156,198,226, 35,112, 68,121,228,233,247, 9,223,247, 30, 13, 58,218,118,140,
+123,172,225, 7,211, 31,118, 29,103, 29, 47,106, 66,154,242,154, 70,155, 83,154,251, 91, 98, 91,186, 79,204, 62,209,214,234,222,
+122,252, 71,219, 31, 15,156, 52, 60, 89,121, 74,243, 84,201,105,218,233,130,211,147,103,242,207,140,157,149,157,125,126, 46,249,
+220, 96,219,162,182,123,231, 99,206,223,106, 15,111,239,186, 16,116,225,210, 69,255,139,231, 59,188, 59,206, 92,242,184,116,242,
+178,219,229, 19, 87,184, 87,154,175, 58, 95,109,234,116,234, 60,254,147,211, 79,199,187,156,187,154,174,185, 92,107,185,238,122,
+189,181,123,102,247,233, 27,158, 55,206,221,244,189,121,241, 22,255,214,213,158, 57, 61,221,189,243,122,111,247,197,247,245,223,
+ 22,221,126,114, 39,253,206,203,187,217,119, 39,238,173,188, 79,188, 95,244, 64,237, 65,217, 67,221,135,213, 63, 91,254,220,216,
+239,220,127,106,192,119,160,243,209,220, 71,247, 6,133,131,207,254,145,245,143, 15, 67, 5,143,153,143,203,134, 13,134,235,158,
+ 56, 62, 57, 57,226, 63,114,253,233,252,167, 67,207,100,207, 38,158, 23,254,162,254,203,174, 23, 22, 47,126,248,213,235,215,206,
+209,152,209,161,151,242,151,147,191,109,124,165,253,234,192,235, 25,175,219,198,194,198, 30,190,201,120, 51, 49, 94,244, 86,251,
+237,193,119,220,119, 29,239,163,223, 15, 79,228,124, 32,127, 40,255,104,249,177,245, 83,208,167,251,147, 25,147,147,255, 4, 3,
+152,243,252, 99, 51, 45,219, 0, 0, 0, 4,103, 65, 77, 65, 0, 0,177,142,124,251, 81,147, 0, 0, 0, 32, 99, 72, 82, 77, 0,
+ 0,122, 37, 0, 0,128,131, 0, 0,249,255, 0, 0,128,233, 0, 0,117, 48, 0, 0,234, 96, 0, 0, 58,152, 0, 0, 23,111,146,
+ 95,197, 70, 0, 2,177,101, 73, 68, 65, 84,120,218,236,157,119,120, 20,197, 31,198,223,217,221,235,119,233, 33, 29, 82,168,129,
+208,123, 9,189,137, 52, 5,233, 42, 88, 0, 5, 20,165,217, 16, 68,176,162,128, 74, 87, 17, 16, 17,164, 42,210,165, 55, 9,189,
+183, 0,105,164,215,235,101,231,247, 71,114,247,187,132, 36,119, 1, 68,132,249, 60,207, 62, 87,118,239,189,153,221,217,217,119,
+191, 83,150, 80, 74,193, 96, 48, 24, 12, 6,131,193,120,112,112,108, 23, 48, 24, 12, 6,131,193, 96,252,135, 12, 22, 33,164, 51,
+211,100,154, 76,147,105, 50, 77,166,201, 52,153, 38, 51, 88, 12, 6,131,193, 96, 48, 24, 12,102,176, 24, 12, 6,131,193, 96, 48,
+152,193, 98, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6, 51, 88, 12,
+ 6,131,193, 96, 48, 24,143, 7,132, 77, 52,202, 96, 48, 24, 12, 6,131,241, 96, 17,202, 90,209,168, 81,163,223, 21, 10, 69,181,
+178,214,235,116,186,148, 83,167, 78,117, 96,187,144,193, 96,184,188,147, 35,132,195,255, 35,230, 34, 0, 74,217,221, 29,131,193,
+120, 18, 13,150, 84, 42,141,218,183,111, 95, 13, 81, 20, 97,179,217, 96,181, 90, 29,175, 38,147, 9,253,250,245, 19, 42,250,103,
+ 13, 26, 52,216,199,113, 92, 68, 69,126, 99,179,217,110,159, 62,125,186, 77, 89,235, 3, 3, 3, 15, 1,136, 34,132,216, 43,242,
+ 82, 95, 1,128,227, 28, 45,162,201, 9, 9, 9,141,202,211, 36,132, 68, 57, 93, 28,238,210,178,191,119, 87,179, 86,173, 90,199,
+ 5, 65, 8, 43,249,251,210, 62,219,223,139,162,120,227,236,217,179,173, 88, 49,125, 56, 52,104,208, 96, 31,207,243, 21, 46,159,
+167, 78,157, 42,179,124,214,173, 91,247, 36,199,113, 33,165, 29,227,210,142, 57, 0,222,102,179, 93, 62,125,250,116,155,178, 12,
+ 72,112,112,240, 33, 0, 81,229,149,157, 18,101, 19, 0, 18, 19, 18, 18,154,184, 58,143,202, 59,135, 74, 41,243,229,106, 58,155,
+171,208,208,208, 79, 43, 85,170, 52, 90,167,211, 25, 0, 80,158,231,105,237,218,181,139,237, 7,155,205,150,126,241,226,197,186,
+172, 36, 50, 24,140,199,218, 96,137,162,200, 25,141, 70, 92,185,114, 5,165,213,243, 28,199,217, 42,250,103,148,210, 26,187, 86,
+173, 8, 80, 86, 10,132,205, 98,134,220,175,146, 67, 59,231,226, 57,136,102, 51,108,102, 19,252,155,180,176, 87,184,232,208,161,
+ 3,239, 66, 54,236,173,183,222, 10,240,240,240,128,193, 96,128,193, 96,128,209,104,132,193, 96,128,201,100,130,201,100,130,217,
+108,134,217,108,134,213,106,133,209,104,196,153, 51,103,108, 46, 46, 8, 97,227,198,141, 11,240,244,244,116,232,217, 23,187,166,
+ 93,215, 98,177,192, 96, 48,224,220,185,115,229,106, 10,130, 16,118,226,196,137, 0,169, 84, 10, 74, 41, 68, 81, 4,165,180,216,
+ 82,146, 86,173, 90,153, 89, 17,125,168,212,216,240,249,172, 0,185,175, 31, 68,139, 5,126, 13, 26,219,203, 45,146,119,111,131,
+205,108,134,104,177, 32,188,215,179,142,239,219,181,107,231,170,124,134,255, 54,245, 29,111,169,135, 7,172, 6, 3, 34,123, 62,
+227, 88,113,126,225, 28,136, 22, 51,168,197,140,122,111,189, 15, 0,200,200,200,208, 71, 71, 71, 39, 3, 32, 0,202,138,240,132,
+221,184,113, 35,192,158,134,210, 76,191,243,114,240,224, 65, 12, 29, 58,212, 85,222,195,222,123,239,189, 0,251, 57, 82,178,156,
+ 91,173, 86,199,171,213,106,133,193, 96,192,201,147, 39,221,138, 92, 5, 7, 7,127, 22, 27, 27, 59, 98,229,202,149,234, 13, 27,
+ 54,168, 35, 34, 34, 32,149, 74,193,243, 60,120,158, 7,199,113, 16, 4, 1,189,123,247, 38,172, 8, 50, 24,140,199,222, 96,153,
+205,230,248,174, 93,187, 82, 0, 48,153, 76,161, 50,153, 76, 90,194,128,133,180,110,221,250,114,201,223,185,106, 58, 84, 86, 10,
+196, 15,145,190, 0,128,231,174,103, 58, 46, 12,107, 99, 27, 56,182, 25,124, 43,183,112, 91,165, 18, 28,199, 17, 23, 21, 56,212,
+106, 53,186,116,233, 2,153, 76,134, 38, 77,154, 64, 34,145,148,186, 72,165, 82, 72, 36,146,187,162, 71,165,161,209,104, 48,125,
+250,116,187, 57,130, 90, 33,199,216, 86, 77,160, 0,197,226,115, 87, 97, 18, 41, 4, 65,112, 44,238,104, 74,165, 82,156, 61,123,
+ 22,130, 32,128,231,121,199,171,253,253,166, 77,155,208,191,127,127, 8,130, 0,165, 82,137,162,139, 44,227, 33,162,240,243,199,
+218,182, 13, 1, 0, 67, 19,242, 29,101,236,207,129, 61, 29,219, 60,159,164, 5, 33, 4, 82,169,212,189,227,238,225,129, 45,253,
+159, 2, 0, 60,123, 37, 13, 18,137, 4,130, 32,224,204, 87, 31, 67, 34,147, 65,144, 74, 81,239,173,247,145,145,145,161,127,230,
+153,103, 14, 40, 20,138,109,110,220,172, 32, 33, 33, 1,130, 32,148, 89,222, 57,142,195,178,101,203,112,235,214, 45,183,242,174,
+215,235,241,201, 39,159,128, 16, 82,236,124, 41,235,189,171,188, 19, 66,184,160,160,160,143, 99, 99, 99,135,173, 92,185,210,135,
+ 16,130,111,191,253, 22, 82,169, 20, 61,122,244,128,159,159, 31,182,111,223, 14,169, 84,138, 73,147, 38,177,194,199, 96, 48,158,
+ 12,131,117,234,212,169,167,236,239, 91,180,104,113,241,192,129, 3,181,156, 66,249,176, 90,173, 82,171,213, 90,195,222,108,104,
+191,243, 29, 60,120,112,185,119,244, 54,139,249, 46,131, 84, 90, 69,237,206,133,203,201, 12, 98,192,128, 1, 0, 80,230,197,198,
+121,113,227,174, 27, 38,147, 9,130, 32,160,102,229, 74,248,160, 91, 67, 52,163, 22,104, 11, 8,172,185, 90,244,209, 88,112,177,
+118, 35, 44,186,157,142, 91,121, 5, 16, 4,247, 90, 75, 69, 81, 44,211, 92,241, 60,143, 5, 11, 22, 96,208,160, 65,224,121,190,
+204,253,194,248,103,177,153,205, 46,203, 97, 69,143,141,213, 96, 40,140, 44, 9,188,195, 92, 73, 36, 18, 72,228,114, 8, 82, 41,
+ 4,153, 20, 25, 25, 25,250,206,157, 59, 31,145,201,100, 63, 5, 6, 6, 38, 39, 38, 38,150, 91, 62, 41,165,197,181, 74,185,153,
+248,241,199, 31,177,124,249,114, 52,111,222,220, 29, 51, 4,147,201, 4,169, 84,138,143, 63,254,248,174,245, 11, 23, 46,188,203,
+ 96,185,208, 35, 0,184,192,192,192,215, 86,173, 90,229,105,255,127,127,127,127, 72, 36, 18,212,173, 91, 23, 30, 30, 30, 56,112,
+224, 0,108, 54,155,219, 55, 62, 12, 6,131,241,159, 55, 88, 37,140, 1,103, 52, 26,113,233,210, 37,184,234,151, 74, 41, 45,183,
+150,148,251, 85,114, 68,174,214, 84,245,115,124, 63,232,102,142,227,194,181,165, 89, 53,200, 52,106, 52,249,240, 11,183,205, 80,
+ 90, 90,154,227,206,219,213,226, 78, 69,110, 50,153,160, 82, 42,176,115,124, 93, 36,100,202, 48,237,112, 22,254, 56,117, 13, 18,
+137, 4,221,107,215,197, 83, 82, 15,188, 31, 46,195,248,171, 55, 97,161,212,173, 11, 24,165,180, 84, 99,101,127,111,111, 42,177,
+ 27, 44,198,195,199,175, 65, 99, 71,228,106,101,101,143,187,162, 86, 0,176,169, 81, 4,228, 30, 26,212,125, 99,138, 91,229, 51,
+178,231, 51,142,200,213, 31,141, 35,193, 75, 36,144,200,100,120,238,108, 18,128,194,102,193, 14,117,163,247,230,240,178,101,195,
+134, 13,139,255,235,175,191,148,238,164,181, 52,131,101, 55, 63, 63,254,248, 35, 86,172, 88, 1, 65, 16, 96, 54,155,221, 74,167,
+209,104, 44,211, 56,221, 75, 4, 11, 0,116, 58,157,105,227,198,141,248,230,155,111,224,231,231,135,174, 93,187, 34, 56, 56, 24,
+107,214,172, 1,165, 20, 99,198,140,129, 82,169,132, 82,169,100,101,158,193, 96, 60,121, 6,203,108, 54,199,119,238,220,217,173,
+ 17, 63,122,189,254,142, 11, 3, 86,106,100,192, 57, 42, 32,247,208, 64,174,209,128,115,115,150, 46,139,197,226, 48, 40, 59,118,
+236,128, 82,169, 68,143, 30, 61,238, 43,130,101, 54,155, 33,147, 74,192,249, 7,226,133,175,255, 66,102,190,222,113, 65,219,115,
+ 35, 30, 39, 82,211, 48,190,101, 39,168,149,105, 40, 48,153,220,142, 96,149, 52, 87,130, 32, 96,192,128, 1, 48, 26,141, 32,132,
+ 20,235,151,226,202,172, 50,254, 57,202, 26,132, 64, 8,129,194,211, 3, 50,181, 26, 60,207,187,165,229, 28,109, 18,100, 50, 72,
+228, 50, 8, 69,229,208, 30,185,202,225,101,203,146,146,146,142, 0, 80, 52,107,214, 76,233, 78,218,156, 13,150,179, 1,114, 54,
+ 87, 60,207,195, 98,177,184,101, 94,140, 70, 35,164,210,255,247, 4,184,125,251,118,185, 6,203, 69,158, 41, 33, 68, 36,132,136,
+ 81, 81, 81,142,223, 6, 5, 5,193,219,219, 27,162, 40, 66, 20, 69, 40, 20, 10, 40,149,202, 98,255,203, 96, 48, 24, 79,140,193,
+114,110, 46,124, 80, 23,175,242, 46, 96, 74, 79, 79, 72,213,106,251,104, 37,234,142, 25,178,247, 57, 25, 61,122,116,185,253, 82,
+236, 70,204, 13, 83, 9, 78,224,145, 18, 20, 9, 27,183,255,255, 23,200,162,133, 19, 36,184, 21, 84, 11,252,165,147,144,136,162,
+ 91, 23,176,146, 17,172, 49, 99,198, 96,201,146, 37,224, 56,206,177, 79, 4, 65, 64,245,234,213, 17, 31, 31,207, 74,231,191, 0,
+ 45, 39, 26,105,255, 94,225,225, 1,153, 70, 3,222,141,190,119, 37,205,144, 84, 46,135, 32,147, 66,144, 22, 54, 11,246,234,213,
+107,111, 78, 78,206,178, 58,117,234, 92, 69,225, 52, 6,156,187,231,144, 32, 8,197,140, 79,105,230, 74, 16, 4, 88,173, 86,183,
+111, 42, 74, 26,157,153, 51,103,222,181,109,191,126,253,220,141, 96, 81, 66, 8,149, 74,165,232,210,165, 11,234,213,171,135, 13,
+ 27, 54, 64, 20, 69,188,254,250,235, 80, 42,149,152, 51,103, 14,172, 86, 43, 62,251,236, 51, 22,193, 98, 48, 24, 79,158,193,122,
+144,228, 92, 56,235,232, 68,236,220, 44,184,181, 85, 45,200, 53,106,200, 53, 26,180,222,176,223,113,215,140,143,103,187, 21,193,
+178, 27,172,204,204,204,114,205,149, 59, 17, 44,135,193,146, 9, 88, 27,150, 13, 42,147, 64, 48, 89,138, 25, 44, 94,144, 32,193,
+ 47, 18,156, 68, 10,193,102,117, 75,147, 82,122, 87,147,224,139, 47,190, 8, 66,136, 99,196, 87,253,250,245,157, 47, 52,236,138,
+243,144, 73,222,189,205,209,161,221,185, 89,240,247,102,213,160,240,208, 64,166, 86,163,237,230, 67,142,104, 35,230, 44,118,169,
+121,249,251,239,112,118,206, 44, 72,100, 50, 60,123,242,150, 35,114,213,170,102,181, 35, 38,181,231,178,219,183,111, 31, 1,192,
+ 13, 28, 56,208,187,126,253,250,110,157,147,246, 78,246,101,153, 43,103,131,101,177, 88,220, 46,243,238,156, 31,246, 40,150, 27,
+229,157, 70, 71, 71,131,227, 56,120,122,122, 66,163,209, 56, 70,208, 42, 20, 10,168, 84, 42, 71,255, 77,119,207, 75, 6,131,193,
+248, 79, 27,172, 6, 13, 26,252,169, 82,169, 34,221, 21,169,200,164,163,206,157,136,237,230,138, 16, 2,133, 70, 3,153, 70, 13,
+185,135,166,204, 40, 87, 89, 23, 26,123, 19, 33,207,243,142,139,205, 79, 63,253, 4,141, 70,131,225,195,135, 87,184, 15,150,253,
+110,158,147,114,216, 46,223, 13, 94, 38, 20, 51, 87,130, 32,128,151, 72,112, 71, 19, 12, 78, 34,129, 96,117, 29, 21, 35,132, 32,
+ 55, 55, 23,130, 32,224,131, 15, 62,112,220,177, 59,155, 43,214,177,253,223, 71,116, 50, 35,197,162,170, 30, 30,142,242,233,252,
+189,171, 62,137,132, 16, 80,171, 5, 18,185, 28,146,162,129,184,246,200,149, 73,237,185,172, 86,173, 90,142,200,149, 74,165,178,
+143, 30,117,169,201,113, 92,177, 50,189,108,217,178, 98,230,170,100, 4,203,221, 50, 47,149, 74,177,100,201,146,114, 77,148, 84,
+ 42,117,123, 4, 37, 80, 56,109,196,222,189,123,113,226,196, 9,140, 30, 61, 26, 74,165, 18,243,230,205,131,213,106,197,140, 25,
+ 51,160, 84, 42, 33,147,201, 88,225, 99, 48, 24,143,191,193,146,201,100,145, 7, 15, 30,116, 76, 50, 90,222,171,201,100,194,128,
+ 1, 3,220,142,132,137, 69,163, 8,185, 18, 35,229,228,158, 26,200,139,154, 94,156,191, 39,110,212,226,246, 59, 96,103,131,245,
+225,135, 31, 66, 16, 4, 44, 89,178, 4, 0, 48, 97,194, 4,183,251, 96,217, 53, 97, 35, 72,164,215,209,240,235,254, 48,173,180,
+ 32,245,224,105, 8,130,128,128, 22, 79, 65,108,214, 31, 58,165, 6,130,205,234,246, 40,194,172,172, 44,196,199,199,131,231,121,
+188,245,214, 91,197,230, 42, 42,145,103,236,216,177,131,245,193,250, 23, 13, 22, 87,212,191,170,180,242, 89,194,124,185,110, 39,
+179, 89, 11,251, 93, 73,255, 63, 90, 48, 39, 39,103,217,237,219,183,143, 2,224,134, 13, 27,230,173, 82,169,240,253,247,223,235,
+ 0,200,214,172, 89,227,210,101,217,203, 77, 89,230,234, 94,154, 8,237,145, 96,231,126, 93,247,107,176,236,102,144, 16, 2,155,
+205, 6,165, 82, 89, 44,114,165, 80, 40, 32,151,203, 89,193, 99, 48, 24, 79,134,193,226, 56, 14, 70,163, 17, 23, 46, 92,112,247,
+ 14,213,237, 73, 71,253, 26, 55,199,224, 91,185, 32,132, 96,123,108, 29, 71,179, 75,171,223,246, 58, 42,236, 91,159, 76,128, 68,
+173,129, 95,108,215, 10, 93, 24,156, 13, 86, 78, 78, 14, 36, 18, 9, 62,254,248, 99,112, 28,135,207, 62,251, 12,161,161,161, 72,
+ 73, 73, 65,187,118,237,220,186,155,231,109, 60,130,159,143,134,234, 69, 47,120, 62,223, 22, 62, 93, 62, 68,146, 73,192, 33,131,
+ 10,109, 13,231, 33,219, 62, 23, 38,209,230,150,193, 34,132,192,106,181, 98,239,222,189,197, 58,178, 3,133, 77,135,246,233, 46,
+ 44, 22, 11,204,102, 51, 62,251,236, 51, 86, 58,255, 5, 42, 63,221, 23, 47, 36,235, 0, 0,127, 58, 53, 91,183, 89,191,223, 81,
+ 62,227,103,190, 5,137, 90, 3,159,166,177,110,105,214,126,125, 34,106,191, 62, 17, 25, 25, 25,250, 78, 13,234,236, 43,144,170,
+126,172, 91,183,110,177,200,149, 66,161, 32, 69,159,137, 59,101,137,227, 56,240, 60,239, 48, 87,118, 51, 85,154,193,114,247, 6,
+192, 98,177, 64, 42,149,186,109,176,220,133,227, 56,188,244,210, 75, 8, 14, 14,118, 68,174, 62,250,232, 35, 40,149, 74,188,243,
+206, 59,176, 88, 44,152, 59,119, 46, 43,124, 12, 6,227,241, 55, 88, 70,163,241,102,167, 78,157, 80,198,186, 80,185, 92, 94, 44,
+ 12,100,159,116,180,100, 83, 33, 33,164, 51,165,116,103,105, 23, 8,231,209, 88,242, 18, 81, 43,169,135, 39, 36,106, 13,184, 82,
+162, 77, 37, 53,237,119,198, 37, 13,150,125,201,205,205,133, 68, 34,193, 55,223,124, 3, 79, 79, 79,199,104,189,242, 52,237, 17,
+ 44,158,231,161, 75,200,199,197, 89, 59, 33, 83, 28, 66,181,174,131, 16, 44, 81, 66,122, 96, 29,244, 54, 75,185, 19,141,150,166,
+ 89,163, 70, 13, 76,157, 58,245,174,233, 25,202,162, 81,163, 70, 46, 53,239, 23,166, 89,186,166, 59,229,147,151,203, 93, 30,119,
+251,122,123,228,170, 64,170,250, 49, 62, 62,222, 30,185,242, 82,169, 84, 88,184,112,161, 14, 0, 55, 99,198, 12, 85,120,120, 56,
+239, 78, 58,121,158,199, 79, 63,253,116, 87,135,246,210,204, 85,105,211,126,148,150, 78,171,213,122,151,193, 26, 48, 96,192, 93,
+163, 7,203,138, 96,149,150, 78,123, 95, 53, 63, 63, 63, 71,228,202,102,179, 57, 70, 15, 90, 44, 22, 88,173,214, 50,155, 90, 89,
+249,100,154, 76,243,201,209,124, 34, 12,214,201,147, 39,187,151,245,131,214,173, 91, 95, 57,120,240, 96,117,155,205,230,252,140,
+ 66,169,193, 96,168,209,167, 79, 31,151,183,202,162, 40, 66, 46,151,131, 82,138,134,239,127, 10, 66,238,238,111,229,221,170, 19,
+136, 32,192,102,179,193, 98,177,184,156, 30, 66,175,215, 59, 46, 38,101,117,112, 47, 40, 40, 40,119,158,159,146, 23, 5,131,193,
+ 80,236, 66, 69,168,136, 91,187,126,189,107, 52, 97, 69, 34, 4, 0,160, 80, 40,138,245,187,114,149, 20, 86, 68, 31, 46,246, 41,
+ 21, 40,165,168, 51,118,114,225,113, 42,106, 46,180,155, 0,175, 38,177, 32, 18, 1, 34, 0,179,217,236,170,124, 18,123,159, 43,
+ 74,233, 15,125,250,244,185, 12,192, 8,128,106, 52, 26,185, 68, 34, 17, 1,100, 1,160,217,217,217, 94, 73, 73, 73,162,193, 96,
+168,226, 42,157,123,247,238,197,181,107,215,208,184,113, 99,199, 35,155,236,205,110,118, 19,227,108,176,220,141, 96,149, 54,167,
+ 86, 89,179,185,187, 11,207,243,240,242,242,114, 76, 98, 42,149, 74,161, 82,169, 0, 0,115,231,206,117,236,115, 6,131,193,120,
+236, 13,150, 11,131,196,151,213,124,232,170,169,208,102,179, 37, 54,107,214,172,162,255,151,234,226,130,152,184,111,223, 62,105,
+121, 15,121, 46,229, 59,151,154, 71,143, 30,149,150,243,251,210,222,167,186,202,123,243,230,205, 75,253,125, 89, 88,173,214, 36,
+ 86, 68, 31, 30, 86,171,181,236,242,249,225,167,101, 29,215, 84, 23,166,229,106,245,234,213,147, 53, 26,205, 31,129,129,129,153,
+ 7, 15, 30,244,107,218,180,169,159,243, 54, 77,155, 54, 13, 46,241, 51, 19,202,153,158,132, 16,146,248,194, 11, 47, 72, 93,148,
+241,146,159, 19, 93,220, 84, 36,158, 59,119, 78, 90,154, 86, 89,175,148,210, 68, 55,118,235,173,238,221,187,115,206,191, 45,171,
+236, 91,173,214,116, 86, 10, 25, 12,198, 19,107,176, 12, 6, 67, 66,167, 78,157, 74,237, 53,171,211,233,110,151,247,219,115,231,
+206, 53,121,208, 25, 72, 76, 76,108,245, 95,208,252, 39,242,206,120,244,143,209,185,115,231,154, 61,104,205,219,183,111,183,250,
+ 47,104, 2,192,249,243,231, 91,178,146,197, 96, 48,152,193,114, 3,119,167, 99, 96, 48, 24, 12, 6,131,193,120, 82,225,216, 46,
+ 96, 48, 24, 12, 6,131,193,120,176, 16, 0,157, 75, 91, 81,145,209, 1,132,144,206, 21,253, 99, 87,250, 76,147,105, 50, 77,166,
+201, 52,153, 38,211,124,252, 52, 93,105, 63, 54,163, 19, 41,165,255,216, 2,160, 51,211,100,154, 76,147,105, 50, 77,166,201, 52,
+153,230,147,182,176, 38, 66, 6,131,193, 96, 48, 24,140, 7,140,192,118,193,191, 3, 33,132,167,148,218, 30,160,164, 15,128,178,
+ 30,232,102, 2,144,125, 47,201, 4, 32, 45, 90,236, 19, 21, 89, 0,152,139, 22,234, 90, 98, 58,151,156,236, 19, 67,109,146,166,
+148, 16,137, 40,226, 84,149, 42,149, 79, 2,221, 77, 0,160, 9,170, 93, 91,163, 86,118, 54,154, 77,145,114,137,236, 66,142,182,
+ 96,135, 33,245,242, 77, 86, 66, 24,140,135, 79,147, 38, 77, 70, 80, 74,103, 22, 86, 81,228,227,227,199,143,127,203,246, 10,131,
+241,128, 13, 86,181,106,213,142,115, 28, 23,102,159, 12,179,188, 57,119,236,175, 54,155, 45,241,226,197,139,110, 13,117, 39,132,
+ 8,193,193,193,207,169,213,234, 14, 60,207,183, 46,250,253, 65,173, 86,251, 87, 74, 74,202, 26, 74,169,245, 94, 50, 20, 21, 21,
+229,105, 48, 24, 6, 16, 66,134, 0, 0,165,244,103,133, 66,241,235,141, 27, 55,242,238,209, 8, 85, 11, 10, 10,250, 89, 34,145,
+240, 9, 9, 9, 29, 0,160,114,229,202,127,153, 76, 38, 91, 90, 90,218, 16, 74,233,181, 10,234,113, 82,169,244,211,216,216,216,
+ 54,132,144,229,148,210, 5, 15,232, 88,202, 57,142, 43,213,152,136,162, 24,113, 15,122, 82, 0, 94,223,124,243,141,223,138, 21,
+ 43, 26, 38, 38, 38,214, 5,128,176,176,176,179,195,134, 13, 59, 57,118,236,216, 76, 0,185, 69, 70,171, 76,146,147,125, 98,210,
+238,220, 24,157,154,118, 97, 0, 0, 4, 5,215,253,149,231, 57,105,104,232,137,195, 42,255, 33,254, 53,107, 85, 29,245,203,247,
+223, 72, 35, 34, 43, 99,247,161, 19, 13,198,190,241,110,140, 34,176,230,108,102,178, 30, 30, 53,106,212, 56,206,113, 92, 88, 69,
+230,146, 43,122,130, 66,226,249,243,231,155,148,165,201,243,124,152,171,185,186, 74,126, 39,138,226,141,115,231,206,149, 58,101,
+ 68,205,154, 53, 15,243, 60, 31,233,110,125,228,156,206,178,166,224,168, 89,179,230,113,158,231,195, 92,105,150,252, 78, 20,197,
+ 27,103,207,158,109,229,174,166,139, 57,244,238, 41,157,238,104,150,151, 78, 0,104,223,190,189, 92,171,213,254,172,209,104,234,
+107,181,218, 17,148,210,169,123,246,236, 9,228, 56, 14,157, 59,119,158,218,164, 73,147,120,133, 66, 49, 95,175,215,159,212,104,
+ 52,131,247,236,217, 99,100,103, 12,131,113,159, 6,139,227,184,176, 19, 39, 78, 4,168,213,106, 20, 25, 21,216,103,111, 23, 69,
+ 17,162, 40,130, 82,234,120,181, 90,173,104,223,190,189, 91,127, 26, 22, 22, 86,183,102,205,154,107,199,140, 25, 83,165, 87,175,
+ 94,178,192,192, 64, 16, 66,112,231,206,157, 26,127,252,241,199,208,121,243,230,125, 24, 22, 22,214, 63, 49, 49,241,172,187,166,
+ 37, 56, 56,184, 19,128, 23,235,214,173,251,236,132, 9, 19,164,173, 91,183,134,205,102,195,238,221,187, 99,231,204,153,243, 77,
+ 72, 72,200, 58, 0,203, 82, 82, 82,118, 81, 74, 69, 55,117, 27, 70, 70, 70,254,186,127,255,254,200,155, 55,111,218,250,246,237,
+187, 28, 0, 14, 29, 58, 84, 95, 20, 69,210,186,117,235, 63, 9, 33, 3, 40,165, 39, 43,176,207,251,140, 29, 59,182,255,152, 49,
+ 99, 42, 13, 31, 62,252,121, 0, 11,138,254,139, 20,237,103, 90,193, 99,232,136, 92, 81, 74,203,155, 94, 59,168, 2,145, 44,117,
+124,124,188, 79,171, 86,173, 94, 75, 75, 75, 27,239,172,155,154,154,138,184,184, 56,243,172, 89,179,190, 62,116,232,208,252,200,
+200,200,108, 0,218,178,132,168, 77,210, 52, 53,237,194,128,182, 45,191,241, 2,128, 53,155, 94, 27,116,236,100,186,199,239, 91,
+ 23, 13,149, 41,164,198, 21,139,191,150, 86,175, 22,129, 61,199,175,226,232,133, 44, 82,183, 77, 79, 33,247,247,229, 93, 0, 44,
+ 98,167,231,195,129,231,249,208,227,199,143, 7,168, 84,170, 82, 31,232, 94,162,223, 5, 8, 33,160,148, 34, 54, 54,182, 60,205,
+176, 19, 39, 78, 4, 40, 20, 10, 71,221, 81,178,206,176,215, 43,142,178, 66, 41,218,182,109,107, 46,167, 78, 10,255,251,239,191,
+ 3, 84, 42,149, 67,167,180,244,149, 52, 26,109,219,182, 45, 55,157,113,113,113,142,116,186,163, 73, 41, 69,235,214,173,109,174,
+242,110,127, 98,133,171,124,219, 53, 91,182,108, 73, 43,162,233,102, 58,203,189, 1,210,106,181, 63,175, 89,179,230,153,192,192,
+ 64,244,233,211,103,123,157, 58,117,100, 42,149, 10, 91,183,110, 69,229,202,149,253, 61, 60, 60,182,124,242,201, 39,152, 61,123,
+118,149, 29, 59,118,172, 2,240, 12, 59, 99, 24,140,251, 55, 88, 80,171,213, 88,189,122,181,227,241, 48,246,199,100,148,246,190,
+ 74,149, 42,110,253, 97, 80, 80, 80,147,136,136,136,189, 27, 54,108, 80, 6, 4, 4, 56,190, 55,153, 76,240,244,244,196,139, 47,
+190, 40,235,210,165, 75,245, 33, 67,134, 28, 9, 10, 10,106,119,231,206,157,227,229,233, 5, 7, 7, 63, 27, 19, 19,243,237,248,
+241,227, 3,123,247,238, 13, 31, 31,159, 98,235,123,246,236,137, 30, 61,122, 72,111,220,184, 49,104,205,154, 53,131,150, 47, 95,
+126, 39, 56, 56,120,108, 74, 74,202,186,114, 29,134, 90,221,185, 65,131, 6,223,239,222,189, 59,204,219,219, 27, 33, 33, 33,220,
+ 7, 31,124, 80,183,106,213,170,202,160,160, 32, 46, 37, 37, 5,235,214,173,171, 58,108,216,176,141, 10,133, 98,132,193, 96,216,
+229,134, 97,147,249,250,250, 78, 28, 57,114,164, 95, 94, 94,158,245,196,137, 19, 87,237,223,203,229,242,169, 45, 90,180,104, 68,
+ 8, 89, 77, 41, 93,118, 47,145, 43, 74,105, 30,254,223,148,103,199, 98, 95,239,102, 36, 75,118,234,212, 41,223,150, 45, 91,174,
+ 51, 26,141,141, 70,143, 30,125,123,214,172, 89, 74, 79, 79, 79, 79, 0, 36, 47, 47, 47,123,250,244,233,166, 57,115,230, 76,174,
+ 93,187,118,167,195,135, 15, 63,219,160, 65, 3, 75,145,121,187,219, 96, 17,226, 72, 79, 66, 82, 58,246, 30, 18,101, 83,223,153,
+ 16,246,249,204,200, 91,127,159, 79, 16, 5,165, 39, 54,239, 59,135,212,204, 2,252,121,248, 60,130,252, 60,136, 84, 46,137,241,
+ 14,139,105,151,155,116,126,223, 61, 24, 78,198, 61,160, 82,169,176,121,243,230,187, 30, 49, 85,218,227,167, 4, 65,128,183,183,
+119,185, 79, 35, 32,132, 64,161, 80, 96,199,142, 29,197, 30, 47, 85,218,123,251,171,151,151, 23, 40,165,229, 62,226, 64,161, 80,
+224,224,193,131,224, 56,238,174,223,151, 76,179, 32, 8, 80,171,213, 32,132,112,174, 52,247,237,219,231, 82,203,254,170,209,104,
+ 0,160,220,231, 15,201,229,114, 28, 56,112,160,204, 60,151,124,175, 41,122,222,165, 43,205,131, 7, 15, 22,123, 68, 87,201, 71,
+119, 57,127, 46,186, 57, 46, 87, 84,169, 84,214, 15, 12, 12,196,177, 99,199, 48,109,218, 52, 89, 76, 76, 12,174, 94,189, 10, 66,
+ 8,134, 15, 31,142, 58,117,234, 32, 37, 37, 5,117,234,212,193,129, 3, 7, 26,178, 51,133,193,120, 0, 6,203,142, 59,230,202,
+254, 28,177,146, 21, 68,201,161,150, 17, 17, 17,114,141, 70,243,219,230,205,155,149,126,126,255,127, 90,136,209,104, 68,126,126,
+ 62, 10, 10, 10,144,159,159, 15, 15, 15, 15,204,159, 63, 95, 57,120,240,224,223, 34, 34, 34,106,220,188,121,211, 88,150, 38, 33,
+228,235, 83,167, 78, 5, 90,173, 86,200,100,178, 50,205, 98,181,106,213, 48,118,236, 88,196,198,198, 6, 13, 28, 56,240,107, 0,
+235,202,210, 44, 50,110,223, 29, 58,116, 40, 76, 42,149,226,202,149, 43, 72, 76, 76,196,168, 81,163,194, 69, 81, 68, 66, 66, 2,
+174, 94,189,138,164,164, 36, 44, 89,178, 36,108,240,224,193,243, 1, 84, 47, 47,239, 69,188,242,214, 91,111,213,240,245,245,229,
+190,248,226,139,220,130,130,130,197, 69,223,191, 51,119,238,220,193,109,219,182,173,244,242,203, 47,131, 16,242, 11,165,244, 46,
+195, 82, 66,179,180,200,149, 13,192,197, 18, 63,139, 46, 17,217, 10, 66,225,179,240,114, 74,209, 36, 0,188,186,118,237,250,150,
+209,104,108,116,224,192,129,107,173, 91,183, 14, 7,144, 2, 32, 29, 0,188,188,188,212, 95,127,253,117, 96,207,158, 61, 47,119,
+236,216,177, 81,215,174, 93,223, 74, 79, 79,159, 85,180,158,150,212, 20, 69,156, 10, 10,174,251,235,190,195, 99, 7,236, 57,104,
+146, 78,120,227,195,219, 85, 42, 71,228,158,186,146,101, 59,127, 35, 29,249,122, 43,158,233, 88, 15, 0,208,162,110, 21,124,187,
+250, 0, 94,127,243, 61,201,186, 95,151,247,187, 70,161, 6,240, 71, 57,251,243,190, 96,154,255, 55, 67,162, 40, 66, 34,145,224,
+169,167,158, 2, 33,228,174,103,109, 74, 36, 18, 28, 62,124, 24, 29, 59,118,132, 68, 34,193, 75, 47,189,228, 50,157,162, 40, 66,
+ 16, 4,116,237,218, 21, 86,171,245, 46,189,146,102,193,254,140,206,242, 52, 41,165, 16, 4, 1, 28,199,149,106,126, 74, 46,165,
+153,150,210,242,238, 74,203,121, 93,105,143,251, 41,169,105, 79,167, 59,230,202,174,233,110, 58, 5, 65, 64,171, 86,173,112,242,
+228,201,114,205, 22,199,113, 46,235,100,173, 86,251, 98,159, 62,125,182,143, 30, 61, 90, 1, 0,153,153,153,142, 7,209,243, 60,
+143, 75,151, 46,193,100, 50, 97,229,202,149, 48, 26,141,163,217,121,196, 52,255, 73,205, 39,198, 96,217, 43, 9,119, 13,150, 59,
+207,214,163,148,142,121,231,157,119, 2,203, 51, 87, 5, 5, 5, 72, 78, 78, 70,120,120, 56,158,123,238,185,192,229,203,151,143,
+ 1,240,101, 57,178, 82,158,231,113,236,216, 49,164,165,165,161, 94,189,122,136,140,140, 44,182,193,245,235,215,177,101,203, 22,
+228,228,228,160,113,227,198, 64, 97,255,162, 82,105,208,160,193,180,232,232,232,174,237,219,183,151, 75, 36, 18,156, 58,117, 10,
+141, 26, 53,194,234,213,171, 81,165, 74, 21,168, 84, 42, 92,190,124, 25,245,234,213,195,222,189,123, 81,169, 82, 37,196,196,196,
+200, 27, 55,110,188, 63, 43, 43,235,175,155, 55,111, 78, 43, 99,127, 74, 67, 67, 67,223, 29, 57,114,164, 44, 57, 57, 89,252,233,
+167,159, 14, 81, 74, 15, 17, 66, 70,189,247,222,123,207,119,235,214,173,210,137, 19, 39,242,254,254,251,239,191, 75, 51, 87,110,
+ 70,174,172, 37, 47, 70, 54,155,205,168,215,235, 77, 70,163,209,194,113,220, 77, 66,136,201,102,179,213, 40,235,102,254,197, 23,
+ 95,172,154,145,145,241,250,155,111,190, 25, 95,100,174, 46,161,176, 99, 59, 0,192,106,181, 26, 11, 10, 10,242, 90,182,108, 25,
+ 62,120,240,224,107,171, 86,173,122,253,197, 23, 95, 92,179,108,217,178, 2, 0,250,146,130, 85,170, 84, 62,201,243,156, 84,155,
+239,123, 99,237,154,165,227,183,108, 26, 83, 57, 33, 33,169,186,159,127, 37,173, 84, 83, 41,121,205,207, 63, 30, 7, 96, 74, 78,
+207,195,153,235,119, 32,145,240,184,144,144,139,182,221,159,147, 92,187, 50,179,141,221, 96, 49,254, 81,168,253,225,208,123,246,
+236, 41, 55,130,117,248,240, 97, 72, 36, 18, 40,149, 74,172, 94,189,186, 92, 81,187, 33,176, 71,135, 92,153, 24, 87, 15, 63,183,
+155, 12,251, 3,216, 75, 46,223,125,247, 29,222,124,243,205, 98,255, 81,164, 73,220, 73,103,105,233, 11,143,136, 64, 90,106,106,
+177,239,220,120, 72, 59,108, 54, 27, 36, 18, 9,150, 44, 89,130,158, 61,123,226,247,223,127, 47,247,181,200,216, 82,119,210,217,
+170, 85, 43,152,205,102, 71,154, 47, 93,186, 84,170,238,130, 5,229,119,239,108,210,164,201, 8, 66,200,204,154, 53,107,202, 59,
+116,232,128,125,251,246, 97,230,204,153,162,213,106,205, 0,128, 86,173, 90, 85, 26, 63,126, 60,137,139,139,131, 70,163, 65,122,
+122,250,178, 38, 77,154,204, 96, 29,223, 25,140, 7, 16,193,178, 87,186,174,204,149,253, 78,209,149,201,210,104, 52, 61,186,119,
+239,238, 48, 55, 6,131,193, 97,172,236,230,202,254,249,242,229,203,136,137,137,145,106, 52,154, 30, 46, 12, 86, 97, 70, 4, 1,
+ 33, 33, 33,200,200,200,192,217,179,103, 17, 30, 30, 14,139,197,130,109,219,182, 33, 55, 55, 23, 18,137, 4, 82,169, 20,102,115,
+185, 93, 18, 16, 29, 29,253,212,138, 21, 43,154, 44, 95,190, 60,219,126, 7,247,243,207, 63,131, 82,138, 74,149, 42, 65,167,211,
+ 33, 53, 53, 21,127,253,245, 23,172, 86, 43, 52, 26, 13, 66, 67, 67, 21, 99,198,140,105, 51,125,250,116, 9,128,105,101, 72, 55,
+239,215,175,159,167,167,167, 39,222,120,227, 13,106, 54,155,191, 36,132,180,120,246,217,103,223, 29, 59,118,172,239,205,155, 55,
+ 77,175,188,242,202,113,179,217,252,117,209,197, 68, 66, 41,181,184, 48,172,101, 70,174, 44, 22,139,125,159,198, 23, 20, 20,192,
+223,223, 63,220, 69, 31, 45, 0,144, 30, 60,120,176, 21, 0,126,198,140, 25, 10, 20, 62,192,218,145, 6,147,201,132,130,130, 2,
+104,181, 90, 75,110,110,110,218,196,137, 19,173,171, 86,173,226,139,126,115,161, 52,131, 5,116, 55,213,169,163,150, 81,202,191,
+183,104,209, 34, 77,183,110,221, 56,141, 70,131,252,252,124,207, 63,183,110,213,116,234,208, 38,106,214,167,159,111,247, 12,171,
+151,122,240,212, 13, 36,221,201,133,201, 98, 65, 84,176, 87, 97,252,139,241,143, 83,212,193,218, 17,193,114, 54, 19,251,246,237,
+ 67,247,238,221, 29,231,186, 84, 42,117,108,231,142,166, 32, 8,232,222,189,251, 93, 17,157, 61,123,246,148, 26,109,114, 85,135,
+ 56,155,161,146,166,168, 52,227,197,113, 28, 92,181, 50,219,163,119,165,153, 44,231, 40,126, 9,211,230,234,102, 18,130, 32, 96,
+236,216,177,144, 72, 36,152, 52,105, 18, 4, 65, 64,195,134, 13, 33, 8, 2, 90,182,108, 9,137, 68,130,142, 29, 59,150, 25,105,
+ 43,205, 92, 10,130,128, 35, 71,142,160, 81,163, 70,142, 52, 53,108,216, 16, 77,155, 54,133, 32, 8,136,141,141,133, 68, 34, 65,
+215,174, 93, 93,106,218, 59,180,107, 52, 26, 92,190,124, 25, 60,207,131, 16,146, 25, 23, 23, 23, 8, 0,211,166, 77,203,208,235,
+245,126, 6,131, 1,157, 58,117, 66,155, 54,109, 42,253,252,243,207, 31, 0, 96, 6,139,193,184,223, 8,150,189,210,117,215, 96,
+185,194, 96, 48, 52,176, 71,175, 74, 51, 87,206,175, 38,147, 9, 85,171, 86,133,193, 96,104, 80,209,139, 69,112,112, 48,204,102,
+ 51,150, 46, 93, 10,169, 84, 10,169,244,255,190,194,100, 42, 63, 56,116,254,252,249,248, 35, 71,142, 52,106,220,184,177,207,250,
+245,235,211,187,116,233, 82,169, 91,183,110, 80, 42,149,208,235,245,176, 88, 44,104,209,162, 5,162,163,163,145,150,150,134, 63,
+255,252, 51,163, 70,141, 26,254, 71,143, 30, 21,239,220,185,115,171, 28,233, 78,157, 58,117, 2, 33, 4,127,254,249,103, 38,165,
+ 52, 78,169, 84,174,159, 53,107,150,183,201,100, 18,159,127,254,249,132,172,172,172,137, 0, 44,114,185,252,203,110,221,186, 53,
+231,121,126,181,205,102,171,112,101, 86,114,223,106,181, 90, 40, 20, 10,119,166,132,144,100,101,101,213, 5, 0,181, 90,237, 11,
+192, 49, 66, 82,175,215, 23, 51,193, 38,147,201,224,235,235,171, 6,128,162,223, 72,202, 56, 30,149, 84, 42,213,218, 91,183,110,
+120, 56, 71, 46,189,189,189, 49,100,240, 96,174,117,171, 86,178,250, 13, 26,116,125,127,246,242,213, 33,126,158,166,168, 16, 63,
+ 88,108, 22,236,220,190, 77,164,162,101, 59, 59, 69, 31, 14,118,147, 81, 50,130, 37,145, 72,176,119,239,222,187,190,147, 74,165,
+216,188,121,179, 91,102,200,110,166,202,106, 34, 43, 97,134,136, 59, 81,117,158,231,177,100,201, 18,136,162,136,241,227,199, 23,
+107, 54,116,214,183,155, 29, 87,154,246,223, 68,127, 40, 2, 48, 33,241, 43,185,227,247, 37,211, 91,164, 73,220, 49, 67,223,124,
+243,141, 91, 17,172,167,159,126,218, 45,211,230,156, 47,123,186, 78,158, 60, 89,170,238,162, 69,139, 92,246,105, 19, 69, 17,127,
+252,241,135,195,156,218,249,224,131, 15, 70,122,122,122,106,246,237,219,135, 59,119,238, 64,171,213,162,160,160, 0, 62, 62, 62,
+222,157, 59,119, 62,117,231,206,157,155,231,207,159,103, 29,222, 25,140,123,141, 96,217, 43, 93,119,154, 9, 75,107,239, 47, 69,
+ 79, 32,132,192, 96, 48,148,106,172,156, 77,129,217,108, 70,102,102, 38, 68, 81,188,231,185,186, 74,171, 88, 93, 25,172,179,103,
+207, 14, 31, 49, 98, 68,178,151,151, 87,253,204,204,204, 20,185, 92, 30,187,111,223,190,202,102,179, 25,158,158,158,240,244,244,
+196,150, 45, 91,224,237,237,141, 55,223,124,243,182, 94,175, 63,164, 86,171, 3,245,122,253,233, 59,119,238,188, 95,166,115,145,
+ 72, 58,181,109,219, 22,113,113,113,200,201,201,217, 77, 8,169,255,242,203, 47,119,169, 92,185, 50,153, 57,115,166,225,218,181,
+107,223, 1, 72, 87,171,213, 75, 87,172, 88,209,174,113,227,198,154, 97,195,134,129, 16,242, 61,165,212,224,110,158,181, 90,109,
+ 49, 99,149,151,151,135,252,252,124,168,213,106,171,155,251, 76,130,194,190, 84,246,254, 84,142, 99, 83, 20,189,178, 31, 31, 42,
+ 8, 2, 45,220,132, 74,202,210, 83,171,213, 51,150, 47, 95, 94,172,207,157, 61, 58,154,154,154, 10, 79, 79, 79,124,240,254,251,
+210,143,222,126,185, 17,175, 9, 60,204,113, 4, 38, 51,205,161,162,105,155, 54,117,224,126,118,138, 62,156, 8,150,221, 16,244,
+238,221,251,174,102, 65,169, 84,138, 29, 59,118,160,111,223,190,142, 27,150,162,166,118,183, 12, 65,175, 94,189, 28,145,160,109,
+219,182,149,218,188,103,143, 64,185, 99, 4,237,219,142, 27, 55, 14,130, 32,224,219,111,191,197, 91,111,189, 5,142,227,240,213,
+ 87, 95,129,227, 56, 76,157, 58,181, 66,245,132,189, 46,187,249,121,225,107,216, 91,121,200, 92, 16, 8, 0,240,240,244,180,111,
+ 88, 33, 77, 65, 16, 28,145,171, 6, 13, 26, 64, 34,145,160,101,203,150, 16, 4,193, 17,185,234,209,163,135,243,180, 10,212, 29,
+ 77, 65, 16,112,229,202, 21, 71,154, 91,182,108, 89, 44,114, 37, 8,130, 91,134,141, 16,242, 81,199,142, 29,103,134,133,133, 5,
+140, 30, 61,154,240, 60,143, 38, 77,154,248, 79,157, 58, 53, 87, 34,145, 40, 39, 76,152, 80,218,121, 45, 1, 80,191,118,237,218,
+106,118,230, 48, 24,247, 17,193,170,136,193,114,167,114, 84,169, 84,103, 50, 50, 50, 90,202,229,242, 98,230,170, 52,163,197,243,
+ 60,210,210,210,160, 82,169,206, 60,200, 12,187,106, 34, 44, 50, 51,111, 59,237,135,166,207, 61,247,220,170,213,171, 87, 71,237,
+220,185, 19, 71,143, 30, 69,165, 74,149, 48,107,214,172, 27, 55,111,222, 28, 76, 41,253,219,157,255,173, 90,181,106, 29,181, 90,
+141, 67,135, 14, 1,192,126, 0, 47,190,254,250,235,196,106,181, 98,254,252,249, 58, 0, 59,188,188,188,214,253,246,219,111, 13,
+234,213,171, 39,219,185,115,103,254,209,163, 71,247,184,105,174,108,162, 40,222,101,172,156,247,169,135,135,135, 59, 17, 44,139,
+151,151,215,217,188,188,188,231,244,122,125,158, 92, 46,247,200,203,203, 51, 58, 27, 43,187,190, 32, 8,146, 43, 87,174, 36, 3,
+136,242,242,242, 58, 11,167,166,196, 98, 5, 76, 16, 58,117,234,212, 73, 40,121, 12, 82, 83, 83,113,231,206, 29,152,205,102, 52,
+110,220,152,240,196,194,103,221, 62, 61,146,157,146, 15, 31,142,227,168,253, 92,183,143,250, 43,109,228,224,182,109,219, 28,159,
+ 57,142,195,159,127,254,233,150,105,219,177, 99, 71,185, 29,209, 75,116, 72,119, 25, 10,183,111, 63,127,254,252,194,199, 81, 20,
+ 69,174, 56,142,195,148, 41, 83, 32,151,203, 49,115,230, 76, 76,153, 50,165, 88, 84,198, 85, 4, 75, 16, 4, 68, 76,210, 57,223,
+ 20, 21,158, 20, 69,253,157, 8, 33,206, 38,203,173, 72,155,171, 14,238,238, 68,254, 75, 75,167, 66,161, 40,179,131,123, 9,205,
+ 50,255,224,248,241,227, 63, 52,106,212,232, 90,165, 74,149,118,180,108,217, 82,126,252,248,113,140, 25, 51,134, 24,141, 70,207,
+157, 59,119, 58,254,183, 52,163,167,213,106,149,236,204, 97, 48,238, 35,130, 85,145, 78,238,238,244, 75,208,235,245,187,246,236,
+217,211,180, 79,159, 62, 66,121,205,131, 90,173, 22,129,129,129,184,126,253,186, 85,175,215,187,156,254,192,102,115,127, 66,116,
+ 87, 6,171,148,125,240,119, 76, 76,140,213, 98,177,160,122,245,234, 8, 13, 13,133,193, 96,192,156, 57,115,172,238,154, 43, 66,
+136,180, 73,147, 38, 60, 0,100,103,103, 3, 64, 38,128, 26, 53,106,212, 64, 92, 92, 28,178,179,179, 55, 2,232,252,209, 71, 31,
+ 53,108,222,188,185,116,245,234,213,186,209,163, 71,111,180, 88, 44, 51,221,209, 23, 69,209,100,181, 90, 35, 57,142, 51,231,228,
+228, 36, 57,239,207,192,192, 64, 95,181, 90, 77, 82, 83, 83, 45,238, 24,172,250,245,235, 31,187,125,251, 54,102,204,152,145, 62,
+107,214,172, 26,249,249,249,217,185,185,185, 86,103,147,101, 48, 24, 56,127,127,127,249,130, 5, 11,148, 0, 80,191,126,253, 99,
+101, 25, 44,173, 86, 91, 89,165, 82, 57, 62, 27,141, 70,220,185,115, 7,119,238,220, 65,106,106, 42,242,243,243, 17, 21, 21, 5,
+157, 78, 23,206, 78,199,127, 15,231,102, 50,231,243,219,249, 2, 94,145,115,221, 89,179,119,239,222,142,190, 91,246,136,152,125,
+ 89,187,118,109,177,142,227,174,154,222,236, 6,107,254,252,249, 24, 55,110, 28, 20, 10, 5,190,254,250,235, 98, 77,132,165,152,
+ 2,226, 78, 58, 35, 39,235,113,103,158, 47, 36, 18, 9,252, 70,167, 22,107,138, 43,101, 52,158, 91, 70,112,214,172, 89, 15,172,
+137,208,174, 25, 30, 94,120,170, 44, 89,178, 4,207, 61,247, 28,246,239,223,127,207, 77,132,145,145,145, 43,230,206,157, 43, 63,
+127,254, 60,242,242,242,144,158,158, 14,163,209,136,196,196, 68,199,190, 41, 13,157, 78,167, 96,103, 13,131,113, 31, 6,203,185,
+243,167, 43,131, 85,212, 65,210,149, 17,248,250,195, 15, 63,124,189, 77,155, 54,190, 30, 30, 30, 72, 78, 78,190,203, 92, 21, 20,
+ 20, 64,163,209,192,100, 50, 97,207,158, 61,121,162, 40,126,237,202, 20, 88, 44, 22, 4, 4, 4, 32, 35, 35, 3, 98, 25,253,162,
+ 57,142,131, 82,169,132, 86,171, 69, 89,102,160,188, 10,216,108, 54,195, 98,177,192, 98,177, 84,216,164, 1, 80,218, 39,108, 45,
+250,127,109, 72, 72, 72, 85,133, 66,129,248,248,120, 0,184, 2,160, 67,183,110,221, 36,153,153,153,244,149, 87, 94, 57, 76, 41,
+ 29,235, 98, 54,123,211,190,125,251, 34, 1, 64,169, 84, 94, 6,128,196,196, 68, 75, 78, 78, 78,177,200,160, 74,165,162,125,251,
+246, 13,166,148, 98,223,190,125,145, 82,169,148,162,140, 57,171, 0, 24, 54,110,220,120,222,203,203,107,213,167,159,126, 58,184,
+103,207,158,231,234,214,173, 27,169,213,106,211,244,122,189,222, 96, 48, 80,158,231,165, 62, 62, 62,138,237,219,183, 95, 59,124,
+248,112,103, 79, 79,207, 85, 27, 55,110, 60, 15,160,212, 72,155, 90,173, 78,212,233,116, 17, 26,141, 6,122,189,190,152,185,186,
+115,231, 14, 40,165,184,113,227, 6, 84, 42,213,109,118, 58,254, 59, 56, 71, 92, 74, 70, 90, 74,126,231,174,185,114, 54, 67,219,
+183,111, 47,119, 14, 44,119, 53,157,205,208, 91,111,189,133,121,243,230,221, 21,193,154, 57,179,240,158,228,253,247,223,119, 25,
+189,114, 70, 34,145,224,206, 60, 95, 4,141,203, 42,102,102, 0,128,216,211, 87,193, 41,217, 4, 65,192,140, 25, 51,238,234,124,
+238,220,132,231,174,177,114, 78,103, 90, 90, 26, 4, 65,128,175,175, 47,134, 12, 25,130,174, 93,187, 58,154, 26, 43,170,155,144,
+144,112,114,246,236,217, 85, 66, 67, 67,177,122,245,106,147, 90,173,150,117,236,216,145,230,228,228,144,242, 34, 88,204, 96, 49,
+ 24,174,225,220,169, 32,221,105, 38, 44,173,146, 36,132,116,118,254,124,243,230,205, 92,173, 86, 59,100,208,160, 65,122,163,209,
+136,170, 85,171, 66, 46,151,195, 98,177,192,100, 50, 65, 42,149, 34, 56, 56, 24,148, 82,172, 91,183, 78,175,211,233,134,220,188,
+121, 51,183, 60, 77, 66,200,123, 79, 61,245,148, 33, 62, 62, 30, 85,170, 84,129,135,135,199, 93,143,141,240,244,244,132,183,183,
+ 55, 46, 94,188,136,165, 75,151,234, 9, 33,239,149,167, 89,154,209,180, 27, 43,187,209,114, 53, 50,169,132,166,218, 30,197,209,
+233,116, 0, 96,173, 82,165, 74, 32, 0,220,184,113, 3, 0,110, 69, 69, 69,181,171, 86,173, 26,217,191,127, 63, 40,165, 59, 75,
+ 51, 87, 37, 52,179, 98, 99, 99,111,197,198,198,154, 76, 38,147,212,100, 50, 73,115,115,115,205,254,254,254, 1,254,254,254,254,
+129,129,129,190, 1, 1, 1,222,201,201,201, 86,171,213, 42,181,217,108,210,216,216, 88, 83,243,230,205,111,195,105, 54,247, 18,
+154, 34,128,188, 69,139, 22, 77,151, 72, 36,183, 90,181,106, 21, 51,121,242,228,155, 22,139,197, 24, 26, 26,234, 19, 20, 20,164,
+212,233,116,249,159,124,242, 73,218,188,121,243, 58, 75, 36,146, 91,139, 22, 45,154, 14, 32,175,232,183,119,105, 90,173,214, 93,
+ 59,119,238,180, 90, 44, 22, 36, 37, 37, 33, 57, 57, 25, 41, 41, 41,142, 87,111,111,111, 28, 59,118,204,102, 54,155,119, 86, 96,
+127, 62, 40, 99,193, 52,241,255,190, 63,229, 25, 43,119,186, 1,148, 76,167,221, 12, 61,247,220,115, 24, 56,112, 32, 6, 13, 26,
+132, 33, 67,134, 96,216,176, 97, 21,153,154,161,228,249,238,248,237,228,201,147,241,254,251,239,227,195, 15, 63,132, 92, 46,199,
+ 7, 31,124,128,105,211,166, 97,218,180,105, 37,205, 21, 41, 39,239,197,234,185,220, 37,161,208, 45,139,128,105,101,181,194, 38,
+ 66, 74,255,191,184,191, 63, 29,102,232,131, 15, 62,192,225,195,135, 49,113,226, 68,236,222,189, 27, 99,198,140,193,150, 45, 91,
+ 48,114,228, 72,252,241,199, 31,142,215,162,155, 64,234, 78, 58, 5, 65, 64,187,118,237,160,211,233, 28, 6,118,212,168, 81,197,
+244, 70,142, 28,233,214,254, 84, 42,149,131, 55,110,220,184,126,233,210,165, 55,178,178,178,186,222,188,121,243,182, 86,171, 37,
+185,185,185,142, 99, 88,114, 41,138, 68,203,217,121,196, 52,153,133,186,143, 8,150,213,106, 69,229,202,149,139, 61,219,138,227,
+184, 98, 75, 69,250, 17, 0, 64, 74, 74,202,246,224,224,224,103,159,121,230,153,149, 47,190,248,162, 71,116,116,180, 36, 34, 34,
+ 2, 58,157, 14,183,110,221,194,205,155, 55,173,187,119,239,206,211,233,116, 67, 83, 82, 82, 92,142, 34, 75, 74, 74, 90, 30, 24,
+ 24,184,109,232,208,161, 83, 27, 54,108, 56,106,252,248,241,124, 84, 84, 20,114,115,115,225,227,227,131,128,128, 0,196,199,199,
+ 99,239,222,189,182,156,156,156,133, 54,155,237,163,212,212,212,244,138,236, 36,171,213,202,155,205,102, 12, 26, 52, 8,162, 40,
+ 98,206,156, 57,176, 90,173,124, 5, 36,204,102,179,153, 2, 32, 25, 25, 25, 0,160,179, 27,174,171, 87,175, 2,192,237,136,136,
+ 8, 13, 0,236,220,185,147, 0, 56,228,238, 13,189,115, 36, 43, 58, 58, 58,222, 94, 41, 58, 95,228,236,235,139, 34, 87,174,110,
+195, 13, 3, 6, 12, 72,211,233,116,221,222,122,235,173,169,243,231,207, 31, 60,127,254,252,187, 54,242,244,244, 92,245,213, 87,
+ 95,125, 52, 96,192,128,180,178,162, 87, 69, 17,187,247, 95,120,225,133, 1,103,206,156,241, 80, 40, 20,208,106,181,200,204,204,
+132,217,108, 70, 84, 84, 20,210,210,210,176,124,249,242,124,189, 94, 63,141,157,142,255, 46,101, 25, 43,119,251, 88,150, 21,197,
+217,188,121,115,169,115, 76, 85, 84,179,164,201,112,119,110, 42, 55,110,134, 74,157,250,161, 34,245, 90, 89,154, 95,124,241,133,
+ 99,178,213,210, 34, 87, 21,137, 96,217, 53,125,125,125, 1, 20,206,190, 47,138, 34,158,126,250,233,123,214, 45,122,182,224,179,
+246,207, 77,154, 52,249,104,245,234,213, 51, 41,165,126, 0, 4,231,125,192, 30,170,192, 96, 60, 32,131,101,179,217, 18,219,181,
+107, 87,172, 98, 43,239,161,170, 69, 70, 36,209, 77,147,181, 45, 42, 42, 42,106,201,146, 37,111,168,213,234,206, 6,131,161, 30,
+ 0, 40, 20,138, 51, 90,173,118, 39,199,113,115, 83, 82, 82,220,126, 56,115,145, 97, 26, 19, 22, 22, 54,103,216,176, 97, 51, 91,
+181,106,213,255,149, 87, 94, 33,130, 32, 96,205,154, 53, 52, 49, 49,113, 45,199,113,239, 37, 39, 39, 95,191,151,157,164, 82,169,
+ 46,175, 93,187,182,234,230,205,155, 97,177, 88,176, 96,193, 2, 40, 20,138,203,238,254,158, 82,154, 46, 8,194,202, 86,173, 90,
+ 13, 62,124,248,240, 42, 74,233, 89,185, 92,254,115,108,108,236,144, 67,135, 14,253, 74, 41,189, 32, 8,194,207, 45, 91,182, 28,
+114,236,216,177,117,148,210,211, 21, 72, 94, 86,108,108,108, 54,128, 32,171,181,244, 22,197,216,216, 88, 19,128, 59,110,152, 43,
+ 59,121, 35, 70,140, 48,143, 24, 49,226,237, 1, 3, 6, 44,253,251,239,191,155,229,228,228,212, 3, 0,111,111,239, 51, 77,155,
+ 54, 61,246,235,175,191, 94, 42,138, 92, 25, 92,229,157, 16,210,183, 94,189,122,235, 62,254,248, 99,117, 76, 76,140, 80,189,122,
+117,220,188,121, 19,103,207,158,181,254,240,195, 15, 5,122,189,190, 55,165, 52,155,157,142,255, 14,246, 38, 66,111,111,239, 98,
+ 55, 79,246,161,251, 21,105,194, 43, 77,179,228,141, 25,207,243,229,105,186,116, 53, 26,141,198, 49,106,217,157,174, 9,229, 61,
+123,212,158, 78,187,166,125,113,195, 92, 81, 87,154, 69,143,233,169,136, 38,220,209,180, 88, 44, 14, 93, 55, 52, 43,244,167,199,
+143, 31,255, 1,192, 15,213,171, 87,191, 10,160, 26, 51, 85, 12,198, 63, 96,176, 46, 94,188,216,228,159,252,227, 27, 55,110,228,
+ 1,248,168,104,121, 32, 36, 38, 38, 94, 7, 48, 32, 40, 40,232,203, 67,135, 14,125, 0, 0,162, 40,206,112,245, 60, 67, 87,156,
+ 62,125,186,175, 68, 34,153,191,108,217,178, 86,148, 82,120,121,121, 29,186,122,245,234,107, 21,140,130,141, 34,132,140,183,143,
+ 10, 52, 26,141,163, 8, 33, 19, 40,165, 90,167,245,142,207, 21,132, 2, 48, 82, 74, 67,202, 88,111,172,128,185,114, 68,178, 0,
+152,126,253,245,215, 2, 0,167,240,255,121,174, 44, 69,139, 1, 78,205,130, 46, 46,112,127, 17, 66,170,127,240,193, 7,179,120,
+158,239,164,213,106, 67,213,106,117,130,213,106,221,165,211,233,222,163,148,102,178, 83,241,223,195,106,181, 38,181,107,215, 78,
+ 40,237,198,169,188, 11,120,121, 55, 84, 54,155, 45, 49, 54, 54, 22,247,160,153, 84, 78, 82,111,181,108,217,146,115, 87,203,142,
+197, 98, 73, 43, 47,157, 45, 91,182, 44,243,166,241, 94,243,222,178,101,203, 10,165,177,168,174, 74,122,208,154, 46,246,103,153,
+232,245,250,236, 74,149, 42, 21, 24, 12, 6,137,209,104,148,148,140,216, 43,149,202,116,118,230, 48, 24,247,104,176,254,203, 20,
+ 25,170, 94, 15, 74,175,168, 63,212,171, 15, 64,199, 80,226,179,182,188,207, 21,228,159,136, 0,137, 0,116, 15,104, 31,102, 0,
+120,133,157,114,143, 30,103,207,158,109,254,160, 53,207,159, 63,223,228, 31, 72,103,203, 7,173,121,238,220,185, 38, 79,170,102,
+121, 36, 37, 37, 53,103,103, 6,131,113,127,112,108, 23, 48, 24, 12, 6,131,193, 96, 60, 88, 8,128, 82, 71, 2, 84,228, 73,217,
+247, 50,154,192,149, 62,211,100,154, 76,147,105, 50, 77,166,201, 52, 31, 63, 77, 87,218, 21,241, 31,143, 52,165, 13,195,125, 80,
+ 11,128,206, 76,147,105, 50, 77,166,201, 52,153, 38,211,100,154, 79,218,194,154, 8, 25, 12, 6,131,193, 96, 48, 30, 48,204, 96,
+ 49, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24,140, 39, 8, 66, 8, 9, 11, 11,
+107, 23, 18, 18,210,242, 73,221, 7, 2, 43, 6, 12, 6,131,193, 96, 48, 30, 4, 85,170, 84,241,182,217,108, 47,134,132,132,188,
+ 86,181,106,213,170, 0, 16, 26, 26,122,150, 82, 58, 87,169, 84,254,124,237,218, 53,211, 19, 99, 50,217,163, 16, 24, 12, 6,131,
+193, 96,220, 15, 33, 33, 33, 13, 1,188,166, 84, 42,135, 54,111,222, 92,214,177, 99, 71,248,248,248,192,106,181, 34, 37, 37, 5,
+127,253,245, 23, 78,158, 60,153,101,177, 88,230, 91, 44,150,249,233,233,233,169,204, 96, 49, 24, 12, 6,131,193, 96,148, 65,112,
+112,240,236,238,221,187,191,229,227,227,131,234,213,171, 35, 40, 40, 8, 70,163, 17,122,189, 30,148, 82, 8,130, 0, 74, 41,242,
+243,243,113,252,248,113, 28, 61,122,212,154,151,151,183,138, 16, 50, 55, 57, 57,249, 36, 51, 88, 12, 6,131,193, 96, 48, 24, 37,
+ 8, 9, 9, 73,221,189,123,119,128,213,106, 69, 70, 70, 6,140, 70, 35,116, 58,157,195, 96,241, 60, 15, 74, 41,172, 86, 43, 0,
+ 64, 20, 69, 92,184,112, 1,135, 15, 31, 70, 66, 66,194, 87, 41, 41, 41,111, 63,142,251,133,117,114,103, 48, 24, 12, 6,131,113,
+ 95, 24,141, 70,172, 88,177, 2, 25, 25, 25,168, 92,185, 50, 66, 67, 67,225,237,237, 13,165, 82, 9, 0, 14,115, 5, 0, 28,199,
+ 33, 38, 38, 6, 67,135, 14, 5, 33,100,200,227,186, 79, 88, 39,119, 6,131,193, 96, 48, 24,247,131,197,100, 50,161, 73,147, 38,
+136,143,143, 71, 92, 92, 28, 26, 53,106,132,218,181,107, 35, 35, 35, 3,201,201,201,197, 54, 62,118,236, 24, 78,156, 56,129,182,
+109,219, 62,214, 59,133, 53, 17, 50, 24, 12, 6,131,193,184,103, 66, 67, 67,159,175, 84,169,210,130, 97,195,134, 41, 27, 52,104,
+128,196,196, 68, 36, 37, 37, 33, 59, 59, 27, 13, 27, 54, 68, 76, 76, 12,174, 95,191,142,109,219,182,225,196,137, 19,144,203,229,
+ 8, 11, 11,131,102,213, 47,248, 35, 36, 56, 41, 57, 57, 57,140, 25, 44, 6,131,193, 96, 48, 24,140, 18,132,132,132,248, 17, 66,
+222, 11, 13, 13,125,125,200,144, 33,146,234,213,171, 35, 49, 49, 17,233,233,233,200,206,206,198,145, 35, 71,236,102, 12, 97, 97,
+ 97,184,121,243, 38,206,156, 57,163, 55, 26,141,163,147,146,146,150, 51,131,197, 96, 48, 24, 12, 6,131, 81,182,209,170, 12, 96,
+122,181,106,213,158,127,238,185,231,184,144,144, 16, 36, 37, 37, 97,247,238,221,168, 86,173, 26, 82, 83, 83,113,252,248,113, 91,
+ 94, 94,222, 66,155,205,246, 81,106,106,106,250,227,186, 47,254,209, 78,238,132,144,206, 76,147,105, 50, 77,166,201, 52,153, 38,
+211,124, 50, 52,147,147,147, 19,146,147,147,135, 95,185,114, 37,102,230,204,153, 27, 23, 44, 88, 0,158,231, 17, 26, 26,138,221,
+187,119,211, 93,187,118,173, 45, 40, 40,168,153,156,156, 60,230,113, 54, 87, 0,235,228,206, 96, 48, 24, 12, 6,227, 1,115,231,
+206,157,139, 0,250,134,134,134, 54, 63,119,238,220,187, 0, 32,138,226,140, 59,119,238, 28,127, 82,246, 1, 51, 88, 12, 6,131,
+193, 96, 48,254, 17,146,146,146,142, 2,232,245, 36,230,157,205,131,197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24,
+ 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24, 79, 20, 4, 64,169, 35, 1, 40,165, 59,221, 22,185,135, 17, 10,174,244,153, 38,211,
+100,154, 76,147,105, 50, 77,166,249,248,105,186,210,174,136,255,120,164,161,148,186, 92, 80, 52, 95, 86, 69, 23, 0,157,239,229,
+119, 76,147,105, 50, 77,166,201, 52, 31,190,230,189,212,245,165,105, 22,221,188, 19, 20,182,146,112,246,207,143, 90, 58,255, 43,
+121,127, 82, 52, 31,183, 69,112,225, 46, 29, 59,137, 16, 34, 2, 16,233, 3,152,153,148, 16, 98, 63, 0, 15, 68,143,241, 15,132,
+ 54, 11,143, 17,249,191, 15,103,199,137,193,120,140,207,247, 7, 86,215, 59,213, 29,188,211, 69,214, 6,192, 70, 8,193,253,212,
+ 37,255,196, 53,233, 81,207,251,147,172,249, 95, 71, 40,111, 71, 85,170, 84,105,123, 64, 64, 64,135,140,140, 12,177,232,123,132,
+134,134,130,227, 56, 8,130,160,143,143,143,247,172,232, 31, 6, 6, 6,126, 31, 19, 19,243, 98,102,102,166,200,113, 28, 42, 87,
+174, 12, 66, 8,120,158, 7,207,243,250,107,215,174,121,254,219, 59,165,113,227,198,217, 38,147, 73, 83,242,123,153, 76,102,136,
+139,139,243,120, 18,204,149,191,191,255,179,129,129,129,222, 89, 89, 89, 20, 0,194,194,194,192,243,124, 97,161, 17, 4,235,245,
+235,215,151,185,171, 23, 25, 25,121, 76,169, 84,122, 11,130, 0,158,231, 33, 8, 2,180, 90,109,206,133, 11, 23,154, 21,173, 63,
+168, 84, 42,253,120,158,183,151, 45, 24, 12,134,204,243,231,207,183,102,151,190,255, 38,107,215,174,229,187,133,190, 84, 77,160,
+250,250, 28, 71,189, 68,145,228, 90,137,242,244,182,164,239,175,185,243,251,254,253,251,219,254,229,115,160, 10, 0, 43,165, 52,
+249, 30,126,204,149, 82,209,118,183, 1, 3,139, 62, 26, 56, 32,147, 0, 87,106, 2,235,206, 3,250, 18,205, 10,226,195,190,145,
+170, 82,165,202,220, 74,149, 42, 13, 47, 40, 40,208,113, 28, 7, 66, 8,141,137,137,177,111, 83,236, 85, 20,197,196,115,231,206,
+ 53,113,113,145,149, 84,169, 82,229,171, 74,149, 42,189,160,211,233,116,132, 16, 16, 66, 40, 33, 4,245,234,213,187, 75,211,102,
+179, 37,158, 61,123,182,201,195, 74,231,191,149,247,186,117,235,150,170, 89, 86,222, 75,211,116, 78, 39, 33, 4, 49, 49, 49,247,
+157,206, 71, 81,243,177, 53, 88, 0,184,128,128,128,141,205,154, 53,107,191,105,211, 38,238,226,197,139, 92,116,116, 52,108, 54,
+ 27, 68,177,240,220,111,212,168,145,170,162,127, 22, 20, 20,244, 83,179,102,205, 6,109,218,180,137,219,184,113, 35,215,180,105,
+ 83, 16, 66, 96,179,217, 96,179,217,208,169, 83, 39,229,125, 86, 22, 26, 65, 16,198,203,100,178,118, 86,171,181, 54, 0, 72, 36,
+146, 11, 70,163,113,175,213,106,253,154, 82, 90,224,142,142,197, 98, 81,157, 59,119,238,174,125,211,172, 89, 51,217,189,166,173,
+ 70,141, 26,135, 56,142,139, 42,237,164, 45,235,149, 82,122,227,220,185,115,173,202,210,172, 85,171,214, 33,142,227,162,236,219,
+151,166, 81,242, 59, 81, 20,111,156, 61,123,182, 85,121,149, 78, 96, 96, 96,191, 86,173, 90,121,253,246,219,111, 36, 33, 33,129,
+ 40,149, 74,136,162, 8,155,205, 6,139,197,130,142, 29, 59, 86,104,254, 52,149, 74,229,185,107,215,174,106, 1, 1, 1, 72, 75,
+ 75, 67,102,102, 38, 70,142, 28,121,197,190, 94,169, 84,250,253,245,215, 95, 53,124,125,125,161,211,233,144,155,155,139, 33, 67,
+134,252,231, 79,174,174,109,171,126, 76, 0, 95,251,103,155,136,172,157, 7,174,191,127,191,186,181,106,213, 58, 33,147,201, 2,
+203, 58,230,165, 29,123,147,201,148,122,238,220,185, 70, 46,206,159, 8, 0,189,120,158,175, 46, 8, 66, 45, 0, 17, 86,171, 53,
+ 16, 0,164, 82,105, 42,207,243, 55, 45, 22,203, 37,147,201,116, 21,192,102, 74,233,205,178,180,186,133,190, 84,141, 88,117,253,
+243,141, 98, 15, 85,213, 79,107,234,174, 79,185,172,146,235,182,116, 11,125,105,173,187, 38,235, 95, 52, 87,145, 33, 33, 33, 95,
+ 20,189,159, 72, 41,141,191, 95, 77, 27, 48,144, 82,234, 5, 0,185,185,185, 94, 9, 9, 9, 65,155, 55,111,142,153, 53,107, 86,
+ 71,153,193,240,185, 9,184, 88,222,239,187,180,171,118, 92,224, 72, 24,138, 98, 0, 86, 42, 38,238,216,123,253, 65, 92,152,184,
+208,208,208,185,221,186,117, 27,182,112,225, 66,213,209,163, 71, 85,117,235,214, 5,207,243,246,250, 2, 37, 3, 15, 45, 90,180,
+ 40,119,247, 1, 16, 66, 66, 66,230, 60,245,212, 83,131,231,207,159,175,186,116,233,146, 42, 50, 50, 18, 69, 23,219, 98,101,211,
+254, 93,195,134, 13, 31,118, 58,255,209,188,119,239,222,125,240,130, 5, 11, 84,103,206,156, 81, 85,175, 94, 29, 28,199,129,227,
+184,187,244, 56,142, 67,147, 38, 77,220,210,236,218,181,235,224, 69,139, 22,169, 78,156, 56,161,170, 85,171,150, 99,223, 57, 53,
+207, 85, 56,157,143,184,230,227,103,176, 8, 33, 92,165, 74,149, 86, 52,105,210,164,219,166, 77,155,120, 0, 56,113,226, 4,178,
+178,178, 16, 26, 26, 10,141, 70, 3,185, 92, 14,131,193, 80,161,112, 95, 96, 96,224,247, 69,230, 74, 2, 0,235,134,246,197, 13,
+ 9, 48, 54,205, 4,169, 84,138,235,215,175,131,231,249,251, 9, 29,183,245,244,244, 92,190,126,253,122,159, 70,141, 26,113, 25,
+ 25, 25,136,140,140, 68, 86, 86, 86,179,125,251,246, 53,126,233,165,151, 94, 34,132, 60, 79, 41,221,231,174,230,150, 45, 91,160,
+ 86,171,161, 82,169,160, 86,171, 97, 54,155,201,189,166,143,231,249,176,163, 71,143, 6,104, 52, 26,136,162,232, 88, 74,180, 95,
+ 59, 16, 69, 17,109,219,182, 53,151,123,240, 4, 33,236,232,209,163, 1, 74,165, 18,148,210, 98,122, 54,155, 13,114,185,220,249,
+ 14, 17, 54,155, 13, 45, 91,182, 52,187,138, 92,217,205, 21, 0,172, 90,181, 10, 65, 65, 65, 8, 8, 8,128, 90,173,134, 82,169,
+188,151,188,195,207,207, 15,175,191,254, 58, 6, 14, 28,136,149, 43, 87, 66, 34,145, 56,231, 3,190,190,190,216,186,117, 43, 60,
+ 61, 61, 17, 30, 30, 94,108,253,127, 54, 18, 8,248,110,219,119,221, 17,145,237,223,179,129,208, 57, 54,106,190,163,114, 45,220,
+136,138,133,219, 82,209,102,203,222,117,240,214, 84,151, 87, 5,142, 11, 57,122,244,104,128, 92, 46,119,239,226,110,179,161, 81,
+163, 70,188,139,243,167, 71, 76, 76,204,186,215, 94,123, 77, 90,189,122,117, 34,149, 74, 33, 8, 2, 4, 65,176,151,199,112, 74,
+105,184, 40,138,237, 83, 83, 83,233, 55,223,124,243, 57, 33,228, 25, 74,233,150, 82,203, 38,213,215,207, 55,138, 61,246,159, 68,
+179,254,157, 39, 99,235,154, 41,205, 98, 27,138,240, 80,233,175, 1,120,100, 13, 22, 33,196, 83,169, 84,126,176,102,205, 26, 41,
+ 0,116,238,220,249, 3, 66,200,155,148,210,188, 7,245, 31, 94, 94, 94,240,242,242, 66,221,186,117,241,236,179,207,122, 55,108,
+216,112, 66,123,163,113,212, 30,160,204,115, 83,224,184,176, 63,255,186, 18, 96,255, 60,184,111, 99,105,183,246,213, 82, 11,111,
+196, 74,110, 77, 33,218,104,226,206, 3, 55,154,184,200, 43, 23, 20, 20,244,101,247,238,221, 7, 44, 92,184,208, 3, 0,190,255,
+254,123, 60,253,244,211, 8, 12, 12,132, 82,169,132, 76, 38,131, 68, 34,129, 84, 42,117,188,186,136, 8,241, 65, 65, 65,159, 63,
+253,244,211,253,231,207,159,239, 1, 0, 63,253,244, 19,122,246,236, 9, 63, 63, 63,120,122,122, 66, 46,151, 67, 38,147, 65, 42,
+149, 22, 51, 92, 21, 73,231,203, 93, 59,162,170, 82,142,158, 31,127, 14, 31, 31, 31,236,122,251, 53, 72, 56, 14, 99,182,237,131,
+135,135, 71,185,233, 44, 75, 51, 46, 46, 14,105,105,105,165,230,157, 16, 82,110,221,231,156,247, 30, 61,122,244, 95,176, 96,129,
+ 35,239,221,186,117,131,159,159, 31, 60, 60, 60, 32,151,203, 33,149, 74,139, 45,101,237, 3,103,205,238,221,187,247, 95,180,104,
+145, 7, 0, 44, 91,182, 12,157, 59,119,134,143,143, 15, 60, 60, 60, 28,251,178,162,199,232, 81,214,124, 44, 13,150,189,111, 84,
+ 64, 64,192,128,223,127,255,157,115,190, 0,202,229,114,199,137, 33,147,201,192,113, 92, 69, 42, 45, 18, 19, 19,243,226,166, 77,
+155, 28, 63, 50,149,168, 20,228,114,121,133, 52, 75,232,119,238,208,161,195, 47,191,255,254,187, 66, 42,149, 66,175,215,227,220,
+185,115,240,242,242,130, 76, 38, 67,159, 62,125,248,214,173, 91,251,181,111,223,254, 55, 66,200, 96,119, 70, 40, 80, 74,161,209,
+104,138, 25,172,251,105, 66,182,159,160,155, 54,109, 2,207,243,197, 10,153,253,213,249,125, 64, 64,128, 91,186,114,185, 28,135,
+ 14, 29, 2,207,243,144, 72, 36, 16, 4, 1, 18,137, 4,127,252,241, 7,222,126,251,109,100,100,100,128, 16, 2,137, 68, 2, 15,
+ 15,151,173,155, 36, 48, 48,208,219,110,174,138, 34,128, 80, 42,149,144, 72, 36, 68, 16, 4, 98,111,198, 35,132, 16,119,219,212,
+ 5, 65,192,205,155, 55, 49,116,232, 80, 44, 91,182, 12, 51,102,204,192,224,193,131,139,173,207,203,203,131,143,143, 15,124,124,
+124,160, 80, 40,238,185, 44, 60, 74,136, 37,246,206, 71, 51,191, 80, 65,164, 40,236,228, 33, 2, 34, 64, 65, 33, 82, 17,169, 73,
+215, 48,251,203,121,188,187,101, 73, 46,151,227,224,193,131, 14, 19, 36, 8, 2, 8, 33,112, 54, 70,246, 37, 40, 40,200,165,166,
+ 84, 42,157,190, 97,195, 6,217,202,149, 43,177,122,245,106,199,127,168,213,106,120,123,123,195,207,207,207,177,132,133,133,145,
+ 31,126,248, 65, 90,191,126,253,233, 0,182,148,110, 2,169,151,170,234,167, 53,251,119,158, 92,104, 46, 39, 83,100, 95,153,217,
+128,203,153,234,245, 8,155, 43, 1,192, 59,223,126,251,173, 95,227,198,141, 1, 0,223,126,251,173,223,136, 17, 35,222, 33,132,
+188, 79, 41,181,222,243, 13, 22,176,154, 16, 50,176, 40, 98,171,232,210,165,139,236,187,239,190, 67,173, 90,181, 48,110,220, 56,
+223,217,159,127,222, 11,192,111,101,151,165,226,133,233,211, 47,230,122, 83, 90, 88,126,168, 72,139,189,102,165,221,196, 7, 31,
+124,236,178, 78, 6,192,133,132,132,188,180,120,241, 98, 71,119, 8, 31, 31,159, 82,235, 38,137, 68,226, 88,202, 49, 69,164, 40,
+ 42, 52, 98,225,194,133, 14, 77,127,127,127, 72,165,210, 98, 23,216, 91, 23, 79, 97,203,210, 79,160,246, 13,194,208,137,159, 85,
+ 56,157, 97,114, 25,194,148, 50, 52,104,208, 0, 42,149, 10,113,146,194, 75,153,135,135,135,203,116,150,165,233, 92, 47, 3,128,
+ 78,167,115, 68,237, 77, 38, 19,154, 52,105,226, 86,222, 23, 45, 90,228,208,244,243,243,115,228,221,158, 46,231,186,222,126, 3,
+ 83,158,102, 72, 72,200,136, 37, 75,150, 56, 52,125,125,125,139,105, 72, 36, 18, 44, 95,190,252,174, 58,226,126, 53, 43,122,220,
+ 75,106,222,188,121, 19,179,102,205,114,212, 73,246, 40,158,189,171,209,188,121,243,220, 50,216,143, 85, 4, 11, 0,201,200,200,
+ 16, 47, 94,188,200,197,197,197, 65, 34,145, 32, 32, 32, 0, 77,155, 54, 5, 0,152,205,102,251, 69,151,212,170, 85, 43,149,227,
+ 56,216, 47,186, 28,199,193,106,181, 58,218,147,157,140, 12,151,149,149, 37,238,216,177,131, 91,241, 76, 87,152, 40,208,240,131,
+ 79,208,173,103, 79,108, 11,149,129, 7,208,236, 98, 6,100, 50,153, 16, 28, 28,108,177, 31, 4,187,182,115,223,172,146,230,136,
+ 16,226,161, 86,171,127,216,188,121,179,130,227, 56,228,231,231, 67, 20, 69,180,110,221, 26, 28,199,225,236,217,179,120,239,189,
+247,176,110,221, 58,108,216,176, 65,217,168, 81,163, 31, 8, 33,181, 41,165,249, 78,102,106,103,105,133,211,195,195, 3, 42,149,
+202, 97,176,236,121, 46,106, 83, 47,217, 36,147,116,238,220,185,198,101,105,218, 35, 9,125,251,246,117,244, 57,179,155,161,146,
+175, 82,169, 20,103,207,158, 45,205,244,221,165, 41,138, 34,218,180,105, 99,111,138,131, 70,163,193,158, 61,123, 28,235, 27, 54,
+108, 8,147,201, 4,127,127,127, 92,184,112,193,165,102,122,122, 58, 77, 78, 78, 38, 43, 86,172,128, 68, 34,129,159,159, 31, 84,
+ 42, 21,249,237,183,223,222, 81, 40, 20, 97, 70,163, 81,180, 88, 44, 8, 11, 11,155, 23, 30, 30,110, 63, 70,218,107,215,174,249,
+149,165,201,243, 60, 20, 10, 5,126,250,233, 39,204,154, 53, 11,239,190,251,110,177, 19,139,231,121, 24, 12, 6,248,251,251, 59,
+ 76, 86,201, 19,239,159, 24,182,251, 79,107, 82, 80,156, 59,177, 13,231,207,236,132,104, 19, 97, 19, 41, 40,181, 65,180, 2,113,
+ 59,142,212, 72,185,145, 28, 74, 65,129,162, 30, 55,150, 2,173,181,189,191,188, 22,128,141,123, 50,140,115, 92,165, 83, 16, 4,
+ 88, 44, 22,108,222,188, 25,215,174, 93,195,246,237,219,161,215,235, 29,251,177,101,203,150, 24, 49, 98, 4,130,130,130, 92,238,
+ 79, 74,233, 79, 9, 9, 9, 13,219,180,105, 67,114,114,114,144,147,147, 3,189, 94, 15,155,205, 6,171,213, 10, 65, 16,160, 80,
+ 40,160, 84, 42, 17, 24, 24, 8,131,193, 64,141, 70,227, 79,101,105,138, 34,201,213, 93,159,114,121,235,154, 41,205,250, 79,166,
+ 88,251, 25, 65,141, 8,185,110,239, 41,239, 17, 91,142,190,211,133, 80,142, 2,133, 89,231, 8,168,205,102,203,120,117,236,167,
+ 99, 30,246, 49, 42,193,168,241,227,199,215,118,110,158, 30, 50,100, 8,206,157, 59, 87,251,235,175,191, 30, 5,224,219,138,106,
+250, 0,161, 0, 96, 5,182,162,112,193, 90,189,158, 12,218,184,177, 47,128, 23, 54,108,216,128,193,131, 7,227,203,207, 63,175,
+ 91,210, 96, 21, 43, 75,148,226,230,149,253,184,121,245, 0, 68,145, 58, 69,193, 75,127, 79,221, 75, 39, 41, 40, 40, 48, 28, 61,
+122, 84,179,108,217, 50,120,123,123, 35, 42, 42,202,209, 74, 81,242, 2,107,255,236,170, 44,233,116, 58,195,197,139, 23, 53,191,
+252,242, 11,124,125,125, 17, 30, 30, 14,149, 74,229,208,148,201,100, 56,178,109, 61, 70, 13,237,129,140,155,231, 49,247,205, 1,
+110,167,243,229, 46, 29, 81, 89, 33, 67,223, 25,159, 34, 58, 58, 26,107, 7,246, 6, 71,128,209,187,143, 64, 42,149, 98, 89,143,
+182,144,201,101, 24,189,251,111, 87,233,116,104, 30, 63,126, 28,162, 40, 34, 34, 34, 2, 58,157, 14,158,158,158, 80, 40, 20,144,
+ 72, 36,216,177, 99, 7,250,244,233,131,149, 43, 87,162,101,203,150, 46,243, 94, 80, 80, 96, 56,115,230,140,230,231,159,127,134,
+175,175, 47, 42, 87,174, 12,149, 74,229, 8, 76,216,141, 22,207,243,136,138,138, 66,110,110, 46,170, 86,173, 90,174,166, 86,171,
+ 53,196,197,197,105,126,254,249,103,248,248,248, 32, 44, 44,204, 17, 97,179,155,162,105,211,166, 21,211,104,208,160,193,125,107,
+ 86,244,184,151,212,236,219,183, 47,170, 85,171, 6, 79, 79, 79,168,213,106,135,118,121,154,143,181,193,162,148,210,162, 81, 20,
+136,142,142, 70, 86, 86, 22,228,114, 57,154, 54,109,138,140,140, 12,104, 52, 26, 72,165, 82, 80, 74, 49,112,224, 64,126,226,196,
+137, 1, 69,166,202, 81,225,151,209,150, 46,114, 28,135, 86,173, 90,225, 92, 81,203, 79,183,158, 61, 17, 22, 22, 6,123, 39, 14,
+133, 66,129,193,131, 7,147,183,223,126, 91,176, 71, 47, 40,165,208,235,245,168, 95,191,190,178,156,232,200,155,191,253,246,155,
+151, 76, 38, 67,126,126,190,163,137,140,231,121, 92,188,120, 17, 95,126,249, 37, 94,120,225, 5,220,190,125, 27, 33, 33, 33,152,
+ 48, 97,130,230,211, 79, 63,125, 19,192, 71,174,118,142, 70,163,113,152, 43,149, 74,133, 97,195,134, 9,173, 91,183, 14,208,104,
+ 52,240,240,240,128,189,185,207,102,179,161, 85,171, 86,196, 85,212, 65, 20, 69,108,219,182, 13,130, 32,184,140, 96, 21,181, 89,
+187,165,121,244,232, 81,135, 57,115,190, 43, 34,132,224,220,185,115, 14, 51, 87, 84,152,203,211,164, 60,207, 67,173, 86, 35, 40,
+ 40, 8, 74,165, 18, 42,149,138,108,218,180,233,253,136,136,136,224,215, 94,123,141,203,203,203,227,154, 52,105,130, 30, 61,122,
+ 8,162, 40,194,108, 54,163, 99,199,142,229,238, 71,137, 68,130, 99,199,142,225,211, 79, 63,197,228,201,147,177,104,209, 34,116,
+238,220,185,152, 81, 32,132,160, 82,165, 74,240,244,244,124,124,206, 46, 17, 48, 91, 45,208, 21,232, 29, 77,184, 54,155, 13,103,
+246,156,170,113,227,212,149,152,223,127, 89, 41, 1, 0,195,158,245,206,191, 10,126,118,254,175, 53,219,251, 74,143,238,201, 50,
+ 31,117,209, 84,136,113,227,198, 97,234,212,169, 24, 56,112, 32,118,236,216,129,247,222,123, 15, 47,189,244, 82,177, 8,150, 59,
+ 88, 44,150,197,207, 63,255,252,200,181,107,215,214,154, 60,121, 50,103,143, 96,169, 84, 42, 16, 66, 96, 48, 24, 96, 52, 26,161,
+215,235,113,233,210, 37,241,149, 87, 94,185,108, 50,153, 22,151,165,103, 37,202,211, 42,185,110, 75,245, 42,124, 53,109,252, 23,
+ 30,109,154, 71,232,137,178,113,238,211,213, 59,211,206,131, 35,124, 64, 41,168, 88, 24,229, 51, 26,181,120,103,210, 4,254,223,
+ 60, 84,132,144, 30, 93,186,116,233, 58,115,230,204,187,214,205,156, 57, 19, 23, 46, 92,232, 74, 8,185, 89, 86,147,104,105,120,
+ 3, 97,138,160,160,175, 0,192,251,206,157,183,114,128, 68, 0, 24, 4,116,179, 1,189,119,236,216, 1, 0,168, 82,165, 10, 68,
+160, 14, 1,126,226,129,213,214,210,162,130,148,194, 98,177, 66,175, 55,150,107,172,236,159, 93, 5,151,237,117, 61,207,243,168,
+ 91,183, 46,186,117,235, 6,169, 84, 10, 15, 15, 15, 71,115, 78,105, 81, 12, 23, 77,247, 20,128, 72, 8, 65, 84, 84, 20,186,118,
+237, 10,169, 84, 10,181, 90,237, 48, 45, 50,153, 12, 60,207,163, 94,235, 78, 88,185,124, 38, 94,236,217, 8, 47,196, 6, 98,221,
+153, 76,183,210, 25,161,148, 33, 92, 37, 71,116,116, 52, 60, 60, 60, 64, 8, 32,240,255,175, 79, 85, 42, 37,100,114, 89,185,233,
+ 44,169,153,154,154,138,248,248,120,196,199,199,131,227, 56,180,105,211,198, 17,117,185,122,245, 42, 62,250,232, 35, 24,141, 70,
+183,242,206,113, 28,170, 87,175,142,142, 29, 59, 66, 38,147, 65,165, 82, 21,107, 26,180,239,211,252,252,124, 84,171, 86, 13, 27,
+ 55,110, 68,219,182,109, 93,106, 70, 71, 71,163, 93,187,118,144, 74,165,142, 27,105,165, 82,233,184,110, 20,153, 59,199,127, 52,
+106,212,168, 66,154,219,143,221,198,210, 29,127,193,104, 18,145,167,179, 20,251, 65,176,191, 39, 14,252, 60,217,173,188,219, 53,
+151, 44, 89,130,156,156, 28, 71, 29,100, 15,192,216,131, 39,149, 43, 87,198,130, 5, 11,158,172, 38, 66,251,101,193,238, 42, 67,
+ 67, 67, 97,239,231,161,209,104, 32,147,253,191,143,183,213,106,197,186,117,235, 16, 16, 16,224, 88,188,188,188,202, 44,208, 85,
+170, 84, 1,165, 20,227,210, 11,187, 25,108, 13,145,226, 38,128,167,211,169, 35,186, 99,179,217,240,219,111,191,193,217,192,120,
+120,120,148,219, 92, 36,147,201,218, 55,109,218,148, 51, 26,141,119,153,171, 79, 63,253, 20,131, 7, 15, 70,205,154, 53, 33,138,
+ 34, 10, 10, 10,208,161, 67, 7,201,188,121,243,218, 87,196, 96,169, 84,133,253,249, 77, 38, 19,246,236,217, 3, 31, 31, 31,248,
+249,249,193,215,215, 23, 30, 30, 30, 80, 40, 20, 32,132,184,108, 46,163,148,162,111,223,190,142, 66,231, 28,181, 42,105,182, 14,
+ 29, 58,228, 86, 51, 25,165, 20,205,155, 55,135, 90,173,134, 70,163,129, 70,163,193,182,109,219, 28,235,155, 53,107, 6, 81, 20,
+ 17, 16, 16,128,195,135, 15,187,172,116,195,194,194, 28,219, 75, 36, 18,242,219,111,191,189, 19, 25, 25, 25, 60,122,244,104,142,
+231,121,156, 56,113, 2,231,207,159, 71, 80, 80,144,163, 79,150,171,116,106,181,218,148,121,243,230,217,190,251,238, 59, 0, 64,
+199,142, 29,145,155,155,155,230,180, 62,115,232,208,161,142, 81,138, 0,144,149,149,149,249, 24,248, 43, 88,205, 86,232, 12, 6,
+ 20,228,235, 28,209,160,180,228, 84,239,201,111,143,151,124, 57,102, 56, 0,224,237, 57,223, 34,127,209,255, 43,176,245,111, 15,
+ 10,120,102,246,234, 41, 0,250,148,167,175,211,233, 96, 52, 26, 17, 30, 30,142, 99,199,142, 33, 63, 63, 31,157, 59,119, 46, 22,
+ 33,117,222,167, 46,142,189,137, 16,210,186,103,207,158,127,127,253,245,215, 85,107,215,174, 77,180, 90, 45,116, 58, 29,156, 95,
+207,156, 57, 67, 87,173, 90,117, 67,167,211,181,162,148,154,202,210,219,150,244,253,181,110,161, 47,173,221,119, 90,214,211, 63,
+234,178,103, 82,118, 85,107,102,146, 92,155,167,191,100,176,209,243,160, 54,192, 6, 17,212, 42,194, 6,138,127,115,252, 54, 33,
+ 36,172, 70,141, 26,175,174, 92,185,178,212,253,197,243, 60, 86,174, 92,137, 54,109,218,188, 74, 8,185, 88, 94,231,126, 59, 45,
+ 1,153, 65, 34,153,188,249,215, 95, 11,251,114,117,236, 56,185,165,197,242,246, 97,192, 84,167, 94,189,126,135, 14, 29,242,178,
+215, 43, 94, 94, 94,160,148,242, 58,157,206,171, 85,171, 86,253, 74,107,118,165, 34, 96,177, 88,160,215, 27,145,155,155, 15,147,
+217, 82, 84,103,138,176,217,172, 69,175, 34,172, 69,245,168, 68,224, 61,218,183,172, 82, 80,104,180, 72,206,222, 35,183, 43,151,
+ 81,215, 83, 66, 8, 2, 3, 3, 33,149, 74,139, 69,153,220,137, 94,149,130,205, 94, 23,250,249,249, 65, 38,147,225,244,158,223,
+145,118,225, 0,164,132, 66,180, 89, 32, 90,205,176, 89,205,224, 57, 30,151,174, 39, 35, 58,216,229,216, 33, 71, 58,187,125, 48,
+ 3, 45, 90,180,192,218,129,189, 65, 8,240,218,238, 35,144, 72, 36,248,185,111, 39,200,101, 82,188,178,227,136,187,233, 44,150,
+247,227,199,143, 99,220,184,113,248,236,179,207,160, 84, 42,237, 45, 39,184,120,241, 34,126,253,245, 87,116,233,210,197,237,188,
+ 19, 66, 28,121, 23, 4, 1, 83,166, 76, 65,114,114, 50,230,204,153,131,198,141, 27, 67, 34,145, 32, 39, 39, 7,173, 90,181, 66,
+106,106,170,219,251,211,222,140, 39,147,201,138, 69,155,236,198,239, 94,142,145, 93,115,120,223, 96,108, 58,184, 10, 4, 4, 71,
+126, 30, 95,236, 90,180, 96,245,254, 10,107, 78,157, 58,181, 88, 58,159,196,232, 85,169, 6,139, 82, 74, 67, 67, 67, 33,138, 98,
+ 49, 83, 85,178, 67,173, 61,228,231, 28, 82, 44,183, 15, 2,207, 67, 20, 69, 71, 97,224, 75, 89,127,248,240,225,187, 76,192,210,
+165, 75,203,189,128, 91,173,214,218, 30, 30, 30,197,162, 87, 82,169, 20, 83,166, 76,193,176, 97,195, 28,230, 74, 42,149, 98,217,
+178,101,104,210,164, 9, 76, 38, 83,237,242,210, 42,149, 74,117,245,234,213,227,236, 81, 32,165, 82, 73, 6, 15, 30,204, 91,173,
+ 86,199, 62,177, 47,246,190,105,174, 76,134, 61,218,180,125,251,118,183, 34, 88,238,246, 65,162,148,226,212,169, 83,197, 76,155,
+125, 20, 12, 0,156, 58,117,202,209, 63,203, 93, 77,155,205, 6,165, 82, 73,164, 82, 41, 81, 40, 20, 97,118,115,197,243,188,227,
+120, 59,247,201,115,117,162,156, 62,125,186, 67,121,235,207,156, 57,243, 88, 78,199, 32, 66,132,217, 98,129, 94,103, 66,126,129,
+ 30,211, 63,249,177,112,197,116, 28, 5,112,180,245,168,113,120,173, 91,151,142, 0, 42, 85,208, 16,192,126, 1,251,237,183,223,
+ 32,145, 72,176,113,227, 70,120,122,122,162,119,239,222,240,244,244,196,228,201,147, 49,112,224, 64,183, 35, 88, 69,101, 41,151,
+ 16,210,250,205, 55,223,252,251,139, 47,190,168, 82,185,114,101,152, 76, 38,152,205,102,152, 76, 38, 92,187,118, 13,171, 86,173,
+ 74,208,233,116,173, 41,165,185,174,244,182, 37,125,127,237,247,195,239, 36,199, 62,251,172,254, 98,234, 86,220,185,147, 9,171,
+ 53, 9,162,205, 10,179,181,112, 68,178,205,106,133,213,106,131,192,115,158, 11,190,158,184,163,176,195, 63, 49,245,239,223,255,
+169,135,120,168,232,149, 43, 87, 50, 43, 85,170,100,175,196, 60, 77, 38, 19, 41,186,129,163, 0,236, 29,220,181, 40,167, 35,186,
+ 51,199,128,145, 95,126,246, 89,152,189,249,254,147,207, 62, 11,155,240,214, 91, 35, 1,204,187,112,230,204,202,225,195,135,191,
+185,102,205,154, 98,191, 25, 62,124, 56, 46,156, 57,179,178,244, 16, 65, 81, 4,203, 96, 64,122,102, 54, 94, 30,245,190, 35,116,
+ 0, 80, 56, 59, 84, 90,248, 89, 1, 0, 25,169,215, 48,118,220,219,242,178,110,168,234,212,169, 3, 81, 20,139, 69, 67,238,161,
+239,149,115,100,200,177,157,167,167, 39,164, 82, 41,174, 29,250, 29,111,141, 26, 0,216,204,160, 22, 61, 96,214, 1,230, 2,136,
+ 38, 29,136, 84, 9, 88,244, 46,117,237,233,244,244,244, 44,236, 19, 42,240,144, 73,255,111,254,156, 35, 87,238, 92,184, 75,230,
+253,230,205,155,120,237,181,215, 96, 54,155,209,183,111, 95,152, 76, 38, 24, 12, 6,232,245,122, 68, 69, 69, 65,167,211,185,157,
+119,251,181, 83, 42,149, 98,252,248,241,104,210,164, 9, 62,250,232, 35, 76,154, 52, 9, 81, 81, 81, 24, 61,122, 52, 86,173, 90,
+133,152,152,152,114,117,237,154,133, 77,238,133,154,246,252,150,108,202,179,183, 20,184,123,140, 74,211,180,207, 46, 82,242,184,
+191,241,124,167, 10,107,126,250,233,167, 72, 79, 79,191, 43,114,101,127, 31, 26, 26,138,249,243,231, 63,145, 17, 44,199,112, 82,
+251, 5,212,126, 33,119,174,220, 85, 42, 21,214,173, 91, 87,172,115, 93,121, 97,105,142,227, 32,138, 34,182, 84, 42,252,125,143,
+162,200,149,243,231, 94,189,122, 33, 50, 50,178, 88,244, 74,169, 84,150, 91,104, 68, 81,196,173, 91,183,112,238,220, 57,180,104,
+209, 2,185,185,185,144,112, 28,222, 62,115, 6,117,158,127, 30, 38,169, 20,162, 40, 66, 38,147, 97,228,200,145,110,117, 84,255,
+251,239,191,125,156, 63,215,169, 83, 39, 49, 54, 54, 54,244,216,177, 99,142,142,239, 69,205,103, 14,163,225,230, 73,141,126,253,
+250, 21,139, 90, 57,155, 43,231,101,235,214,173,110, 53, 17, 82, 74, 17, 27, 27,235,136, 94,121,120,120, 96,195,134, 13,142,245,
+246,240,115, 96, 96,160, 91,154,246, 59,248,162,142,237, 48, 26,141, 98,126,126, 62, 23, 23, 23, 7,153, 76,230, 56, 38, 74,165,
+ 18, 10,133,226,190, 6, 39, 60,246,216, 68,152, 44, 22,232,245,122, 20, 20, 20,206, 16,114,237,108,241,126,204,102,227,189, 15,
+ 78,179, 71,169,242,243,243,177,107,215, 46,172, 95,191, 30,141, 27, 55,190,171,147,187,243,121,235, 70, 25, 77, 39,132,180,153,
+ 56,113,226,145,143, 63,254, 56,196,215,215, 23,102,179, 25,183,111,223,198, 15, 63,252,144,172,211,233,218, 80, 74,211, 43,224,
+218, 96,177, 88, 97,208, 25,145,155,151,143,105, 51,151,149, 89, 69, 0, 64, 86,218, 37, 12, 30, 60, 68,246, 48, 15, 19,165, 52,
+ 9,192, 75, 78,231,213, 10, 0,246,112,124, 30,165,116, 88, 69,244, 36, 64,251,103,251,247,239, 56,126,252,120,199,119,227,199,
+143,199,145, 35, 71, 58, 74,214,174, 61,103, 1,246,240,107,215,198,124,253,245,215,142,109,190,254,250,107,172, 91,187,118,183,
+ 13,216, 83, 86,221, 97,111, 34, 44, 40,208,195,211, 59, 24, 73,241,123, 93,166, 69,202, 27, 64, 69,209,229,141, 95,201,126, 55,
+ 37,235,167, 10,148, 31, 90,175, 94, 61,123,235, 2,164, 82, 41,234,118,236,143,217,115, 23, 67,206, 81, 60,219,185, 46, 42, 41,
+108,128,210, 23,210,182,147, 65,188,195,139,110, 58, 26,186,117,131,186,239,253, 9,184,161, 86,224,149,237, 7, 32,149, 74,241,
+219,192, 30,144,203,165,120,225,247,125,144, 74,165,248,125,196, 51,144,202,164,232,182,240, 87,183,110, 84,236,121,191,118,237,
+ 26, 14, 29, 58,132,232,232,104, 92,189,122, 21,206,253,108, 41,165,110,155,182,186,117,235, 58, 2, 18, 18,137, 4,119,238,220,
+ 65,207,158, 61, 29, 55,248,123,247,238,197,196,137, 19, 49, 98,196, 8,180,111,223,190,212,126,177, 37, 53, 99, 98, 98, 28,129,
+131,146, 38,216,185,217,182, 34,199,168, 52, 77, 71,249,189,199,227,238,172,249,241,199, 31,151,106,214, 43,162,249, 88, 27, 44,
+251, 9, 82, 86,187,179, 90,173,198,235,175,191,142,169, 83,167,194,223,223,223,101,223, 25,187,115, 45,143,205,155, 55,223,245,
+221,198,141, 27, 93, 53, 17, 94,244,242,242,106,210,161, 67, 7,228,230,230, 34, 33, 33, 1,106,181, 26,117,102,207,198,153,215,
+ 94, 67,131,133, 11,193,117,236, 8, 66, 8,100, 50, 25,206,156, 57, 3,165, 82,121,177,162, 17, 3, 15, 15, 15,248,248,248, 56,
+218,212,237, 70,203,201, 96, 81,119,204,208,150, 45, 91, 74, 29,161,115, 47,125,176,236, 21,239,145, 35, 71,138,245,191,114,110,
+230, 56,114,228,136, 35,130, 85,180, 61,113,117,156,138,238,234,168, 93, 79,165, 82,193,215,215, 23,114,185,220, 97,172,236,230,
+202, 29,115,233,106, 34,209,136,136,136, 98, 19,145, 74, 36,146, 98, 19,145,254,215,155, 8,245,122, 3, 10,242,245, 15,178, 73,
+171,208,156, 21, 13, 56, 89,183,110, 29,154, 55,111,126,151,185,178, 71, 29,239,193,112, 36, 18, 66,218,207,157, 59,247,232, 87,
+ 95,125,229, 83, 80, 80,128, 31,127,252, 49,183,160,160,160, 61,165, 52,177, 66, 90, 0, 44,102, 51,116, 6, 35,180, 5,133,251,
+224,250,185,223, 92,154,178,255, 50,181,235,213, 27,250,227,143, 63,222,245,253,143, 63,254,136,171, 87,175, 14,197,153, 51,123,
+154, 1,139,222,153, 60,185,122,227,198,141,195, 0,224,157,201,147, 19,155, 1,139,202, 59,207,205, 69, 77,132, 5, 5,133, 81,
+ 15,131, 54,227,193,148,211, 34,147, 81, 86,159,171,123,185, 32,218,235, 91,169, 84,138,174, 3, 95, 70,242,141, 75,136, 86,103,
+160,146,183, 10, 52, 47, 9,210,142, 31,226, 76,150, 10,115, 22,110,171, 80, 58,213,114, 25, 20, 10,185, 83,159, 43, 5,100, 10,
+185, 35,157, 10,165, 18, 18,185,172,194,121,191,124,249, 50,148, 74, 37,108, 54,219, 93,215,155,138,230,223,217,184,124,253,245,
+215,152, 56,113, 34,150, 45, 91,134, 51,103,206,160, 65,131, 6,232,220,185, 51,210,210,210,112,250,244,105, 24,141, 70,183,211,
+233,220, 47,238,252,249,243,248,243,207, 63, 17, 31, 31,143,132,132,132,123, 62,238,206,154, 37, 13,214,186,157, 39,209,175, 75,
+163,123,210,156, 54,109, 26,210,210,210,138, 69,174,156,163,155, 79,116, 4,203,222,196,228,116, 81,190, 43, 74,165, 86,171, 29,
+ 29, 34, 61, 61, 61, 93, 70,134,236, 6, 43,246, 70,126,177,190, 92,246, 72, 22, 0,140, 24, 49,226,174, 8, 86,201,201,233, 74,
+ 98, 52, 26,247,238,221,187,183, 97,175, 94,189,248,139, 23, 47, 58,154, 34, 77, 45, 91,162,193,194,133, 56, 59,126, 60,218,221,
+188, 9,131,217, 12,133, 66,129,109,219,182,153,117, 58,221,222, 10, 86, 22,196,217, 96,169,213,106,120,121,121, 57, 12, 70, 69,
+ 92,121, 89,119,136,206,159, 43, 18, 17,178,247, 57,179, 47,246, 11, 43, 33, 4,122,189,222,209, 89,179, 34, 81, 17,155,205,230,
+ 56,241,236, 29, 20,189,189,189, 29,149,134,125, 52,153,187,205,163,174, 38, 18, 85, 40, 20,158,251,247,239,175,102,159, 70, 34,
+ 35, 35, 3, 3, 7, 14,188,242, 95, 63,185, 40, 40,204, 86, 27, 10,244, 6, 20,232,117, 15, 92,127,229,202,149,184,118,237, 26,
+204,102, 51, 62,249,228,147,187,140, 85, 69, 58,185,151, 82,174,174, 53,106,212, 72,236,222,189, 59,142, 28, 57, 2,185, 92,110,
+161,148, 86,120,254, 42, 42,138, 48, 91,173, 48,232,245, 40,208,106,159,136,187,214,243,103,206,252,166, 86,171, 7, 2,208,228,
+228,228,240, 94, 94, 94, 80,169, 84,208,235,245,185,124,209, 72,193,195,128,201,219, 98,249,108,192,128, 1, 95, 1,128,194, 98,
+249,236, 48, 96, 42,239, 60,183, 88,139,204,250, 3,220,143,246,122,171,172, 58,233, 94,162,211,246, 11,169, 84, 42,133,192,243,
+248,113,214, 4, 68,171,211,209, 40,210, 3,198,212,171,144,121,248,131,120, 71, 96,206,194,109,184,112, 51,171, 66,233, 28,180,
+124, 45, 42, 87,174,140, 77,207,247,134, 66,174,192,160,117,187, 32,145, 72,176,125,244, 64, 72,101, 50,116,254,238,231,123,202,
+187, 86,171, 45, 51, 82,229,110, 4,171,100,222, 37, 18, 9, 26, 54,108,136, 26, 53,106, 96,207,158, 61,104,212,168, 17,174, 94,
+189,138,171, 87,175,226,230,205,155, 56,115,230, 12,178,179,179, 43,124,140, 86,175, 94,141,172,172, 44,200,100, 50,100,100,100,
+ 32, 62, 62,222,173,169, 88, 92, 29,119, 59,181,158,158, 6, 0, 8,169,228, 85, 33,131,229,172,249,249,231,159,223,101,218,159,
+196,150, 14,161, 12, 19,160,175, 85,171,150,210,185,253,148,227, 56,120,120,120,144,137, 19, 39,242, 69,239,225,229,229,133, 74,
+149, 42,185,213,236, 38,145, 72,244,205,154, 53, 83,218, 11,160,221, 56,169,213,106,126,210,164, 73,100,233,210,165,101, 70,181,
+ 92,244,193,250,106,216,176, 97, 47, 37, 38, 38,250, 4, 4, 4, 32, 37, 37, 5, 50,153,172,240,164,232,208, 1,177, 55,110,192,
+ 92,216,167, 8,151, 47, 95,198,226,197,139,181, 70,163,241,171,138,238, 40,141, 70, 3, 63, 63, 63, 71,211,160, 61,130,227,100,
+ 22,233,189, 84,100, 37,151,138, 68, 28,236,154,206, 6,203,126, 97, 29, 53,106, 84, 49,179,229,118,129, 16, 4,107,187,118,237,
+ 4,123, 58, 44, 22, 11,234,213,171,135,180,180, 52, 72, 36, 18,200,100,178, 98,145, 59,119, 12,150,171,137, 68, 5, 65,128,201,
+100, 66,219,182,109, 65, 8,193,183,223,126,123, 79,145,151, 71,206, 96, 89, 69,162,209,248, 33, 36,164, 38, 42, 5, 24, 32,138,
+ 15,238,233, 47, 86,171, 21,163, 71,143, 46, 22,177,178,143, 84,180, 55,241, 23, 54, 43, 89,238,121,210, 86,251,121,125, 63,243,
+191,137, 20,142,166, 45,173,214,240,159, 59,134,225,225,225,158, 69, 77,134, 37,249,133, 82,250,103,169,199,166,104, 74, 6, 30,
+152,113,251,246,237,186, 94, 94, 94,232,218,181, 43, 54,111,216,176,233, 23,192, 17,178,201, 1, 18,125,238,220, 25, 95,244, 62,
+201, 85, 80,175,176, 15,150, 17, 90,173,254,129,231,243,126,111,244, 74,187,161,230,121, 30,235, 22,126,138,104, 85, 42, 26, 86,
+145,227,208,145,147,104, 94, 25,128,233,222, 91,128,237,125,155, 84, 42, 37,164, 50,185, 35,157, 10,149, 10, 18,169,236,158,243,
+238, 92,159,150,172, 47,239, 37,130,231,188, 63, 95,126,249,101, 76,158, 60, 25, 93,187,118,197,213,171, 87,177,111,223, 62, 92,
+189,122, 21,227,198,141, 67, 76, 76, 12,186,117,235, 86, 33,205,181,107,215, 34, 55, 55, 23, 28,199, 33, 51, 51, 19,122,189, 30,
+ 83,167, 78,189,239,227,110, 39,126,231, 39, 0,128,223,118,156,184,103,205,247,222,123, 15,119,238,220, 41, 22,185,122, 82,162,
+ 86, 46, 13,214,229,203,151, 75,109,239,139,137,137, 73,237,210,165, 75, 64, 74, 74, 10, 52, 26,141, 75,115, 69, 8,233,108,159,
+ 43,227,220,185,115,165,106, 86,173, 90,213,220,165, 75, 23, 73,112,112,112,177,209,131,106,181,186,216,201, 90,154,102, 81,229,
+159, 79, 8,121,181,117,235,214, 63,109,221,186, 85, 85,163, 70, 13,228,229,229,129, 82,138,101,203,150, 97,204,152, 49, 80, 40,
+ 20,184,124,249, 50,122,247,238,173,211,233,116,175, 58,207,129, 85,154,102,105, 70,134,227, 56,199,252, 48,165,152,171,114,243,
+238,204,220,185,115, 29,115, 65,149,199,162, 69,139,128, 18, 83, 42,148,166, 73, 41,197,151, 95,126,249,192, 52, 47, 93,186,180,
+204,121,125,100,100,228,183, 79, 61,245,148,144,144,144, 80,204, 84, 57, 47,165, 84, 72,197, 52, 93, 77, 36,202,243, 60, 2, 3,
+ 3,241,241,199, 31,195,207,207, 15, 65, 65, 65,119, 69, 94, 92, 29,163,123,188,123,255, 71, 53, 41, 71,227,230,126, 53,173,205,
+162,239,215, 75,228, 50,224,240,190,223,144,151,125,167,120, 4,214,252,255, 33,209,178, 70,157, 96, 58,177,203,173,116, 26,141,
+ 70,124,254,249,231,152, 54,109,218, 93,115,224,148,113,220,239, 43,239,238,152,172,210, 52, 69, 81, 36, 42,181, 15, 20,234, 16,
+212,137,241,129,232,198, 92,157,226,191,127,220,117, 9, 9, 9, 94,149, 43, 87,198,149, 43, 87, 8,254,223, 31,235,255,199, 74,
+ 38, 27, 4,224,207,242, 52, 9,112,102,213,170, 85,117,235,213,171,135,111,191,253, 22, 0, 94,120,113,251,246,129,207,233,245,
+ 6,160,112,242,209, 34, 51,230, 50,157, 54, 74,137, 82,229, 13,133, 58, 24,117,234,122, 67, 20,221,159,243,148,150,147,119,251,
+197,175,100,244,170,130, 19, 73,223,165,105,191, 65,186,126,248, 15,244,236, 17,134,131, 71,207, 98, 87,130, 10, 97,178, 20,132,
+232,210, 33,166, 95,196,155,253, 27, 97,206,218,194,139,248,217, 56,215,154,132, 16, 28,124,251, 21,168, 85, 10, 60,187,234, 79,
+ 72,165, 82,252,245,230,243,144, 74,229,104,247, 85, 97,147,236,153,207,166, 64, 34,151, 35,250,141,105,110,165,179,100, 75,141,
+189, 43,135,243, 54,229, 69,176,202,203,123,126,126, 62,114,114,114,240,211, 79, 63, 97,248,240,225, 72, 75, 75,195,205,155, 55,
+113,229,202, 21,252,242,203, 47,142,209,233, 21, 73,167,221,188,188,245,214, 91,160,148,162, 78,157, 58,152, 54,109, 26, 90,182,
+108, 89,225, 99, 84,242,184,151,196, 85,244,170, 60,205, 57,115,230,220, 83, 89,122, 34, 12, 86,121,119, 37, 28,199,193,223,223,
+223, 81, 56,156, 11,222,189,220,233,242, 60, 15,171,213,234,232, 56,109, 95, 0,160, 87,175, 94,216,188,121,179, 59, 35, 35,182,
+ 18, 66,134,214,174, 93,251,135,233,211,167,107,218,181,107, 39,132,132,132,160,105,211,166,184,124,249, 50,254,248,227, 15,203,
+252,249,243,181, 58,157,110, 4,165,116,199,189,212,201,246, 71,207, 56, 47, 21,193,102,179, 37,196,199,199, 7,127,249,229,151,
+ 60,199,113,152, 51,103,142,243, 67,174,239, 42,132, 71,142, 28,177,186,106,146,177, 90,173, 9,241,241,241,193,179,103,207,230,
+ 9, 33, 14, 77,231,201, 95,157,247,157, 59,154,165,153, 75,251,128,135,210,150,210,210, 94,218, 49, 46,111, 34, 81, 65, 16,112,
+249,242,101, 76,157, 58, 21,132, 16,252,246,219,111,143,197,201,117,240, 88,242,210, 86, 77, 66,124, 6,245,111, 95,143,128,131,
+201,124,247, 0, 52, 62, 51,199, 97,174,158,153,189, 26,235,223, 30,232,142,217,185,118,236,216, 49,223,207, 63,255, 92,224,121,
+ 30, 95,127,253,117,177,201,126, 75, 30,247,163, 71,143, 90,239,169,121,175,232,124, 54,155,205,208,235,239, 45,106, 66, 57,114,
+104,206,231, 31,118, 89,244,227,102, 9, 33, 38, 28,222,251, 27,114,115, 74, 31,154, 46,147, 8, 88,177,106,147, 85,224,185,132,
+127,249,208, 45,234,220,185,243,212,157, 59,119, 10,149, 43, 87,190,103,145, 54,192,230,121,243,230, 61,245,252,243,207,251,214,
+174, 93, 27,235,215,175, 7, 0, 89,209,130,162,153,221,183,186,103,146,196,141, 95,127,241,225, 11,139,127,220, 44,227,136, 25,
+135,247,253,134,220, 18,102,189, 36, 82,169, 4, 43, 87,109, 52, 11, 2,127,201, 85,189,238, 28,189,186,223, 11,162,115,217,107,
+212,243, 37,124,251,199, 98, 4,212,235,142, 1,189, 98,113,224,219,231, 49, 32,218, 0,243,154, 33,168,219,127, 57,150,189, 83,
+ 24,189,105,184,246, 93,183,174, 63, 30, 30,106, 71, 7,114,142,227, 32, 87,168, 32,145,255,191,255,144, 76,165,130, 80,129, 72,
+150, 61,239,229, 69,170, 42, 26,193,226, 56, 14,145,145,145,168, 90,181, 42, 90,183,110,141, 70,141, 26,161, 67,135, 14, 56,125,
+250, 52, 78,159, 62,141,113,227,198,149,105,174,220, 57, 70, 93,186,116,193,165, 75,151,238,187,144,151, 60,238, 15, 2,119,202,
+210,107,175,189, 6, 0, 79,110, 31, 44, 87, 59,207, 94, 32,233, 3,232,140, 74, 8,129,201,100,114, 52,189, 57,207,171,100,239,
+244,238,230,124, 80, 59, 8, 33, 49, 31,124,240,193,120,133, 66,209, 65,167,211,213, 4, 0,181, 90,125,217,104, 52,254,165,215,
+235,191,166,148,230,220, 79, 90,157,167,101, 40, 37, 31,229,238,140,244,244,244,110,195,134, 13,219,193,113, 92,100,121, 15,231,
+117,186,243,191,153,154,154,250,148, 43,205,161, 67,135,150,170, 89,154,174, 59,154,165, 29,115, 81, 20,203, 52, 87,238, 84, 64,
+174, 38, 18,149, 72, 36, 80,171,213,216,176, 97, 3,252,253,253, 31,171, 19,236,208,241,228,207,203, 91,223,222, 95,190, 23, 64,
+165,103,102,175,190,189, 39,195, 20,222,222, 95,118,107,253,219, 3,171,148,247,155,236,236,236,174,111,189,245,214,159,130, 32,
+ 68,150,119,188,157,140,120,124,122,122,122,133,167, 61,160,148,226,210,165, 75,226,203, 47,191,156,145,158,158,254,220,189,228,
+127,236,248, 47,190,154,247,229,155,126,253,251,180,105, 10, 66, 96, 50,149,209,169,151,128, 82, 74,169,192,115, 9,175,191, 53,
+251,149,127,243,152, 81, 74, 79, 17, 66, 62,170, 86,173,218, 72, 0,101, 93, 9,127,113,165,179, 7, 48,203,140,198, 47,155, 52,
+105, 50,233,221,119,223,245,238,213,171, 23, 42, 87,174, 92,230,124,129,229,113,224,104,226,200,150, 77,130,195,250,245,110,211,
+141, 35,132, 26, 77, 70, 23,245,106,209,254, 20,248, 75,123,143, 36,212,119, 21,157,231, 56,174,194, 93, 20,220,161, 83,255,225,
+232,212,127,184,163, 60,237, 92,211, 30,113,201, 59,208,152, 75,132,113,113, 27, 16, 79,123, 81,231, 93, 94, 39, 56,142, 67,239,
+101, 27,139,165,179,245,103,197,163,179, 53,199,124, 80,161,107,143,243,224,171, 7,213, 7,139,231,121,100,100,100,224,242,229,
+203, 72, 77, 77,133, 78,167,195,133, 11, 23, 96, 54,155,145,157,157, 13,251, 72,195,123, 73,231,131, 58, 70,255,166,230,147,212,
+ 76, 88, 33,131,101,179,217, 18, 93, 61,245,220,106,181, 86,104,148,145, 32, 8,134, 54,109,218,144,210, 70, 27,216,223, 43,149,
+ 74,189,155, 21, 99, 14,128,169, 0,166, 22, 61,111, 10, 89, 89, 89,247,237, 2,109, 54, 91,114,179,102,205,248,242, 12,145,205,
+102, 75,117, 97,134,180, 0, 90, 62,200,131,247, 79,104,150,114,124,180,237,218,181,187,107, 30, 19,231,227,163, 80, 40,202,237,
+117,235,106, 34, 81,157, 78,151, 50,108,216, 48,155,115,179,160,243, 68,164,143, 53,132,222,234, 49,232,165,240, 61, 25,166,112,
+ 0,176,155, 44, 80,122,171,172,159, 36, 39, 39,235, 1,180,251,167,147,118,227,198, 13, 83,243,230,205, 87,230,231,231,191, 70,
+ 41,189,231, 94,250,227, 38,204,121,247,191,118, 88, 40,165,167, 0,140,186, 95, 29, 19,112,177,142,193,240,218,180, 15, 62,120,
+246,195, 15, 62,168, 33, 2,126, 64,225, 28, 85, 60,176,186, 34, 90,135,143,167, 60,240,185,193,108, 54, 91, 98,171, 86,173, 42,
+ 20,169,113, 85,199, 91,173,214,114,175, 19,171, 80, 25, 56, 94, 49,205,127, 34,157,206,154, 13, 26, 52, 64,195,134, 13, 29,175,
+118, 74,126,239,142,102,227,198,141, 81,167, 78,157, 50,103,104, 47,217,231,234,223,206,187, 93,211,110,251, 27, 54,220,254,192,
+ 52,239, 55,157, 79,148,193,178, 63, 99,240, 65,114,254,252,249,127,228,217, 40,148, 62,184,177,222,231,207,159,111,138, 39,148,
+ 75,151, 46,249,221,175,134,171,137, 68,207,156, 57,211,225, 73,221,191,123,210, 77, 47,222,245, 93,145,217,250,183,209,106,181,
+ 85, 40,165,247,212, 51,191,127,255,254,182, 39,245,152,130,210, 98, 19, 79,157, 47,156,160,244,167, 71, 49,169,231,206,157,123,
+224,117,250, 63,113,157,248, 39,210,201,242,254,232,107,254,215, 97, 51, 68, 50, 24,140,178,110, 82,108,108, 47, 48, 24, 12,198,
+189, 65, 0,116, 46,163,114,117,123,228, 14, 33,164,243, 61, 84,222, 59,153, 38,211,100,154, 76,147,105, 50, 77,166,249,100,105,
+186,210,126,208, 35,135,255,205,187,212,127,108, 1,208,153,105, 50, 77,166,201, 52,153, 38,211,100,154, 76,243, 73, 91, 88, 19,
+ 33,131,193, 96, 48, 24, 12,198, 3,134, 25, 44, 6,131,193, 96, 48, 24, 12,102,176, 24, 12, 6,131,193, 96, 48,152,193, 98, 48,
+ 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,131,113,239,144, 7, 56, 31, 39,131,193, 96, 48, 24, 12, 6, 3, 44,130,
+197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,
+131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,131, 25, 44, 6,131,193, 96, 48, 24, 12,
+198,163, 96,176, 8, 33,157,153, 38,211,100,154, 76,147,105, 50, 77,166,201, 52,153,193, 98, 48, 24, 12, 6,131,193, 96, 48,131,
+197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24, 12,102,176, 24, 12, 6,
+131,193, 96, 48,254, 37, 8,128, 82, 71, 2, 80, 74,119,186, 45,114, 15,163, 9, 92,233, 51, 77,166,201, 52,153, 38,211,100,154,
+ 76,243,241,211,116,165, 93, 17,255,241, 72, 67, 41,253,199, 22, 0,157,153, 38,211,100,154, 76,147,105, 50, 77,166,201, 52,159,
+180,133, 53, 17, 50, 92,221, 97, 8,132, 16,225, 94,215, 63, 44, 77, 6,131,193, 96, 48, 30, 37,216, 69,140, 81,158, 17,106, 9,
+160,103,209,251,223, 41,165,135, 43,178,254, 97,105, 62, 44, 26, 55,110,172, 84, 40, 20, 93,119,239,222, 45,187,112,225, 2,254,
+254,251,111,186,114,229, 74,179,193, 96,216, 30, 23, 23,167,103, 37,230,191, 79,163, 70,141,186, 1,152, 82,244,241,211, 19, 39,
+ 78,108,187,207,115,136, 84,171, 86,109,156, 76, 38,235, 33,149, 74, 67,172, 86, 43, 49, 26,141,201,122,189,126, 71, 82, 82,210,
+108, 74,169,120, 15,154, 77,253,253,253, 71,197,196,196,212,184,113,227, 70,194,237,219,183, 87, 0,216, 6,160, 91,149, 42, 85,
+134, 69, 69, 69, 85, 62,119,238,220,149,140,140,140,133,148,210,191,255,173,116, 50, 24,204, 96,185,119,242,113, 62, 62, 62, 93,
+148, 74,229, 27, 5, 5, 5, 13, 61, 61, 61,207, 91,173,214,121, 41, 41, 41,191,179, 19,239,177, 53, 87, 2,128,158,148, 82, 9,
+ 0,240, 60,223,167,101,203,150,225,132, 16,145, 16, 66, 41,165,132,227,184,134, 54,155,141, 43,218,190, 39, 33,228,111, 74,169,
+181, 34,154,205,155, 55,175, 44, 8, 2,165,148, 18, 74, 41,199,113, 92,253,138,104, 62, 40, 98, 98, 98,102, 81, 74, 67,202,219,
+ 70,173, 86, 55,217,189,123,119,173,141, 27, 55,218, 86,172, 88,145, 51,104,208, 32,205,240,225,195,133, 31,127,252,241, 59, 0,
+111,148,220,190, 78,157, 58, 95,113, 28,231,239,206,255,139,162,152,113,254,252,249,183, 88,201,251,215,153,242,242,103,123,219,
+ 82, 10,124, 63,165, 29, 87,100, 92,238,153,134, 13, 27,254,212,183,111,223, 65, 53,107,214, 20, 68, 81,132,197, 98,129,201,100,
+170,117,226,196,137,246,219,183,111,111, 2,224,185, 10,158,151, 61,167, 76,153,178,228,163,143, 62,170, 36,145, 72,136,197, 98,
+105,241,235,175,191,118, 31, 53,106,212,169,133, 11, 23, 54, 24, 48, 96,128,135,253,251, 15, 63,252,240, 41, 66,200,120, 74,233,
+ 47, 15, 59,157, 12, 6,195,133,193,242,240,240,168, 94,169, 82,165,183,253,252,252,158,106,210,164, 73,238,171,175,190,122,253,
+218,181,107,103, 35, 35, 35,117, 63,254,248,227, 76,139,197, 50,191,102,205,154,219,243,242,242,102,223,185,115,231, 66, 5, 43,
+138,234, 0, 94, 5,240, 20,128, 48, 0,201, 0,254, 4,176,132, 82,122,233, 94, 50, 19, 26, 26, 90, 79,173, 86, 79, 34,132,180,
+208,106,181, 97,106,181, 58,153, 82,122, 52, 63, 63,255,139,148,148,148, 19,247,162, 25, 22, 22, 86, 21,192, 88, 65, 16, 98,109,
+ 54, 91, 36,207,243,183,108, 54,219,126,155,205,246,109,114,114,242,149,123,209,108, 93,217,163,151,168,241,156,109,225,149,149,
+ 11, 12, 86,169, 70, 46, 88, 36,162, 33, 65,212,230, 76, 57,122,187,224,183, 71,177,160,200,100, 50,110,197,138, 21, 13,100, 50,
+ 25, 0,192,100, 50, 33, 38, 38,134,220,143,166, 68, 34,225,102,207,158,221, 72, 16, 4,152,205,102, 49, 63, 63,159, 62,251,236,
+179,255, 74,179, 53, 33, 36, 44, 46, 46,206, 75, 42,149,150,186,222,102,179,161,119,239,222,145, 82,169, 20, 11, 22, 44,176,100,
+102,102, 54, 92,186,116,233,137,249,243,231,251, 47, 91,182,172,127,105, 6,139,227, 56,255,178, 52,109, 54, 27,204,102, 51,172,
+ 86, 43, 76, 38, 19, 58,116,232,192,106,163, 71,131,112, 0,216,114,218, 0, 0,190,247, 43,166, 84, 42,163,159,121,230, 25, 33,
+ 61, 61, 29, 18,137, 4,102,179, 25,119,238,220, 65,181,106,213,248,141, 27, 55,214,172,168, 94,173, 90,181, 70,125,242,201, 39,
+ 1, 91,182,108, 49,175, 92,185,210,216,185,115,103,233,136, 17, 35, 60,219,182,109, 27, 27, 22, 22,198,253,240,195, 15,198,157,
+ 59,119,154,135, 14, 29, 42,159, 53,107, 86,192,159,127,254, 57, 8,192, 47, 15, 59,157, 12, 6,163, 28,131,229,225,225,177, 87,
+163,209, 84,123,229,149, 87, 46,189,246,218,107,219, 53, 26,141, 13, 0,126,254,249,103,161, 79,159, 62,233,207, 62,251,108,154,
+ 78,167,227,231,207,159, 95,229,155,111,190,217,225,225,225,145,148,159,159,223,204,141, 11, 25, 1,240, 6,199,113, 99,187,118,
+237,186,215, 98,177,164,111,218,180,105,205, 51,207, 60, 19, 75, 41, 85,239,222,189,251, 15, 66,200, 34, 0, 95,186, 27, 29, 35,
+132,240, 81, 81, 81,211,194,194,194, 38, 44, 88,176, 64, 30, 21, 21, 5,165, 82,137,252,252,252, 42, 87,174, 92,169,252,198, 27,
+111,244,174, 90,181,234, 60, 47, 47,175,247,227,226,226, 44,110,106,146,144,144,144, 55, 61, 61, 61, 63,158, 53,107,150,162,118,
+237,218, 68,173, 86, 35, 62, 62,190,238,145, 35, 71, 98,150, 46, 93, 58, 34, 44, 44,108,122, 82, 82,146,219,233,108, 79,136, 96,
+168, 90,105,187, 79,173,102,237, 23, 46,249,158,248,171, 85, 16, 8,129,197,108,150,164,234,244, 81, 99, 70,143, 92,211,178, 70,
+208,193,124, 73,106,167,243,231,169,249, 95, 50, 26,114, 0,160,148, 26, 9, 33,191,243, 60,223, 71, 38,147,113,125,250,244,193,
+206,157, 59,137,193, 96, 16, 0, 64,161, 80, 88,251,244,233, 3,165, 82, 9,147,201, 36, 2,248,189,172, 72, 83,105,154, 18,137,
+132,235,208,161,131,238,216,177, 99, 89,118, 77,149, 74,101,233,208,161,131,159, 76, 38, 83, 90,173, 86, 90,158,230, 63,100, 34,
+113,237,218,181, 98,223,229,231,231, 35, 61, 61, 29,153,153,153, 48,153, 76,200,201,201,129, 40,138,196,104, 52,166,139,162, 8,
+142, 43, 12,182,149,165, 41,149, 74,113,249,242,229, 98,223, 89,173, 86,104,181, 90, 24,141, 70,152,205,102,232,245,122,165, 66,
+161,168, 30, 27, 27,155, 8, 96, 99, 65, 65,193,236, 83,167, 78,221, 98,213,211,191,194,237,223, 79, 26,170, 0, 48, 1,136,127,
+ 0,231,147, 8, 0,251,247,239, 71,106,106, 42, 50, 50, 50,144,158,158,142,176,176, 48,220, 75,244,255,210,165, 75,115, 27, 54,
+108, 72, 78,157, 58,181, 25,192,146,213,171, 87, 63,147,149,149,181, 96,226,196,137,190, 95,124,241, 69,214,164, 73,147, 70, 3,
+ 88,191,122,245,234,225,245,234,213,235,117,230,204,153, 57,255, 70, 58, 25, 12, 70, 57,243, 96, 81, 74, 67,170, 87,175,158,245,
+245,215, 95,215,154, 50,101,138, 95, 65, 65, 1, 95, 20, 37, 50, 16, 66,168, 78,167,227, 39, 79,158, 92,233,211, 79, 63,173, 37,
+151,203,179,173, 86,107,165, 82, 52, 74, 27,106, 57,214,211,211,179,119,124,124,252,234, 90,181,106,249,126,242,201, 39, 39,149,
+ 74, 37,157, 59,119,110, 92,213,170, 85,131,111,221,186,181,220,211,211,179, 35,128, 9,101,164,235, 46,205,200,200,200,143,251,
+247,239, 63,225,224,193,131,242,250,245,235, 67,163,209,128,231,121,120,123,123,163,121,243,230,100,223,190,125,242, 30, 61,122,
+140,203,205,205,253,194, 93,205,144,144,144,119,187,119,239, 62, 51, 46, 46, 78,217,169, 83, 39, 34,147,201,144,157,157, 13,185,
+ 92,142, 22, 45, 90,144,133,243,191, 83,214,173, 83,251,195,176,176,176,143,220,213, 52, 87,247,223, 49,232,245,201, 29,126,255,
+115, 27, 9, 12, 12,196,245, 47, 63,194,254,182, 49,184, 58, 99, 10,130,131,131,177,121,203, 86,210,235,133,215,219,120, 90, 2,
+119,187,171,121,191, 56,107, 18, 66, 94, 3,144, 5, 32,139, 16,242, 26,165,244,112, 76, 76, 76,220,133, 11, 23, 16, 27, 27,139,
+ 53,107,214,212,159, 56,113,226,107, 19, 39, 78,124,109,205,154, 53,245, 99, 99, 99,113,225,194, 5,196,196,196,196, 57,247,149,
+114, 71,115,239,222,189,232,216,177, 99,246,154, 53,107,162,166, 78,157, 58,107,234,212,169,179, 86,175, 94, 93,181, 99,199,142,
+217,115,230,204, 49,150,167,249, 79,228,221, 57,178,228,188,136,226,255,175, 45, 1, 1, 1,105,191,255,254, 59,122,245,234,197,
+ 5, 6, 6,166,244,233,211, 71,126,236,216, 49, 10,224,247,138,164,211, 96, 48, 64,175,215, 67,171,213,226,246,237,219,202,249,
+243,231,183,153, 48, 97, 66,181, 53,107,214,132,142, 27, 55,110,180,167,167,231,137, 6, 13, 26,132, 63,236,188, 51, 77,128,227,
+184, 59, 0,204, 0,180, 28,199,221,186, 31,205,126,253,250,213,141,136,136, 8,252,245,156, 15,178,165,181, 32, 74,189, 33, 74,
+189, 97,243,107,138,107,178,167, 16, 26, 26, 26, 24, 30, 30,222,178, 34,154,148,210, 29, 39, 79,158,124,138, 82,186,144, 82,106,
+163,148,174,157, 52,105,210,203,132,144,223, 38, 77,154, 52,146, 82,186,182,232,251,165,167, 79,159,238, 69, 41,253,235,223, 72,
+ 39, 43, 75, 76,147, 81,142,193, 34,132, 88, 62,255,252,243, 35,223,127,255,253,206,148,148,148,224,168,168,168,167,159,121,230,
+153,240,220,220, 92,242,204, 51,207, 68, 6, 7, 7,247,220,187,119,111, 80,255,254,253,119,247,239,223,255, 48, 33,196,101,164,
+129, 16, 82,149,231,249,241,167, 78,157, 58, 80,165, 74, 21,115,114,114,178, 71,195,134, 13,243, 1,160, 70,141, 26,186,204,204,
+ 76,165,151,151, 23,182,110,221,122,140, 16,242, 42, 33,164,150, 43,205,224,224,224, 70,126,126,126,111,124,252,241,199,114,158,
+231, 75,221, 70, 46,151,227,227,143, 63,150,123,122,122,190, 18, 26, 26,218,194,149,102, 80, 80, 80,109, 15, 15,143,247,190,249,
+230, 27,133,209,104,132,201,100, 66, 96, 96, 32, 52, 26, 13, 82,146,147,145,124, 51, 30,169,241, 55, 48,238,229,151,148,106,165,
+114,124, 72, 72, 72, 3, 87,154,177, 17, 30,125,212, 97,117,218,143, 25,251, 6,206,141, 27,142,157,161, 50, 4,141,157,140,250,
+123,206, 34,108,250,108,252, 21,229,137,184,231,186,224,205, 55,223,130, 52, 32,170, 85,171,202,154,129,255, 66,228,234, 11, 74,
+169,146, 82,170, 36,132,204,109,213,170,213, 74,165, 82,249,218, 39,159,124,210,109,251,246,237,221,247,237,219,215,222,106,181,
+ 74,172, 86,171,100,255,254,253,177, 6,131, 65,144,203,229, 16, 4,129,186,171,217,178,101,203,159,148, 74,229,232, 5, 11, 22,
+116,251,235,175,191,134, 29, 63,126,252,117,155,205, 38,179,217,108,178,227,199,143,143,212,235,245, 18, 74,169,173, 44,205,135,
+141, 68, 34,129, 84, 42,133, 82,169, 68,195,134, 13,175,175, 90,181,202, 18, 28, 28, 44, 89,178,100,137, 79, 96, 96,160,122,217,
+178,101, 57, 57, 57, 57,159,185,171,103, 54,155, 97, 52, 26,161,215,235, 97, 48, 24,112,232,208,161,200, 17, 35, 70, 8, 38,147,
+201, 54,108,216,176, 44,139,197, 98, 28, 51,102,140,167, 70,163,121,155, 85, 79, 15,159,162,136,105, 1, 0, 45,165,212,104,255,
+ 62, 34, 34, 66, 30, 26, 26, 90, 47, 34, 34, 66,238,174, 86, 65, 65,193,162,175,190,250, 42,140,147,123,227,128,169, 7,126, 17,
+167, 99,187,215,183, 72, 11,159,128,128,176,106,232,222,189,123, 0, 33,228,219, 7,144,230,141,148,210,254,148,210,117,247,242,
+251,127, 58,157, 77,155, 54,141,109,210,164,201,241,198,141, 27,167, 52,105,210,228,120,211,166, 77, 99,239, 55,207,207,197,144,
+206,195, 26,240,137,253,235, 16, 58,172, 1,159,248, 92, 76,197,231,106, 98, 48,254,105, 92,118,114,175, 84,169,146,233,221,119,
+223, 61,101, 48, 24,206,254,244,211, 79,213,134, 14, 29,218, 48, 60, 60,252,242,179,207, 62,251,135, 70,163,177,218,251,228,184,
+201, 75, 61,122,244,216,226,239,239,143,220,220, 92,193, 98,177,240, 90,173,150, 7, 0, 81, 20, 97, 48, 24,248, 27, 55,110, 8,
+ 70,163,145,182,104,209, 98,211,225,195,135, 95, 5, 48,190, 60, 65,181, 90,253,218,226,197,139, 21,101,153, 43,155,205,134,252,
+252,124, 88,173, 86, 76,159, 62, 93, 49, 97,194,132, 55, 0, 28,113,113, 81, 29, 59,119,238, 92,185,213,106, 5,199,113,160,148,
+226,196,137, 19,200, 76, 75,131, 33, 63, 15,198,188, 92,152,243,114,193,107,243, 49,236,169,110,138,133,235, 54,188, 5, 96, 88,
+121,154, 38,185,230,211,159, 22, 47,133,205,102, 67,202,198, 95, 75,221, 38,235,224, 30,216,172, 22,124,242,217, 23,228,205,151,
+ 6,124, 2, 96,245,191, 85, 48,228,114,185,176, 98,197,138,193, 50,153, 12,148, 82, 98, 50,153,176,125,251,246,251,214, 92,190,
+124,249, 48,187,166,217,108,166,117,235,214,189,171,121,205,104, 52,210, 71,229, 4,145,201,100, 80, 40, 20, 48,155,205,168, 82,
+165,138,190,119,239,222,135,230,206,157, 91,133,231,121,181, 32, 8, 91,115,115,115,103,157, 59,119,238,134,187,122, 69,157,135,
+ 97, 50,153,160,215,235,113,251,246,237,160,208,208, 80,242,222,123,239,217,116, 58, 93,212,210,165, 75,175,253,250,235,175,170,
+111,190,249,230, 89, 0, 99, 89, 21,245,240,168, 86,173,154,204,211,211,211,171,138,159,160,149,240, 40, 72,163,212, 35, 34, 34,
+ 34,220, 98,177, 60, 75, 8,105, 81,163, 70, 13,159,171, 87,175,102,135,134,134, 30,225, 56,238,151,132,132,132, 20, 23,198,135,
+ 88,173, 86,140,108,150,131,215, 90,242,176, 88,114,145,155,155,139, 91,183,110,225,252,249,243, 56,122,244,220, 61,165, 51, 50,
+ 50,242, 37,133, 66,209, 85, 38,147, 69,216,108, 54, 78,167,211,221, 50, 26,141, 59,147,147,147, 23,209,162, 9,138, 42,104,208,
+254,145,116, 58,233,207,126,230,153,103, 66,188,188,188,112,242,228,201,144,211,167, 79,207, 6,208,228,190,206, 75,129,251, 97,
+198,151,223,134, 6,251,123,227,220,193,205,161,115,150,252,250, 3, 10,251,242, 50, 24,255, 29,131,101, 71,161, 80,216, 70,141,
+ 26,117,121,211,166, 77, 17, 77,154, 52,185, 88, 86,103, 96, 23,180,142,142,142,190,117,232,208, 33,248,250,250,154, 45, 22, 11,
+111, 48, 24, 56,169, 84, 74,179,178,178,136, 94,175,231, 78,159, 62,173, 72, 76, 76,148,250,248,248, 72, 0, 52,114, 35,194,208,
+ 50, 50, 50,178,116, 83, 99, 50,161,160,160, 0,249,249,249, 48, 26,141, 8, 12, 12, 36, 28,199, 53,119, 25,214,227,184, 54, 53,
+107,214, 36,217,217,217, 8, 9, 9,193,193,131, 7, 81,144,147, 3, 67,126, 30, 76,121,185, 48,231,230,192,146,155,131,156,180,
+100, 68, 4,135,145,162,169, 5,202,197,202, 43,195, 3, 52,106, 92,157, 49, 25, 77, 79,220, 2,145, 72,113,172,110, 48,168,165,
+176,171, 85,179, 51,201, 32, 82, 25, 46,142,123, 17,129, 67, 95,129,133,147,135, 62,228, 59,119, 35, 33,100, 34,199,113,115,229,
+114,185, 48,122,244,104,164,164,164, 20, 51, 63,163, 71,143,118,244,185,106,219,182,237,126,133, 66, 97, 77, 79, 79,135,209,104,
+148,184,163, 25, 17, 17,113,235,253,247,223, 63,102, 50,153,194, 66, 66, 66,188,141, 70,163,190,102,205,154, 33, 74,165, 50,208,
+100, 50,217,154, 52,105,178, 72,169, 84, 90, 10, 10, 10,168,213,106, 37,143,194, 9, 66, 8, 1, 33, 4, 86,171, 21, 86,171, 21,
+222,222,222,218,204,204,204,163,215,175, 95, 31,124, 47,122, 22,139, 5, 22,139,197, 17,197, 18, 69, 17,103,206,156,129, 66,161,
+144,136,162,120,206,102,179,169, 36, 18, 9,120,158,103,115,212, 61, 68, 26, 55,110,220,190,126,160,231, 87,163, 67,140,222, 85,
+123,169,181, 42, 25,175,253, 34, 83, 25,241,199, 79,218,213, 61,123, 12,244,152, 48, 97, 66,184,175,175,175,226,198,141, 27,134,
+ 57,115,230, 68,174, 95,191,158, 0,248,178, 60,205,228,228,228,223, 62,253,244, 83,223,246,237,219, 71, 73, 36, 18,146,147,147,
+131,244,244,116,164,165,165,225,246,237,219,244,230,205,155,215,173, 86,235,154,138,164,179,126,253,250, 75,135, 14, 29,250,124,
+157, 58,117, 36,148, 82,152,205,102,232,116,186,134, 71,143, 30,237,125,224,192,129, 88, 0, 21, 46,151, 41, 41, 41,107, 62,251,
+236, 51,117,187,118,237,106, 73, 36, 18,238, 65,164,179, 68, 61, 16,162,209,104,176,115,231, 78,120,123,123,195,213,104, 93,119,
+ 48, 90,196,208,160, 0, 63, 24, 14,126,133,234,190,225, 48, 90,196, 80, 86,138, 25,255, 89,131,149,158,158, 46,211,106,181,130,
+ 40,138,124,110,110,174, 74,165, 82, 89,101, 50,153,169,130,255, 87,167,119,239,222,199,154, 55,111, 94, 80, 20,209,176, 4, 4,
+ 4,152,115,115,115, 33,138, 34, 68, 81,180,122,122,122, 22, 88, 44, 22, 68, 69, 69,113, 0, 92, 54, 17,234,245,250, 42, 74,165,
+242,174,239,117, 58,157,195, 92, 21, 20, 20, 64,167,211,193,203,203, 11, 90,173,214,229,201,109,179,217, 34, 84, 42, 21,146,147,
+147, 1, 0,249,217, 89, 48,230,229,193,148,255,127,115,101,203,201,134,168,215,194, 59,172, 50,172, 86,107,101, 87,154, 90,163,
+ 77,198,131, 34,109,243,111, 8,124,109, 98,153,219,101, 31,216, 3,143,234,209,208,235,205, 15,125,142, 50, 74,233,252,134, 13,
+ 27, 54, 90,191,126,253,136,164,164,164,187,214,247,237,219, 23, 99,199,142,197,152, 49, 99, 46, 62,253,244,211,167, 55,111,222,
+140,215, 95,127, 29,162, 40, 54, 32,132,228, 82, 74,255, 44, 79,115,202,148, 41,199, 19, 18, 18,246, 92,185,114,101,116, 64, 64,
+128,188, 94,189,122, 87,235,213,171,199,175, 95,191, 62,240,149, 87, 94,137,235,222,189,251,205, 93,187,118,249,238,220,185, 83,
+ 33,138, 98, 99, 66, 72,210,191, 61, 15,150,189,137,216,100, 50,193, 96, 48,192,108, 54,195,102,179,145, 10,236,211, 98,159, 69,
+ 81,116,152, 53,163,209, 8,139,197, 66,118,236,216,142,205,155, 55,115, 23, 46,156, 15,155, 50,229, 29,228,230,230,194,102,179,
+177,218,233, 33,208,164, 73,147,167, 4, 42, 46, 30, 26,100, 85, 12, 14,180,106,165,132, 22, 92, 89,252,126, 65,124,184, 70,235,
+233,207,155, 60,253, 36, 33,147,167, 76, 14,190,126,237,186,241,243,207, 63,191,208,179,103,207,128, 87, 94,121,165,246,150, 45,
+ 91, 98,171, 84,169,242,253,237,219,183,115,202, 48,230,210, 17, 35, 70, 28,245,246,246,174,186,114,229,202,180,164,164, 36, 31,
+139,197,162,178, 88, 44,102,131,193,112,205,108, 54, 31, 48,153, 76, 59, 83, 82, 82,226, 42,146, 94,141, 70, 83,127,192,128, 1,
+146,156,156, 28, 20,141,190, 69, 90, 90, 26, 26, 53,106,196,239,218,181,171,206,189,236,131,243,231,207,127, 21, 18, 18,178,103,
+211,166, 77, 93,213,106,117, 99,153, 76, 22, 36,138,162, 77,175,215,167, 26, 12,134, 83,247,146,206, 18,251, 34,249,196,137, 19,
+ 33,158,158,158, 72, 72, 72, 0, 33, 36,249,126,143,155, 66,202, 37, 92, 56,176,169,114,117,223, 72, 28, 61,114, 4, 10, 41,151,
+192, 74, 51,227, 63,101,176,242,243,243,133, 19, 39, 78,248, 36, 36, 36,104,252,253,253, 13,181,107,215,206, 37,132,136, 28,199,
+209,148,148, 20,223,248,248,120,133,159,159,159,182,106,213,170, 89,110,254,223,149,113,227,198,197, 78,157, 58, 53,174, 75,151,
+ 46, 25, 0,144,157,157,141,204,204, 76,164,167,167,195,108, 54, 35, 57, 57,153, 59,126,252,184,239,214,173, 91, 27, 2,112,217,
+244,162, 84, 42,111,231,231,231,215,244,246,246,118, 92,208,236,166,202,217, 96,217,163, 89,106,181,218,229,201,205,113, 92, 82,
+ 82, 82, 82, 53,131, 94,143,219, 87,175,194,152, 95,216, 36,232, 48, 87,185, 89, 64, 65, 62,212, 10, 5,242,179, 50,193,243,252,
+ 29, 87,154,106, 57,111,178, 88,109,178, 74,221,123, 3,164,236,235,179, 87,179,214, 16,107,213,131, 82,185,214,242,111, 20, 8,
+142,227,108,229, 53,251,202,100, 50, 4, 6, 6,138, 45, 90,180,192,235,175,191,110, 55, 2,132, 16,210,158, 16,114,128, 82, 90,
+ 80,150,166, 40,138,220,133, 11, 23,158,185,118,237, 26, 47,145, 72,184,230,205,155,199,180,105,211,198, 36,147,201, 32,149, 74,
+133,130,130, 2,143,157, 59,119, 42, 44, 22, 11, 41,210,124,104,243, 96, 1,133,163,251, 74, 49,240,208,106,181,208,235,245, 40,
+ 40, 40, 64, 78, 78,142,160, 84, 42,107,182,109,219,246,136,209,104, 92, 99,179,217,126,136,139,139,203, 43, 75,211,108, 54, 23,
+ 51, 91,162, 40,130, 82, 10,155,205, 6,139,197, 2,137, 68, 34,110,218,180, 25,223,204,159,139,181,171,215,209,206,157, 59,147,
+173, 91,183, 66, 20,197, 68, 86, 61,253,243,136,162, 56,251,175,201,253, 20,176,218,180,198,189,171, 10,182,101, 9,218,239,207,
+253,117, 92, 47,112,121, 85,106,163, 94, 68,229,170,188,151,167, 23,183,108,249,226,204,173, 91,118, 95, 75, 76, 76,204,155, 49,
+ 99, 70,203,168,168, 40,175,203,151, 47,135, 2,200, 41,195, 8, 69, 12, 31, 62,124,120,118,118,182,116,201,146, 37,203,146,146,
+146,246, 82, 74,175,151, 48, 30,141, 8, 33, 95, 0,144, 0, 8, 4, 96, 5,176,131, 82,186,188, 28,179, 34, 18, 66,240,215, 95,
+127,221, 53,218, 79,116, 30,145, 81,241, 40, 86,118,243,230,205,235, 95,185,114,101, 99,118,118,246,202,146,235, 85, 42, 85,239,
+152,152,152, 65,199,142, 29,251,128, 82,122,173,130, 55,110,227, 47, 92,184,240,185, 40,138,225, 28,199,221,162,148, 78,122, 0,
+ 17,172,151,231, 44, 89,189,196, 96,182, 85, 81, 72,249,219, 70,139,248, 10, 43,205,140,255,140,193,178, 90,173,154,247,223,127,
+191,101,131, 6, 13, 82,218,182,109,123, 39, 50, 50, 82,103, 95,231,225,225,161,247,243,243,211, 27, 12, 6,229,173, 91,183,130,
+ 55,108,216, 80,195,102,179,169,220,248,191,221,222,222,222,190,199,143, 31,247,251,229,151, 95,170,159, 56,113, 34,124,200,144,
+ 33,237, 76, 38, 19,140, 70, 35,110,220,184, 17,190,120,241, 98, 81, 42,149,230, 16, 66,254, 6,224,242, 54,222, 98,177, 28,190,
+114,229, 74,141,230,205,155, 19,139,197,226, 48, 84,206, 38,171,160,160, 0, 82,169, 20,201,201,201, 84, 20,197,163,110,164,243,
+200,241, 99,199,170,213,173, 29, 13, 99,110,118,145,185,202,133, 53, 55, 27, 98,110, 22, 56,109, 1,252,124, 5,168, 20, 26, 92,
+ 78, 78, 65, 81, 90,203, 69, 98,213,223, 76,202,205,171, 89,109,218,151,248, 43,202, 19,212, 98,118, 52, 11, 2,112, 52, 23,182,
+186,152,142,253,135, 14, 67,176, 25,147, 30,213, 66,115,250,244,233,180, 33, 67,134,196,137,162,216, 8,229, 76, 81, 80,206, 93,
+120,126, 65, 65, 1, 50, 50, 50,108,153,153,153, 6, 0, 72, 75, 75,203,222,180,105,211, 5, 81, 20,155,221,139,230,131,192, 98,
+177,220, 21,125,178,217,108,176, 90,173, 48,155,205, 72, 79, 79,151, 29, 56,112,160,237,145, 35, 71,164,231,207,159,199,145, 35,
+ 71, 26,108,216,176,225,157,232,232,232,122, 23, 47, 94,188,227,202,180,145,210,141, 53, 15, 0,155,214,255,142, 65,131, 6,145,
+140,140, 12,108,216,176,225,129, 52,163, 48,220, 66, 11,171, 77,105,218,187,170,224,237,171,242,252,115, 58,126, 70, 92, 92,220,
+ 54, 74, 41,237,209,163,199,233,154,181,162,252, 1, 64, 46,211, 4,213,173, 91,183,157,143,143,143, 12, 0, 66, 66, 66, 26, 91,
+ 44,150,249, 0,218,148, 38,218,183,111,223, 86, 1, 1, 1, 13,255,252,243,207, 83, 73, 73, 73,251, 74,154, 43, 0,168, 89,179,
+230,244,179,103,207, 62, 37,145, 72,136, 83, 25,161, 0, 74, 53, 88,253,250,245,171, 25, 22, 22,230,183,229,138, 23,242,164,213,
+ 64,249, 92, 64, 80,192,230, 93, 31,183,164,181, 17, 20,116,201,175, 90,181,106, 13,174, 93,187,118,170,130, 17,166, 42, 3, 6,
+ 12,248, 99,233,210,165,209,221,187,119,151, 1,184,203, 96, 69, 71, 71, 63,187,107,215,174,254,163, 71,143,174, 79, 8,233, 69,
+ 41,189,234,174,126, 92, 92,220, 65, 0, 45, 31,228, 65, 91,115,142,238, 68,209,156,101, 12,198,127,206, 96,153,205,230, 29, 87,
+175, 94,109,218,175, 95,191, 12,103,115, 69, 41,117, 84, 6, 94, 94, 94,122,127,127,255,172, 83,167, 78, 85, 18, 69,113,175, 27,
+255,183,100,215,174, 93,127,205,155, 55,111,149,175,175,175,101,216,176, 97,220,228,201,147,247,103,102,102,210,204,204, 76,124,
+251,237,183,109, 99, 99, 99,247,223,186,117,203, 22, 23, 23, 55, 28, 64,119,151,181,163, 86, 59,255,245,215, 95, 31,180,127,255,
+126,133,125,158,162,146,209, 43,139,197, 2, 65, 16, 48,127,254,124,163, 86,171,157,235, 70, 36, 99,209,119,223,125,215,127,241,
+ 55,243, 20,188,217, 12, 75, 78, 22,172,185, 57,176,229,100,129,211,105,225,161, 32,168,222,168, 18,178,147,228, 88,177,237,160,
+222,106,181,126,231,210, 96, 25, 10, 38,142, 30,249,234,239, 59,118,255, 5,223, 54, 29,145,249,215,214,187,163, 67,149, 2, 97,
+ 50,155,241,241, 71,211, 40,209,231, 76,254,151,238,232,121,147,169,236,150, 95,147,201, 4, 81, 20, 19,207,159, 63,191,154, 16,
+146, 79, 8,105, 95,180,106, 79,105,209, 43,103, 77,142,227,196,218,181,107,175, 15, 12, 12,124, 6,128,182,118,237,218,235,229,
+114,121, 71,147,201,212, 92, 20,197,196,147, 39, 79,174, 35,132,220, 33,132,244, 44,250,233, 67,157, 7,203, 98,177, 96,234,212,
+169,248,244,211, 79, 49,101,202, 20, 71,126,237,205,132,102,179, 57,114,251,246,237,210,131, 7, 15,210,159,126,250, 41,243,185,
+231,158,243, 30, 50,100,136,247,138, 21, 43,198, 3,152, 84,150,230,164, 73,147,176,112,225, 66,140, 26, 53,234,110,119,197,243,
+ 98, 82, 82, 34, 76,102, 19, 93,190,124,121,178, 32, 8, 62, 95,127,253,181,114,194,132, 9,132, 85, 79,255, 60, 54,155,237,189,
+214,179, 55,188, 73,136,210,108,181, 90,231,158, 62,125,114,143,211,141,128,114,246,151,179, 5, 0,248,242,139,217, 18, 74,169,
+151,125, 98,216, 25, 51,102, 40, 70,142, 28, 25, 80,150,238,218,181,107,115,102,204,152,225,247,242,203, 47,119,223,179,103,143,
+138, 16,178, 5,192,223, 0, 50,138,110, 28,253, 1, 28,172, 84,169, 82,240,234,213,171,171,117,237,218, 85,237, 70, 93,247,253,
+130, 5, 11, 34,102,239,243,192, 22,237, 51, 72, 16,159, 3,245,166,240, 13,200, 71,109,205,109,116, 8, 77, 10, 89,185,114,229,
+ 18, 0,141, 43, 96,174,234,244,235,215,111,195,210,165, 75, 35, 95,125,245,213,196,131, 7, 15, 38, 16, 66,166,151,178,105,230,
+139, 47,190,120,107,217,178,101,213, 68, 81,220, 70, 8,233, 78, 41,189,194, 74, 16,131,113,111, 17,172,151, 8, 33, 49, 83,166,
+ 76,249, 60, 36, 36,164,202,180,105,211,226,107,215,174,173,117,156,109,153,153,154,189,123,247, 70,229,229,229,229, 91,173,214,
+ 97,148,210,211,165,156,188,157,157,231,202,160,148,222, 34,132,124,222,160, 65,131, 65,191,254,250,235, 94, 15, 15,143,188, 35,
+ 71,142,120,122,122,122,230, 94,184,112, 65,205,243,188, 46, 62, 62, 30,219,183,111,111, 11,224,155,210,238,146, 74,106,166,164,
+164,156,136,138,138,154, 59, 97,194,132, 55, 62,248,224, 3, 5,165, 20, 58,157, 14,121,121,121, 48, 26,141, 16, 4, 1,132, 16,
+172, 90,181,202,104, 52, 26, 23, 39, 37, 37, 29,113,165,153,156,156,124,184,114,229,202, 63,204,157, 51,231,229, 87, 6, 13,148,
+ 33, 55, 19, 57, 41, 73, 32,186, 2,104,148,114,196,116, 10,131, 54,147, 96,233,222,191, 77, 89, 70,243,234,164,164,164, 61,174,
+ 52, 15,220,206,255,163,101,141,128, 93, 51,102, 76,235,244,206,143,235, 32,138, 34, 46,190,254, 60,178,247,237,128,170,118, 61,
+180,186,152, 14,147,201,132, 41,147, 38,128,215,165,238, 63,114,187, 96,173, 43,205, 7,129,179, 38, 33,228, 53, 66,200,243,209,
+209,209, 24, 61,122, 52,250,246,237, 91,108,219, 13, 27, 54, 96,193,130, 5, 48, 26,141,207, 19, 66, 78, 80, 74,231, 19, 66, 14,
+ 20, 29,219, 2, 87,154, 17, 17, 17, 77, 99, 98, 98, 16, 18, 18,162, 43, 50, 23, 93,206,159, 63,223, 56, 58, 58,186,164,230,223,
+ 69,154,214,135,149,119, 74,105,246,213,171, 87, 61,191,248,226, 11, 98, 54,155, 49,125,250,116,216,141,166,189,229,229,221,119,
+223, 13,209,104, 52,248,242,203, 47, 77, 25, 25, 25, 29, 23, 44, 88,176,123,222,188,121,254,171, 86,173, 26,108, 55, 88, 37, 52,
+211, 46, 92,184,224,177,112,225, 66,206,106,181,226,171,175,190,186,171, 25,114,252,248,241, 48,155, 45, 16,120,193,100,208, 27,
+234, 40, 20,138,107, 62, 62, 62, 74, 81, 20,233,195,202,251,147,172,121,250,244,233, 29, 0,118,184,243, 59,131,193,128,244,244,
+116,100,100,100,160,168, 75, 2, 41, 43,157, 6,131,225,228,164, 73,147,226, 22, 45, 90,212,253,224,193,131,253,247,237,219,215,
+125,231,206,157,134, 91,183,110, 89, 45, 22, 11, 13, 14, 14, 22,218,180,105,163,232,209,163,135, 90, 46,151,115,239,189,247, 94,
+198,204,153, 51,253, 1,100,150, 83,127,242,148, 82,188,221, 54, 31,147, 58,240, 48,153,204,200,201,201, 65, 82, 82, 34,206,159,
+ 63,143,195,135, 47,130, 82,202, 85,112,127,206, 93,185,114,101,148, 76, 38, 35,171, 86,173,170,178,106,213,170,113,174,246,195,
+242,229,203, 35, 86,173, 90, 53,191, 72, 75,100,101,137,105, 50, 42,104,176,138, 78,232,115, 0,186, 19, 66,218,188,250,234,171,
+159, 69, 71, 71, 27,173, 86,171,100,219,182,109,181, 50, 50, 50,100, 86,171,117, 18,165,116, 95, 69,254,144, 82,186,144, 16,130,
+ 62,125,250, 76,170, 90,181,234,174, 19, 39, 78,212,239,221,187,247,182,245,235,215,183,177, 90,173,215,207,158, 61,251, 60,128,
+185, 0,190,113, 87, 51, 62, 62,254,253,157, 59,119, 90,143, 28, 57,242,246,228,201,147,229, 1, 1, 1,196,199,199, 7,201,201,
+201, 72, 76, 76,164, 63,254,248,163,209,104, 52,126,227,229,229,245,190,187,154, 50,153,236,237,125,199,227,200,229,107,215,134,
+191,244, 84, 87, 69,229, 26, 53,161, 33, 53,145,159,153,129,125,123, 82,177,236,239, 83,134, 84,131,233,103,158,231,221, 30, 74,
+ 31,122, 53,189,219,142, 95,150,254,185,103,215,238,206,179, 62,253,156,132, 12,125, 25,234,136, 72,136, 17,213,177,119,207, 30,
+204,156, 49,157,242, 5,169,251, 44,215, 82,187, 60,236,130, 96,159,179, 74, 20, 69, 1, 0,148, 74, 37,198,142, 29, 11,231, 71,
+227, 44, 88,176, 0,122,189, 30, 0, 4, 66,200, 23,132,144, 31,202,138, 90,149,161, 89,101,203,150, 45, 85,156, 53,163,163,163,
+ 75,211, 52, 62,236,252,167,166,166,190,255,226,139, 47,126, 34,145, 72,188,203,218, 70,173, 86, 35, 63, 63, 31, 54,155,205,230,
+235,235,123,201, 30, 25, 45,235, 60,210,106,181,239,143, 26, 53,234, 99, 66, 72,153,145, 14,165, 82,121,235,192,129, 3,213,135,
+ 12, 25,194,173, 94,189,250,198,224,193,131,229, 7, 14, 28,176, 1, 88,199,170,167, 71, 11,231, 1, 11, 90,173, 22, 0,104, 57,
+219,222, 38,132, 76,138,139,139, 83,140, 26, 53,170,241,208,161, 67, 61, 59,116,232,160,113,222, 70,175,215,139,155, 55,111,214,
+ 46, 92,184, 48,115,223,190,125,127,143, 24, 49,226, 25, 20,206, 32, 95, 42,201,201,201,127,124,243,205, 55, 94,237,219,183,175,
+ 97,179,217, 28,253,175,210,211,211,145,152,152,136,155, 55,111,222, 18, 69,113, 83, 5,179,245,250,144, 33, 67,182, 44, 91,182,
+ 44,252,213, 87, 95, 77,252,229,151, 95, 54, 1,200, 45,101, 59,205,179,207, 62,219,123,217,178,101,225, 35, 71,142,188, 13, 96,
+ 28,155,225,157,193,184, 15,131,229, 84, 89, 28, 0,208,146, 16,210,135,231,249,137, 5, 5, 5, 95, 81, 74, 55,222, 71, 69,181,
+144, 16,178,237,234,213,171, 47, 3,104,242,213, 87, 95,189, 3, 32, 1,133, 33,244,174,165,245, 87,112,161,103, 3,240, 65,104,
+104,232,111,211,167, 79,127, 32,207, 34,188,118,237,154, 9,192,235, 33, 33, 33,191,124,242,203,218,247, 41,165,141,120, 42,250,
+217, 8,151,205,113,220, 73,155,205, 54, 51, 49, 49,113,111, 69, 52,215, 20,166,179,107,139, 42, 30, 61, 39,141, 28,242,185, 85,
+162,140, 40, 48, 88,101,106,185, 96,146,218,140,183, 56,125,246,123, 71,110, 21, 60, 18, 23, 86,163,209,104,125,230,153,103,190,
+231, 56, 78, 4, 0,155,205, 38, 24,141,198,225,168,192,200,211,210, 52,251,246,237,251, 35,207,243,214,162,200, 16,103, 52, 26,
+ 95,186, 31,205, 7, 69, 70, 70, 70, 1,128, 49,229,109, 19, 27, 27,187,226,207, 63,255, 28,210,165, 75, 23,219, 31,127,252,145,
+246,244,211, 79, 11, 39, 78,156,160,132,144, 82,239,226,110,222,188,105, 68, 25, 79, 36,176,211,160, 65,131,240, 31,126,248,225,
+196,203, 47,191,236, 57,127,254,124,223, 99,199,142,217,150, 46, 93,154, 87, 80, 80, 48,155, 85, 79,143, 22, 18,137, 4, 42,149,
+ 10, 38,147, 9,233,233,233,112,213,167,156, 82,122,141, 16,242,244,196,137, 19, 99, 39, 78,156,248,116, 88, 88, 88,157, 42, 85,
+170, 84,225, 56,142, 75, 73, 73, 73, 79, 72, 72,184,105, 54,155,119, 1,248, 3,128,180,106,213,170, 39, 1,172, 40, 75,239,252,
+249,243, 31,135,132,132,252,181,126,253,250,167,229,114,121,109,153, 76,230,107,181, 90,185,130,130,130, 44,179,217,124,193,104,
+ 52,254,158,156,156,124,168,130,117,231,101, 66, 72, 7, 65, 16,254, 88,186,116,105,116, 74, 74, 74,196,222,189,123,123,149,220,
+174,113,227,198,203,150, 45, 91, 22, 62,122,244,232,107,171, 86,173,170, 80, 31, 44, 6,131, 25, 44,247, 78,198,141, 0, 54, 62,
+136, 63,166,148,222, 2,240,126,209,242, 64, 72, 74, 74, 58, 3, 96,200,131,220, 65,201,201,201, 7, 1,116, 3, 10,103,115, 78,
+ 40,188,104,222, 23, 71,110,231,255, 14,167,199,171, 60, 34,119,231, 70, 66,200,196,162, 81, 77, 0, 48,241,228,201,147,243, 75,
+ 68,164, 78, 59,175,119, 21,105, 42, 77,243,212,169, 83, 37, 53,207, 86, 68,243,223, 36, 59, 59,251,141,101,203,150, 29,123,253,
+245,215,229, 3, 6, 12,192,197,139, 23,241,221,119,223, 25,179,179,179, 87,221,171,230,169, 83,167,110, 53,104,208,160,209,146,
+ 37, 75,222, 94,188,120,113, 31, 66, 8,123, 22,225, 35,130,193, 96,184, 62,104,208, 32,112, 28, 71, 40,165,212,106,181, 58, 6,
+ 61, 20,205,103,118,221,141,243,202, 10,224,175,162,197, 21, 95,184, 81, 31, 29, 6,112,248, 1,159,251,183, 9, 33, 79,223,188,
+121,115,214,229,203,151,183,150,182,205,185,115,231, 54,116,237,218, 85,117,248,240,225,119, 43, 58,138,144,193, 96, 6,139,225,
+146,155, 15,192, 92, 61,202, 20,245,127,250,193,110,142, 42,186,254, 97,105,254, 91,156, 63,127, 62, 27,128,227,145, 33, 81, 81,
+ 81,232,217,179,231,125,235, 22,153,169,177, 96, 51,183, 63, 82,108,218,180,233,169, 39, 37,175,148,210,219,229,221,156,154, 76,
+166, 77, 0, 54,177, 82,193, 96, 48,131,197,184,247,138,214,120, 63,235, 31,150, 38,131,193, 96, 48, 24,143, 50, 4, 64,231, 50,
+ 46,122,110,143, 14, 32,164,226, 15,218,116,165,207, 52,153, 38,211,100,154, 76,147,105, 50,205,199, 79,211,149,246, 99, 51, 58,
+145, 82,250,143, 45, 0, 58, 51, 77,166,201, 52,153, 38,211,100,154, 76,147,105, 62,105, 11,123,160, 44,131,193, 96, 48, 24, 12,
+198, 3,134,245,193, 98,252,231,120,238,185,231,248,138,108, 31,239,237,205,229, 38, 86,153,173, 81,201,123,233, 12,198,217, 87,
+255,120,247,155,199, 97, 63, 4, 7, 7,215,242,244,244, 28, 6,160,142, 78,167, 11, 80,169, 84,105, 0,206,231,229,229,173, 72,
+ 73, 73,185,196, 74, 10,131,193, 96, 60,226, 6, 75, 38,147,197, 80, 74, 71, 16, 66,130, 8, 33,119, 40,165, 63,152, 76,166,115,
+ 79,218,206,146,201,100, 49,132,144, 17,148,210, 32, 74,233, 29, 66,200,191,188, 31, 8, 89,251, 92, 97, 20,178,255, 26,136, 0,
+165,172, 72,151, 98,174,146,170, 44, 30,222,167,233,139,147, 71,116, 64,163, 1, 95, 77, 66, 5, 38,177,125, 20, 33,132,240, 81,
+ 81, 81,175,135,135,135, 15, 92,180,104,145, 52, 42, 42, 10, 10,133, 2,122,189, 62,248,250,245,235,193,163, 71,143,110, 87,181,
+106,213,213, 55,110,220,248,174,104,142, 56, 6,131,193, 96, 60, 42, 6, 43,162,114,229, 1, 28, 79,230,153, 45, 54, 31,111,111,
+111,238,219,111,191,229,122,245,234,133,223, 55,111,198,216,177, 99,199,133,134,134,136, 82, 65,200,166,162,117,220,205,132,228,
+ 95,221,249,179,103,159,125, 54,213, 98,177,148, 57,171, 53,207,243,105, 27, 54,108, 8,188,223, 76,133, 54, 30,144,106, 49,155,
+203,252, 31, 65,144,164, 37,159, 92,227,214,255, 84,174, 28, 50,128, 39,220, 60,139, 77,244,241,241,241,225,190,249,230, 27,174,
+ 87,175, 94,216,188,121, 51,198,140, 25, 51, 46, 44, 52, 84,148, 74,248,108,209, 70,199,221, 76, 72,248,245,225, 29, 58, 66,214,
+174, 5,135,254,133,159,214,174, 5,215,191, 63,121,162, 77, 86, 70, 70, 6, 1, 0,127,127,127, 90,204, 92,245,110,250,226,123,
+175,118,194,204,197,187,160, 55,154, 86,254,215,243, 25, 21, 21,245,250,115,207, 61, 55,240,227,143, 63,150,114, 92, 97, 43,191,
+ 86,171,133, 94,175, 71,104,104, 40,246,236,217, 35,125,255,253,247, 7,110,216,176, 1, 0,230,177,106,142,193, 96, 48, 30, 33,
+131, 69, 56,204, 95,181,232, 11,159,204,172,108,252,178, 97, 27,162,163,163,113,254,252,121,212,138,142, 70,108,179, 6, 92,215,
+ 86,245, 57,129,144, 74, 31,124,179,124, 62, 0,183,140,133,197, 98, 9, 88,191,126, 61, 8, 33,176,217,108,176,217,108,246, 9,
+251, 80, 80, 80,128,113,227,198, 5, 60,136, 76, 89,204,230,128,235,127,175,131,132, 39,176,218, 40, 44, 54, 10,179, 85,132,217,
+ 74,145,167,179,162,227,211, 67,220,254, 31, 14,220,252, 31,191,249,210, 39, 59, 39, 7,235,255,220,233,216, 15,209,209,209,232,
+216,186, 25,247,220,211,237, 56,181, 66, 94,233,149,201,159,184,189, 31, 30, 4,107,159,251,191,185,114,254,174,255, 26, 60, 81,
+ 17,139,139, 23, 47,242, 70,163,113,144,167,167,103, 11,137, 68, 18,168,242, 14, 22,115,164, 85, 51,181, 36,232,134, 89, 43,107,
+ 59,162,111,181,238,239,190,220, 30, 51, 23,239,194,143,155,254, 94,230, 21,154, 48,245,191,156,223,224,224,224, 90,225,225,225,
+197,204,149,253,161,230,121,121,121,200,207,207, 7,199,113,152, 52,105,146,116,239,222,189, 3,131,131,131,119,178,230, 66, 6,
+131,193,120,132, 12,150,201, 98,243, 9,242,243,198,143, 63,252,136, 73,239,204, 64,173, 90,181, 64, 41, 5, 33, 4,239, 76,157,
+142,175, 63,154,130,129, 79,181,131,197, 42,250,148,165, 81,218, 80, 75, 66, 8,226,227,227, 97, 48, 24,160,215,235, 29, 75, 76,
+ 76,140, 91, 9,118,119,248,166,132, 39,248,227, 68,126,161,177,178,136, 48, 91, 69, 88,172, 34, 58,196,120, 84, 72,211, 98, 19,
+125,188, 60,212, 88,188,112, 62, 38,125,244, 69,177,253, 48,249,221,247,241,221,103, 31, 96,252,168, 23, 96,178,216,124,238, 37,
+157, 21,129,105, 22,231,208,161, 67,193, 42,149,234,171, 33, 67,134,132,140, 27, 55, 78, 70, 5,181,176,237,232, 45,175, 47,127,
+216, 21, 98, 48,153,249,167,219, 84,197, 75,125,155, 96,230,146,191,138,204,213,237, 87, 35,115,114,196,255,114,222, 61, 61, 61,
+135, 45, 90,180,232, 46,115,149,154,154,202, 21, 20, 20,192,108, 54,139, 69,207, 75,196,148, 41, 83, 36,239,191,255,254, 48, 66,
+200, 71, 69, 58, 70, 86,150,152, 38,211,100,154,143,170,230, 19, 99,176, 0,192,108,212, 35,166,138, 47, 22,206,254, 24, 34,229,
+ 64, 65, 65, 69, 10, 74,109,136,244, 87,195,168,211, 86,248, 15, 69, 81,132,197, 98,129,217,108,198,162, 69,139, 80, 80, 80, 0,
+ 81, 20, 81,187,118,109, 0, 64,227,198,141,157,155,184,110,199,197,197,133,187,210, 12,168,215,247, 22, 40,170, 56,127,247,225,
+ 23,223,227,208,201,235, 16, 69, 64,174, 84,161,255,176,145,176,218, 40, 76,150,138, 63,159,212,168,215, 33, 68, 35,193,156, 89,
+ 83, 65, 4, 9,120, 66, 64, 8, 1, 71, 68,212, 10,245,134,201,160,123,232, 7,174,255, 26,136,107,215, 22, 31, 5, 90,216, 15,
+235,201,137, 92,169, 84,170,175, 86,172, 88, 17,222,180,105, 83, 14, 0,142, 93,201,150,127,249,195,174,144,239,167, 61, 67, 26,
+213, 10, 66,102,174, 30, 51,151,238,197,238, 19,201, 91, 75,154,171,255, 48,117,162,162,162,138,153,171, 47,191,252,210,127,254,
+252,249,161, 0,208,175, 95,191,164, 78,157, 58,101, 92,190,124, 25,193,193,193, 36, 35, 35,227,105, 0,111, 20,221,220, 76,164,
+148,206,103,213, 30,131,193, 96,252,203, 6,203,100,212, 35,204, 91,134, 32,141, 0,139,197,138,243,150, 16,228,235, 12, 48,155,
+ 45,184,109, 54,227,198,169, 59,104,221,186, 53,158,121,230, 25,155,217,108,134, 84, 42,205, 93,191,126,189,175, 43,131,101, 54,
+155, 97, 54,155,161,213,106,177,114,229, 74, 8,130,224,120,112,170,243, 19,235, 91,181,106, 85,197, 61, 43,141, 42,215,142,253,
+ 6, 15, 5, 15,171, 72, 97,181, 82, 88, 69,192,106,163,208,155, 41,158, 25,241, 30,108, 54, 10,155, 72, 97,178,186,238,162, 84,
+204,176,249, 54, 69,239, 41,191, 0,208, 56,214,123,202, 41, 38,181,230, 33,147, 73, 32,147, 9, 48,232,244,255,194,161,163,180,
+127,127, 34, 62,169,157,220,141, 70,227,224, 33, 67,134,132,216,205, 21, 0,100,231, 25, 5,131,201,204, 55,170, 21,132, 46, 3,
+ 39, 96,199,234, 47,241,231,193, 43,240,209, 8,251,194, 30, 15,115, 5,157, 78, 23,160, 80, 40,160,213,106, 29,145,171,249,243,
+231,135,154, 76, 38, 14, 0, 4, 65, 18,150, 46,134, 42,108, 34,224,229,153,130,236,236, 92, 63, 74, 41, 41, 50, 88, 95, 16, 66,
+126, 96, 51,231, 51, 24, 12,198,191,108,176,204,122, 61, 44, 22, 43,172, 86, 27, 44, 86, 27,114, 11,244,248,236,179,207, 32,151,
+203, 65, 8,129, 40,138, 40,122, 0, 42,103,177, 88,240,244,211, 79,251,184,250, 67,231,126, 87,148, 82,240, 60,143,230,205,155,
+223,181,221,145, 35, 71, 42,148, 17, 15, 5,143,200,206,239,220,245,253,209,223, 62, 6,165,128, 77, 44, 50, 88,102, 55,174,179,
+ 46, 12, 91,131,182,253, 97, 50,153, 11, 35,122,148,222, 83, 36,239,129,153,172, 39,172,207,149, 29,153, 76,214,121,220,184,113,
+ 50,231,239,124, 60,229, 86,133, 76,106, 59,113, 49,133,236, 88,253, 37,119,252, 66,178, 40,147, 8, 84, 77,239, 68, 61, 46,249,
+ 86,169, 84,105, 58,157, 46, 88,175,215, 35, 47, 47, 15,121,121,121,197, 79,104,137,132,188, 58,106,140,191, 68, 42,131,197,108,
+194,159, 43,102,178, 90,142,193, 96, 48, 30, 53,131,101, 52,232, 96,177,218, 96,181, 20, 62, 65,222,100, 50, 65,169, 84,162,109,
+219,182, 69,151,119,234,120,221,190,125, 59, 76, 38,147,203, 63,180, 90,173,142, 8,150, 40,138,160,148,226,151, 95,126,129, 68,
+ 34,129, 84, 42,133, 68, 34,129, 68, 34, 1, 33,164, 66, 25,177,218, 40,222,157,252, 54, 36, 2, 7,169,192, 65, 34, 16, 72, 5,
+ 14, 54, 74, 65, 65, 97,181, 21, 46, 38,171,123,129,140,242, 12, 27, 0, 24, 77, 22,208, 66, 51, 6,157, 78,199, 74,210, 67, 36,
+ 35, 35,131,232,245,250, 8,111,111,111, 39,171, 73, 81, 73,101, 51, 14,239,213, 32,121,248,135,235, 66, 76, 22, 43,164, 2, 79,
+ 7,119,141, 78,222,181,126,143, 95,134, 49,135,216, 71, 23,254,199, 57,127,237,218,181,224,202,149, 43, 35, 47, 47, 15, 86,171,
+ 85,236,215,175, 95,146, 32, 72,194, 4,137,132,244, 28, 52, 70,188,115, 39,217,194,113, 60, 40,181,225,169,231, 70, 19,185, 66,
+ 41, 53,155, 76, 86, 0, 19, 89,244,138,193, 96, 48, 30, 5,131,165,215,195,106,177, 58, 76,150,217,108, 6, 0,204,158, 61,251,
+ 46, 67, 68, 41,117,172, 47, 87,211,104, 68, 84, 84, 20, 76, 38, 19,162,163,163, 65, 41,197,160, 65,131,238,218,238,216,177, 99,
+ 21,202,136,197, 70, 49,235,179,217,119,125,127, 96,205,199,168, 31, 29,137,230,213, 85, 48, 88, 68,228,106,173,247,109,216, 0,
+192,100, 50, 3, 69,211,225,235,181, 90, 86,146,254, 69, 44, 22, 11,178,179,179, 97, 44,200,182,214, 12,162,185, 47,247,172,106,
+ 76,207,210, 9, 28, 53, 88,195, 60,116,198,130,172, 36, 94,165, 82, 61, 22,121,205,203,203, 91, 49,122,244,232,118,251,246,237,
+147,114, 28,135,188,188, 60,116,232,208, 33, 35, 93, 12, 85,188, 58,106,140,127,114,114,146,213, 83, 41, 24,165, 82, 9,210,210,
+210,196,118, 61,134,232, 7,141,120, 51,228,205,247, 62, 89,148,124,112, 62,235,127,197, 96, 48, 24,143,132,193,210,105, 97,177,
+216,138,154, 8,173,142,168,211,216,177, 99,239,218,118,215,174, 93, 46, 13,150, 32, 8,105, 47,191,252,114,177, 41, 18, 40,165,
+ 88,183,110, 29,100, 50, 89, 49,211,118, 47, 17,172,105,239, 79,128, 76,194, 23, 25,162, 66, 99, 36, 82,138, 77,127,108,199,166,
+ 63,182, 59,182,229,121, 73,218,253, 24,182, 66,163,104, 1,165, 0, 5,160, 47, 96, 6,235, 97,226,239,239, 79,211,211,211,111,
+230,228,228,212, 84,171,213,200,204,204, 68, 86, 86, 22,114,114,114,160,207,203,182,170,173, 57, 90,147, 53, 11,130, 32,224, 78,
+ 66, 42,108, 54,219,157,199, 36,122,133,148,148,148, 75, 85,171, 86, 93,253,238,187,239, 14,154, 50,101,138, 68, 20, 69, 92,190,
+124, 25, 32,132, 74,164, 50,112, 28, 7,137, 68, 64,110,110,158,168,210,120,167,152, 41,175,146, 72,101,224,120, 41,155,112,148,
+193, 96, 48, 30, 41,131,101,181,194,106, 41,236,131,101, 54,155, 97,181, 90,177,120,241,226, 98,102, 72, 42,149,130,227, 56,151,
+ 6,107,253,250,245,197, 38,247,108,220,184, 49,165,148,162, 95,191,126,142,230,198,225,195,135, 99,228,200,145,176, 15, 67,119,
+ 59,138, 97, 3,166,207,156,237,208,233,209, 37, 22,125,158,106, 7, 42, 22, 26,181,180,179, 27, 42,228,216,202, 51,108, 64, 81,
+ 4, 11, 20,160, 20, 5,249,249,172, 36, 61,100, 76, 38,211,206,121,243,230, 69,188,255,254,251,178,172,172, 44,100,100,100, 32,
+ 59, 59,219,177, 20, 20, 20, 32, 40, 40, 8, 91,183,110, 53,231,229,229, 29,121,156,242,126,227,198,141,239, 54,109,218,132,189,
+123,247, 14,156, 50,101,138, 36, 40, 40,136,120,121,165, 18,139,217, 4,128,210,244,244,116, 81,165,241, 78,241, 15, 12,187,157,
+124, 39, 45,218, 98, 54, 65,180,153,121, 86,106, 24, 12, 6,227, 17, 48, 88, 18,129,203,189,114, 43,197,171,146, 90, 9,171,104,
+132,205, 84, 56,181,130,205,102,195,171,175,190,234,216,110,240,224,193,120,225,133, 23,192,113,220, 93,125,176, 8, 33,157, 93,
+205,149, 33,138, 34, 14, 28, 56, 80, 56,237, 1,199, 57,150,178, 40, 75, 83,107,180,225,224,175, 31, 65,164,128, 88,232,123, 64,
+ 65,220, 26, 53, 88,154,166, 43,195,166,240,240, 1, 7, 10,240,192,245,164, 52, 8, 60,151, 91,209,188, 87, 20,166,249,127, 77,
+185, 92,190,234,151, 95,126,233, 17, 27, 27, 27, 94,191,126,125, 46, 43, 43, 11, 5, 5, 5, 40, 40, 40, 0, 0,248,251,251,227,
+194,133, 11,226,173, 91,183,146,228,114,249, 47,143, 83,222,139, 30,127, 51, 47, 56, 56,120,231,212,169, 83,135,101,100,100, 60,
+157,157,157,227,247,251,143, 51,208,253,185,209,164, 93,143,193, 90, 19, 21, 20,137, 41,169,181,246,108,249,217,247,207,213,223,
+193,108, 50,141, 36,100,193, 69,251, 52, 13,172, 44, 49, 77,166,201, 52, 31, 53,205, 39,198, 96, 81, 27, 29,183,240,247, 35,243,
+ 44, 54,209,203,254, 93,157, 58,117, 96, 54,155,177,117,235, 86,135,241, 16, 4, 1,130, 32,184, 21,193, 42,133,219,109,219,182,
+ 45,111, 42,134,219,238, 29,105,220,110,210, 97, 64,149,242,214, 87, 52, 97,174, 12,219,146, 61,103,255,191, 19, 57, 46, 23,148,
+142, 99,197,233,225, 17, 29, 29,109, 59,116,232,208, 91,163, 71,143,254,170, 83,167, 78,161,125,250,244,145, 86,174, 92, 25,114,
+185, 28,215,175, 95,199,254,253,251,205, 55,110,220, 72,210,233,116,111,213,175, 95,255,177,108, 30, 75, 73, 73,185, 84, 52,137,
+232, 27,246,169, 24,228, 10,165,116,240,136, 55,195, 28,163, 8, 87,127, 7,163, 65, 15, 0, 2,155,166,129,193, 96, 48, 30, 1,
+131,117, 59, 41,105, 5,128, 21,206,223, 61,253,244,211, 5,189,123,247, 86,218, 71, 20,218, 71, 3,154, 76, 38,152, 76, 38, 40,
+ 20,138, 10, 77, 8,229,206, 36,162,238,144,118,102, 67,248, 3,221, 43,110, 24,182,228,228,228,112, 86,124,254, 93, 90,181,106,
+149,114,241,226,197, 33, 59,118,236, 24,188,111,223,190,206, 58,157, 46,130, 16, 2,165, 82,121,211,100, 50,237,148,203,229,171,
+ 30, 87,115, 85, 22,102,179,217, 58,101,250,151, 63,241,130,212, 42,138,102, 98, 54,155, 71,192,205,135,186, 51, 24, 12, 6,227,
+ 33, 24,172,210,208,233,116,222,132, 16, 33, 57, 57,249,174,117, 82,169, 20,183,110,221,178, 62, 14, 59,229,129, 27, 54,198, 63,
+ 70,116,116,180,173,232, 70, 96, 69,201,135, 61, 63, 9, 80, 74,141,132,144,137,132,144, 47,138,190,154,120,227,175,185,142,209,
+130,132,204, 59,227,188,142, 69,175, 24, 12, 6,227, 17, 52, 88,123,246,236,177, 2,168,136,137, 74,251, 7,210,156,198, 14,219,
+147,205,154, 53,107,216,136,184,226, 38,107, 62, 33,228, 7,187,225,114,119, 29,131,193, 96, 48, 30, 17,131,197, 96, 48, 30, 89,
+147,101,188,151,117, 12, 6,131,193,248,103, 32, 0,234,150, 81, 41,159,117, 91,132,144,186,247,112, 65, 56,251, 8,105, 6,148,
+163,185,211,133,102,231,123, 72, 39,211,100,154, 76,147,105, 50, 77,166,249, 68,106,186,210,126,108, 70, 39,210,162,217,200,255,
+137, 5, 64,221,255,136,102,103,166,201, 52,153, 38,211,100,154, 76,147,105,254,123,154,143,219,194,129,193, 96, 48, 24, 12, 6,
+131,241, 64, 41,181, 15, 86,165,152,190,224, 74,204,123, 46, 82, 32,253,220,134,123,218, 14, 0,166, 79,159,126, 95,102,238,195,
+ 15, 63,116,235, 41,205,149,234,246, 5,231,198, 24, 50,145, 0,233,103, 55,184,253,255, 36,188,239,251, 16,241,110,225, 7,124,
+ 78,111,111,152,198,138,207,189,209, 80, 67,252, 45, 68,210,211, 67, 33,233, 29,225, 33,105,121, 61,199,120, 72,103, 22, 55, 83,
+ 98,217,120, 62,143,102,179, 61,196, 96,252,243,248, 68,181, 30,226,231, 31, 52, 82,164, 84, 9, 0, 38,147,193,146,148,112,123,
+ 46,205, 62,191,186, 88,221,231, 91,187,127, 80, 72,216, 88,165, 66,173, 44,172,254,136, 41, 43,243,206,252,236, 27, 7,127,126,
+ 88,105, 37, 69,207, 78, 11, 13, 13,245, 62,120,240, 96,120,235,214,173,111, 37, 37, 37,229, 56,111, 83,218, 58,106,159,176,177,
+ 12,205,192,168, 70,207,123,104,212,175, 25,140,198, 72, 47, 79,207,180,172,204,204,133, 41, 55, 78,126,103,223, 38, 60, 60,220,
+115,245,234,213,193,131, 7, 15, 78,142,143,143,207,119,165,201, 96,184, 52, 88, 28, 1,214,172, 89, 13, 74,105,209, 36,155, 20,
+131, 7, 13, 46,117,187,202,242,228, 72, 81, 20, 95, 0, 48,148, 82,122, 42,217, 82,185,223,189, 36,100,215,174, 93,161, 22,139,
+165,169,213,106,109, 4,160,145, 82,165,105, 96, 52, 26,210, 8,232,139, 79, 61,245,212, 73,119,117, 56, 10, 44,249,113, 57,166,
+143,106,255, 7,128, 30,101,156, 88,211, 19,141,161, 21, 51, 72, 34,125,239,239,125,235,228,222, 42,130,106,141,159,157, 4,224,
+145, 52, 88, 33, 33, 33, 74, 0, 47,114, 28,215, 73, 46,151,215, 48, 24, 12, 55, 1,156, 33,132,204, 79, 76, 76, 76,190,199,202,
+141,139,209, 72, 94, 82, 41, 85,221,131,213,178, 70, 41, 57,121, 73, 58,139,184, 95, 36,230, 47, 42,106,136,170, 17, 34,171, 90,
+217,123,239,219,125, 98,163,235, 71, 87,133,237,220, 62,152,204,230,222,199, 83,116,189, 23,157, 76,125,171, 26, 33,141,174, 81,
+106,114, 51, 93,193, 0, 4, 74,105, 2, 0,132,133,133,249,136,162, 24, 11,160, 1,128, 83, 28,199,237, 79, 76, 76,188, 47,195,
+246, 31,210, 12, 17, 69,241,229,192,192,192,167, 83, 83, 83,255,224, 56,110,233,189, 30,111,198,147,129,175, 95,208,107,223,254,
+176, 86,102,255, 76, 69, 81, 50,168, 79,251, 97, 0,138, 25, 44,111,111,191, 23,127, 92,245,167,146,252,255, 9, 27,178, 49, 35,
+250,143, 4,240, 80, 12, 22, 33,132, 80, 74, 49,125,250,116,178,100,201,146,225, 85,170, 84,169, 78, 41,189, 60,109,218,180,185,
+206,219,149, 92,247,225,135, 31,210,162,223,210,210, 52,163, 98,218,108,124,233,133,129,237,199,141,126, 81,163, 82, 42,161,215,
+ 27,252, 22, 44, 89,254,229,119, 75, 87,244,124,161, 95,231,238, 0,176,120,241,226,190,149, 43, 87,142, 48,153, 76,241,211,166,
+ 77, 91, 94,158, 38,131,225,150,193, 42,114,233,184,122,241, 20,254,248,125, 11,142,157,186, 0,209,169, 56,213,169, 83, 71, 45,
+147,201,250,135,201,184, 23,235, 53,106,217,166,247,115, 47, 18, 11, 81, 97,230,132,193, 21,158, 7,235,196,137, 19,242,148,148,
+148, 25,145,181, 26,191,217,190,107, 31,174,118,116, 45,248,251,249, 64,228,100, 88,182,245,138,223,158, 69,195,191, 5,208,210,
+109, 31, 68,128, 87,134, 63,143, 80, 25,122,252,186,229, 40, 82,114,108, 32, 4, 32,164,208, 16, 22, 24, 68,188, 59,162,205,135,
+ 21, 55, 72,132,243, 86, 17,140, 95,101, 0,128, 71,242,185,110,193,193,193,141,252,252,252,190, 27, 62,124,184, 79,141, 26, 53,
+130,101, 50,153,202, 96, 48, 84,191,125,251,118,228, 87, 95,125,213, 37, 56, 56,248,211,148,148,148,117, 21,209,140,246, 86, 84,
+121,170, 86,248,175,147, 71,189,216,172,102, 68,101, 8,198, 2,136, 70,109,229, 91, 55,174,181,156,245,227,186, 87, 98,188, 36,
+131,206,229, 90,220,238,144,168,240,144,190,247,238, 75,131,163,171,169, 41, 76,103, 15, 66,194,243, 80,120,250,160, 57,207,131,
+ 35,180,246,135,251,147,222, 5,240,161, 27,149,238, 71, 0,222, 5, 64,164, 82,233,186,192,192,192,203,173, 90,181,170, 63,112,
+224, 64, 82,183,110, 93,156, 58,117,170,225,239,191,255, 62,162,114,229,202,167, 45, 22,203, 95,106,181,250,200,181,107,215,220,
+ 50,110,213,170, 85,147,105,181,218, 22, 18,137,164,195,163,172, 25, 18, 18,162, 52,153, 76, 47,132,133,133,189,218,187,119,239,
+122,189,122,245, 34, 53,107,214,196,165, 75,151, 26,255,249,231,159, 31, 54,104,208,224, 76, 98, 98,226, 98,153, 76,246, 83,114,
+114,178, 91,147, 0, 15,172, 75, 46,173, 62, 75,107,221,235,250, 18,199,200, 27,128,146, 82,154,236,198,182,129, 0,212,148,210,
+235, 15, 91,243, 31,186,209,185, 0,192,215,254,208,122,142,227, 28, 15,176,119,126,181,191,183,217,108,218,219,183,111, 87,117,
+161, 89, 83, 20, 69,183, 91, 2, 8, 33, 52, 37, 37,229, 82,153,117, 60,168, 12, 0,102,125, 56, 1, 73, 9,183,160, 55,104,245,
+ 57, 57,153,203, 74,110,151,147,157,181,226,229,161, 61,223,144,201, 20,146,208,202,225,120,119,250,151,176, 71,189, 30, 22,211,
+167, 79, 39, 31,126,248, 33, 22, 47, 94,220, 11, 64, 44,165,116,127,116,116,244,188, 18,215, 44,199,186, 15, 63,252,112,238,244,
+233,211, 9,128, 82,141, 80,165,168, 6,195,134, 13,234,219,254,157,183, 95,211,216,191, 83, 42, 21,120,251,141,145, 50,189,209,
+212,114,193,247,203, 95,157, 59,115,242, 18, 0, 29, 1, 52,161,148, 30, 7,176,188, 60, 77, 6,195,109,131, 37, 82,224,143,223,
+183,224,237, 41, 31,224,135,101, 63,225,167,207, 70,146, 38, 77,154,180,165,148,190, 24, 17, 85,173,255,179, 67, 70, 42, 35,170,
+215, 69,129,232,137,248, 12, 17, 39,254, 90,133,146,119, 62,174,216,182,109, 91, 19, 74,241,227,232, 41, 95,213,170,223,176, 41,
+206, 38, 89,113, 48,193, 6,237, 53, 27, 4, 94, 15, 81,172,248, 16,115,123,179, 95,227,198,141,145,152,109,197,254, 75, 38,240,
+ 28,192,113, 0,207, 17,240,228, 30,247,148,104,186, 50,227,199, 19, 49, 25,169, 34, 32,154,174, 60,106, 7, 50, 52, 52,180, 99,
+ 84, 84,212,156, 55,222,120, 35, 40, 37, 37,197,247,216,177, 99,144,203,229,240,241,241, 17,252,252,252,106, 77,153, 50, 37,119,
+214,172, 89, 19, 3, 3, 3, 79,166,166,166,222,116, 71,179,142, 70, 22,221,174, 81,204,161,169,211, 62,244, 50, 29,253, 19,217,
+171,214,128,231, 40,164,106, 13, 66,148, 74,204,235, 26,225, 59,121,119,194,186,122, 74,101,244, 25,189, 62,201, 29,205,202, 1,
+190, 93,171,215,172,133,236,245,223,226,106,158, 17,135,211,141,232,211,174, 25,170,249, 42,209,192,106,131,159, 66,232,232,202,
+ 96, 17, 66,124, 0, 76, 54,153, 76,156, 84, 42, 37, 10,133,162,255,178,101,203,118,215,172, 89,211, 96,223,166, 69,139, 22,104,
+209,162, 5,209,106,181, 13, 14, 30, 60,216, 96,253,250,245,230,224,224,224, 3, 41, 41, 41,115,202,210, 85, 42, 85,183, 13, 6,
+125,101,149, 90,109, 90,186,100,201,174, 22, 45, 90, 80,137, 68,130,251,209, 4,128,160,160,160,117, 17, 17, 17,254, 51,103,206,
+204,111,214,172,217, 3,209,140,140,140,220, 30, 27, 27,219,161,107,215,174, 66,235,214,173, 17, 18, 18,226, 88,231,239,239,143,
+216,216, 88,146,144,144, 80,127,255,254,253,243,183,111,223, 62, 47, 50, 50,242,175,248,248,248,174,174,142, 15, 5,106,222,207,
+250, 18,240, 0,102, 17, 66,150, 80, 74, 15,150,115, 60, 27, 1, 24, 2,224,179,127, 73,179, 92,148, 74,101,170,193, 96, 8, 0,
+ 0,133, 66,145,166,215,235, 3,221, 48, 55,154,207, 63,255, 60, 64, 42,149,130,231,121,216,108, 54,199, 66, 41,133, 40,138,197,
+ 58,195,126,246,217,103,110,205,237,118,231,206, 29, 45, 10, 71,127, 83,167, 69, 44,237, 53, 34, 34,194,223, 29,205,164,132, 91,
+240,176,196,103, 6,122, 40,195, 35, 61,188,103,180,110,221,122,134,243,250, 86,209, 94, 0,242,160,215,223,185,149,148, 0,191,
+127,161,110,243, 94,178,100,201, 11,139, 23, 47,238, 67, 8,209, 22,237,223,122,111,190,249,230, 95, 37,246,121,189,162, 87,109,
+ 72, 72,200, 30, 66,200,230,208,208,208, 31, 1,220, 21, 29,246,210,120,140,124,107,204, 43, 26, 0,152,190, 54, 3,211,214,166,
+227,131,103,124, 49,233,105, 53,134, 15,237,167,254, 97,249,175, 35, 1, 44,113,210,190, 20, 29, 29, 77, 46, 94,188,200,204, 21,
+227,193, 68,176,142,157,186,128, 31,150,253,132,161, 67,135,225,220,206, 69, 91,158,122,230,249,238, 45,218,118,133, 85, 26,128,
+ 75,105, 4, 9,241, 20, 2,111, 5, 7, 17, 55,254,222, 72, 57,142,251,169,132, 70,153,211, 38,108,217,178,229,173, 42,213, 26,
+124,250,238,180, 79,248,179,169, 50,252,184, 95, 15,155, 49, 23,250,140,107,208,166, 93, 65,254,157, 11,200, 73, 58,123,134,227,
+184,105,238,106,222,157, 7, 64,164, 20,132,146,194, 42, 7, 20,119,117, 26,131,155, 67, 66,205,218,139, 81, 53, 99, 98,178,101,
+ 54,192,172,189,232,250,191, 31,252, 48,211,178, 52, 67, 66, 66,186, 68, 68, 68,124, 49,114,228,200,176, 51,103,206,120,234,116,
+ 58,237,209,163, 71,247,166,164,164, 4,250,251,251, 39, 12, 28, 56,176, 85, 96, 96, 96, 64,219,182,109, 85,219,182,109,123, 15,
+192,203,174, 52,235,170,101, 49,177, 77,235, 30,254,248,243,217,234,140, 53,223,192,116,237, 52, 14,103,232,113, 38, 83, 79, 67,
+ 61,114,200,128,104, 95,168,100, 2, 70, 54, 14,212,188,177, 45,254,179,162,139,153,203,188, 71, 6, 7, 86,181,232,117, 48,232,
+ 45,216,114, 61, 87,127, 56, 47, 55,128, 59,125, 59,125, 82,175,166, 10, 62, 61, 25, 65, 26, 73,245,138,238, 79, 66, 8, 20, 10,
+ 69,169,235,188,189,189,209,178,101, 75, 68, 69, 69, 73, 7, 15, 30,220, 17,192,156,178, 52,205,102, 83,176, 40, 82,120,122,122,
+ 74, 59,117,234, 68, 8, 33,180,228, 3,204, 43,170, 9, 0,106,181,186, 91,131, 6, 13,248, 85,171, 86, 21,220,185,115,231,230,
+211, 79, 63,157,161, 80, 40,196, 18,219, 32, 60, 60, 28,175,191,254,186,244,229,151, 95,118,169, 25, 24, 24,216,101,197,138, 21,
+ 32,132, 56, 46,220, 37, 9, 15, 15, 71, 80, 80, 16,122,244,232, 33,244,235,215,175, 75,121,251,115, 96, 93,114,201,110,158, 6,
+212, 37,229, 94, 68, 6,212, 37,148, 0,151, 75, 70,178, 74,106, 82, 74, 51, 9, 33, 11, 1,172, 39,132,244, 47,205, 16, 17, 66,
+ 90, 3, 88, 11,224, 41, 74,105,154,171,227,238,172, 41,147,201,164,102,179,217,167,164,241,169,168,166,115,196, 39, 46, 46, 14,
+141, 27, 55,134,243,171,193, 96,112, 60,123,149, 16, 18,224,110,249,228,121, 30, 95,125,245, 21,120,158,135, 84, 42,133, 76, 38,
+ 43,245,181,105,211,166, 21,173, 67, 18, 8, 33, 92,149, 42, 85, 38,243, 60,255,178,201,100, 10,147,203,229,201, 54,155,109,153,
+175,175,239,204,184,184, 56, 11, 0,239,210,158, 13,235,172,169, 55,104,245, 84, 20,149, 38,147,193,162, 84, 43,195, 15, 30, 60,
+ 88,163,172, 99,110, 52, 26,209,169, 83, 39,164,230,107,211,237,191,121, 88,117,221,193,131, 7,195,171, 84,169, 82, 19, 64,108,
+209, 87,251,146,146,146,218, 58,125,118,102, 95, 82, 82,210, 83, 69,239, 47,223,190,125, 59,220,110,176,156, 53, 77, 38,115,164,
+ 70,163, 6, 0, 76, 91,155, 14,227,138,170,144, 15,187,142, 17,205,141,240,240,240,128,205,102,173,249,230,155,111,254,132,194,
+115,226,111, 74,105,223, 55,223,124,179, 22,128,221,225,225,225, 27, 0,228, 62,236,122,254, 73,208,124, 44, 13, 86, 81,147,178,
+189,105,153,136, 20, 24, 60,104, 48, 68, 10,108,221,186, 21, 98, 97,221,237,153,168,247, 70, 65,188, 63, 4, 78,132,192, 19, 8,
+ 60, 0, 16,100, 38, 94,128, 73,155,121, 32,209, 20, 26, 47,186,225,239,183,110,221,218, 50,162,118,179,207,166,125,252, 37,247,
+195, 62, 61,114,117, 6,100,156,223,132,148, 99,223,167,136, 86,243, 38,142,227,142,115, 28,119,162, 81,253,122,151,130,131,131,
+239,121,214,110,145, 2, 54,103, 99, 37, 2,228, 49,139,238,134,133,133, 61, 85,173, 90,181, 79, 70,141, 26, 21, 30, 23, 23,231,
+145,159,159,159,190,115,231,206, 75,102,179,249, 36,199,113,115,147,147,147,219,173, 88,177, 66, 53,105,210,164,174, 53,107,214,
+172,185,125,251,118,157,203,200,149, 90, 90,255,249, 33, 3, 15,247, 25, 53, 78,113,254,215,239, 32,191, 16,135, 69, 87,178,109,
+199,211,245,239, 25, 10,172,115,148, 42,161,117,182,209,186, 99, 66,243, 16, 46, 88, 45, 65,101, 79, 73,123,119,211, 43,147, 41,
+ 4, 42, 40, 96, 50, 89,161,181,136,166,243,233, 84,251, 86,187,122,102,170,246, 87, 0,128,192,113,130, 27, 39,118, 54, 33,228,
+ 51,153, 76,246, 62, 33,132,246,233,211,231,102,163, 70,141, 12, 0,160,215,235, 97, 52, 26, 33,145, 72, 96, 48, 24,112,227,198,
+ 13, 28, 57,114, 4, 62, 62, 62, 21,218,175,217,217,217, 8, 15, 15,135, 70,163,185,111, 77,155,205, 70,190,251,238, 59,217,185,
+115,231,100,191,253,246,155,231,132, 9, 19,180,205,155, 55,191,245,244,211, 79,167,121,122,122, 90, 79,157, 58,133,195,135, 15,
+ 35, 39, 39, 7,205,154, 53,115, 75,211,100, 50, 65, 16, 4,232,245,122,200,229,114, 8,130, 0,171,213, 10, 81, 20, 29,166,171,
+160,160, 0, 89, 89, 89,144, 74,165, 40,205, 40, 58, 99, 55, 75, 3,234, 18,250,235,150, 67,105,128, 72, 97,202,183,192,148,107,
+129,209,190,100, 91, 6,140,159,221,224,215,179,148, 84,160, 18, 62, 66, 8,233, 15, 96,109, 73,147,229,100,132,250, 83, 74, 79,
+ 85, 84,211,108, 54, 31,176, 27, 31,133, 66, 17, 64, 72,161, 49,148,203,229, 22,163,209,216,161, 34,154, 0, 16, 23, 23,135, 70,
+141, 26,241, 69,154,206,221,108,196,138,158,151,132, 16,240, 60, 15,185, 92, 14,142,227,208,188,121,115,244,235,215, 15,209,209,
+209, 72, 72, 72,192,246,237,219,113,241,226, 69, 72,165,210, 98, 77,133,238,208,190,125,123, 62, 50, 50,242, 80,151, 46, 93, 98,
+198,142, 29,171, 8, 15, 15,199,165, 75,151,170,204,255, 31,123,231, 29, 22,197,213,182,241,251,204,246,194,210,123, 17, 80, 64,
+170,138,128,136, 21, 75,108,177,199, 26,163, 49,177, 39,118, 99, 73,140, 61,154, 24, 99,141, 45,177,247,104, 98,239,189, 87,176,
+161,136,162,128,244,222,183,239,206,249,254, 0,124,213, 40, 44,232,251, 38, 95, 50,191,235,154, 11,157,157,185,231,204,204,153,
+ 51,247, 60,167,173, 90, 53,229,210,165, 75,221, 66, 66, 66, 66,163,162,162,170, 76,115, 70, 90,202,138,126,221, 34, 63, 45,200,
+207,219, 90,203,207, 98,150, 70,163,193,195,135, 15, 77,222,231,127, 85,198, 53,109,218, 52,137, 82,250,132, 82,122,145, 16, 82,
+ 47, 53, 53,181,133,139,139,203, 81, 74,169,252,181,107, 94,154,154,154,218,209,197,197,165,136, 82,122,143, 16, 18, 71, 8, 73,
+ 74, 73, 73,249,243, 71,146,133,121,118, 73, 73,169,131,153,153, 28,223,116,179,132,248,147,167, 24,221,138, 7,189, 94,143,103,
+207, 18,225,233,225, 70,118,110,216, 31, 10,224, 38,128,176,168,168, 40, 0, 8, 5,144,144,156,156,236, 84, 97,176, 56, 56,170,
+ 29,193,122,189, 23,160,125,189,238,168, 37,226,245,188,127,108,233, 53,111, 29,117,119, 8,252,176, 60, 18, 93, 22,169, 78,186,
+115, 12, 44,203,110,202, 52,161, 87,222,213,171, 87, 37, 6, 22, 27, 38,127, 61,135, 89,123, 86,133,204,140, 52,164,157, 95, 8,
+ 85,214,195,141, 82,169,116, 98,155, 14,157,139,106,114, 34, 47,247,104,116, 17,166, 4, 90,218, 56, 66,163,163,229, 6,235, 85,
+147,245, 79,193,217,217,185,139,151,151,215,156, 3, 7, 14,184,171, 84, 42,197,229,203,151, 11, 78,158, 60,249, 68,167,211,173,
+ 75, 79, 79,223, 86, 94,232, 28,224,243,249,115, 1, 64,161, 80,240,121, 60,158,180,178, 70,154, 65, 22,194,134,131, 63, 29,112,
+105,194,178, 95, 37, 79,238,223,193,178, 61, 71, 32, 54,106,141, 15,242,181,221,239, 23,235, 15,149,111,118,166,147,179, 44,149,
+130,186, 9, 24, 2,107,169,208, 49,130, 16,201, 85, 74,213, 85,165,217,214,205,157,209,215,242,196, 69,131, 26,102, 10,161, 8,
+ 0, 92,124,252,121,183, 85,122, 92,190,251, 16, 18,137,149,208,196,151,236, 12,123,123,251,198,231,207,159, 39, 37, 37, 37,234,
+123,247,238,193,218,218, 26, 14, 14, 14,176,176,176,192,195,135, 15,113,250,244,105,196,197,197,129, 82,138,250,245,235, 87,235,
+218,102,102,102,162,168,168, 8,221,187,247,104,157,150,150, 42,177,119,112,212,158, 57,125,234, 84, 77, 52, 89,150, 37, 0, 16,
+ 24, 24,136,192,192, 64, 65,106,106,170,229,161, 67,135,204, 22, 44, 88,224,108,103,103,119, 83,165, 82,189, 98,156, 76, 53, 88,
+ 0,160, 86,171,161,209,104, 32, 20, 10, 33,145, 72, 32, 20, 10, 81, 84, 84,132,204,204, 76, 20, 23, 23,191,136,184,153,170,251,
+226,211,100, 75,179, 91,127,206, 28,159,218,215,240, 75,247,114,185,201, 58, 67, 8,169,184,191,153,229,127,123, 85, 86,213, 87,
+133,230, 43, 17,150,151,162, 76,130,154,104,134,132,132, 84,104,188, 82, 74, 72, 36,146,172,138,200,149, 68, 34, 49,105,170, 46,
+ 66, 8, 88,150,133, 80, 40, 68,253,250,245,241,205, 55,223,224,193,131, 7, 56,123,246, 44,156,156,156,208,165, 75, 23, 8, 4,
+ 2, 36, 38, 38,190,210, 62,203,148,155,147,152,152, 56,165, 93,187,118,129,203,150, 45,147, 36, 37, 37, 33, 54, 54, 22,230,230,
+230,152, 51,103,142,120,234,212,169, 94, 87,174, 92,153, 1,224,199, 42,175, 97,222,195, 61,229, 6, 23,193,193,193,159,182,105,
+211,230,207,229,170,157,157,197,142, 29, 59,236, 43,140,215,203,251,252,175, 72, 77, 77, 45,152, 53,107,214, 18, 63, 63,191,165,
+229,213,130,205, 41,165,242,180,180,180,200, 61,123,246, 16, 0,232,213,171, 23,117,118,118, 62, 87,158, 55,238, 45, 93,186,180,
+ 85,108,108, 44,157, 53,107,214, 27,203,185,244,172,244, 53, 63, 46, 95,187,100,214,180,241,162,175, 58,201,240, 89,184, 6, 44,
+203,130,199,227, 97,217,234, 13,250,184, 7,247,238,134,134,134, 30,162,148,118, 47,143,102,150, 0,136, 35,132, 36,136, 68,162,
+180,103,207,158,113,238,129,163, 74,152,151,195,227,111,219, 40,235,222, 62,176, 44,235,100,105,231, 98, 61,252,227,246, 96, 89,
+192,192, 2, 6, 35,133, 74, 89,138,140, 71,103,149, 90,173,214,164,135, 46, 55, 55,119,238,224,113,223,123,221,122,206, 71,122,
+190, 22, 41,167,231, 80, 77,206,163,143,186,116,233, 50,164, 77,155, 54, 69, 53, 62,145,242,158,143, 46,194,148, 64, 43, 91,231,
+115,223, 46, 92,143,155,207,180, 96,233,127, 34, 89, 70, 22, 96,255, 33, 1, 44, 23, 23, 23,111, 43, 43,171, 69, 7, 14, 28,240,
+ 16,137, 68,138,248,248,120,227,185,115,231,210,244,122,253,170, 10,115, 85,110,194, 6, 4, 5, 5,233,101, 50, 25,148, 74,165,
+ 90,175,215,151,188,205, 92, 5, 74,165,174, 33, 65, 65, 23, 38, 44,251, 85,162,214,106, 81,168,210,192,206,201,209,120, 47, 95,
+217,253, 94,177,230,208,139, 8,151, 66,208, 36,180,142,139, 11,145, 40, 64, 1,164, 22,107,211, 76, 49, 87, 0, 32, 87, 88, 48,
+174,161,145, 8, 29,187, 2, 42,158, 5, 5, 0, 43,123,103,166,213,168,239,208, 97,217,121,104,248, 10,147, 45, 48,159,207,215,
+120,123,123,171,203, 11, 85,228,230,230,226,193,131, 7,200,203,203,195,138, 21, 43,240,232,209,163, 23, 47,221,234, 25,140, 23,
+ 47,113,100,103,103,137, 41,165,200,202,204, 16,213, 84,179,194, 96,189,116,239, 48,114,228, 72,126,105,105,169,228,101,115, 85,
+ 93,131, 85,145, 14, 74, 41,180, 90, 45, 10, 11, 11,161,213,106,241,228,201,147, 23,230,170, 60,130, 86,189,243,215, 22,235,223,
+184, 94,157,167,127,135,234,132,203, 0,132, 47, 13, 82,232, 80, 83,115,245,154,241,169, 86,244,167,170, 8, 22,222,208,128, 89,
+165, 82, 57, 80, 74, 73, 84, 84, 20, 76,105,127,245,178,193, 18,137, 68,232,221,187, 55, 98, 98, 98,144,156,156, 12, 62,159, 15,
+181, 90, 13,181, 90,141, 70,141, 26, 65, 36, 18, 85, 55,130, 69, 5, 2,193,128,209,163, 71, 75, 18, 18, 18,144,147,147, 3,134,
+ 97, 96, 48, 24, 96, 52, 26, 49,100,200, 16,169, 72, 36, 26,128,106, 54,196,190,125,251,118,251,203,151, 47,215,125,125,201,206,
+206, 46, 20,139,197,127,203, 50,112,207,158, 61,164, 87,175, 94,180, 87,175, 94,180,194,104,153, 74,118,194,253, 53,219,118,238,
+ 59,249,205,172,133, 37, 57,185,121,144,203,229,200,206,201,197,183,115, 23,233,207, 94,186,113,110,228,144,143, 35,150, 44, 89,
+242, 61,128,184,242, 93,226,150, 46, 93, 58,104,232,208,161, 91, 42,134,107,224,224, 48, 57,130, 85, 81, 69,248,150, 47,187, 96,
+ 75, 91,151,179,211,230,255,106,182,247, 46, 15,249,233,113, 80,103,197,193,173, 97, 55,100,198, 93, 6, 53,234,255,120,240,224,
+ 65,105, 85, 7, 59,126,252,184,143, 91,221,208,177, 13, 66,194,177,240,112, 9, 74, 30,236,132, 54, 63, 97,117,231,206,157,247,
+189,235,137,176, 20,152, 48,160, 73,160,149,141,211,185,175,191,255,213,250, 96,140, 0,185,105,113,120,180,127, 10,140,186, 63,
+213,138, 29,169,174,190,148,213,138, 74, 10, 50,161, 45, 54, 66,194, 40, 37,127,245,141, 75, 77, 77,125, 18, 24, 24,184,249,151,
+ 95,126, 25, 81,191,126,125,217,216,177, 99, 31, 23, 21, 21,205, 75, 75, 75,251,237,165, 23,121,235,218,181,107, 79,154, 51,103,
+142,215,243,231,207,113,225,194,133, 39, 60, 30,239,230,219, 52, 99, 84,170,148,122, 22,226, 85,151,182,175,251,138,231, 94, 23,
+187,102, 77, 54, 92,185,255,176,235,131, 98,195,209, 23,230,202, 76,228, 23, 17,232,125,232,203,209, 35, 24, 99,244, 49, 60, 74,
+206, 66,122,169,254,180,201,233, 46, 86,234, 5, 98, 41,204, 28, 61,144,164,102,133,174,174,174, 55,134,246,232, 34,100,120,124,
+ 48,124, 33,158, 21,104, 76,126,137, 27, 12, 6,241,195,135, 15, 9,128, 87,204,157, 90,173,126,107,196,231,125, 98,170,230,155,
+218, 71, 1,128, 94,175,175,177,230,203, 17,155,170,142,197,178, 44, 52,154,106,244, 21,209, 20,188,249, 30,168,114,244,239,227,
+178,149,255, 21,189,139,185,170, 48, 62, 21, 13,208,197, 98,241, 11,147, 98,106,148,169,146, 8, 86,141,126,127,147, 65, 23, 10,
+133,240,245,245,197,133, 11, 23, 96,105,105, 9, 51, 51, 51,200,229,114, 72, 36, 18, 88, 90, 90, 66, 36, 18,129, 97,170, 53, 68,
+ 32,213,233,116,181, 92, 93, 93,241,228,201, 19, 72, 36,146, 23,139, 88, 44,134,175,175, 47,148, 74,165, 11,254, 81,177,250,255,
+ 14,131,122,181,237,182,102,251,222,129,187,246, 30, 26,165, 81,171,131,124,235,122,211,216,251,209,119, 71, 14, 25,208,129,187,
+ 58, 28,239,213, 96, 85, 82,168, 4, 91,218,186,156,157,242,221, 47,230,187,163, 25, 20,164, 63, 66,210,177,175,139,141, 58,101,
+ 62,203,234,221,243,159, 94, 2,128, 77, 38,126,201,135, 53,105,221,141, 57, 23,171,133,174, 56, 13, 69, 49,187, 18,197, 98,241,
+212,247,113, 34,110,162,148, 64, 43, 27,167,115, 83, 23,252,106,189,247, 46, 31,121,105,113,120,122,100, 90,161, 81,167,108, 29,
+ 21, 21,245, 98, 28, 45,135,192,238,248,108,202, 18,108,248, 97,188,201,218,159,136, 68,221,250,250, 91,118, 30,210, 60, 13, 70,
+ 98,196,128,135,177, 29,157,155,147,110,105, 23,233,254,191,242,230,197,196,196,124,231,237,237,205, 24, 12,134,207,116, 58,221,
+172,180,180,180, 61, 47, 69,174, 62,112,119,119, 95, 56,119,238, 92,215,164,164, 36,209,213,171, 87,243,110,223,190,205, 26,141,
+198,239, 43,211,188, 87,168,153, 28,164, 16,242,188,221,156, 71, 63, 73, 73,233,122,191,200,112,172,226,183, 32,185, 40,176,121,
+ 3,191,203,115,103,125,173,208, 94,218,131,210,244,100,172,136,202, 40, 98,141,250,105, 38, 70,221,172,221,133,148, 76, 27,250,
+ 41, 91, 92, 92, 12,153, 72,200, 38, 63,122,202, 27,216,182,133,241,135, 41, 19,153,140,140, 12, 40, 75, 75,249, 46, 46, 46,214,
+169,169,169,121, 85, 68, 8,230, 0,104, 93,191,126,125,180,107,215, 46,113,246,236,217,177, 47,155,143,191,153,193,122,227,215,
+181, 78,167, 35, 53,213,124, 57,130, 85,149,193,170,118, 4, 75, 83,244,102, 35,165,204,126, 87,131,245,156, 16, 82,171,226,223,
+239,227, 30,168,213,106,251,151,170, 6, 65, 41,173,113, 56,171, 60,130, 85,227,223, 95,134, 97, 24, 80, 74, 33, 18,137, 16, 23,
+ 23, 7, 71, 71, 71, 24, 12, 6,200,229,114,200,100, 50,148, 71,148, 33, 18,137,192,231,243,171,147, 76, 86, 36, 18, 61,143,139,
+139,171,107,101,101, 5,163,209,248,138,201, 74, 72, 72,128, 92, 46, 79,173,110, 4, 43, 56, 56,248,184, 84, 42,117,127,125,189,
+157,157,157,197,223,245,229,245,114,228,170, 87,175, 94,116,220,184,113,213,214, 88,254,221, 87, 91, 1,108, 29, 55,110,220,230,
+237,235,142,132,134,134,134, 30,246,243,243, 35, 0,192,245, 24,228,120, 47, 6,171,162, 80,170,248, 91,209,158,201, 69,152, 18,
+108,105,227,124,118,210,220,181,230,219,111, 49, 40, 76,143, 69,218,169,233,133,172, 78,217,154, 97,152,244,228, 43,191,236, 1,
+160,140,142,142, 62,111, 23,216, 29,132,148,245,220,123,211, 72,238,229, 5,125, 67, 95, 31, 31,236,142, 49, 64,157,113, 23, 12,
+161,155,218,182,109,171,124,215,147, 8, 9, 9, 9,180,178,113, 58, 55,121,254, 47,214,187,111,243,145, 95,102, 2, 11, 89,157,
+178,117,170,206,245,149, 65, 74, 89, 2,108,248, 97, 60, 88, 19,138,225, 33,132, 88,241,228,146, 85, 3,219,133,245,113,175,227,
+ 10,150,234,193, 10, 41,122, 78,182,229,199, 69, 43,247,213,106,199,251,141, 45, 97, 71,165, 92,253,235, 70, 31,127,242,228,201,
+ 92, 71, 71,199,189, 25, 25, 25, 47, 90,167,186,186,186,118,244,240,240,152, 63,103,206, 28,143,148,148, 20,197,237,219,183,139,
+246,236,217,147,192, 48,204,156,244,244,244, 42,191,238,239, 23,235, 38, 6,154,137,214,197,148, 24, 94,140,161, 19, 32, 23,214,
+255,116, 96,255,171,109,251,127, 42,121,122,106, 43,172, 19, 30, 98, 89,116,166, 49,181, 88,221, 63, 86, 73, 51, 76, 49, 87, 98,
+177,120,207,138, 61,123,158,212,171, 87,143,148,150,150, 66,175,215, 35, 39, 39, 7, 63,110,219,253,128, 82, 10, 43, 43, 43,156,
+ 58,117,138, 29, 59,118,236, 30, 23, 23,151, 94,111, 51, 89, 47, 13,211, 0,161, 80, 72,164, 82,169,103, 98, 98, 98,162,135,135,
+135,250, 77, 38, 69, 44, 22, 87,219, 96, 73,165, 82,176,236,219,131, 0,213,209, 52, 24, 12,196,148,245,213,209,172, 72, 91, 69,
+227,246,215,215, 87,192,227,241,192,178,108,165,231,242,103,247,246,150, 8,150, 50,235,157, 12, 22,165,212,189,162, 35,205,223,
+173, 32, 44,143,132, 1, 0,251,182,161, 24,170, 19,193, 42, 55,123, 16,137, 68,184,112,225, 2,186,116,233, 2, 74, 41,196, 98,
+ 49,100, 50, 25, 36, 18, 9, 46, 95,190, 12,145, 72, 4, 30,143, 87,157, 40, 22, 53, 24, 12,219,126,254,249,231,175, 23, 44, 88,
+ 32,173, 56, 70,133,193,250,233,167,159, 84, 26,141,102,155, 41, 6,139, 88, 5,244,181,180,178,254,164,160, 32,119, 83, 19, 95,
+203, 74,123, 17,190,105,159,242,246, 88,255,117, 42,134,105,160,148,118,123,125, 40,134,138,109,198,141, 27,135,215,135,112,168,
+108,152, 6,103,103,103,171,117,235,214, 13,101, 89, 54,160,124,213,235,189, 5, 43,238, 99,197,251,169,162, 87,225, 43,189, 8,
+ 57, 56,170, 29,193, 98, 8,224,196,127,238,103,105,227,122,118,194,220,181,230,155,175,243, 80,152,254, 16, 57,103,191, 45,164,
+ 6, 85,235,168,168,168,219,246,245,186, 35,188,105,235,102,109, 63,236, 5,135,131,187,113,243,202, 25,252,184, 98, 3,190, 26,
+253,121,165, 31, 74,246,246, 54,200,185,162,134, 62,255, 9, 8, 33,209,239,122, 2,141, 26, 53,242,182,180,118, 60, 55,105,222,
+ 47,214, 59,162,248, 40, 72,251,143, 9,156,182,242,236,237, 47,134, 14,122,101,123, 83,167,199,249, 68, 36,234, 22,232,227,186,
+190, 95,199,166, 86, 22,196, 0, 67, 82, 44,214,125,218, 7, 81, 93,116,104,218,215, 2,141, 58, 41,224, 21, 44,233,115,228,215,
+188, 54,206,205,201,144,191, 50,154,245,178,185,114,118,118,238,226,234,234, 58,251,240,225,195,238, 6,131, 65,113,225,194,133,
+226, 61,123,246, 60, 53, 24, 12,203,211,211,211, 15,155, 28, 29, 43,209,190, 48, 87, 65, 22,194,134, 67, 62, 27,116,105,236,210,
+ 53,146, 7, 81, 55,177,112,219, 65,152,243,244,198, 91, 25,234,222, 49, 37,255,169, 62,172, 52,163,241,249,115,119,236,216, 33,
+247,247,247, 39,185,185,185, 47, 34, 45, 58,157, 14,133,133,133, 40, 46, 46,134, 70,163, 65, 80, 80, 16, 51,107,214, 44,249,183,
+223,126, 59, 23,192, 40, 83,211,107,103,103, 7,161, 80, 8,157, 78,247,194,164,136, 68, 34, 88, 90, 90,162,176,176, 16, 39, 79,
+158, 68, 85,131, 83, 10,133,162,116,134, 33,110,102, 10,133, 94, 46,151, 83,185, 92,254,167,109,170,171, 89,110,114,178, 59,118,
+236,104, 55,103,206, 28, 65, 72, 72,200,139,245, 21, 85,132, 53,209,164,148, 42,219,181,107, 39, 91,190,124, 57,220,221,221,161,
+213,106, 95, 49, 82, 12,195, 64, 40, 20, 34, 57, 57, 25,243,230,205, 3,165,212,244, 15, 25,117,190, 30, 65,131,236,161,202,213,
+ 67,149,171,135, 58, 71,135,210, 44, 61,244, 74,227,223,173, 0,171, 73, 3,116, 19, 34, 97,246,239, 26,193,170,168,174, 20,139,
+197, 72, 76, 76,196,241,227,199, 17, 17, 17, 1,115,115,115,148,150,150,226,226,197,139, 72, 77, 77,133, 88, 44, 6,143,199,171,
+ 86, 35,247, 90,181,106,253,112,227,198,141, 46, 99,198,140, 9, 24, 54,108,152,212,207,207, 15, 9, 9, 9, 88,178,100,137,250,
+222,189,123,241, 86, 86, 86,115,128,170,231,153,117,113,171, 53,118,221,182, 67,130,193,253, 59,142, 6, 74, 97, 74, 47,194, 87,
+247,249,223, 52,118,127,203, 48, 13, 29,223,178,249,203, 67, 56,188, 50, 76,195,203,236,219,183,207,211,197,197,197, 15,101, 61,
+ 3,129, 63,247, 22,124,153,155, 81, 81, 81, 97,224,122, 17,114,188, 15,131, 85, 94, 64,143, 15,255,232, 27,243, 77,215,248,200,
+ 79,141, 65,225,197,153, 47,204, 21, 80,214,240,221,190, 94,119, 24, 89,138,214, 29, 62,170, 24, 20,244,245, 66, 38,232,229,113,
+171, 4, 18, 69,144,129, 10, 1,168, 97, 40,120, 10,145, 72,116,187,186, 9,126, 93,147,101,217,137,141, 63,250,198,122,203, 77,
+ 62, 10,211, 30, 34,251,220,140, 66, 86,167,108,157,172,117,189,253,197,208, 65, 38, 53,106, 39,132,180,173, 24,211,227, 19,145,
+232, 91, 1,143, 76,255,176, 69, 67, 97,179, 96, 31,200,179, 18,145,145,146,134, 93, 15,179,243,226,243, 53, 67, 46, 19, 29,146,
+158,106,214,117, 26,106,109,109,229, 40, 64,231, 17, 54,214,215, 14, 22,237,115,105,205,232,168,142, 46, 72,187, 68,103,189,174,
+249,190,168, 74,211,197,197,197, 91,161, 80,252,120,236,216, 49, 59,145, 72,100,254,224,193, 3,227,222,189,123,147,141, 70,227,
+ 79,233,233,233, 59,107,162, 25, 40,149,186, 6,212,245, 60, 63,118,241,106, 73, 73,169, 18,165, 90, 29,156,221, 92,140,231,163,
+ 99, 63,138, 41,209,238, 55, 69,211,193,193,161, 85,255,254,253,235,135,132,132, 48, 47,155, 43,173, 86,139,162,162, 34, 20, 23,
+ 23,163,168,168, 8, 69, 69, 69, 72, 77, 77, 69,211,166, 77, 25, 63, 63,191, 32, 7, 7,135, 86,153,153,153,103, 95,215,124,105,
+152,134,175, 1, 48, 50,153, 44,238,202,149, 43,234,143, 62,250, 8, 82,169, 20,165,165,165,112,117,117, 5,203,178,184,120,241,
+ 34,226,226,226, 10, 0,236,200,200,200, 56, 85, 89, 58, 85, 42,101, 45, 66, 8,207, 92,161,104,219,190,125,251,254, 67,134, 12,
+177,124,121,251,154,104, 2, 64,118,118,182,199,133, 11, 23,190,237,214,173,219,232, 14, 29, 58,200,166, 77,155, 38,240,244,244,
+132,193, 96, 32, 53,213,204,207,207,183,136,142,142, 94,212,172, 89,179, 47, 58,116,232,192,159, 63,127, 62, 44, 44, 44, 96, 52,
+ 26, 33,149, 74, 81, 84, 84,132, 57,115,230,224,210,165, 75, 6, 74,233,202,194,194,194, 73,149,105,190, 50, 14,214,132,197, 13,
+ 42,203,135,111, 27, 7,235,175,200,243, 42,149,202,161,186, 81, 49, 83,210, 25, 29, 29, 77, 95, 31, 15,171,178, 8,214,155, 52,
+ 43,162, 75,124, 62, 31, 25, 25, 25, 56,116,232,208, 43, 99, 96, 85, 44,111,171, 34,124, 75, 58,233,185,115,231,140,132,144, 8,
+131,193, 48,101,220,184,113, 67,148, 74,165,171, 92, 46, 79,211,233,116,155, 44, 45, 45, 43,198,193, 18, 86,165, 41, 18, 73, 4,
+132, 97, 32,149,200,165, 42, 85,118,210,155,122, 17,190,118,173,147, 68, 34, 7,155,138,125,254, 87,247,253,181, 97, 26, 94, 25,
+138,225,181,125, 94, 25,194,225,245, 97, 26, 94,214,236,222,189,123, 2,128, 71,148, 82,134, 16,242,232,245,222,130, 47,201,214,
+141,138,138, 10, 11, 13, 13, 61, 79, 41,149,189,222,139,240,175,200,243,255,100,205,127,141,193, 2, 32,185, 28,245, 24,140, 56,
+ 11,197,215,127,124,197, 92,189,120,210, 89,224,230,149, 51, 96, 89,160, 69,187, 30, 85,154, 25,131,166, 52,126,238,174,103,193,
+ 70,173, 10,134,162,164,184, 14, 31,118,202,122,151,196,219, 5,245,128,155,144,202, 47, 69,199,131, 47,201, 69,193,181, 31, 10,
+136, 81,211, 58, 42, 42,234, 78,141, 51, 13, 48,109,245,209, 61, 66, 98, 97,141,187,227, 6, 35,173,160, 20, 71,159,229,255, 70,
+149,154, 81, 91,105, 89, 85,160,107, 4,185,184,254,155,140, 85,205,123, 90,244,177,117, 17, 96,241, 87,155, 32,153,106, 35,108,
+212,166,197, 95, 58, 71, 97, 69,195,247,117,235,214,141, 12, 9, 9, 49,251,242,203, 47, 31, 23, 22, 22,190,210,240,189,186,196,
+168, 84, 41,129, 10,209,234,179,191, 44,254, 74, 26, 24,142, 61,243,166, 25, 47, 68, 63,234,126,191, 88,123,200, 84, 13,177, 88,
+ 28, 57,106,212, 40, 97,105,105,233,159,204,213,235, 6,171,168,168, 8,119,239,222, 69,175, 94,189,196,177,177,177,145, 0,206,
+190, 37,130, 51,163,124,192, 73,190,173,173,109,246,234,213,171,187,109,217,178,165,231,144, 33, 67,196,145,145,145,120,240,224,
+ 1,110,220,184,161,209,106,181,127, 8,133,194,253,137,137,137, 38,181,242,166,148, 26, 1, 28,247,240,240, 56,191,122,245,234,
+110, 44,203,190,152,207,242, 29, 52,245, 0,102, 88, 91, 91, 47,218,179,103,207,194, 51,103,206,244, 31, 56,112,160, 68,175,215,
+147,119,208, 52, 0, 24,103,103,103, 55,253,200,145, 35,155, 78,156, 56,209,253,147, 79, 62, 97,198,140, 25,131, 21, 43, 86,224,
+247,223,127,103,141, 70,227,126,129, 64, 48, 40, 59, 59,187,202, 14, 40,175,140,131, 85,201, 56, 87, 85,253,110, 2,183,254, 11,
+ 89,255,157, 53, 95,143,132, 53,108,216,208,225,229, 94,154, 47,255, 53, 53,130, 69, 8, 65,104,104,232, 43,255,175, 24,146,129,
+199,227,189,178, 84,167,138, 16,128, 37,165,148, 5,176, 18,192, 10,188, 58,138, 59, 15,255, 25,233,221, 36, 92,220,220,145,154,
+ 12,155,156, 82,117, 65,229,147, 61, 59,216,184,184,185,255, 21,229, 90,193,172, 89,179,150,204,156, 57,115,201,235, 67, 49,188,
+188,221,235, 67, 56,204,158, 61, 27,111, 27,166, 33, 45, 45, 45,127,214,172, 89, 63, 0,128,159,159, 31, 41,175, 22, 12, 69,121,
+111,193,151, 52, 55,163,108,170, 28,217,176, 97,195, 6, 2,120,171, 38, 7, 71,117, 12,214,215, 37, 81,203,244, 0,108, 8, 33,
+211, 82,117,174, 15,254, 92,136, 0, 63,174,216,240,202,164,208,149,193,227, 49,211,178, 14, 14, 94, 78,129,124, 30,193,180,119,
+ 77,188,149,165, 57,140,197,198,111, 74,163,151,179,148, 82, 75, 66,200,212, 91,183,110, 61,120,103,103,110, 97,141,226, 57, 35,
+241,123, 76, 26,205, 40,213,247,216,170,125, 53, 82, 83,222,230,170,175,115,115,178,203,202, 89,176,119, 92,107, 27,114, 56,111,
+224,223,226,134,198,196,196,204,247,246,246,230,173, 89,179,230, 51,173, 86,251, 74,195,247, 26,107, 22,107, 39, 7, 41,132, 60,
+ 63, 79,183,209,177,137, 73,221,238, 23,155, 86, 45,248, 18, 34, 23, 23,151,251, 74,165, 18,132, 16,104, 52,154, 23,198,170,184,
+184, 24,133,133,133, 47,254,175,211,233,144,157,157, 13, 79, 79, 79,188, 52,102,210,219, 76, 70,250,203, 30,193,202,202,234,216,
+242,229,203,251, 47, 95,190,188, 13,128,211, 42,149,106, 71,126,126,126,141,134,254, 40, 55, 58,187,164, 82,217,143,132, 16, 23,
+177, 68,170,189,116,233,210,209,119,209,204,203,203, 43, 6, 48, 66, 42,149,206,253,249,231,159,151, 75, 36,146,176,172,172,172,
+119,210, 44, 55, 79, 31,217,216,216, 56,111,222,188,121,247,250,245,235, 27,243,249,252,107,132,144,222, 5, 5, 5,213,158,236,
+153,188,250,245, 94,237,223, 77,224,247,255, 66,182,127,103, 77, 83,135, 95, 48, 21,131,193, 80, 50,115,230,204,172, 55,205, 59,
+ 88, 97,166, 94, 94,167,211,233, 76, 26,230,196,209,209,209,228,177,200, 42, 27,122, 7, 0, 24, 66, 84, 0,164, 95,207, 94, 84,
+254,193,108,242,100,207, 32, 32,218,255,101,185, 54,115,230, 76, 58,123,246,108, 66, 8,217,143,178,241,168,158,188,222, 8,253,
+229,223,102,207,158,141,153, 51,103,210, 89,179,102, 85,169, 25, 27, 27, 75, 9, 33,167, 1, 36, 0, 72,124, 89,247,229,245, 21,
+251, 84,166,201,193, 81,165,193, 98, 41,144,170,115, 77, 6, 48,248,229,117,127,126,193,225, 79,109,174, 42,243, 88, 29, 58,116,
+ 56, 13,192,239,125, 37,190, 32,191, 16,196,186, 97, 82,126,126,238, 39, 89,247,247,191, 23, 77, 22,248,113, 72,163,200,175, 0,
+ 16, 10, 44,126,221, 92,189,242, 21,116,145,238,119,106, 74, 22, 52,106,211, 98,124,249,203,103,254,223,225,166,190,169,225,251,
+187,242,166,134,239,213,120,217,156, 16,139,197,164,184,184, 24, 42,149,234,149,104, 85, 81, 81, 17,148, 74, 37, 74, 74, 74, 80,
+ 49,181, 71, 73, 73, 9,204,204,204,160,215,235,171,245,165, 88,110, 82, 86,135,132,132,172, 43,175, 38,121,103, 84, 42,165, 43,
+ 0,132,132,132, 8,222,159,166, 42, 13, 64,207,247,169,153,155,155,155, 6,160,137,151,151,151,200,212,201,162, 43,139,100,213,
+244,119, 19, 88,243, 95,200,242, 91,241, 55, 35, 41, 41,201,255,125,107,166,165,165,197,189, 79,189,220,156,140,181, 95, 12,238,
+ 53,170, 98,210,103, 83, 38,123,174, 48,102,121,185, 25,107,255, 87,215,178, 98,154, 17, 0,212,197,197,101,243,243,231,207,221,
+ 9, 33, 73,175, 71,146, 94,255,109,214,172, 89,120,219,152,127, 47,107, 2,128,167,167,231,190,228,228,100,103,161, 80,152,254,
+178,238,235,235, 43,211,228,224,120, 83, 70,251,175, 45, 0,130,254,159,104,182,229, 52, 57, 77, 78,147,211,228, 52, 57, 77, 78,
+243,175,211,252,167, 45, 12,103, 49, 57, 56, 56, 56, 56, 56, 56, 56,222, 47, 4, 64,208, 91, 34, 91,247, 77, 22, 33, 36,168, 6,
+145,179,251,127, 35, 77,251, 74, 52, 79, 85,161,217,182, 6,233,228, 52, 57, 77, 78,147,211,228, 52, 57,205,127,165,102, 85,218,
+255,152,222,137, 92, 21, 33, 23,230,229, 52, 57, 77, 78,147,211,228, 52, 57, 77,174,138,144,171, 34,228,224,224,224,224,224,224,
+224,248, 91,243,214, 97, 26,122,214, 43,235, 62,252,199, 61,174,195, 4, 7,192,227,241, 22,180,104,209, 98,212,165, 75,151,126,
+210,235,245,115,106,162, 65, 8,113,118,112,112,248,142, 82,218,132, 16, 34,230,243,249, 15, 51, 51, 51,231,235,245,250,139, 53,
+ 77, 23, 33,196,205,209,209,241, 59,150,101, 27, 3, 16,242,249,252,152,180,180,180,121,148,210,107,239,160,105,238,232,232,216,
+138,101, 89,215,178, 83,231,101,165,167,167, 95,164,148,166,114, 57,129,131,131,131,131,163,198, 6,235,163, 0, 2, 6, 64, 64,
+ 36,156,102, 15, 39,252,153,107,105,114,197,139, 7,101,131,177,249, 1,136, 5,112,139, 82, 90,244, 46, 9,248,255,162,249,119,
+135, 16,194, 88, 90, 90,182,147,201,100, 99, 75, 74, 74,130,205,205,205, 99,202,167,199, 57, 84, 62, 40,225,187,104,219,247,239,
+223,127,234,186,117,235,208,167, 79,159,233,132,144, 37,148,210,146,234,104,216,216,216,116,245,244,244, 92,187,124,249, 10,187,
+102,205,154, 17,169, 84,138,216,216, 88,151, 81,163, 70,134, 58, 59, 59,239, 74, 75, 75,251,162,186,233,178,179,179,235, 93,167,
+ 78,157,229, 43, 87,174,180,107,210,164, 9, 17, 8, 4,136,138,138,114, 29, 59,118,108,184,147,147,211,166,244,244,244,137,213,
+213,180,182,182,246,175, 93,187,118,135, 85,171, 86,201,154, 54,109, 10,177, 88,140,187,119,239, 42,134, 15, 31,238,226,236,236,
+124, 55, 45, 45,237,100,117,244, 66,134, 71, 11,132, 50, 29, 31, 0,116, 74,161, 33,106,109, 67,189,169,235,184,226,137,131,131,
+131,227, 31,100,176,122, 7, 16, 16, 0,129,205, 48,135, 24,240, 53, 24,144,113,253,201,111, 43,126, 99,110,180,109,219,214,247,
+243,207, 63, 39,229, 83, 71,248,239,220,185,243, 35, 30,143,247,136,101,217,235, 0,238,184,184,184,232, 42,166, 37,120,157,246,
+222,228,197, 24, 89, 39,159, 66, 8,160, 1,195, 48,225, 85,105,126, 80, 7, 58, 66,128,227, 79,222, 28, 73,107,231, 69, 0, 10,
+156,124, 86, 61,205, 19,241,255,140,200,156, 66,161,240,182,179,179,155,104, 99, 99,211, 49, 52, 52,180,104,196,136, 17,137, 15,
+ 30, 60,120,236,235,235,171, 94,191,126,253,124,189, 94,191,202,199,199,231,100,113,113,241,162,119, 24, 23,203, 67,175,215,227,
+209,163, 71, 96, 24, 70, 0,192, 19,192,189,106, 24, 52, 39, 15, 15,143, 53,103, 47, 71,219, 23,105,121,120,146, 77, 1, 40,193,
+ 10, 29,177,122,195, 46,171, 25, 83, 70,247, 55, 55, 55,191, 84, 84, 84,180,171, 26,154,110,117,234,212, 89,126,255,254,125,123,
+137, 68, 2,150,101, 81, 92, 92, 12,103,103,103,172, 95,191,222,234,171,175,190,250, 76, 38,147, 93, 80, 42,149, 7,171, 99,204,
+107,215,174,221,225,193,131, 7, 50,177, 88, 76, 12, 6, 3,209,104, 52,112,115,115,163,219,183,111,151,140, 25, 51,166,129, 88,
+ 44,126,174,209,104, 30,155,100,174,126,137, 22, 20,229,156,141,160,201,170,233, 0, 64, 36,210,121,145,179,173,111, 20,229,156,
+109, 84,213,186,144, 95,112, 53,106, 24,103,178, 56,254,183, 56, 57, 57,133, 88, 89, 89,237, 41, 40, 40, 56,159,158,158, 62,164,
+124,102,131,119,253,248,115,230,243,249,158,148, 82,203,242,255, 23, 24, 12,134, 4, 83,230,220,124, 27,182, 94,173,186, 64, 44,
+ 27, 12,202, 54, 96, 0, 16,134,185, 99,212, 41, 55,230,196,157, 61,248, 78,154, 34,233,103, 0,109,192, 0, 44, 97,152,187,172,
+ 65,249,107,118,236,217,163, 92,206,224,120,111, 17,172,128,112, 88, 17, 96,202,180, 17,195, 24, 62,143, 71,230,175,253,165,223,
+205, 43, 7,169, 83,173, 6, 47,166,220,104,222,188, 57,154, 55,111, 78, 22, 46, 92,232,119,230,204, 25,191,237,219,183,235,175,
+ 92,185, 18, 5, 96,211,155, 52, 41, 5, 90,118,144, 62, 55,232, 85,110, 77, 63,144,170, 61, 26,175,218,222,164, 73,115, 86, 44,
+ 22,163, 50,205,147, 87,174, 68,125, 80,231,205,154,101,194, 64,157, 96,254, 73,151,134,110, 36,178,243,140, 36, 83, 53,223,150,
+206,255,103,230,234,188, 66,161,240, 26, 62,124,248,147,145, 35, 71, 94,144,203,229, 20, 0,148, 74,165,184, 75,151, 46,249,221,
+187,119,207, 85, 42,149, 88,189,122,181,219,242,229,203, 79,154,155,155,167, 22, 21, 21, 53,170, 78, 84, 12,192,204,174, 93,187,
+ 78,255,242,203, 47, 81,171, 86, 45,140, 25, 51, 6,122,189, 62,138, 16, 50, 3,192,247,166, 12,186,103,111,111, 63,115,233,210,
+165,246,165,122, 1,190,221, 18,143,188,146,178, 1, 69,101, 34, 6, 95,180,149, 96,244,232, 49, 22, 55,110,220, 88,136,215, 70,
+144,174, 12, 71, 71,199,239, 86,174, 92,105, 39,145, 72, 64, 41, 69, 73, 73, 9,138,139,139, 81, 82, 82,130,210,210, 82,140, 28,
+ 57,210, 34, 38, 38,102, 41,128,131,213,208,108,181,106,213, 42,153, 88, 44,198,201,147, 39,235,106, 52, 26,158, 86,171,133,209,
+104, 52,214,169, 83,231,209,151, 95,126, 41,190,127,255,126,123, 0, 38, 25, 44,167, 12, 8, 10, 85,170,149, 63,255,240,149, 29,
+ 0,124, 57,229,199,149,128, 42,156,154,176,206, 41, 3, 97, 0, 56,131, 85,121,254,228, 1,232, 33, 16, 8,122,122,121,121,133,
+ 62,121,242,228,182,193, 96,248, 3,192, 31,229,211, 19,189,139,118, 27,103,103,231,239,210,210,210,126,166,148,110,253,183, 92,
+ 83,123,123,251, 63,246,238,221,235,182,101,203,150, 79,127,253,245,215, 35,120,135, 81,242, 9, 33, 2, 0, 17,141, 26, 53,178,
+237,217,179,167,192,209,209, 17, 74,165, 18,241,241,241,178, 83,167, 78,217, 73, 36,146, 92,141, 70,115,181, 58,247,202,182,110,
+ 83, 51,240,205,119, 70,180,106,219,172,207, 71, 61, 20, 14, 54, 22, 80,105,141,120,146,148, 94,235,216,145, 3, 45,157,131, 62,
+188,162,211, 21,246,203,137,187, 92, 82, 93,205, 86, 29, 58, 55,107,219,166,141,194,194,210, 2,133,165, 58, 60, 77, 76,117, 63,
+123,242, 96,115,167,160, 15, 47,176, 68,255, 73,230,189, 19, 74,238,169,227,168, 14,127,106,228,190,251, 1,125,211,131, 2,185,
+153,252,141, 2, 22, 22, 22,136,140,140,196,252,249,243, 5, 0, 26,191,106,170,254, 51,108, 2, 3,192,104,212, 58, 77,255, 98,
+ 52, 68,124, 42,254,176, 99,123, 98,110,110,110,146, 38,239, 45,154, 0, 64, 25, 33, 28,172, 13,109,195,235,170, 90,102,222, 25,
+ 51,224,206,249,239,130,180,234, 2,193,235,154, 50,153, 12,222,222,222,248,230,155,111,222,148,206,247,222, 37,244,127,161, 73,
+ 41,117,246,247,247, 47, 94,186,116,105,221, 89,179,102, 89,169,213,106, 57, 0, 55,175,128, 70,174, 12,195,184,169,213,106,243,
+153, 51,103,218, 45, 92,184,176,174,157,157, 93, 1,165,212,174,154,233,156,187,114,229,202, 25,251,247,239,103,154, 55,111, 14,
+ 43, 43, 43,180,106,213, 10, 71,142, 28,225,255,244,211, 79,243, 1, 76, 55, 37,157, 12,195, 52,111,214,172, 25, 97, 89,138,252,
+ 18, 61,206, 46, 8,193,229, 31,195,160,212,178,200, 47, 40,130, 90,173,134, 76, 38,147, 18, 66,204, 76, 61,119,150,101, 27, 55,
+105,210,132, 0,101, 35,191,151, 45,165, 40, 46, 46,251,171,213,234, 32, 16, 8, 20,132, 16,113, 53, 52, 93,155, 54,109, 10, 0,
+ 80,169, 84,252, 54,109,218,144,214,173, 91,147,226,226, 98,126,197, 52, 62, 2,129, 64, 68, 8,225,155,162,169,149, 9, 8, 75,
+ 89, 7,185, 76,106, 43,151, 73,109, 89,202, 58, 0,128, 41,235,180, 50, 1,249, 43,243, 39, 33,196,142,199,227,109,240,242,242,
+122,200,227,241, 54, 19, 66, 28,223, 69,147, 16, 18, 70, 8,153, 47,147,201, 78,249,251,251, 39,203,229,242, 51,132,144,239, 9,
+ 33, 17, 53,209, 36,132,136,100, 50,217,153,249,243,231,239,190,125,251,118,159,211,167, 79,123,222,187,119,239,163,133, 11, 23,
+238, 52, 51, 51,187, 72, 8,145,189,203,179,233,233,233,185,254,250,245,235, 97, 77,154, 52, 89, 87, 89, 30,170,142, 38, 33,132,
+ 71, 8, 9, 38, 21,243,227,252, 13,202,144,151,113,117,117,117, 14, 12, 12,116, 19,139,197,104,214,172, 25, 40,165,145,239,168,
+ 25, 49, 98,196, 8,199, 9, 19, 38, 8,238,220,185,131,117,235,214, 97,255,254,253,200,202,202, 66,231,206,157,133,173, 91,183,
+118, 20,139,197, 17,213,210,228,155,239, 28, 59,110,124,135,175,198, 12, 85,220,125,174,195,198, 83,207,177,239,106, 58,178,148,
+ 34,116,249,104,144, 69,251,110,125,219,139,196, 22, 59,171,171, 57,117,202,148, 14,195, 62,251, 88,241, 32,157,197,129,107, 25,
+184,246,168, 16, 6,129, 37, 58,125, 52,196,170, 65,211, 14, 31,242, 33,216,244,119,184, 71,255,116,205,127, 69, 4,107,230, 58,
+154, 63,103, 36,249, 97,254,234, 95,166, 51,132, 80, 87,159,246, 15, 60,189, 27,151,178, 44, 11,149, 74, 85,241,162,129, 74,165,
+ 66, 82, 82, 18,174, 95,191, 14, 11, 11,139, 74, 15,116, 44,158, 98,222, 23,255, 57, 92, 65, 97, 33, 92, 92, 61, 33,147,201,170,
+212, 60, 90, 73,117, 30,159,150, 69, 67,134,246,234,206,127,158,158,206,191, 18,125, 54,100,215,178,237, 33,110,117, 62,136,109,
+ 16, 57,249,190,153, 69, 45,213,157, 59,119,112,245,234, 85,228,231,231,163, 81,163, 70,255,152,155, 71, 8,209, 47, 90,180, 40,
+ 58, 45, 45,141, 92,186,116,169,193,156,165,219, 61,239, 21,213,230,101,151, 80,129,157,217,115, 79,127,217, 99, 99, 97, 97, 97,
+194,196,137, 19,207, 58, 58, 58,106, 70,143, 30,221,210, 68, 93, 9, 0,223, 94,189,122, 77, 29, 53,106, 20,226,227,227, 49,116,
+232, 80,213,141, 27, 55,114,155, 52,105, 98,243,235,175,191, 74, 39, 76,152,128,243,231,207,207, 36,132,236, 5,144, 64, 41,125,
+235, 92,106, 44,203,138,164, 82, 41, 80, 84,246,161,170, 51, 84,204, 77, 11,148,150,150,130,143, 2,136, 68, 34, 6,128, 29, 0,
+ 83,191, 60,133, 98,177,248,133,185, 74,201, 42, 70, 82, 86, 9,138, 75, 52, 80,169,244,208,170, 1,177,185, 3, 15, 72,182, 1,
+ 96,106,227,116,158, 88, 44,134,193, 96,128, 78,167,131, 90,173,134, 90,173,134, 70,163, 65, 97, 97, 33,138,139,139,193,231,243,
+101, 0,204, 1,228, 85, 41, 38,146, 26,120,140,112,254,215,243, 86,206, 2, 0, 30, 35,156,111, 6, 53,107,202, 58,158, 72,106,
+248, 11,243,149,216,206,206,238,236,238,221,187,253,189,189,189,145,144,144,224,215,187,119,239,112, 66, 72, 48,165, 84, 89, 77,
+ 45, 25,195, 48, 63, 12, 30, 60,120, 84,255,254,253,137,143,143, 15,248,124, 62, 12, 6,131,107,124,124,124,171,223,126,251,109,
+ 10,159,207,255,213,104, 52, 78, 52,181, 93, 31, 33,132, 17,137, 68,187,214,174, 93,219, 34, 60, 60, 28,155, 55,111,198,141, 27,
+ 55,216,176,176, 48,102,224,192,129,112,119,119, 15, 31, 56,112,224, 62, 66, 72,167,154, 68,178, 8, 33,238, 3, 6, 12,112,227,
+241,120,104,210,164,137,240,202,149, 43, 13, 1, 92,121,199,107,106,230,234,234,122, 62, 50, 50, 50,248,212,169, 83,209,132,144,
+200,234,180, 99,116,118,118,238,230,224,224,176, 80,161, 80, 88,153,186, 79, 73, 73,137, 50, 51, 51,115, 82,106,106,170, 73,243,
+145, 82, 74, 27, 7, 5, 5, 33, 53, 53, 21, 94, 94, 94, 16, 10,133, 17, 46, 46, 46,195, 41,165, 29, 88,150,253,166, 58, 77, 12,
+ 8, 33,206, 17, 17, 17,182,145,145,145,228,251,239,191, 7, 0, 8, 4, 2, 24,141, 70, 48, 12, 3,129, 64, 0, 63, 63, 63,242,
+236,217, 51,107, 66,136,179, 41,213,133,182, 94,173,186, 52,105,211,161, 89,139,240,250,204, 79,123,158,192,200, 26,193, 35, 6,
+240, 9, 11, 86, 47,134, 88,200,131, 79, 96, 40,239, 81,204,221,112,219,186, 31,116,201,137, 59,121,208, 20,205, 14, 93,186, 54,
+247,247,245, 97,150,237,123,138,130,212,135,198,212,216, 11, 57, 12,143,129,127, 72,107, 91,159,128, 96, 94,112,120,164, 32, 45,
+ 33,166,149,181,119,203,182,121, 79,206,115,166,130,163,250, 6,139, 16, 66, 41,165, 47,190,172,102,172,166, 51,108,173,136,199,
+131,251,119,153,228, 12,109,233,221,187,119, 97, 99, 99, 3,123,123,123,152,155,155,227,209,163, 71, 56,117,234, 20,226,226,226,
+ 64, 41, 69,112,112,112,181, 14,156,153,145,129,220,188,226,119,214, 60, 26, 79, 49,119,100, 89,178,107, 57, 57,161,150,147, 19,
+ 63, 39,191, 0, 87,239,222,243, 63,248,107, 91,223, 76,102,248, 70,149, 74,245, 98,123,189,254,159, 87,235,226,224,224, 96,248,
+226,139, 47,243,134,173, 74,168,211,175,181, 51,175, 91,132, 35,246, 93, 73,231,237, 60,199,163, 51, 62,175,159,253,228,201, 99,
+147, 79, 90, 36, 18,125,215,177, 99,199,175, 40,165,130,177, 99,199, 2, 0, 6, 13, 26, 84,116,237,218, 53, 31, 74,105, 22, 33,
+196,249,243,207, 63,127,124,246,236, 89,217,248,241,227,121, 6,131,225, 1,159,207,167,132,144, 57,148,210, 89,111,204,100,124,
+254,237, 59,119,238,120,192,204, 29,182, 10, 30,218, 79,143, 6, 0,152,137,129,236,140, 20, 92,191,119, 14, 54, 54, 54, 22,205,
+155, 55,143,245,246,246,214,164,167,167,143, 45, 45, 45,221, 84,105,198,229,243, 99,162,162,162, 92, 93, 93, 93,203, 12, 86,142,
+ 10, 27,175, 50, 80,106,164, 0,164, 32,172, 28,230,246, 30, 10, 31, 93,209, 29, 59, 59, 59,157, 86,171,157, 90, 84, 84, 84,105,
+ 85, 15,143,199,203,186,127,255,190,194,205,205, 13, 0,244,251,246,237,227,107,181, 90, 80, 74,141,135, 15, 31,238,144,156,156,
+ 28,236,233,233,201,184,186,186, 78,245,246,246, 86,165,166,166, 14, 85,169, 84,111,173, 66, 57, 54,198, 75,215,114,214,185, 85,
+ 5, 9,201,191, 1,128, 75,184,127,222,161, 89, 13,181, 45,103,149, 84,185,238,216, 24, 47, 29, 70,255,101,237, 4, 7,127,253,
+245,215,254,214,214,214, 24, 49, 98, 4,102,207,158,141, 25, 51,102,120,143, 24, 49, 98, 24,128, 37,213,120,201, 74, 29, 29, 29,
+111, 46, 91,182,204,175,105,211,166, 56,114,228, 8,118,236,216,129,103,207,158, 25, 60, 61, 61,249,225,225,225,152, 57,115, 38,
+218,183,111, 63,116,244,232,209, 45, 9, 33, 13, 77, 52, 29,159,205,156, 57,179, 91,179,102,205,240,233,167,159,106,206,157, 59,
+215, 7,192,137,147, 39, 79,182, 62,127,254,252,158,109,219,182, 73,231,207,159,223,118,194,132, 9, 35, 0,172,168,193,249,119,
+111,209,162, 5, 0,160, 89,179,102, 88,184,112, 97,251,119, 49, 88,132, 16,145,141,141,205,225,205,155, 55, 7,215,173, 91, 23,
+159,124,242, 73,195, 62,125,250, 28, 38,132,124, 64, 41, 53,105,222, 72, 39, 39,167, 31,214,174, 93,235, 37,149, 74, 77, 62,174,
+ 86,171,181, 30, 62,124,248,247, 0, 76, 50, 88, 44,203, 54, 14, 10, 10,194,190,125,251, 48,124,248,112,248,251,251,215, 15, 14,
+ 14, 94, 51, 96,192, 0,140, 24, 49,162,141,157,157,157, 67,249,228,226, 85,191, 88,248,124,207,206,157, 59, 11,254,248,227, 15,
+ 0, 64,139, 22, 45,208,182,109, 91,220,191,127, 31,151, 46, 93, 2,143,199,131, 92, 46, 71,211,166, 77, 69,105,105,105,158, 0,
+170, 52, 88,140, 88, 54,184, 91,231, 78,138, 3,215,210, 97,100, 13, 8,245, 50, 71,184,159, 61, 30,165, 20, 33,234, 97, 10,140,
+ 90, 33,204,173,109, 16,209,178,157,117, 70,234,179,193, 48,165,121,128, 88, 54,184,103,183, 15,205, 14, 92, 77, 67, 65, 90, 44,
+125,114, 99,239, 25,189,186,116, 40, 0,220, 58,189,115,141,163,141,244, 3,159,144, 80, 94,228, 7, 93,173,254,216,145, 49, 24,
+ 0,103,176, 56,222, 45,130, 85, 65,110, 1, 84, 54,142,254, 72,206,184, 93,246,255,220, 92,228,230,230,162,118,237,218, 88,190,
+124,249, 43,219,170,213,234, 26, 37,224,191,161,105,107,101,137,174,173, 90,242,238, 63, 90,205, 83,177,170,247,162,249,119,165,
+124,210, 82, 38, 41, 71,111,153, 93,168, 19,246,109,229, 70, 5, 60, 6,253, 90,213, 34, 63, 31, 76, 18,102,149, 10, 44, 25,134,
+ 73, 98,217,170, 59, 18, 18, 66, 4,221,186,117,251,106,215,174, 93,130,216,216, 88,212,169, 83, 7, 58,157, 14,215,174, 93, 75,
+161,148,102,149, 31, 47,141,199,227,165,177, 44,235,221,160, 65, 3, 44, 88,176, 0,126,126,126,164, 83,167, 78, 83,202, 77,214,
+159, 14,148,150,150, 54,255,203, 47,191,108,241,203,198,157, 54,159, 52, 38, 40, 46,214, 64,169, 84,226,209,253,155, 40,205, 44,
+197,154, 53,107, 33,147,201, 8, 0, 97, 70, 70,134,112,194,132,241,235, 92, 93, 93, 59,167,164,164,244,124, 91, 90,211,210,210,
+230,141, 30, 61, 58,124,203,150, 45, 86,101,237,174, 84, 40, 86,137,113,125,113, 89,132, 50,124,194, 13,252,250,203, 58,166,158,
+135,220,166,184,184, 24, 67,135, 14, 93,230,228,228,212, 52, 61, 61,125,248,219, 52,211,211,211, 47, 14, 29, 58,212,229,183,223,
+126,147,120,123,123,199, 21, 22, 22, 34, 47, 47,143,217,182,109,219,104, 39, 39, 39,139,125,251,246, 19,185, 92, 14, 0,188,196,
+196, 68,225,151, 95,126,177,203,209,209,113, 91, 70, 70,198,167,111,187, 55, 0, 52,132, 32,221,217,185,182,151,242, 42, 51,203,
+217, 89,125,233,220,204,212, 45,132, 32,189,108, 27, 80,167,181, 78, 3,158,111, 22, 55,211,104,216,165, 25, 25, 73,113,148,130,
+ 98,230, 95,215, 9,195,214,214,118,116,183,110,221,240,253,247,223,227,224,193,131, 19,172,173,173, 23,207,158, 61, 27,206,206,
+206, 95, 18, 66,150, 86, 99,178,219, 31,151, 44, 89,226,231,231,231,135, 65,131, 6,105, 79,157, 58,245, 53,128,125, 0,146, 46,
+ 94,188, 88,107,211,166, 77, 93,118,237,218,245,253,178,101,203, 36, 43, 86,172,240,250,232,163,143,150, 2,248,220,132, 15,138,
+241,253,251,247,199,162, 69,139,112,238,220,185,143, 40,165, 71, 42,190,183, 8, 33, 93,230,207,159,127,122,250,244,233, 88,178,
+100,201,216,234, 26, 44, 66,136,153,191,191,255,183, 29, 58,116,192,197,139, 23,209,188,121,115, 68, 68, 68, 76, 32,132, 44,167,
+148,230,212,192, 92, 49,102,102,102,187, 54,110,220,216,220,195,195, 3,243,230,205,195, 87, 95,125,133,245,235,215, 55,255,228,
+147, 79,118, 17, 66,122,154,210,203,215,204,204,204, 76, 42,149,226,251,239,191,167,207,159, 63,207, 55,193,144, 89,125,251,237,
+183,196,162,170,170,133,255, 68,200,164, 98,177,184,137,175,175, 47,126,250,233, 39, 92,188,120, 17, 99,198,140,129,175,175, 47,
+ 82, 82, 82,208,181,107, 87,217,227,199,143,123, 1,216,104, 98,185,100, 97, 99, 99,131,172,172, 44, 8, 4, 2, 52,109,218, 20,
+251,246,237,131, 70,163,129,189,189, 61, 10, 10, 10, 94,212, 38,240,249,124, 11, 19, 75,187, 32, 91,107, 11,100,197,164,130, 15,
+ 3, 66,124,108,113,246,126, 46,116,122, 22,246, 54,150,200,200,202, 68,227, 32, 87,104,181,181, 64, 41,107,210, 76, 32, 34, 30,
+ 19, 34,150, 72,145, 87,156,131,212,135,231,114,117, 70,205,240,130,103,151,146, 1,192,186, 78,139,225,183, 46,157,188,213,251,
+195, 22,246, 37,165,110, 32,148,109, 4, 14,142,106, 80,229, 64,163,111,122, 49,191, 28, 17,170, 64,167,211,189, 83, 66,254, 27,
+154,111,226,191,161,249, 55, 48, 89,172,139, 21,191, 80, 46, 97, 12, 39,163,178,140,122,131, 17,199,111,101, 24,101, 98, 98,176,
+ 18,107,139, 88,150,165,132, 16,106,130,142,254,248,241,227,155,199,140, 25,131,197,139, 23,227,241,227,199, 16, 10,133, 8, 10,
+ 10,114,170,104, 31, 69, 8,177, 8, 9, 9,177,103, 24, 6,143, 30, 61,194, 79, 63,253,132,207, 62,251,140, 94,185,114,101,253,
+219, 94, 20,148,210,219,233,233,233,107, 39,141, 29, 94,192, 40,147, 33,167, 57,208,229, 61, 6,171,202,198,215, 51,231, 35, 33,
+151, 69,244,179, 98, 68, 63, 43, 70,142, 86,142,159,126,222,192, 11, 12, 12,236, 34, 16, 8,218, 87,146,214,107,233,233,233,155,
+199,143, 31, 95,144,149,149,245,194, 56,235, 12, 44,116,134, 87,147,161, 80, 40,176,102,205, 26, 75, 55, 55,183, 94, 2,129,160,
+ 85, 37,154,169,105,105,105,247, 70,141, 26,165, 73, 79, 79, 71, 97, 97, 33, 78,156, 56,241,129,171,171,171,197,172,249, 75, 72,
+ 66, 46,125,145,206, 18, 98,131, 13,219,254,224,249,248,248,124, 44, 16, 8, 34, 42,127,121,185,120,249,251,215,217,125,237,218,
+181, 79,189,188,188, 70, 85, 24, 43, 74, 65, 1,192,211,211,115, 68, 84, 84,212,103,193,193, 1,187, 29, 28, 28,125,255,202,188,
+ 68, 8,105,213,183,111, 95, 95,150,101,177,123,247,238,123,148,210, 37,123,247,238,189,169,209,104,208,175, 95, 63, 79, 0, 29,
+ 76,212, 9,251,248,227,143, 71, 53,111,222, 28,227,198,141,211,157, 58,117, 42,132, 82,186,152, 82,154, 72,203, 72,162,148, 46,
+ 63,127,254,124,131,209,163, 71,107, 26, 53,106,132, 79, 63,253,244, 51, 66, 72,243, 42,116,155,244,239,223,223,143,101, 89,236,
+220,185,243,238, 75,230,170,226, 30,158,217,179,103,207, 53,173, 86,139, 1, 3, 6,212, 38,132,180,174,198,185, 11,197, 98,241,
+238,185,115,231, 90,166,166,166, 98,224,192,129,154, 71,143, 30, 97,214,172, 89, 82, 11, 11,139, 35,149,181, 17,124,107,128, 68,
+ 44,254,101,245,234,213,221,234,213,171,135,145, 35, 71,106, 87,173, 90, 53,102,212,168, 81,218,144,144, 16,172, 92,185,178,155,
+ 72, 36,250,165, 90,145,255,204,204,130,115,231,206,217, 84,181,100,100,100,100,154, 24,253,150,121,123,123, 95,245,241,241, 41,
+242,247,247, 15, 53, 24, 12,120,252,248,241,211,223,127,255,157,245,245,245,197,166, 77,155,176,102,205, 26,180,105,211, 6, 12,
+195,244,170, 78, 90, 75, 75, 75, 33,145, 72, 32, 20, 10, 17, 21, 21, 5,141, 70, 3,153, 76, 6,137, 68, 2, 30,143, 7, 75, 75,
+ 75, 40, 20, 10, 0,160,166,221, 31,208, 34,165, 30, 2, 1, 3, 62,195, 34, 54,169, 16, 58, 61, 11,137,144, 7, 1,159, 0,148,
+133,165, 92, 0,137,136, 7,134, 16,214, 68, 77, 20,150,234, 32, 18, 50, 16, 8, 69,132, 49, 24, 95,132, 8, 25,190, 81, 42,149,
+138,136,173,185, 24, 18, 33, 55, 38, 55,199,123,142, 96, 1,128,209,248,231, 94,186,111,138, 2,105,181,218,119, 74,200,127, 67,
+243, 45, 97,243,127,212, 13, 44, 42, 42,226, 95,189,122, 85, 33, 20, 10,197,221,130,195,115, 22,254,246,216,110,246,182, 56,136,
+249, 32, 29, 3,105,230,209, 35, 7, 69,197,197,197,182,190,190,190,185, 38,222,135,161,132,144,121, 0, 2,248,124,254,161,141,
+ 27, 55,146,173, 91,183, 90,245,239,223, 63,158, 16,146, 26, 24, 24,232,190,113,227, 70,115, 0, 88,190,124, 57,221,181,107, 87,
+123, 0, 49,148,210,140,202,116,211,211,211,167,139,197,226, 43,143, 30, 61, 90, 46, 16, 8, 44,205,205,205,173,206,159, 63, 79,
+ 50, 11,117,248,118,203,179, 23, 61, 11,229, 98, 30,166,245,180,199,224,193,159,241, 31, 60,120,240, 35,128,227,111,211, 76, 77,
+ 77,157, 32,147,201,206,223,187,119,111,137,194,165,190,181,109,196, 4,243,214,211,202,170, 31, 29,173, 68, 96,202,203,196,130,
+130, 2,228,228,228, 96,194,132, 9,150, 19, 39, 78,156, 12,224,108, 37,233, 60, 33, 22,139,147, 98, 98, 98,218,241,249,124,177,
+153,153, 89,240,213,171, 87,201,243, 2, 61,166,109,122,138, 98,117, 89,109,171, 66, 34,192,236,254,174, 24, 61,122, 52, 63, 62,
+ 62,254, 7, 0,205,222,164,231,226,226,226,237,239,239,191,123,251,246,237,254, 75,151, 46,205,123,242,228, 73,169,179,179,243,
+236,215, 54,211, 44, 88,176, 32,119,203,150, 45,117, 7, 14, 28,184,219,209,209,177,207, 59, 12,169,241, 78,152,155,155,127, 63,
+124,248,112,236,218,181, 11,249,249,249, 75,203,243,216,146,237,219,183,239, 28, 58,116, 40,182,108,217,242, 61, 33,228,152, 9,
+ 81,172,142,253,250,245,195,209,163, 71,113,250,244,233,111, 41,165, 15,222, 98,106, 31, 19, 66,166,236,223,191,127, 89,255,254,
+253,177, 97,195,134, 14, 0, 42, 27,120,246,131,246,237,219,227,200,145, 35,200,205,205, 93,249,166, 13, 10, 10, 10, 86, 29, 56,
+112,160,113,251,246,237,177, 96,193,130, 15, 0,156, 49,193, 92,249, 89, 88, 88,108, 92,182,108, 89, 88,189,122,245,240,241,199,
+ 31,171,117, 58, 93,135,175,190,250,234,224,142, 29, 59, 20,155, 55,111, 14, 29, 54,108,216,117, 66,200, 16, 83, 7,177,229,241,
+120,243, 87,172, 88,241,121,100,100, 36, 38, 76,152, 96, 56,126,252,120, 87, 74,233, 9, 66, 72,252,228,201,147, 15,255,244,211,
+ 79,188, 69,139, 22,125,206,227,241,178,141, 70,227,215,127,201, 23, 54,195,204,157, 51,103, 78,227, 22, 45, 90, 32, 41, 41, 9,
+209,209,209, 48, 24, 12, 91,110,221,186,117,161, 69,139, 22,115,117, 58,221, 65,137, 68, 50,200,204,204, 44, 48, 48, 48,176,181,
+131,131,131, 44, 51, 51, 83,105,194,245, 44,136,143,143,151,219,219,219, 67, 32, 16,224,238,221,187,176,183, 47,155,242, 53, 43,
+ 43, 11, 65, 65, 65,224,241,120, 40, 40, 40, 0,128, 66,211,204, 16,115, 47, 62, 49,173,182,181, 66, 14, 24, 37,184,253, 40, 5,
+118,182, 86, 48, 18, 6, 25, 25,233, 8,246,117, 5, 33, 4, 5,185, 25, 32,132,152, 52,151,174,145,178, 81,207,211,178, 92,108,
+ 20, 98,212,107,220,206,230,234,177,236,173, 22,117,154, 13,227,243, 8, 79, 44, 49, 95,251,249,167,159,218,178, 44, 69, 65,110,
+ 38,248, 12,115,131,179, 12, 28,239,213, 96,177, 44, 11,169, 84,250, 74,132,233,245, 40,144, 84, 42,133, 70,163,169,214,129,165,
+ 82, 41,116, 6,188, 87, 77, 83,142,249,190, 53,255, 74, 12, 6,131, 98,226,196,137,225,225,225,225,169,109,218,180, 73,168, 91,
+215, 58,185,115, 99,169,237,178,245,123,131, 59,181,172, 23, 93,144,151,149,243,204,220, 92,147,152,152,104,255,235,175,191,134,
+235,245,122,153,137, 17,177,231, 0,158, 19, 66, 86,117,232,208,225,139,222,189,123,227,193,131, 7,246, 74,165,210, 94, 38, 43,
+147,216,186,117, 43,118,237,218,181,152, 82,106,242,192,155, 26,141,230, 24, 0, 47, 66,136,101,173, 90,181, 50,173,173,173,133,
+233, 37,165, 47,122, 22, 10,249, 12,154,126,117, 19,249, 5, 69,176,181,181,133, 66,161,240,172, 74,179,124,156,171,131,222, 31,
+ 76,174,175,186,183,246,220,166,141, 27, 45, 0,128,199, 16,216, 89, 8, 81, 80, 80,128,236,236,108,228,228,228,128, 97, 24, 24,
+ 12, 6,127, 19,210,249, 24,192, 99, 66,136,115,235,214,173,231, 42, 20, 10,176,121,165,200, 47,209,189, 82, 5, 89, 82,162,132,
+135,135, 7, 20, 10,197, 27,171, 35,172,173,173, 21, 98,177,120,211,186,117,235,252, 20, 10, 5,111,232,208,161,150, 67,135, 14,
+109,246, 54, 51, 38,147,201,120, 27, 54,108,240, 9, 14, 14,222,232,225,225,241, 65, 98, 98, 98,225,255, 42, 47,149, 15,121, 48,
+ 98,210,164, 73,161, 18,137, 4, 63,255,252,243, 51, 0,219,202,127,222,189,106,213,170, 25,253,251,247,247, 29, 51,102, 76,224,
+244,233,211, 39,148, 87, 21,190,117,140, 36,161, 80, 24,226,239,239,143,189,123,247, 2,192,222, 42, 14,191,231,202,149, 43,203,
+ 58,119,238, 12,137, 68, 18, 86,197,182,158,110,110,110,216,191,127, 63, 0,220,126,203, 54,183, 31, 61,122,132,158, 61,123,130,
+ 16,226,105,194,185,119,107,215,174,221,158, 5, 11, 22,240, 21, 10, 5, 62,255,252,115,237,245,235,215, 59, 81, 74, 47, 16, 66,
+ 90, 13, 24, 48,224,252,182,109,219,228,231,207,159,247,251,238,187,239,174,240,120,188,249, 70,163,113,122, 21,154,159,205,155,
+ 55,111, 90,247,238,221, 49,123,246,108,250,219,111,191,125, 76, 41, 61, 81,254,124, 29, 39,132, 12,180,178,178,218,246,205, 55,
+223,144,194,194,194,105,132,144, 20, 74,233,234, 74,242,121,161,209,104,116, 84, 42,149, 38,125, 33,154,186,189,141,141, 77,199,
+ 22, 45, 90,224,199, 31,127,196,152, 49, 99,176,105,211, 38, 10,224, 80,122,122,250, 93, 0, 45,202, 34,176,206,138,168,168,168,
+192,230,205,155, 11,239,221,187,247, 33,128,223, 76, 40,155, 18,207,158, 61,107,223,169, 83, 39,161, 76, 38,131,209,104, 68,110,
+110, 46,212,106, 53,130,130,130,208,184,113, 99,100,101,101,225,208,161, 67,186,130,130,130, 68,147,202, 59,109,233,230,147,135,
+255,104,213,165,223,112, 11,169,144, 7,163, 94,132,204,204,108, 20, 27, 13, 8,241,119, 71,243,224, 90, 72,202, 84,225,248,161,
+ 63,242,139,139,149,155, 77,209,212,107,148, 27, 79, 29, 59,216,178,121,199, 1, 22,114,223, 64,120, 58,141, 9,190,117,229,212,
+ 73,137, 72, 64, 6,244,239, 99,217,180,161, 55,238, 62, 43,194,209, 67,123,243, 11,139,138, 54,130,131,163, 38, 6,235,229, 6,
+238, 47,145, 53, 97,194, 4,251,137, 19, 39,194,220,220, 28,185,185,185,208,235,245, 47,162, 77, 98,177, 24,150,150,150,200,205,
+205,197,206,157, 59, 1, 32,171,242, 47, 58, 81,250,188,149, 43,220, 8, 79,174, 21, 75,101,212, 90,246,238,154, 0,160,213,243,
+179, 86,239,252,221,186, 99,139, 8,126, 45, 39,167, 55,133,233,171,173,249,255, 1,157, 78,119, 34, 33, 33, 33,172, 95,191,126,
+217,110,110,110, 42,181, 90, 13,149, 74, 85,124,104,199,178, 58, 46,230, 35,159, 49, 12, 67, 21, 10, 5,107,111,111, 95,120,250,
+244,105,123,131,193,112,174,154,135,152,208,167, 79, 31,230,212,169, 83, 35, 70,141, 26, 69,188,189,189, 17, 21, 21,133,159,127,
+254,153,110,222,188,121, 25,128,169, 53, 76,122,137, 70,163,121, 37, 2,242,114,207,194,146,146, 18,104, 85,153,208, 87,163, 71,
+ 66,252,169, 31, 31,213,174, 93, 91, 31,232,254,159,225, 68,242,243,243,145,157,147,243,194, 96,101,103,103, 3, 64,117, 66,152,
+ 69,127, 78,231,127,106, 30, 74, 75, 75,161, 86,102,192,104, 52,190, 81, 51, 47, 47,175,216,217,217,121,197,242,229,203,127,154,
+ 59,119,174,253,146, 37, 75,242, 98, 99, 99,139, 24,134, 81,191,246, 17, 35,241,242,242, 82, 44, 90,180,200, 97,249,242,229,121,
+ 44,203,174,248, 31,155,171,238,245,234,213,219,212,177, 99, 71,197,168, 81,163,176,124,249,114,164,167,167, 79,165,148, 26,202,
+203, 6,150, 16, 50,121,229,202,149,135,166, 76,153, 2,157, 78,183,232,200,145, 35,179, 9, 33, 35, 40,165,219,222,164,105,103,
+103,231,202,231,243, 17, 29, 29, 93, 68, 41,125, 90,133,161,207,168, 91,183,110, 38, 33,196,193,201,201,169, 78,101,219, 90, 91,
+ 91,123, 41, 20, 10,164,166,166, 2, 64,194, 91, 54, 75, 76, 75, 75,163, 34,145,136, 56, 59, 59,123, 87,117,254, 86, 86, 86,147,
+215,173, 91,199, 63,123,246, 44,102,206,156,153,146,148,148, 52,128, 82,122,177, 60,109,209,132,144,230,173, 90,181,218, 49,101,
+202,148,186, 63,252,240, 3,121,244,232,209, 72,188,101,136,146, 10,220,221,221, 71,124,246,217,103, 88,177, 98, 5,214,174, 93,
+ 59,146, 82,186,251,181,115,222, 65, 8,177,178,177,177, 89, 49,124,248,112,108,220,184,113, 0,128,213,149, 68,107,167,244,237,
+219,119, 70, 94, 94,222,124, 83,238,169, 41,219,187,184,184,180,106,221,186,181,151, 90,173,198,238,221,187,159,238,217,179, 39,
+223,104, 52,238, 44, 55, 87, 47,231,143,125,199,142, 29,155, 49,121,242,100,156, 61,123,118,163,179,179, 51, 47, 45, 45,109, 71,
+ 21,247, 52, 77, 34,145,228,220,189,123,215,209,207,207,143,113,114,114, 66,163, 70,141, 96,105,105, 9, 30,143,135,172,172, 44,
+ 92,184,112,129,141,143,143,207, 49,117,192,209,156,184,179, 7, 29,235,117,186, 28,125,253, 66,187,192,134, 77, 5, 46,182,214,
+136, 8,116,129,165,153, 16, 4, 64, 82,150, 10,103,206,156,212, 39, 36, 60,189,106, 74, 15,194, 10, 77,231,250, 31, 94,177,180,
+175,213, 46, 32,184, 41,191,142,175, 15,218,181,104, 96,101, 37, 23,130,165, 20,119,159, 21,226,228,137, 99,250,180,148,228,179,
+ 92, 15, 66,142,247, 29,193,154,181,118,237,218,166,235,215,175,239, 60, 97,194, 4,197,160, 65,131, 32,149, 74, 81, 90, 90, 10,
+ 55, 55, 55, 24, 12, 6, 28, 57,114, 4,209,209,209,197, 44,203, 30, 2,112,249,181, 7, 51,232,229,113,171,166, 45, 87,214, 42,
+ 27,188,178,180,233,236,181,245,223,139, 38, 0, 92,121,102,112,113, 78,207,153,149,155,127,100,188,187,139,147,176,125,179,198,
+124, 91,171,178,222,204, 38,106,182,125,223, 99,122,252, 47, 52, 13, 6,195,231,132,144,192,201,147, 39, 47,116,113,113,113,158,
+ 61,123,246,243,128,128, 0, 85, 81, 81, 17,213,106,181,108, 78, 78,142,108,247,238,221,158,185,185,185,197,122,189,126, 32,165,
+244,110,117,210, 73, 41,213, 1, 24, 69, 8, 57, 80, 88, 88,120,252,171,175,190,194,119,223,125,135,131, 7, 15, 54,167,148, 94,
+174,233,185, 83, 74, 13,158,158,158, 5,183,111,223,118, 16,217,248,192,193, 82,136, 14,223,150, 5, 35, 20, 98, 2, 85,105, 49,
+ 98,239,223, 69, 81, 81,209,173,106,104,106, 93, 92, 92, 10, 51, 51, 51,109, 29, 28, 28,202,204, 85,118,246, 11,115,149,151,151,
+135,220,220, 92,250,242,189, 55, 65,179,212,203,203, 75, 25, 27, 27, 43,226,201,220,224,104, 37, 70, 89, 21, 36,133,157,130,143,
+210,210, 98, 60,188,118, 21,133,133,133,231,222,166,153,150,150,182,211,217,217, 25, 0,126,154, 49, 99,134,109,135, 14, 29,158,
+220,184,113,163,229,203,199, 9, 9, 9,217, 55,123,246,236, 15,191,251,238,187,156, 77,155, 54, 77, 73, 79, 79,223,250,191,204,
+ 75, 54, 54, 54, 19, 15, 31, 62,172,208,233,116, 88,190,124, 57, 22, 47, 94,188,158, 82,250,251,107,215,226, 48,143,199, 91,201,
+ 48,204, 23, 95,126,249, 37,134, 15, 31, 46, 11, 13, 13,157,240, 82,148,235, 21,205,212,212,212,233, 33, 33, 33, 51,178,178,178,
+ 76, 50, 4,143, 31, 63, 30, 22, 18, 18, 50, 61, 43, 43,107, 97,101,231, 46,151,203,229, 70,163, 17, 9, 9, 9,249,148,210,194,
+183,220, 55,181,143,143, 79,170,209,104,116,149,201,100,214, 85,229,207,252,252,252,249,161,161,161,179, 50, 51, 51, 79, 0,152,
+247,250,144, 35,148,210, 59,132,144,192,177, 99,199,142,254,254,251,239,123,102,100,100,236,172, 74, 51, 41, 41,105,126,171, 86,
+173,190,141,139,139,219, 68, 41, 93,251,150,116,254, 76, 8,209,109,221,186,117,100, 66, 66,194,130,202, 52,211,210,210, 14, 1,
+ 56,100,234,253,125,219,246, 47,107, 50, 12, 51,121,218,180,105,204,182,109,219, 0, 96, 81, 74, 74,202,218,183,152,181,187, 46,
+ 46, 46,155, 67, 67, 67, 7,173, 94,189, 90,210,166, 77,155,225, 0,118, 84,149, 63, 53, 26,205,181, 43, 87,174, 52, 78, 76, 76,
+180,109,213,170,149, 16, 0,138,138,138, 80, 80, 80,128, 67,135, 14,233,226,227,227,115, 74, 75, 75,175, 85,167, 12, 49,104,139,
+250, 95, 57,179,127, 71,226,227,251, 17,145, 29,186, 89,105,117,174, 16,231,242, 80,144,155,129, 99,135,254,200, 79, 72,120,122,
+ 85,169, 44,232, 95, 29, 77,157,166,176,223,213,179, 7,118,166, 36,196, 54,110,209,170,147,149, 90,235, 14,177,144, 65,110,102,
+ 42,142, 29,222,159,151,144,240,236,162, 90,175,249,244,175, 42,231,255, 77,154,255, 56,104, 69,107,219, 74, 22, 0, 34, 0, 31,
+ 42, 20,138,229, 51,103,206, 92,123,253,250,245,181,157, 59,119, 94, 43, 18,137,150, 3,248, 16,128,232, 45,251, 5,253, 47, 53,
+ 59, 52,130,226,179,174,204,134,185, 35,249,186,125, 75,124,245,115, 70,128,154,168,217,214,148,235, 80,157,229,127,173, 9,160,
+153, 64, 32,184, 90,175, 94,189,179, 10,133, 34,219,195,195,227,162, 64, 32,184, 1,160,197,187,166, 19,128,109,223,190,125,217,
+226,226, 98,218,167, 79, 31, 10,192,226, 93, 53,197, 98,113,235,200,200, 72,253,243,244,124,122,241, 78, 50, 61,116,254, 1,221,
+126,240, 42, 93,187,227, 56, 93,178,114, 3,173, 95,191,190, 22,128,123,117, 52, 69, 34, 81,135,200,200,200,130,156,156, 28,250,
+232,209, 35,122,225,194, 5,186,103,207, 30,186,118,237, 90,186,106,213, 42,234,236,236,156, 11,192,185, 58,154, 82,169,180, 91,
+135, 14, 29, 12,169,217, 37,244,218,131, 12,122,234,250, 83,186,239,244, 93,186,243,208, 85,186,126,235,239,212,207,207, 79, 13,
+192,161, 42, 77, 39, 39,167,190,125,250,244,121, 82,183,110,221, 53,175,255,230,237,237,189,178, 79,159, 62, 73,206,206,206, 3,
+255,138,188, 4,160,131,139,139,203, 35,161, 80,120, 24,192,192, 42,246,235,199,231,243, 15, 58, 58, 58,222, 4,208,227,127,157,
+231, 1,116,182,183,183,191, 6,160,107, 21,251, 85,108,215,253,159,248,188,191, 15, 77,103,103,231,214,110,110,110, 23,156,157,
+157,191,169,106, 63,127,127,127,161,163,163,227, 92, 23, 23,151, 35, 78, 78, 78,109,170,147, 78, 0,206,102,102,102,205,204,204,
+204,186,152,153,153,117,177,180,180,108,246,242,115, 88,147,115,183,241,105,219,165, 86,195,174,251,220, 26,124,152, 84, 43,184,
+115,146,103, 72,183,125, 54, 62,109,187,188,171,166,123, 72,183,253,181,130, 59, 63,175, 21,220, 37,177,118, 88,183,125,182,190,
+109, 59,254,211,238,251,223, 89,243,159,182,152,188, 97,175,178,150, 43,102, 0,250, 49, 12,243, 51,128,126, 0,204,170,184, 1,
+ 65, 38,220,164,247,174,217,161, 37, 92, 70,245,226, 29,153,250,169, 32,219, 68,205,127, 76,134, 6,208,141,207,231, 95, 1,208,
+237,125,166,211,220,220,124, 93,239,222,189,141, 2,129, 96,197,251,210,180,177,177,249, 41, 34, 34, 66,183,108,217, 50,186,119,
+239, 94,186,118,237, 90, 58,122,244,104, 26, 20, 20,164,177,182,182,254,180, 38,154,142,142,142,243,234,213,171,151,183,117,235,
+ 86,186,115,231, 78,186, 98,197, 10, 58,107,214, 44,182, 86,173, 90,217,214,214,214, 93,107,162,105,111,111,255, 75,179,102,205,
+116,191,252,242, 11, 61,121,242, 36,221,190,125, 59,157, 56,113, 34,245,247,247, 87,203,229,242,143, 76,213,172, 83,167,142,232,
+109,191, 53,108,216, 80,192, 21,184,156, 38,167,201,105,114, 6,235,159,179,240, 77,141,116,237,126, 64,241, 81, 0, 41, 33,192,
+206,223, 31,178,123,122,250,195,240,251,131,119, 31,171,167,118,237,218, 37,132,144,157, 79,159, 62,221,227,238,238,110, 72, 76,
+ 76,124,103,205,163,231,104,106, 59, 79,210,233,100,162,145, 15,192, 96,250,176, 61,255,136,136,228,126, 0,251,223,183,110, 97,
+ 97,225, 16, 66,200, 24, 74,169,234,125,105,230,228,228, 76, 36,132,108,125,250,244,233, 34,185, 92, 30,108, 52, 26,245,106,181,
+250, 82,118,118,246, 4, 74,105,114, 77, 52,211,211,211,167, 19, 66,246, 78,157, 58,117, 42,128,250,132, 16,173, 94,175,191,146,
+149,149, 53,135, 82,154, 94, 19,205,204,204,204, 97, 66,161,112, 67,124,124,252, 2,169, 84, 90,159,101, 89,173, 82,169, 60,151,
+147,147, 51,158, 82,154,105,170, 78,124,124,252, 91,219,127, 69, 69, 69,113,243, 14,114,112,112,112,252,139,218, 96,189,194,239,
+ 15, 40,122,214, 35,232, 17, 4,195,239,247,222,143,105,121,250,244, 69,251,215,247, 58, 53,200,137, 4,250,222, 53,185,234,228,
+247,103,174, 94,210,188, 11,160,205,123,214,188, 13,160,247,251,212,212,233,116,215, 1, 68,114,185,128,131,131,131,131,227,189,
+ 27, 44, 0,248,227, 30,229,174, 26, 7, 7, 7, 7, 7, 7, 7, 71, 37, 16, 0, 65,111,137, 2,220, 55, 89,132,144,160,234, 30,
+184, 42,253,255,177,166,125, 37,154,167,170,208,108, 91,131,116,114,154,156, 38,167,201,105,114,154,156,230,191, 82,179, 42,237,
+127, 76,239,196,255,106, 11,122, 19, 26,164,255, 77, 52,185,134,138,156, 38,167,201,105,114,154,156, 38,167,201, 53,114,127,111,
+ 11, 55,193, 18, 7, 7, 7, 7, 7, 7, 7,199,123,134, 51, 88, 28, 28, 28, 28, 28, 28, 28, 28,156,193,226,224,224,224,224,224,
+224,224,224, 12, 22, 7, 7, 7, 7, 7, 7, 7, 7,103,176,222, 35,246,255, 79, 52, 57, 56, 56, 56, 56, 56, 56, 56,222, 27,228,
+223, 52,202, 57, 7, 7, 7, 7, 7, 7, 7,199,255, 2,174,138,144,131,131,131,131,131,131,131,131, 51, 88, 28, 28, 28, 28, 28,
+ 28, 28, 28,156,193,226,224,224,224,224,224,224,224,224, 12, 22, 7, 7, 7, 7, 7, 7, 7, 7, 7,103,176, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56,131,197,193,193,193,193,193,193,193,193, 25, 44, 14, 14, 14, 14, 14, 14, 14, 14,142,191,222, 96, 17, 66,218,114,
+154,156, 38,167,201,105,114,154,156, 38,167,201,105,114, 6,139,131,131,131,131,131,131,131,131,131, 51, 88, 28, 28, 28, 28, 28,
+ 28, 28, 28,156,193,226,224,224,224,224,224,224,224,224, 12, 22, 7, 7, 7, 7, 7, 7, 7, 7, 7,103,176, 56, 56, 56, 56, 56,
+ 56, 56, 56,254, 34, 8,128, 55,246, 4,160,148,158, 50, 89,164, 6,189, 9,170,210,231, 52, 57, 77, 78,147,211,228, 52, 57, 77,
+ 78,243,159,167, 89,149,118,117,252,199,223, 26, 74,233,127,109, 1,208,150,211,228, 52, 57, 77, 78,147,211,228, 52, 57, 77, 78,
+243,223,182,240,185, 32, 30, 7,199,255,115,246, 16, 30,242,125, 61, 65,169, 51,120,162,116,164,223,123,138,153,148,125,103,205,
+204, 0,119, 72,245, 14, 48, 72,178,145,121,247,217, 59,107,114,112,112,112,252,139,224, 12, 22, 7,199,255,119,178,253,234,130,
+143, 5, 96,224, 4,170,139,135, 93,192, 2, 0,247,223, 89, 83,200,206,131,145,113, 5,213,197,193,222,247,123, 0, 15,184,139,
+205,193,193,193, 97, 26,127, 73, 35,247,176,176,176,168,176,176,176,185,145,145,145, 98,238, 22,112,252,183,136,140,140, 20,135,
+133,133,205, 13, 15, 15,143,250,199,158,228,214,122, 50, 48,198,142, 90, 61,235,114,236, 94,129,189, 82, 99,172, 11,198,208, 9,
+ 27,234,154,189,147, 38,159,180, 83,235,216, 90,219,110, 40, 29, 74,181, 6,127, 80,188,155,102, 57, 65, 65, 65,150,141, 26, 53,
+ 58, 22, 28, 28,108,203,229, 80, 14, 14, 14,206, 96,189,103, 88,150,109,104,111,111, 63, 65,165, 82, 37,133,134,134,118,253, 55,
+ 93,240,198,141, 27, 95,137,136,136,200,108,210,164, 73,102,147, 38, 77,162,171, 90,255, 79,196,217,217,185,110,189,122,245,146,
+ 2, 3, 3,227, 94, 94,111,223,160,103, 19,255, 22,131,102,218, 6,118,111,249,174,199, 8, 13, 13,237,170, 86,171,147,106,213,
+170, 53,222, 96, 48, 52,252,199, 94, 76, 53,235, 0,134,215, 42, 38, 93, 41, 75, 47,210, 59, 68, 37, 42, 21, 0, 47, 18, 90, 56,
+213, 88,179,144,117, 0,104,235, 59, 41, 42,249,149, 60, 59,135,139, 79, 53,230, 96,152, 86, 80, 19,199,119, 77,174, 72, 36, 26,
+ 73, 41,253, 64, 32, 16,140,227,138,223,127, 55,132,144, 32, 66, 72, 87, 66, 72,216,123,212,252,193,207,207, 47,149, 16, 50,150,
+187,194, 28,255,111, 12, 86,239,218,164,233,199,117,200,249,190,181, 73,113,191, 58,164,100, 96, 29,114,169, 87,109,210,186,166,
+ 7,254,253,247,223,165, 91,182,108,177, 15, 8, 8,216, 25, 30, 30,126, 41, 52, 52,212,167, 38, 58, 97, 97, 97,199,194,194,194,
+122,191,190, 46, 52, 52,180,239,203,235, 26, 53,106, 20,211,168, 81,163,194,176,176,176,167,166,232,134,132,132, 60, 9, 13, 13,
+ 45, 13, 11, 11,123,242,218,139,187,111,163, 70,141,142,189,118,188,222,175,175,123, 27, 60, 30,207,245,224,193,131,246,135, 15,
+ 31,182,231,243,249, 14, 47,110, 4,195,188,113,125, 13,174,199,208,176,176,176, 43,175,157,203,144,215,215, 85, 97, 78,174,132,
+132,132, 12,121, 77,247, 74, 88, 88,216,208,247, 97,174, 90,180,104,113,233,246,237,219,181, 20, 10,133,229,203,191, 57,218, 88,
+182,191,114,104,229,132, 79,123,183, 27,105, 31,208,163, 94, 13,141,149, 79,227,198,141, 47,121,121,121,237, 92,176, 96,129,253,
+204,153, 51,101,255,216,167,119, 79,128, 16,132,109,193, 82,106,247, 48, 85,109,247, 97,215,222,252,219,201, 42, 59,189,209,104,
+ 13,240, 34,177,201, 67, 92, 35, 77,190,190, 57, 75,169,195,233, 68,129, 93,171, 62,163,121,103, 18,249,118,122,163,209, 6, 12,
+ 90,214, 72,243, 63,249, 80,192,227,241, 38, 12, 31, 62,156, 33,132,124,233,229,229, 37,250, 55, 21,182,225, 46,196,165,141, 55,
+255, 70,136, 51,105,250, 30, 13, 69,160, 92, 46,191, 69, 8,169,251,255,204, 92, 53, 4, 32,163,148, 30, 0,224, 64, 8,225,191,
+ 7,205, 37,115,230,204,153, 28, 19, 19,227, 92,187,118,237,217,132, 16, 30,247,138,231,248,219, 27,172,126,181,201, 44, 7, 71,
+151, 19,223, 44,217,222, 98,221,249,103,102,171, 14,221,150,143,159, 50,191,169,163,141,221,193, 1,117,200, 15,111,219,175,178,
+174,150, 34,145, 8,207,158, 61,195,242,229,203, 37,179,102,205,106, 98, 97, 97,113, 55, 60, 60,124,105, 64, 64,128,188,178,180,
+188,174, 73, 41,109, 42, 16, 8,214,133,135,135,111,172, 40,176, 9, 33, 77,197, 98,241, 47,225,225,225, 91, 43,170, 33, 67, 66,
+ 66,106,223,184,113,195,156, 16,226, 96, 74, 58, 27, 53,106,228,116,235,214, 45, 25, 80, 22, 9,136,140,140, 20, 55,106,212,104,
+139,139,139,203, 90, 0, 77, 1,192,203,203, 75, 20, 30, 30,190,209,205,205,237, 87, 66, 94, 45, 52,223,118,238,132, 16, 88, 90,
+ 90, 98,251,246,237,224,241,120,127, 90,191,117,235, 86, 16, 66,170,125, 61, 3, 2, 2,228, 97, 97, 97,191, 59, 57, 57, 45,101,
+ 89, 54, 2, 0,234,213,171, 39,107,212,168,209, 30, 87, 87,215,101, 21,235, 76,209,164,148, 70, 8,133,194,165,141, 26, 53,218,
+ 83,175, 94, 61, 25, 0,176, 44, 27,193,231,243,151,132,133,133,253, 94,157,123,212,176, 97,195,225,245,235,215, 79,171, 95,191,
+126,154,175,175,239,119, 14, 14, 14,231, 86,172, 88, 97,243,242,185, 87, 68,174, 50,179,114,243,175,220,140,121, 52, 97,120,175,
+200, 90,110, 14, 3, 44, 27,116,183, 48,229,220, 43,206, 63, 60, 60,124,169,133,133,197,221,105,211,166, 69,204,155, 55, 79,162,
+211,233, 32, 20, 10, 81,147,252, 89, 83,254,167,154, 57,196, 30,148,182,125,148,161,146,120,248,135,202,237, 67, 63,130,189,185,
+ 64,124,245,105,169, 2, 4,109,160,147,217,213, 72,147,240,219,196,164,170,164, 86,129,157,100, 97, 17, 45,192,216,248,136,207,
+197,149,154,131, 97,106,166,249, 31,122, 69, 68, 68,136,218,182,109, 11,103,103,103,158,133,133,197,128,191,213,245,252, 47,106,
+134,187, 16, 23,133,153,232,250, 79, 51,199,135, 58, 91,203,246,155, 98,178, 76,232, 62, 31,104,111,111,127,118,229,202,149, 33,
+ 10,133,226,130, 41, 38,235,239,112, 61,203,205,149,144, 82,122,173,124,213, 3, 0,205,223, 81,115,201,172, 89,179,198, 77,155,
+ 54, 13, 69, 69, 69, 24, 60,120,176, 57,128,159, 76,213, 84, 40, 20,222,245,235,215,223, 26, 24, 24,248, 60, 56, 56, 88, 27, 16,
+ 16,160,246,245,245, 77, 12, 10, 10,218, 36,145, 72, 60,255,233,249,243,239,162,249,175, 51, 88,125,234,144, 38,182,142, 46,147,
+127,216,119, 83,106,124,112, 11,183, 62,109,137,216, 47, 58, 65, 26, 23,133,105, 99,190,150,154,155, 91,125,217,187, 14,105, 85,
+147,131,199,197,197, 97,215,174, 93,176,181,181, 37, 27, 54,108, 16,247,238,221,123,164,185,185,121,114, 88, 88,216, 0, 83, 53,
+120, 60,158,113,227,198,141,102,221,186,117,235,103,109,109, 29, 19, 18, 18, 82,155, 97, 24,227,230,205,155,205,250,246,237,219,
+ 91,171,213, 62, 12, 13, 13,245,137,142,142, 54,222,188,121, 19, 12, 99, 90,208, 46, 42, 42,202,112,244,232,209, 23, 81, 17, 74,
+233,195,239,191,255,190,223,222,189,123, 21, 22, 22, 22,108, 72, 72, 72,109, 55, 55,183,152, 31,126,248, 97,192,158, 61,123, 20,
+230,230,230,172,137, 5, 1,212,106, 53,164, 82,233, 43, 70,138, 16, 2,149, 74, 5,137, 68,242,138,241, 50, 49, 50, 16,104, 99,
+ 99, 19,187, 96,193,130,110,251,246,237,147, 42, 20, 10,132,133,133,249, 91, 90, 90, 62, 90,184,112, 97,247,138,117,166, 34, 20,
+ 10,177,125,251,118,217,199, 31,127,220, 85, 44, 22,199,134,133,133,249, 11,133, 66,236,216,177, 67, 54, 96,192,128,206, 50,153,
+236, 97, 72, 72, 72,160, 41, 90,122,189,126,198,205,155, 55,157,206,159, 63,239,228,238,238, 62,102,213,170, 85, 14, 2,129, 0,
+ 0, 96, 52, 26, 95,137, 92, 13,232,249, 65,248,184, 25, 43,207,170,212, 26,237,188,169,159, 69, 10,140,104,108, 98,212,110,128,
+185,185,121,242,231,159,127, 62,106,251,246,237, 98, 71, 71, 71, 38, 42, 42, 10,197,197,197,213,190,150,255,127,162, 87,132, 7,
+190,177, 33, 0,175,168, 68,149,109,131,182,159,240, 17,127, 16,141, 60,205,248,103,227,138,237, 41, 67,221, 1,218, 8,179, 35,
+249,213,210, 20,208, 6, 96, 88,159, 19,241,196,182, 73,167, 1,252,164,164, 36,120, 54,136,228, 29,142,131, 3, 37,212, 19, 44,
+ 66,171,165,249, 18, 2,129, 96,102,159, 62,125,228, 73, 73, 73,104,218,180,169, 76, 36, 18,205,120, 47, 81,188, 53,190,238, 88,
+231,219, 18, 27,234, 58,225,124,228,223,174,227, 78,184, 11,113, 49, 55, 19, 93,219,177, 99,151,115,189, 14,195,200,218, 65, 30,
+214,118,230,130,253,239, 18,201, 42, 55, 87,103,174, 95,191,110,211,174, 93, 59,204,154, 53,203,206,220,220,252,194,223, 61,146,
+245,178,185, 34,132, 72,203,171, 7, 83, 1,184,190,131,230,178, 89,179,102,141,251,230,155,111,112,237,218, 53, 44, 92,184, 16,
+ 29, 58,116,128,149,149, 85,149,229,199,192,129, 3,101, 77,155, 54,141,234,218,181,235,157,241,227,199, 15, 56,116,232,144,219,
+198,141, 27,133,159,126,250,169,184, 79,159, 62,238,227,199,143, 31,212,169, 83,167,251,141, 27, 55,190,222,187,119,111, 73, 53,
+147,198, 7, 32, 42, 95, 4,101, 73, 37,132, 16,194, 39,132, 8,184, 8, 27,103,176,192,167,152, 51,108,226, 92, 73,194,166,197,
+200,220,245, 51,120, 5,153, 16, 20,231, 66,115,233, 48,244,151, 14, 96, 96, 68,132, 84, 74,200,188,154, 28,220,204,204, 12, 66,
+161, 16, 79,158, 60,193,131, 7, 15,208,169, 83, 39,225,138, 21, 43, 44, 3, 3, 3,127,105,218,180,233,157,176,176,176,250,166,
+ 24, 22,111,111,111,244,235,215, 79, 52,118,236,216, 58, 18,137, 36,154, 82, 42,240,244,244, 68,223,190,125,133, 83,166, 76,241,
+144, 72, 36, 55, 89,150, 21,202,100,178,183, 70,135,222,164, 43,149, 74, 1, 64,224,227,227,115,107,231,206,157,158, 77,155, 54,
+229,159, 60,121, 18, 69, 69, 69,252,186,117,235,222,217,177, 99,135, 87,147, 38, 77,248,151, 47, 95, 70,105,105, 41, 53, 85, 87,
+169, 84, 66, 34,145,252,201, 96, 41,149, 74,136,197, 98,147,211, 88,110, 46,134,122,121,121,221,220,185,115,167,107,243,230,205,
+121,231,206,157, 67,113,113, 49,220,221,221,111,237,220,185,211,181,105,211,166,188,171, 87,175,162,184,184,216,100, 77,145, 72,
+ 4, 15, 15, 15,244,233,211, 71, 48,105,210, 36, 87,129, 64,112, 83, 36, 18,193,221,221, 29,125,250,244, 17, 78,156, 56,209, 85,
+ 36, 18, 93, 55,177,202,144, 87,110,180,208,167, 79, 31,185, 76, 38, 67,114,114, 50, 88,150, 5,203,150,121,210,244,236,220,123,
+151,111,222,143,157, 48,162,119,203, 82,141, 70,115,252,220,173,135, 1, 62,238,174,132, 80,143, 42,206,189,126,120,120,248,157,
+200,200,200, 95, 15, 28, 56, 96,249,193, 7, 31, 8,110,222,188,137,231,207,159, 67, 44, 22,195,204,204, 12,124,254, 63,180,163,
+108, 81,128, 13, 88,124,144,148,173, 21,139, 45, 93, 21,102, 78,117,129,231, 23, 80,219, 78, 12, 30,195,147,220,124,166,148, 3,
+244, 3,212,202,177,169,158, 38,251,193,179, 44,173, 88,111, 29,100,230,236, 90, 11,185,185,185,112,171,227, 7,181,200, 78,116,
+229, 73,169, 25, 72, 53, 53,203, 9, 14, 14,110,238,230,230,230,232,225,225,129,156,156, 28,120,123,123,195,204,204,204, 42, 36,
+ 36,228,131, 26, 95,131, 77, 30, 98, 20,161, 41,192, 44,130,145,204,134,158,191, 0, 79,178, 27,226,151, 16,193,223,206, 92,237,
+220,229, 98, 83,203, 31, 56,252, 25, 28, 44,197, 88, 63,178,161,181,157,133,184, 70, 38,139, 16, 18,232,224,224,112,230,250,245,
+235,182, 18,137, 4,209,209,209, 8, 8, 8,192,226,197,139,237,172,172,172,254,182, 38,235, 53,115,101, 77, 41, 85, 1, 96, 1,
+244, 71, 13,122,189,150,155,149,159,231,206,157, 59,230,235,175,191,198,149, 43, 87,224,234,234,138,236,236,108, 52,111,222, 60,
+ 41, 63, 63,191,210,247, 82, 96, 96,160,235,227,199,143, 83, 39, 76,152,208,112,235,214,173, 82,153, 76,134,130,130, 2,252,250,
+235,175,152, 54,109, 26, 8, 33,160,148, 98,195,134, 13,178,193,131, 7, 55,138,143,143, 79,245,240,240, 48,165,249, 6, 1, 32,
+ 1, 32, 43, 95,228, 0,100, 59,118,236,176,232,214,173,155,121,249, 58, 41, 0, 41, 33,132,235,232,245,111, 54, 88, 20,168,239,
+232,233,139,194,147,187, 33,229, 19, 72,121,229, 11,159,128,121,122, 15,110, 18, 1,244,148, 6,214,228,224,102,102,102, 47, 22,
+134, 97,144,158,158, 14,134, 97, 48, 99,198, 12,201,152, 49, 99,234,137, 68,162,171, 45, 90,180, 88, 80,233, 9,148, 71,164,110,
+222,188, 9, 31, 31, 31,242,205, 55,223,152, 71, 70,150,125,197,222,187,119, 15, 94, 94, 94,100,254,252,249,138, 46, 93,186, 16,
+185, 92,110,114, 4,139, 97, 24, 72,165, 82,180,106,213,138,108,220,184,209, 76, 44, 22,227,240,225,195,200,206,206, 70,187,118,
+237,248, 27, 55,110, 52,147, 72, 36,184,112,225, 2, 10, 11, 11, 77,214,173, 42,130, 85,110,234, 76,162, 73,147, 38,235, 29, 29,
+ 29,151,110,217,178, 69, 44,149, 74,113,238,220, 57, 20, 20, 20,160, 95,191,126,134,109,219,182, 73,204,205,205,113,245,234, 85,
+ 20, 20, 20,212, 40,115,220,188,121, 19,222,222,222,100,250,244,233,210,136,136, 8, 61, 0,220,190,125,187,226, 58, 75,205,205,
+205,151, 52,107,214,108,125,101, 26, 44,203, 34, 61, 61, 29, 49, 49, 49,120,250,244, 41,178,179,179,145,147,147,131,226,226, 98,
+ 24, 12, 6, 0,128,172,184,232,240,207, 27, 15,222,145, 75,165,178,240,122, 62,181,174, 71, 63,200,146, 75,165, 50, 31,207, 90,
+117, 9,153,253,198, 11, 27, 17, 17,177,128,199,227, 93,157, 55,111, 94,253,233,211,167,139, 31, 61,122,132,232,232,232, 63,229,
+171,127,164,193, 34,132,128,104,125, 64, 72,195,107, 79, 75,173,155,119,238, 47,196,179, 99, 0,171, 7, 24, 62, 34,235,187,242,
+247,223, 43,117, 0, 69,125,104,224, 7,152,224,216, 9, 33,128,206, 27, 32,161, 39, 30, 27,108,154,246, 24, 41, 76, 77, 77,133,
+ 80, 40,132, 88, 44, 70,195,214, 31,241,119,220,209, 59,130,160, 1,116,240, 53, 73,243, 37,196, 98,241,183,159,125,246,153,252,
+101,205,142, 29, 59,202,101, 50,217,204, 26,155,171, 82, 89, 4, 12,116,108, 76,170,210,227,187,195, 25,254,241, 89, 42, 95, 80,
+ 58, 1,208, 7,191,171,201,114,119,119,143,172, 91,183,238, 51, 79, 79,207,102,239,100,174, 20,162,171, 59,119,238,114,177,118,
+ 43, 51, 87, 48,168, 1,129, 20,142,118,150, 88, 63,190,149,181,157,165,180, 90, 38,171,220, 92,157,190,118,237,154,173, 68, 34,
+ 65, 84, 84, 20,132, 66, 33, 36, 18, 9,234,213,171,135,181,107,215,218, 89, 91, 91,255, 45, 76, 22, 33,196,138, 16,210,158, 16,
+210,139, 16,242,209, 75,230,202, 19, 64,107, 66,200, 7, 0, 28, 1,156,167,148,222, 49, 81,179, 25,159,207, 63,220,160, 65,131,
+ 52, 62,159,255, 96,254,252,249, 95, 76,153, 50, 5,203,150, 45, 67,100,100,228,211, 41, 83,166, 32, 54, 54,214,160, 84, 42,187,
+ 82, 74, 15, 85,166, 85, 82, 82,114, 96,250,244,233, 22, 61,122,244,168,248, 63, 46, 93,186,132,205,155, 55, 67, 46,127,181, 21,
+ 68,215,174, 93, 49,116,232, 80, 43,173, 86,251,123,101,154, 14, 14, 14,109,174, 93,187, 22, 0, 64, 8, 64, 92, 97,176,238,223,
+191,111, 89, 84, 84,100,105,102,102,102,233,228,228,164,168, 48, 89, 61,122,244,176, 20, 8, 4,205,192,241,239, 52, 88, 0,160,
+203,203,132, 24, 70, 72,121, 4, 50,222, 75, 38, 11, 44,248,133, 89,213, 44,106,223,108,176, 20, 10,197, 11,163,165, 82,169, 76,
+142,184, 84, 24, 27, 43, 43, 43, 20, 23, 23, 67,175,215,191,120, 56,172,172,172,160,209,104, 0, 0,114,185, 28, 53,140, 96,225,
+202,149, 43,184,124,249, 50,248,124, 62,172,173,173, 1, 0,183,110,221,194,189,123,247, 32, 20, 10, 97,109,109, 93, 45, 93,157,
+ 78,247,198, 8,150, 78,167,131, 88, 44,174,150, 9, 84,171,213,244,214,173, 91,184,127,255, 62,196, 98, 49,236,236,236, 32, 18,
+137,144,156,156,140,216,216, 88,136, 68, 34,216,217,217,213,232,254,152,155,155, 35, 63, 63, 31, 70,163,241,197,181,176,176,176,
+ 64,105,105, 41, 24,134, 49, 41,157, 44,203, 34, 45, 45, 13,217,217,217, 72, 78, 78, 70, 78, 78,206, 11,147, 85, 81, 69, 88,163,
+140,203, 48, 32,132, 32, 58, 58,154,158, 57,115, 6,197,197,197,127,202, 75, 21, 17,210,127, 28,171, 2, 45,160, 23,180,203, 41,
+209,139,179,117, 66, 11,135,192,182,192,179,163, 0,195, 7, 36, 86,104, 28, 84, 27, 73,249, 70,249,163, 76,173, 4, 4,237,177,
+178,174,149, 73,154, 70,193, 7,217,197,122,113,162,206,206,220,191,126, 8, 50, 51, 51, 33, 22,139, 33, 22,139, 17,218,180, 45,
+158,229, 26,101, 15, 82, 85, 50, 80,180, 51, 73,179,156,134, 13, 27,214,145, 74,165, 17, 13, 27, 54, 36, 47,107, 70, 68, 68,128,
+ 97,152,122,193,193,193,126,213, 58,255, 21, 94, 34,232,100,141,193,167, 99, 31,164, 43,157,247,223, 87,215,237,210,253, 35,235,
+101,167,178,252, 31,102,104, 60, 65,245, 19, 65,117, 33, 53, 53, 89, 30, 30, 30, 45,205,204,204, 14,125,251,237,183,158, 98,177,
+248,168,167,167,103,243, 26,149,111, 82,222,154,111,191,232,239, 98, 85, 97,174,244, 74,128, 47, 5, 4, 82,128, 47,133,163,189,
+ 45,230, 13,253,192, 90, 38, 17,252, 97,170,166, 84, 42,221,177,114,229, 74,187,215,205, 85,197,210,176, 97, 67,204,152, 49,195,
+206,218,218,122,251, 95,108,174,172, 81,214,174,234, 46,128,223, 1,156,126,201, 92,121, 3,248,163, 60,106, 21, 77, 41, 77, 50,
+ 81,179, 73,135, 14, 29,206, 62,125,250,180,211,157, 59,119,156, 50, 50, 50,252, 38, 78,156,136,101,203,150, 97,202,148, 41,219,
+ 41,165,117,119,239,222, 29,124,227,198,141,122,148,210, 42, 35, 98, 25, 25, 25, 31, 79,153, 50, 37, 39, 39, 39, 7, 0, 80,175,
+ 94, 61, 20, 20, 20, 96,210,164, 73, 24, 55,110, 92, 69,228, 21,148, 82,100,102,102, 98,209,162, 69,153, 25, 25, 25,159, 86,166,
+105, 52, 26,147,119,239,222,221, 72,167,211,185,162,172, 90, 80, 92, 80, 80, 96,158,151,151,167,208,233,116,114,150,101,229,150,
+150,150,102, 0,100, 3, 7, 14,228, 63,120,240,192,223, 96, 48,164,114, 86,228, 95,106,176,120, 4,119,159,223,186, 0,235,192,
+144, 87,162, 87, 50, 30,129,212,220, 2,207,146,147, 32, 4,137,169,238,129, 41,165,175, 24,172,138, 23, 99,122,122, 58,166, 78,
+157,170,220,186,117,235, 61,173, 86, 27,113,225,194,133,105, 85,126,120, 3,176,179,179, 67, 82, 82, 18,253,241,199, 31,139,142,
+ 30, 61,106, 0, 0,123,123,123, 36, 39, 39,211,233,211,167, 23,239,218,181,139, 86,199, 96, 49, 12, 3,137, 68,130,115,231,206,
+209,153, 51,103, 22,166,167,167, 83, 27, 27, 27,216,216,216,224,212,169, 83,134,105,211,166, 21,198,199,199,191, 88, 87, 29,131,
+ 85, 97, 88, 94, 54, 40,111, 51, 94,149,113,233,210,165,207, 11, 11, 11,199, 79,154, 52, 73,245,240,225, 67,106,103,103, 7, 59,
+ 59, 59,108,218,180,137, 63,104,208, 32,213,221,187,119, 95,172,171, 9, 54, 54, 54,136,139,139,163,243,231,207, 87,157, 62,125,
+ 90, 0, 0,182,182,182,136,141,141,165,115,230,204, 81, 21, 20, 20,140,191,116,233,210,231, 85, 20, 56,120,250,244,233,139,136,
+149, 90,173, 70, 78, 78, 14,146,147,147, 95, 24, 44,149,220,188,195,151,131,187, 52, 40, 85,169,148,215,239, 61,126, 30,222, 48,
+192,190, 84,165, 82, 62, 78,120, 30, 71,233,204, 55,182,109,187,124,249,242, 52,131,193, 16,113,240,224,193,123,107,215,174, 85,
+230,229,229,189,209,176,255, 35, 13, 22,195, 58,130,208,102, 23, 31,151, 88,126,208,165,175,136,100,220, 0,116, 37,128,216, 10,
+ 16, 91,129, 47,183, 65,199,230,193,188, 77,215,138, 28, 65,217, 38, 16,138,171,110,223, 34,160, 14, 0,219,252,100,156,218,170,
+ 89,175,209,162,188,188, 60,240,120,188, 23,102, 72, 38,151,163, 77,247,129,204,134, 27, 26, 71,128, 54, 5,225,153,220,102, 70,
+ 40, 20, 78, 30, 60,120,176, 48, 63, 63, 31, 12,195,188,208,148, 74,165,232,209,163,135, 88,161, 80, 76, 55,249,220,247, 4, 8,
+ 33, 16, 55, 6,232,184, 71, 25,106,231, 3,247, 84,190, 19,191, 95, 47, 13, 12,110,132,225,145,246,210,239, 15,103, 5,222, 73,
+ 86,213, 6,140,227, 97,208,134, 86,215,100,121,122,122, 54,151,203,229,135,247,239,223, 47,107,213,170, 21, 38, 77,154, 36,151,
+ 72, 36, 71, 61, 60, 60, 90, 84,247, 54,149,150, 24,191,156,179,124, 75,230,221, 37,237, 1, 93,105,153,177,122,105,201, 42, 97,
+ 49, 99,253,153, 66,189,158,246, 55, 85, 83,165, 82, 13, 26, 50,100, 72,238, 31,127,252,241, 39,115, 37,145, 72,144,144,144,128,
+239,190,251, 46, 47, 47, 47,239,211,191, 56,151, 6, 3,184, 13, 64, 13,160, 37, 0, 89,121, 79,193, 8, 0,167, 40,165, 70, 74,
+105, 38,165, 52,221, 84, 65, 30,143, 55,101,213,170, 85,124,149, 74,133,161, 67,135, 34, 57, 57, 25,105,105,105,248,250,235,175,
+ 19, 88,150, 29, 84,174,121,135, 82, 26,107,138,158, 86,171,125,148,159,159,223,185,125,251,246, 5,249,249,249,168, 95,191, 62,
+186,116,233, 2, 71, 71, 71, 56, 59, 59,163, 91,183,110,168, 91,183, 46,114,115,115,209,191,127,255,188,236,236,236,246,148,210,
+ 74,123,161,231,230,230,198,111,223,190, 61,110,244,232,209, 13, 83, 82, 82,252, 1,216, 20, 23, 23,203,139,139,139,197, 90,173,
+ 86,106,101,101,101, 21, 28, 28,108, 59,108,216, 48,179,219,183,111,251,167,164,164,148, 0, 72, 2,199,191,211, 96,233,128, 25,
+155,119,111, 82,139,106,121,195,194,183, 1,100, 18, 9,164, 34, 17,164, 86, 54,208,176, 44,214, 37,100, 40, 75, 41,157, 94,221,
+ 3, 83, 74, 95,137, 52, 24,141, 70,172, 89,179, 70, 61,111,222,188,130,140,140,140, 17, 23, 46, 92,104,112,243,230,205,187,166,
+ 24,161,162,162, 34,236,222,189, 91,181,113,227,198,167, 42,149,170,161, 80, 40,212,107,181, 90,108,223,190, 93,189,116,233,210,
+ 68,165, 82, 25, 38, 16, 8,116,213, 49, 47, 21, 17, 44,129, 64,160, 87,171,213, 13,119,236,216, 17,127,232,208, 33,149,185,185,
+ 57, 4, 2,129, 94,169, 84,214,219,178,101,203,163, 29, 59,118,168, 20, 10, 69,181,140, 27,203,178,111,172, 34,100, 89,182, 90,
+ 6, 11, 0,110,222,188,249,171, 78,167, 11,223,190,125,123,202,250,245,235,213,230,230,230, 0, 0,189, 94, 31,182,121,243,230,
+148,213,171, 87,107,170,211,192,189,188,224,129,209,104,196,150, 45, 91, 52, 59,118,236, 72, 49, 24, 12, 97, 21,235, 54,108,216,
+160,222,178,101, 75,138, 78,167, 11,191,121,243,230,175, 85,105, 25,141, 70, 99, 81, 81, 17,248,124, 62,158, 62,125,170,169,136,
+208, 61,121,242,228,133,193,178,183,181, 14,104, 26, 22,228,183,120,205,238,243,114,177, 88,220, 62, 50,212,255,193,227,164, 20,
+ 74, 73, 98, 21,231,126,247,202,149, 43, 13,242,242,242, 70,172, 93,187,182, 96,219,182,109,106,163,209,248,138,201, 18,137, 68,
+255,196,167, 86, 6, 2,233,227, 44,141, 66,194, 24, 8,226,246,149,153, 43,137, 37, 32,177, 2, 36, 86,112,113,113,197,141, 4,
+165, 2, 12, 68, 48,234,237, 77,120, 32,229, 32,144,221,207,132, 66, 32,146,146,140,140,140, 23, 70,168, 98,241,244,246, 71,116,
+ 82,137, 25, 8, 21,131, 7,135,106, 60,235,157, 21, 10, 5, 63, 61, 61,253,207,154,158,158, 60,189, 94,223,222,228,115, 79, 51,
+ 58, 1,236, 23,113, 25,106,167,189,119, 74,125,199, 47,216, 32,149, 26, 11,128, 91,203, 17, 88,199, 25,227,123, 5,139,190, 57,
+144, 29,120, 51, 81, 89, 7, 60, 58, 28,108,137,201, 95, 23,158,158,158,205,100, 50,217,209,125,251,246,201,100, 50, 25,158, 62,
+125,138,122,245,234, 97,206,156, 57, 50,153, 76,118,196,221,221, 61,178, 58,183,233, 90, 6, 77, 42, 41, 54, 70, 76,222,253, 60,
+227,110,186,225, 21,115,149, 93, 74, 49,228,135, 3, 5,249, 69,234,143,174, 62,215,159,169,198,181,188, 93, 80, 80,208,110,250,
+244,233,185,217,217,217,175,152,171,164,164,164, 10, 35, 16, 73, 41,141,249,139,115,169, 28,101,141,215,125, 1,120, 1,104, 64,
+ 41, 53, 0, 40,166,148,214, 40,116, 29, 16, 16,208,208,221,221, 29,171, 87,175,198,186,117,235,242, 23, 47, 94, 12, 74, 41,124,
+124,124,204,107,170,153,153,153,121,227,209,163, 71,237,235,215,175,255,112,197,138, 21, 41, 78, 78, 78,236,176, 97,195, 48,100,
+200, 16,216,217,217, 25,151, 46, 93,250,188,121,243,230,247,227,227,227,219,150,150,150,222, 51,225,254,208,156,156,156, 43,191,
+252,242,203,181,214,173, 91,203, 6, 13, 26,100,183,127,255,126, 27,165, 82,233, 44, 22,139,237,181, 90,173,232,225,195,135,188,
+ 61,123,246, 56, 62,120,240, 32, 65,165, 82,221,160,229, 19,251,113,252, 11, 13,214,111, 79,233,149,210,226,130,133,115, 54,172,
+ 85, 61, 51, 16, 24,106, 7, 64,109,227,130,155, 5, 42, 76,122,152,162, 52,176,116,229,238,167,244,108, 77, 35, 88, 50,153, 12,
+167, 79,159, 54,126,241,197, 23,234, 27, 55,110,252, 82, 88, 88,232,118,243,230,205,109,166,234,176, 44,203,251,236,179,207, 74,
+ 46, 95,190,188, 59, 61, 61, 61, 48, 42, 42,234, 25,203,178,188, 1, 3, 6,148,156, 60,121,242, 15, 66,136,255,173, 91,183, 30,
+215, 32,196, 13,161, 80, 8, 66, 8,110,222,188,153,144,151,151, 23,120,237,218,181, 29,211,166, 77, 43,161,148,242,162,162,162,
+146, 75, 75, 75,235, 95,185,114,101,235,151, 95,126, 89, 66, 41,229,153,170, 91, 97,222, 94, 54, 82, 21,209,172,234, 26, 44, 0,
+136,138,138,138, 41, 40, 40,240,191,113,227,198,209, 97,195,134, 41,203,205,199,195,226,226, 98,191,107,215,174, 29, 30, 52,104,
+144,178, 58,122, 58,157, 14,221,187,119, 87, 94,189,122,245,112,113,113,177,223,205,155, 55, 31, 86,172,187,124,249,242,209,130,
+130, 2,255,168,168, 40, 83, 11,240, 57, 75,151, 46, 77,159, 55,111, 94,122,118,118,246,226, 37, 75,150,100,219,217,217, 65,167,
+211,189, 48, 88, 89, 57,121,103,154,124, 56,250,135,173,191,159,186,185,116,206, 23,173,164, 18,177,104,250,247, 27,206,233,121,
+184,102,162,201,220, 86, 84, 84,228,118,231,206,157, 95,198,143, 31,175, 62,113,226,132, 81, 42,149,194,204,204, 12, 98,241, 63,
+177, 13,169,177, 8, 44, 73,235, 29,106,149,186,116,213,175,154,251,207, 50, 95, 24, 43,136, 45,113, 51,190, 0,223,174,216,205,
+126,215,213,238, 25, 40,146,193,224, 81,213,154,252, 34,176, 36,107, 72, 35, 97,202,111, 63,141,211, 60,123,116,239, 21, 35, 20,
+123,247, 38,150,204, 28,205,206,239, 98,253, 12, 44, 73, 3, 65,172,169,169, 53, 24, 12,189, 22, 44, 88, 80, 26, 31, 31,255,138,
+102, 98, 98, 34,190,255,254,123,149, 70,163,249,200,228,135, 82,204,111, 96,164,212,126,219,213, 92,159, 17,195, 6, 75,165,134,
+ 60,224,250,143,128, 64, 6,136, 45, 16,236, 87, 7, 51,134,126, 40,152,184, 39, 35, 16, 96,221,193, 8,253, 77, 77, 39,159,207,
+ 63,188, 96,193, 2,153, 84, 42,197,147, 39, 79, 32,145, 72, 32,149, 74, 17, 26, 26,138,101,203,150,201, 68, 34,209,209,138,246,
+157,213, 54, 89, 59,158,100,220, 77, 86, 3, 2, 9,114, 74,129, 33, 63, 28,204,207, 43, 84,245,170,142,185,122,221,100,141, 27,
+ 55, 46, 55, 51, 51, 19, 18,137, 4,201,201,201,232,215,175, 95,238,223,196, 92, 1, 64, 41, 0, 23, 0,113, 0,226, 1,220, 33,
+132,136,240, 14,211,179, 61,120,240, 32, 58, 41, 41, 9,159,127,254, 57, 62,249,228, 19,171,143, 63,254, 24,207,158, 61, 67, 92,
+ 92,220,237,119, 73,168, 74,165,186,153,146,146, 82,111,220,184,113, 51, 92, 93, 93, 55,218,216,216,156,179,182,182, 62,235,234,
+234,186, 97,218,180,105,223,166,167,167, 55,208,233,116,119,170,113,127, 40,165,244, 73,124,124,252,129, 45, 91,182, 68,141, 27,
+ 55, 46,225,227,143, 63, 78, 25, 59,118,108,250, 47,191,252,146,118,251,246,237,199, 5, 5, 5,199,171,138,134,113,252, 3, 48,
+117, 86,232, 94,158,104, 58,184, 14, 57,255,113,109, 20,247,175,141,146,207,188,200,165,143, 60,209,186, 38,179,109, 55,108,216,
+144, 26, 12, 6,122,226,196, 9,218,177, 99,199,210,102,205,154, 93, 10, 9, 9,241,169,201, 12,222,145,145,145,199, 66, 67, 67,
+123,191,190,174, 81,163, 70,125, 95, 94,215,178,101,203,152,150, 45, 91, 22,182,104,209,226,169, 41,233,108,209,162, 69,108,211,
+166, 77, 75, 91,180,104, 17,251,242,250,176,176,176,110,173, 91,183, 62,252,242,186, 70,141, 26,117,125,125,221,219,206,189,109,
+219,182,201,113,113,113,244,249,243,231,180, 83,167, 78,105, 21,235,219,180,105,147,124,239,222, 61,250,248,241, 99,218,161, 67,
+135,180,154,206, 94, 30, 26, 26, 58,180,121,243,230, 87, 94, 75,243,144,215,215, 85,166,217,188,121,243, 43, 97, 97, 97, 67, 94,
+ 95, 23, 26, 26, 58,244, 93,103, 89,119,114,114,170, 27, 28, 28,156,181,116,233, 82, 90,187,118,237,172,151,127, 11,140,252,236,
+219,130,162,146,162, 73,115, 86,255,102,231,223,189, 94, 77,102,110, 15, 9, 9,241,105,209,162,197,165, 15, 63,252,176,244,198,
+141, 27,148, 82, 74, 27, 54,108, 72,255, 81,179,214,239,246, 23,210,181,254, 77,233, 26,255,195,177, 51,221, 31,126, 26, 46,215,
+ 68,253,212,137,210, 51,147,233,181,213, 67,104,132,167,200,120,121,146, 91, 28, 93,235,119,148,110,168,219,130, 46,175, 35, 50,
+ 73,115,157, 87,115,186,214,239,232,131, 25,238, 15,123,132,216,105,119,108, 90, 75,159, 60,121, 66, 15,236,217, 78, 27,215,150,
+149,105,174,241, 63, 65, 87,251,183, 50, 73,243,213,103,190,105, 68, 68, 68,201,111,191,253, 70,159, 60,121, 66, 79,158, 60, 73,
+155, 54,109,170, 12, 14, 14,110,101,242,185, 3,132,174, 14,232,110, 88,229,123,113, 90, 91,179,130, 33,225, 18, 77,255, 96,145,
+182, 91,160, 80,215,206, 91,104,104,226,206, 55, 54,112, 98, 88,127, 59,208,118,190, 82, 13, 93,227,123,129,174,241,111,111,106,
+ 58,125,124,124,158,123,120,120,208,183, 45,117,235,214,205,110,217,178, 37,191, 38,247, 61,220, 1,238,109,235,138,211, 79,207,
+105, 77,187,212, 87,228, 54,118,227,183,126,215,188, 4, 32,216,214,214, 54,103,227,198,141,212,193,193, 33, 27, 64,224,223, 34,
+127,150,173,179, 6,208, 13,128, 93,249,255,205, 0,180, 2, 80,251, 29, 52,155,180,107,215, 78, 31, 29, 29, 77,159, 62,125, 74,
+143, 29, 59, 70,155, 54,109,106, 0, 16,249,183,121, 54, 57, 77,110,121,105, 33,255,205,232, 36, 33,164,237,155, 6, 35, 11, 9,
+ 9,161,237,219,183, 87,157, 63,127,190, 68,171,213, 14,191,117,235,214,129,119,213,252,111,164,243,191,161,217,186,117,235, 43,
+ 12,195,212, 46,239, 2,156,118,234,212,169,134, 0,208,170, 85,171, 43, 60, 30,175,118,185,233, 77, 59,125,250,116,195,127,218,
+185, 87,224,236,236, 92,151, 97,152,227, 0, 52, 41, 41, 41, 47,122, 59,217, 7,118,139,176,182,178,104, 85, 80, 80,120, 59,227,
+254,254,163,239,146,206,208,208,208,174, 98,177,120,109, 68, 68,132,252,204,153, 51,178,168,168, 40,242,143,186,158, 43,188, 68,
+ 16,137, 66, 65, 49,245,126,170,210,243,219,131, 57,117, 62,108,211, 84,176,105,223,121,118, 97, 79,251,248, 38, 94,242, 4, 8,
+216, 31, 64, 52, 55,240,105,162,198,100, 77, 41,105, 4,163, 96,234,157,100,165,251,164, 63,242,189,219,126, 52,132,119,112,231,
+ 90,246,199,238, 54,241, 77,234,152, 61, 7,197, 15, 16, 43,175,154,172,249,234,115,223, 84, 44, 22, 31,237,223,191,191,217,142,
+ 29, 59, 84,106,181,186,115,116,116,244,217,106,157,251,122,191, 90, 48,146,121,160,212,173,234,175, 71, 60,129, 17,243,240, 69,
+236,243,191,195,125,111,236, 72,220,229, 22,226, 67, 74,149, 97,156, 41,145, 43, 83, 52, 9, 33,193, 86, 86, 86, 91,243,243,243,
+251,154, 18,185,250, 95,158, 59, 33,196, 14, 64, 88,121,212,138, 0,136, 49, 53,106, 83,137,102, 51, 30,143, 55,165, 78,157, 58,
+245,159, 62,125,122,223,104, 52,254, 72, 41, 61,247,111,120,119,252, 27, 52,255,105,252, 37,125,216,165, 82,105,244,185,115,231,
+142, 9,133,194,239, 46, 95,190,172,249, 55, 93,240, 51,103,206, 52,121,211,250,179,103,207, 54,249,183, 92,131,180,180,180, 56,
+ 0,238,175,175,207,138,217,127, 21,192,213,247,113,140, 91,183,110, 29,136,140,140, 60,113,249,242,229,111,228,114,121,135,127,
+220, 69, 28, 29,175,197, 10,175, 91, 16,137,190, 15,114,145, 77,253,182, 19, 37, 11,142, 95,113, 95,216,211,254,121, 85,230,170,
+ 10,205, 27,144,234,191,111,224, 38,155, 58,191, 27,200, 15, 71, 55,185,255,216,221,230,121, 85,230,202, 20,162,162,162, 46,135,
+132,132,116,220,185,115,231,102,181, 90, 61,180, 42,115,245, 70, 20, 76, 6, 74,245, 51,161,231, 5,129, 66, 84, 73,104, 94, 9,
+134,119, 31, 89,200,252,187,220,178,107, 25, 52, 9, 64,224,251,212,164,148,222, 6,224,255,119,204,162,148,210,108, 0,135,223,
+179,230, 37, 0,151,184, 87, 55, 7,103,176,222,194,197,139, 23, 67,184, 75,207,241,223,230,220,185,115, 26, 0,223,150, 47,255,
+ 60, 94, 50, 89, 33,181,164,163,255, 24, 33, 85,130,146, 20, 8,216,165,213, 54, 87,111, 48, 89,141,220,165,227,246, 14,151, 42,
+ 65,145, 1,138, 37,239, 98,174, 94, 54, 89, 0,106,215, 88,160,215, 3, 29,128, 4, 16,146,136, 89,120,123, 99,197, 89,120, 81,
+143,193,193,193,193,241,175, 49, 88, 28, 28, 28,239,209,100,237, 9,184,137, 28,222, 36, 48,168, 13, 24,146, 80,106,200,192,232,
+ 68,237, 59,106, 94, 71, 14, 25, 11, 30,234, 66,100,136, 71,137, 54, 3, 35,222, 65,243,125, 83,102,158,222,110,160,102,114, 89,
+131,131,131,131, 51, 88, 28, 28, 28,239, 66, 89, 84, 39,165,124,249,251,106,114,112,112,112,252,139, 32, 0,218,190,229, 3,209,
+228,198,107,132,144,182, 53,248, 0, 61,197,105,114,154,156, 38,167,201,105,114,154,156,230,191, 75,179, 42,237,127, 76,227,249,
+255,102, 23, 69,112, 93, 88, 57, 77, 78,147,211,228, 52, 57, 77, 78,147,211,252, 23, 46, 12, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+222, 43,127,105, 27, 44,153,109, 93, 39,240,153,250,132,165,126, 0, 64, 25, 18, 11, 3,123, 87,153, 19,151,254,174,218,196,161,
+158,204, 76,192,219, 94,162, 55,126, 76, 51,239, 41,223, 71,122, 9, 33,205, 80, 54,188, 64, 82,121,119, 97, 14, 14, 14, 14, 14,
+ 14, 14, 14,211, 13, 86,221, 38, 61, 46,154,201,228,222, 0, 96,100, 41,140, 44, 80,148,159,117, 53,233,238,201, 30, 0,224, 28,
+216,102,175, 88,110, 27, 97,100, 41, 88, 74, 97,100, 41,244, 26,213,147,236, 7,135, 77,154,121,222,204,222,183, 71,219,118,109,
+123,118,238,252,161,111,189,160,122, 94, 0,112,239,254,189,248, 67,135, 14, 63, 50,179,247,253,163, 36,235,209,222,119, 57, 49,
+ 51,129,224,219,176, 70,225,237,111,222,188,254, 13,128,175,223,211,245, 18,210, 75,157,182,144,102, 71,218,112, 89,135,131,131,
+131,131,131,131,163,218, 6,203, 76, 38,247, 62,189,111,189,253,222, 75,201, 0,128,182, 13, 29, 49,251,167,141,221, 9, 33,143,
+ 0,224,163, 47,127,170,251,237,248,193,184, 18,147, 5, 74, 41,130,189,109,208,237,227, 81, 38, 29, 84,234, 24, 16,214,183, 79,
+159,143, 39, 77,154,216,245,201,147, 39,137, 59,118,236,184, 8, 0,205, 91,180,240,158, 63,127,126,159, 69, 86,214, 98,169, 99,
+ 64,170, 42,227,193,205, 26,153, 43, 71, 47, 91,255,192,176, 33, 59,214,253,200,111,213,177,223,231,102,142, 94, 75, 74, 50,226,
+115,106,162, 37,118, 11,172,109, 33, 16,206, 38, 12,195,183,176,247,176, 7, 0,115, 39,255, 35,246, 94,205,140,102,150,246,119,
+ 74, 85,170,205, 89, 15,143,173,227, 38,236,228,224,224,224,224,224,224,168,210, 96, 1,128,153,148,143, 71,207, 50, 0, 0,150,
+ 82, 96,216,160, 94,200,204,204,168,171, 51,178, 24,216,183, 7,162, 99,211,241, 40, 33, 27,148, 82,212,117,149,153,124, 80, 30,
+216,208,207, 62,255,172,229,241, 19, 39,110,124, 59,253,219, 45,132,148,141,222,189,246,151, 95, 35,102,204,156, 49,244,147, 65,
+159,124,176,103,207,158, 24, 0, 53, 50, 88,140,192,114,233, 15,243,103,153,165,100,171,213,227, 38, 78,230, 77, 24, 63,102, 17,
+128, 65, 53, 49, 87,254,110,174,223, 93, 60,177, 71, 38,147,201,176,110,221, 58, 49,176, 31,253,187,182, 16,117,250,240, 67,248,
+248, 5, 53,249,113,229,142,250, 39, 68,162,207,109,235,126,208, 35, 39,238,100, 58,151,165, 56, 56, 56, 56, 56, 56, 56, 42,109,
+228,110, 52, 82, 60, 74, 72,199,163,132,116,220,136,205,134,142,229,225,167,121, 83,241,195,172,201,200, 85, 2,123,175, 36, 35,
+ 46, 33, 3,113, 9, 25,200,201, 47,249,211,254,175,119,181,252,233,123, 89,195,165, 75, 45,126,108,215, 66, 30,105,109,101,101,
+245, 56,102, 75,233,140, 9,153,254,179,199, 37, 11, 5, 18,135, 20, 43,135, 90, 77,118,239,217, 19,224, 96,103, 47, 55, 55,183,
+152,108,237,215,110,189,165, 71,164, 69,101,154,127, 50,133,142,129, 45,187,116,233,212,201,209,193,158, 29,177, 52, 42, 54,192,
+207,199,224, 83,215, 47,210,204,209,183,229,219,246,121,147,166,216, 45,176,182,151,147,195,119,231,143,237,145,169,213,106,220,
+191,127, 31,185,185,185,229,219, 3, 14, 14, 78,112,119,117,198,207, 11, 38,201,102, 77, 29, 21, 34,150,200,246, 19, 66,136,169,
+233,172, 9,156, 38,167,201,105,114,154,156, 38,167,249, 79,213,252, 87, 25,172,248,228, 60, 60,122,150,129, 16, 63, 23,120,121,
+ 56,225, 70, 92, 62,182,157, 73,198,250,227, 73, 56,115, 39, 27, 44, 95,129,140, 34,224,113, 98, 38, 30, 39,229,160,170, 74, 50,
+158, 88,208,119,220,184,194, 73,245, 2,138, 26,159, 59, 58, 26, 46,118,143, 3,166, 76, 41, 24,205, 19, 11,250,218, 59, 90,238,
+152, 52,118,196, 0,133, 76, 42,210,106,180,240,244,112,147,140, 28,250,217, 96,161,153,124,135,169, 39, 99,103, 23, 32, 23, 75,
+229, 91,190,251,118,162,100,201,222,199,207, 75,181, 40,253,227, 74,230,211, 73, 83,103, 20,241, 4,210, 95,236,236, 2,228,166,
+232,136,221, 2,107,187,219,216,124,119,233,248, 30,153, 78,167, 65,122,122, 58,180, 90, 45, 12, 6, 67,217,239, 18, 9,196, 18,
+ 9,138, 84, 6, 60,203, 80,162,101,243, 38,188,134,193,129,126,118,126, 29,135,115, 89,138,131,131,131,131,131,131,227,173, 6,
+171, 68, 89,250,100,208,136,137, 89, 94,102,233,218,110,145,254,160,160,200, 78, 79,194,131,155,199,240, 36,250, 56,138,114,158,
+ 3,160,240,240,116,135, 80,245, 76,187,102,245,170, 44,214,160,126,242, 54,189,110,221,156, 93,159,196,202,153, 31, 23,214,186,
+ 22,247, 40,221,118,212,240,141,136,123,148,110,251,227,194, 90,215,158,196,202, 25,153,216,216,100, 80,191,110,164, 91,231, 14,
+152, 50,101, 18,186,117,238,128, 73, 35,250, 16,137, 72,208,216,212,147,209,138, 36,223, 79,253,118,142, 34,163, 64,167,187, 17,
+ 87,162,145,201,165,210,203,143, 75,212, 90,200,244, 93,251,142,200,214, 8,249,115, 76, 49, 87, 78,230,230,223, 93, 57,245,187,
+140, 82,138,212,212, 84,104,181, 90,232,245,250, 23, 6,203,210,210, 18, 5,165, 58, 60,207, 82, 34, 49, 83,137,152,196, 34,116,
+236,208, 81,198, 23,136, 6,112, 89,138,131,131,131,131,131,131,227,173, 6, 43,238,202,222,230,183, 78,110,113,200,201,204, 40,
+ 52,147,240,193,103, 8, 50, 83,226,177,121,209, 88,236, 94, 49, 17, 5,233,241,160, 20,144, 10,121,208,148,230, 21,166,223,222,
+237,144, 83, 73, 15, 66, 66,244, 31,172, 92,155,224,153,144, 64,205,183,111, 47, 17, 0,192,246,237, 37,130,132, 4,106,190,114,
+109,130,167,136,228,128, 26,141,232,220,237, 35,108,217,180, 14, 17,173,187,225,247, 11,207,161, 84,233, 76,154,255, 76,226, 80,
+215,195,214,209,241,163,177,159,180, 81, 52,170,107, 37,247,113,183,224,137, 4, 2,131,128, 39, 52, 30,188, 89,152,214,190, 75,
+119,190, 76,110,222, 65,226, 80,215,163, 50, 29, 11,129,112,246,229, 19,191,203,120, 60, 30,158, 63,127, 14,173, 86, 11,173, 86,
+ 11,141, 70, 3,189, 94, 15, 0, 40, 86,233,145,158,171, 65,114,182, 10,201,217, 42, 60,120, 94, 12,145,220, 18,122,189, 62,136,
+203, 82, 28, 28, 28, 28, 28, 28, 28, 38, 13, 52,154,154,153, 7, 27, 51, 62,236,156, 61, 49, 96,236, 79, 0, 0,163, 81, 15, 74,
+ 1,131,145,133, 41,253,231, 40, 21,156,252, 98,164,103,130,135, 39, 41, 28,240,177, 76, 5, 0, 3, 62,150,169, 60, 60, 73,225,
+ 23, 35, 61, 19,148, 58, 43,157,193,104,196,229,152, 44,252,184,235, 33,102,108,186,135, 99,183, 76,111, 51,206, 23, 72,199,253,
+176, 96,190,140,207, 35, 36, 38,169,164, 36, 37,215, 80,194, 19, 8,116, 50,153,136,106, 41, 95,147,152,109,204,237,208,123,100,
+ 34,143, 39, 24, 85,117, 90, 89, 80, 74,161,209,104,160,213,106,161,211,233, 94, 68,177, 0,160,176, 84,143,244, 60, 53,146,179,
+ 85,120,158,173, 66, 74,182, 10,153,249,106,112, 29, 9, 57, 56, 56, 56, 56, 56, 56, 76, 50, 88, 44,128,199, 73, 57, 16,241, 89,
+184,122,120,129,190, 52,129, 61, 5, 96, 48, 86, 62,169,125, 5,251,247,167,165,212,241, 46,101, 39, 79,126, 30, 17, 84,207,230,
+238,200, 17,110,177, 65,245,108,238, 78,158,252, 60,162,142,119, 41,171, 55,138,140,148, 82,176, 20,229, 11,173,150, 97, 33,132,
+215, 56,216,207,157, 63,123,251,227,231,163, 86,197, 61, 18, 10,133,122, 87, 91, 25,113,119,144,241,106,217, 73, 69, 26, 61,163,
+241,173,215, 72, 71,128,134,149,233, 20,234,117, 51,155,181,239,173,212,233, 12,112,115,115,123,197, 92, 85, 84, 17, 22, 42,117,
+ 72,207, 87,227,121,182, 18,201,217, 74, 40, 53, 6,220,143, 75, 0, 97,120,247,185, 44,197,193,193,193,193,193,193, 97, 82, 4,
+203,221,213, 1,215,239, 39,193,221, 78, 2, 11,115, 5, 98,227, 83,192, 99, 4, 96, 8,160, 55,152,110,130,168, 78,191,107,241,
+ 98,139, 69, 73, 9,198,235,171, 86, 63,125,146,148, 96,188,190,120,177,197, 34,170,211,239, 2,202,122,231,149,153,172, 50,163,
+101,100, 77, 63, 17, 74, 89,123, 59, 75, 9,255,214,211,210, 92,134,225,105,108, 44, 36,172,141,133,152,113,178, 20, 11, 92,109,
+132, 66,145,136,129,163,157,173, 1,148, 58, 84,166,163, 73,142,121,150, 94, 84,244, 77,243,118, 31, 41, 5, 2, 1, 60, 61, 61,
+ 95, 84, 19, 86, 24,172,172,236,252, 23, 17,172,244, 60, 13,164, 34, 6,183, 47,159, 86, 26,141,250,205, 92,150,226,224,224,224,
+224,224,224,168,218, 96, 81,192, 76, 38, 1,229, 73,112, 49, 42, 30,190, 1,245,177,233,192, 13,120,215,107, 12,150, 53,192,192,
+ 26, 77, 62,216,196,169,202,232, 9, 19, 10,191, 74,207,164, 75,123,244,112, 57,156,158, 73,151, 78,152, 80,248,213,196,169,202,
+232,242, 67,129,101,105,153,209, 42, 31, 33,222, 84, 8,144,150,148, 89, 92,234,233, 40, 7, 79, 32,208,200,197, 66,131,149, 92,
+196,218, 89,136, 4,118,230, 98,145,189,185,136,159,155,151,165, 2, 72, 90, 85, 90,154,228,152,103,207,243,243,191,105,209,177,
+159,210,204, 76, 1, 47, 47, 47,104, 52,154, 23, 6,171,184,164, 20,121, 69, 42, 80, 10,212,117,149, 35, 54,250,146, 49, 55, 43,
+245, 65,126,220,177,117, 92,150,226,224,224,224,224,224,224, 48, 41,130,101,100, 41,108,109,172, 33,145,155, 35, 33, 83,135, 98,
+ 98,143,124, 37,133,209, 88,121, 4,139, 16,210,246, 77,235,247,239, 79, 75,217,183, 47,123,253,254,253,105, 41, 47, 59, 57,246,
+ 69, 21, 97,249, 95,150,154,172, 73,169,241,232,193,147, 87,242,186,134,219, 89, 49, 60,158, 74, 40, 96, 52,124, 33, 79, 39,228,
+ 51,122, 33,159,209, 58,152, 11,120,103, 14,108, 99, 8,161,103, 76,209,212, 36,199, 60, 75,200,202,250,166,117,231,254, 74,123,
+ 7, 7,124,242,201, 39,112,115,115, 3, 0,152, 73, 8,108, 69, 74,240,212,105, 56,127, 96, 67,105,108,212,217, 40, 24, 53, 61,
+ 94, 30,205,253,109,233,124, 23, 56, 77, 78,147,211,228, 52, 57, 77, 78,243,159,170,249, 79,195,132,201,158, 41,234, 56,201,225,
+237, 34,135, 90,103, 15,181,214,136, 82,181, 17, 69, 74, 29,138,148,122, 36,100, 40,241,248,236,187, 39,132, 2,160, 44, 64, 80,
+ 86, 85, 8, 82,102,236, 40, 49,109,255, 82, 65,209,162, 31,231,207,234,183,115,247, 31, 24,243,161,147,219,221, 4,109, 26, 33,
+140,138,225,241,245,214, 10,190,224,105,252,163,244,243, 39,246,132,150,138,148, 67, 76, 77,147, 38, 57,230,153,216, 45,240, 27,
+223,134,173,103,131,130,175, 85, 21,202,167, 54, 13,192,157, 59,119,213,177,241, 25, 6,158,196,242, 46,107,212,109,205,143,227,
+166,202,225,224,224,224,224,224,224,168,134,193, 82,170,148, 79, 62,232, 57,228,197,132,206, 70, 35, 5,203, 82, 24,203, 35, 76,
+ 44,165, 48,232, 84, 79,222, 53, 33, 70,150,189,177,122,211,206, 78, 13,130, 27,243, 2,106,153,161, 40, 63, 27, 55,175, 95, 53,
+ 80,150,189,106,146, 65, 75, 76,212,152, 57,248,245,233,243, 81,143,157,159,143, 24, 83,212,162, 69, 43,177,141,173,185, 46, 51,
+ 59,171,104,219,186, 29,198, 67,127,236, 12, 5,203, 14,164,137,137,154,234,164, 75,147, 28,243, 12,192,128,114,199,222, 26, 8,
+104,169,202,126,220, 89,153, 21,119,134,203, 62, 28, 28, 28, 28, 28, 28, 28, 53, 50, 88,143,175,238,109,254,191, 72, 72, 94, 94,
+230, 39, 91,119,252, 49,111,219,174, 3, 77, 53, 58,157, 11, 11, 94,178, 81,175, 63, 47, 46,206,157, 97,170, 70, 73,102,236, 3,
+226,225, 17,250,235,207,139,198,255,178,114,113, 27,176, 70, 95, 16,146, 64, 8, 61, 83, 34, 84, 14,171,174,185,122, 3, 57,164,
+217,145,118, 0,114,184,172,195,193,193,193,193,193,193, 81, 99,131,245,191, 34, 47,254,122, 49,128, 49,239,170, 83,110,162, 22,
+148, 47,239, 21, 74,233,125, 0,220, 80, 12, 28, 28, 28, 28, 28, 28, 28,149,194,112,151,128,131,131,131,131,131,131,131,227,253,
+ 66, 0,188,165, 87,158,233, 51,101,215,164, 55, 65, 85,250,156, 38,167,201,105,114,154,156, 38,167,201,105,254,243, 52,171,210,
+174,142,255,248, 91, 67,203, 71, 76,255,111, 44, 0,218,114,154,156, 38,167,201,105,114,154,156, 38,167,201,105,254,219, 22,174,
+138,144,131,131,131,131,227, 95,135,109,221,174,102,182,117,187,154,153,186,189, 93, 64,111, 7,187,128,222, 14,220,149,227, 48,
+ 21, 62,119, 9,222, 29, 66,136, 24, 0, 75, 41,213,253, 85,105,176,178,170,109,110, 80,216,238,101, 88,205, 15,133,201,119, 79,
+190,239,243, 11, 8, 8, 8, 6,128, 7, 15, 30,220,166,148,190,107,111, 76,200, 29,124,251, 91,153, 91, 14,215,177, 90,163,178,
+ 84,185,186, 36, 35,110,207,251, 76,179,157, 93,128, 92, 43,150, 46, 4,161, 29, 65,193, 80, 66,206,240,138,245,227, 11, 10,238,
+ 20, 86,182, 95,173,110, 11,252, 62,239,243,225,244,245,191, 29,158,247,124,255,180,216,215,127,183,238,184, 66, 49,122, 96,187,
+ 41, 43,119,238,255, 62,231,192,228, 18, 46,247, 87,159, 90,205, 62,182, 52,240, 29,121,105,231, 22,229, 86,103, 63, 87,223,136,
+ 24,129, 64, 96,167,211,233,178, 82,227,174, 5,153,178,143,155, 95,147,104, 30,143,113, 54, 26,216,148,228, 71, 87, 66,185,171,
+ 95, 53, 82,251, 58, 17, 48, 24,190,166, 0, 1,225,255,164,206,125,250, 78, 35, 29, 58, 59, 59, 75, 45, 44, 44, 90,152,155,155,
+187,201,100, 50, 73,126,126,190, 42, 63, 63,255,121, 82, 82,210, 25, 74,169,225,175, 56, 71,187,192,238,211,248, 34,102,102,249,
+191,103,103,199,236, 91, 80,249,246,221,230, 17,134, 76, 43,255,247,130,236,152,253,211,255, 14,247,202,161, 94,207,112, 80,118,
+ 60,195,240,154, 24,169, 97,126,214,189,253,171,170,179,127, 68, 68, 68,119,189, 94, 47,174,248,191, 64, 32,208, 92,189,122,117,
+ 31,247, 20,252, 69, 6,203, 53,160,183,149,158, 79,103,241,121,204, 71, 44,165,138,244,219,187,229,127,231, 19,116, 15, 31,120,
+139, 97, 24,215,151,215,177, 44,155,146,116,125,203,123, 41,108, 9, 33,174, 63,141, 11,153,146,153,171, 42, 34,132,204,125,155,
+249,112, 8,238,127,133, 48,164, 54, 33, 4, 12, 67,192, 43, 27, 64, 53,237,249,245,173, 13,223,160,233,100, 46,231,215, 45, 42,
+ 53,220,167,148, 86,249, 18,146,218,248, 56,203,108, 92,206, 71,118, 31,237,121,235,196, 70,127, 51, 7,191, 54, 37,153,177, 15,
+222,195,185,217,121,121,121,133,213,173, 91,215,102,244,232,209, 66, 0, 88,178,100,137,183,183,183,119,110,124,124,252, 77, 74,
+105,118,141,204,149,189,223, 39,203, 22,205,217,210,177, 99, 39,164,229,148, 98,225,226,149,145,102,142,117,123,191, 47,147, 69,
+156, 67,164,150,114,121,204,151,227,103,184,116,106, 21,198,207, 47,213,225,200,153, 27, 3,246,172,255,161,181,165,101,131,160,
+202, 76, 22,171, 44,156,238, 96, 70, 59,176,202, 66, 0,232,255,250,239, 46,102,250,182,118, 82, 99, 7, 39, 49,255, 54,128, 63,
+170,124,185,132, 13, 58, 46, 16, 10,221, 9, 97,192, 16,128,199, 35, 96, 8, 1, 67, 0,131, 94,155,244,228,226,134,246,127,139,
+130, 58,228,147, 12, 66,136, 13,195,148,165,143, 16,128, 97, 24,240,203, 70,254, 45,122,122,101,163,205,123,200, 79, 22, 65,222,
+150,129, 31, 54,109,182,225,252,179, 60,121,173,150,227, 15, 19,202,172, 74,186,240,211, 29, 83,246,151, 72, 36, 86, 7, 15, 30,
+180,235,208,161,131,133, 67, 80,247,243,166,236, 99, 38,146, 4, 28, 58,116, 64,216,161, 67,251,106,228, 79,223, 15,192, 48, 91,
+ 9, 32, 96, 89,186,132,199,210,223, 74,114,227,226,171, 59,152,176,125, 80,247, 57, 32,240, 55,121, 7,138,135, 89,247,247,205,
+168,225,181,229, 73,237,125, 63,149, 74, 36,147,124,124,253,235, 38, 60,139,143, 43, 42, 42, 92,172,202,138, 91, 79, 41,101,171,
+ 37,166, 55,124,117,234, 98, 84, 71,190, 64, 64, 58,180, 9,231, 1,120, 39,131,229,224,224,208,125,197,138, 21,117, 34, 34, 34,
+ 0, 0, 6,131,193,124,247,238,221,142,115,231,206,149,155,242, 12,189, 9, 23, 23, 23, 23, 11, 11,139, 90, 82,169,212, 5, 0,
+ 84, 42, 85,106, 97, 97,225,243,212,212,212,212,170,246,117, 12,238,109,203, 48,152,115,236,143, 95,248, 0,208,190,231,240,121,
+158,145, 95, 89, 17,158, 64,245,166,237,141, 6,173,156, 33,100,252,233,131, 27, 9, 0,180,233, 58,120,170, 93, 64,239,159,179,
+ 31,236,206,252, 75, 62,232,123,247,230,217, 62,214,117, 39,148, 76, 8, 9, 13,107,252, 81,183,142,240,247,114, 70,247,126, 35,
+ 39, 1,168,150,193,210,235,245,226, 61,123,246,184, 50, 12,195, 51, 24, 12,234, 62,125,250,100,189, 75,218,124,154, 13,186, 2,
+ 66,220,116, 6,195,175, 73,215,188,230, 81, 58,147,125, 61,237, 78, 9,252,111, 64,152,161,148,101,147,211,163,119, 52,225, 12,
+ 86, 57,182,117,187,154,241,196,194,251,173,154, 55,182,153, 58,178,135,104,205,111, 23,225, 28,220, 39, 53,237,246,111, 46,127,
+215, 19,100, 24,198,117,223,246, 21,246, 50, 17, 15, 0, 80,162, 54,160,231, 39, 85,143, 6,225, 18, 54,224, 28, 8,124, 43,234,
+ 80,141, 70,131,132,207, 23,168, 9, 0,144,178,222, 1, 82,169,232,218,250,111, 34, 10, 7,119,169, 61,112,202,207,209,155, 0,
+ 88, 2,200,120,227, 67,193, 48,174, 59, 55, 44,177,119,177,145,128,207, 35, 40, 81, 25,208, 99,224, 4,227,155, 12,219,250,111,
+ 34,230,124,210,209,163,175,125,135,223,123, 2, 56, 90,233, 11,196, 49,192, 79, 97,235,124,242,163,225,115,156,149, 48,199,183,
+243,150,216, 95, 62,177,251, 98,219,238, 67,116,207, 83, 82,148, 6,157,254, 81,110, 94,250,196,226,180,184,199,166, 22,212,102,
+102,102,117,204,204,204, 26,116,236,216, 81, 50,105,210, 36, 65,100,100,228,139,223,135, 13, 27, 38, 60,119,238,156,211,162, 69,
+139, 58, 57, 59, 59,171, 75, 74, 74,238,148,148,148, 60,165,148,154, 60, 41,165,163,163,221,151, 31,245,232,130,214, 61,191,128,
+145, 37, 24, 54,106, 60,142, 31,253, 99, 4,128,247, 98,176,204,120,204,236,161,163,191,118,105, 17,209,144,191, 96,247, 99, 88,
+202,132,104, 23,222,144, 47, 17,124,229,184,227,215, 69,139, 1,124,246,166,200, 21,171, 44,156, 30,100,171,237,215, 53,162, 54,
+ 14,236,208,246,115,109, 59, 5,140,204,226, 69, 36,203,171,227, 24,133,149, 84,186,194,217,146,103, 47, 54,102,175,240,234, 56,
+230, 84,252,209,229,197,149,165, 69, 32, 20,186,175, 95,241,157,143,149, 66, 8, 62, 67,192,227, 17,240,121, 12,212, 90, 35, 6,
+142,156,246,190, 34,140, 60,169,189, 79, 39, 6, 24, 12, 0, 44,176, 81,149,245,248, 72,117,238, 9, 97,120, 54,187, 55, 44,226,
+219, 91,136,193,227, 17,240, 24,128,199, 16, 36,102,170, 48,122,210, 44,139,119, 53,234, 29,155,218,135,157,251,185,101,251,198,
+ 65,214,245,119, 93, 37, 22,141, 59,246,181,201, 81,203, 62,221,185,255,108,191, 90, 45, 38, 92,167,148,253, 49,249,226,210, 19,
+149,233,104, 52,154,204,246, 29, 58,154, 19,190, 92,118,106,223,166, 22,124,134, 64,111,164, 48, 24,203, 6, 65,102, 41, 69,217,
+119, 75,217, 71, 12,101, 41,134, 14,253, 28,237, 59,116, 84,178, 6, 54,165, 26,133,198,214, 99,167, 46,219,105,244, 44, 22,173,
+ 88, 63,167,180, 48,123,206,179, 88,155, 68,153, 67,221,241,202,204,184, 3,166,159, 56,252,227,174,236,238,177,253,208, 53, 4,
+ 5,248,151, 13,212,204, 82,248,186,202,177,253,240, 53,248,249,250,149,165,155,165,168,235,102,134,150, 31, 14,172,225,245,141,
+228,203, 29,252,118,116,237, 53,168, 87,207, 94,253, 97,109,101, 14,173, 78, 83,247,244,241, 35,191,172, 94,177,176, 41, 33,228,
+211,106,153, 67,106,124,241, 94,160, 44,251,206,181, 28,206,206,206,118, 97, 97, 97, 47,254,111, 48, 24,224,233,233,137,212,212,
+ 84,223, 26,152, 53,153,179,179,243,135, 11, 23, 46,180,111,213,170,149,192,206,206, 14, 0,144,157,157,237,114,254,252,249,134,
+ 13, 27, 54,204, 74, 75, 75, 59,156,153,153,169,124,171,169, 96,213, 66, 30,229,243,196, 98,105,185,175, 5, 51,105,244,199,245,
+237,236,236,222,248,113,156,155,155, 39,154, 57,115, 6,225,243, 5,101,219, 83,202, 80,214,248,214, 57, 70,154, 52,105,210, 85,
+167,211, 73,222,244, 91,142,193,174,147,154, 21,245, 45,123,139, 0,124, 30, 47, 63,237,246, 30, 59,147, 77,123,253,110,237,156,
+ 24,193,234, 46,221,186,121,116,239, 20, 9, 39, 59, 11,156,185, 22,135,177,223,252, 4,189,193,184,180, 38,247,135,199,227,241,
+179,178,178, 18,173,172,172, 28,223,195,251,182,246,254,237,203,237,207, 94,188, 53,245,103,241,206,145,117,154, 13,214,151,181,
+ 71, 42,155,153,197, 87, 98, 46,104,217,189,173,185,181,139,159,100,221,138, 5, 2, 46,130,245,242,141, 16,241,230, 54,107, 18,
+102, 51,117,220,231,162,185,235,207,227,234,241,195,170,180,219,187,223,139,185, 82,216,251, 70, 16, 30,127, 56,225,241,228,132,
+ 33, 34,214,200, 38, 27,180,218,121,202,156,184,244,119,213,102, 89,138,223,175, 84,211,152, 83,234,253,203,207,139,236, 29, 44,
+197, 80,235,140, 24,252,229,183, 88,187,116,142,194,206, 66, 4,141,206,136, 77, 7,110,229,212, 83, 46,161,131, 59,212, 30,248,
+221,250,152, 63,126,220, 26,251, 71,217,179,250,214,140, 7,123, 11, 49,190,219, 25, 7,115,169, 0, 86, 10, 33, 24,230,205,230,
+106,112,151, 50,205,130, 98,173,129, 16, 34,162,148,106,223,104, 36,156,130,154,155,219,185,238,233, 49,116,142, 93, 92, 38, 1,
+133, 14,241,230, 18,124,244,201, 72,203, 58,142, 82,200, 37, 60, 36, 38,167,123,126, 53,121,114,168,196,201, 47, 76,157, 30,251,
+188,170,211,246,240,240,232,217,185,115,103,217,196,137, 19, 5,110,110,110,216,186,251,184,251, 7,189,198,116, 73,205,200,117,
+ 99, 41,224, 96,111,157,252,121,223, 78, 7,143, 28, 57,146,148,156,156, 44, 88,184,112, 97,248,222,189,123, 3,170,243, 37,106,
+164, 20,106,141, 17,198,242, 23, 99,118,161,166, 6, 47, 21,194,188,253,203,156,118,107, 31, 25,198, 95,178,239, 41,138,149, 6,
+200, 68,124,196,167,151, 34, 34, 60,140,191,107, 29,105,245,166, 61, 62,239,243,225,116, 7, 51,218,161,107, 68,109,216, 91,201,
+176,225,231,239,112,224,234,179, 14,153, 37, 4,182, 93, 23, 14,119, 18,243, 63,176,147, 9, 87, 68,134,122, 57,182, 14,113,199,
+205, 80, 47,199, 11, 81,143,226,234,245, 89, 60, 58,181, 68,112, 42,239,232,232, 55, 26, 45,134, 48,176, 86, 8,177,254,120, 18,
+100, 18, 62,228, 18, 62,228,226,178,191, 12, 67,222, 41, 95, 75,157, 3,220,120,172,241,115,115,231,128,207,251,245,233,237,252,
+113,191,222, 20, 60, 6,187,127, 63,216,109,219,182,173,233,102,142,190,235,140, 12,111,189, 42,237, 65,114,213,215, 19,176,183,
+ 16,225,171,117,247, 97, 46, 21, 64, 33, 19,192, 92, 38, 64,235,250,118, 53, 78, 39, 33,196,106, 68,183, 58,157,238,110,105,219,
+202,183,150,153,207,157,248,194, 7,159,207,187,181,244, 92, 65,171,113, 63, 47, 9,176, 41, 41,208,242,103, 76, 26,202, 79, 73,
+ 75,107,181,251,224,249,214,206,141, 62,127,100,208,149,126,157,117,231,183,253,111,210, 75,142,189,210,208, 53,162,183, 68, 87,
+162,191,119,231, 81,138, 87,190, 70,140,152,196, 34,200, 37,124,152, 85, 92, 91, 9, 31,114,137, 0,102, 18, 62,210, 82, 18,144,
+ 87,202,187,148,106,195,180,162,231,174, 84,171, 42, 74,173, 51,226,246,179, 18,120,248, 6,195,201,201, 25,218, 78, 3, 60,174,
+159,249,125,191,220,201,127, 65,105,250,195,175, 77,213,217,126,232, 26,230, 46, 88,242, 24, 4, 15,203,223,230,254, 19, 39,140,
+246,249,105,241,138, 87,214,141,252, 98,148, 79, 77,205,181,204,193,119, 91,203, 15, 63,233, 85,175,113, 59, 60, 77, 72,192,209,
+131,183,208,230,131,142,232,212,165, 39,180, 90,205,192,245,107,151,223, 4,176,242, 79,101,174,147,127,179,122, 65,254,219, 92,
+156,157,221, 88,182,108, 14, 88, 74,129,102, 45, 91, 99,242,184,161, 96, 41, 69,131,134,141, 90,119,234, 55,154, 82, 90,102, 4,
+115,114,115, 74, 31,197, 62,104,171,202,140,189,110,242,181, 84,171,245,217,217,217,184,125,251, 54,226,226,226, 16, 19, 19,131,
+220,220, 92, 88, 88, 88, 84,171,138,221,202,202,202, 60, 52, 52,244,227,223,126,251, 77, 98, 97,241, 31,207,175,213,106, 33,147,
+201,208,181,107, 87, 65,179,102,205, 92, 6, 13, 26, 52,200,202,202,106,123,126,126,126,209, 27, 13,211,221, 67,105,142,245,186,
+175,233,212,107,216, 72, 0, 16,138,205,158, 45,251,245,143,152,202,142, 45,148,152,187,183,237,254,153, 23, 40, 5, 33,100, 89,
+ 78,236, 31, 25,111,219, 86,167,211, 73,119,237,218,229, 66, 8,121,229,253, 58,123,217,206,166,247,159,100,180, 89, 61,107, 10,
+223,220, 76,130,236, 2, 13,134,143, 28,109,107,178,185,170,215,109, 84, 88,195,134, 43,191,157, 52, 20,114,153, 20, 39,174, 63,
+197,248,105,223, 27,242,114, 50,183,128,144, 37,217, 49,123,223,181,214,226,189, 76,247,230,227, 98, 6, 69,251, 8,201,208, 62,
+145, 18,173,222,136,130, 82, 61, 52, 58, 35,140, 44, 69, 97,169, 30, 15,158, 23,195,214, 92,132,117,248,231, 83, 45,131,197, 23,
+136, 58,143,249,180,147,104,209,246,235,184,122,124,187, 42, 45,122,183,172,226, 55,183,208,126,207,146,111,237,172,253,170, 71,
+169,186,171,165,212, 57,192,141, 79,120,139, 91, 70,182,104, 55,114,212, 40,248,214,113, 21, 26,141, 70,122, 63,238,153,126,211,
+250, 13,159, 90,184,213, 91, 90,148,114,127,122,197,203,180,186,221, 55, 89,150, 77,121, 61, 98,197,178,175,126,205,190, 73,147,
+ 16,192,210, 76,132, 53, 71, 19, 64, 41, 64, 64, 97, 33, 23, 96,231,185, 20, 20,230,166,229,212, 87, 46,185,252,121, 7,219,174,
+243,214, 63,216,191,234, 96,102, 20,128, 24, 74,105,230,219, 52, 9, 33,224,243, 8,204,101, 2, 88,200,132,176,148, 11,193, 16,
+242, 86,115,245,237, 47,119, 55, 1,120,244,178,185,122, 89, 83,238,224, 27,104,110,235,190,175,231,136, 5, 86,119,159,235,192,
+231, 17,212,118,148,194, 90, 33,132,214, 64,144,152,173, 43,223,199, 28, 95, 76,156,109, 55,101,194,200, 35,132, 68,214,167,244,
+156,161,178,115, 87, 42,149,162, 79, 62,249, 68,160,215,235,117,131,199,206,107,151,145,149,219,109,233,252,201, 98, 59, 91, 27,
+148,170,245,136,126,152,228,255,253,162,159,107, 31, 62,125,109,223,215, 95,244,216,223,161, 67, 7,139, 93,187,118,177,213,185,
+239,217,153, 57, 63,111,216,182,103,203,146, 69,243,241, 40, 41, 31,235,215,174, 4, 53, 26,214, 84,238,119, 95,213, 92,177, 98,
+133, 67,120,120, 56,115,227,198,141,156,215, 13, 40, 33,144,231, 22,105, 96, 41, 23, 66, 38,230,195,193, 74, 2, 27, 51, 17, 68,
+ 2, 6, 12,243,159, 66,228,101,205,245,191, 29,158,199, 42, 11,113, 96,135,182,223,134,159,191,195,103, 95,126,131,251, 57,162,
+ 99,140,204, 98,222, 23,253,122, 78,181,147, 26, 59, 56, 91, 50,246,173, 67, 60, 32,151, 8, 49,109,204, 39,104, 20,149,104,159,
+ 90,192,126,147,173,226, 5, 3,248,230, 77,233,100,202, 35, 86, 10,153, 0,231, 14,237,200, 42, 45, 46, 40, 36,188,178, 42, 66,
+189, 86,151,100,154,215,255,243,245,148, 59,248, 78, 13, 9,174,255,221,200, 97,159, 51, 77, 35, 26, 81,134, 17, 32,167, 88, 75,
+ 40, 5,198,141, 30,129, 47, 70, 12,117, 76, 78,203,154,177,114,229,154,233,102,246,254,115, 75,178, 30,206,170, 76,147, 71, 24,
+ 48, 12,129,153,132, 15, 51,105,153, 97, 49,147,240,161,214, 26, 65, 8,120,174, 33,253, 10, 65, 0, 66, 72, 90,242,205, 29,254,
+166,164,211,185, 94,199,211,231,179,132,126,202, 35,234,171, 79, 30, 71,207,187,113,247,249, 13, 74,105, 94,173,150, 19, 6,233,
+ 12, 20, 37,106, 3, 18, 50,149, 48,232, 40,249,172,163, 59, 60,123, 17,223,249, 27,162,183, 16, 66,204, 43, 34, 46,175,107,166,
+ 92,221,173,182,173,215,179,239,146,229,107,111, 46,250,238, 27, 94, 78,161, 22, 44,165,144,136,120,144,138,248,229, 11, 15,170,
+210, 66,172, 92,253,107,134, 1,164, 39, 61, 87,121,158,255,115,161, 65, 7,244,232,212, 98, 39, 1, 68,132, 17,166, 56,187,123,
+184,183,233,242,169,164, 77,215, 79, 96, 52,104,167,202, 29,252,206,150,102,198,158, 54, 69, 51, 40,192, 31, 32,120,152,117,111,
+ 95,207,178,151,100,247, 63,252,124,253,124, 94, 95,231,237,237,235, 99,202,125,175,248,184,144,218,249, 12,243,246,171, 55,121,
+228,183,107, 61, 18,210,149,176,118,243, 65,204,189,219, 56,186,235,231,104, 85,113,254,162,163, 7,254,152, 60,247,135,101, 13,
+186,116,239,131,253,123,119, 77, 36,132,172,162,101,156,122, 41, 58, 53, 96,211,186, 95,220, 4, 34, 49,244, 6, 22,122, 35, 45,
+251,107, 48, 34, 47, 47, 31,122, 3, 11,137, 76, 1, 3, 75,160, 55,178,208, 27, 88,104,180, 6,249,136, 79, 62, 28, 5,224,250,
+155,210,233, 25,254,201, 45, 48,196,181,108,125,217, 58, 17, 99,161,116,114,114,218, 2, 0, 98,177, 24, 98,177, 24, 44,203,226,
+ 94, 26, 25,231, 28, 54, 96, 26,104,249,155,157,101, 83,210,163,119,132,190,237,220,221,220,220,186,188,110,174,212,106, 53, 74,
+ 74, 74,112,249,230, 93,139,205,187, 79,117, 72, 76,206,168,195, 26,237, 53, 82,199, 6,237, 1,116,121,219,245,204,184,183,111,
+ 84,173,200,113,204,196,145,159,120, 47,251,117,207,141,199,199,230, 86, 26, 78,174,221,118,170,118,242,168,254,161, 63, 44,219,
+240, 56,229,252,210,241, 85,221, 35,161, 80, 40,200,206,206,126,241,124,207, 89,241,123,199,231,153, 69,109, 22,125, 55, 93, 24,
+253,172, 4,247, 18, 50, 48,168,109, 45,147,159,119,167,192, 30,190,238,158,110, 75,151,206, 29,139,184, 52, 21, 86,252,126, 3,
+231, 15,111,137,210,169,139, 63,204,138, 57,144, 85,147, 50,228, 93, 13, 86,101,154,103,239,230,160, 68,109,128, 70,107,128,158,
+165, 40, 82,234,145, 85,160, 69,145, 82,135, 18,149, 1,131, 62,168,133,127, 3,213, 50, 88, 70,131,222,213,217,217, 9, 44, 77,
+169,136,112,150, 69, 61,194,251, 41,199, 15,235, 45,117, 14,238, 85,154,118,123,143,201,109,178, 20,246,117,155, 72,165,178,195,
+ 63,253,244, 19,250,117,105, 46,125,158,163, 47,185,251, 92,149, 89,170,133,193,222,174,174,104,222,252,239,205,190, 95,248,227,
+ 23,135, 14,176, 5, 0,126,124, 99,248, 57,172,255, 45, 30,121,169,141, 21, 33,160, 44,155,146,114,115,123, 40, 0,188, 75, 91,
+171, 18,181, 30, 60,166,172,237, 12, 33,128, 82,109, 64,105,126, 70,238,203,230,234,122,170,227, 83, 30, 47, 91, 71, 41,173,180,
+ 10,130, 33, 64,145, 82, 15, 11,153, 0,150,102, 2, 88,200,255, 19,193,122,139,185,138,169, 76, 83,168,211, 37, 27, 13, 90, 53,
+ 53, 26,209, 57,204, 14,246,150, 34, 56, 89,137, 33, 22,241,161, 55, 0, 42, 45, 11,181,214,136,196, 44, 21,138, 85, 34,212,143,
+236,235,157,230,116, 77,105,235, 17,182, 41, 39,241,230,240, 74,239,179,209,136,109,123,142,123,167,101,100,119,219,191,101,177,
+ 56,171, 72,135, 59,137, 37,200, 42,208, 0,196, 2, 83,191,153, 46,158, 49, 99,102,247,109,191,159, 72,106, 25,238,159, 84,221,
+235, 90,154, 21,187,181,126,211, 15,127,238,220,185,187, 34,230,250, 17, 60,190,125,250,219,146,204,234,181,191,242,246,246, 54,
+252,252,243,207,118,107,215,174,245,182,183,183,127,158,149,149,245,172,162, 58,202, 51, 32, 34,237,212,233,139, 54, 45,154, 54,
+231,167,228,168, 97,163, 16,194,195, 65,142,168,171,103,181, 12, 33,199,222,164, 87, 94, 13,216,223,181,237, 20, 28,184,250,172,
+ 67, 76,174,228,220,208,207, 7, 37,157,184,240, 40,119,197,150, 19, 63,184,152,233,111, 75,216,236, 21,183, 66,189, 28,167,142,
+254, 4, 11,150,111,197,249,168, 71, 89,165,140,211,119,233, 26,195,201, 89,125, 39,191, 57,234,203, 0,124, 30,129, 66, 42, 64,
+105,105, 65,225,253, 83,171,234,190,167,103,119,208,137,125, 91,153,188, 98, 61,146,115,212, 36, 45,175, 24, 70,150,194, 82, 38,
+132,129,165, 40,200,203, 33,219,182,110,193,205,155, 87, 25,240,152, 33, 0,102, 85, 17, 9, 1,143, 33, 48,147, 8,202, 34, 64,
+210,178,191,122, 35, 11,159,218,110, 88, 54,103,140,185,173,189, 3,218,245, 28,110,122,132, 77,110,213, 96,243,234,121, 56,119,
+245,118,228,217, 39, 59,194,236,131, 26, 44,119, 13,232,189,136,177,118, 81,107,116, 70, 20, 22,228, 67,164, 77, 70, 35,151,108,
+ 88,203,140, 72, 44,114,194,253,140,199,102, 85, 85,103,229,220,251,227,182, 93, 80,143,233,123, 14,158, 89,208,254,131, 72,220,
+ 79, 44,130, 84,196,135, 68,196,131, 68,196,131,128, 24,177,120,245, 26,125,126, 97,113,231,156,251,251,114,106,144, 63, 79, 1,
+120,209,230,204,204,161,142,221,214,229,211, 55, 15,157,188,176,125,135, 30,159,146,251, 55,207,126, 13,224,180, 73,101, 38, 75,
+ 77, 90,199,178,166,189,219, 8, 33,140,189, 87,232,246,141,155,118,244, 13,240,113, 67,102,129, 30,105,249, 58, 92,140,142,199,
+230,117,211, 11,242, 51,159, 14,128,174,164,132, 37,134,194,227,199, 14, 30,251,114,236,100, 4, 6, 53,240, 40, 74, 41, 50, 7,
+ 80,248,202, 49,121,100,237,192,207,135,247,117,112,112, 80,252, 39,130, 69, 81,215, 55, 0,157,186,126,132,227,251,247,226, 65,
+204, 93,176,180,108, 56, 31,150,165, 40,200,207,205, 48,232,181,155,222,154, 62, 30,207,117,227,154, 69,246, 12, 67,160,211,179,
+208, 26, 88, 76,157, 58, 93, 59,118,198,138,102,237,155,214,143,225,129, 45,122,158, 94, 96, 25,245, 40,163, 30, 17, 40,156, 6,
+140,152, 34, 84,107,140, 40, 84,234,113,106,247,178,183, 87, 51,214,105, 16,225,233,223,236,243, 97,223,172, 17,139,121,140, 46,
+176,174,219,179,150,141, 3,147,107, 57,219, 22,207, 95,182,173,209,149,232, 71,157,122,246,236, 41,233, 91,199,159, 56,219, 72,
+ 20, 35, 70,141,174,239,232,211,108, 96,198,227, 75, 91,222,250,242,227,139, 11,220, 92,221, 94, 84, 37,218, 7,117,191, 11,192,
+253,181,205,146,178,238,239,171, 15, 0,246, 14,142,106, 34, 16, 23, 87,195,128, 80, 0,152,189,124, 79,167,148,236,146, 94, 21,
+230,234,246,211, 66,136,133, 12,116,122,211,155,198, 25, 9, 29, 55,101,244,103,130,188, 82, 3,206,221,205, 70,204,173,179,212,
+160, 43,250,148, 18,254, 96,187,160,238, 3, 9,224, 73,129, 4,134,224, 23, 45,131, 77, 5,119,246, 21, 86,191,166,167, 44, 61,
+246, 1, 61,155, 16, 30, 58,241,248,194, 48,128,245, 51,232,245,246, 12,143,151,147,113,103, 79,149, 61, 40, 95, 62,163,210,204,
+ 56, 44,156, 63, 3,203,214,237, 69, 90,174, 26, 22,198,100,236, 95, 63, 15, 19, 23,108,135, 74, 99,196,191, 1,147, 13,150, 67,
+189,110,141, 0,134,231,104,109, 6,239,218,110, 48,235, 61, 88,234, 26,210,183,148,199, 99,152, 77, 75,191,150,228,170,248,224,
+243,120,165, 38, 23,190, 14,126,225, 10,133,226,200, 31,191,239, 69,157, 90,246,194,109, 23,243, 18,162,159,169, 94,132,116,139,
+178,147, 68,158,230, 74,126,207, 30, 61,100,167,207,156, 29,247, 54,131,197, 35,140,235,178,197, 63,216, 43,164, 2, 16, 2, 20,
+171, 12, 24, 59, 97,202, 59, 95, 24, 10,202,251,114,194, 76,144,114,115, 85, 92,152,135,239,150,109, 42,233,233,114,230, 82,133,
+185, 58,241, 80,250,164, 71,143,214,133,137,137,137,249, 85, 22,140,212,152,210,107,208, 88, 33,195,148, 85, 27, 49,132,128,194,
+152, 89, 19,115, 5, 0,249,249,207,138,164,142,245,123,108, 93, 50,122, 93, 45, 23, 23, 43,133, 76, 66,204,228, 98,226,239,235,
+ 37,105,220, 56, 66, 82,203, 43, 80,116,225, 65, 9,158,103,171,240, 44,173, 16, 34,219, 64, 65,223,150,109,177,117,217,148, 78,
+166,156,255,153,171,247,187,172, 90, 52, 93,156, 81,160, 69,236,243, 18,100,228,171,145,158,175, 65, 70,158, 26,102, 82, 1, 34,
+218,246, 20, 31, 61,185,187, 75,203,112,255,229, 53,185,190, 79,227,159,237, 77, 76, 77,255,180,126,195, 70,216,182,121, 99, 99,
+226,234, 42,161, 41, 41,106, 83,247, 95,183,110, 93, 94, 88, 88,152,221,247,223,127, 95,234,235,235, 27,236,235,235, 91, 59, 46,
+ 46,238,156,183,183,119,215, 85,203,230,158, 31,251,205, 34,119, 30,209, 91, 52,105,218,140, 39, 17, 18, 92,189,112, 92,179,105,
+221,154, 52, 93, 65,201,228, 74,141,176,204, 98, 94,102, 9,129,157,139, 75,140,153,200,248, 1,159, 41,136,203, 59, 58,122, 11,
+128, 63,188, 58,142, 57,117,246,214,163,184,208,168, 68,251, 51, 81, 79,178,242,148,186,186,241, 71, 39, 84, 90,224,242, 8,129,
+128,199, 64, 33,229,191,136, 88, 58, 52,232,253,132, 18, 98, 87, 17, 41, 37, 40,139,104,145,178,207,150,180,148,168, 93, 38, 52,
+140, 38,148,165,192,163,148, 82,148,168,203, 66,240,174,182, 50,100,103,166, 96,213,242, 77,136,190,117, 19,237, 58,118,197,202,
+ 95,183, 97,232,192,222, 85, 94, 87,134, 65, 89, 4,235,165,232,149,153,148, 15,128,160,160, 84,143,223, 47, 37,195,171, 54, 3,
+ 82,141,218, 66,133,153, 20,133,197, 42, 48, 2, 51,196, 94,220, 34, 59,122,246,198,180, 89, 63,174,255,170,168, 36,227,121,252,
+131,171,240,181,202, 69,109, 23, 29, 98, 50,204,113, 43,215, 19,190,222,117,192, 8,111,154,164,157, 19, 83,111,225,126,230,247,
+206,161,193, 1, 17,238,246,150, 80,105,141,229, 81, 44, 30, 54,110,216,130,196,132,148,207,115, 98,246, 69,191,143, 66,178, 36,
+243,105,182,196,193,231,139,123,215, 79, 63,235,241,241, 23,112,114,169,213,160, 58,205, 19, 76, 89,103, 52,193, 96, 17, 66, 24,
+107,143,224,205,155,183,238,238, 91,187,150, 35, 78, 94, 79,192,141,184, 92,216,218,218,128, 39,115,132, 79,203,193,150,247,142,
+ 45,251, 72,149, 83,178, 89, 32,148, 13, 9,111,220, 20,148, 82, 60,122, 24,147, 87, 88,104,241,167,178, 89,153, 22,123, 27,128,
+249,203,235,100,118,254, 13,204, 44,172,111,107,116, 70,164,166,166,224,242,149,115, 13,203,183, 51, 25,177,144,135, 19,209, 89,
+208,233, 89,232, 12, 44,194, 67, 2,181, 2,145,180,249, 15,235, 14, 55,206,204,204,102,164,102,230,172,133,125, 29,161,181, 62,
+ 67,115,231,105,161, 80,167,103, 81,199,185,242,239,114,153,117,157,249, 19, 38,142,245,231, 9,165, 40, 46,213,104,211,211, 82,
+ 29,127,217,113,182,228,225,163, 7, 46,158, 30,181,204,231,205,157, 37, 44, 84, 1, 89,133, 26,228, 21,235, 72,159,143, 63,119,
+222,178,126,229, 0, 0, 91,170,145,244,122,187,182,172,209, 91,153, 9, 73,177, 74, 79,179, 11, 53,198, 81, 95,140,173,247, 46,
+121,167,194, 92,253,248,221, 55,194,232,103, 37,184,243,180, 16, 18, 33, 15, 34, 33, 3,173,137, 6,203, 46,160,183,220,206,206,
+114, 64,120, 3, 31, 28,143,206, 6,143,199, 64, 89, 90,168,149,136,205,238,251,249,249, 48,193, 13,130, 16,217,172, 9,226,159,
+ 37,250, 30, 63,121,102,201,141,155,209,223,217, 5,245,152,156,125,127,239,202,234,164, 53, 57, 61, 87,150,105,112, 27,107,239,
+104, 27,212,181, 91, 23,113, 45, 23, 7, 98,103,109, 9, 35, 17, 98,196,200, 47,237, 77,206,243,180, 44,122,249,253,220,105,208,
+104,180,176,179, 20,129, 82, 96,195,242, 89,208,106,181,112,182, 17,163,176, 84,207, 25,172, 23, 55,184,126,143,166, 82,177,252,
+196,202, 5,227,152,130, 82, 61, 36, 66, 30,234,212,169,141,209, 99,199,201,218, 52,176,131,138,152,227,247, 29,155,138, 12, 70,
+253, 33, 83,244,100,142, 62,161, 10,185,249,241,205, 91,119,177,182, 54, 54,204,170, 19,217, 79,115,139, 13, 47,134, 56,136,187,
+126,128,189,117,252, 23, 39, 10,114, 76, 34,145,120,107,181, 90,171,170,110,232,134, 19, 73,229,141,115,201,123,185, 48, 12,195,
+ 24,127, 89, 62, 23,182,230, 34,104,244, 44,230, 44,217, 82,220,217,238,216,153,151,205, 85, 72, 72, 72, 97,131, 6, 13, 10, 24,
+166,234,225,196,158,223,216,214,228, 13, 5,102,141,204, 85, 5,170,140,187, 55, 1, 4,189,170, 25, 34,176,245,220, 61,177,223,
+128,129,211, 28, 3, 63, 84, 36,164, 23, 66, 72,116, 8,243,119,194,185,227,127,176,201,207, 30,142, 48, 69, 59, 43,183,208,205,
+214,214, 6,209, 79,139,145,154,171, 66, 70,185,185, 74,207,215,160, 88, 85,140, 6, 30,118, 40, 40, 44,113,171,177,129, 37,116,
+223,241,227,199, 63,237,212,173, 47, 70,127, 53,187,227,186, 85,139,238, 74, 29,252, 7,170, 50, 31,222, 48,101,255,221,187,119,
+ 27, 61, 60, 60,158,102,103,103, 55,154, 52,105, 82, 81,157, 58,117, 28,231,206,157, 59,172, 78,157, 58,206,173, 91,181, 42,188,
+113,182,241,230,177, 95,205,106, 53,117,204,186,218, 12,195,100, 82,150, 30, 72, 43,213,207,164,217, 15, 84,149,222,167,253,211,
+ 98, 73,192,236, 79, 63,104,110,119,192, 90,198, 4,138,169,182, 31, 9,152,189,139, 62,152,169,139, 63,186,188,184, 94,159,197,
+163,211, 10,216,111,212,140,253,119, 85,153,171,178, 8, 22,129,214, 96,132, 66, 42,248, 79,222,164,112, 90,181, 98,177,204,206,
+ 66, 4, 1,143, 1,159, 71, 80,164,212, 35,167, 72,135,175, 38,127,101,234, 21,100, 13, 70, 10,149,214, 0,101,249,215, 96,113,
+ 81, 14,166,125, 53, 1, 29,187,244,192,144, 17, 19,144,175, 2,110, 61, 43,134, 78,175,175,242,161,224, 17, 2,165,198,128,207,
+218,185, 35,175, 68,135, 82,149, 1, 90, 3, 11,153,136, 15, 62,159,129, 92,194,135,185, 76, 0, 66,168,208,201,201,105, 24, 0,
+ 8, 4, 2,245,243,231,207,183, 86,242, 5, 15, 79, 55, 7,168,244, 12, 26,245, 93,132,182, 17,117,113,231,212,122,254,249,107,
+247,106,127, 53,107, 9, 70,245,143,192,158, 88, 47, 88,219,187,195, 76, 46,133,158, 50, 0, 76, 27, 2,132,210,153,172,147, 95,
+207,254,107,126,221,240,104,206,140,169,146,130, 82, 2,177,144,135, 51,167, 79,225,234,245, 91,203,178, 99,246,109,125,159, 5,
+165,128, 50, 14,230,230,230,144,136,120,208,234, 52, 90,147, 35, 15, 44, 5, 40,252,237,235,117,255,163,252,222,251, 27, 89,188,
+ 97, 29,173,202, 92, 17, 11,231,160,141,107,214,109, 27,224,236,104,143,189,167,239, 98,227,175, 43, 80, 59,184, 51, 46, 29,222,
+ 8, 11,207,198,144,215,106, 6,145, 98,247, 48,134,199,175,247,229,184,175,123,134,132, 69,224,242,197, 51,200,202, 72, 95, 67,
+105,172, 73,109,208,120, 2, 50,166,245, 7, 93,160,214, 26,209,188, 77,103, 28, 59,184,119, 52,202, 59, 79,152,202,235, 38,156,
+101, 97,248,114, 72, 63, 65, 86,129, 86,144, 93,164, 69, 74,182, 18, 9,153, 74,236,223,185,158,154,250,214,102,248,188,176, 22,
+245, 93, 5,195, 22,158, 73,118,115,117,210, 8, 52, 42,105, 92,252, 83,191, 33,159, 14, 16,212,246,246, 99,178, 10, 53,200, 46,
+212, 32,167, 80,131, 18,181, 1,222, 78,181, 24,141,129, 31, 81,221,251,108,103, 41, 17,172, 60,248, 12,230,114, 1,154,248,217,
+212,184, 17, 54,203,178,175,152,171,219,207, 74,113,247, 89, 33,196, 66, 30,196, 66, 6, 98, 33, 15, 6, 35, 53,241, 93,100,232,
+ 55,124,112, 95,169, 86, 79,145, 91,168, 5,159, 71,224,104,107, 35,118,115,170,139, 13,139,190, 4, 0, 12,157,178, 10, 67, 62,
+251, 4,190,117,189, 81, 88, 88, 44, 29, 50,114,236, 98,188,161,221,221,219,210,186,109,255,133,128, 91,247,147, 38,126, 58,120,
+144,160, 79,151,230,204,237,167, 69, 72,207,211,224,105,188, 18, 58,125,245, 70,163, 49, 24, 89, 80, 80,108,218,117, 8, 82, 17,
+ 31,217,133, 58, 80, 74, 49,111,197,111, 80, 72, 5, 72,207, 47,171,214,231, 12, 86,133,185, 18, 73, 78,108, 89,241,181,244, 76,
+ 28,176,236,228, 45,124, 24,238, 4, 33,159,129,216,204, 17,119,158,229,227,212,233,253,197,151,174, 94, 87,131,209, 87,217, 45,
+ 74,230,228,219, 80, 46, 53, 63,181,242,151,205, 6, 91,123,123,108,189,152,151,146, 95,106,208,255,167,122, 74, 79,110, 29,255,
+165,182,129,213,119, 80,101, 60,174,242,115,150,165, 84,184, 96,245,126, 0, 20, 44,203,130,178, 44,120, 66,177,220,189,241, 39,
+153,101,122,172,132,207, 99,212, 47, 63,249,148, 53,166, 36, 93,223, 94,105,213, 33, 1, 96, 33, 19, 96,215,249, 84, 20,230,165,
+229,116,182, 59,246,162, 90,240, 88,140,248, 73, 72, 72,112, 97, 88, 88, 88,129, 84, 42, 5,143,199,171,246,133,127, 87,115,245,
+246, 23, 79,148, 30,192,247,206,126, 45,187,118,148, 5,134,139, 24, 62, 66,124,157,112,238,196, 94,246,234,209,245, 61,148,153,
+113,135, 77, 12,111,163, 68,165, 71, 90,174, 26,169,185,106,100,228,171,145,145,167, 65, 70,190, 26,132, 16,168,181,239, 54,124,
+141, 50, 51,238,160,153, 75,224, 26,141, 14, 35, 90,180,235,129,137,179, 86,122,111, 93,243,195, 69,185,189, 79, 88,105,214,227,
+123,166,104, 36, 38, 38,106, 28, 28, 28,162, 10, 10, 10,218, 45, 89,178,164,196,223,223, 95,100,102,102,150, 11, 64,250, 36, 46,
+ 78,120,230,200,238,132,236,180,180,225, 58,157,238,166,169,233,242,136, 28, 44,246, 51,207, 27, 86, 75,222,164,125, 29, 71, 25,
+106,201,139,219,251,153,221,249,209,190,205,184,249, 89,167,151,102,165,107, 12, 39,179, 85,188,224,212, 18,129, 73,109, 1, 13,
+ 58,109,210,199,195,167,129, 71, 8,116, 26,109, 82, 69,230,178,183, 16, 97,214,182, 88,152, 73, 4, 80, 72,249, 48,147, 10,208,
+ 44,192, 26,213,248, 60,160,122, 35, 11,165,198, 8,149,198, 0,181,214, 0, 91, 55, 43,252,186,117, 55,158,103,169,176,255,102,
+ 14, 30, 37, 21,195,199, 85, 14, 74,171,142, 59,177,212, 80,218,103,216, 55, 10, 30,195,128, 71,192,248,121,123, 32,175, 68, 11,
+ 33,159,129, 72, 36,130, 92,204,135,185, 84, 0, 1, 95,128, 27,119,239, 66,163,209, 32, 60, 60, 92, 82,185, 5, 44,139, 98,249,
+212,118,134, 78,111,192,145, 11, 15,240,221,248,158,248,160, 69, 40,190,226,137, 16,171,105, 8,133,181, 2, 44,195, 64,103, 96,
+161,213, 25, 1, 48,111,141,182,213,170, 85,171,181, 92, 46,151, 43,149,202,226,164,164,164,115,233,177,127, 60,183, 15,236, 62,
+236,216,137, 51, 91, 59,119,252, 0,209,119, 99,176,103,239,129,139, 57, 54,133,147, 42,246, 9, 10, 10,106,108,107,107,107,150,
+155,155, 91,116,239,222,189, 27, 53,201,171,132, 16, 34,119,240, 27, 23,209, 44, 18, 37, 5, 89,200, 76, 78, 56,100,234,190,254,
+238, 10, 76, 24, 63,218,199,183,174,175,143,177,188, 39, 85, 64, 45, 5, 70,140, 28,229,227,229, 83,215,167,162,163,135,127,173,
+202,199,187,148, 59,248,142,250,110,241,234,129,181,220,220,112,244,114, 44, 22,124, 51, 34, 90, 46, 83,120,186, 58, 88, 89, 10,
+ 3, 67,113,251,246, 21,216, 67, 4,115, 7, 31,215,126, 93,135,187,182,239,216, 21,247,238,220,194,210,133,115,175,150,242,164,
+243, 77, 73,171,153, 67, 29,187,224,176, 22, 31, 43,172, 29, 80, 80, 88, 12,133,149, 61,252,235,135,125,108,230, 80,103, 74, 73,
+230,211,236,154, 62,235, 44,165,208,232, 40,242, 75,116, 72,206, 86, 33, 49,163,204, 96,177,108, 53,218,252, 80, 16, 51, 9,159,
+111,173,127, 82,235,222,169, 51,212,221,205,129, 44,156,251, 21, 79,135,178,198,226,217,133, 26,100, 23,105,145, 93,168, 69,137,
+ 90, 15,107, 57, 31, 44,101,171,253,181,157, 95,162,131,162,188,157,172,145,173,185, 9,152,181,100, 71,147,148,108,101,155, 31,
+231,125, 35,188,147,240,146,185, 18,148, 69,175,196, 66, 30,140,172,105, 17, 44, 30,159, 25,253, 97,155, 70, 72,206, 81,149,245,
+ 66,102, 8,188, 3, 27,194, 86,202,162, 77,223,169, 0,128, 46,157,202,134, 33,121,150, 94,138,131,215,210, 1, 64,104,106, 90,
+115,115,139,197,123, 79, 70,143,221,241,235,143, 34, 13, 43,192,218,163, 73, 80,106, 12,144, 8,121, 16, 11,121,144, 10,171,247,
+126, 51, 24,203, 58, 75, 60,207,209, 67,169, 86,163, 72,165, 7, 5,112,227, 73, 9, 84, 90, 3, 10, 75,245,104,236,103,197, 25,
+172, 10,115,181,121,249,215,210,211,113, 20,103,239,228,162, 87,115, 87,228,102,165,224,215, 85,203, 88, 74, 1,177, 68,148, 97,
+ 52,176, 71, 85,172, 97,114,193,157,131,133,149, 22, 18,118, 1,245,165, 50,217,153, 31,150,174,213,217, 59,184,176,127, 92, 43,
+200, 42, 84, 26, 95,137, 21, 26, 53, 26,134,178, 84,104,138,185, 42,143, 52,233,102,142,238, 1,150, 82,204, 90,186, 27,243, 39,
+245,133,153,148, 47, 35,132,200, 74,213, 6,140,159,189, 14, 63,125,251,185, 66, 38,230,131, 16, 64,173, 53, 98,196,104,211,162,
+ 4, 74,141, 17,165, 5, 25,185,245, 74, 22,191,102,174, 66, 10,195,195,195, 11,172,172,172, 80, 19,131,245, 38,115,229,232,232,
+232, 44,147,201,172,125,124,202,218,186,242,120, 60, 24,141,198,210,199,143, 31,215,104,208,183,162,130,236,125,233, 9,247,194,
+155, 68,126,136,243, 39,246,177, 87,143,172,235, 81,157, 46,230,150, 22,230,201,209, 15,146,252, 9,204,202, 34, 88,229,230, 74,
+171,103,225,238, 32, 67, 74,242,115, 88, 90,152, 37,155,170, 39,115,244,233,192, 80,222,112,150,224, 87,101, 70,236, 17, 0, 40,
+ 73,141, 25, 41,179,175,123, 47, 38,230,206,210,206,253, 71,139,218,245, 26, 41, 92,179,224,139,169, 0,250,153,170,155,153,153,
+169,180,179,179,187,234,228,228,212,121,246,236,217, 26, 0, 98,141, 70,195, 12, 30, 60, 88,150,148,148, 52,158, 82,106, 82, 26,
+155,127,182,199,150,136,139, 59,122,249,132,245,119, 87, 20,127,208,170,121, 4, 34, 2,221,144,220, 60, 2, 0,198, 36,149,152,
+249, 54, 27,185,126, 87,109, 59,215, 35,107, 54, 30,156, 63,180,111,219,241,206, 93,102, 47, 78, 59, 56,179,210,136,216,163, 11,
+235,219,191,201,190,243,121, 12, 20, 82, 1,204,164,124, 40,164, 2, 40, 36, 2,232, 13,180, 58, 85,112, 84,111, 96,203, 34, 88,
+ 90, 3, 74, 84, 6,156,185,157,137,140, 66, 45, 10,138,117, 80,233,140,160,160,208,233,217,138, 81, 69, 42, 55,171, 87, 54, 89,
+ 86,252,219, 53,164, 95,225,178, 57,163,205,127,191,148,242,162,135,158,133, 76, 4,133, 76, 0,128,226,194,133, 11,176,177,169,
+122, 88, 44,150,101,177,231,216, 13, 44,222,116, 6,199, 54, 76,134, 68,200, 67,253,110,179,241,105,247,112,176, 44, 69,252,163,
+152, 76,159,128, 6, 14, 12, 35, 5, 67, 8, 52,122, 22, 0,125,235,245,212,106,181, 54,207,159, 63, 47,242,246,246,118,116,113,
+113,233,197,227,241,168, 24,208,236,219,153,167, 60,125,104,187,172, 84,165, 49,202, 12,133, 27,188,211, 85, 31,250,248,248,128,
+ 16, 66,109,109,109,133,103,206,156, 41,169, 87,175,158, 93, 77,158, 35, 66, 8, 35,181,175,187,108,200,200,113,189,188,234,212,
+193,238,237, 27, 64, 41,249,221,212,253,183, 29,188,138,197, 75, 94,237, 49, 56, 98,228, 40,159, 53,171, 87,189,178,110,224,231,
+195,124, 42, 51,120,174, 65,173, 39,251,249, 5,224,106, 76, 10, 22, 78, 31, 25,173,206,122,214, 95,107,102, 51, 92, 87,146, 62,
+ 33,184, 97, 40, 28,109,204,145,150,167, 65,215, 1,221,209,180, 89,115,220,187,115, 11,115,191,253,234, 42,148,218,118, 85, 69,
+109,255, 99,132, 4, 35, 90,181,239, 46, 80,105,116, 88,190,112, 6,134, 79,250, 14,141, 91,119, 17,220,191,125,109, 4,128, 57,
+166,158,179, 70,103, 68,171,122,182,101,166, 89,207,226,192, 51, 30,255, 77, 57,144,207, 35, 76,112, 29, 75,168,180, 6, 20, 41,
+245, 85, 68,176, 72, 70, 65,113,169,199,207,243,199,241, 74,213, 6,100, 23,106,145, 85,168, 65, 78,193,127,140, 85, 78,161, 6,
+217,133, 90, 8,248, 4,113, 9,105,224,241, 72,181,219,223,229,151,232,209,168,174, 85,217, 51, 90,195,218,144, 28,131, 93,199,
+ 59,113,105,109, 22,206,157, 38,188,147, 88,138,187,207,138,202, 35, 87, 60,136, 5, 12, 68,229,255, 54,154,224,175,236, 3,186,
+ 54, 25,216,175, 91,160,185, 92,130,180,184, 98,240,121,101, 67,189, 88,216,187,193, 66,172,198,151, 35,135,193,214,198, 18,207,
+115, 52, 88,182, 55, 14,119, 31, 60, 1,171,170,222,105,255,188,253, 88,143, 65,159,244, 21,243,132, 98,108, 57,148, 0,177,144,
+ 7, 62,213, 34,230,218, 5, 77,102, 74,130,174,184,168, 64,206,231, 11, 76, 18, 37, 0,173,136,204,205,159, 53, 21, 59, 55,173,
+194,241,168,172, 23,205,231, 47,253,254, 19,198, 77,155,135,156, 34, 45, 0,242,143, 15, 99,241, 43, 51, 87, 18,145,232,196,166,
+101,211,164,167,227,128,115,119,203,204,149,170, 36, 7, 91,214,175, 45,161, 96,219,102,222,223,111,242, 23,161,220,190,110,144,
+ 88, 46, 63, 63,125,222, 50,141,131,139,135,225,200,237,162,220, 98,181,241, 79, 97, 16,161, 76,110,148, 91,216,169, 45,221, 27,
+ 46, 22,168,180, 51,178,179, 31,148, 86, 21,105, 98, 41,197,161,235, 25,160,180,236,147,232,183, 11,169,224, 49,101,213,133, 70,
+182,172,250,228,228,237, 44,240, 25, 98,114,151,115, 66,128,223, 78,220,206, 9,122,131,185, 10, 11, 11, 43, 48, 55, 55,135,165,
+165, 37,204,204,204,170, 91, 96,191, 49,114, 37,147,201,172,143, 31, 63, 46, 49, 55, 55, 7,143,199,131, 70,163,193, 7, 31,124,
+ 80,163,155, 42,119,240,237,215,184, 77,207, 5, 77, 91,125,136,179,199,255, 96,175, 30,217,216, 83,153, 85,141,241,123, 0,116,
+108, 81,255,224, 15, 63,173,168,253,213,212,233, 98,133,132,143,135, 37, 90, 48,132,192,221, 65, 6, 27, 51, 30,174,158, 57,164,
+238,245, 65,189,131,166,234,213,114,245,216,178,104,249, 26,155,197,223,207,110,103,101, 85,219, 33, 63,255, 89, 17, 0, 40,179,
+226,214,152, 57,250, 62,114,173,117,226,124,131,150, 61,224,224,226,221,169,186,231,155,157,157,157, 25, 24, 24,248, 48, 32, 32,
+ 32,180, 87,175, 94,116,193,130, 5, 86, 41, 41, 41,187, 77, 53, 87,192,255,177,119,214,225, 81, 92,251, 27,127,207,250,102,227,
+196, 29, 72, 8, 9, 17,220, 10, 65,131, 59,148, 2, 69, 74,105,145,150, 10, 82,161,180, 72,169, 64, 75,129, 42,180,208,226,238,
+165,184,187, 75,132, 4,136,187,103, 37,155,213,217, 57,191, 63, 32,185,129, 27,217, 0,253,221,123,233,249, 60,207, 60,217, 36,
+179,239,156, 51,115,102,206, 59,223, 99, 64,207, 94,225, 51,236,164,150, 14, 13, 20,130,240, 64, 79, 5, 58,134, 63,108,253, 28,
+ 53,160, 51,252,252,253,145,156, 87,222,178,164,156, 23,151, 25,133,129, 63,255,122,231, 90, 35, 87,225,155,156,206, 24, 15, 96,
+ 95,189, 43,109,252,171,227,123, 69,244,202,222, 70, 12,254, 97,249,168,151,193, 50,152, 44,208, 25, 44,208, 25, 57,104,141, 22,
+148, 27, 45,224,233,195,123,130, 16, 2, 19,199, 87, 28,178, 94, 9,116,104,224,138,192, 70, 15, 71,189,218,219, 60,156,178,225,
+ 97, 19, 33,224,226,226, 2,119,247,186, 27,119, 40,165, 48,154, 30,222,226, 70, 51, 95,217, 68,106, 52,113,160,148,226,222,189,
+196, 15,211, 82, 82,134, 52, 9,110,210, 37,172,121,139, 6, 10,153, 0, 0,106, 52, 3,229,229,229, 22,123,123,123,247, 6, 13,
+ 26, 8,178,179,179, 43,251, 61, 54,105,217,157,219,179,123, 23,134, 15, 31, 86,118,247,234,237,202, 17, 85, 58,157,142,116,234,
+212,201,193,207,207, 79, 96, 48, 24,212,245,142, 90,185, 53, 29,234, 23,250,210,151,227, 39, 78,105,218, 61,186, 47, 78,157, 56,
+138,125,187,183,172,215, 22, 36, 30,181, 86, 39, 36, 36,244,223, 70, 17, 6, 5, 55,253,183, 81,132, 13, 27, 7,215,104,176, 28,
+ 29,155, 59, 52,111,219,205, 47,173,200,132, 67,135, 14, 66,171,202,251,204,104, 44, 43,135,152,174, 57,176,229,231, 73,111,188,
+191,208,161, 91,215, 40, 56, 59, 40, 32, 18, 9,113,227,218, 37, 44,254,252,147, 75, 40, 55,246,174,235,249, 89,153,223,176, 48,
+ 73, 19,255,134,239,249, 7, 69,224,198,229,115, 72,186, 23, 27,119,251,218,165,240, 38,145, 29,224,230, 29,240, 30, 9, 11, 91,
+ 76,227,227,235, 92,169,130, 90, 44, 89, 19, 38,207,124,116,253, 31,254,173, 99,203,198, 82,242,228, 13, 0,192,204,153, 44, 27,
+ 86, 45, 46,168, 58,138,176, 38, 93,189, 70,185,243,236,229, 59,179, 7,245,142, 18, 20,169,141, 15, 35, 86, 42,227,163,205,128,
+162,138,207,106, 3,130,189,237,144, 20,123,151, 55,107, 85,187,234,119,103,210,252,105,111,189, 99,243, 48,237, 60, 40, 79,107,
+ 53,252, 53,166,213, 34,121,117,213,231, 31,147, 59,105, 90,220, 73, 85, 63,108, 18, 20, 11, 31, 26, 43,177,160,210,108, 89,213,
+ 74, 38, 16,124, 51,126,100, 31, 20,169, 77,224,121, 64, 36, 20, 60,218, 36,200,208, 16,100,106,202, 81, 84, 90,136,148,180,116,
+ 40,243,146, 32, 16, 8,224,234,221, 20,229, 25,214,165, 85, 99,177,107,106,182, 32,104,228,128, 40,225,158, 75,121, 80,200, 68,
+ 80, 23,103,226,194,145,109, 58,158,179,172, 50,154,141, 91,221,169, 52, 54, 62,102,135,201,202, 71, 71,161, 90,107,240,144,137,
+133,216,177,238, 39,140,124,109, 90, 69, 4, 18, 0,240,225,220, 69,128,128,160, 84,169, 5, 64,158, 58, 42,250, 63,111,176,196,
+ 2,225,177,181, 43, 62,145,199, 23,202,113, 53, 49, 23, 47, 71,249,162, 92, 83,132, 95,127,250,190, 76,111, 54,244, 43,140,217,
+ 87,191,112,187, 64,208,103,212,235,179,227, 2,155,134, 25, 78,197,150,165, 42,181,230, 26,251, 49,116,124,249,211,184,235,127,
+253,216, 95,101, 78,126,203,206, 59,220,194,115,220, 55,229, 5,137, 11,171,127, 75,166,210,133,223,239,168,108, 30,252,104,241,
+134,135,159, 45, 22, 88, 40, 15,202, 3,211, 63, 91, 9,142,183,128,183, 88,192, 91, 40,136,217,162,168, 51, 92, 46,151, 28,141,
+ 40, 91,230, 88,157,185,114,114,114,130,139,139, 11, 92, 92, 92, 80, 97,136,158,181, 89, 48, 56, 56, 24,118,118,118, 56,119,238,
+ 28,108,108,108, 96,107,251,116, 19,228,219,121,132,190,210,190,199,176, 77,221, 7,189, 46, 56,190,231, 87,203,149,211, 7, 94,
+214, 21, 36, 88,109, 2, 44, 22, 11, 49,155,205,232,211,173,117,250,173,196,140,195,159, 47, 92,208,183,109,143, 17,178,151, 66,
+220,161, 51,114,200,206,202,194,165,147,251,244, 77,252, 93,142,116,109,223, 44,221,108, 54,195, 98,177,212, 89,129,235, 13,198,
+ 98,161,216,198,101,212,232, 87,101,215,174, 94,221,100,235, 17,178, 69, 32,228,111, 83,139,176, 57, 64, 95,105,222,188, 25, 76,
+102, 30,229,229,154,146,167,201,119,124,124,252,213,229,203,151, 55, 21,139,197,126,219,183,111, 47, 42, 45, 45,173,215,114, 65,
+ 71,207, 38,174, 16,145,210,251, 82,222, 52, 38,192, 94,211, 43,163,115, 71,140, 30,216, 25, 91,255, 58,143,211,231, 46, 33,189,
+204,238, 86, 25, 39,218,155,153,158, 99, 8,111,160,222, 53,184, 99, 67,225,142,117,165,187,220,187,207,121,133, 82,217,209,194,
+211,243,181,214, 87,222,128, 70,103,134,131,226,225,124, 77, 21,145, 44, 33, 33, 86, 59, 33, 2,164,156,187,116, 35,162, 77,112,
+ 24,110,166,168, 80,160, 52, 64,103,224,192,243, 20, 60, 40, 92,236,165,144, 75, 4,200, 72, 75, 1, 79, 77,169,245,171,103, 80,
+216,111,196, 20,209,195,227,240, 34,177, 88, 4,250,168, 94,180,145, 75,203,220,221,221,173,138, 96,153, 56, 14,195,251,182, 71,
+135,182,205, 49,100,202, 82, 0,192,137,245, 31,195,217, 78,140,157, 59,119, 34,227,252,242,141,129, 47, 77, 59, 26, 27, 19, 55,
+ 34,238,230,197, 87,251,181,182,105,233, 41,202,169,177,105,163,172,172,108, 23, 33, 68, 42,145, 72,250,118,233,210,165,193,174,
+ 93,187,148,174,174,174,188, 84, 34, 41, 28, 60,104, 32, 47,150, 72, 42,203,206,133, 11, 23,196, 83,166, 76,177, 47, 45, 45,205,
+200,207,207,191, 68, 41, 53,215,254, 2, 24, 26, 13, 1,182,128, 16,185,157,141, 34,189, 99,244,104,239,182, 29,218, 59, 14, 29,
+ 62, 18, 50,169, 12,199,142, 30,198, 15,203, 23,111, 47,203,189,251,122,125, 78,229,243, 24, 69,168, 82, 57,106,239,199,223, 46,
+ 77, 45, 48, 58,139,157,130, 33,150,217, 79, 33,142,222,223, 11,101,118,243,221, 90, 12,117,216,185,255, 32, 98, 98, 99,209,192,
+198,140,228,164,251,229,177,183,110,254, 82, 78,196, 11,105, 97,124,185,213, 17,230, 98,203,136,142,227,250, 58, 27, 76, 22,156,
+ 61,249,151,158,231,248,190,151,206, 28, 76,242,109,218, 86, 30,209,182,167,115,209,190, 53,195, 1,108,173, 75, 39,245,202,198,
+127,235,122, 17,216,254,149,156,131, 71,207,216,121, 5, 52, 17, 18, 8,161,215,149,163, 48, 61,134,211,171,242,202,243, 99,246,
+122, 91,147,190,116, 46,251,179,207,190, 94,249, 86,155, 22,225,182,148, 74, 30,139, 88, 85, 24,171, 34,181, 17,174,246, 82, 24,
+180,165, 72,186,115, 78, 95, 40,206,255,164,246,103,157, 89, 81, 92, 92, 34,173,248,221,166,204,169,161,202, 81, 37,171, 52,129,
+ 66,192, 81,229,100,248, 87, 83, 90,137,212, 98, 49, 43,172,185, 61, 29,237,228,136, 73,205,173,236,208, 46, 19, 63,236,123, 37,
+ 21, 11, 43,251, 97, 89,121,159,183, 22, 73,237,144, 93,172, 7, 1, 5,111,225,192,153,141,208,168,213,200,206,201, 67,126, 94,
+ 62, 52, 26, 37, 20,118,206,136,104,217, 14,246,118,182, 72,184,113, 26, 0,177,234,229, 87,207, 75,130,219,182,105, 35,142, 75,
+ 47,131,201,204, 67, 12, 19,206, 31,218,170, 55,155,141,131,242, 99,246,158,172,239,115,152,227,233,241,216,196,244,112, 95, 55,
+ 47,114, 43, 73,133,141,171,127,132,241, 81, 36,211,108,182, 32, 54, 67,139,220,146,114,100,101,166, 83,240,150,227,120,193,169,
+209, 96,113, 28, 39,247, 15,104,132,209, 83,198,226,151, 95, 86,226, 94,114, 6,126,251,249,145,185,186,179,231,130,149,134, 34,
+186, 98,174, 12,109, 94,194, 55,175,255,146,154,181,255,102,137, 64,103,172,125,253, 41,185, 91, 0,162, 94,255,238,136, 78, 83,
+ 34,181, 24,202, 69,127,110,124,125, 75,117,154, 15,125, 27, 49,126, 57,107, 20,236,108, 68, 32,132,160,162, 89,240,231, 69,147,
+161,144, 9, 65, 8,129,206,192, 97,236,140,101,216,184,108, 38, 40,128, 55,222,154, 85, 94, 83, 58,171, 24, 33, 50,177,111,227,
+193, 95,252, 30,191,239,124,154, 75,242,128, 1, 93, 85,173, 91,183, 86,218,216,216,192,198,198, 6, 14, 14, 14,112,118,118,134,
+147,147, 83,157,121,127,244,187, 71, 93,125,174, 4, 2, 1,108,109,109, 97,103,103, 7, 91, 91,219,127, 51,110, 79,106,254,155,
+185,242,108, 58,178, 93,247, 97, 91,122, 12,158, 36, 56,190,231, 55,254,250,233, 63, 71,234, 10, 18,247, 90,123,141, 30, 53,235,
+220, 30, 62,124,120,228,148, 41, 83, 36,159,188, 53,252,200,145,211, 55,238,237, 62,182,107, 80,137, 82,227, 71, 41,133,147,163,
+ 93,230,203,189, 34,255,140,106, 27,146,126,226,196, 9,126,203,150, 45, 6, 66, 72, 76, 93,233, 44, 42, 42, 88,123,226,248,201,
+ 37, 81, 93,187, 97,245,186, 45, 3,226,226,239, 14, 72, 74,186, 15,191,128, 64, 52,106, 28,140,114,226,140,147,103,206, 65, 83,
+146,183,214,154,116, 86, 37, 50, 50,210,167, 69,139, 22,190, 74,165, 82, 63,111,222,188, 16, 74,233,222,136,136,136, 54,173, 91,
+183,206,187,121,243,102, 86, 77,195,254,171,106, 94, 92, 57,180, 16,192,250,134,221, 38,110,207, 54, 41,223, 3,176,216, 63,192,
+ 31,167,207, 93,194,165,243, 87, 86, 22, 41,252, 23,190, 62,118,226,228,134,131,133,111, 12,238,216, 80,232,238,172,192,230,223,
+190, 19,238,191,148,182, 44,173,216,178, 6,192, 34,107,174, 81,229,195, 90, 99, 66,167,102, 13, 96,182, 80,240,244,161,233,178,
+151,139,171,109, 34,172, 78, 83,100,148,189, 62,117,202,148,164,136,230, 45,223, 31, 59,113,170,164,101,160, 31,174, 62, 80, 2,
+132,160,129,167, 45,114,115,115,113,118,231,111, 92,105,118,194, 74,161,144,255,188, 62,231, 51,235,198,214, 38, 21,159,189,188,
+188, 38,223,138,141,197,233,211,167, 81, 97,172,220,220,220,170, 53, 88, 79,106,150,150,106, 46, 44, 90,186,186,211,155,227,134,
+ 96, 96,183,112,156,185,150, 4,227,163,249,150, 42,134,132,167, 92, 90, 37,125,111, 84,160,241,173,225, 77,213, 58,179, 52,237,
+179, 84,213,217,170,147,200, 62,169, 73, 41, 53, 18, 66,246, 39, 38, 38,118,110,209,162, 69,195,131, 7, 15,150,196, 93, 57,242,
+216, 68,119,179,102,205,178,251,229,151, 95, 20,148,210, 11, 6,131, 33,217,170,188, 11,176,249,198,245,235, 46, 38, 51,143,115,
+ 87,110, 55,235,217,169, 37,120, 10, 92,187,118, 13,107,126, 95,163,143,185,115,107,169, 54,223,243,243,154, 38,183,173,233,124,
+ 90,158, 97, 20, 97,133, 38,165,167, 57, 59,143,208,149, 23,206,157,153, 43,243,110,131,208,254,159, 12,206,190,189,127,176,103,
+ 88, 31,184, 6,190,132,156, 59,251,113,225,200,166,131, 60,199,125, 44,231, 5,233,218,194, 4,173,181,247,123, 5, 50, 27,197,
+ 59, 97,173,187, 34, 35, 61, 13,169,247, 99,215,235,138,239,231,216,121,134,174,207,201, 74,159,218, 56,188, 19,206, 31,217,250,
+110, 77, 6,171,174, 50,239, 46,215,172, 60,117,254,226,232,236, 29,251, 61, 52,101, 58, 27,145, 72, 80, 46, 19,145,124, 73,121,
+210, 54,107,211, 73,227,227, 77,238, 65, 47, 13, 31, 51,229,211,191,150,125, 61, 87,236,225, 36, 67, 94,169, 30,106,157, 9,154,
+114, 19, 4,132,160,137,183, 45,116, 90, 53, 46, 29,220, 96,182,232,139, 71,209, 7,143, 71,220,170,106,186,133, 15,249,130, 16,
+ 76,255,244,211, 57, 16, 74, 29,188, 27,247,252,196, 36,104,236, 9,103, 60, 49,153,121, 3,160,113,207, 79, 96,208,228, 15,250,
+244,211, 57, 33,148,210,158,110,225, 67, 52, 21,107, 17,214,148,247, 98,141, 9,175,118,247,131,137,123, 56,127, 24,199, 3, 22,
+254,225, 11, 63,165, 0,173,165,221,190,170, 38, 5, 36,219,254,186,128,156,124, 37,116, 70, 51, 12, 70, 14, 38,179, 5, 2,161,
+ 16, 78,206, 78, 8,110,212, 10, 78, 78,142, 40, 40, 42,194,181, 75,231,113, 57,241, 86, 10, 5,190, 40,106,160,218,100,205, 53,
+ 34, 34,219, 38, 30,238,174, 36, 95,109,132,141, 84,136,203, 55, 78,155, 41,176,214, 26,115, 85,157,166,170, 92,185,236,227, 69,
+223,143,249,229,187,249,158,145,141, 29,144, 85,164, 67, 86,161, 30, 26,253,195,247, 27,206,194,195,168, 83, 33,241,218,161, 60,
+ 14,229,203,254,185, 17, 44,177,216,112,237, 78,162,236,227,133,223,226,238,131, 20,172, 89,249,163,214, 96, 54, 89,109,174,170,
+227,143,183, 26,109,173,223, 55, 30,205, 91,250,121, 90, 29, 47,220, 79, 52, 11, 82, 30, 60,165,248,243, 74, 94,101,179, 32,255,
+168, 71,229,205, 36,101, 93,133, 70,252,237, 59, 45, 63,172, 48, 66, 63,236,201,190, 44,147, 21,241, 25, 25, 25,165,155, 54,109,
+170, 52, 61, 66,161, 16, 21,163, 7,141, 70, 99,157,163,138,156, 29,164,225,227,250, 53, 28, 85,147,185, 18, 10,133,224,121, 30,
+ 14, 14, 14,176,177,177,169,119,211,163,173,123, 72,175,118, 61,134,109,237, 49,228, 13,193,137,189,171,249,235,167,247,191, 92,
+ 86,144,184,167,190,215,168,180,180, 52,142, 16,114,127,233,210,165, 45,215,172, 89,211,120,246,236,217,201,171,191,158,250,195,
+195, 55,184,135,203, 34,222,188,121,147, 78,155, 54,205,160,215,235, 83, 74, 75, 75,111, 88,179,200,117,121,126,226,210, 63,126,
+ 89, 18,146,153,157,251, 90, 96, 68, 59,184, 53,110, 7,207, 38,237, 81,170, 49,225,234,131, 28, 36,223, 61,129,248, 11, 59,183,
+233, 10, 61,190,170, 79,122, 91,182,108,233, 47, 22,139, 7, 1, 8,177,177,177,105, 72, 8,145,138,197,226, 87, 8, 33,247, 9,
+ 33,119, 67, 66, 66, 78,160,134,229,139,170, 35,237,244, 90, 67,195,110, 19,191, 79,215,216,119, 79,206, 43,111,149,174,177,191,
+ 89, 46,115,156, 89,112, 98,133,193,163,247,210,101,212, 84, 20,183, 99,157,122,215,230,223,190, 19,142,157, 60,203, 18,171,114,
+126, 79,100, 35, 61,246,245,107,214,143,230, 22, 16,146, 59,123,246, 7,255,154,166,225, 81,228,234,209,148, 13, 57,214,104, 60,
+ 90, 79,241, 35, 27,239,240,159, 98,223,155,178,168,121,219, 78,227,186,244, 27, 37,224, 36,118, 56,178,103, 21, 77,185,115,114,
+135,136, 90,230,150, 23, 36,165, 60,235, 67,194,104, 52,214,105,174,170,109,186,117, 81,117,251,235,232,233,215, 14, 28, 62,243,
+117,191, 94,157, 93,126,254,236, 21,124,251,235, 94,216,218,200, 64,121, 11, 70,245,240,127,249,238,150, 62,131,252, 60,228, 62,
+187, 78,101,157,157,190, 60,246,163,242,114,211,189,186,214,206,123,100,152,207,217,219,219, 23,118,238,220,185,131, 76, 38, 35,
+ 69, 69, 69, 34,119,119,119,206,209,209,209,152,149,149, 85,110, 48, 24,118, 81, 74,181,245,201,167,201,204, 35, 53, 95,143,125,
+187,119,225,246,149, 19,184,123, 55, 81,115, 55,254,238,143, 68, 68,151,151,229,221,123,170,200, 42, 95,237, 40, 66, 90,239, 81,
+132, 90,161,205, 87, 55, 15,124,219, 45,184,199,187, 29, 93,130, 58,193, 57,224, 97,160, 72,149, 21,139,204,107, 59,246,105,114,
+ 36, 35, 41,141,125,234,177,239,222,190,141,131,169, 80,138,139,167,255, 2,229,249,149, 0, 64,121,126,229,205,243, 7,167,182,
+239,255, 6, 26,184, 55,108, 65, 8, 33,245, 93,143, 17, 0,100, 2,147,234,175,117, 95,237, 72, 77, 77, 69, 66, 66, 2, 30, 60,
+120,128,146,146, 18,108, 78, 61,171,170,143, 78, 65,210,197, 99, 30, 77,187,244, 25,243,250,140, 63,135,141, 24, 38,247,111,212,
+ 68, 16,226,235, 0, 87, 59, 17, 18, 83,178,145, 20,123,159,127,112,231,172,158,234, 10,134, 22, 61,184, 80,163,225,115, 11, 27,
+233, 33, 16,146,143, 79,236,127,184,182, 96,244,144,215, 67, 62,156, 62,187, 67, 3, 23,231,106,159,227, 37,197,165,210, 5, 11,
+230,133, 84,236, 95,215, 90,132, 2,161, 80, 51,121,234, 59,182, 2, 34, 64,197,233,162, 21,109,100,149, 63, 30,126,144,136, 69,
+117,150,209,137,195,162,192,241, 60,180, 58, 51, 52, 58, 35, 84, 26, 3,114,139,148,136,187,251, 0, 87,206, 29, 70,106,210,125,
+ 13,199,113,167, 64,177,187,208, 69,181,237,201,137,117,107, 45,159, 16,250, 55,112,118, 64,154, 82, 15,185, 84,132,156,140, 36,
+206,196,233,159,122,146,245,162, 91,251,115, 61, 34,134,244,158,248,214, 39,135,187,116,137,114,108,222,170,141,194,213,193, 1,
+ 18, 17,144,148, 81,128, 59, 55,174,106,211,239,221, 82, 91,204,186,190, 69,177,251,159,121,149,150,255, 89,131,101,178,112,209,
+179, 62, 89,124,212, 98,177,216,136,132, 66,157,153,242,125,159,197, 92,253, 93, 80,202,103,189,245,238, 7,149, 81, 93, 0, 48,
+ 91,120,155, 55,222,154,173,171,250,134, 64,204, 22, 69, 69,228,170,142,145,122,194, 66,165, 65, 51,231,151,219,235,151,172,143,
+223, 9, 32,254, 89, 71,246, 1, 64,169,218,120,219,165,215,246, 33,154,114,142, 0,184, 91,141,166,182, 71,143, 30,149,102,235,
+ 81,115,157,213, 21,132, 84,174,152,218,125,208,235,130, 19,251,214,240,215, 78,237, 27,249, 52,230,170, 74, 5,102, 2,112,133,
+ 16, 18, 59,119,238,220,182, 30, 30, 30, 30,243,230,205,147,171,213,106,241,207, 63,255,172, 47, 42, 42,202, 83,171,213,151, 40,
+181,190,127,194,163, 74,115,162,141, 71,179, 85,100,231,154,222,206,238, 62,125,156, 92,253,154,150, 22,102, 37,169,139,179, 14,
+ 19, 30,199, 52, 5,137,151,234,155,214, 91,183,110,101, 68, 70, 70,238, 21, 10,133, 55, 0,184, 2,176,167,148,150,112, 28, 87,
+ 42, 22,139,243, 18, 19, 19,235,189, 32,107,218,233,181,134, 46,111,253,190,165,164,156,151, 24, 5,146, 45,105,167,215, 26, 0,
+ 32,255,232,236,114, 0,251, 60,186,127, 60,124,255,165,180, 31,226, 74, 29,223, 45, 56,245,213,254,250,234,103,223,220,214,228,
+121,149,127, 93, 78, 92, 22,128,215,108, 61, 66,190,139,185,121,105, 62,161, 16, 91,192,125, 81,158,127,255,250,243,208, 23,139,
+197,250, 54,109,218, 84, 59, 90, 80, 38,147,213, 58,191,214,163, 7,253, 26,210,173,219,186,195, 39,206,189,118,232,216,249,175,
+ 59,116,236,236, 34,247,245, 65,128,179, 9,235, 62,104,253,238,137,155,133, 87, 7,127,112,246,151,228, 28,253, 29, 74,169,190,
+ 62,105,211,104, 52,247, 8, 33,165,101,101,101, 67, 40,165,153,132, 16,191,210,210,210, 91,102,179, 57,166,222, 70,128,199,171,
+ 29, 59,182,219, 76, 8, 17, 81,142,255,230,146, 88,184, 69,159,123, 55,235,105, 12,197, 99,209,213, 70, 14,152, 60,117, 90,112,
+ 80,147,166,193, 21,107, 17,134, 55,180,199,216,137,111, 6, 55,108, 28, 28,252,175,245, 9,107,127,161,162, 57, 55,116,196, 35,
+178, 87,226,209,165,159,185, 36, 93,120,203,166,129,175,157,182, 40,173,164, 52,237,250,210,242, 2,143,165, 79,174,208, 80, 95,
+ 82, 31,196, 45, 95,179,244,163,217,185,217, 41,107,180, 5,247, 98, 1, 64, 91,112, 47, 86,225,209,244,179,162,188,172,217,197,
+ 5,201, 75,159,246, 92,104,181,218,156, 77,155, 54, 57,117,234,212, 73,224,225,225,129,194,194, 66,156, 58,117,138,231,121, 62,
+187,190, 90,249,247,206,158, 34, 65, 65, 13,182,172, 83,125, 35,178,177,239,207, 89,224, 77, 41, 32, 18, 32,215,100, 80, 29, 46,
+116,210,125, 64,239, 92,170,189, 92,242, 22, 66, 5, 84, 80,177,182, 32,207,243,228,219,159, 54,164, 9,197,210,106,155, 84, 45,
+102,163,130,231,121,171,215, 34,204, 23,166,187, 68,152, 67,173, 26,197, 23, 75, 18,234,120, 57,165, 71, 94,234, 55,190, 15,199,
+ 89,204, 0,244, 85,182, 2, 74,201, 73, 16,203,209,162, 6,154, 75,245, 49, 85,143,213,243, 38,147, 19,132, 18,216,219,152, 65,
+ 64,160, 86, 41,101,110, 22,233,221,103, 41, 75,249,177,251,226, 72,183,110, 1,198,227, 39, 39,156, 57,119,113, 36,229, 45,141,
+ 44, 20, 0, 37,169, 70,147,126, 71,129, 67,209,250,167, 77,239,255, 26,132,254,141,243, 81, 88,219, 92,242,223,166, 73, 8,145,
+ 60,170,172, 45, 85,151,191,121, 30,233,172,109,109,193,103,201,187,189, 87,179,206, 50,185,226,131,242,114,205,154,242,252,123,
+127, 62,207,243, 73, 8,113,148,201,100,173,236,236,236,196, 69, 69, 69, 87, 40,165,170, 23,241,186, 87, 37,234,245,157,174, 61,
+123,133,207, 56,122, 54,113,197,163,230,195, 74,124, 71, 46,151,143,235,223,125,214,250,221,251,254,109, 20,225,139,144,247,191,
+ 75,147,116,235, 38,114, 47,117,120,205, 98,225,191,232, 17,172, 41,207, 75, 73,156,118, 46,166,240, 10,165, 84,243, 44,233,148,
+ 74,165, 99, 77, 38,147,141, 68, 34,209, 25,141,198, 77,255, 45,121,119,143, 24,250, 57, 8,154, 89, 45, 66,113,183, 32,118,239,
+188, 58,159, 33, 97, 97, 18, 69, 33,156,203,139, 92,139,235,107,172,254, 35,215,157, 16, 97,100,100,100,148, 68, 34,241,183, 88,
+ 44, 10,163,209, 88,174,211,233, 82,211,210,210, 46,214,180, 32,249,223,157, 78,143,200,161,203,197, 98,241,123, 0, 96, 54,155,
+191,207,143,217, 59,163,182,239,214,180,255,255, 75,125, 52,114,164,144,238,216, 97,249, 59,174,145, 79,171,151,149,102, 51,231,
+ 88,241,187, 68, 44, 82,101,221,220,233,244,159, 42, 75, 47, 28,244,209,242, 8,127,199, 6, 32,154,105, 50, 77,166,201, 52,171,
+217, 87,192,206, 39,211,252, 79,106,122, 53, 27,232,231,213,108,160,159,181,223,175,110,127,118, 62, 41,216, 86,243, 38, 98, 22,
+147,193, 96,252, 7, 94,236,120,118, 22, 24,255, 73,114,226,255,204,252, 59,247,103, 48, 8,128,232, 26, 30,128, 86,135,254, 8,
+ 33,209, 79,241,128, 61,206, 52,153, 38,211,100,154, 76,147,105, 50,205,127,150,102, 93,218, 47, 76,211, 35,107, 34,100,154, 76,
+147,105, 50, 77,166,201, 52,153, 38,107, 34,124,190,155, 0, 12, 6,131,193, 96, 48, 24,140,231, 10, 51, 88, 12, 6,131,193, 96,
+ 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6,227,233,
+249, 91,103,114,103, 48, 24, 12, 6,131,193,248, 39,194, 34, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96,
+ 48,131,197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6,131, 25, 44, 6,131,193, 96, 48, 24, 12,102,176, 24,
+ 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96,252,231, 13, 22, 33, 36,154,105, 50, 77,166,201, 52,153, 38,211,
+100,154, 76,147, 25, 44, 6,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96,
+ 48,131,197, 96, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,227, 63, 4, 1, 80,237, 72, 0, 74,233,113,171, 69,
+158, 98, 52, 65, 93,250, 76,147,105, 50, 77,166,201, 52,153, 38,211,124,241, 52,235,210,174,143,255,248,175,134, 82,250,183,109,
+ 0,162,153, 38,211,100,154, 76,147,105, 50, 77,166,201, 52,255,105, 27,107, 34,100, 48, 24, 12, 6,131,193,120,206, 48,131,197,
+ 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,
+193, 96, 48,158, 30,242,104, 52, 0,131,193, 96, 48, 24, 12, 6,227, 57,193, 34, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24,
+ 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6,131, 25, 44, 6,131,193, 96, 48,
+ 24, 12,102,176, 24, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96,252,231, 13, 22, 33, 36,154,105, 50, 77,166,
+201, 52,153, 38,211,100,154, 76,147, 25, 44, 6,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,204, 96, 49, 24,
+ 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,227, 63, 4, 1, 80,237, 72, 0,
+ 74,233,113,171, 69,158, 98, 52, 65, 93,250, 76,147,105, 50, 77,166,201, 52,153, 38,211,124,241, 52,235,210,174,143,255,248,175,
+134, 82,250,183,109, 0,162,153, 38,211,100,154, 76,147,105, 50, 77,166,201, 52,255,105, 27,107, 34,100, 48, 24, 12, 6,131,193,
+120,206, 48,131,197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48, 24,204, 96,
+ 49, 24, 12, 6,131,193, 96, 48,158, 30,242,104, 52, 0,131,193, 96, 48, 24, 12, 6,227, 57,193, 34, 88, 12, 6,131,193, 96, 48,
+ 24,204, 96, 49, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6,131, 25, 44,
+ 6,131,193, 96, 48, 24, 12,102,176, 24, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96,252,231, 13, 22, 33, 36,
+154,105, 50, 77,166,201, 52,153, 38,211,100,154, 76,147, 25, 44, 6,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193, 96, 48,
+ 24,204, 96, 49, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24, 12, 6,227, 63, 4,
+ 1, 80,237, 72, 0, 74,233,113,171, 69,158, 98, 52, 65, 93,250, 76,147,105, 50, 77,166,201, 52,153, 38,211,124,241, 52,235,210,
+174,143,255,248,175,134, 82,250,183,109, 0,162,153, 38,211,100,154, 76,147,105, 50, 77,166,201, 52,255,105, 27,107, 34,100, 48,
+ 24, 12, 6,131,193,120,206, 48,131,197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24, 12, 6, 51, 88, 12, 6,131,193,
+ 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 48,158, 30,242,104, 52, 0,131,193, 96, 48, 24, 12, 6,227, 57,193, 34, 88, 12,
+ 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 12, 22,131,193, 96, 48, 24,
+ 12, 6,131, 25, 44, 6,131,193, 96, 48, 24, 12,102,176, 24, 12, 6,131,193, 96, 48,152,193, 98, 48, 24, 12, 6,131,193, 96,252,
+231, 13, 22, 33, 36,154,105, 50, 77,166,201, 52,153, 38,211,100,154, 76,147, 25, 44, 6,131,193, 96, 48, 24, 12, 6, 51, 88, 12,
+ 6,131,193, 96, 48, 24,204, 96, 49, 24, 12, 6,131,193, 96, 48,131,197, 96, 48, 24, 12, 6,131,193, 96, 6,139,193, 96, 48, 24,
+ 12, 6,227, 63, 4, 1, 80,237, 72, 0, 74,233,113,171, 69,158, 98, 52, 65, 93,250, 76,147,105, 50, 77,166,201, 52,153, 38,211,
+124,241, 52,235,210,174,143,255,248,175,134, 82,250,183,109, 0,162,153, 38,211,100,154, 76,147,105, 50, 77,166,201, 52,255,105,
+ 27,107, 34,100, 48, 24, 12, 6,131,193,120,206,136,170,251,163,184,253,151,249, 28,199,185, 3,128, 72, 36, 42, 48, 95,253,212,
+171, 54, 17, 63, 47,175,158, 22, 96, 53, 0, 8,129, 55, 51,115,114,142, 85,163,121,140,227, 56,231, 71,154,165,230,171,159,246,
+169, 77, 83,220,238,139, 35,143,237,127,101,110,175,106,226,139, 66,113,187, 47,114,158, 72,171,119, 61,194,119,150,255,143,116,
+254,175,104,254,147,145,116,248, 50,223,108,126, 88,142,196, 98, 81,129,233, 74,237,229, 72,210,254,139,156,199,246,191, 60,215,
+163, 54, 77,133,141,172, 56,200,199,109, 89,109,154,201, 57, 69, 51,181,229,122,151,218, 52,255,103,238, 77, 43,241,244,244,108,
+ 35, 16, 8, 62, 37,132, 56, 84,249,243,157,236,236,236,247, 89,169,100, 48, 24, 47,156,193,226, 56,206,253,198,158,249,208, 26,
+128,158,227,191,112, 15, 28,250,235,230,127,219, 71, 95, 42,213,221,223, 27, 41,133,214,217, 70,204, 57,220,191,127,159, 0,128,
+183,183,247,106, 0,254,213,104, 58,223,216, 51, 31,229, 70,160,203,232,133,206,157,253,252, 28,242,132,194, 89, 50, 27,155,238,
+122,189, 62, 28, 0,228,114,121,156, 65,167, 59,229,105,177,124,247,228,254, 53,101,160,106, 90,123,140,251,194, 61,116,232,175,
+239, 90,120, 94,170, 75,222,209,133,215,164,139, 36, 22,227,207,175,229,230, 30,154, 15, 88,172, 57, 33, 85,143,219,117,212, 39,
+ 46,254, 94, 94, 61,164,114,121, 11,123, 7,135, 40,158,210,102, 60,207, 19, 11,199,197,107,203,202,206,241, 28,119,219, 98, 46,
+119,185,177,247, 43,190,182,116, 62,153,151,145,128,232,178,167,231,203, 10, 91,219,238, 2,145,232, 37, 0,224, 57,238, 98,185,
+ 86,123,170, 67, 94,222, 78,107,242,110,237,249,121,218,253,255,105,152,205,156,123,202,145,249, 48,152,129, 86, 35,190,118,111,
+254,234,250,205, 0, 96, 44,184,237, 81,118,127,127,123, 0,176, 13, 26,120, 69,230,217, 42, 31, 0, 68,233,185,238,247, 14,204,
+133,193, 12, 52, 27,184,208,189, 46,205,137,243,182,187,124, 56,121,184, 12, 0,142,238,250,169,233,201,221, 43,251, 1, 64,143,
+225,211, 14,245, 30, 49,253, 30, 0,124,243,219,110,151,173, 95,191, 82,171,166,117,247,166, 74,162,186,127,160,137, 81,157,235,
+228,103, 43,242,188,127,255,190,160, 62,247,166, 47,224,152, 11,188, 45, 16, 10,163,130,154, 52,105, 5,128, 38, 39, 37,221,180,
+112,220,121, 47,224,231,231, 89,150,132, 66,225,187,217,217,217,131,170,254,205,199,199,135, 21, 72, 6,131,241, 98, 26, 44, 0,
+208, 26,128, 51, 15,128,174, 29,154, 99,242,171,253,237,170,254,111,247,239,139,252,179, 98,143,133,126,181,246, 27, 65,120,120,
+ 56,146,147,147,173, 58, 88,185, 17, 56,125, 31,144,233, 83,237, 11,164,210,164,121,159,126,234, 16, 21, 21, 37,242,242,122,248,
+ 18, 94, 80, 80,208,225,252,249,243,109, 22, 44, 88, 48, 85,166, 79, 45, 45, 55, 66,115,250,126,221,186, 21,105, 13,111,218, 16,
+159, 78,127,197, 17, 0,150,207,222,217,230,224,197,219, 13, 82, 83, 83,123,126,245,213, 87,197, 62,151, 46,173,108, 96,177,172,
+141, 41, 40,200,180, 38,157,219,142,220,146, 7, 25,143, 5,190, 60,113,226,174,128,128, 0, 59,111,111,111,162, 80, 40, 32, 20,
+ 10,161, 86,171,253, 19, 19, 19,251,221,190,125, 91,123,238,242, 62,105,204,237, 17,201, 89,194,150,122,107,242, 46,225,138,228,
+177,193,193,113, 47,247,235,231, 59,112,224, 64,121,163, 70,141, 0, 0,169,169,169,193,127,253,245,215,232,131, 7, 15,206,147,
+112, 69, 92,185, 17,250,186,242, 94,161, 9, 0,114,224, 37, 39,119,247,177, 66,177, 56,156,227, 56,159, 71,209,133,108,139,217,
+ 28,167, 44, 40,216,244,228,254,140,127,199, 96, 6,238,230, 2,209, 81,173, 48,110,120,180, 45, 0,124, 52,234,203, 14,233,169,
+ 15, 36, 70,163, 17, 77, 67,154,117, 90,244,245,178, 35, 16, 8,176,113,247,241,202,253,173,209,188,115, 55, 5,243, 23, 45, 71,
+ 78,204,206, 14, 22,213,131,238, 26,181, 74, 8, 0, 14,142,142,195,119,110,219,114,202, 59,242,229,203, 15,138, 76, 86,105,214,
+118,111, 30,222,246,163, 87, 86,236,169,176, 95,142,254, 33,246,247,247, 71, 76, 76, 76,189,238, 77,168, 18,237,121, 47,175,248,
+239, 62,248,192,179, 75,151, 46,176,179,179,131, 72, 36, 2,199,113,209,231,207,159,143,158, 63,127,254, 52,168, 18,181,214,222,
+155, 86,240,157,183,183,119,247, 33, 35,198,122,117,239, 51, 16,195,251,118, 98, 5,145,193, 96,188,184, 6, 75, 36, 18, 21,244,
+154,240,149,123, 84,251, 8, 92,187,125, 79,149,150,145, 91, 86,241, 63,229,221,221, 77, 71, 71, 7,133,173, 58,248, 23, 12, 6,
+ 3, 46, 92,184,128,219,183,111, 35, 53, 53, 21,115,231,206, 53, 8,129, 55,107,208, 44,237, 50,122,161,179,204,144,105,215,218,
+ 37,179,209,214,205,167,132, 58,157, 14,167, 79,159, 70,105,105, 41,164, 82, 41,124,125,125,209,185,115,103,209,233,211,167, 27,
+140, 26, 51,214,177,247,208, 73, 41, 6,153, 95,153, 72, 36, 42,173, 49, 3, 34, 81, 65,207,241, 95,184,135, 5, 55, 68, 82, 90,
+142,234,211,175,127, 47,227,121, 42, 42, 79,207, 50,157, 57,115, 6,173, 90,181,194,182,109,219, 92, 74, 75, 75, 63, 91,183,110,
+221,167, 94, 63,174,253, 62, 55, 43,113,118, 45,122,165, 93, 70, 47,116,110,106, 57, 25,176,115,203, 31,146,219,183,111, 75, 86,
+173, 90,133,226,226, 98, 72,165, 82, 56, 57, 57,193,211,211, 19, 77,155, 54, 37,111,191,253,182, 93,247,238,137,248,108,230,164,
+128, 92,167, 33,137, 53,165,179, 66, 83, 98,204, 85, 4, 11,175, 7,173, 94,191, 94,208,174, 93, 59, 82,117, 31,127,127,127,116,
+235,214, 77, 62,108,216,176,160,105,111,191,195, 71, 15,155,146,100,146,122,149,215,165, 9,109,166,141, 75,249, 37,239,232,209,
+163,247, 47, 92,184,208,201,211,211, 19,182,182,182, 0, 0,149, 74,229,155,150,150,214, 97,222,188,121, 35,174,220,217, 38,234,
+ 50, 48, 51, 7,182,126,186,218,206,231, 63, 21,177, 88, 84, 80, 17, 53,178,183,181, 41,205,204,202,215, 2,128,209,104,132,209,
+104,132,193, 96,192, 91,211,166, 8,223, 28,209,174, 73, 64,212,187,183, 82,179,243, 75,154, 29,191,220,160,226,187,117,105,138,
+202, 83,149,202,140, 19,111,206,255,224, 3, 79, 15,143,127,181,252,109,220,176, 65, 88, 82, 82, 18, 61,127,254,252, 48,170,232,
+166,108, 54,112,161, 83,109,154,181,222,155,247,254,106,180,104,122,159, 22,191,126,125, 0, 22,139, 5,151, 46, 93,194,217,179,
+103,177,108,217, 50,122,232,208, 33,149,131,173,109,173,247, 38, 84,137,246,157,189,242, 2,151, 44,217, 69,100, 50, 25,246,237,
+219,135,132,132, 4, 8, 4, 2, 52,111,222, 28,227,198,141, 67,116,116,180,231,228,201, 83,104,151,190,163,146,225, 24,162,121,
+150,178, 68, 8, 17,120,121,121,189,251,214,251,159,120, 13, 31,253, 26,126,252,246,115,102,176, 24, 12,198,139, 67,181,189,223,
+ 1, 65,227,161,191,110,221,113,157,255,171,241,208, 95,183, 82, 64, 64, 1,129, 3,208, 48, 42, 42,202,172, 84, 42,233,213,171,
+ 87,233, 91,111,189,165,253,254,251,239, 79,253,245,215, 95, 59, 57,147,105, 77,171, 22, 45,150, 82, 64, 80,147,102,115, 71, 71,
+199,192,192,192,194,204,204, 76,122,240,224, 65,186, 96,193, 2,186,105,211, 38,122,232,208, 33,122,252,248,113,122,232,208, 33,
+186,117,235, 86,122,231,206, 29,250,224,193, 3, 26, 20, 20, 84,216,220,209,209,177, 22, 77, 33, 5,132, 77,135,174,154,189,235,
+154,121, 97,200,208, 95,103, 80, 64,216,204,195, 35,180, 87,175, 94,150,157, 59,119,210,141, 27, 55,210,245,235,215,211, 59,119,
+238,208,162,162, 34,234, 19, 16, 88, 88,241,189,154,210, 73, 1, 65,171, 86,173, 10,149, 74, 37,245,243,243,163, 82,169,148,122,
+120,120,208,166, 77,155,210, 14, 29, 58,208,126,253,250,209, 87, 95,125,149,126,246,217,103, 84,169, 84,210,128,128,128,252,138,
+239,213,164, 57,208,203,203, 38, 40, 40, 40, 35, 38, 38,134,214,132, 78,167,163, 69, 69, 69,244,228,201,147, 52, 40, 40, 40, 99,
+160,151,151, 77,109,154, 54, 64,235,200,200,200,194,162,162, 34,106, 50,153,104, 70, 70, 6,141,141,141,165, 9, 9, 9, 52, 35,
+ 35,131,234,116,186, 74,237,123,247,238,209,192,192,192, 66, 27,160,117,141,154,255,228,173,162, 76, 60,177,249,123,120,244,243,
+244,244,212,237,218,181,139,102,103,103,211,117,235,214, 81, 1,240,229,191,237, 91,139,166, 20,232,221,185,115,103,203,165, 75,
+151,232,173, 91,183,232,199, 31,127, 76,251,244,233, 67,251,246,237, 75,231,207,159, 79,179,178,178,104, 86, 86, 22,237,215,175,
+159, 69, 10,244,174,171,124, 86,119,111, 58, 2,254, 3, 7, 14,212,153, 76, 38,154,156,156, 76,195,195,195,179,132,192, 88, 91,
+ 32,172, 43, 32,171,171,124,250, 0,206, 94, 94, 94,185,151, 46, 93,162,187,119,239,166, 1, 1, 1,133, 66, 96,162, 3,208,216,
+ 1,104, 44, 4, 38, 54,110,220,184,240,210,165, 75,180,184,184,152,250,251,251,231,250, 0,206, 79, 91,150, 0, 8,188,188,188,
+254,248,226,155,159,104, 98,150,150,126,241,205, 79,212,203,203, 43,131, 82, 74,189,188,188,142,177, 50,201, 54,182,177,237,127,
+125, 19,213,203,140,217,218,126,181,104,209, 34,145, 94,175,199,239,191,255,174, 25, 51,106,212,110, 39, 39, 39, 78, 44, 22,131,
+ 8,234, 30,144,168,113,116,124,111,238,156, 57, 78, 6,131, 1,215,175, 95, 71,155, 54,109, 32,147,201, 32,145, 72, 32, 22,139,
+ 33, 22,139,225,229,229,133,130,130, 2,132,135,135, 99,234,212,169,142, 63,255,248,227,123, 80,169, 22,213,166,203,243, 84, 4,
+ 0, 22,158,151, 54,244,246,158, 28, 26, 25,185,116,218,180,105, 2, 91, 91, 91,232,245,122, 24, 12, 6, 36, 36, 36,192,197,197,
+ 5, 10, 27, 27,171,242, 44, 16, 8, 4,118,118,118, 56,121,242, 36,126,251,237, 55,164,166,166, 34, 55, 55, 23,246,246,246, 8,
+ 15, 15, 71,179,102,205,208,181,107, 87, 36, 39, 39,131, 16, 66,234,210,139, 23,139,223, 30, 55,122,180,123, 68, 68, 68,181,255,
+215,235,245, 80, 42,149, 80,169, 84,240,240,240, 64,191,126,253,220,255,220,183,239,109, 0,223, 85,183,191, 11,224,233, 27, 28,
+188,255,234,213,171,174,148, 82,108,220,184, 17,101,101,101, 48, 26,141, 16, 8, 4,144,203,229,112,118,118, 70,143, 30, 61,224,
+230,230,134,224,224, 96,108,223,190,221,181, 95,191,126, 7, 92, 10, 10, 90, 23, 3, 57,236,245,162,110,210,243,243,143,246, 6,
+ 92,199,190,250,234,161,219,119,238, 68,141, 29, 59, 22,249,249,249,159,136, 63,254, 88,105, 6,150,215,245,253, 16,192,177,129,
+151,215,218, 37, 75,150, 8,242,242,242, 48,107,214,172,162,156,244,244,143, 29,129,115, 0,112,226,240,225,168, 77,155, 54, 45,
+222,184,113,163,235,134, 13, 27, 4,173, 90,181, 90, 27,146,145, 17,158, 8,168,234,147, 78, 13,240,238,138, 21, 43,228,122,189,
+ 30,189,122,245, 74,150,167,166,182,224, 0,157,181,223,207, 5,222, 94,246,225,135,158, 50,153, 12,179,102,205, 42, 42, 79, 79,
+143,224,128,194, 42,187,164,185,165,164, 28, 30, 63,126,124,236,157, 59,119, 92,151, 47, 95,238, 57, 98,216,176,183, 1,124,105,
+237, 49,170,118,104,247,242,242, 10, 30, 50, 98,172, 71,211,176, 72,236,222,186, 14,191,172,248,106,173,197, 98,249,213,199,199,
+103,186, 64, 32,248,150,149, 60, 6,131,241, 66, 54, 17,214,132,139,155, 91,155,208,208, 80,156, 57,115, 6,145,145,145, 87,157,
+156,156, 56,137, 76, 6,177, 88, 12,202,243,117,126,223,198,214,182,103,151, 46, 93, 68, 23, 47, 94, 68, 96, 96, 32,108,108,108,
+ 42,141, 85,197, 38,145, 72,224,229,229, 5,181, 90,141,168,168, 40,241,218,181,107,123, 2, 88, 84,151,118, 78, 90,162, 29, 82,
+214,190,186,248,187,165,141,219,181,107, 7,149, 74, 13,158,231,161, 80, 40, 96, 52, 26, 33, 18,137, 96, 52, 26,161, 55, 82,181,
+ 53,121,181, 88, 44, 22,161, 80,136,192,192, 64,124,245,213, 87,208,235,245,144, 72, 36, 0, 0,181, 90, 13,165, 82,137,216,216,
+ 88,164,165,165,129, 62,122, 37,175, 13, 91, 59,187,254,131, 7, 15,150, 86,247, 63,131,193, 0,149, 74, 5,149, 74, 5,165, 82,
+ 9,189, 94,143,230,205,155, 75, 79,157, 60,217,191, 38,131,101,144,203, 71,108,216,176,193, 93, 42,149, 66,167,211, 65,163,209,
+ 32, 51, 51, 19,233,233,233,250,130,130, 2,206,222,222, 94, 16, 16, 16, 32,144,201,100,178,161, 67,135, 18,181, 90, 13, 66, 8,
+ 6, 14, 28,232,178,121,227,198, 87, 0, 44, 99,197,223, 58,142, 2,134,214, 70,227,160,246,237,218,157,188,122,237, 90,171,247,
+222,123, 15,119,238,220, 89,162,216,182,237, 76, 57,112,187,182,239, 38, 3,111, 47,173, 98, 92,104,122,122,164,233, 9,227, 18,
+240,208,184,196, 84, 24,151,145,245, 52, 46, 0, 96,239,232,216,214,203,203, 11,135, 14, 29, 66, 70,106,234, 71,245, 49, 87, 0,
+ 32, 16, 10, 59,119,233,210, 5,251,246,237, 67, 86,122,250, 71, 79,152, 43, 0, 64, 33, 80, 40, 74, 78,254,104,237,218,181,127,
+188,254,250,235, 16,138, 68,157,193,113, 86, 31,163,186, 14,237,111,191,247, 17,246,237,218,180, 54, 55, 55,247, 13, 74, 41, 15,
+224, 42, 43,113, 12, 6,227, 69,160, 94,243, 96,121,122,122,250,216,218,218, 34, 39, 39, 7,205, 66, 67, 11,100, 50, 25,164, 98,
+ 49,228, 82,169, 85,223,215,235,245,145,158,158,158, 80,169, 84,112,117,117,133, 68, 34,169,220,164, 82,105,229,103,123,123,123,
+ 8, 4, 2,248,248,248, 64,175,215, 71,214,165,203, 41,239,187, 31, 94,247,241, 91,127,238,218,208,184, 95,191,254,112,118,110,
+ 0, 63, 63, 95,184,187,187,195,198,198, 6,126,126,126,104,210,164, 9, 93,189,122, 53, 4, 14, 77,172,122,128, 87, 53, 77, 34,
+145, 8, 22,139, 5,249,249,249, 72, 76, 76,196,157, 59,119,112,233,210, 37,220,186,117, 11, 26,141, 6, 86,248, 43,104,203,203,
+ 91, 84, 23,232, 50, 24, 12, 80, 42,149,149,209, 43,165, 82,137,194,194, 66, 36, 39, 39, 67,173,209,180,172, 73,207,217,197,101,
+120, 68, 68,132, 16, 0,108,108,108,208,178,101, 75,252,250,235,175,220,159,123,247,142, 10,187,116,169,129,223,145, 35, 78,171,
+ 87,173, 26,245,242,203, 47, 91, 46, 95,190, 12,181, 90,141,187,119,239,194,205,205, 77, 36,149,203, 95, 97, 69,191,126,220, 0,
+180,174, 26, 77,223,151, 94,122, 41, 69,165, 82,225,219,111,191, 21,136,237,237,127, 91, 8, 8,235,112, 21,157,186,116,233,130,
+253,251,247, 35, 39, 61,253,227,244,106,140, 75, 58, 80,152,145,156,252,241,218,181,107,209,187,119,111, 16,145,168,222, 29,145,
+ 58,116,232, 16,193,243, 60, 98, 98, 98,224, 4, 92,169,239,247,131,154, 52,105,101,103,103,135,132,132, 4,216, 62,138,174, 85,
+251,162, 0,156,187,121,243, 38,108,108,108,208, 44, 44,172,117, 61, 15,243,157,183,183,119,238,219,239,125,132,221,135, 47, 0,
+ 0,246,237,218,148, 95,197, 92, 49, 24, 12,198, 63,211, 96, 85, 32, 22,139, 33,149,201, 32,149, 74, 31, 26, 35,153,204,234,239,
+ 18, 66, 32,151,203, 43, 13, 85, 85, 99, 85,245,179, 66,161,176,202,184, 0,128, 57,239, 66,212, 43, 35, 95,150, 74, 36, 18, 24,
+141, 6, 80, 74, 33,147,201,225,228,228,132,192,192, 64,148,151,107, 49,120,200,112, 67,166, 82,114, 64,226,219,243,206,211,228,
+153,227, 56,104,181, 90,148,150,150,162,164,164, 4,106,181, 26, 58,157, 14, 86,180, 14, 86, 86,181, 25, 25, 25,216,178,101, 11,
+138,139,139, 1, 60,236, 64, 93, 97,170, 42,126,166,164,164, 96,227,198,141, 72, 77, 77,133, 80, 40,180,250,250, 68, 69, 69,225,
+192,129, 3,194,110, 61,123,174, 57, 22, 16,144,115, 44, 32, 32,167, 91,207,158,107,246,239,223, 47,244,241,241, 65, 90, 90, 26,
+174, 95,191,142,210,210, 82, 80, 74, 9, 43,250,245, 39, 9, 40, 45, 47, 41,121,253,147, 79, 62,161,118,118,118,248,118,233,210,
+ 22, 95, 2, 99,172, 53, 46,142,181, 24, 23,199,103, 51, 46,160,148,130,231,121, 88, 44,150,167,202, 27, 33,132,136,197,226,250,
+148,103,224,225, 82, 91,214,234, 11, 40,165,239,190,245,254, 39, 94,239,124, 48, 15,167,142, 28,168,248,251,125,102,174, 24, 12,
+198,139, 72,189,154, 8,115,114,114,178,181, 90,109,227,128,128, 0,100,101,101,185,251,251,251,167, 75,197, 98, 72,164, 82,171,
+250, 96,201,229,242,152,252,252,252, 78, 62, 62, 62,224, 56,174,210, 76, 61,217, 68, 88, 17,149,185,123,247, 46,228,114,121,157,
+227,204, 5,150,178,134,225,225,225,149,145, 32, 39, 39, 39, 56, 57, 57, 66, 38,147, 99,241,226,197,252,154,223,126,251, 89, 30,
+254,182,234,253, 73, 31,210, 27, 95,174,121,174, 39,208,218, 10, 73,161, 80,196, 52,106,212,168,163, 66,161,192,238,221,187,145,
+150,150,134,210,210, 82,148,151,151,195, 96, 48,160,188,188, 28, 70,163, 17,114,185, 28, 97, 97, 97,104,208,160, 1,226,226,226,
+106,204,123,105,113,241,238,152,152,152,142,237,218,181,171,140,160,116,239,222,157,116,239,222,221,181,226,247,242,242,114, 20,
+ 21, 21,225,234,213,171, 56,126,252, 56, 8, 33,184,127,255,190,197,160,211,109,101, 69,255,233,208, 3, 23,133,107,215,254, 49,
+117,234,212, 73,157, 58,117,130, 5,232, 7, 96,227,127,202,184, 84,112,233,210,165, 88,139,197,210,169,105,211,166, 80, 2,237,
+ 1,236,171,151,121,124,240,224, 38,199,113, 61, 91,180,104,129,221, 59,118, 68, 1, 72,171,110, 63, 45, 16,213,170, 85, 43,232,
+116, 58,220,141,143,191, 97,173,185,242,242,242, 90,243,214,251,159, 76, 28, 62,250, 53,236,222,186, 14,251,118,109,202,252,249,
+251, 37,126,148, 82, 19, 43, 85, 12, 6,227, 31,111,176, 74,139,139,111,196,198,198, 54,110,221,186, 53,214,172, 89,211,238,165,
+142, 29,179, 37, 82, 41, 39,149, 72, 32,176,162, 2,209,105,181, 39,206,159, 63,223,190,119,239,222,162,203,151, 47,195,211,211,
+179,210, 96, 85,252, 20,137, 68,160,148, 66,161, 80,224,208,161, 67, 38,157, 86,123,162, 46, 93, 11,103,177, 8, 30, 25, 60, 74,
+ 41,148, 74, 37, 36, 18, 9, 86,175, 94,131,117,191,253,246,106, 86,110,238,206,224, 54,206, 31, 0,144,255,199, 42,230,242,242,
+147, 39, 78,156,104, 51,115,230, 76,177,175,175, 47,148, 74, 37, 74, 75, 75, 81, 92, 92, 12,181, 90, 13,181, 90,141,210,210, 82,
+ 40,149, 74,200,229,114, 60,120,240,192,172, 47, 47, 63, 89,147,158, 76,175,223, 53, 97,194,132, 15,111,222,188,233, 37, 18,137,
+ 96, 54,155,193,243, 60,120,158,135,201,100,194,131, 7, 15, 16, 23, 23,135,132,132, 4,148,148,148, 64, 44, 22, 67, 40, 20,226,
+214,173, 91,165,182,102,243, 14, 86,244,159, 30, 49,176,251,252,249,243,147,198,141, 27, 7,111, 95,223,174,200,202,178,202,184,
+236,173,197,184,168,158,194,184, 60,102,124, 52,154,107, 41, 41, 41,157,186,117,235, 6, 47, 95,223, 37, 97, 89, 89,199,226,235,
+209, 15,203,194,113,231,206,159, 63,223,115,252,248,241, 88,179,102,205, 18,183,148,148,195,133, 79, 52,103,186, 1,110,141,130,
+130,150, 76,156, 56, 17, 71,143, 30,133,133,227,106,140,200, 61,209,161,189,225,144, 17, 99,253, 88,135,118, 6,131,241, 79,162,
+ 94, 77,132, 68,171,157, 51,119,238, 92,179, 80, 40,196,240,225,195,237,247,237,223,255,242,173,219,183, 3, 11, 10, 10,156, 44,
+ 22, 75,157, 90,246, 42,213,247,139, 22, 45, 82,154,205,102,132,132,132,160,164,164, 4, 22,139, 5, 34,145, 8, 34,145, 8,132,
+ 16, 8, 4, 2,216,217,217, 33, 46, 46, 14,219,182,109, 83,219,171, 84,223,215,165,203,243,124,204,158, 61,123, 32, 18,137,168,
+ 92, 46, 7, 33, 4, 34,145, 8,171, 87,175, 46,152,147,155,187, 27, 0,132, 2,129, 17, 0, 4, 2, 98, 85,175, 92, 66, 72,157,
+237,147, 82,169, 20,252,195,206,253,117,238,235,102, 54,175, 88,181,106,149,230,254,253,251,208,106,181,149,209,182,178,178,178,
+202, 78,243, 74,165, 18,132, 16,232,245,122,156, 61,123, 86,227,102, 54,175,168, 73,175, 24,200,203,186,127,127,112,187,118,237,
+138, 83, 82, 82,160, 82,169, 16, 19, 19,131,227,199,143, 99,251,246,237, 56,122,244, 40, 30, 60,120, 0,142,227,224,227,227, 3,
+ 74, 41,246,238,221,171,226, 52,154,126,197, 64, 30, 43,250, 53,211,208,211,179,167,135,187,123,134,155,171,107, 86, 67, 79,207,
+158, 79,254,223, 17,184,119,239,222, 61,112, 28,135,192,192,192, 6,181,245,195,162, 28,119,254,252,249,243, 24, 63,126, 60,252,
+ 26, 55, 94, 28, 0,184, 61,185, 79, 0,224, 22, 16, 20,180,184,194,184, 80,142, 59, 95,223, 52,219, 3, 63,124,240,193, 7, 58,
+137, 68,130,109,219,182, 5,154,155, 52, 73, 16, 1, 99,236,128,208,110,128,164,174,239,123, 1, 63,127,246,217,103,121,132, 16,
+108,218,180,201,213, 49, 40, 40, 86, 4, 76,112, 4, 26, 58, 2, 13, 69,192, 4,199,160,160,216,109,219,182,185,114, 28,135, 25,
+ 51,102,228,121, 1, 63,215,164, 39, 20, 10,223,205,201,201, 25,148,157,157,221, 37, 39, 39,199,239,231,239,151,224,212,145, 3,
+248,101,197, 87,107,115,115,115,223,200,207,207,191,154,157,157, 61, 46, 43, 43, 43,150,149, 56, 6,131,241, 34, 66,170,235,231,
+ 36,110,255,101, 62, 64,221,187,118,104,142,107,183, 19, 85,174,206, 14, 71, 42,254,167,188,187,187,233,192, 14,158,205,191,253,
+246, 91,136, 68, 34,100,102,102, 34, 62, 62, 30, 14, 14, 14,120,239,189,247, 12,102,131, 97,112,197,122,103,132,144,104, 74,233,
+241, 71,154,199, 56,142,115,150, 25, 50,237, 90, 57,167, 52,222,184,126,173,208,222,222, 30,101,101,101,149,211, 10, 40, 20, 10,
+216,216,216,224,206,157, 59, 24,255,218,235,150, 36,174, 69,229, 68,163, 21,235,157, 85,213, 4, 33, 66, 0,232,231,236,172,184,
+ 43,147,205,114,241,240,152,253,206, 59,239,216,116,237,218, 21, 18,137, 4,109,218, 71,229,217,182,156,253,131, 64, 64,184,172,
+ 98,245,220,160,134,222,142,241,247,211, 0,144,135,107, 22, 62, 90,139,176,186,116, 70,202,239, 4,110,252,229,115,135,240,240,
+240,135,249, 86, 42,145,159,159,143,130,130, 2, 40,149, 74,104,181, 90, 0,192,241,227,199,113,242,106,138, 58,215,174, 87,114,
+ 77,233,252, 87,222,211,236,155,217,220,107,244,195,138,101, 66, 39, 39, 39,228,231,231,163,176,176, 16, 74,165, 18, 58,157, 14,
+ 22,139, 5,106,181, 26,251, 15, 28,180, 36, 91, 34, 83, 13,178,134,154,186, 52,161,205,180,105, 80,118,193,167, 85, 88, 0,157,
+ 52,105,146,189,131,131, 3,120,158, 71,105,105, 41, 50, 50, 50,144,146,146,130,179,103,207,106, 11,148, 70,104, 93,123,101, 85,
+ 76, 52, 90,237,249,124, 94,133,234,127, 81,243, 81, 89, 2, 0,111, 47,175,156,244,244,116,119,139,197, 2, 31, 31, 31, 78, 89,
+ 82,178, 88, 10, 28,181, 7,114, 1,208, 34,224,211, 21, 63,252,240,250,144, 33, 67,208,182,109,219,204,188,252,252, 70,213,149,
+ 37, 16, 34, 12, 1, 28,203,125,125,227,174, 94,189,234,153,145,145,129,241,227,199, 23,165, 39, 37, 85, 78,211,160, 2,162, 2,
+130,130, 22,111,219,182,205,181,113,227,198,136,140,140,204,147, 87, 76,211, 80,125,249,172,249,222,188,247, 87,163,105,195, 34,
+218,190,245,214, 91,224, 56, 14,103,207,158,197,149, 43, 87,144,158,158,142, 11, 23, 46, 40, 29,108,109, 71,213,118,111, 66,149,
+104,223, 47, 88, 27,184,105,211, 70, 34,145, 72,176,118,237, 90,220,188,121, 19, 0,208,170, 85, 43, 76,156, 56, 17, 28,199, 97,
+236,216,113,244,175, 68,155,202,137, 70,171, 43, 75,190,190,190, 17, 60,207, 47, 37,132, 72, 40,165,109,115,114,114,228, 62, 62,
+ 62, 57, 57, 57, 57,126,245,233,115,197,202, 39,211,100,154,255, 28,205, 23,141, 58,215, 34,252, 98, 37, 28, 31, 95,142,227,205,
+156, 61,191,127, 41,234,211,183, 95,232,220, 79,230, 8, 90,181,106, 5, 63, 63, 63,180,106,213, 10, 55,111,222,148, 53,107,214,
+172,174,245,206,202,122, 15,157,148,210,187,119,111,167,183,223,126,219,177,107,215,174, 98,111,239,135,235,234,198,197,197,225,
+208,161, 67,166, 45, 91,182,168,179,165, 81,202, 11,135,126, 47,179,102,189,179, 67,165,165,229, 0, 62,111,110, 52,254,246,217,
+220,185,243,195, 35, 35, 39,189,255,254,251, 2, 59, 91,133,248,203,185,111,200, 1,224,139,159,182, 59, 14,121,249, 85,172,104,
+ 2,116, 29, 83,253, 58,111, 85,211,153,149, 91,144, 62,102,226,203, 77,222,126, 99,140,101,208,160, 65,182,118,118,118,240,243,
+243,131,179,179, 51, 82, 83, 83, 17, 19, 19, 67,143, 29, 59, 86,118, 35, 46, 85,188,110,251,209,116,169,157,187, 53,235, 6,106,
+122, 15,153,144, 58, 97,194, 4,231, 97,195,134,217,135,135,135,139,197, 98, 49,228,114, 57,138,139,139,145,153,153,105, 58,125,
+250,116, 89,182,164, 99,233,133,195,235, 52, 86,174, 69,168,235, 50,122,225,131,115,199, 22,204,136,139,137, 25,199, 3, 45, 76,
+ 38,147,143,197, 98, 33, 2,129, 32,151,231,249, 24,147, 70,243,135,161,213,130,229,108, 45, 66,235,176, 88, 44, 18,139,197, 2,
+165, 82,137, 99,199,142,137,146,146,146, 62,189,125,251,246,167, 57, 57, 57, 48,155,205, 24, 49, 98, 4, 90,181,106,133, 83,167,
+ 78,161, 48, 63,255,207,218,180, 18, 1,149, 44, 43,107,226,155,111,190,121,104,227,198,141,130,219,183,111,187,174, 93,187,246,
+247,234,140,203,184,113,227,248,252,140,140,137,134, 90,230,192,170,227,222, 44, 58,188,237,199,219, 67,135,191, 28,182, 96,222,
+167,226,151, 94,122, 9,174,174,174,136,138,138,130,201,100,114,178,226,222,212,116,233, 59, 42,185, 69,139, 22,182,203,151, 47,
+247,124,253,245,215, 49,125,250,116, 0,128, 78,167,195,209,163, 71, 49, 99,198,140,188, 12, 81,123,237,141, 83,219,106, 45,159,
+143, 34, 83,189, 0,192,199,199,231, 12,128, 46, 0,146, 89,135,118, 6,131,241,143, 54, 88,192,191,214, 59, 59,119, 37, 22, 85,
+151,227,120,136, 91, 60,231, 58, 34,105,234,236, 37,145, 82,104,157,197,196,224,112,235,230, 77,146,146,146, 82,235,193, 42,214,
+ 59, 51,200,252,202, 20, 57, 69,237,126, 88,177,226,189, 53,107,214,244,172,152,138, 65, 46,151,199,232,180,218, 19,246, 42,213,
+247,134,198,126, 39,234,187,118,222,157,146,146,124, 0,211, 66, 45,150, 31, 94,155, 52,229, 27,129,157,175,248,147, 47,215,232,
+133, 2,129,241, 65, 78, 33, 86, 52, 1,108,173, 24,240, 88,110, 4, 98,138,221,185,120,116, 75, 92,178,112,225,172, 21,223,125,
+215, 78, 97,103,215,213,204,113,193, 60,207,131, 90, 44,247,117, 58,221, 25,152, 76, 87,179,188, 39,127, 39,181,115,167,214,174,
+ 27,104,144, 55,210,120,104,207,180,219,181, 99,199,187,135, 14, 29,250,183,188,123,241,252, 15,201, 14,141,142, 91,147,247,170,
+251,232,129,139, 40, 40,184, 88,227,219, 6,216, 90,132, 86,223, 20, 60, 63,217,217,217,121, 67,207,158, 61,229,209,209,209, 24,
+ 48, 96, 0, 94,122,233, 37,240, 60, 15, 74, 41, 52, 26, 13,182,111,223,142,111,190,249,230,126, 35,224,243,186,244, 12,192, 9,
+217,193,131,253, 90,180,104,177,182, 54,227,242,200, 92,213,217,231,176,246,123, 83,118,159,115, 28,156, 54,250,237,175,154, 24,
+213,185, 78, 46, 10,206, 51, 46, 54, 70, 96,237,189, 9,199, 16,141,229,230,246,246, 35,134, 13,123, 91, 40, 18, 69, 61, 26,209,
+ 72,239,198,199,223,168, 88,236, 25,173, 38, 30,171, 79, 89,162,244,225,220,115,172, 67, 59,131,193,248,199, 27, 44,145, 72, 84,
+ 80, 17,229, 17,137, 68, 5,201,123,167,188, 90,155,136,159,151, 87,207, 71,111,199,168,107, 45,194,138,207,183, 85, 42,205,163,
+ 25,218,171,157, 68, 84,252,196,254,245,201, 84, 66, 65, 65, 34,128,129, 64, 58,144,248,176, 59,139,184,221, 23, 31, 85,205, 83,
+141, 39,228,177,227, 74, 74,210,242,243,207,225, 97,115, 78,181,157,113,197,254,146,146,186,210,249,100,222,207,103,102,170, 31,
+229,187,250,188,123,214,157,119, 81, 61,207,143,232, 25,206,231, 63,141,236,162,162,189, 0,236,124, 15, 28,240, 56,124,224,192,
+ 43,179,102,206, 28,225,229,237, 29,228,234,234,234,108,111,111, 47,184,124,249,114, 10,167,215,255,208, 18, 88,119, 5, 40,183,
+ 70,211, 0,156, 8,201,200, 8, 31, 57,108,216,219, 68, 36,234, 92,213,184, 80,142,187, 16, 8,252,108,176, 98,246,246,122,223,
+155,178,250,223,155, 89, 15,211,241, 37, 56,238, 75,220,185,243,204,247, 38,207,243, 95,248,248,248,104, 88,135,118, 6,131,241,
+143,226,239, 92,135, 7, 64, 52,211,100,154, 47,138,230, 67,143, 2, 7,118, 62,153, 38,211,100,154, 76,243,249,107,254,163,215,
+ 34,100, 48,254,225, 47, 35, 22, 0,106,118, 38, 24, 12, 6,131, 81, 23, 4, 64,116, 13,149,137,213,163, 3, 8, 33,209, 79, 81,
+ 89, 29,103,154, 76,147,105, 50, 77,166,201, 52,153,230, 63, 75,179, 46,237, 23,102,116, 34,107, 34,100,154, 76,147,105, 50, 77,
+166,201, 52,153, 38,107, 34,124,190,155, 0, 12, 6,131,193,192,194,133, 68, 0, 16, 2, 44, 20, 0, 59,133,192, 72,225,195,223,
+159,158,145, 35, 73,181,147,208,190,251, 46,177,103,103,156,193,120,177, 97,125,176,254,131,120,121,121,249,123,120,120,252, 74,
+ 41, 37, 5, 5, 5,147,115,115,115, 51,216, 89,249,239,195,197,197,165, 39,199,113, 80,169, 84, 39, 94,196,252,133, 55, 33,195,
+168, 0,205,254, 21,214, 70, 70,252,125,186,161,186,125,195,130,201,120,144,127,205,165, 69,120,220,141,123, 64,247, 88,123, 44,
+ 66,136, 96,104, 63,183,165, 0,176,247, 80,225,236,191, 99, 94, 44,111,111,239,166, 46, 46, 46, 71,132, 66,161,200, 98,177, 76,
+139,137,137, 57, 80,179, 1, 26, 41, 4, 0, 55,155,221,115,156, 26,184,126,252,217, 44, 34, 54, 26,190, 85, 26,244,122,149, 64,
+ 36, 74,149, 74, 20,231, 57,129,237,161,172,252,126,241,213,125,127,199,142, 29, 53,174,174, 29, 17, 76,250,133,134,133, 13,106,
+ 29,105,147,188,244,251,118, 43,186, 6,186,138, 83, 50,111,217,173,220,144,241,171,155,179,207,160,247,222, 16, 29,144, 81,203,
+184, 37,191,211, 50,118,151, 89,207,215,132, 52, 48, 1,145, 98,153,204,207,194,113, 30, 4,160, 66,145, 40,223,108, 48,100, 74,
+128, 59, 31, 83,170,124,209, 53, 37, 50,153,175,133,227, 60, 0,224,191, 49,157,140, 58, 12, 86, 80, 80,208,117,129, 64,224, 91,
+177,198, 95,213,197,106, 43, 62, 63,249,211, 98,177,100, 37, 36, 36,180,177,246,224,141, 27, 55,118,208,235,245,175, 16, 66, 94,
+ 5, 0, 74,233,102,185, 92,190, 61, 37, 37,229,169, 58, 18, 55,110,220,216,129, 82, 58,219,198,198,166,135, 94,175, 15, 7, 0,
+185, 92, 30,167,211,233, 78, 18, 66,150, 62,141, 46, 33, 68,228,229,229, 53,210,214,214,182, 59,199,113,221, 41,165, 68, 36, 18,
+157, 42, 47, 47, 63,153,155,155,187,131, 82,202,213, 87,211,219,219,219,198,197,197,229,203, 38, 77,154,140,121,251,237,183,139,
+ 27, 52,104, 16,178,112,225,194,107, 17, 17, 17, 91, 74, 74, 74,230,230,228,228,232,254, 27, 10, 7, 33, 36,200,211,211,115,179,
+ 88, 44, 22,102,102,102,118, 7, 0, 63, 63,191, 83, 70,163,209, 82, 80, 80,240, 42,165, 52,169, 62,122,110,110,110,182, 98,177,
+184,131,173,173,109, 27, 91, 91,219, 46, 22,139,165,217,163,245, 19,239,106,181,218,179,102,179,249,186,217,108,190, 92, 88, 88,
+168,253,111,185, 65, 8, 33,246,238,238,238, 27, 9, 33, 32,132, 4, 83, 74, 53, 47,218, 67,128, 10,208, 44, 62, 46, 33,164,210,
+ 68,133,135,214,114, 66,224, 95,205,190, 86, 27,172,254, 61,157,250, 14, 26,212, 66, 0, 0, 38,211,181,190, 0, 14, 62,111,115,
+213,191,127,255,139, 63,252,240,131,179, 94,175,199, 7, 31,124,176, 57, 56, 56,248,231,251,247,239,207,169,237,123,246,246,246,
+ 51, 62, 95,244,147,226,209,179,204,157,231,121,247,220,220,204,224,196,132,152,190,137,137,177, 95,153,180,123, 46,155,168,112,
+138,178,124,112,130, 53,233, 8, 11, 34, 3,135,140, 28, 54,224,243,207, 23, 96,204,168, 49, 13,227,226,244, 54, 62, 14,201, 82,
+181,201,182,137,171,171,239,224,143, 62, 89, 66, 46, 95, 58, 61,120,199,246, 53, 39, 63,154, 68,122, 48,147,101,213,189, 72,190,
+ 16,137, 58, 56,135,134,118, 25,181,119, 47,236,252,252, 68, 34,153, 76, 0, 0,156,193,224, 87,150,153,233,181,109,240,224,246,
+ 11, 9, 57, 61,159,210, 43, 76,243,255, 95,147, 97,165,193, 18, 8, 4,190, 55,111,222,116,183,181,181,197, 35,243, 3,139,197,
+ 2,139,197, 82,185,168, 48,165,180,242, 39,199,113,232,214,173,155, 85,111,176, 94, 94, 94, 61, 0,188, 22, 17, 17, 49, 98,246,
+236,217,146, 78,157, 58,193, 98,177,224,228,201,147, 81, 43, 86,172,248,209,219,219,123, 55,128,117,185,185,185, 39,172,125,195,
+245,242,242,234, 99,107,107,187,233,211, 79, 63,117,136,138,138, 18,121,121,121, 1, 0, 10, 10, 10, 58,156, 63,127,190,205,130,
+ 5, 11,166,121,121,121,141,205,205,205, 61, 98,237,201,241,245,245,141, 8, 14, 14,222,217,175, 95, 63,223, 54,109,218,200,155,
+ 54,109, 10, 74, 41,110,221,186,245,122, 98, 98,226,232,131, 7, 15,206,247,245,245,125,217,218,245,212, 8, 33, 36, 40, 40,104,
+130,167,167,231,151, 51,103,206,108, 48,116,232, 80,105,108,108,108,105, 96, 96, 32,217,189,123,183,219,159,127,254, 57,237,151,
+ 95,126, 25,217,164, 73,147,185, 73, 73, 73,235,105,117,235, 24, 61, 65,112,112,240,117,129, 64,224,107,141, 1, 38,132,128,227,
+ 56,171, 76, 48, 33,164,101,163, 70,141,182,159, 59,119,174, 81, 90, 90,154,101,232,208,161, 27, 0,224,228,201,147,145,102,179,
+153,244,238,221,251, 16, 33,228, 21, 74,233, 45,107,242,238,227,227,211,220,205,205,109,223,208,161, 67, 27,248,251,251, 43,124,
+125,125,137, 92, 46,135, 80, 40, 68, 89, 89,153,119, 98, 98, 98,244,173, 91,183,116, 23, 46, 92, 40,241,241,241, 25,156,157,157,
+125,167, 30, 15,222,151,220,221,221,199,137,197,226, 8,142,227,124, 0, 64, 36, 18,101,155,205,230,216,130,130,130,141,148,210,
+139, 79,123,131,120,120,120,252,248,229,151, 95,186, 22, 20, 20,208,197,139, 23,255, 8, 96,194,139,250, 48,216,188,101, 7,174,
+ 95,187, 2, 0, 18, 66, 8,121,178,252, 17, 66, 72,179, 96, 72,222,127,127, 38,218,180,109,143, 87,199,140,172, 83,115,232, 0,
+215,207,165, 66,145, 75,185,209,112,165, 72, 37,216,231,239, 46, 29, 54,118,100,155,100, 0, 56,124, 40,102, 88,251,246, 13,206,
+187, 58,242, 67, 20, 82, 89,123,163,133, 43,222,251, 87,209,188,250,152, 41, 79, 79,207, 35,246,246,246,138,210,210,210,188,226,
+226,226,149,253,251,247,255, 98,249,242,229,206,201,201,201,200,204,204,196,107,175,189,102,151,157,157,253,182,191,191,255,165,
+140,140,140, 26, 35, 89, 26,141,230,251, 47, 23,205,156,103,239,224, 44, 84,216,216,194,206,222, 1,141, 26, 5,163,109,187, 40,
+ 68,247, 26,140,228,228,196, 14,219,183,174,185, 41,204,221,249,181, 69,218,234, 11,165,178, 81,141,207,165,240, 16,210,181,194,
+ 92,205,155,183, 0,247, 18, 18, 52,105,169,130,119,254,218, 43, 82,244,235, 25, 42, 51,154,202,210, 46, 95, 58,221,168, 67,199,
+110, 0,208,102,199,246, 53, 39, 23,142, 37, 61,231,111,122,241,204,251,243, 52, 87,159,139,197, 19,250, 44, 95,238,222,106,218,
+ 52, 73, 89,106,170, 41,121,213,170,242,252,179,103, 45, 34,153,140,250,245,237, 75,220,186,119,151, 79,187,123, 87,114, 97,241,
+226, 46, 95, 73,165,129,159, 24,141,155,152,230,255,159, 38,163,126, 6, 11,182,182,182,216,182,109, 27,196, 98, 49, 68, 34, 17,
+196, 98,113,141,159,253,253,253,173, 49, 65,195,195,195,195,127,154, 57,115,166,199,160, 65,131,224,236,252,248, 42, 27, 3, 7,
+ 14, 68,255,254,253, 37, 41, 41, 41,163,119,236,216, 49,122,195,134, 13,121, 94, 94, 94,239,228, 62, 90,176,185,150,202,187,123,
+ 96, 96,224,238, 45, 91,182,216,232,116, 58,156, 62,125, 26,165,165,165,144, 74,165,240,245,245, 69,231,206,157, 69,167, 79,159,
+110, 48,122,244,232,221, 62, 62, 62, 3,179,179,179, 79,213,149, 86, 79, 79,207, 54,110,110,110,103,126,251,237, 55,121,104,104,
+ 40,121,240,224, 1, 90,180,104, 1, 0, 40, 46, 46,198,192,129, 3,229,195,134, 13, 11,122,235,173,183, 46,123,122,122,118,205,
+203,203,187, 94, 71,222, 91,183,104,209, 98,125,223,190,125,189, 63,254,248, 99, 7, 59, 59, 59,164,165,165,229,122,122,122, 6,
+ 87,152,159, 33, 67,134, 72,123,245,234,229,181,114,229,202,239, 15, 30, 60,248,129,151,151,215,132,220,220,220, 27,181,233, 10,
+ 4, 2,223, 27, 55,110,184, 43, 20, 10,228,231,231, 99,243,230,205,120,251,237,183, 33, 20, 10, 81, 80, 80,128,237,219,183,227,
+157,119,222,129, 80, 40,132, 74,165,178,202, 4,219,218,218, 70,183,104,209,226,247,147, 39, 79,250, 58, 57, 57,193,219,219, 91,
+240,217,103,159, 69, 4, 6, 6,218, 52,108,216, 80,152,155,155,139,221,187,119, 7,142, 27, 55,110,159, 92, 46,127, 93,175,215,
+215,217,116,230,226,226,242,199,250,245,235,253,111,223,190,141, 85,171, 86,161,164,164, 4, 82,169, 20, 78, 78, 78,240,244,244,
+ 68,112,112, 48,153, 54,109,154,162, 71,143, 30,138, 5, 11, 22,252, 1,160,165, 21, 15,221, 22,238,238,238,191,142, 30, 61, 58,
+112,225,194,133, 78,158,158,158,168,120, 33, 80,169, 84,190,105,105,105, 29,230,205,155,247,178,135,135, 71, 74, 65, 65,193, 20,
+ 74,233,237,122, 62,212, 91,246,236,217,115,224,208,161, 67,133,185,185,185,216,184,113,227, 64, 66, 72, 75,107, 77,229,255, 26,
+215,175, 93,193,228,183,222, 43,243,246,243,147,252,185,127,235,144,178,178,223,206,219, 9,156, 68, 0, 80,198, 43,185, 78, 29,
+236, 58, 15, 26, 60, 90,210,127,192,208,178,223,126,249,222,206, 26,131, 37, 21,138, 92,182,109,154,154,121,246,194,253,102, 71,
+142,167, 69, 15, 29, 28, 45, 16, 73, 66,130, 0, 96,214,204, 55,165,123,247, 31,255,185, 79,116,195,220, 46,157,130, 51, 71,141,
+ 93,229, 87, 31,115, 21, 24, 24,120,250,200,145, 35, 30, 82,169, 20,165,165,165, 46,107,215,174, 93,214,190,125,123, 65, 82, 82,
+ 18, 18, 18, 18,144,154,154, 10,149, 74,133,118,237,218,217,197,199,199,175, 4, 80,163,193, 42,212, 13,255, 50,208,189,232, 7,
+ 31, 23,231, 70,122,147,202,221,194, 21,135,157, 60,126,187,249,174, 29,229,173,220, 61,125,131, 71,143,158,140,143,230, 44, 17,
+239,217,181,126,222,153,179, 71, 1, 52,170,121, 6,127,138,151, 62,153, 59, 7,106,141, 1, 99,199,188,137,113, 99,222,116,161,
+ 48,122, 81,139,222,214,168, 43,117,114,148,196, 29, 88,191,117,199, 48, 0,190, 85, 76,214, 9,102,178,106,230,115,145,168,253,
+192,159,126,114,139,120,227, 13,217,237,133, 11,181, 69,103,207,234,154,244,239, 95,218,106,234, 84, 3, 0,104, 82, 83, 37,247,
+230,207, 87,184,117,233, 98,211,113,246,108,103,139,209,232,185,136,144,118,159, 81,122,181,190,154,141,198,140,177, 44,221,189,
+187,237,229,197,139,187, 97,209, 34, 97,247, 86,173,110,205,253,229,151,236,103,209,124,158,233,204, 57,115,198,160,109,214, 12,
+145, 35, 70, 20,251,184,184, 24,158,103,222,159, 37,157,140,106,234,144,154,130, 36, 33, 33, 33,249,137,137,137,238,187,119,239,
+174,211, 92,137,197, 98,120,121,121, 33, 42, 42,170, 32, 38, 38,198,163,150,135, 98,102,102,102,166, 47,199,113,144, 74,165,181,
+ 38, 76,163,209, 32, 38, 38, 6,163, 70,141,202,202,201,201,169,241,193,219,160, 65, 3,123,103,103,231,228, 83,167, 78,185,198,
+197,197,225,250,245,235, 8, 12, 12,132,179,179, 51,196, 98, 49,204,102, 51,212,106, 53, 66, 66, 66, 96, 99, 99,131,254,253,251,
+ 23,149,148,148, 4,150,148,148,212,248, 32,107,216,176,161, 76, 44, 22,223,223,181,107,151, 95, 68, 68, 4,174, 94,189, 10, 63,
+ 63, 63,120,122,122, 2, 0, 82, 83, 83,113,254,252,121,244,239,223, 31,177,177,177,152, 58,117,106,166,217,108, 14, 78, 75, 75,
+ 51,212,216,100, 16, 22,150,187, 99,199,142,172,208,208, 80,189, 86,171, 21,228,231,231,139,207,158, 61,203,105, 52, 26, 59,149,
+ 74, 37, 86, 42,149, 98,181, 90, 45,210,106,181, 98,129, 64, 32, 49, 24, 12,226,203,151, 47, 11,139,139,139, 29,106, 59, 79,161,
+161,161,249, 9, 9, 9,238,251,247,239, 71,100,100, 36,118,239,222,141, 89,179,102,225,194,133, 11,240,243,243,195,142, 29, 59,
+ 48,123,246,108, 36, 38, 38,194,213,213, 21, 61,122,244,168,245, 26, 1, 64,147, 38, 77, 30,196,196,196, 4, 73, 36, 18, 36, 39,
+ 39, 35, 43, 43,171, 98, 61, 59, 20, 22, 22, 34, 41, 41, 9,217,217,217,104,210,164, 9,198,140, 25,147,148,149,149,213,164,174,
+130,214,186,117,235,194, 19, 39, 78,184, 54,111,222, 28,249,249,249,112,114,114,130,163,163, 35,156,156,156, 42, 63, 7, 6, 6,
+ 98,230,204,153,104,222,188,121, 65, 90, 90,154, 71, 93,230, 39, 50, 50,242,200,137, 19, 39, 92, 29, 28, 28,144,151,151, 7,181,
+ 90, 13,145, 72, 4,133, 66, 1, 87, 87, 87,200,229,114, 0,192,253,251,247, 49, 96,192,128,162,228,228,228, 62,214,154, 35, 66,
+136,192,195,195, 35,225,206,157, 59,193,148, 82,100,100,100, 32, 49, 49, 17,111,189,245,214,125,189, 94, 31,250, 34,173,169, 87,
+165, 95,149,100,194,196,201,146,161,131,135,148,223,186,126,152,183,193, 25,180,107,105,163, 4,128,171,183,116, 78, 58,116, 69,
+203, 54,125, 5,123,247,239, 83,172, 95,247,155, 24, 60, 60, 64,144, 24,127,143, 46,170, 73,123, 96, 31,167,241,179,223,235,219,
+172, 75,167, 46, 34,181,154,122,254,190, 97,117,187,244,148,100, 15, 0, 8,104, 28,152, 63,105,252,155, 87, 29, 28, 72,222,217,
+ 11,103,185,165,223, 31,190,123,224,136,114,131, 21,145,229, 64,127,127,255, 75,127,252,241,135,171,155,155, 27, 28, 29, 29,161,
+213,106, 97, 50,153, 16, 31, 31,175,223,182,109,155,217,193,193,193, 62, 47, 47, 15, 74,165, 18, 34,145, 8,151, 46, 93,202,200,
+203,203, 11,120, 82,171,162, 15, 22, 0,188,213,175,153, 56,172, 71,176,179, 68,198,217,216,136,239,121,129, 88,100,132,218,121,
+156, 60,121,169,249,169, 51,231, 94,237, 63,112,148, 91,199,142,221,177,228,171,143,204, 25,121,249,173,148,229,131, 19,170,235,
+131,213, 44,152,244, 24, 58, 98,216,200,207, 63, 95,128, 5,243, 22,226,192,254,189, 42, 59, 91,129,193,193, 73,236,216,165, 67,
+ 39,253,204,183,135,100,150,151,101,249, 45,251,121,245,152, 94,125, 70,250,118,232,216, 13,151, 47,157,198,142,237,107,174, 75,
+ 44,102,214, 92,248, 4, 11, 9,113,118, 10, 12,156,242,238,253,251,146,219, 11, 22,148,113, 57, 57,165,109,102,204, 40,170,110,
+223,172, 99,199,108,165,222,222, 14,206,131, 7, 55,248, 62, 32,128,154, 11, 10,126,173,174, 15, 81,117,154, 87,189,188,156,246,
+156, 58,213,147, 23,137,186,190, 61,125,186, 77,116,116, 52,212,106, 53, 14, 28, 56,128, 45,155, 55, 27, 60, 61, 60, 98,156,174,
+ 93,187, 25,152,155,251,169,181,154,109,102,204, 40,178, 88, 44,100,234, 87, 95,245,186,151,153,217,163,160,184,184, 33, 0,184,
+ 59, 58,102, 70,248,250, 94, 95,190,105, 83,226,143,141, 26,241,214,166,115,219,133, 11, 30,135, 10, 11,223,112,114,114,178, 41,
+ 44, 42, 18,201,164,210,226, 86, 77,154,236,248,122,250,244,211,198,155, 55, 37,114, 95, 95, 7,199,129, 3,235,157,247, 54, 51,
+102, 20,169,202,203, 69,115,127,248,161, 83, 78,113,113, 67,173,209,216, 68, 85, 86,230,201,153, 76, 2,123, 27,155,226,128, 38,
+ 77, 10, 52, 39, 78,228, 6,148,149,189,183, 66,171, 45, 96,165,242, 25, 35, 88,132, 16, 80, 74,173,138, 94,137,197,226,199,250,
+104,213,130, 68, 40, 20,226,234,213,171, 40, 40, 40, 64,100,100, 36, 26, 53,106,244,216, 14,201,201,201, 56,120,240, 32,148, 74,
+ 37, 90,183,110, 13, 0,146,218, 4,237,237,237,223,159, 51,103,142,147,193, 96,192,245,235,215,209,166, 77, 27,200,100, 50, 72,
+ 36,146,199,204, 95, 65, 65, 1,194,195,195, 49,117,234, 84,199, 31,127,252,241,125,212,178,134, 28,165,116,250,232,209,163,221,
+ 35, 34, 34, 0, 0,153,153,153, 21,105, 1, 0,184,185,185,225,214,173, 91,104,211,166, 13, 60, 60, 60,208,175, 95, 63,247,125,
+251,246, 77, 7,176,180,198,140, 75, 36,130,208,208,208,182,143, 34, 68, 16, 8, 4,247, 28, 28, 28,220, 60, 60, 60,108, 29, 28,
+ 28,254, 45,143,107,215,174, 85, 74,165, 82,179, 53, 39, 53, 47, 47, 15, 17, 17, 17, 80,169, 84, 0, 0,173, 86,139, 38, 77,154,
+ 64,173,126,216,229,204, 96, 48,192,219,219, 27, 58, 93,237, 93,187, 90,180,104,177, 32, 52, 52,180,119,183,110,221,100, 98,177,
+ 24,183,111,223, 70,171, 86,173,176,109,219, 54,248,251,251, 67,161, 80,224,254,253,251,136,140,140,196,153, 51,103,224,230,230,
+134,240,240,112, 89,235,214,173,207,149,148,148,156, 74, 75, 75, 91, 80, 75,164, 77, 96,103,103,135, 51,103,206,224,143, 63,254,
+ 64,106,106, 42,114,114,114, 96,111,111,143,150, 45, 91, 34, 44, 44, 12, 47,189,244, 18,238,223,191, 15, 82, 71, 97, 34,132,120,
+ 6, 7, 7, 31,184,122,245,170, 43,165, 20, 27, 55,110, 68, 89, 89, 25,140, 70, 35, 4, 2, 1,228,114, 57,156,157,157,209,163,
+ 71, 15,184,185,185, 33, 56, 56, 24,219,183,111,119,237,215,175,223,193, 71, 17,168,188,186,206,169,179,179,243,123,243,231,207,
+247,115,119,119, 71, 90, 90, 26, 84, 42, 21, 60, 60, 60,208,173, 91, 55,159,227,199,143,191, 7, 96,249,139,242, 16,168,232,208,
+ 78, 8, 33,127,238,223, 58,196,223, 75,218,172, 93, 43, 77, 64,204, 13, 81,208,193,227, 15,154, 63, 60, 31, 1,119,218,181,214,
+ 36, 93,189,126, 56,253,207,253, 91,175,220,189,135,125,214, 52, 97, 23,169, 4,251,142, 28, 79,139,110, 30, 30, 37,252,225,231,
+249, 67, 38, 79,234, 35,107,224, 28, 69,212, 5,219,113,225, 74, 76,192,103, 11, 62,118, 95,180, 96,241,159, 71,142,167, 89,138,
+ 84,130, 47,173, 73,111, 80, 96,131, 31,119,173, 22,185,106,140, 63,227,214, 21, 71, 64,220, 17,141, 3,155, 66,173, 86, 67, 46,
+151,203,199,140, 25, 99,153, 51,103, 78,185,131,131,131, 66, 36, 18,225,214,173, 91, 5, 2,129,160, 79, 93,186,122,119,103,106,
+ 49,153, 57, 42, 21,242,148,216,235,136,165, 68, 26, 27,159,130,174, 93,251,229,183,109,211,234,171,197,223, 46,255, 36, 48, 48,
+196,109,204,216, 41,226,165, 75, 63, 93, 5, 32,170, 58,157,187,247,233,201,176, 32, 98, 3, 96,192,231,139, 22, 32, 57,249,190,
+243,228,215,148, 11, 69, 50, 27,239,208,128, 78,246,171,254, 56,213,183, 73,147, 70, 13, 39, 79,124,253,175,223,214,254, 49,160,
+106, 36,107,235,150,223,246, 17, 66,122, 90,115,110,255, 65, 52, 31,119,224, 0,202, 50, 50,204, 37,231,206,233,123,254,244, 83,
+ 81,235,241,227,151,155, 57,206,181,162,174,170,248, 73, 8, 1,120,158,136,150, 46, 21, 80,111,111,152,157,156, 94,251, 24,104,
+ 90,151,230, 98,179,121,248,208,150, 45, 7,252,190,105, 19, 2, 2, 2, 42, 53, 29, 29, 29, 49,125,250,116, 76,155, 54, 77,118,
+231,206,157,118, 7, 15, 30,108,183,225,231,159, 61, 62, 6,134, 91,147,206,179,183,111, 59,127,248,253,247,115,155, 69, 68,248,
+175,248,233, 39, 89, 69,125,151,150,150, 22,252,211,143, 63, 6,244,136,142,206,255,232,195, 15,215,221,156, 53, 43, 28, 15,151,
+100,171, 81, 51,239,236, 89,227,161,146,146, 55,118,236,220,233, 20, 18,242,176, 27,100, 82, 82,146,251,239,191,255,254,102,143,
+183,223, 30, 59,107,244,232, 79,123, 60,120,160,116, 40, 44,148, 13,252,241, 71,209,214,145, 35,235,212,172, 72, 39, 0,140,152,
+ 61,251,253,246,157, 58,133,245, 27, 51,166,129,183,183, 55,177,177,177,129,201,100, 66,126,126,190,115, 98, 98, 98,208,113,165,
+ 82,125,244,214,173,141,120,180,136, 59,227, 25, 12, 22, 0, 88, 44, 22,171,204,149, 72, 36,250, 87,225,182,230,160, 34, 17,188,
+189,189, 81, 84, 84,132,216,216, 88, 4, 4, 4,192,108, 54,227,200,145, 35, 80,169, 84, 16,139,197,144, 72, 36, 48,153,234, 94,
+ 27,214,214,214, 54,186, 75,151, 46,162,139, 23, 47, 34, 48, 48, 16, 54, 54, 54,149,233,170,216, 36, 18, 9,188,188,188,160, 86,
+171, 17, 21, 21, 37, 94,187,118,109,116,109, 6,203,206,206,174,255,144, 33, 67, 42, 67,108,101,101,101, 16, 10,133,149,102,165,
+172,172, 12, 37, 37, 37, 80, 42,149,208,235,245,104,222,188,185,244,228,201,147,253,107, 51, 88, 85, 41, 47, 47, 47, 43, 40, 40,
+112,138,138,138,114, 94,183,110, 93, 98,199,142, 29, 67,170,254,255,244,233,211,122,189, 94, 47,150, 74,165,117,174,115, 71, 8,
+193,166, 77,155, 42,207,125,118,118, 54, 86,173, 90, 85,249,255,251,247,239,227,135, 31,126,168,156,151,163,182,107, 20, 26, 26,
+218,111,227,198,141,109, 54,108,216, 80, 42, 20, 10,145,152,152,136,205,155, 55,131, 82, 10, 55, 55, 55,148,151,151, 35, 63, 63,
+ 31,167, 78,157, 2,199,113,176,179,179,131,143,143,143,124,250,244,233,157, 23, 46, 92, 40, 6,176,160,150,178,100, 17, 10,133,
+ 8, 8, 8,192,188,121,243,160,215,235, 33,145, 60,244,149,106,181, 26, 74,165, 18, 55,111,222, 68, 90, 90, 26,234,170, 92,228,
+114,249,203, 27, 54,108,112,151, 74,165,208,233,116,208,104, 52,200,204,204, 68,122,122,186,190,160,160,128,179,183,183, 23, 4,
+ 4, 4, 8,100, 50,153,108,232,208,161,164,194,104, 14, 28, 56,208,101,227,198,141,163,234, 50, 71,132, 16,183,102,205,154,125,
+242,230,155,111,202,171,152,110,228,229,229, 97,248,240,225,138,139, 23, 47,206, 33,132,108,166,148, 22,190, 72, 15, 3, 74, 41,
+ 45, 43,251,237,252,217,125, 63, 53,139,185, 33, 10, 50, 26, 75, 59,246,234,255,158, 8, 0, 46,158, 89,219, 49,230, 70, 44,108,
+ 8,151,126,232,232,210,243,118,118,147,105, 93, 17,192,254, 61,157,250,250,187, 75,135, 13, 29, 28, 45,248,125,195,234,118,147,
+ 39,245,145,185, 55, 94, 77, 0,192, 89,226,139,151, 44,179, 4,122,131, 86,254,251,134,213,237,134, 14,238,127, 37, 53, 37,125,
+249,128,104,231, 61, 7, 79, 40, 15,215, 22, 33,244,114, 23,249, 56,219, 23,193,217,190, 21, 2, 2,237,113,243,214, 29,236,219,
+125, 14,193,161,157, 97, 48, 24,192,113,156,237,160, 65,131,202,119,236,216,161, 47, 46, 46,214,152, 76,166,174, 57, 57, 57,247,
+234,202,127, 86, 86, 60, 31,226,217,193, 36,177,145,113, 26,149,164,252,227, 79,119,142,108,221,190,119, 27,103, 47, 31,177,155,
+ 45,255,103,247,174, 81,155,183,108,250,117,198,172, 15, 22,161,101,203,142, 29,239, 62, 56, 20, 6, 32,166, 90,211,154, 68, 15,
+ 68, 4, 19, 46,249,193,131, 1,233,105,105, 89, 77, 61, 60,141, 73, 74,106,126,239,227,213,189,162,186,190,220, 60,168, 89, 23,
+105, 92,252, 25, 50,243,237, 55,183, 44,251,121,245,152, 10,147,117,246,236,145,174, 11, 22,164, 73, 1, 24, 88,245,244,232,229,
+ 84, 38,243,181, 11, 8, 16,165,174, 91,167, 11, 28, 52,168, 20, 0,204, 28,231,122,233,242,101, 71,133, 66, 1, 74, 41,204,102,
+243, 99,125,132, 43,250, 5, 71,119,235,230, 97,141,102,230, 47,191, 52,127,251,237,183,145,151,151, 7,142,227, 32, 22,139,159,
+124,102, 67,163,209, 96,196,136, 17, 88,187,114,101, 7,107, 52, 45, 22, 11,249,240,251,239,231, 78,127,239,189,160,177, 99,199,
+ 10,170, 62,123,157,156,156,240,219,234,213,210,117,235,214,249, 46,249,227,143,215,122,201,100,201,117,105,106,194,195,225, 20,
+ 19, 99, 83, 97,174, 0, 32, 40, 40, 8,139, 23, 47,150,141, 30, 61, 90, 58, 97,194,132,239,226, 66, 66,190, 95,144,158,254,192,
+165,105, 83, 7,169, 76,230,107,237,249, 4,128, 50,163, 49, 98,254,231,159, 59, 95,185,114, 5, 57, 57, 57, 21,115, 93,129, 16,
+130,200,200, 72, 50,114,228, 72,199, 14,109,218,180, 99, 37,242, 57, 69,176, 44, 22,203, 99, 70,165, 46,131, 85,239,246, 73, 66,
+224,229,229, 5,147,201,132, 53,107,214, 64, 34,145, 84, 86,186, 0, 96, 52, 26,235,212,208,235,245,145,158,158,158, 80,169, 84,
+104,218,180,233, 99,145, 43,137, 68, 2,145, 72, 4,137, 68, 2,153, 76, 6,131,193, 0, 31, 31, 31,232,245,250,200, 58, 12, 80,
+ 75, 7, 7,135,202,138,213, 96, 48, 84,154, 43,165, 82, 9,165, 82, 9,163,209,136,210,210, 82,148,149,149, 65,169, 84, 66,163,
+209,180,178, 38,207, 60,207, 35, 54, 54, 54, 41, 36, 36,164,165, 80, 40,132,157,157,157,173, 86,171,173,236, 59, 84, 82, 82,130,
+245,235,215,107,199,143, 31,239,122,229,202, 21,171, 22, 18,126,231,157,119, 32,147,201, 80, 94, 94,142,149, 43, 87,226,221,119,
+223,133, 68, 34,129, 70,163,193,170, 85,171, 48,115,230, 76,136, 68, 34, 24,141, 70,108,219,182,173,230, 72, 70,124,124,234,229,
+203,151, 91,181,110,221,218,121,207,158, 61,133,189,122,245,114,235,211,167, 15,108,108,108,160,211,233, 96, 54,155,209,161, 67,
+ 7,132,134,134,162,160,160, 0,135, 14, 29, 42, 10, 14, 14,118,189,114,229, 10,159,151,151,151, 94, 87,229, 93,213, 96, 91, 44,
+ 22,228,231,231, 67,169, 84,162,176,176, 16, 57, 57, 57,200,202,202,130, 72, 36, 66, 93, 47,239, 46, 46, 46, 35, 34, 34, 34,132,
+ 0, 96, 99, 99,131,150, 45, 91, 98,238,220,185,156, 78,167,123, 5,192,161, 71,187,245, 91,189,122,245,158,243,231,207,139,188,
+189,189,145,144,144, 0, 55, 55, 55,145, 92, 46,175,211, 96,121,122,122,174,253,243,207, 63, 27, 84,152,234,138,178, 90, 94,254,
+240,114, 12, 31, 62,188,193,134, 13, 27,214, 2,232,255,162, 61, 16,236, 4, 78,162,118, 45,109,148, 7,143, 63,104,222,171,255,
+123, 34,175,160,249, 0,128,151, 0,209,177,131,223, 55,239, 31,221,100, 71, 69,191,172,218, 24,218,207,109,233,160, 65, 45, 4,
+ 99, 71,182, 73, 22, 73, 66,130, 54,109,248,222,163,129,115,212,191, 30, 18,194, 6,176,181, 1, 66,131, 44,130, 75, 91,147, 61,
+102,190, 23, 98,220,188,238,141,228, 77, 59,174, 71, 75, 36,183,123, 0,152, 89,147,118, 92,162,121,191, 74,219,160,153,163,228,
+ 52,129,124, 48, 90,181, 12,134,155,155, 18, 43,127,219, 0, 31,255, 78, 48, 24, 12,112,112,112, 80, 0, 48,153, 76,166, 77,214,
+152, 43, 0, 56,113, 66,201,135,135, 43,141, 66, 13,207,189,253,238,210, 97,189,250, 13, 14,235,209, 35,154, 63,122,236,168,169,
+ 83, 43, 83,110,143, 30, 29,243, 79,157, 62,123, 63, 47, 47, 59, 56, 52,180, 57,238, 37,222,234, 11,144, 88,160,250, 2, 27,123,
+159, 30, 14, 10, 34,167,182,109,155,204,235,248,155, 54, 95,124, 25,211,111,192,128, 9, 17, 93,162,186,240,199,142,159, 52, 74,
+ 81,116,215,174,243, 75,217, 19, 70,191,178,103,219,238, 61,189, 79,157, 60,208, 68,165,206, 63,240,237,207,148,153,171,170, 47,
+103, 28,231, 33,146,201, 4,133,167, 78,113,145,147, 38, 85,158, 27,133, 66,129,125,251,246, 65, 42,149, 86,110, 18,137,164,242,
+179,135,135, 7, 8,165,130,250,104,230,230,230, 34, 47, 47, 15,142,142,142,112,115,115, 67, 94, 94, 30, 46, 94,188,136,123,247,
+238, 65, 44, 22,163,111,223,190, 16,212, 80,111, 62,169, 57,245,171,175,122, 53,109,214,204,255, 73,115,133,135, 5, 19, 37, 37,
+ 37,136,142,142, 22,156, 56,113,194,243,210,131, 7,131, 1,108,170, 85,115,240,224,226,194, 19, 39,170, 61,118, 68, 68, 4,217,
+183,111,159,108,204,232,209, 51, 22,254,248,227,207, 95,254,244, 83,166,133,227, 60,235,147,119, 66,136,128, 16, 2, 63, 63, 63,
+148,148,148,160,172,172,172, 34,224, 0,103,103,103,152,205,102,240, 60, 47,102, 37,210,122, 4,117,153, 1,107,204,149, 88, 44,
+134, 64, 32,120, 42,147, 85, 53, 66,240, 36,214, 24,172,138,202, 79, 46,151, 63,118,131, 85,152,181,170,159, 43,222,118,172, 64,
+168, 86,171,177,107,215,174,202,130,102, 52, 26,161, 82,169,160, 84, 42,161, 82,169,160,215,235,145,154,154,138,173, 91,183, 34,
+ 39, 39, 7, 66,161,208,170, 73, 91,147,147,147,175, 55,106,212,168,101, 69,229,221,189,123,119,223,179,103,207,230, 84,156,131,
+ 79, 63,253,180,168, 67,135, 14,174, 85, 43,247, 58, 19, 43, 20,226,226,197,139,208,233,116,160,148, 66, 34,145, 32, 49, 49, 17,
+ 28,199,129,231,121,136, 68, 34, 20, 22, 22,214, 25,193,138,141,141,157,248,250,235,175,175,152, 52,105,210,169, 15, 63,252,240,
+ 88,247,238,221, 51, 9, 33, 48,153, 76,112,112,112,128,167,167, 39, 18, 19, 19,161,215,235,241,254,251,239,103,108,216,176,225,
+248,202,149, 43, 79,173, 89,179,102, 69, 86, 86,214,235,245,185,222, 28,199, 65,171,213,162,180,180, 20, 37, 37, 37, 80,171,213,
+208,235,245, 79, 85,134,162,162,162,112,224,192, 1, 97,207,158, 61,127, 15, 8, 8,200, 11, 8, 8,200,235,217,179,231,239,251,
+247,239, 23,250,248,248, 32, 45, 45, 13,215,175, 95, 71,105,105, 41, 40,165,181, 30, 64, 44, 22,119, 31, 63,126,124,103,127,127,
+127, 98, 50,153, 96, 48, 24, 96, 48, 24, 96, 50,153,192,243, 60,210,210,210,208,172, 89, 51, 65, 64, 64, 64, 71, 66, 72,119,246,
+ 8,177, 30,117,193,118,208,242,159, 64, 13, 91,193,171,127,134,246, 41, 39, 35, 41, 45, 45,253,242,173,143, 85, 5, 22,195, 45,
+196,199,156,134,166,220, 7,190,141, 39,226,205,215,187,227,234,229,163, 40, 41, 41, 65,124,124, 60,186,118,237, 42, 33,132,212,
+171, 92, 30, 59,118,217,242,202,184,119, 95,238,222,123,112,155,232,232,254,220,145, 35,199,141, 55,174, 29,185,222, 36,200,185,
+128,242,101,249, 78, 78,138,155, 15, 30,220, 69,112,211, 48,152,204,230, 40, 96, 65,173,229, 41, 41,137, 26,255,250,203,203,242,
+202,164,216,113,125,250,190,214,162,103,207, 62,230, 35,199,254,180,156, 59,181,243,102,159, 62, 65,103,190,254,126,187, 95,137,
+ 49, 52, 92,238,224,121,176, 99,103, 69,212,212, 87,253, 39,179,146, 82, 67, 52, 64, 46,231,241,232,185, 88,209,133,165,170,185,
+122,114,179,166, 78,170,170, 89,181, 46, 82, 42,149,184,127,255, 62,190,253,246, 91,220,186,117, 11, 22,203,195,174,118,117,117,
+179,168,170,153,152,145,209,227,221,119,223,149, 85,103,174,138,139,139, 81, 84, 84,132,236,236,108, 12, 28, 56, 80, 82,226,236,
+220,186, 46, 77, 31,119,119,131, 66, 46,207,191,119,239,222,191,165, 87,173, 86, 67, 42,149,226,199,159,126,146, 28, 73, 72,120,
+235,200,201,147,174,245, 57,159, 85,235, 82,119,119,119, 4, 5, 5,161, 85,171, 86,136,140,140,132, 92, 46, 71, 92, 92, 28,126,
+253,245, 87, 8, 9,225, 88, 73,124, 78, 17,172,250, 24,172,250, 24, 2,107,177,166,137, 80, 46,151,199,228,231,231,119,242,241,
+241, 1,199,113,149,102,234,201, 38,194,138,104,199,221,187,119, 33,151,203, 99,106,211, 84, 40, 20, 49, 66,161,176, 99,187,118,
+237,176,123,247,110,156, 58,117, 10, 41, 41, 41, 40, 47, 47,135,193, 96,128, 78,167, 67, 92, 92, 28,120,158, 71, 68, 68, 4, 28,
+ 29, 29,161, 80, 40, 98,234, 74,171, 86,171,205, 21,139,197, 33, 54, 54, 54,255,106,238,240,242, 66,113,113, 49,111, 54,155,177,
+126,253,122,181,167,167,167,173,141,141, 13, 42,230, 31,179,198, 92, 22, 20, 20,192,215,215,183,178, 15,150, 70,163,129,187,187,
+ 59, 76, 38, 83,101, 4,206,222,222,190, 78,115, 73, 41,213, 3,152, 85, 69,187,237,200,145, 35,183,108,219,182,173,241,241,227,
+199,113,229,202, 21,184,185,185,225,171,175,190, 74, 73, 75, 75, 27, 67, 41,189,246,188,175,185, 53, 6,171,184,184,120, 87, 76,
+ 76, 76,199,118,237,218, 85, 22,186,238,221,187,147,238,221,187,187, 86, 13,233, 23, 22, 22,226,234,213,171, 56,126,252, 56, 8,
+ 33,184,127,255,190, 69,167,211,109,169,229,216,146,128,128,128,117,115,231,206,181,227, 56,174,178,108,219,216,216, 64, 46,151,
+ 67, 34,145, 64, 40, 20, 34, 45, 45, 13, 67,134, 12,113,252,233,167,159,214, 18, 66,130, 40,165,166, 23,229,129, 80,198, 43,185,
+171,183,116, 78,206,206, 1,119, 46,158, 89,219,241,165, 71,207,136,139,103,214,114,206,206, 1,119,174,222,210, 57,117,241, 83,
+114,118,117,232,236, 61, 84, 56,219,100,186,214,247,240,161,152, 97,179,102,190, 41, 13,104, 28,152,127,225, 74, 76,192, 75,150,
+ 89, 2, 91, 27, 64,171, 3, 74,148, 64, 66,146,144, 15,104, 28,152,127,237, 70,162,244,187,101,107, 2,203,117,198, 61, 7, 79,
+ 40, 15,215,166,157,149,149,165,247,241,241, 25, 58,107,161,226,204,232, 49,238, 82,137,220, 15,154,210, 27,104, 24,224,130, 87,
+ 70,132,224,231,223,110,192,193,161,193,195, 8, 6, 33,182,214,230,189,168,168,136,236,218,122,110,210,248,215,222,236,208,167,
+247, 0,238,240,145,191, 68,167,142,238,191,184,246,183, 79,246, 80,161, 86, 65,168,198,198,207,223,247, 78,106,202,189, 49, 93,
+186,244,134,141, 84,209, 4, 8,173,182,192, 86, 14, 28,160,200, 16, 8, 32, 31,255,218,228,151,250,244, 25,204, 29, 57,178, 23,
+ 71, 14,110,184, 60,127,126,195,131, 41,217,155, 37,151,174,101,201,135,190, 60,173,244,192,161,187,198, 17,131, 26,221,243,182,
+109,169, 99,213,210, 19, 47,144, 34, 81, 62,103, 48,248,249,246,233, 35, 44, 79, 79, 23,219,121,120,112, 0, 96, 54,155,255,205,
+ 84, 85,141, 96, 9, 4, 2, 64, 32,224,173,209,180, 54, 45,229,229,229,224, 1,206, 26,205,194,146,146,134, 79,246, 49, 54,155,
+205, 40, 46, 46,174,220,148, 74, 37,228,114, 57, 74, 31, 77, 26, 90,151,102,151,230,205,215, 47,251,238,187,217,191,173, 94, 45,
+169,106,174, 42, 54,129, 64,128, 57,159,124, 34,153,247,245,215,211,134,139, 68,239,213,231,124, 86,188,172, 11,133, 66,136, 68,
+ 34,164,167,167, 35, 35, 35, 3,233,233,233, 72, 79, 79,135,141,141, 13, 40, 33, 60, 43,145,207,193, 96, 85, 92, 60,107, 59,185,
+ 91,107, 8, 42,222, 4,158,151,193,210,106,181,199,207,159, 63,223,190,119,239,222,162,203,151, 47,195,211,211,179,210, 96, 85,
+252,172,104,118, 82, 40, 20, 56,116,232,144, 73,171,213,214,186,144,164, 78,167, 59,113,226,196,137, 54, 51,103,206, 20, 79,156,
+ 56, 17,241,241,241,152, 50,101, 10,148, 74, 37,212,106, 53,138,139,139, 81, 94, 94,142,246,237,219, 67, 46,151,227,193,131, 7,
+102,157, 78, 87,215, 84, 5,180,160,160,160,204,205,205,205,235,201,127,188,252,242,203, 30,191,252,242, 75,121, 66, 66,130,185,
+ 83,167, 78, 14,214, 26,141, 10,182,110,221, 90,105,158,238,221,187,135, 95,126,249,165,178,207,213,141, 27, 55,176,116,233,210,
+202,185,203,234, 25, 85,188, 22, 30, 30,206,153,205,102, 52,105,210,164,162,121, 21, 43, 86,172,224,254, 14,115,101, 45,122,189,
+126,231,132, 9, 19, 62,186,121,243,166,151, 72, 36,170, 8, 93,131,231,121,152, 76, 38, 60,120,240, 0,113,113,113, 72, 72, 72,
+ 64, 73, 73, 73,229, 11,192,173, 91,183, 74,205,102,243,246,154,116,221,220,220, 62,253,227,143, 63, 60, 21, 10,197, 99,229, 89,
+ 32, 16, 84, 62,116, 36, 18, 9, 10, 11, 11,225,228,228,132,158, 61,123,186,159, 56,113,226, 83, 0,243, 94,132,135, 1, 33,132,
+116,234, 96,215,249,157,105,175,161, 93,107, 77, 82,204,141, 88, 28, 59,248,125,115,224, 97, 39,247,200,214, 17, 73, 87,111,218,
+163, 95,239,217,157, 47, 92,158, 82,107, 39,247, 71,125,168, 14,182,111,223,224,252,222,253,199,127,254,120,230,155, 87, 63, 91,
+240,177,187,222,160,149,135, 6, 89, 4,192, 67,115,117,233,166,173,126,209,130, 55,175, 46, 94,182,158,207, 40, 48,205,184,114,
+165,180,198,209,189, 85, 77,139,179, 29,228,158,126, 51,114, 26, 6,246,104, 20,115, 99, 13, 92, 29, 75, 97,223,164, 19,250,245,
+105,143,227, 39, 98,144,158,173, 71, 65, 65, 1, 0,212, 58,237, 65,194,157, 61,227, 40,161,254,132,146, 12, 34,160,242,113, 19,
+222,136, 26, 48, 96, 48, 61,112, 96, 63,183,119,207,166,243,219, 55,254,176, 83, 32, 17,139,116, 70, 71, 35, 33,122, 21, 47,176,
+143,215,106,139, 31, 62, 60, 37,146,154,151,187,121, 52, 33,107, 88,120,168,231,184, 9, 83, 28,251,247, 27, 66, 15, 30,220,203,
+111,223,182,254,212,246, 53,145,155,120,129, 90,146,155, 89, 46, 83,169,205, 42, 74,164, 78,101,106,190, 60, 63, 57, 72,239, 61,
+224,101, 19,171,150,158,168, 7, 12,134,172,178,204, 76,175, 6, 93,187,202, 30, 44, 88,160,240,104,223, 94, 95,209,133,165, 54,
+131, 37, 20, 10, 65, 1,222, 26, 77,107,211,162,211,233, 64, 9, 49, 63,141, 38,199,113,143,153,171, 10,131,245,232, 89,111, 85,
+ 58,191,125,255,253,203,109, 95,123,173,228,210,165, 75, 30, 29, 59,118, 36, 26,141, 6, 26,141,230, 49,147,229,230,230, 70, 26,
+ 7, 6, 42,142,228,230, 6,206,179,242,124, 90,147,119,129, 64, 80,227,249,100, 60,133,193,170,136, 96, 89, 99,176,132, 66,161,
+ 53,166,192,108, 54,155,225,238,238,142,162,162,162, 26, 43,124,129, 64, 0, 27, 27, 27,104,181, 90, 0,168,117, 36,157, 70,163,
+ 89,177,104,209,162,233,221,187,119,119, 13, 9, 9, 65, 97, 97, 33, 60, 60, 60, 32,151,203, 43,251,134, 85,232,197,198,198, 98,
+219,182,109,106,141, 70,179,162,142,124, 47, 95,181,106,213,219,253,251,247,111,224,234,234, 10,103,103,103,220,185,115, 7,206,
+206,206, 80,171,213, 72, 76, 76,132,189,189, 61, 8, 33,208,235,245, 56,123,246,172,134,231,249,229,117,220,152,244,194,133, 11,
+ 38,133, 66,113,167,176,176, 80, 88, 82, 82, 34, 42, 45, 45, 21,169,213,106,177, 74,165, 18, 31, 62,124,216,213,209,209,177,252,
+228,201,147,133,254,254,254,194,212,212, 84,161,209,104, 20, 88, 81, 41,226,189,247,222,131, 68, 34,129,193, 96,192,138, 21, 43,
+ 48,123,246,236,202, 62, 87,223,124,243, 13,230,206,157, 91, 25, 82,255,243,207, 63,235,107,178, 96, 50,153, 96, 54,155, 97, 54,
+155,173, 50,189,207,130, 53, 70,157, 82,154, 71, 8, 25,216,174, 93,187,163, 59,118,236,112,177,183,183, 71, 90, 90, 26,242,243,
+243,145,159,159,143,194,194, 66,148,149,149,129,227, 56,248,248,248, 32, 63, 63, 31,123,247,238, 85,105, 52,154, 62,181,141, 32,
+ 20, 10,133, 19,162,162,162, 68, 79,166,161,226,173,174,194,180,203,100, 50,228,228,228,160,123,247,238,210,211,167, 79, 79,248,
+ 95, 55, 88, 21,198,165, 89, 48, 36,131, 6,143,150,180,108,211,183,252,234,245,195,233, 54,132, 75,239, 31,221,100, 7,240,112,
+154,134,171, 55,237,209,178, 77, 95,193,160, 92, 99,123,101,233,111, 45,195,154, 18, 83,109,203,234, 0,128,171, 35, 63,164, 79,
+116,195, 92, 7, 7, 34, 90,180, 96,241,159,191,111, 88,221,238,210,214,127, 77,211,176,104,193,195,105, 26,250, 68, 55,228,226,
+ 19,238, 13, 1,176,193, 90,211, 50,112, 96,159,155,127,172,221,134,236,212, 63,189,151,127,110, 35,133,190, 20, 16,135, 32,170,
+131, 3,174,253,156,133,236,236,236, 60,158,231,107,109,198,165,132,250,199,197,199, 54,141, 12, 15,243, 28, 55, 97,178,195,192,
+129, 67,112,224,192, 62,108, 92,191,230,236,136,209,195,127,207, 46, 85, 11,221,197, 10,137,130,242, 82,161,196, 81, 36, 87, 40,
+ 10, 76, 57, 57, 15, 31,158, 34,177, 3, 48,146, 7,106,142, 12, 79,157, 60,214,177, 71,244, 16,252,117,112, 31, 54,174,255,237,
+204,103,225, 47,175,105,212,170, 25,105,223,250,219,105,141, 26, 55, 10,208,150,229,171, 5, 68,106,210,235,121,251,111,215,167,
+ 45, 75,158, 59, 33,249,102,236,200,239,216, 40,194,199,184,179,177,127,255,118,239, 38, 37, 73,220, 58,119,182,201, 57,117, 74,
+ 97,141,193, 18,137, 68,128, 64,192, 89,163, 73,142, 29, 19, 0,168,117,112,149, 68, 34, 65,121,121, 57, 56, 66, 76,214,104,186,
+223,186,149,153,150,150, 22,236,228,228,244,152,185, 42, 41, 41,169,252,172,215,235, 97, 52, 26, 97, 35,151,199, 89,163,153,127,
+246,172,126,238,196,137,243,222,126,235,173, 31,182,110,219, 38,119,116,116,132, 74,165,122,204, 96, 25,141, 70,180,107,223, 94,
+178, 54, 33, 97, 28,128,249,214,156, 79,143,238,221,235,236,239,251,200,176,178, 38,194,250,212,103,117, 53,213, 88, 59,138,176,
+186,138,145, 16, 18,253,196,239,115,251,245,235,167, 79, 73, 73,129,191,191,127,165, 73,169,122, 76, 7, 7, 7, 56, 57, 57, 33,
+ 33, 33, 1,107,214,172,209, 17, 66,230,214,166, 89, 82, 82,162,209,235,245,163, 70,143, 30,173,147, 72, 36, 8, 13, 13,173,156,
+255,138,231,121, 72,165, 82,216,218,218, 34, 54, 54, 22, 19, 38, 76, 40,215,235,245,163,158,156, 3,235, 73,205,180,180, 52,149,
+ 86,171,125,245,213, 87, 95, 45,191,119,239, 30,162,162,162,112,251,246,109,148,149,149,161,172,172, 12,169,169,169, 8, 11, 11,
+131,209,104,196,206,157, 59,117, 90,173,246,213,180,180, 52, 85,109,154, 26,141,102,208,146, 37, 75,132, 7, 15, 30,108,228,235,
+235, 27,222,182,109,219,144,158, 61,123, 6, 13, 27, 54, 44,160,127,255,254, 94,193,193,193,250, 62,125,250,184,245,235,215,207,
+ 77, 40, 20,138,147,146,146,114, 41,165,253,106,211,172,106, 74,238,221,187, 87,217, 36, 40, 18,137, 80, 84, 84, 84, 57,211,126,
+197,195,168, 58, 3, 92,147,102, 85,147, 93, 97,172, 42,140, 86, 93,207,254,234, 52, 9, 33,117, 86, 24, 82,169,180, 34,194, 73,
+235,210,164,148,222,186,123,247,110,175,174, 93,187,222,154, 52,105,146, 38, 47, 47, 15,246,246,246, 8, 12, 12, 68,211,166, 77,
+225,234,234, 10,147,201,132, 61,123,246,104,247,238,221, 27,163, 82,169,186, 63, 57, 7,214,147,154, 2,129, 32,181,186,135,107,
+ 69,244,170,194, 96,201,229,114,248,248,248, 84,156,219,212,250,156,207,167,140, 44,253,189,154,143,140, 75,207, 30,125, 26,247,
+ 31, 48,212,113,239,254,125,138, 31, 87,174,187,219,101,200,244, 85,174, 1,179,118,187, 6,204,218,221,101,200,244, 85, 63,174,
+ 92,119,119,239,254,125,138,254, 3,134, 58,246,236,209,167,113,124, 92, 66,200, 99,235, 18, 86,147, 78,133, 84,214,190, 75,167,
+ 96,229,217, 11,103,185,197,203,214, 91, 58,189,212,255,202, 15, 63,172,218,254,195, 15,171,182,119,122,169,255,149,197,203,214,
+ 91,206, 94, 56,203,117,233, 20,172, 84, 72,101,237,173,201,251,212,201, 99, 29, 7,244, 31,130, 3, 7,246,112, 91, 54,174,248,
+102,223, 17, 99,215,151, 39,235,243,211, 83,111, 80,148,175,131,155, 67, 12, 50, 50, 50, 84, 28,199,117,175,174,131,123,117,154,
+ 83,222, 28, 91,213, 92,157,115,241,140, 90,125,247, 46, 44,199,142,253,105, 62,113,226,166,238,220,173, 2,213,245,248,162,146,
+ 98,181, 62, 69,171, 81, 27,121,158, 7,229, 45,194,133, 11, 65,106,187, 70,157, 58,117,195,201,227,155,177,126,221,175, 42,158,
+135,254,229, 29, 59, 44, 35, 71, 46,160, 1, 13, 27, 6,108,218,186,153, 12, 28, 60,212,145, 2,252,160,225, 67,156,182,108,219,
+ 66, 26, 55,105,220, 48, 48,240,225,212, 52,255,147,101,233,111,208,156, 79,105,169, 58, 61,253,204,141,159,126, 50,120,140, 26,
+213, 64,234,225,225, 0,158, 39, 21,207,247,154, 54,145, 72,244, 88,196,165, 54, 77,143, 6, 13,178,143, 28, 57,130,144,144, 16,
+248,248,248, 60,214,229,165, 98, 34,109, 87, 87, 87, 28, 59,118, 12, 20,184,110,141,102,152,183,247,141,159,127,250,201,200,243,
+ 60, 74, 75, 75,255, 45,122, 85, 90, 90, 10,158,231,113,246,204, 25,163,170,172,108,189,181,121,111,111, 52,150, 13,109,211,230,
+235,241,227,199,155, 82, 83, 83,193,243, 60,170, 70,178, 10, 10, 10,160, 80, 40, 80,174,211,249,121,120,120, 40,172,209, 44, 56,
+124,216, 22,117, 60,215, 5, 2,193, 99, 77,132,127,199,117,255, 71, 69,176, 56,142,131,159,159,223, 99,243,140, 8, 4,130,199,
+182,250,140, 32,204,206,206,222,224,225,225,113,100,220,184,113,243, 90,182,108, 57,117,198,140, 25,194,198,141, 27, 67,165, 82,
+193,217,217, 25,238,238,238, 72, 77, 77,197,153, 51,103, 44, 74,165,114,149,197, 98,249, 60, 63, 63,191,208, 10,221, 83, 62, 62,
+ 62, 3,123,247,238,189,237,237,183,223,118,236,218,181,171,216,219,219, 27, 0, 16, 23, 23,135, 67,135, 14,153,182,108,217,162,
+214,235,245,163,172,153,197, 29, 0,114,115,115,143,122,121,121,141,152, 48, 97,194,166, 97,195,134,217,235,245,122,113,106,106,
+ 42,140, 70, 35, 56,142, 67, 73, 73,137,233,204,153, 51,101,229,229,229, 99,115,115,115,143, 90,161,119,131, 16, 18,102, 50,153,
+ 38,220,188,121,243,203, 17, 35, 70,184,188,244,210, 75, 18,142,227,112,254,252,249,194, 86,173, 90,185,171,213,106,211,133, 11,
+ 23,138,245,122,253,220,156,156, 28,171,150,202, 33,132, 64,173, 86,195,213,213, 21, 6,131, 1, 60,207,195,104, 52,194,206,206,
+174,114,121, 35, 74,233, 83,247,145,227, 56, 78,104, 50,153, 48,122,244,104,240, 60,143, 21, 43, 86,128,227,184,122,139,217,217,
+217, 93,143,139,139, 27, 24, 30, 30, 94,105, 90, 42,202,144, 76, 38,131,171,171, 43, 92, 92, 92,112,252,248,113, 8,133,194,235,
+ 86, 70,215,110, 3,104, 69, 8,121, 41, 38, 38,102, 60,128,150, 38,147,201,199, 98,177, 16,129, 64,144, 75, 41,189,163, 86,171,
+127,183,118,169,156,130,130,130, 47, 95,123,237,181, 86,155, 55,111,182, 19,137,254,117,107,136, 68, 34,200,100, 50,184,187,187,
+195,209,209, 17,148, 82, 24,141, 70,124,250,233,167,106,173, 86,251,229,139,242, 48,104,211,182, 61,126,251,229,123,187, 19, 39,
+143, 20,222,189,143,125, 85,167, 98,176, 3,112,225,242,148,125,202,210,223, 90,230,100,102,218,181,105,219,222, 42, 77,163,133,
+ 43, 30, 53,118,149,223,163,165,114,190, 76, 77, 73, 95,190,121,221, 27,201, 0,240,221,178, 53,129, 25, 5,166, 25,241, 9,247,
+134,172, 92,117,186,189,209,194, 21, 91,163,249, 47,211,178, 73, 5, 10,125,118,118,246, 21, 95, 95,223, 70, 81, 67, 76,115, 67,
+130,200,224,252, 34, 62,155, 16,242, 78,118,118,118,178,181,121,239,220,169, 43, 78, 30,221,130,141,235, 55,169, 41, 47,212,187,
+186,186, 82, 0,184,123,215,149,222,189,171,164, 64,197,124,141, 78, 90, 55, 69,225,231,115,231, 76,157,169,209,104,150,255,252,
+109,237, 19,206, 54,111,209, 1,205, 91,116,192,244,119, 62,113, 12, 11, 15,245, 7,128, 29, 59,168, 37, 34,152,252, 57,239,179,
+ 5,131, 63,255,124, 1,212, 26, 3, 62,255,252,225,178, 58,137,177,241,127, 37, 37, 81, 35,171,154, 30,103, 30,199, 93,193,204,
+153,193,229, 37, 37,110,157, 63,250,200, 85,244,237,183,130,234, 58,185, 87, 68,176,170,222,191,214,104, 30, 62,113,226,175, 15,
+102,206,204, 94,250,237,183,125, 22, 47, 89, 98,211,172, 89, 51,228,229,229, 33, 52, 52, 20, 62, 62, 62,184,112,225, 2,142, 28,
+ 60,168, 45,211,233,230,122,122,122,174,180, 70,243,199, 45, 91, 18,187,244,232, 81,180, 97,195, 6,239, 30, 61,122, 16,173, 86,
+ 11,149, 74, 5,149, 74, 5,131,193, 0,137, 68,130,236,236,108,154,145,153,121, 55, 43, 43,107,149,181,121,183, 20, 22,202,103,
+101,100,100,137,214,173, 91, 50,101,242,228,217, 51,103,205,146,249,250,250, 18,131,193, 80, 25,197, 50,153, 76, 80, 40, 20, 38,
+141, 70,227, 2,160,220, 26, 77,217,159,127,114,197,197,197,112,113,113,169,156,118,169,234,188,130, 90,173, 22,148,178, 73,112,
+235,245,162, 80, 83, 29, 30, 26, 26,122, 93, 36, 18,249, 86,141,102,213,244,179, 74,101,156, 21, 27, 27,219,166,170,195,165,148,
+ 86,219,223,201,215,215, 55,144,231,249,175, 94,122,233,165, 17,111,190,249, 38, 57,115,230, 12, 78,158, 60, 73,179,178,178,118,
+ 10, 4,130,185, 89, 89, 89,201, 53,189,217,212,164,217,160, 65, 3,123,123,123,251,247,109,109,109,163, 43,166, 98,144,203,229,
+ 49, 90,173,246,184, 70,163, 89, 81,211,236,237,181,105, 54,110,220,216,129,231,249,247,108,109,109,123, 21, 21, 21,181, 4, 0,
+ 87, 87,215, 91, 90,173,246,152, 64, 32,248,190,166, 5,164,107,211,244,246,246,182,177,179,179,251,178, 65,131, 6,175,190,249,
+230,155, 46,103,206,156,201,189,117,235,150, 68,173, 86,111,230, 56,174,198,197,158,171,211, 12, 11, 11,123,108, 45,194,231,121,
+141, 0,160, 69,139, 22, 7, 6, 13, 26, 52, 96,236,216,177, 48,155,205, 88,185,114, 37,142, 29, 59,246,215,253,251,247, 7,214,
+246,246,249,164,166,167,167,167,171,143,143,207,233,113,227,198, 5, 12, 29, 58, 84,225,224,224, 0,161, 80, 8,173, 86,139,148,
+148, 20,220,185,115,135, 30, 59,118,172, 44, 46, 46, 46, 75,167,211,117,203,203,203, 43,178,246,124, 62,203, 91,242,147,154, 98,
+177,184,171,159,159,223,214,249,243,231,219,247,234,213,203,198,197,197, 5, 66,161, 16,102,179, 25,185,185,185,136,141,141,197,
+145, 35, 71,180, 59,119,238,212, 22, 23, 23,143,166,148,158,249, 79,164,243,121,106,134, 53, 37,159, 61,177,128,115,141,179,179,
+215,182,175, 53,233, 28, 16,237,220,127,196,136,182,209, 0,176,107,215,181,227,127, 29, 47, 61,248,180,233,172, 43,173,214,104,
+ 54, 11, 22,206,143,139,143,125,108, 34,202,240,176,136,123,205, 34,135,127, 97,141, 86,197, 76,238, 79,230,189,202,236,248, 85,
+222, 8, 30,111, 78,173, 88, 16,250,147,185,115,240,213,151, 95, 99,223,142, 61,127,197, 39,209, 3,255,203,101,233,239,212,172,
+ 88,156, 88,225,229,213,101,139,171,235,156,163,199,143,219, 85,125, 81,171,136, 52, 87,125,153,108,217,178,101,193,173, 91,183,
+ 60,172,209, 28,248,227,143, 38,189,189,189,108,241,170, 85, 93,203,141,198,174,179,102,205, 18,221,184,113, 3, 91, 54,109,226,
+116,153,153,155,242, 44,150,247,170,107,253,168, 77, 51,232,131, 15,228, 95,109,222, 60,177, 97,227,198,238, 67,134, 12, 17, 11,
+133, 66,104, 52, 26,228,228,228,224,226,133, 11,198,148,212,212,248,242,242,242,193, 89, 89, 89, 57,214,106, 14,252,241, 71,147,
+ 83, 96, 32, 20,110,110,244,194,165, 75,142, 31,206,159, 63,213,211,203,203,177,115, 84,148, 88,161, 80,160,180,180, 20, 25, 25,
+ 25, 56,119,238, 92, 65,114,114,178, 55,165,212, 98,141,230,254,152,152,230, 39,175, 92,121,249,195, 15, 63,148,134,132,132,192,
+222,222, 30, 26,141, 6,241,241,241,184,120,241,162, 97,235,214,173, 42,173, 86, 59, 53, 51, 51,115,255,223,117,221,255, 49, 6,
+235,255,235,198,243,244,244,108, 35, 16, 8, 62,123,212, 28,181,168,174, 53,253, 94,164,135,142,151,151,151,191,179,179,243,111,
+ 58,157,142, 26, 12,134, 41,185,185,185, 25,255,109,233, 36,132,136,218,180,105,243, 75, 65, 65,193, 75,148, 82, 56, 58, 58, 94,
+140,139,139,123,139, 82,202,213, 87,147, 16, 34,244,244,244,124,201,214,214,182,189,173,173,109, 87,147,201,212,236, 81, 63,188,
+187,229,229,229,103,204,102,243,149,188,188,188,139,148, 82,203,127, 50,239,132, 16, 33,128, 94,222,222,222,111,240, 60,223,132,
+ 16,226,100,177, 88, 96, 54,155,149, 60,207, 63, 80,169, 84,107, 0, 28,251, 79,167,243,121,105,134, 55, 33,195,168, 0,205,106,
+ 50, 2,143, 25,154, 39,140, 3,225,113, 55,238, 1,221, 99,109, 58, 9, 33,130,161,253,220,150, 2, 15, 71, 26,214,181,228,208,
+ 99, 6,203, 10,211, 82,111,115,217, 68,244, 26, 37,212,255,241,135, 34,201, 8,109, 62,108,227,179, 24, 44,107, 9, 15, 33, 93,
+ 65,241, 18, 79,113,229,238,125,122,242, 69,125,214, 61, 79,205,175, 9,105,176,163,105,211,139, 2,145,200,147, 16, 34, 0, 0,
+ 34, 16,240, 60, 96,129, 64,192, 85,109, 22,172,250, 66, 89,151,166, 9,136, 20,203,100,126, 22,142,243, 40,145, 72,236, 46,216,
+218,182, 54, 0,101,158, 22,203,103,199,139,139, 19,159, 38,157, 38, 32, 82, 40,147,249, 95,176,183, 31,162,116,118,110, 94,106,
+ 50,185, 1,160, 54, 54, 54,119,203,202,203,215,167,165,165,253, 92,205,162,234,117,106, 74,100, 50, 95,203,163,145,135, 2,145,
+168,224,136, 76,230, 87,232,230, 54,190, 92,167, 11,144,203,229,102, 74,169,218,100, 50,141,205,200,200, 56, 81,159,188,103, 8,
+133, 97,119,236,237,163, 44, 14, 14, 46,102, 66,108,141, 22,139,201,100, 54,103, 26, 12,134, 24,161, 80,184, 44, 43, 43, 43,233,
+239,188,238, 47, 28, 21,163,205,254,142, 13, 64, 52,211,100,154, 76,147,105, 50, 77,166,201, 52,255,126, 77,119,119,119,133,167,
+167,167, 63, 0,225,255, 98,222, 95,180, 77,196, 44, 38,131,193, 96, 48, 24,255,251,228,231,231,151,163,154, 62, 87,140,255, 80,
+ 19, 33,128,232, 26, 34, 91, 86,135,254,158,102, 52,129, 21, 77, 9, 76,147,105, 50, 77,166,201, 52,153, 38,211,124,193, 52,235,
+210,126, 97,154, 30, 89, 19, 33,211,100,154, 76,147,105, 50, 77,166,201, 52, 89, 19,225,243,221, 4, 96,212,228,172, 61, 8, 33,
+ 30,207,123, 95,198,139, 93, 22,170,249,174, 15, 33,196,167,158,251,123,177,179,206, 96, 48, 24,255,219,252,191,247,193,170,168,
+168, 40,165,249,207, 99,191,231,253,221, 71,223,255,154, 16,124,248,232,243, 55,148,210, 57,207, 99,223,186,240,246,246,246,107,
+208,160,193,107,174,174,174,157,138,139,139,207,230,230,230,174, 45, 42, 42,202,173,199,247,131,229,114,249, 91, 2,129, 32, 2,
+ 0,120,158,143,213,235,245,191,228,228,228,220,127, 14,215,141, 0,152, 44,147,201, 94,113,118,118,110, 82, 82, 82,242,192,104,
+ 52,238, 0,240,235,211,204, 58,237,229,229,213,218, 98,177,188,139,135, 35, 89,127, 45, 44, 44,188, 96,237,119, 61, 34,134,110,
+167, 64, 48, 0, 1, 79,248,151, 5, 84,176, 19, 0, 79,128,251,249,177,123, 95,121,206,229,245,169,175,111,125,191, 75, 8, 89,
+ 70,128,247, 65, 64,159,181, 44, 49, 24, 12, 6,227,127,200, 96,249,248,248, 76, 0, 48, 27, 15,103,218,254, 46, 59, 59,123,253,
+223, 81, 89, 61,199, 74,109, 5,165,116, 86,253,163, 21,248,144,231,169, 0, 0, 4, 2,242,145,135,135, 71,132, 72, 36, 50, 60,
+185, 47,199,113, 50, 66,208,151,231, 41,121,180,239,135,132,144,239,159,198,216,185,184,184,120,143, 25, 51,102,211,231,159,127,
+110,163, 80, 40,144,145,145, 49,116,206,156, 57,209,222,222,222,227,115,114,114, 50,235,250,126,227,198,141,199, 68, 54,111, 57,
+115,206, 39,159,217,185,185,187,219,114,156,197,148,153,157,165,248,246,235, 69,237, 27, 55,110,252,125, 74, 74,202,150,250, 24,
+ 41,145, 72,244,138, 92, 46, 15,210,235,245, 73, 28,199,237, 20, 10,133,125,190,252,242,203,136,254,253,251,203,213,106,181,148,
+227,184, 38, 27, 55,110,156,249,199, 31,127,244, 35,132, 12,169,109,184,125, 69, 4,135, 82,154, 93,229,220,189,117,227,198,141,
+ 30, 98,177,152, 60, 90,180,249, 66,109,251, 87,133, 2,193,113,231,119, 68, 2, 64,120,231,145,247,226,206,239,192,163,207,207,
+253,101,224,201,178,224,236,236,188,185,180,180, 52,190, 46, 35, 95,221,119, 9, 33, 63, 80, 74,243,188,189,189, 59, 1,120,235,
+209,174,191,228,228,228, 92, 32,132,120,202,101,178,247,117,122, 61, 1, 64,158,165, 44, 49, 24, 12, 6,227,127, 47,130, 53,231,
+222,189,123,246,148, 82,132,132,132,124, 12,192,106,131,245,100,133, 35, 20, 10, 62,238,213,171,215, 68,153, 76,246, 88,197,108,
+ 48, 24, 4, 2, 1,113,183, 88, 30,254,185, 62, 21, 77,197, 49,140, 70,131, 64, 44,150, 66, 40, 20,204,108,217,178,101,191,252,
+252,252, 67, 50,153,236,155,212,212,212,130,167,137,220,172, 95,191,190,149,139,139,203,191, 25,136,226,226, 98, 65,191,126,125,
+ 73,125,244, 38, 18, 34, 51,200,100,237, 37,132,120, 89, 56,206, 9, 0, 68, 34, 81,105, 19, 15,143,174,159,206,153, 99,243, 72,
+ 23,101,101,101,120,237,181,215, 20, 15, 30, 60, 24, 11,224,171, 58, 34, 87, 77, 91,180,106, 51, 99,203,230, 77,205,212, 37,165,
+250,213,203,127,189,161, 19, 73,202, 27,133,133, 74, 22,125,189,204,249,211,143,102,190,227,237,237,125,171,186,101, 67,158,200,
+171, 0,192,158,247,223,127, 63,124,224,192,129, 82,141, 70, 35,215,233,116, 13, 55,109,218,244,105,155, 54,109,236, 90,182,108,
+ 41,221,186,117, 43, 81,169, 84,160,148, 42, 66, 67, 67,233, 43,175,188,162,223,182,109,219,116, 0, 63,212,199, 44,243, 60, 47,
+172,174, 28, 90, 99,174, 9,112, 63,188,243, 72,128,160, 73,220,249, 29,242,240,168,145,122, 80, 60, 32,192,253, 71, 47, 2,159,
+ 3, 85,230,117,122,156,187,217,217,217, 79,181,118,224,128, 1, 3, 9,165,116,143,183,183,247,137,162,162, 34,123, 66, 48,186,
+ 30,209, 41,226,230,230,246, 14,128, 79, 40,165,239,159, 58,117,170, 35, 0,116,239,222, 93, 2,224,130,163,163, 99, 79,163,193,
+ 64,216, 35,137,193, 96, 48,254,129, 6,139, 82, 42, 3,128,115,231,206,129, 82, 42,127,154,160, 64,213, 95,102,205,154, 5, 23,
+ 23,151, 39, 77, 11, 78,158, 60, 81,227,119,234,123,140,175,191,254,218,169,160,160, 96,244,239,191,255, 62,212,211,211,243,237,
+188,188,188,195,117,228, 49,159, 16,242,205,163,136, 3,145,203,109, 74, 39, 77,154,116,241,209,255,154,253,249,231,159,246,131,
+ 6, 13,210, 16, 66,238, 2,128, 92,110,211, 85, 40, 20, 56, 83, 74, 41,165,248,166, 54, 35, 56,146,144, 64,169, 84,218, 99,202,
+143, 63,114,173, 7, 13, 18,217,186,185, 17, 0, 72, 79, 72,112,253,225,167,159,186, 40, 51, 51,101, 34,123,251,178,252,210, 82,
+227,189,123,247, 32,151,203,137, 64, 32,232, 84, 87,134, 21, 10,197,187,179,102,127,108,171, 46, 81,234,244,106,141, 81,200,153,
+ 13,246, 54, 10, 75,126, 94, 65,177,157,141,109,249,228,183,223,149,206,255,100,246,187, 85,162, 38, 53, 49,125,230,204,153,205,
+218,181,107,231,179,125,251,118,162, 82,169, 32, 18,137,236, 90,182,108,137, 54,109,218, 88, 78,158, 60, 73, 26, 53,106,132,136,
+136, 8,156, 63,127, 30, 23, 47, 94, 36,173, 90,181, 82,236,222,189,123, 92,117, 6,171, 58, 83, 61,102,204,152,137, 82,169,148,
+239,218,181, 43,222,120,227, 13, 80, 74,209,170, 85,171, 78,227,198,141,203,213,233,116, 86,153,235,138,102, 64,247,136,161,119,
+ 0, 68,130,226, 65, 65,236,222,230, 85,118,105,150,152,152,216,161,180,180,180,178,179, 97,197,194,226, 93,186,116,169, 79,121,
+207, 39,132,124, 51,104,208,192,143, 1,130,232,232,232,178,233,211,167,211,196,196,196,222, 67,135, 14,105,116,255,254,131, 26,
+211,249,100, 57,154, 58,117,154, 86, 44, 22,191,230,237,237, 29, 79, 8, 17,139,197,226,138,115, 36,106,216,176,161, 71,100,100,
+228, 28, 47, 47,175,114,161, 64,160,160,168,187, 44, 49, 24, 12, 6,227, 5, 50, 88,132,144,156,219,183,111, 55, 44, 47, 47, 7,
+ 33, 36,199,138, 10,234,120,213, 10, 71, 36, 18,253, 38, 20, 10,166, 0, 64,219,182,237,180, 75,150, 44,169,174, 89,137,111,219,
+182,157, 86, 40, 20,216, 62,172,188,132,191,114, 28,151, 95,157,102, 13, 21,226,183, 82,169,236, 3, 0,196,215,215,175,108,223,
+190,125,252,136, 17, 35,240,237,183,223,202, 62,254,248,227,159, 27, 54,108,216, 61, 45, 45, 45,189,166,116, 62,250,125,142,135,
+135, 71,196,250,245,235, 91, 77,154, 52,233, 98,118,118,246,240, 71,145,145,221, 0, 58, 16, 66,238, 86,253,219,238,221,187, 95,
+154, 48, 97,194,205,252,252,252, 57, 53,105,142, 32, 36, 40, 32, 52,180,199,231,103,207, 82,129,193, 64,138,206,157, 83,151, 20,
+ 22,154,146,138,138,108, 55,199,196,140,254,112,225, 66,137,167,143, 15, 46, 28, 61,106,159,167, 84,106,148,229,229,198,212,212,
+ 84,222, 98,177,156,176, 34,239,225,110,174,174,138, 95,151,173,188,102, 47, 22,242,238,190, 62, 68,220,160,129, 72,160,112,144,
+ 10, 69, 2, 67,163,134,129, 82, 0,225,117, 93, 35,137, 68, 50,174,119,239,222,138,109,219,182,145,136,136, 8, 56, 57, 57,225,
+220,185,115,184,117,235, 22, 74, 75, 75, 5,102,179, 25,109,219,182,197,146, 37, 75,224,239,239, 15,165, 82,137,140,140, 12, 87,
+169, 84,234, 86,203,249, 36, 85,202, 15, 62,250,232, 35,184,185,185,193,108, 54,163,164,164, 4, 22,139, 5,182,182,182, 0,128,
+188,188, 60,236,219,183,183,206,178,100,165, 57, 66,199,142, 29, 43,141,112,213, 8, 86,125, 52,125,124,124,206, 21, 22, 22,141,
+236,209,163, 7, 74, 74, 74,184, 5, 11, 22,160, 69,139, 22,104,218,180,169, 53,101,126,142, 76, 38,251, 35, 32, 32, 96,221,212,
+169, 83, 27, 58, 59, 59,195, 96, 48, 44, 45, 46, 46,198,135, 31,126, 8, 0,104,215,174, 93, 91, 74,233,173, 73,147, 38,161, 97,
+195,134,154,188,188,188,162, 59,119,238, 12, 85, 42,149,119,158, 54,239, 86,158, 31,166,201, 52,153, 38,211,252,175,210,252, 71,
+ 27, 44, 0,249, 62, 62, 62, 13,109,108,108, 0,160,222,111,215, 28,199, 77,117,119,119, 23,124,250,233,167,131, 26, 55,110,204,
+ 79,159, 62,253, 66,106,106,234, 99, 29,103, 26, 53,106,180,227,167,159,126,234,148,146,146, 82,254,197, 23, 95,252, 89, 80, 80,
+ 48,173,158, 23,253, 35, 66,200,114, 0,200,204,204, 44,222,187,119,111,212,217,179,103,191, 94,190,124,185,239,244,233,211,101,
+211,167, 79,255, 8, 64,157,154, 34,145,200, 80, 93,179, 96,117,184,184,184,240,213,245,209,170, 96, 16, 33, 54, 14, 82,105,247,
+207,207,158,165,198,180,180,242,109, 63,255,108,179,234,218,181,121,102, 74,189, 60, 60, 60,132, 93, 59,119, 54,216, 75,165,154,
+252,156, 28,222,217,215,151,164, 36, 37,217,153,133, 66,211,225,195,135,203, 10, 11, 11, 55, 89,145, 4, 53, 79,169,209,206,215,
+223,252,242,208, 94, 17,215,174,220, 74,176,119,119, 21,180,106, 25,209, 60,225, 94,218, 13,240, 22, 19, 0,117, 93, 34,142,142,
+142, 77,139,139,139,161, 86,171,225,230,230,134, 21, 43, 86,192,211,211, 19,229,229,229,136,139,139,163,190,190,190,228,236,217,
+179,240,245,245, 69, 97, 97, 33,140, 70, 35, 52, 26, 77,129,193, 96,208,213,100,120, 69, 34,209, 31, 2, 1,153, 68, 8, 65, 72,
+ 72,168,118,249,242,229, 60,165, 20,205,154, 53,195,240,225,195,177,107,215, 46,196,197,197, 85, 68,154,248,160,160, 38, 90,129,
+128,216, 2,224,159, 37,138,195,243, 60,170, 26,225,250,226,237,237,109, 3,224,195,224,224,224, 81,175,190,250, 42, 39,145, 72,
+160,213,106,161,211,233, 16, 27, 27,203, 13, 24, 48,176,108,208,160,129,118,127,253,245, 87,173,233, 52, 24, 12, 73, 1, 1, 1,
+ 35,102,204,152,113,244,215, 95,127,117,153, 59,119, 46,120,158,175,220, 56,142,171, 92,148,123,239,222,189,120,240,224,193,156,
+170,230,138,193, 96, 48, 24,255, 12,131,245,204,136,197,226,207,255,250,235,175,222, 95,125,245,149,184,103,207,158,157,188,189,
+189, 95,202,201,201,185,248,168, 82,123,169,127,255,254,157,220,221,221,241,253,247,223, 27,197, 98,241,231, 79,233,172,171, 86,
+118,167, 60, 61, 61,167,239,222,189,123,255,148, 41, 83,224,229,229,213,254,255, 59,207, 14, 50, 89,171, 73, 43, 86,112, 98,179,
+ 89,176,245,215, 95,101, 95,157, 56,177, 98,219,246,237,226,118,109,219,130, 2,136,143,139,147,125,243,227,143,178,145, 3, 7,
+ 22,196, 61,120,128,195,199,143, 27,149, 37, 37, 57,133,106,245,236,252,252,252, 66, 43,140,235,165,148,212, 20,239,168,174, 29,
+125,206, 92,141,189,245,242,208,254, 61,196, 34, 1,121,144,150,117,221,203,211,213,241,226,249,243, 58,142,227, 46,213,165,163,
+213,106, 83, 57,142,107, 64, 41,117, 59,125,250, 52,220,220,220, 80, 90, 90, 10,179,217, 12,163,209,104, 44, 47, 47,151, 23, 23,
+ 23, 67,175,215,195, 96, 48,192,193,193, 1, 49, 49, 49,249, 28,199,157,172, 37,109,111, 16, 66, 22, 80, 74, 17, 31, 31,159, 13,
+ 0,126,126,126, 97, 78, 78, 78,199, 42, 22, 80, 62,123,246,108,239,172,172,172,184, 42,145,174, 90, 59,185, 91, 27,193,122, 90,
+188,188,188, 90,203,229,242,111, 62,254,248, 35,239, 22, 45, 90,160,176,176, 8, 60,207,195,206,206, 14, 58,157, 14,246,246,246,
+232,212,169, 83,222,130, 5, 11, 82, 40, 69, 63, 74,105, 94,109,122,233,233,233,121,254,254,254,163,167, 76,153,242, 99,112,112,
+112, 83, 74, 41,130,131,131,209,187,119,111, 28, 58,116, 8,247,238,221, 67, 89, 89, 25,119,245,234,213,213, 57, 57, 57,219,216,
+ 99,137,193, 96, 48,152,193,170, 55,217,217,217,217, 62, 62, 62, 27,110,222,188, 57,233,149, 87, 94,193,169, 83,167,230, 2,232,
+ 7, 0,114,185,124,238, 43,175,188,130,155, 55,111,226,238,221,187, 27,178,179,179,179,159,199, 49,165, 82,169,214,104, 52,226,
+209, 49, 20,245,172,168,155, 61,106, 26, 4,165,180, 89, 77,127,171, 13,129, 72,228, 21,217,183,175,168,244,214, 45,245,242,243,
+231, 23,109,217,186, 85,220,190, 93, 59,152,204,102,240, 22, 11,252,252,253,209, 35, 58, 90,182, 97,251,118, 91, 78,171,189,240,
+217,123,239, 29, 90,249,218,107,101,151,203,202, 30, 88,147, 70,173, 86,251,195,103,159,124, 20,189,109,251, 46,159,176,208,160,
+ 6,135,143,158,186,233,226,226,168,104,218,164,137,173, 82,169,178, 44, 91,250,149,168,172,172,236,199,186,116,116, 58,221,158,
+227,199,143, 15,245,243,243,115,139,141,141,133,209,104,132,197, 98, 65,207,158, 61, 43,250,223,241, 34,145, 8, 9, 9, 9, 48,
+153, 76, 5,247,239,223,207,121,240,224,129, 12,192,226, 58,206,225,147,215,113,210,128, 1, 3, 96, 54,155,209,187,119,111,236,
+221,187,247,117, 0, 51,106,217,255,169, 12, 86,213,235, 4, 43, 59,183,123,123,123,247,106,210,164,201,247, 75,150, 44, 17,248,
+250,250,130,231,121, 56, 59, 59,163,188,188, 28, 69, 69,197, 8, 11, 11,131,159,159, 31, 22, 47, 94, 12, 0, 91,235, 50, 87, 21,
+100,100,100,220, 5,208, 61, 40, 40, 72,170,215,235, 59, 69, 71, 71,111,236,217,179, 39,110,222,188,137,139, 23, 47,246, 32,132,
+228,233,245,122,179,143,143,207, 44, 0, 78,148,210,223,172, 25, 61,202, 96, 48, 24,140,255,113,131, 21, 20, 20,100, 47, 22,139,
+186, 77,155, 54,213,206, 98,225, 33, 22,139,186, 55,108,216,208, 49, 45, 45, 77,245, 20,149,223,247,155, 54,109,122,117,217,178,
+101,178, 1, 3, 6, 52,247,242,242,234, 13, 0, 35, 71,142,108,238,224,224,128, 77,155, 54, 25, 40,165,223, 63,175, 76,114, 28,
+ 55,180, 77,155, 54, 40, 41, 41, 65, 90, 90,218,197,250,124,247,207, 63,255,180, 7,208,161,174,191,213,122,124,163,209,217,201,
+199, 71,144,125,234,148,169, 68,173,246,174, 48, 87, 2,129, 0, 37, 37, 37, 72, 79, 75,131,131,189, 61,226, 19, 19,101, 43,223,
+125,119, 91, 64, 68,132,216, 98, 52,186, 88,171, 95, 88, 88,168,245,244,244,156, 56,239,179, 79,247,252,248,211, 79,110, 74,181,
+ 58,201,198, 70, 97,144,201, 36,158,243,230,205,181,168, 84,170, 9, 69, 69, 69,101, 86, 72, 45,222,188,121,115,223,190,125,251,
+222,241,247,247,119, 47, 44, 44,244, 84,169, 84,180,164,164,132,224, 97, 95, 42, 2, 0,119,238,220, 65, 90, 90, 26,103,177, 88,
+206, 2,248,156, 82,106,180, 54,173,222,222,222, 46, 29, 59,118, 28,230,238,238, 94,217, 20,217,178,101,203, 97,222,222,222, 95,
+230,228,228, 20, 63,207,194,125,236,216, 49,123, 74,105, 7, 74, 41,250,246,237,107,237,215,222, 26, 56,112,160,128, 16, 2,157,
+ 78, 7,153, 76, 6, 91, 91, 59,216,219, 59,160,105,211, 16,100,103,103,163,119,239,222,150,164,164,164, 45, 18,137,228,135,250,
+166, 73,167,211,141,233,212,169,211,194,105,211,166,129,231,121, 12, 25, 50, 4,153,153,153,235, 82, 82, 82,214,248,250,250, 78,
+155, 52,105,146,135,139,139, 11,102,205,154,165,168,106, 58, 25, 12, 6,131,241, 2, 26, 44,111,111,239,104,103,103,231,165, 78,
+ 78, 30,118, 71,142, 28, 21, 1, 64,215,174, 93,108,205,102,238,146,183,183,247,199, 57, 57, 57,127,214,231,160, 57, 57, 57,197,
+222,222,222,191, 94,188,120,241,189,225,195,135,227,216,177, 99,159, 0,192,240,225,195,113,241,226, 69,164,164,164,252,250,188,
+ 42, 91, 31, 31,159, 9, 93,187,118,125,187, 93,187,118, 56,112,224, 0, 44, 22,203,193,250,124,191,234,136,193,234, 70, 17, 86,
+252,205, 42, 49,161, 16,132, 16, 88, 44, 22, 80,158, 71, 81,113, 49, 18, 18, 19, 81, 90, 90, 10,139,197, 2, 93,121,185, 57,184,
+113, 99,173,202,104,116, 32, 15,231, 26,179,154,188,188,188,244,160,160,160,140,114,189,206,221,197,185,129, 78,161,144, 65,163,
+ 41,147,196,220,185, 85,150,149,149,149,100,165,241, 53, 18, 66,186, 30, 58,116,104,158, 80, 40,124,197,199,199, 7, 35, 71,142,
+ 36, 61,123,246,132, 84, 42,133, 94,175, 71,105,105, 41,254,252,243, 79,112, 28,215, 24, 0,220,220,220, 60, 26, 54,108,184, 75,
+ 32, 16,228,167,164,164, 76,170,235, 24,132,144,241,131, 6, 13, 18, 27,141, 70, 44, 90,180, 8,243,231,207, 71,191,126,253,196,
+ 55,110,220, 24, 15, 96,217,243, 42,216, 60,207,163, 87,175, 94, 85, 59,185,223,173,235, 59,221,186,117, 19, 9,133,194,144,160,
+160, 32, 20, 22, 22,162,176,176, 16,110,110,110,240,246,246,134,187,187, 59,150, 45, 91,134, 21, 43, 86, 92,165,148, 46,206,203,
+203, 75,168,111,154,252,252,252,102,189,246,218,107,179, 70,141, 26, 5,141, 70,131,139, 23, 47,162, 83,167, 78, 88,178,100,137,
+239,185,115,231, 22,182,105,211, 6, 18,137, 4,167, 79,159, 6,199,113,169,236,241,196, 96, 48, 24, 47,168,193,242,241,241,105,
+192,243,252,151, 3, 7, 14, 28, 52,108,216, 48, 44, 89,178,184,138, 87, 16, 97,237,218,117,142,187,119,239, 94,229,231,231, 55,
+ 76, 40, 20,126,156,150,150,102,117,135,100, 27, 27,155,149,155, 55,111,158,216,177, 99, 71,251,232,232,232, 96, 0,144,201,100,
+252,230,205,155, 53, 54, 54, 54, 43,235,155,145, 39, 39,125,244,242,242,234, 44,149, 74,167, 15, 26, 52,168,243,196,137, 19, 17,
+ 23, 23,135,141, 27, 55,222,246,246,246,222, 95, 79,221,187,117,141, 34,172, 43,154, 37,148, 74,139,149,121,121, 78,118,254,254,
+ 98, 23, 71,199,156, 83,167, 78, 5,180,111,223, 30,233, 25, 25, 80,150,150, 66,167,211, 33, 46, 46,142, 74, 68,162, 20,145,179,
+ 51, 73,191,116,137, 8,165,210,122, 27, 76, 91, 57, 9,254,236,195,201, 13,245,122,125,184, 74,165,226,196, 18,137,216, 70, 74,
+235,213,204, 68, 41, 53,248,251,251, 15,177, 88, 44,174, 70,163,209,236,225,225, 33, 62,126,252, 56,164, 82, 41, 8, 33,136,140,
+140,132, 84, 42, 53,250,250,250,106, 0,192,197,197, 69,176,120,241, 98,241,251,239,191, 31, 87,151,118,235,214,173,197, 1, 1,
+ 1,147, 66, 66, 66,112,241,226, 69,196,199,199, 39, 94,190,124, 57,164, 85,171, 86,240,241,241,153,212,186,117,235, 31,111,220,
+184, 97,126, 30, 5,155, 82, 90,239, 78,238,103,206,156,161,222,222,222, 16, 8, 4, 16, 8, 4,224,121, 30,133,133,133,104,220,
+184, 49, 86,174, 92,137, 21, 43, 86,252,146,155,155,251, 84,145,213,160,160, 32,105,139, 22, 45,222, 30, 53,106, 20,146,146,146,
+240,213, 87, 95, 21,228,231,231, 31, 60,122,244,232,248,105,211,166,137, 58,117,234,132,226,226, 98,172, 93,187,214,124,243,230,
+205, 31,114,115,115, 87,178,199, 19,131,193, 96,188,128, 6,203,207,207,111,162, 92, 46, 95, 56,106,212, 40, 81, 72, 72, 8,242,
+243,243,161,209,148, 89, 34, 35, 35, 44, 0,161,118,118,182, 68,161, 80, 96,202,148, 41,104,222,188,121,175,143, 62,250,168,167,
+183,183,247,215, 57, 57, 57, 63, 91,115,224,164,164, 36,141,183,183,247, 15, 51,103,206, 92,114,233,210, 69, 91, 0,184,117,235,
+150, 54, 39, 39,231,139,156,156, 28, 77, 61, 77, 80,197,228,148,196,214,214,246,126,147, 38, 77,204, 3, 6, 12,112, 25, 54,108,
+ 24, 92, 93, 93,113,243,230, 77, 44, 94,188,248,166, 86,171, 29,147,150,150,102,254,255, 62,201,156,193,144,119,125,239, 94,251,
+110,175,190,234,240,225,208,161, 95,189,249,230,155, 63,207, 95,176, 64, 28, 20, 24, 8,163,201,132,248,248,120,186,117,203, 22,
+211,150, 37, 75,190,131,173,173,248,210,174, 93, 82,163,209,152, 94,159, 99,248,250,250,118,237,223,183,107,200,210,101, 63, 64,
+175, 43,195,149,139,127,161,180,180, 16,191,254,182, 59,196,215,215,183,107, 86, 86,214, 25,171,211,203,113,129, 59,119,238, 4,
+ 0, 72,165, 82,124,254,249,231,240,246,246,134,131,131, 3, 52, 26, 13, 38, 79,158, 44,125,255,253,247, 1, 0,113,113,113,176,
+179,179,179, 54,202,214,127,242,228,201, 78,102,179, 25,135, 14, 29,210, 75, 36,146, 87,143, 30, 61,122,177,121,243,230,242, 46,
+ 93,186, 56,109,220,184,113, 0,128,189,207,203, 96, 61,197,119, 44, 62, 62, 62, 41, 71,143, 30,109, 60,114,228, 72, 72, 36, 18,
+148,150,150,194,193,193, 1, 63,253,244, 19,175, 80, 40,214, 62, 67,146,164, 10,133, 66,102,177, 88,176,125,251,118,228,231,231,
+ 15,172,232,143, 56,123,246,236, 47, 66, 67, 67,131, 18, 18, 18,146,245,122,253,220,236,236,236, 7,236,209,196, 96, 48, 24, 47,
+168,193,226,121,254,195, 35, 71,142,136, 44, 22, 11, 86,175, 94,141,107,215,174,209,252,252,252,239, 76, 38,211,215, 10,133,130,
+ 43, 41, 41,153,253,230,155,111, 78,157, 63,127,190, 32, 42, 42, 10,151, 46, 93, 18, 52,110,220,120, 58,128,159,171, 24,159,232,
+218,230,202, 40, 45, 45, 61,152,151,151,251, 51,207, 63,172, 12, 5, 2, 98, 43,149,202, 14,214, 97,166, 30,211,172,102, 50,203,
+166, 95,127,253,117,129,139,139, 11, 31, 23, 23,135,149, 43, 87, 90,174, 95,191,190,139,231,249, 79,139,138,138,202,173,209,124,
+ 30, 84,213,148,114,220,141,141,179,103, 55,107, 61,100, 8, 63,252,141, 55, 12, 2,145,232,173,175,150, 47,255,164, 84,169,244,
+ 6, 33,212,213,217, 57,125,205,151, 95, 46,122,169,123,119,125,220,153, 51,242, 91,199,142,137,221,204,230,219,245, 73,103, 86,
+ 86,214,153,224, 32,127,172, 91,189, 12, 38,147, 1,185,217, 15,253, 89, 81,177, 10,181,153,171,234, 52, 5, 2,129,242,181,215,
+ 94, 83, 24,141, 70, 50,122,244,104,113, 65, 65, 1,130,130,130, 0, 0,106,181, 26,127,253,245, 23, 66, 67, 67, 1, 0, 49, 49,
+ 49,149,159,235, 74,167,141,141,205,164, 78,157, 58, 33, 61, 61, 29,241,241,241, 59,115,114,114,242,189,189,189,119,166,167,167,
+143,111,219,182, 45,118,237,218,245,122, 77, 6,171,190,215,200, 26,131, 85, 67,222,223,216,189,123,247, 7,151, 46, 93,234, 59,
+107,214, 44,210,189,123,119, 0, 64, 89, 89, 25,159,155,155,171,121, 26,205,170,105,226, 56, 14, 0, 32,151,203, 53, 0,240,200,
+ 76,141,124, 90,205,231, 81, 62,153, 38,211,100,154, 76,243,191, 65,243, 31, 99,176, 0,152, 44, 22, 11,206,156, 57,131,221,187,
+119,115,122,189,126,120, 94, 94,222,245, 42,255,255,194,215,215,119,255,136, 17, 35, 14, 38, 38, 38,138,226,227,227, 1,128,171,
+207,193, 13, 6,131,145, 16, 80,252,107, 50, 74,106, 48, 24,140, 79,115,173,171,254,242,251,239,191, 35, 55, 55,215,144,158,158,
+190,149, 82,186, 42, 55, 55, 55,235, 25, 34, 33,207, 60,138,112, 45,165,134, 87, 9, 57, 62,191,115,231, 94,243,142, 29,147,189,
+ 50, 99,134,105,248,168, 81,179, 45, 70,163, 89, 40,145,240, 82, 91, 91,129, 69, 38, 19,199,157, 57, 35,255,126,218,180, 6, 58,
+131,225,240,198,122,116, 28,175, 18,193,194,107,111,204,128,174, 74, 4,235,210,181,123,168,111, 4, 75, 36, 18,249,155,205,102,
+ 25,199,113,217, 60,207, 99,252,248,241,224,121, 30, 58,157, 14, 26,141, 6, 37, 37, 37,250,119,222,121, 71, 0, 0, 10,133, 2,
+189,123,247,150, 90,163, 27, 24, 24,216, 72, 44, 22,227,240,225,195, 16,139,197,235, 1, 64, 44, 22,175, 63,118,236,216,248, 49,
+ 99,198,192,223,223, 63,140, 16, 66,234, 90, 60,186,114,177,103,130, 38,143,174,126, 19,247,136,161,119,170, 44,246,124,183, 85,
+171, 86,128, 21,253,174,158, 36, 51, 51, 51, 23,192, 12, 95, 95,223,181, 31,124,240,193,135,237,219,183,111,179, 96,193, 2, 16,
+ 66,132,207,122,179,241, 60, 15,179,217,252, 76, 83, 72, 48, 24, 12, 6,227,127,223, 96, 45,235,222,189,251, 76, 74,169,136, 16,
+242,237, 19,230,170, 34,106, 18,231,227,227,243, 89,227,198,141, 43, 23,128,174,167,121,201, 39,132, 44, 17, 8,200,135, 15,127,
+175,255,196,146, 85, 52, 62,122,104, 14,196,219,174, 95,191,254, 73,122,122,122, 54,165,148,123,214, 19,244, 60, 70, 17, 2,192,
+102, 74, 83, 71, 19,114,100, 86, 68, 68,116,223,105,211,208,188,111, 95, 7,239,128, 0,139,206,100,226, 99,206,159, 39, 23,119,
+238,148,220, 58,118, 76,172, 51, 24, 14,239,166, 52,163,190,233,204,202,202, 58, 19, 20,232,123,244,229,225,253,123, 7, 54,242,
+ 6, 0, 36,167,230,160,168, 68,117,180, 62,230, 10, 0,210,210,210, 12, 0, 12, 94, 94, 94,195,183,111,223,190,243,145,233,169,
+ 92,118, 6,128, 65, 36, 18, 5, 3,128, 70,163, 9,216,179,103,207,102,145, 72, 84,167,137,189,123,247,238,154,249,243,231, 79,
+ 73, 78, 78,222,154,149,149,149, 8, 0,233,233,233,137, 62, 62, 62,223,228,230,230, 78,205,204,204, 92, 73,173,112, 31, 79, 44,
+246,140,184,243, 59,228, 0, 34, 43, 22,123,126,218,181, 6,159, 56,159,177, 0,198,250,248,248,116,239,211,167,207,116, 0,121,
+207,162,103, 48, 24,204, 6,131,193,204,243,188,216,100, 50, 81,131,193, 96,102,143, 31, 6,131,193,248, 7, 26,172,236,236,236,
+245,176, 98, 49,103,107,247,171,197, 32,205, 33,132,124, 95, 97,150,158, 85,195,100, 50, 61,175,245,219,238, 14, 30, 60,184, 94,
+251,215,181,195, 86, 74,211,223, 37,100,195,129, 31,127,108,121,120,213, 42, 31, 11,199,185, 16,128, 10,165,210, 98,163,209,152,
+230,102, 54,223,174,111,228,170, 42, 73,201, 89,125, 0, 32, 56, 56,152, 62,120,240, 0,148,210,103, 90, 60, 56, 55, 55,247,168,
+175,175,175,187, 72, 36,146, 18,242,152,148,225,145, 9, 3,128, 59,132,144, 48, 0,117, 70,120, 50, 51, 51,151, 3, 88, 94, 77,
+ 25, 90, 1, 96,133,181,233,170, 92,236, 25, 16,240,132,127, 57,188,243,200,157, 0,248,138,197,158,159, 39,217,217,217,167, 0,
+156,122, 14,134, 77,223,176, 97,195, 85, 75,150, 44,153,122,251,246,237,223,179,178,178,244,236,241,195, 96, 48, 24,255, 64,131,
+245,255,201,243, 88,212,246,121, 47,140,251, 60,162, 32,213,241,195, 67, 3,117,249,239, 60,159,247,239,223, 39,207, 75,235,145,
+ 17,208,215,113,238, 41,234,217, 60,252, 44, 84, 44,246, 92,133,136,255,133,155, 45, 45, 45,237,235,214,173, 91, 47,205,202,202,
+ 98,209, 43, 6,131,193,120,193, 17,176, 83,192, 96,252,255,241,188,166,161, 96, 48, 24, 12,198,127, 55, 4, 64,116,117,255,168,
+207,232, 0, 66, 72,116,125, 15, 92,151, 62,211,100,154, 76,147,105, 50, 77,166,201, 52, 95, 60,205,186,180, 95,152,209,137, 85,
+ 59, 47, 63,239, 13, 64, 52,211,100,154, 76,147,105, 50, 77,166,201, 52,153,230, 63,109, 99, 77,132, 12, 6,131,193, 96, 48, 24,
+207, 25, 17, 59, 5,213,211,210, 75,184,200,223,215,189, 77,101,148,143,231, 1, 0,252,163, 89, 4, 42,167, 19,224,121, 80, 74,
+145, 83,160,188,113, 39,159,126,246,180,199, 11,241, 33, 13,220,229,242, 21, 60,165,157, 31,253,233,140,170,216, 48, 35, 86, 69,
+149,214,106, 52,243, 36,205,228, 2,124,192, 83, 52, 7, 0, 1,193, 29, 61,143,111,239,230,209,187,207,122, 62, 8, 33, 36,220,
+ 13,147,165, 54,138, 81,142, 78,206, 77, 74, 75,139,238,155,244,134, 29,241,133,248,149, 62,197,196, 78, 65, 13, 72, 7,158,226,
+ 19, 0, 2,177, 0,223,221, 43,166,167, 88,169, 99, 48, 24,255, 79, 60,235,188,118,150,234, 30,147,207,168,201, 38,200,251, 39,
+ 27,172,112,119, 50, 13, 4, 11, 0, 80, 80, 44,140, 43,160,245, 90, 47, 45,220,155, 68,203,133,194, 53, 0,132,122,147,101, 22,
+229,113,182,218,202, 92,128, 46,114,137,240, 59, 0,188,222, 98,153, 20,151, 99,125,123,108,132, 47,233, 43,226, 5, 27,121, 74,
+197, 22,158,174, 7,197, 1, 59, 9, 46, 92,202,162,245, 26, 22,239,239,235,222,102,239,213,220,222,167, 86,190,135,246,205,131,
+ 64, 45, 28,192,155,161,136,250, 0, 39,150,143, 71,251,102,254,160,188, 25,224, 57,216,245, 91,138,126, 17,142, 79,125,115,132,
+248,144, 6, 1,174,238,177,171, 87,175,241,244, 14, 12, 35, 60,103, 66,226,213,163, 99,223,255,112, 94,143, 8, 71, 18, 97,141,
+201,106,225, 77,222, 8,106, 28,242,193,140, 5,203,132, 94,222,126,182,188,217,192,229,165,222,109,245,195, 55,243,118,181,240,
+ 38,223,221,206,161,107,172, 53, 82, 97,110,152, 34,146, 73, 71,218,200,109,155,148,151,107, 30, 88, 76,230, 29, 17,222,162,190,
+223, 46, 93,209,178, 91,175,254,118, 22, 77,158,192,204, 35,108,251,182,173, 1, 63,254,252, 75,127, 66,200, 96, 74, 41, 95,159,
+ 60,243, 20, 31,222,219, 48,185,191, 88, 36, 36,205, 94, 95, 45,196, 83, 78,133, 16,230, 65,198, 16,138,168, 58,159, 92, 4,231,
+226,243,233,150,167, 57, 70, 51, 15,242, 59,161,104, 10,130,157,132, 98,107, 92, 1, 45, 96,143, 14, 6,227,197,194,215,215,247,
+ 84, 86, 86, 86,247,231,169,233,237,237,221, 33, 39, 39,231, 50, 59,187,204, 96, 89, 81,251,226,139,184,164, 76,103, 88, 76, 8,
+111, 26,184, 8, 64,189, 12,150, 92, 40, 92,127,237,126,190, 39, 56, 19, 86,127,249,214, 54,163, 25,224,204, 38, 88, 56, 51, 44,
+156, 25, 28,103,130,197,108, 6, 53, 27, 48,239,143, 83,128, 81,131, 54, 17,193,235, 1,120, 89,123, 12, 49, 21,108,188,113,254,
+104, 3, 98, 84, 97,203,202,175,223,201, 44, 44,123,231,248,157,156,162,112, 15, 50, 39,190, 0,107,235, 99, 4, 78,173,122, 15,
+155,246,252,149,245,253,239,218, 4,158, 82, 52,112,176, 9, 25, 59, 48,206,111,195,190, 83,153, 43,214,235, 19, 0,192,209, 86,
+ 26, 50,225,206,125,255,103,185, 8,238,114,249,138, 95,127,249,209,211,203,197,134,112, 23, 23,131,179, 88,224, 23, 48, 64, 56,
+103,250, 88,175, 47,150,175, 89, 14,224,181,218,190, 31,234, 65,194,154, 6, 53,155,181,254,175,139,254, 90,117,129,241,232,230,
+ 79,146, 96,128,217,211,167,153,120,209,215,203,132,115, 63,122,111,102,168, 7,185,146,144, 79,227,235, 48, 87,130,102,238,216,
+247,245,226,165,205,123,244, 27,104,199,151, 21, 10,245,218,178,166,171,255, 88,179, 32,180,121, 59, 69, 84,132,175,164, 96,199,
+ 84,162,211,148,192, 36,144,203,122,132, 71, 59,232,198,141, 54,175, 94,183,105, 58,128, 31,234,245,250, 71,255, 85,246,120,254,
+233,223, 38, 9, 69,212,173,203,167,166, 88,114,174,129, 90,204,128,197, 84,249, 19, 22, 51, 40,255,240,103,251,169,127, 0,192,
+ 83, 25, 44, 1, 69,239,227,231,175,121,229,231,229,182, 93,190,244,171, 57, 97,238,228, 16, 44,216,120,183, 4,103,234,107, 44,
+ 25, 12,198,127, 47,222,222,222, 92, 78, 78,206,115,109,217,241,241,241,233,159,157,157,125,240, 25,211,245, 1,128, 55, 30,253,
+186, 38, 39, 39,231,219,103, 77, 87,219,182,109,125, 41,165,158,143,158,253,121,215,174, 93,203, 98, 37,224, 63,105,176, 0, 57,
+ 40, 15,236, 28, 10, 0, 54,245, 61, 24, 5,228, 32, 66,192,172,197,144,126,189,224,234,238, 9,152,203, 1, 83, 57, 96,214, 1,
+102, 45, 96,214,161, 40, 55, 29, 48,105,129,228, 67,224, 40,149,213, 59, 87, 6, 21,112,111, 7,122,182,242,135,155,163, 28,239,
+ 13, 9,115,253,237,240,189, 53,107,142, 38, 70, 3, 24,101, 85, 90, 41, 69,251,200, 38,248,126,141, 54, 97,255,141,130, 62, 0,
+ 48,160,165,235,225,246, 97, 1,126, 43,214,235, 19,254,186, 83,210, 23, 0,250, 69, 56, 30,106, 23,226,229,207, 63, 67,116,151,
+167, 52,202,187, 97, 19, 98,185,245, 43,120,117, 22,212,106, 29,178, 82, 55,192,217,167,181,192,194,163,107, 93,223,183, 17,226,
+227,119,231, 46, 17,151,171,243,141,188,169,208,226, 38, 44, 21,138,164, 60, 65,246, 25, 67, 25,175,180,204,152, 60,158,155,245,
+217,151, 31, 3, 24, 91,107, 52,200, 29,211,191,251,110, 69,100,167, 54,161,238,121,187,222, 35,101,165,249,224,132, 10,217,144,
+142,157,224, 20, 28,198,231,159,254,142, 72, 3,163,225,228, 18,136,236,139,155,145,118,121, 55,233,220,106,184,108,237, 22,201,
+184,154, 12, 86,176, 27,233,220,167, 75,187,109,129,254,222, 94,148,242,224,121, 10,202, 91,240,250,203,189, 49,103,123, 50, 44,
+ 22, 11, 70,244,233,220,115,201,148, 30,148,231,121, 80,202, 35, 51,175,184,252,228,149,132,158, 73, 37,244,138, 53,145,169, 22,
+ 29,186,119,190,115,227,114,168,249,222,159,104, 51,246,235, 4, 2,156,175, 82,230, 58,223, 60,178, 54, 20,248,227,233, 12, 28,
+ 33,164,153, 59, 44,105,135, 23,195,191,203,100,225,175, 91, 14,187,169, 10,179, 39,236,218,240,203,203, 43,127,253,117, 19,128,
+169,236, 49,194, 96,188, 24,228,228,228, 60,119,147,117,241,226,197,156,103, 49, 89,109,219,182,237, 2,224,155,156,156,156, 10,
+179,245, 77,251,246,237,231, 85,173,171,170,160,162,148,142,189,118,237,218,217,218, 52,103,206,156,233, 13,160,209,245,235,215,
+ 43,142,209,168,109,219,182,141,170,219, 87,161, 80, 88, 90,180,104,145,182,108,217,178, 28, 86, 66,254, 94,131,149,144,177,227,
+189, 86,134,220, 50, 0, 72,176,194,164, 60,214,180,167, 55, 91, 22,175, 91, 48,126,113,120,195, 6,208,104,141, 56,122, 61, 13,
+ 22,139, 25, 22,142,123, 20,201,226, 96,225,204,232,211,194, 21, 47,233,167,226,135, 3,137,224, 44,252,215,181,105, 62,137,137,
+242, 99, 90, 70,191,178,157,231,169, 84, 38, 22,168,154,250,185,184,207, 26,209, 66,240,222,144,112,232, 76,220, 43, 97, 30,228,
+100,124, 62, 93,109,149, 38,255,239,115,103,210,234,254,102,225,234,204,123, 45,209,167,246,163, 7,246,114,160, 6, 21,204, 69,
+201,208,148,155,145, 92,108, 70,158, 94, 9, 25,201,181, 74,147,167,104,238,235,227,165,184,176,237,163, 84, 23,161, 90,228, 46,
+228, 36, 82, 1, 7, 11, 79,133, 84, 25,111,104, 16,218, 75, 92,209, 47,171,182,116,218, 40,236,199,119,233, 61,192, 49, 99,243,
+100, 98,211,180, 15,220, 91,249, 33,245,236, 58, 20, 92, 63,128,226,156, 52,226,160, 87,194,195, 37, 8,253,198,142,194,183,163,
+218, 66,163,214, 64,152,155,228, 40, 21,203,156,106,210,164, 22,140,253,110,201,151, 94, 34,161,224,225,249,172,216, 44,102,232,
+ 12, 6,192,194, 65, 46,226, 65,104,197,255,204,176,152, 77,138,230,195, 63,122, 11,192,149,186,242, 30,159, 79,183,132,187,147,
+ 40,240,230, 80,106,214,129, 0,231,227, 10,104,165,233, 9,243, 32, 99, 90,247,153, 24, 69, 9,206, 61,205, 53,138,112,193,192,
+ 54,141,236,108,109,213, 9,200,218,249, 14,146, 32,167, 30,157,222,192,152,215,167, 43,126,251,237,183, 65,132,144,105, 85,251,
+160,253, 29,195,139,153, 38,211,252, 95,213,116,116,116,108,220,176, 97,195,121,102,179,185,139, 68, 34,241, 48,153, 76,224,121,
+ 62, 79, 42,149,158, 75, 75, 75,251, 92,165, 82,165,252,183,229,253,208,161, 67, 86,155, 44,107, 52,197, 98, 49, 78,156, 56,241,
+192, 90,147, 85,205, 2,244, 27,119,238,220,137,237,219,183, 3, 0, 78,157, 58,133,224,224, 96,219,234,190,155,153,153,105, 59,
+ 98,196,136,141, 0,252,106,211,188,127,255,126,227, 47,191,252, 18, 59,119,238, 4, 0,108,216,176, 1, 77,155, 54,173, 54, 61,
+183,111,223, 22,126,250,233,167,141, 1,228,252,221,215,232,159,110,176,146,253,157,165,173,160,183, 0, 64,114,125, 15, 22,159,
+ 71,151,180,240, 18,247, 61,177,243,231, 46,114,137, 0,243, 87,207,202, 44, 44,209,116, 16, 17,240, 0,192, 81, 8,156,237,164,
+151,190,158,208,194,191,180, 76,143,253, 87,179,207,198,229,211,122,133, 66,227,114,232, 49, 0, 78,255,170, 32, 73,211, 9,223,
+ 30,219,186,245,227,190,205,103, 12,105,142,125, 23,211,102, 0, 88, 93,103, 33,231,121, 80,158,171,236,212,254,208,201,240, 0,
+207, 61,246,198,192,131, 62,252, 27, 95,191, 8, 86, 55, 66, 68,165,238,232,215, 64, 33,253,105,202,148, 55, 29,204,133,247, 81,
+ 98,148, 32,179, 84,143, 60,157, 24,101, 34,119,100, 39,196, 88, 4, 4,199,234,142,178, 64, 77, 57,189,147,179,212, 78, 16,209,
+235, 45, 31,245,225, 79, 74,165,132, 19, 58, 12,251,194,169,232,196,178, 52, 78, 91,168, 37, 4,117, 78,112,233,232,232, 20,172,
+ 47, 78, 19,170, 74,139,224,228, 25,142,190,175, 12,196,194, 1, 97,208,168,181, 40, 44,185, 68,155,120, 57,144,244,115,155, 48,
+183, 95, 51, 20,231,231,194, 96, 6,136,214, 80,162, 55,234,203,106, 60,143, 2,252,250,254,236, 15,199, 4,120,185,217, 86, 12,
+ 22,160,188, 5, 45,154, 5,162, 87,151,246, 56,118,254, 2,174,197,220, 3,255,104,176, 0,229,121,100, 21,148,230,235, 77,150,
+117,245, 58,161, 22, 14,212,172,175,214,128,225, 41,154, 6, 35, 61,136,194, 2,124,214,161,137,253,164,143, 7, 6,216,219,202,
+ 8,244,102, 11,244, 70, 51, 52, 23,126,130, 75,195, 72, 40,228,114,210, 10, 58, 17, 0, 54,121, 40,131, 81,133,145, 35, 71,202,
+243,243,243, 79, 15, 24, 48, 32,172, 87,175, 94,138,168,168, 40,104,181, 90, 28, 61,122, 20, 90,173, 54,192,207,207, 47,224,232,
+209,163,195, 59,116,232, 16,239,235,235,219,109,199,142, 29,245,233, 35, 43,194,191, 58,169,243, 0,184, 71, 75,121, 9,241,176,
+163, 57, 79, 41,181, 60,109,218,165, 82, 41, 46, 93,186,244,220, 35, 89, 87,175, 94,125,240, 52,145, 44,173, 86, 43,241,242,242,
+130,139,139, 11, 44, 22, 11,180, 90, 45,246,238,221, 11,149, 74, 5,158,231, 97, 99, 99,131, 47,190, 91,141,132,155,167,113,229,
+202, 21,168, 84, 42, 73, 93,154, 69, 69, 69, 36, 36, 36, 4, 6,131, 1, 28,199, 65,175,215,227,248,241,227,149,191,139, 68, 34,
+124,184,104, 57,238, 93, 63,141, 91,183,110,161,168,168,136,176, 82,253,247, 27,172,103,198, 98,225,230,252,182,126,235,165, 57,
+ 83, 71, 97,250,232,104,191,207,127,222, 29, 29, 95, 72,215, 3, 64,152, 27,153, 48,174,123, 19,127, 39,133, 24, 11, 55, 95, 7,
+ 40,157,243,172,199,139, 45,166,247,194, 61,201,140, 61, 87,210, 79,127, 50,170, 21, 2,189, 28,130,131,130,136, 52, 41,201,138,
+ 53,255,120, 14,206,118,178,144, 1, 45, 93, 15,131,231,225,100, 47, 11,133,133,131,147,157, 44,164, 95,132,227, 33, 0,112, 82,
+ 72, 66,171,139,116,213, 24,238,245,151, 76, 86,200, 68,147,109, 91,123,249,191, 54,168,151, 77,255, 65,195,109,236,196, 28,138,
+175, 28,133, 90,236, 11,115,131, 0, 24,204, 37,200, 74, 73,178,156,184,124, 55,187, 72, 99,152, 85,103, 50, 41,206,102,167, 36,
+186, 53,110,222,203,185,232,192,220,130,198, 19, 55, 55, 18,128, 23,104, 54, 13,203,183,117,111,103,115, 53, 57,165,140,167,255,
+ 30,193,121, 18,181, 74,149,102,182,192, 75,103, 17,217, 39,157, 90,139,143,251, 69,162,180,164, 0,122, 19, 7,149,142, 51,121,
+ 58,201,101,134,148, 88, 24, 76, 28,140,102, 30, 98, 39, 31, 28,189, 20, 83,196,155,205,135,106,210, 76, 42,162,183, 0,216, 85,
+253, 91,144, 27,105,241,145,131,205, 45,152,117, 72,207,202,193,250,191, 46,181,122,180,223,211,191,157,242,220,195,102,230, 42,
+145, 43, 66, 17,245, 52,157,219,155,121,144,118, 54,114,201,143,223,204,120, 53,172, 99,211, 6, 50, 62,235, 18, 8,111,130,173,
+ 69, 4,157,212, 2, 71,191, 64,240, 70, 13, 45,215,235,149,113,255,143, 75, 4, 49, 24,255, 11,132,134,134,122, 58, 58, 58,198,
+205,158, 61,187,193,176, 97,195,176,103,207, 30,168,213,106,172, 91,183, 14, 43, 86,172,192,130, 5, 11, 96, 54,155,241,219,111,
+191, 41,118,237,218,213,238,151, 95,126,201, 10, 8, 8, 8, 79, 79, 79,175,107, 65,117, 2, 64, 6, 64,252,168,238, 34, 0,248,
+131, 7, 15,162,127,255,254, 56,120,240, 32,255,232,111, 22, 66,136,153, 82,106,120, 90,131, 37,149, 74,145,144,144,240, 92, 76,
+150, 88, 44,134,157,157, 29,164, 82, 41, 18, 19, 19,235,109,178, 56,142, 19,102,101,101, 65,165, 82,161,215,160, 65, 88,254,245,
+215,232,222,189, 59,122,245,234, 5, 74, 41,142, 31, 63,142,232, 78, 17, 24, 53,184, 27,238,222,189, 11,179,217,108, 85,122,243,
+242,242,144,159,159,143,190,131, 6, 97,245, 47,191,160,125,251,246, 8, 9, 9, 1,199,113, 56,125,250, 52, 94,238,211, 9,242,
+161,209,184,119,239, 30, 43,212,255, 43, 6, 43,182,128, 94, 14,115, 35, 7, 70,247,105, 55,112, 80,231, 48,172,222,118,226,203,
+176, 48,178, 21, 0, 92,236,101, 95,140,239, 30,136,248,140, 82,156,184,149,115, 32,190,144, 62,151,209, 23,188, 5,174, 46, 14,
+ 10, 64, 40,133,206,196,115, 14,201,168,179, 99, 50, 79, 41, 20, 93, 62,194,184, 65,241,126,237,195,252,252, 42, 70, 17,218,245,
+ 95,134, 9, 49, 15,252,219,134,120,250,195, 98, 6, 44,102, 56,140,218, 12, 44,178,173, 51, 29,157, 27,203,142,125, 52,107,198,
+ 75,253,134,190, 98, 35, 85, 56,194,162,206,132, 57, 47, 6,197,247,207, 66,171, 8, 70, 94,122, 50,182, 31,185,162,186,159, 85,
+172, 22, 8,112, 52, 95,101,248, 32,169,132,150,213,165,171, 55,227,235,121,115,103, 13,216,190,117,155,189, 44,176, 51, 73,250,
+169,191, 74, 42,226,100,110,141, 90, 11,202,229,174,244,171,117,219, 28,180, 70, 44,174, 75,167, 92,171,222,125,252,232,225, 81,
+ 77, 26,119,182, 79,189,246, 23,116,122, 3, 12,102, 32,188, 93, 55, 88, 44, 84, 74, 4,132,119, 16, 10, 73, 65,113, 41,136,217,
+146,127,238,118,106,238,249,219,201, 66,131,125,221,218,143, 21, 58, 34,124,119, 80,183,150,128, 89,135,193, 93, 34,177,124,211,
+137,119, 0, 76,124,182,139,252, 48,130, 69,129,206,225,238,100, 21,128,206,215,247,174, 8,109, 51,244,125,212, 39,130, 21,225,
+ 70,250, 69, 4,121,175, 93,254,197, 71, 13, 92,124,131,133,132, 55,131,122, 54, 7,212, 89,148,100, 93,130,163, 79,123, 88,188,
+ 59,225,183, 31,150,150,241, 60,221,250, 52, 83, 84, 48, 24, 47, 50,122,189,126,247,146, 37, 75, 26, 12, 28, 56, 16, 0, 80, 86,
+ 86,134, 75,151, 46, 97,205,154, 53,176,181,125,252, 57,217,191,127,127, 80, 74, 27,204,159, 63,127, 55,128,142, 53,105,118,234,
+212,105,208, 15, 63,252,144,211,178,101,203,228, 71, 38, 75, 2, 64, 16, 27, 27, 43,200,204,204, 36,206,206,206,212,219,219,219,
+156,147,147,195, 3,176,188,254,250,235, 66, 59, 59,187, 38,101,101,101,103,158,214, 96, 73,165,210,231,210, 39, 75, 44, 22,131,
+ 16, 2,169, 84, 10,137, 68,130,236,236,236,122,153, 44,142,227, 68, 7, 15, 30,196,245,235,215,177,160,101, 75,204,240,241, 65,
+131, 6, 13,112,250,244,105, 80, 74, 97,107,107,139,146,146, 18,108,221,186, 21, 61,122,244, 0,199,113, 18,107,116,119,238,220,
+137, 27, 55,110, 96, 81,155, 54,152,225,232, 8, 59, 59, 59, 28, 63,254,176,213, 79, 38,147, 33, 61, 61, 29,199,143, 31, 71,183,
+110,221, 88,161,254,187, 13, 86, 55, 66, 68,196, 3,158, 38,163, 14,148,163, 0,129,119, 88, 24,145,196,199, 83, 83,125, 15, 42,
+ 16, 96,238, 15,235, 15, 12, 88,246,254, 32, 50,121, 72, 43,239,207,215,158,154, 6, 0,147, 70, 52,245, 81,200, 68,248,126, 95,
+ 60, 21, 8, 48,247,121,100, 48, 44,140, 72, 4, 2, 76,235,213, 62, 4, 57, 74, 35,146,114,148, 39,227, 41,181,170, 73,231,196,
+178,113,216,176,255,116,230,138, 13,250, 4, 74, 41,156,236,100, 33, 19,238, 36,249,175, 61,120, 35,227,187,237,250, 4,202, 83,
+ 56, 41,196,161, 19,239,118,170,115, 20, 97, 91,127,201,228, 57, 31,125,208,105,200,196,217,114, 46, 97, 7,140, 73, 71,192,155,
+116, 80,155, 36, 80, 10, 61,145,149,145,129,175,126, 59,144,169,214, 26, 71,197, 22,212,207, 88,222, 43,162,101, 97,110,100,216,
+ 87, 11, 63, 57,246,245, 23,243,237,116,201,167,203,132,132,211, 9, 27,118, 21,125,177, 96, 25,209, 24,140,175, 36,149, 80, 77,
+ 93, 58, 6,123, 44, 94,242,221, 15, 3,222, 28, 59, 60,161,105,112, 87, 23, 75, 78,138,139, 94,173, 46,216,124,248,134,231,163,
+ 55, 67, 2, 0, 73, 89,197, 40, 84,105, 57, 11,103, 62, 99, 47,198,231,113,214, 68, 3, 31, 17,232, 65,220,134, 69, 53,127,213,
+205, 94, 2, 93,153, 18,238,246, 98,244,105, 31,244,106,160, 7,249, 40, 57,159, 22, 62,189,193, 50,131,154,117,184,188,184, 71,
+ 40,181,152, 67, 97, 49,195,116,103, 99,253, 35, 97, 4, 51,166,119,177,115,112, 54,166, 10,160,181, 5,108, 92, 65, 28, 2, 0,
+199, 70, 68,220,236, 21,228, 36,199,113,239,188, 58,182, 56, 37, 45,235,119, 87, 27,124,203, 30, 33, 12,198,227,164,167,167,143,
+159, 51,103,206,249,246,237,219,123,184,186,186, 34, 50, 50, 18,251,247,239,199,236,217,179, 43,247,105,217,178, 37, 40,165, 40,
+ 41, 41,193,146, 37, 75,242,114,114,114,198,215,166, 25, 23, 23,151,176, 97,195,134, 46, 97, 97, 97, 38,137, 68,162, 4, 32, 83,
+ 42,149,242,146,146, 18,162,215,235,193,243, 60,239,232,232,104,201,201,201, 49,143, 26, 53,202,112,241,226,197, 32,173, 86,155,
+254, 44, 17,172,182,109,219,198, 42,149, 74,149, 64, 32,120,230, 41, 28, 42,204, 85, 68, 68,132,155, 86,171,229, 1,148, 62,205,
+ 20, 14, 28,199,161, 77,155, 54, 56,114,246, 38, 14,158,184, 8,117, 78, 34,166,189, 57, 30,145,145,145, 56,114,228,200, 83, 95,
+179, 22, 45, 90,224,240,241,243, 56,127,253, 54,210,239,221,193, 59,211,222, 68,120,120, 56, 14, 31, 62,204, 10,244,223,109,176,
+154,185,145, 22,222, 77,164, 27,231,247, 11,106, 38,238, 53, 31, 68,108,131, 29,193,135, 59,205,253,234,167,132, 72, 15, 50, 54,
+ 38,191,238,209, 94,143, 69,177,242,105, 92,184, 59,217,114,251,110,232,171,131,219,251, 97,245,126,197,103, 0,240, 74, 84, 99,
+ 92,189, 95,136, 43,247, 10,182,196, 21,208,184,103,205, 92,164, 7, 81,128, 98,203,146,119,135,116, 11,240,245,196,154, 61,231,
+ 65, 8,118, 91, 85,209, 82, 74,219,135, 5, 96,197,134, 39, 71, 12,122,250,127,183, 93,159,112, 36, 86,221, 15, 0,122, 55,179,
+ 61,212, 54,200,217,191,174, 72,134,141, 84, 52,165,223,240,113,114,238,222,126, 32,237, 56, 8,103,128,206,196, 35,183, 72,131,
+114, 71, 63,156,190,116, 91,167,210, 27,223,143, 43,120,186,168, 93,124, 33, 77,110,233, 69, 50,202,180, 58, 47,133, 91,144, 94,
+ 40,224,249, 50, 3,197,213,248, 52,117, 92, 46, 77,180, 70, 35, 41,137, 26, 59,250,146,168, 85,235,183,207, 19, 75,164,175, 8,
+ 9,136,187,147,173,219,170,101,139, 96,111,111, 7,222, 88,246,127,236,157,117,120, 84, 71,219,198,239, 57,235,217,221,184,111,
+ 18,136,224, 1, 2, 73,112, 40,161, 4, 45,148, 66,161, 20,104,145,182,120,129, 66,145, 82, 40, 82,156, 22, 43, 69,107, 80,220,
+139,123,112, 77, 32, 33, 9,132, 32,113,119, 91, 61,123,230,251, 35,242, 6,136,108, 2,253,222,190,244,252,174,107,175,100,237,
+222, 57,115,100,238,243,204,204, 51, 64, 97, 58,250, 79, 88,146, 30,150,168,247, 4,128,134,118, 68,249,142,151,120,155,144, 33,
+ 9, 23,162,117,115,170,251, 13, 98,192,216, 97, 61, 90,138, 56, 93, 33, 38, 45,223,131,205, 51,251,225,147,174, 77, 68,199,175,
+ 69,141, 5,176,176,182,251,154, 26, 89, 80,131, 26,237,102, 95,126, 72,128,171, 20,232,120,119,239,162,198, 64,136,201, 26,126,
+132,136,132,206,164,137, 79, 29,133,152, 75,184, 6, 46,225, 26, 21,184,117, 0,169,243, 14, 33, 78,254,244,167, 21,243, 11,183,
+110,253,229, 12,199, 96, 65,117, 41, 47,120,120,254,173, 80, 74,159, 90, 89, 89,245,236,221,187,247,249,211,167, 79,219, 52,107,
+214, 12, 0, 80, 58, 99,205,223,223, 31, 13, 27, 54, 68,106,106, 42, 62,254,248,227,140,228,228,228,158,148,210, 42,199,244,230,
+231,231, 63,219,191,127,191, 99, 97, 97, 97,203, 57,115,230,164,213,173, 91, 55, 79,163,209,144,156,156, 28,142,101, 89, 88, 91,
+ 91, 75, 90,182,108,137,246,237,219, 23,220,184,113,195, 61, 62, 62, 62, 31, 64, 76,109,202,255,249,231,159,227,224,193,226,102,
+226, 77,228,197, 18,139,197, 8, 12, 12,116,185,126,253,122, 34, 0,212, 38, 47, 86,249,230,229,254,253,251,184, 20,146, 0,161,
+ 78, 13, 73,122, 18,110, 30,218,143,190, 99,198,131,101,107, 63, 90,225,254,253,251, 56,124,238, 38, 20, 82, 33, 30, 61, 10,199,
+254,253,251, 49,110,220,184,215,210,228,169,198, 96,213,171, 71, 36,210, 2,204,235,225,239, 50,227,163,142,245, 4,134,188, 36,
+112, 70, 14, 2, 17,224, 96,103,129, 63,255,220,229,185,107,207,158, 27, 45, 92, 68,235, 56,150,253, 54, 44,149, 22,213,224,183,
+231,173,218,115,245,163, 63,167, 5, 8,199,245,106,108, 3, 0, 98, 33,131,181,127,133,179, 0,230,189,206, 70,181,115, 37,178,
+ 2, 3, 70, 59,217, 90,206,253,230,243,247,108, 2,252, 27,226,210,173, 7, 88,183,255,198,101, 73, 26,182,155,124, 80,115,134,
+151,167,192, 86, 56,139, 16, 92,245,227, 41,141, 70,234, 36, 86, 88, 67, 31,115, 17,208,107,160,209,234, 17,159,105, 68,124,150,
+ 6, 66,185, 24,119,163, 18,212,182, 41, 56, 86,219,109, 38,132,144,142, 94, 50,213,119,139,127,116,213,168, 11,216,188,236, 12,
+ 86, 44,185, 41,146,155, 73,147,107,162,115, 35,129,106, 58,123,138,253, 0, 78, 32,145,209,162,217, 83, 71, 40, 18, 35, 78,163,
+ 62,147, 4, 66, 41,204,154,188, 7,115, 51,129,184,147,135, 56, 14, 0, 60,156, 44, 37,203, 23,124,109, 57,101,230,130,106,199,
+120,121, 19, 34,110,222,202,105, 74,179,186,214,184, 28,252, 16,151,195, 98,195, 47,223,125,212,180, 75,115, 21, 26,186, 90, 77,
+246, 38,100, 89, 4,173,121, 68,180,120,199,176,128, 65, 83, 54,139,208,219,145, 12,105,245,209,156, 10,103, 15, 86,134, 7,192,
+ 69, 25, 41,136, 64, 0, 16,166,120, 70, 99,252, 53, 8,173,188,232,174,189,135,139,126,249,101,251,247, 17,233,148,143, 90,241,
+240, 84, 67, 78, 78, 78,168, 92, 46,239,225,227,227,243,199,164, 73,147,204,135, 13, 27,166,250,226,139, 47, 24, 0, 72, 77, 77,
+229,214,172, 89,147,244,211, 79, 63,229,102,100,100,140,212,235,245, 97,166,220,240, 18, 66,174,255,250,235,175,233, 87,174, 92,
+105,218,186,117,107,169,159,159, 31,103,109,109, 45,148, 74,165, 70,157, 78,167,137,138,138, 50, 62,125,250,212, 57, 39, 39, 39,
+ 26,192,147,218,116,223,171, 84, 42, 48, 12,179,208,213,213,245,187,164,164,164,102,111, 98, 12, 86,253,250,245, 85, 0,162, 93,
+ 92, 92,234,215,180,123,240,149, 6, 91, 40, 68,118,118, 54,138, 82,194, 33, 75,120, 12, 31, 5, 3,111,107, 37, 44, 44, 44, 94,
+203, 12,229,230,230, 2,133,137,184,122,245, 62,192,178,176,180,180,132,165,165, 37,111,176,254, 46,131,213,212,129,140,179,150,
+ 96,205,152,247,234,137, 61,234,184, 66,155,112, 23,247,227, 11,240,109,219,214, 17, 2,169,185,102,204,167,253,252, 7, 12,116,
+ 71, 64,251, 86,196,195,217,114,242,178, 85, 27, 39, 52,117, 36, 95,135,167,210,181,166,252,112,120, 26,125,214,196,129,252,114,
+ 49, 52, 97,172,171, 92, 13,142,163,184, 24,150,140,176,152,236, 95, 34,211,232,179,154,108, 68, 83, 21, 9, 20,130,217, 67, 41,
+149, 89, 42, 20,249, 45, 91, 52,182, 11,108,215,130,233,217,217, 31, 98, 1,112,245,246,125,124,181,234,224, 77,142,163,239, 5,
+155,216, 61, 88, 60, 99,240, 69,227, 84, 60, 99,208,240,194,140, 65, 74, 41, 45,158, 69, 88,245,176, 46,129,128,164, 20,197,222,
+113, 18,217, 54,128,250,201, 69,196,100,115,136, 77,203, 71,158,208, 9,218,196, 68,128,114,113, 65,148,214,250,104,182,179,179,
+115,240,244,110, 88,111,253,182,253,208, 23,229,226, 89,208, 31, 40,200, 78,198,162, 77,127,213,115,117,117,237,156,144,144,112,
+169, 6,102,173,225,249, 99,187, 28, 64, 1,129, 72,138,227, 27,246, 34,195,214, 12,118,114, 49, 56,117, 58,198, 76, 25,102,217,
+171,219, 48, 75, 0,136,125,116, 15,117,229,106,147,116,245,182, 24,240, 81,151, 70, 86, 48,168,177,237,212, 61, 13, 3,244,220,
+126, 38,252, 73,151,198, 86,178,143, 58,214,181, 94,152,148,243, 33,106,153, 12,180, 52,130, 85, 22,209,171,197,236,193,125,148,
+ 26,155,216,147, 39,123,174,167, 41, 6,118,243,147,139,133,132,208,130, 68, 80, 51, 59,108,220,182,175, 64, 98,192, 22,254,146,
+193,195, 99, 26, 69, 69, 69,193,132,144,230,211,167, 79, 31, 50,123,246,236,119, 20, 10,133, 39, 0, 20, 22, 22, 62, 51, 24, 12,
+151, 1,236,170,201,108,191, 18,195, 20, 77, 8,121,246,228,201, 19,199, 29, 59,118, 88, 1,144,149,188,173, 1,144, 3, 32,245,
+117,102, 16,150,154, 41,149, 74,245,221,155,170,135, 82, 51,229,226,226, 82,191, 54,223, 23, 8, 4, 70, 66, 8, 8, 33,144, 74,
+165,184,114,229, 10, 6,189,215, 13,145,199,115,208,204, 74,137,214, 35,199, 96,207,217,179, 16, 8, 4, 32,132, 64, 32, 16,212,
+168, 29, 17, 10,133,184,122,245, 42, 62,249,120, 32,164, 66,192,210,210, 18,211,167, 79,199,145, 35, 71, 32, 20,242,171,233,253,
+ 61, 17, 44,130,133,103,255, 88, 34,134,209,128,163,127,252,128, 99, 15, 10,116,143,210,241,109,163,116,172,217,143,124, 46,125,
+213,246,177,103,175, 62, 88, 57,106,112, 31,249,187, 93,186,225,221,128, 46,194,166,173, 58,207, 5,176,182, 92, 67, 29, 88, 85,
+174, 12, 35,135,239,183,156,122, 56,102, 79, 80, 20,129, 62, 31,131,187,183,162, 70, 14,223, 87,211,248,191,162,105,105,166,220,
+115,245,198, 13,107,232, 11, 16,115,239,130,204,221,179, 30, 96,212, 35, 58,250, 49,126,218,118,136, 11,186,253,232, 79, 29,139,
+ 73, 79,178,104,161,169,154,197,142,138,133,165, 66,210,168, 87, 51,203,147, 28, 40,172,228,226,198,148, 51,194, 74, 46,106,220,
+189,137,226, 36,165,148,154,155,137, 26, 83,163,161, 90, 77,181,142,221,188,237,183, 95,126,252,236,179,207, 20, 25, 9, 41, 72,
+202,123,128, 2,137, 11, 12,114, 55, 60,185,119, 89, 93,164,101,171,109,188,171,170,207,140,140,140,180,224, 91, 89,216,179,105,
+ 41, 12, 58, 45,210, 18,138, 61,106, 82, 70, 30, 44,236, 92,110,212, 68, 83,207,114,185, 3,134,141, 22,155,153,195,236,147, 1,
+125, 36, 79, 50,181,240, 85,153, 23, 95,228, 10,210, 17,121,238, 42, 2, 10,139,253,218,211,120, 6,117, 91,168, 76, 42,167,185,
+ 76, 60,169,151,159, 11,158,197, 37,227, 74,120,226,182,167,153, 52,201,203,150,108,123,146,148, 51,182, 95,219, 58, 88,125, 36,
+226,203,202, 76, 81,101,154,222,142,100, 8,128,142,197,131,220,213,160, 64, 71,111, 71, 50,196,148,153,131, 21,105, 10,197, 24,
+250,227,201,216, 57,251,238,100,244,155, 49,180,147, 69,251,246,189, 37, 96,117,200, 87,107, 13, 17,217, 52,239,117,246,209,107,
+ 68, 39,121, 77, 94,243,127, 82,179,196,236,252, 89,242,120,147,154, 73,120, 41, 47,211,235,110,123,249,238,192,164,164, 36, 97,
+ 73,244,170,202, 65,238,213,105,150,239, 14, 76, 76, 76, 60, 81, 18,189,170, 50,138, 85,129,102, 82,155, 54,109,108,250,246,237,
+ 11,163,209,136,199,143, 31, 35, 54, 62, 30,129, 99,191,132,149,149, 21, 46,135,134,226,209,163, 71,248,238,187,239,192,113, 28,
+110,222,188,153, 80,157,166, 72, 36,210,183,104,209, 66,252,193, 7, 31,128,101, 89, 60,125,250, 20,137,137,137,248,234,171,175,
+ 96,105,105,137,224,224,224, 50, 77,173, 86,139,103,207,158,233,255, 63,142,165,127,143,193, 2,140, 48, 26,144,123,118, 30,214,
+ 94,129, 94,111, 64,227,240, 52,250,188,220,251, 27,125,108,201,209,208, 7, 15,159, 5, 95,123, 87,130,180,176,226,239,212,128,
+168, 12,154,220,202, 77,152, 15,125,190, 5,158,158,196,243,212,252,130,168, 12,154, 92,211,141,160,156,145, 64, 95, 4, 36,223,
+197,245,203,151, 16,116,243, 62,238,132, 61, 52, 94, 15,142,218,195,112,248, 62, 34,131, 62,174,177, 38,165, 80,190,183, 26, 35,
+194,162,235,180,106,232, 88, 7, 70, 22,148, 51,192,114,240, 46,140,140,104, 95,167,149,151, 85,157,226,200,149, 1,214,159, 95,
+ 0,126,148, 85,169,119, 39, 78,191,165,163,167,244,195,252,156,204,182, 93, 59,183, 83, 88, 54,233,133,140,232, 40, 60,190,127,
+ 85, 29,252,224,201,245, 59,113,250,215,138,142,184,184,184,188,211,181,115, 35, 12, 30,243, 13,244, 69,185,120, 26,244, 27, 10,
+178, 82,112,229,134, 18, 15,243,242,218, 1, 48, 57,130,117, 61,214,208, 20, 0, 58,122,136,227,204,161,117,250,180, 79, 95, 72,
+137, 6,156, 54, 15,164, 40, 3, 79, 18,117,185, 31,110,138, 55, 2,128, 92, 74,132, 10,154,107, 97,138,174,119, 93,219, 6,114,
+129, 1,219,207,134,131,227,138,151, 89,226, 56,108,220,126,225,201,216,239, 63,241,133,119, 29,235, 22,132, 16, 82,147,208, 62,
+161,232,116,103,207,130,198,154,243,115, 1, 78,143,171,147,109, 26,119, 90,155,213,169,182,145,176,176, 68,154, 8, 96,108, 19,
+ 21,217, 60,121,237,169,185,254,103, 35, 58, 78,251,188,159, 5, 40,191, 48, 58, 15, 15,207,127, 37, 18, 56,102,230,204,153,155,
+ 5, 2,129, 61, 0, 66, 41,133, 86,171, 21,110,218,180, 73,196,178, 44, 35, 16, 8,140, 50,153,140, 13, 14, 14, 54,112, 28,151,
+174,215,235,199, 84,167,169,211,233,158,172, 95,191,190,158,193, 96, 40,155,113,168,213,106,241,219,111,191, 65,171,213, 66, 42,
+149, 66,169, 84,226,233,211,167, 32,132,232,141, 70,227, 19,126, 79,188, 73,131, 69,177,160,195, 39,243,230, 1, 32,160,152,255,
+146,185, 2, 0,132,102,210,164,166, 14,228,171,166,173, 58,207, 43,253, 78, 77, 11,160, 49, 26, 7,182,106,222,112, 55, 0,104,
+169,241,147,218,108, 68,158, 86,253, 81,203, 86,237,246,112,148, 10, 89, 74,127, 97, 56, 28,208,176,136, 52,101,230, 92,165,119,
+ 30,105, 57,193,165, 11, 56,115,160,255,233, 22, 44, 73,199, 64, 41,165,101,221,130, 63,200,144,145,171,173, 54,143,211,213,103,
+218,110,173,234,136, 71,159,185,118,111,140,209, 72,157, 4, 2,146,162,214,177,155, 95,215, 92,149,220,125, 93,242,118, 32,103,
+ 66, 91, 56,118,183,147,151, 68,181,138,128,140, 34,156, 73, 72,203,191, 84, 27,205,236, 66, 67,191,217,107,142,252, 37, 17, 9,
+132,160,180, 56, 17, 40,165,208,232,141, 89,165, 38,204,199,150,168,166, 31,102,119, 11, 4, 36,182, 58,189, 91,143,146, 87, 15,
+ 94,118,238,235,240,152,236, 95,158,103,211, 7, 0,240, 60,155, 62,168,111, 75,230, 62, 73,201,255,250, 65,108,246, 15, 53, 29,
+ 55, 65, 9,174,180, 26, 60,239,149,215, 94,183, 62, 35,147,232,125, 0,253,155, 58,144,110,131,167,253, 52,141, 16,240,203, 68,
+240,240,252,139, 40,141, 98, 49, 12,179,240, 77,105,150, 70,177, 0, 68,215,224, 59,183, 0, 52,127,147,219, 22, 28, 28,156, 9,
+ 32,147,223,203,255, 37,131, 21,158, 70, 55,194,132,197,156, 77,253, 92,165,223, 79,162,231, 0,216,190,206, 70,148,104,216,188,
+201,138, 9, 77,165,115,255,142, 10, 47, 49, 83,127,203, 88,158,136, 52,218, 3, 0, 26, 52,104, 64,163,163,163, 65, 41,125,173,
+236,187,145,233,244, 62, 94, 90,114,161, 34,147, 13,160,147, 41,122, 81, 25,244,123,224,213, 46,224,232, 76,186, 8,192,162, 90,
+109,115, 45, 51,181,155,124,108,165,209,179, 64,245,217,244,121,120,120,222, 78,147,245,166, 53, 95,119,225,103,158,183,192, 96,
+241,252,239,242,248,241, 99,126, 89, 3, 30, 30, 30,158,202, 49,254, 13,154,124,210, 97,158, 23, 96,248, 42,224,225,225,225,225,
+225,225,225,121,179, 16, 0,129, 21, 90,241, 26,204, 14, 32,132, 4,214,216,234, 87,163,207,107,242,154,188, 38,175,201,107,242,
+154,188,230,219,167, 89,157,246, 91, 51, 59,145,150, 27,188,252,166, 31, 0, 2,121, 77, 94,147,215,228, 53,121, 77, 94,147,215,
+228, 53,255,109, 15,190,139,144,135,135,135,135,135,135,135,231, 13,195, 27, 44, 30, 30, 30, 30, 30, 30, 30, 30,222, 96,241,240,
+240,240,240,240,240,240,240, 6,139,135,135,135,135,135,135,135,135, 55, 88, 60, 60, 60, 60, 60, 60, 60, 60, 60,181,135,212,112,
+101, 18, 30, 30, 30, 30, 30, 30, 30, 30,158,106,224, 35, 88, 60, 60, 60, 60, 60, 60, 60, 60,188,193,226,225,225,225,225,225,225,
+225,225, 13, 22, 15, 15, 15, 15, 15, 15, 15, 15,111,176,120,120,120,120,120,120,120,120,120,120,131,197,195,195,195,195,195,195,
+195,195, 27, 44, 30, 30, 30, 30, 30, 30, 30, 30,222, 96,241,240,240,240,240,240,240,240,240,252,247, 13, 22, 33, 36,144,215,228,
+ 53,121, 77, 94,147,215,228, 53,121, 77, 94,147, 55, 88, 60, 60, 60, 60, 60, 60, 60, 60, 60,188,193,226,225,225,225,225,225,225,
+225,225, 13, 22, 15, 15, 15, 15, 15, 15, 15, 15,111,176,120,120,120,120,120,120,120,120,120,120,131,197,195,195,195,195,195,195,
+195,243, 95,130, 0,168,112, 38, 0,165,244,156,201, 34,181,152, 77, 80,157, 62,175,201,107,242,154,188, 38,175,201,107,242,154,
+111,159,102,117,218, 53,241, 31,255,104, 40,165,127,219, 3, 64, 32,175,201,107,242,154,188, 38,175,201,107,242,154,188,230,191,
+237,193,119, 17,242,152, 26,165,116, 36,132, 56,242, 53,193,195,195,195,195,195, 83, 61,194, 55, 41,214,152,144, 54, 43,223,169,
+ 51,175,247,165,216,158, 38, 52,216, 12,254, 51, 6,140, 43, 14,166, 21,219,226,215, 48, 1,111, 92,147, 7, 32,132, 44, 37, 4,
+ 51, 74,254, 95, 65, 41,253,230,109,220,206, 25, 51,102, 12,244,245,109, 5,107, 89, 42, 90,121, 61, 6,178,119, 1,214, 31, 97,
+206,233, 46,104,229,219, 1,151, 67,226,113,249,102, 56,110,108,232,139,207,167,204,131, 70,163, 71, 70, 70, 18,238, 95, 61,181,
+255, 45,218,215,109, 69, 34,209, 71,214,214,214,230,105,105,105,231, 1,252, 5,224,125, 7, 7,135,174,217,217,217,249, 6,131,
+ 97, 47,165,244,102,109,180,223,105, 73,102, 74,196,162, 81, 26,189, 97,249,213,123,244,183, 0, 63, 98,203,114, 88, 38, 19, 11,
+ 59,105,117,236,138, 43,247,233, 47, 53, 44, 43,121, 41, 26,207,159,235,175,201,187,239,190, 59, 66, 32, 16, 44, 6, 0,163,209,
+248,237,133, 11, 23,254,120, 19,186, 42,149,106, 8,165, 84, 81,178,223, 10,147,146,146,118,153,250, 93, 63, 63,191, 88, 0,117,
+ 74,158,198, 5, 7, 7,215, 53,229, 61,158,154,113,247,238, 93, 90,183,110, 93, 52,111,222,252, 81, 74, 74,202, 79,148,210,141,
+124,173,252, 67, 12, 86, 35, 66,234,143,237,221,254,108,247, 15,123, 40, 76, 49, 66, 46, 46, 46,203,236,237,237,199, 21, 21, 21,
+105, 0, 80,129, 64, 64,155, 52,105, 2, 66, 8, 74,175,155, 70,163, 49,253,225,195,135,205, 76, 53, 87,111, 74,179, 97,195,134,
+119, 25,134,113, 45,127,253,174,238,127,142,227, 18, 34, 34, 34,252,171, 43,167,179,179,115, 15,134, 97,102, 85,247, 57,142,227,
+150, 37, 39, 39,159,174,234, 51,205,155, 55, 15, 81, 40, 20,142, 12,195,144,202, 62, 83,190,205, 97, 89,150, 22, 21, 21,165,134,
+135,135,251,214,160, 17,115, 36, 4, 51, 56,142, 50, 0,192, 48,100,166,181,181,245,206,236,236,236,136,210,247, 75,126, 39,181,
+ 38,199,139,139,139,203,112, 0, 95, 3,160, 0,126, 76, 76, 76,220, 86,147,239, 55,104,208,224,174, 88, 44,118, 21, 8, 4,228,
+229,125, 82,209,115,142,227,168, 78,167, 75,120,244,232, 81,165,251, 40, 40,232,210,190, 21, 43, 86,132,108,249,245, 23,223, 22,
+ 45, 7,130,145,119,129,158, 90, 32, 36, 70,139, 86, 45, 8, 40,199, 65,147,151, 6,142,227, 80,164,209,226,252,161,223, 66,234,
+120,212,243, 69,241, 88,198,183,193, 92,245, 28, 62,124,248,146,229,203,151,219, 73, 36, 18,102,239,222,189,237,190,250,234,171,
+ 81,171, 87,175,118,249,232,163,143,204,117, 58, 29, 55,115,230,204,119, 8, 33, 11, 40,165, 71,106,162,221,190, 37,105,219,200,
+195,249,187,137,195,222,197,215, 75,119, 79,236,216,156,100,152, 41,196, 27, 63,236, 84,207,170,169,167, 53, 22,108,190, 62, 9,
+192, 47, 53, 40, 43,113,115,115,107,233,232,232,232,161, 86,171,141, 0,208,180,105, 83, 42, 16, 8, 94,248,156, 94,175,215, 63,
+124,248,240, 4,127,169, 55, 13,129, 64,176,248,212,169, 83,206,148, 82,244,232,209, 99, 49,128, 55, 98,176, 40,165,138,228,228,
+228,210,107,160,162,134, 95,175, 19, 28, 28, 92,106,168,234,212,224, 61,147,105,215,174,157,140,213,235,199, 11, 24,166, 59, 5,
+154,163,248,164, 14, 51, 2,103,133, 66,225,207, 55,110,220,208,188,237,251,254,236,217,179, 24, 61,122, 52,194,194,194, 26,157,
+ 56,113, 98,131, 74,165,154,144,156,156,220,133, 82,154,206,159, 25,255, 69,131,213,148, 16,135, 62,126,141,174,140,255,100,160,
+156,219,191,134, 96,196,156, 42,141,144,179,179,243,242, 78,157, 58,141,218,177, 99,135,226,240,225,195, 10,119,119,119,136,197,
+ 98, 8, 4, 2, 8, 4, 2, 48, 12, 3,161, 80,136,247,223,127,223,164,134,235,101,205,243,231,207, 43, 26, 54,108,248, 74, 35,
+203, 48, 12,122,245,234, 85,173, 38,195, 48,174, 33, 33, 33, 14, 50,153,172,204,164,112, 28,247,194,163, 92, 63, 52, 88,150, 69,
+167, 78,157, 76,170, 43,134, 97,102, 69, 70, 70,190, 83, 88, 88, 88,101,223,109,137,222,233,106,180, 84,215,174,156,119, 32,250,
+103, 0,155, 5, 42,176, 1, 36,158, 0, 35,173,240,243, 89, 89, 89,232,210,165,139,224,117,246,245,123,239,245, 33,148,210, 67,
+ 42,149,234,124, 70, 70,134, 57, 33,248,184,150,145,173,111,162,162,162,204, 41,165,104,212,168,209, 44, 0, 53, 50, 88, 2,129,
+192,245,204,153, 51, 14, 82,169,180,108, 63, 87,246,215,104, 52, 66,175,215,163,103,207,158,108, 53,166, 22, 63,111,254,205, 87,
+163, 53, 64, 67,221, 17, 30, 89,136,147, 39, 15,193,163,208,128, 39, 15, 52,224, 56, 21, 52,249,105,160,148, 66,173,209,161, 69,
+192,135,190, 28,247,246, 4, 77, 44, 45, 45, 7,174, 94,189,218,254,151, 95,126,201,123,244,232,145,126,211,166, 77,246, 99,198,
+140,105,172,215,235, 49,118,236,216,244, 70,141, 26,137, 87,175, 94,109,127,232,208,161, 30, 0,106,100,176,132, 4,223,127,220,
+175, 59, 52, 6, 6, 6, 3,107,239,108,111,254,231,228,225, 1, 34, 74,117,216,126, 36, 24, 6,150,251,173,166,230,170, 87,175,
+ 94,117, 55,110,220, 40,140,140,140, 20, 54,105,210, 4, 70,163,177,236,193,113, 28,140, 70,163,201,231, 37,207, 11,231, 22,226,
+227,227, 97,105,105,105, 22, 16, 16,144, 76, 8,153,127,241,226,197, 45,127,199,111,189, 78,100,235, 77,225,231,231,215, 90,200,
+ 48, 7,230,206,158,232,228,211,178,165,192,193,209, 30, 81,143,227, 32, 22,112,129,209, 15,163, 2,150,252,176,113,178,159,159,
+223,135,193,193,193,183,223,182,125, 93,119,192, 47, 27, 56, 86, 63,174,248,153, 21,128, 45,200,207,207,199,231,159,127,142, 35,
+ 71,142, 52,105,219,182,237, 50, 0,163,248,179,226,191,100,176,188, 9, 81,180,112,119, 10,250,254,235, 49,214,244,228,239, 76,
+ 81,102, 26,196, 85, 24, 33, 39, 39,167, 69,157, 58,117,250,100,199,142, 29,214,132, 16,156,157, 56, 10,214,122, 13, 84,223,173,
+128,181,157, 61,116,179, 70,195,220,200,194,231, 98,168,169, 23,219, 87, 52, 31, 61,122,132,236,236,108,216,217,217, 65, 46,151,
+ 67, 38,147, 65, 44, 22, 67, 34,145,152,170, 9,153, 76,134,115,231,206, 65, 40, 20, 66, 32, 16, 64, 40, 20,150, 61,202, 63, 23,
+ 8, 4,112,116, 52,125,104, 18,199,113,203, 26, 55,110,236, 19, 21, 21,101,145,147,147,131,182,109,219,230, 17, 66, 66,203,221,
+233,249,132,134,134, 90,152,220,216,232,159,161, 32,110, 19,104,246, 1,192,106, 0,140, 22,131,161,129,103, 89, 3, 83,254, 47,
+199,113,181,185,243, 76, 37,132,172,232,219,183,207, 44,128, 32, 48, 48,176, 96,226,196,137,244,209,163, 71,221, 63,248,160,159,
+199,227,199,209, 37,102,143,204, 32,132,172, 53, 53,146, 69, 41,149, 2,192,149, 43, 87, 64, 41,149,213,230,216,147, 74,165,184,
+113,227, 70, 89,132,146, 97, 24, 48, 12, 3,129, 64,128,163,209,118, 40,212, 49, 40, 74,125,128, 47,251,212,129,167,167,231, 43,
+134,251,149,125, 67, 41, 38,140, 25, 21,178,112,249, 26, 95,163,209,136,147, 39, 79, 98,213,170, 85,208,106,181, 8,232,218, 29,
+207,105, 11, 52,243,180, 3,199,113, 80,107,116, 8,189,116, 32, 68, 85,199,211,247,109,185, 24,228,230,230,254,217,176, 97, 67,
+ 65,122,122,250, 5, 0,207, 12, 6,195,250, 63,255,252,211,225,179,207, 62, 75,219,177, 99,199, 68, 0,110, 43, 87,174,236, 81,
+ 80, 80,176,167, 38,186,157, 90,144,222,254, 45,155,181,173,227,230,134, 75,215,111, 67, 44, 17, 89,141, 31,209, 7, 74,165, 16,
+ 63,252,114,156,139, 77,200,154,120,229, 62,221,102,226,185, 73,156,157,157,125,186,119,239,238,182,113,227, 70, 49, 0, 60,120,
+240, 0,105,105,105,176,181,181,133, 76, 38,131, 72, 36, 42,187, 97,227,169,145,209,104,216,165, 75, 23,153,209,104, 68, 97, 97,
+ 33, 54,110,220,104,105,102,102,102,217,171, 87,175,121, 0, 76, 54, 88,237,219,183, 79,213,233,116, 14, 0, 32,145, 72,210,174,
+ 95,191,238, 8,160,200,195,195,195,172,228, 35,234, 26, 70,182,226,202, 69,167,226,106,240, 94,181,248,251,251,183,106,210,208,
+227,220,210,165,243,149, 57,121, 41,176,180, 76, 5,131, 28,108,217,242, 51,204,204, 44, 48,111,222,108,161,127,155, 54, 46,147,
+191,154,125,206,207,207, 47,240,109, 51, 89, 28,171, 31,215,194,191,125,217,243,109,103,215, 65,107,233,139,196,249,243,177,102,
+205, 26, 52,104,208,160, 53,127,102,252,151, 12, 86, 0, 33, 66, 87, 27,229,209, 13,243, 38,123, 48, 55,142,137,212,113,209, 72,
+210, 24, 97,245,159,147,231, 92,249, 11, 35, 0,198,209,209,113,252,174, 93,187, 44, 74, 27,187, 70,196, 8, 43,232,225,209,180,
+ 41,228,150, 86, 72, 97,245,160, 6, 61,196, 34, 81,133, 13,162, 41,154,165, 17, 48,177, 88, 12,177, 88, 92,118,193, 21,139,197,
+213,106,190, 80, 57, 66, 33, 24,134,193,217,179,103,193,178, 44, 6, 14, 28,248,138,185, 18, 10,133, 47,116, 65, 86,167,153,156,
+156,124,218,197,197, 37,148, 82,250,142,209,104, 4, 33, 36, 52, 49, 49,177,115,233,251,206,206,206, 61, 90,180,104, 49,139,227,
+184,101, 38,149,147,205, 4,205,218, 5,243,118, 25,200,187, 97, 7,162, 8, 4, 71,220, 17,246, 56, 25, 23,238,196, 32, 61,187,
+ 16,126, 13,237,209,163,125, 61, 24,141, 70,147,183,189, 60, 46, 46, 46, 87,210,211, 51, 6,189,251,238,187,200,202,202, 98,231,
+207,159,143, 22, 45, 90,160, 97,195,134,149,153,167,106, 53, 9, 33, 73,161,161,161,238,106,181, 26,132,144, 36, 19, 12,217,185,
+138,140,240,159,127,254, 9,141,230,213,232,189,117,231, 37,248,122, 64, 93,140,252,114, 27, 86, 60,218,139, 13, 27, 54,224,229,
+ 33, 58, 47,107,114, 28,135,133,203,214,248,170,181,186,178,186,210,106,181,184,113,227, 6,180, 69,249,184,184,227,139,178,232,
+165, 90,163,131,171, 79, 55,223,234, 52,223, 4,255, 95,154,148,210, 32, 0, 65,229,234,119,206,142, 29, 59, 6, 1, 56, 72, 41,
+189, 14,224, 58,128,221, 53, 46, 39,193,200,143, 6,124, 0,161,216, 28, 15,163, 19,208,185,157, 47, 28, 29, 28, 16, 26,249, 4,
+177,137, 89,169,132, 96, 68,207, 14,210,101,106,181,110,206,229,123,244,215,234, 52,157,157,157, 61,183,108,217, 34, 42, 31,113,
+ 17, 8, 4, 47,156,235,165,175, 85,100,178,254,151,247,209,223,165,233,231,231,215, 48, 32, 32,224,250,162, 69,139,172,226,227,
+227,113,237,218, 53,184,187,187,163,168,168, 8,213, 13,109,123, 89, 83,167,211, 57,148,235,182,115, 0,128,148,148,148,221,248,
+ 79, 87, 58,173, 73, 57,171, 26, 87, 85,147, 49, 87, 47,151,179, 94,189,122, 18, 59,107,235,125,203,150, 47, 84, 70, 68, 94, 70,
+203, 22,109,161,180,244, 6,103, 76, 65,102, 86, 1,178,163,147,176,104,209, 10,204,155,255, 45, 86, 44, 95,164, 28, 60,100,228,
+129,118,237,218,213, 47,223, 93,248,191,190,223, 25,161,120,227,253,187,215,199, 1, 64, 94,228, 65, 76, 30,210, 30,249,249,209,
+ 24, 59,118, 46, 18, 19, 19,241,248,241,227,224,255,207,114,242, 6,171,156,185,241,151,138,118,238,158, 55,177,181, 52, 38, 76,
+162,125,112, 3, 73, 90,142,254, 17,207, 38,254, 80,197,247,138,138,138,116, 71,142, 28,193,153, 9,163, 80,159,176,176,249,110,
+ 37, 28, 93, 92,144, 51,242,125,228, 27,244,168,119,242, 54,164, 74, 37, 36, 10,101,181, 17,135,242,154, 23, 47, 94, 68,120,120,
+ 56,132, 66, 33,148, 74, 37,148, 74, 37,164, 82, 41, 36, 18, 73,153,185,170,204, 96, 85,114,240, 64, 32, 16,224,193,131, 7,136,
+141,141,133,149,149, 21,174, 93,187,134,174, 93,187,190, 18,197,170,229, 1, 95, 97, 68,169,100,220,213,105, 83, 53, 32,178, 3,
+108, 62, 65,254, 77, 21, 96, 61, 12, 6, 88,193,104, 52,226, 94,116, 38, 70,127,242, 30, 0, 96,252,156, 77, 8,108,227, 81,102,
+ 14, 76, 69,165, 82,153, 1,152,209,160, 65,131,193, 67,135, 14,101,197, 98, 49, 10, 11, 11,161, 86,171,241,224,193, 3,246,189,
+247,250, 20,244,237,219, 71,121,252,248,113,142, 82,172,168,225, 56,172, 84,149, 74,229, 94,210, 13,155, 90,139,227, 15,132, 16,
+236,221,187,183,194,247, 71,172,138,128,176,120,120, 22, 54,110,220, 8,163,209, 8, 74, 41,169,174, 62,191,155, 53, 37,100,242,
+204,133,190, 28,199,161,107,215,174,152, 54,109, 26,158, 62,125,138, 65,131, 6,149, 69, 3, 41,165, 80,107,181, 72, 12, 59, 23,
+226,236,230,225,251,182, 94, 28, 40,165, 39, 0,188,254,248, 37, 10, 23, 7, 39, 55, 48,212,128,164,180, 76,124,240, 94,119, 8,
+196, 74, 60,143,207, 64, 11,111, 47,231,161,239,119,112, 22, 16, 22, 51,150,237, 26, 15,224, 87, 19,206,119, 99,100,100,164,232,
+254,253,251, 16, 8, 4,176,176,176,128, 92, 46, 47, 59,199,203, 27, 46,158,202,233,214,173,219, 24, 0,243, 40,165, 57, 1, 1,
+ 1,142,139, 23, 47,182, 78, 76, 76, 68, 68, 68, 4,246,238,221,155,206,178, 44, 11,128, 80, 74, 23,188,129, 99,137, 43, 31,217,
+106,223,190,125,218,245,235,215, 29, 9, 33,133,165,145, 43, 66, 72, 97, 45,162,110,162,188,156,228, 47,173, 21,180,159,144, 49,
+247, 96,243, 10,158,103,179,204, 17, 11,123,199,159,130,131,131, 13, 85,125,215,210,210,242,243,197, 11,167,170,236,236, 56, 4,
+116,126, 23,201,169,122, 44,153, 58, 28,153,153,249,248,117,235, 82, 0, 18,232, 89, 1,222, 9,248, 16, 14, 14, 46,232,212,177,
+147,211,165,171, 87, 38, 0,248,225,109, 57, 6, 98, 15,126, 62,158, 16,242,125,157, 58,117, 46,109, 90,186,180,126,215,174, 93,
+ 1, 0,231,207,159,199,111, 67,134, 96, 62,240,233, 58, 66,146, 39,189,165, 19,155,254,177, 6,203, 67,170,188,180,229,171, 65,
+109,109,141, 69, 34,221,213,163, 72,212,114,236, 15,209,250,162, 59, 57,116,200, 15, 21,159, 96,148, 16,194, 17, 66, 56, 79, 79,
+ 79, 88, 24, 52,176,162, 58, 56,170, 84, 48,183,177, 69,150,161, 56,114, 37, 81, 40, 32, 81, 40, 77,186, 56,150,215,244,246,246,
+ 70,106,106, 42, 36, 18, 9,148, 74, 37,204,205,205, 95, 49, 87,166, 94,112, 9, 33,224, 56, 14, 66,161, 16,161,161,161,232,216,
+177, 35,220,220,220,176,119,239, 94,244,232,209,227,149, 46, 67, 83, 77,219,203,141,121,249,136, 82,233,224,119, 83, 6,183,191,
+128,164, 30, 88,243,143,192,200,187,194, 0, 75,104, 56,167,226,238, 64, 74,113,226,118, 42, 30,197,102,130, 51,114, 53,238, 34,
+116,118,118,246,147,201,100, 43,102,205,154,169,106,209,162, 5,210,211, 51,192,113, 28,148, 74, 37,212,106, 53,204,205,205,209,
+161, 67,135,148,249,243,231, 63,163, 20,189, 40,165, 41,255,141, 3,248,204,153, 51, 47,116, 15,150, 62, 10,147, 19, 48,114,210,
+ 14, 72,132, 64,104,104, 40, 26, 55,110, 92,125,184,156,163,152, 52,115,129,175, 70,171,131, 68, 34, 65,251,246,237,209,182,109,
+219,178,113,113,165, 6, 85,175,215,195,104,228,224,228,253,174, 47,121, 11, 47, 10,132,144, 86, 0, 62,179,180,180,116, 47, 42,
+ 42, 74, 49, 24, 12,123, 75, 76,127, 15,145, 72,244,145, 92, 46,119,202,205,205,141, 1,240, 43,165,244, 78,117,122,102, 50,153,
+173, 84,102, 1,142,213, 66, 40, 20,194,205,205, 3,212,168, 67,118,158, 26, 35, 6,247, 69, 72,104, 36, 78, 93,188,201, 26, 12,
+220, 58, 83,203,216,176, 97, 67,100,102,102, 66, 32, 16, 64, 46,151, 67,161, 80,160, 81,163, 70,136,143,143, 47, 51, 87,124, 23,
+ 97,181, 44, 56,121,242,164,131, 80, 40,116, 50, 26,141,136,139,139, 67,120,120, 56,214,174, 93,155,154,159,159, 31, 16, 28, 28,
+ 28, 85, 27, 81,137, 68,146, 86, 26,185,146, 72, 36,105, 85, 69,182, 94,103,204,149,171,171,171,151,139,131,244,236, 31,107, 39,
+214,241,105,217,154, 49, 19, 40,179, 11,159,166,118,188,125,243,102,251, 57,191,238,159,224,234,234,218, 61, 33, 33,225,105,165,
+141, 31,195,244,106,225,219, 82, 8,154, 2,161,164, 35, 86, 44, 31,140,244,140, 60,100,103,229, 67, 44, 86, 64,103, 16,192,200,
+ 17,180,239,216, 9,191,111,219,131,166, 77,155, 9, 4, 64,183,183,201, 96,149, 68,128,151, 29, 62,124,184,190, 76, 38,195,226,
+197,139, 97,110,110,142,155,223,127,143,223,196, 98,152, 1,216,168,215,207, 2,192, 27,172,255, 47,131,165,112,108, 52,100,247,
+ 39,221, 58,120,123,186, 48,134,189,107,145, 80,196,106,230, 61,210,107, 30,230,211,247, 35, 40,189, 86,149,175, 32,132, 80,177,
+ 88, 12,199,153,223,163,110,179,230, 40, 28, 61, 0, 89, 6, 61,188,142,223,132, 84,169,196,195,110,190,160, 58, 29,222,121,152,
+102,170,113,161,132, 16, 10, 0,246,246,246, 16,139,197,144,201,100,144, 74,165,144, 74,165,101,198, 74, 34,145, 64, 34,145,152,
+108,134, 56,142, 67,126,126, 62,158, 63,127,142,209,163, 71, 67, 46,151,163, 36,212,141,186,117,235, 66, 40, 20, 34, 49, 49, 17,
+ 23, 46, 92,128,167,167, 39, 36, 18, 73,141,218,218,114, 13,182,143,139,139,203, 37, 66,136,207,221,187,119, 45,252,253,253, 97,
+106, 4,171,184, 53, 20, 67,139,186,224,136,219, 11, 99,173, 12, 6,246,133,109, 41,141,190,152, 24,185,234, 86,191,126,253,181,
+203,151, 47,103, 92, 93, 93,193,113, 28,172,173,173, 81, 84, 84,132,140,140, 76,120,123,123,195,205,205, 13,203,151, 47, 7,128,
+221,255, 45,115, 5, 20,119, 7,151, 26,172,242, 70,107,210,251,117,144,149,165,132, 64,192,148, 25,230,106,247, 57,165, 88,183,
+124, 94,200,208,209,211,124,167,204, 89, 1,141, 86, 15,181, 86, 7,141, 86, 7,141, 86, 95,242, 87,135,210,129,237, 41, 17, 23,
+222,186, 8, 22, 33,164, 79, 96, 96,224,250, 85,171, 86, 57, 57, 57, 57,137,210,211,211,217,159,127,254,185,199,207, 63,255, 28,
+ 49, 97,194, 4,239, 9, 19, 38, 88,219,219,219, 11, 83, 82, 82, 12, 83,167, 78,237, 65, 8,153, 69, 41,221, 93,229,245, 66, 97,
+110, 35, 16, 43, 64,136, 16, 86,150,214, 16, 74, 20,224, 88, 33,140, 28, 96, 97,105,143,235, 33,251,113, 45, 44,127, 76, 90, 38,
+246,153,114, 83,213,172, 89, 51, 42, 16, 8, 96,107,107,251, 66,215, 32, 0, 56, 58, 58, 34, 47, 47, 15, 2,129,160,236, 53,158,
+202,175, 65,148, 82, 60,123,246, 12, 69, 69, 69,184,126,253, 58, 14, 28, 56,144,254,178,185, 10, 12, 12,252, 66,169, 84,206, 87,
+171,213, 43, 78,159, 62,189,182, 58,221,146, 49, 87,111,140,138, 82, 49,248,249,249,137,156,108, 5,167,207, 28, 92, 93,215,156,
+187, 71, 16,243, 57,240, 56, 47, 92,121,203,225,157,174,173,222, 99,154,127, 63,217,189,215,236, 31, 79,251,249,249, 53,170, 44,
+146, 69, 41,245, 53, 83, 40, 1,164, 34,248,110, 80,153,185,202,204,202,133, 86, 47,128, 86, 71,160,209, 51,120, 55,176, 39,214,
+111,250, 19,137,169,153, 40,157, 97,248, 54,209,160, 65, 3, 63, 23, 23, 23, 76,153, 50, 5,154, 93,187, 80, 0,160, 15,128,195,
+122, 61, 0,192, 28,152,198,159, 45,255, 79, 6,203,202,169, 81,231, 57, 51, 39,175,233,248, 97, 79, 38,245,139,118,200, 41,208,
+106,103, 68,176, 92, 66, 81,181,230, 10,148, 82,218,184,113, 99, 48, 12, 3,165,165, 21,204, 44, 44,160, 41, 23,185,146, 42,205,
+ 65,117, 58,112,122, 29,196, 38, 94, 28, 75, 53, 41,165, 48, 51, 51,131, 88, 44,126,161,107,176,212, 88,213, 36,130, 5, 0, 57,
+ 57, 57,216,183,111, 31, 90,183,110, 13,185, 92, 14,161, 80, 8, 31, 31, 31, 68, 70, 70,194,203,203, 11,132, 16, 28, 62,124, 24,
+253,251,247,199,211,167, 79,225,237,237,173,172,141,193, 58,123,246,172, 5,165,244, 29, 74, 41, 50, 50, 50,106,181, 19, 57,142,
+ 67, 65, 65, 1,206,156, 57,131,228,228,100, 56, 58, 58, 34, 59, 71, 14, 75, 85,147,226,223, 42,103,178, 76,100,124,159, 62,125,
+ 24, 66, 8,212,106, 53,164, 82, 41, 20, 10, 37,204,205, 45,208,176, 97, 35, 36, 38, 38,162,123,247,238,198, 39, 79,158,236, 18,
+139,197,235,106, 90,222,122,245,234,153,231,228,228,188,231,225,225, 33, 6, 0, 51, 51,179, 62,238,238,238,150, 49, 49, 49,185,
+ 53, 52, 3,101,198,138, 16, 82, 54, 3,149, 97, 24, 8, 25, 6,206, 78, 14,101,207, 75,182,157, 84, 87,143, 67,190,152,230,203,
+ 25,117,216,190,234, 83, 16, 54, 19, 44, 44,161,133, 11, 88,163,160,204,192, 42, 20, 10, 52,237,252,209, 91, 25,193, 18,139,197,
+195,183,110,221,234,242,199, 31,127,228, 28, 57,114, 36,183, 77,155, 54,138, 53,107,214, 56,172, 95,191,190,139, 78,167,195,148,
+ 41, 83,210,110,221,186, 85,216,175, 95, 63,203, 45, 91,182,184,212,175, 95,255,125, 84, 48, 46,139, 16,162, 0, 48, 24,192, 39,
+ 1,173, 45,133, 57,249,106,112,172, 14,207, 98,158, 35,183, 64, 7,206,168, 71, 92, 66, 18, 10, 52, 70,100,102,229,195,199,183,
+251, 79, 65, 65, 65,223, 18, 66,102, 83, 74,143, 85, 87, 78,163,209,136,155, 55,111,226,218,181,107,184,124,249, 50, 98, 99, 99,
+203,222,179,176,176,192,217,179,103,209,165, 75, 23,254, 10, 95,245, 53,104, 94,247,238,221,231,217,218,218,202,214,173, 91,103,
+ 89,183,110, 93,176, 44,171,123, 57,114,229,239,239, 63,103,206,156, 57,206, 31,124,240,193, 68, 0,107,107,251,123,149, 69,182,
+ 76,224,149, 84, 12,233,233, 41, 95,252,180,117,184,157, 66, 28,155,132,199, 63,186,148,196, 98,128,162, 60, 32,104, 39, 72,135,
+185,207, 71, 4,142,183, 94,126,100,253, 23, 0, 54, 84, 38,252,228,105, 60, 54,110, 92,143,175,166,140,192,239,191,174, 0,199,
+ 9,161, 53, 8, 80,199,163, 45,180,122, 14,132, 17,162,133,175, 63, 46, 6, 93,129,136, 1, 38,143,185,245,214, 29, 7,143, 31,
+ 63,190, 29, 27, 27,219,120,238,220,185,248,221,197, 5,230,230,230,152, 58,111,222, 13,150,101,219,243,103,201,255,147,193,242,
+107,232,245,189,165,141,245,168,246,173,154,216, 78,157,248,133,232,105,138, 6, 23, 58,126,147,179,127,249, 76,101, 60, 85, 78,
+136,165, 57,215,106, 18,117, 96, 23, 78, 69,166, 81, 7,143,163,215, 33, 85, 42, 17,213,195, 31, 84,167, 67,135,144, 88, 72,149,
+ 74, 8,101,102,181, 57,129, 95,232, 14,124,249, 57,195,152,150,184, 94,175,215, 91,117,235,214, 13, 93,187,118,197,135, 31,126,
+ 88, 54,230,170,101,203,150,216,189,123, 55, 6, 12, 24,128,123,247,238,193,217,217, 25,141, 27, 55, 70,227,198,141,113,225,194,
+133, 26,223, 61, 26,141, 70,244,232,209, 35,143, 16, 18, 74, 41,245,185,125,251,182, 69, 77, 53, 74, 27,155, 51,103,206,224,189,
+247,222,131,151,151, 23,130,131,131,113,102,193, 15,144,219,212, 1, 96, 5,206,104,132, 78,167, 3,195, 48,213,142,193, 10, 8,
+ 8, 16, 10, 4,130, 70,245,234,213, 67,122,122, 58,210,211,211, 97,111,111, 15,149, 74, 5, 7, 7, 7,172, 90,181, 10,107,214,
+172,185, 77, 41, 93,150,146,146,242,176,166,251, 72,165, 82, 5, 90, 91, 91,255,160, 86,171,197,165,101, 33,132,136,156,157,157,
+111,168, 84,170, 89, 73, 73, 73, 71,107, 98,176,244,122, 61, 8, 33, 56,254, 76,133, 66, 29, 65, 94, 66, 48, 38,191, 95,247, 5,
+195, 37, 18,137, 94, 72,171, 81,185,193,162,216,181,245,199,144, 89,223,124,230,139,172, 29, 96, 51,119,128, 88, 15,193,129,240,
+158,248,243,150, 45, 0,160,161, 19,131, 31, 71, 41,223,218, 8,150, 94,175,223,210,160, 65, 3,232,116,186,243, 0,182,134,134,
+134,246, 79, 78, 78, 94,253,215, 95,127,169, 6, 13, 26,148,116,244,232,209,175, 0, 28, 10, 13, 13, 29,185,120,241,226,174, 6,
+131,161,194,217,101, 2,129,224,247,169, 83,167, 6, 12, 26, 52,136,136, 25,131,238,204,233,109, 66,150, 53,144,233,179,127, 49,
+ 6, 93,189,196,176,172,129,124,248,241, 84,238,196,133, 48,102,204,164,149,198,150,109,223,195,131, 7, 15,156,250,244,233,179,
+ 8,128, 73, 6, 75, 36, 18,149, 25,232, 10,126,159,239, 34,172,134,243,231,207,111, 6,176, 57, 32, 32, 32, 85,161, 80,160,160,
+160,224,149,115,164, 93,187,118, 50,149, 74, 37, 19,137, 68,104,221,186,181, 77,143, 30, 61,162, 24,134, 89,123,242,228,201, 26,
+ 39,161,172, 40,178, 85,219, 52, 13,230,214, 92,159,150,109,155,154, 63, 50,159,111, 46, 19,106,238,185, 71,201, 44, 8,128, 92,
+173,227,179,235,177,131,243, 72,154,180,101,179, 64,119,200, 25, 89,159,202, 12, 22, 33, 36, 36, 47, 39,183, 87, 94,190, 14, 87,
+175, 61,192,199,131,235, 67,171, 39,224, 56, 6, 5,133, 90, 64, 32, 2, 3, 96,200,208,225,160, 68,136,236,140, 20, 16, 32,236,
+109, 59, 14,140, 70,227,172,126,253,250,181, 90,188,120,113,147,169, 83,167,150,238,151,118, 42,149, 42,130,207,131,245,255, 96,
+176, 26,120,185,246,236,220,202,127,210,183,179,191, 53,127,124,251, 50,190, 93,244, 19, 87,223,191, 71,238,178, 93,135,243,115,
+149,117,186, 22, 37, 61,188, 87,211,168,131,136, 53,128,178,122, 72,149,202, 23, 34, 87, 18,133, 2, 34, 51,121,141, 54,130, 16,
+ 2, 74,233, 43,221,129,229,205, 85, 77, 46,182, 18,137, 36,231,202,149, 43, 14, 9, 9, 9, 47, 12,104,247,240,240, 0, 33, 4,
+183,110,221,194,205,155, 55,241,241,199, 31, 67, 40, 20, 66, 36, 18, 33, 52, 52, 52,191, 54, 17,172,210, 89,132,206,206,206, 61,
+218,180,105, 83,225,236, 65, 83, 34, 88,113,113,113,240,242,242,130, 86,171,133,181,181, 53,178, 82,158,225,233,227,135, 40,210,
+ 26,224,238, 32, 65, 70, 70, 6, 74,243,122, 85,197,165, 75,151,168, 74,165,122, 33,242,147,158,158, 14, 79, 79, 79,108,220,184,
+ 17,107,214,172,217,144,156,156, 92,227,187, 88, 23, 23, 23, 27,142,227, 22,247,233,211,167,111,255,254,253,209,163, 71,143, 23,
+222,223,177, 99,135,229,193,131, 7, 55,185,185,185,245, 23, 8, 4,179, 98, 98, 98, 82,171,219,231, 0,240,219,111,197,233,147,
+228,109,231, 97,214, 32,119,124, 50,126, 27,126,252,241, 32,164, 82,233, 11,141,237,194,133, 11,171,175, 71, 74,209,237,195,207,
+125,187,248,232, 96,204, 60, 12,139,246,217,200,187,110,141,220,124, 95,220, 90,213, 27, 0,208,252,179, 99,160,212, 29, 0,222,
+202, 8, 22,165,244, 44,128,179,229, 94,218, 79, 8, 49, 16, 66,134, 2,216, 67, 41, 61, 88,242,250, 47,168, 34, 49,104,219,182,
+109, 91,206,158, 61, 91, 84,154, 54, 67, 85,103, 49,171,215,235, 57, 0,104,228,243,206, 11,125,213,209,209,209,248,241,199, 31,
+ 81, 88, 88, 8,113, 13,194,204,129,129,129,101, 99, 34,197, 98, 49,236,236,236,160,215,235,193,178, 44,111,174,106,198,188,222,
+189,123,207,163,148, 82,142,227,230,150,187,217,146, 90, 91, 91, 95,249,233,167,159,108, 89,150,197,180,105,211,172, 50, 51, 51,
+173,198,142, 29, 59, 11, 64,165, 6,171,146, 52, 13,149, 29,111,181, 74,211,192,113,104,168, 84, 90, 32, 19, 9,208,218, 25, 90,
+230,216,178, 89,103,147,191,184,167,138,245,245, 86, 24, 13,158, 76,158, 14,150, 50,115, 80, 74, 27, 86,246,219, 44,199,157,124,
+ 24, 17,209,189,142, 91,125,193, 95,199, 46,163, 95,255, 65,208,106, 25,104, 12, 4, 68, 32, 2, 17,136,209,220,199, 23,141,155,
+250,128, 2,136, 10, 15,101,141, 47,158, 27,255,243,212, 29,240,203, 6,215,190, 63,143, 3,128,105,107,207,227,219,239, 87, 99,
+216,135, 61, 48,114,228, 72, 62, 15,214,255,135,193,170, 83,167,142,149,131, 82,254,219,132,207, 70,153,199,222,191,129,132,208,
+ 27,184,118, 53, 42,123,231,129, 35,137,121,185,233,159,213,196, 92,149,143, 96,121,237, 56, 14, 23,103,231,178,200, 85,251,224,
+ 24, 72,149, 74, 4, 53,119, 1,167,213,162,251,243,188, 26,111, 76, 69, 81, 43,177, 88, 92,171,153,126,165,166,234,229, 1,237,
+ 99,198,140,193,214,173, 91,209,161, 67, 7, 52,104,208,160,214,119,202, 47,143,137,170,201,236,193,138,180,234,212,169,131,176,
+176, 48, 88, 90, 90, 98,251,246,237,112,117,117,193,200,158, 94, 16, 8,138,187,182, 24,134, 49,105, 12, 22,165,212,232,226,226,
+242,236,204,153, 51,158,131, 6, 13,130, 88, 44, 70,118,118, 54, 44, 44, 44,176,126,253,122, 78, 46,151,255, 94,211,242,185,185,
+185,141,148,201,100, 11, 6, 15, 30, 44,108,212,168, 17, 82, 83, 83, 97,105,105,201,149, 44,109, 4, 27, 27,107, 78, 46,151, 99,
+204,152, 49,240,241,241,233, 54,115,230,204,174, 42,149,106,105, 82, 82,210,207,213,153,172,221,187,139,123,167, 62, 91,251, 16,
+ 58, 93,241, 80,139, 13, 27, 54,192,217,217,249,133,207, 62,121,242,164,250, 89,132, 28,135,179, 7,126, 9, 25, 63,113,176, 47,
+177, 30,130,188,235,214,160,150, 31, 35,181,192, 28, 59, 46,165,225, 82, 72,108, 89,162,209,183, 45,130, 69, 8,233,135,226,161,
+ 23, 39, 40,165,135, 8, 33, 3, 1,244, 40,125,142, 26, 38, 22,101, 89,150, 50, 12, 67,226,227,227,245,114,185,156,216,216,216,
+ 8,165, 82, 41,180, 90,109,153,209,138,142,142,198,177, 99,199,144,144,144, 0, 27, 27, 27,198,210,210, 18,122,189, 62,219,196,
+187,238, 87,210, 51,148,252, 46,111,174,106, 72, 80, 80,208,102, 0,155, 75,159,191,251,238,187, 35,133, 66,225,183, 0, 44,183,
+108,217, 98,101,101,101, 69,142, 30, 61,106,216,178,101, 75,142, 64, 32,200, 6,176,186, 42,189,138, 6,179,191, 14, 21,165, 98,
+160, 20, 17, 89,185,207,234,138,172, 84,220,125, 13,189, 62, 37,126, 86,227,108, 81,125,123,210,180, 25,250,167, 69, 94, 29,201,
+ 62,105,159,158,146,198, 80,208,136,202,116,115,115,115,127,249,125,219,190,233,123,247,252, 86, 71,170,148, 98,204,216,217, 56,
+126,234, 34, 8, 35,194,149,235,183,160,211, 27,145,145,149,139,193, 67,134,193,213,217, 14, 40, 72, 76, 23, 73, 36, 63,191, 77,
+251,254,133, 60, 88,254,237,113,237,224, 74,236,142,170,131,196,239,191,231,243, 96,253,157, 6,203,221,221, 93,170, 16, 97,180,
+141,153,120,198,132,161, 31,216,167, 61, 9, 71, 66,100, 8, 0, 64,171, 85, 27,146,163, 46,181, 48,225,162, 29,248,114,174,140,
+210,174, 27, 27,123,135,178,200, 85,249,217,131,156, 86, 11, 78,175, 3, 42,233,206,169, 76,147, 97,152, 87,140, 85,249, 11,111,
+ 77,202, 89, 26, 29,169, 40,193,168,155,155, 27,150, 46, 93,250, 74, 30, 44, 83,202, 89,114,151,214,131, 16,226, 83,106,140, 40,
+165, 62,206,206,206, 61, 76,153, 57, 88,153,102,105,198,234,147, 39, 79, 34, 34, 34, 2,148, 82,244,233,211, 7, 34,145, 8,230,
+230,230,101, 38,171,162, 49, 88, 21,105, 50, 12,243,249,193,131, 7,167,223,184,113,163,231,180,105,211, 72,233, 88,150,130,130,
+ 2, 46, 57, 57, 57,191,166,229,228, 56,110,198,233,211,167,133, 70,163, 17, 91,183,110,197,157, 59,119,168, 92, 46, 95, 38, 18,
+137,150,202,229,114,214, 96, 48,124,253,197, 23, 95,140,157, 63,127, 62,211,169, 83, 39,220,184,113,131,241,244,244,156, 8,224,
+231,234,182,253,214,173, 91,197, 93,206, 89,113, 24, 63,107, 15, 20,102, 66, 60,124,248, 16, 89, 89, 89,175, 36, 31,173,190,156,
+ 20,190, 93, 6,249,114, 84, 15,189,114, 16, 24,179,119,139,151,202,121,174, 69, 43,159,226,168,163, 58, 47,189,172, 30, 43,138,
+ 96, 85, 86,206,215, 52, 63,127,171, 38, 33,164,111,147, 38, 77,190,137,136,136,112,109,222,188,185, 55, 33, 36,160, 89,179,102,
+173,194,194,194, 74,159,139, 40,165,123,107,162,121,231,206,157,253,235,215,175, 31, 59, 98,196, 8, 49,199,113,198,216,216, 88,
+ 3, 0,226,228,228, 36,184,115,231, 14,247,215, 95,127, 65,173, 86,195,213,213,149,113,113,113, 33,103,207,158,229, 34, 35, 35,
+111, 81, 74,103,155,186,237,165,145,105,145, 72, 4,129, 64, 0,181, 90,109,146,185,250, 95,220, 71,255,159,154, 2,129, 96,225,
+129, 3, 7, 92,180, 90, 45,196, 98, 49,246,237,219,167,223,182,109, 91, 68,110,110,110,199,224,224, 96,117,109,203, 89,147, 4,
+164,213,105, 22,228, 8,142,159, 58,253,160,149,160,231, 47, 24,159,148,222,177,204,120, 17, 98,115,208,209,187,163,188,117,243,
+ 68,243,203, 43,153, 34,104,142, 87,166,249,228,201, 19,157,191,191,255,160,153, 51,230,157, 95,176,104,129,114,238,188,121,184,
+118, 43, 12,153, 57, 5,224,168, 0, 28, 33,248,246,219,185,112,178,179,129,141,196, 80,148, 89, 72,250,191,188,100,206,255,250,
+126,127,157, 60, 88,127, 71, 57,255, 53, 6,203, 92,136, 7, 29,189,189, 92, 58,249, 54,149, 9,141,106, 36, 68, 62, 65, 86,161,
+ 6,103,195, 99,115, 24,202,252,254, 58, 63, 42, 16, 8, 96,105,105, 9,177, 88,140,118, 97,137,144,136,197,144, 42,205, 1,160,
+ 56,114, 69, 41, 24,137,180,166, 7, 80,133, 6,171,182, 24,141, 70, 56, 58, 58,190,176,236, 74,249, 6,187,212, 40,214, 52, 69,
+ 3,195, 48,179,110,220,184, 97, 17, 23, 23, 7, 74, 41, 14, 29, 58,100, 49, 96,192,128, 89,181,137, 94, 81, 74,145,153,153, 9,
+142,227, 32,149, 74,209,179,103, 79,116,234,212, 9,250,146,217, 31,165, 13, 80, 77, 51,185,199,199,199, 39, 3,248,202,213,213,
+245,247,233,211,167,207,104,211,166,141,255,252,249,243, 65, 8,169,109,104, 64,111, 52, 26,113,233,210, 37, 28, 60,120,144,213,
+104, 52, 3, 82, 82, 82,238,150,123,127,145,171,171,235, 95, 3, 6, 12, 56,241,232,209, 35, 97, 68, 68, 4, 0,176,213,137,170,
+213,106, 52,104,208, 0, 44,203, 98,249,120, 55,228,231, 55, 7,203,178, 48, 26,141, 80, 40, 20, 47,228,253, 50,101, 63,113,148,
+ 67,200,197,125, 33,117, 91,246,240,173,110,169,156,183, 44,130,213, 51, 34, 34,194,117,232,208,161,105, 97, 97, 97,174,199,142,
+ 29,179,234,211,167,143, 98,200,144, 33,105, 97, 97, 97,174,132,144,119, 0,236,173,225,249,243, 13, 33,228,212,146, 37, 75,102,
+ 77,154, 52,169,205,136, 17, 35, 68, 34,145,136, 75, 76, 76,100,119,237,218, 69, 26, 52,104,192,136,197, 98,114,250,244,105,238,
+246,237,219, 55, 89,150, 93, 78, 41,189, 82,211,235, 72,169,185,226,199, 92,189, 81,246, 14, 26, 52,104,228,128, 1, 3,204, 90,
+183,110, 45,253,229,151, 95,114,139,138,138, 42, 52, 87, 21, 81,147, 52, 13, 53, 77, 64, 90, 74, 82, 82,210,175, 75, 23, 94,158,
+242, 73,227, 33, 94,159,219,185,227, 92, 97, 26,178,133, 2,198,194,138,129,111, 93, 1,212, 57,207,237,207,223, 58,240, 60, 57,
+ 41,169,202,188,106,119,239,222,189,227,231,231, 23,248,201, 39, 35, 15,140,249,236, 11,135,185,223,204, 20,237,255,235, 4,192,
+234,113,251,202, 21, 88,201, 9,101, 11,147, 83, 51,117,228,131,183,113,169,156,216,131,159,143, 7, 48,158, 16,242,241,188,121,
+243,118,141, 31, 63, 30, 28,199, 33, 40, 40, 8, 63,207,156,137,249, 70,227,167,235, 8, 41,154, 68,233,120,254,180,120,131, 6,
+ 11, 12,201,191,249, 56,182,224,214,227,216, 2,112,148,114,148,106, 25, 6,241,133,122,253,146,168,167, 9,167, 95,103,159,246,
+236,217,147,121,217,184, 84, 4,203,178,166, 14,174,139, 13, 12, 12,124, 99,154, 28,199, 37,116,236,216,241,149,134,185,178,255,
+ 75,116, 19, 76, 10,201,114,220,178,118,237,218,189,242, 90,173,194,187, 28,247,172,107,215,174,250,151, 77, 87, 85,207,141, 70,
+ 99,130,169,250, 9, 9, 9, 15, 0, 12,115,113,113,233,210,163, 71,143,137, 0,106,155,142, 97, 85,151, 46, 93,166, 82, 74,133,
+132,144,149, 47,153,171,210,223, 10,119,113,113,153,235,233,233, 89,182, 0,116,117,219, 30, 24, 24,168,175,110,145,231,242, 3,
+160, 57,142, 75,168, 90,147,162, 78,139,238,190,122, 67,177, 73,171,106,169,156,202, 34, 88,255,163,236, 33,132,136, 0,100, 71,
+ 68, 68,188, 83, 18,185, 74,120,240,224,193,185,221,187,119, 59, 2,213,167, 79,168,228, 6,224, 10,128, 43,132,144, 78, 27, 54,
+108,248,102,204,152, 49,173, 63,254,248, 99, 97, 64, 64, 0,142, 31, 63,110, 12, 10, 10,186,165, 86,171,151,213,212, 88, 17, 66,
+ 10, 94, 62,135,170, 40,195, 91,191, 72,239,155,230,236,217,179, 95,183,107,215,110,238,190,125,251,146,188,188,188,164, 34,145,
+ 72,103,170,185, 2,106,150,166,129, 82,202,213,242,216, 98, 29, 29, 29,123,239, 24, 58,254, 72,139, 9, 35, 60,122,118,240,151,
+187,184, 59,184, 60,122,158,129,132,176,115,133, 79,131,214,199, 24, 53, 89,253, 40,165,213,222,168, 5, 7, 7,223,110,215,174,
+ 93,253, 13, 91, 54,141, 23, 48, 76,119,214,104,244,153, 58,126, 24, 37, 64, 24, 7,156, 21, 75, 37,111,253, 98,207, 82,177,248,
+211, 9, 19, 38,224,207, 63,255,196,161, 53,107,208, 35, 33, 1,187,197, 98,152,137,197,216,168,215,143, 3,192, 27,172, 55,105,
+176,194, 30, 63,247,251, 59,126, 48, 34, 34,162,221, 63, 93, 51, 34, 34,194,255,239,170,240,215, 25,107, 85, 65, 57,255, 95,166,
+209, 38, 38, 38, 94, 4,112,241, 53,190,191, 13, 38, 44,230,108,234,231, 0,224,225,195,135,111,124,219,169,212,114, 80,220,253,
+ 51, 57, 78, 77,222,181, 98, 89, 22,132, 16,104, 52, 26,220,188,121, 19,218,162,124, 4,237, 28, 93,150,201, 29, 20, 72,137,188,
+144,227,228,209,204,234,127,253, 34, 64, 41,189, 12,224,114,137,121,233, 79, 8,233, 13,224, 52,165,116,255, 27,210, 47, 51, 90,
+ 91,182,108,153, 66, 41, 69, 94, 94,222,154,154, 26,171,178,107, 83, 88,216, 5,240,252,173,220,184,113, 67,211,181,107,215,223,
+ 23, 47, 94,220,150,227,184, 63,222,132,230,107,164,105,168,144,212,212,212,231,132,144, 22,220,247,107, 71, 5, 91,153,191, 71,
+ 13, 76, 35, 98, 16, 30, 37,186,204,227, 41, 41, 41,191, 81, 74,141, 53,217,222,146,155,186, 31,255,141,251,251,126, 88, 88, 15,
+ 0,232,213,171, 23,212,211,138,211, 94,109,251, 79, 30,172,141,252, 25,241,166, 35, 88, 60, 60,255, 50, 18,163,130,247, 3, 64,
+ 74,100,113,251,253,211, 79, 63, 1, 0,122,244,232,241,202,172,199,210,207,164, 60,127,240, 86,213, 65,201,128,246, 67,127,147,
+246, 21, 0, 87,248, 35,237,127,131,243,231,207,191,209, 4,147,111, 58, 1,105,201, 49,101, 4,176,181,228,193, 83, 75, 26, 54,
+108, 72, 0,192,206,206, 14,115,106,176,156, 26, 79,213, 48,124, 21,240,240,240,240,240,240,240,240,188, 89, 8,128,192, 74,238,
+ 12, 76,158, 29, 64, 8, 9,172,197,157,199, 57, 94,147,215,228, 53,121, 77, 94,147,215,228, 53,255, 93,154,213,105,191, 53,179,
+ 19, 75, 51, 92,255, 29, 15, 0,129,188, 38,175,201,107,242,154,188, 38,175,201,107,242,154,255,182, 71, 21, 99,176,246, 11, 18,
+ 19, 97, 33,145,200,197, 0,160,211, 21,233, 93, 92,144, 7, 12, 52,130,135,167, 38, 97, 82, 66, 28, 75,204,124,234,155,252, 44,
+ 15, 15, 15, 15, 15,207, 63, 21, 97,101,230, 42, 35, 67,110, 39, 20,102, 55, 52, 26, 53,141, 1, 64, 40,100, 30,102,100, 88, 71,
+217,217,237,207,120,211, 38,171, 87,175, 94,179, 41,165,142, 34,145,232,184,147,147, 83,208,230,205,155, 13,255,102,163,241, 58,
+ 38,227,255,195,160,216,218,218,170, 28, 29, 29,135, 90, 89, 89, 5,228,230,230, 94, 73, 73, 73,217,158,153,153,153, 84, 73,121,
+150, 18,130, 25, 37,255,175,160,148,126, 83, 69,217, 77,254,236,203,168, 84,170, 6, 50,153,108, 60,195, 48,205, 0,128,227,184,
+ 7, 26,141,102, 67, 82, 82,210,227,127,219, 73,173, 82,169,204, 40,165, 31,136, 68,162,225, 54, 54, 54,173,211,211,211,231, 39,
+ 38, 38,174,174,229, 49, 43, 4, 48,205,202,202,234, 99, 43, 43, 43,207,172,172,172,167,121,121,121,123, 1,252, 72, 41,173,246,
+ 60, 93, 48, 89,213, 46,160, 71,192,156,160,211, 65,139,230,173, 77,186,241,202,251, 95,171,108,187,119,235, 48, 55,232,232,245,
+133,223,172, 79,204,170, 97,217, 24,252,103, 28, 41, 87,124,216,255,115, 71,232, 58, 56, 56,180, 45, 73,164,202, 48, 12,243, 99,
+106,106,234,197,127,242,113,100,111,111,175,112,114,114, 90, 78, 8,233, 43, 16, 8, 34, 82, 83, 83, 71, 39, 37, 37, 37,188,161,
+107, 33, 83,183,110, 93,243,216,216,216,252,218,166,106,248, 55,210,174, 93,187, 84,189, 94, 95,101,118,124,177, 88,156,118,227,
+198, 13, 71,190,182,254,161, 6, 43, 49, 17, 22, 66, 97,118,195,180,148,176,193, 73,201,161, 31, 1,128,202,217,103,175,131, 83,
+243, 61,137,137, 18,125,171,110, 3,148, 34,185,112,131, 64, 32,106,169,209,105,237, 68, 66, 81,134,158, 53,220, 99,116,116,124,
+242,195,131,113,166,252,112,223,190,125, 27, 2,176,244,245,245,189,163,211,233, 90,175, 94,189,218,249,192,129, 3, 62,193,193,
+193, 67,222,127,255,253,163,148,210,211, 71,143, 30, 85,215,232,164, 13, 8, 16, 58,228,216,124, 42, 16, 10,251, 2,240,161, 20,
+ 0, 17,132,114,122,221,137, 52,177,205, 31, 52,184,246,198,173, 93, 3,219,134,132,234,167,139, 8,237,100,160,228, 10, 37,226,
+149, 55, 30,103, 70,213,224,130, 98,146,121,120, 29,147,241,210,119,215, 80, 74,167,189,233, 3,198,201,201,201,110,224,192,129,
+ 59, 22, 45, 90,164, 48, 55, 55, 39, 49, 49, 49,253,191,249,230,155, 30, 42,149,234,147,164,164,164,248,151,205, 30, 33,152,193,
+113,148, 1, 0,134, 33, 51, 29, 29, 29,155, 9,133, 66,237,203,186, 44,203, 74, 9, 65, 79,142, 43, 94,206,134, 97,200, 12, 66,
+200, 90, 83,140,162,167,167,231,144,230, 62, 45,167,126, 51,123,174,210,222,193, 65,193,178, 70,125,124, 98,130,124,229,210,239,
+219,120,122,122,174,125,246,236,217,174,154,110, 39, 33,132,184,186,186, 14, 22,137, 68,125, 0, 52, 41,121, 57,210, 96, 48, 28,
+ 75, 72, 72,216, 99,106, 67,222,162, 69,139,203, 12,195,184,215,228,183,141, 70, 99, 92,104,104,104,199,218,236, 31, 23, 23,151,
+ 65, 46, 46, 46,191,181,109,219, 86,222,178,101, 75,136,197, 98,172, 88,177, 98, 26,170, 89,222,164,212, 72,201,229,242,193, 10,
+133,194,171,160,160,224,137, 90,173, 62, 32,145, 72, 2,215,174, 93,235,214,161, 67, 7,243,212,212, 84, 34, 16, 8, 28,143, 29,
+ 59,246,233,186,117,235,122, 16, 66,186, 86,151,103, 40,247, 9,157, 35,237,219,164, 83,238,147,139,115, 0,244,122,101,191,107,
+100,195,169,192,173,143,154,134,196,163, 6, 83,228, 9, 33,140,171,171,235, 90, 71, 71,199,145,106,181, 90, 67, 8,161,132, 16,
+218,188,121,243,210,247, 1, 0, 58,157, 46,251,209,163, 71,141,170,210,242,104,103,115, 87,192, 8, 92, 43,221, 31,156, 49,225,
+249,141,172,215, 78,221, 98, 52, 26,103, 68, 68, 68,244, 22,137, 68,164, 69,139, 22, 2,212, 32,245,137, 74,165,106, 72, 8,249,
+150, 82,122, 39, 57, 57,121, 67,201,146, 86, 93, 40,165,101,215,138,146,116, 42,112,113,113,217, 80,191,126,253,247,163,163,163,
+ 55, 38, 38, 38, 46,122, 13,163,190,121,201,146, 37, 31,245,232,209, 67,144,153,153,233,210,189,123,247,157, 0, 58,189, 78, 29,
+248,249,249,137, 82, 82, 82,166,181,104,209,226,203, 86,173, 90, 57,135,135,135,167,168, 84,170,117, 78, 78, 78, 63, 6, 7, 7,
+ 87,123,125,246,241,241, 81, 9,133,194,145, 0, 62, 5, 32,160,148,238, 6,240, 71, 72, 72,200,211,127, 67,131,173,215,235, 29,
+206, 45,154, 11, 34, 20, 66,214,177, 43, 56,142, 67,198,202,121, 96,179, 50, 96,183,104, 29, 88,150, 69, 96, 96,160, 3,120,254,
+185, 6, 75, 34,145,139,141, 70, 77,227,164,228,208,143,222,233,252,147, 37, 0, 92,190,244,229, 71, 14, 78, 77, 31, 72, 36,242,
+ 40,169,133,236,224,128,190,129, 45, 7,246,233, 76, 92,157, 29,144,144,156,230,248,235,238,211, 61,143,157,190,120, 16,128, 73,
+249,179,242,242,242, 22,215,173, 91,215,254,252,249,243, 49, 18,137,196, 76, 38,147,145, 65,131, 6,153, 13, 25, 50,196,251,194,
+133, 11, 94,167, 78,157, 26,216,175, 95,191, 83, 98,177,248,248,190,125,251,170, 93,159,204,177,121,127,111, 39,161,211,254,126,
+ 31,244,114,127,175,155,131,164,174,147, 61, 40, 39,195,195,103,250, 58,103,175,132,244, 60,126,242,244, 12, 7,239,254, 31,166,
+ 69, 28, 50,121, 53,244,102,205, 44,173,204,212,116,170,153,152,126,220,179,141,183, 71,223,110,237,137,167,167, 39,162, 30, 69,
+121, 93,188,118,103,100,151,198,230,207,213,122,178, 91,109, 70, 86, 61,120,144,155, 83, 85, 84,169,188,209, 16, 8,152, 89,221,
+186,117, 27, 41,149, 74, 95,184,115,211,106,181, 12,195, 16, 7,163,177,248,229,154,152,140,210,223,208,233,180,140, 72, 36,129,
+ 64,192, 76,109,217,178,101,175,212,212,212,147, 82,169,116,197,243,231,207,107,148,119,102, 18, 33,146,108,161,208,143,145, 74,
+157,141, 58,157, 45, 0, 16,137, 36,187,142,173,109,219,239,190,251, 78, 41, 16, 8,144,153,153, 9,141, 70, 67, 62,255,252,115,
+179, 39, 79,158,140, 0,176,176, 58,211,178,109,219, 54, 95, 91, 91,219, 87,238, 88, 51, 51, 51,153, 94,189,122,214, 56,111,167,
+ 74,165,106,216,194,215,255,171, 93, 59,119, 52,201,203,202,214,108, 93,189, 57,216, 32,147,107, 61,155, 52, 18,125,191,116,149,
+229,156,153, 83,191, 84,169, 84,247,146,146,146, 76, 54,195,206,206,206,117,220,221,221, 15,206,158, 61,187, 89,199,142, 29, 69,
+ 14, 14, 14, 72, 77, 77,197,163, 71,143,154, 93,187,118,237,131,195,135, 15, 79,115,118,118, 30,144,156,156, 92,237,205, 4,165,
+180,193,145,149, 75, 29,164, 54,182,224, 12, 6,216,248,248,150, 37,127, 77,190,120, 6, 70,189, 30,156,193, 0,183,247, 62, 64,
+ 73,228, 13,239,190,251,110,173, 82,146,187,186,186,170, 26, 54,108,248,231,172, 89,179,196, 58,157, 14, 33, 33, 33,184,113,227,
+ 6,151,150,150,182,172, 58,115, 69, 8, 57, 51,111,222, 60,215,142, 29, 59,154,103,100,100,192,104, 52,218, 29, 62,124,120,188,
+175,175,175,133,155,155,155,100,251,246,237, 40, 40, 40, 0,203,178, 54, 94, 94, 94, 54, 67,134, 12,209,109,223,190,125, 26,128,
+229,149, 69,174,242,158,208, 57, 41,196,171,103, 35,191,225, 72, 33,167,122, 78,237,229,124,210,162, 30, 41,139,100,245,170, 87,
+207,220,171,177, 98,166,210,162,185, 77, 94,226,185,153,189,234,213,219,122,242,201, 19, 83,150, 98, 98, 92, 92, 92,214,246,238,
+221,123,232,198,141, 27,229,145,145,145,242, 38, 77,154,128,227,184,178, 76,254,165, 43, 23,116,234, 84,189, 31, 16, 48, 2,215,
+107, 7,195, 29,204,204,204,202,214, 8, 45,253, 91, 88, 88,136, 30,195,219,254, 29,215,219,154,238,227, 5,215,175, 95, 31,116,
+242,228,201, 97,139, 22, 45,106, 0, 96, 34,199,113,115, 35, 35, 35, 59, 3, 64,147, 38, 77, 36, 0, 46,170, 84,170, 81,227,198,
+141, 27, 55,113,226, 68,124,250,233,167,115, 9, 33,139,107, 19,213, 35,132, 8,154, 54,109,218,187, 71,143, 30, 2,131,193, 0,
+ 51, 51, 51,232,245,250,122,175,179,241,222,222,222,226,162,162,162, 3, 11, 23, 46,236,211,175, 95, 63, 8,133, 66,112, 28,231,
+116,249,242,229,165,211,166, 77,107,239,231,231,215,191, 50,147,229,231,231,215, 18,192,194,250,245,235,247, 24, 62,124,184,160,
+ 67,135, 14, 40, 40, 40,192,153, 51,103,190, 61,120,240,224,183,126,126,126,215, 1,204, 13, 14, 14, 14,122,219, 27,109,129,210,
+ 28,143, 6,116,129, 87,100, 38, 0, 32,101,195, 74, 0,128,197,119, 63,240,142,230,127,193, 96, 85, 71, 81, 81,145,239, 55,147,
+ 62, 5,195, 20,183,135,245, 61,235, 96,233,236,209,228,200,177,211,190,213,132, 55, 87, 25,141,198, 6, 54, 54, 54,211, 53, 26,
+141,108,205,154, 53,178,164,164,164,198,251,247,239,167,247,239,223,135, 88, 44,134,165,165, 37,186,118,237, 42,237,217,179,103,
+189,235,215,175,215, 57,120,240, 96,191,247,222,123,239,143,227,199,143, 31,173,202, 92,217,217,219, 95,250, 97,209, 23, 54,205,
+ 60,189,160, 55, 24, 16,159,150, 8, 74, 36,112,118, 80,224,147,254, 45,197, 29,253, 37, 94, 63,252,124, 46,200,177, 89,191,119,
+ 82, 31, 28, 9,175,110, 27, 59,213, 87,220,238,239, 87,207,175,111, 96,123,166, 65, 35,111,136,101,242,178,247,154,183,244, 69,
+243,150,190,100,244,200,124,207,251,247,239,207, 57,117,233,214,236, 78,245, 21,193, 87,162, 11,171, 90, 24,243, 5,243, 48,109,
+218, 52,216,218,218,190,108, 50,112,225,194,249, 74,191, 99,202,117,177,252,147,165, 75,151, 90,165,165,165,125,252,235,175,191,
+126,224,228,228, 52, 33, 37, 37,229,148, 41, 34,159, 18,226, 14,169,180,235,200, 31,127,228, 90,190,255,190,192,202,201,137,225,
+140, 70,146,240,228,137,221,143,107,214, 4,230,199,199,203,213,230,230, 5,233,185,185,186,168,168, 40,152,153,153, 17,129, 64,
+208,161, 2,115,145, 74, 8, 89,193, 48,100, 38, 33,132,200,100,102,217,159,125,246,217,245,146,247,154, 28, 61,122,212,188,111,
+223,190,249,132,144, 72, 0,144,201,204, 58, 11, 4,140, 53, 45,238,232, 89, 97,138,177,148,203,229,147,166,125, 61, 75,145,151,
+149,163,214, 23, 22, 26,236, 45,148,132, 40,205, 5,121,185,249,249,137,201,233,218,113, 95, 78, 17,204,153, 53,117, 18, 76,204,
+ 68,236,236,236, 92,167,113,227,198,183,183,110,221,234, 96,107,107,139,156,156, 28,100,102,102,226,246,237,219,224, 56, 14,189,
+122,245,146,250,250,248,248,254,184,106,213, 13,103,103,231,118,166,152, 44,153,173, 29,246,191,211, 18, 0, 48,232,105,102, 89,
+132,229,228,224, 62,101,159, 25, 18,155, 91,252, 89,153,172,198,203, 47,149,171,239,118, 29, 58,116, 16, 3,192,212,169, 83,243,
+ 10, 11, 11,151, 18, 66,118, 38, 37, 37, 37, 86,243,213,105,115,230,204,113,241,244,244,172,187,115,231, 78, 20, 20, 20, 0,128,
+131,167,167, 39, 26, 53,106,100, 12, 10, 10, 66,195,134, 13, 97,110,110,142,203,151, 47,227,230,205,155,240,243,243, 51, 23,139,
+197, 31, 85,102,176, 2,122, 4,204,145,246,109,210,169,145,223,112, 40, 45,156,177,117,215, 30, 60, 10,222,214, 73,171,143,156,
+179,116,162,203, 39,106, 42, 29,225,218,192,124,150,187,127,103,219,250, 77,223, 71, 93,191, 16, 59,141,241,202,179,185, 19,188,
+150, 9,101,154,109,243,126, 72,202,172,204, 92, 57, 57, 57,173,236,213,171,215,160,141, 27, 55, 90, 1, 64, 88, 88, 24, 82, 83,
+ 83, 97,111,111, 15,153, 76, 6,145, 72, 84,182,126,168,169,152,153,153, 33, 57, 57,185,108,153, 41,163,209,136,252,252,124, 56,
+ 57, 57, 21,187,155, 5,132,153, 55,207,180,174, 44,103,103,231,142,190,190,190, 59, 92, 93, 93,221,202,191,222,163, 71, 15,140,
+ 30, 61, 26,148, 82,116,232,208,161,235,232,209,163, 41,165, 20, 28,199, 33, 53, 53,181, 32, 44, 44,172, 91, 98, 98,226,173, 74,
+182, 91,157,146,146,130,113,227,198, 33, 46, 46,110,130, 74,165,138,101, 24, 70, 86,186, 28, 24, 33, 68,162, 82,169, 26, 54,108,
+216,112,237,232,209,163, 17, 19, 19,131,168,168,168,219,181,237, 50,165,148, 26,219,182,109, 27,109, 48, 24,252, 89,150,133, 90,
+173, 70,207,158, 61,101,141, 27, 55, 78, 21,137, 68, 15,115,114,114,134,149, 44,169,101,138, 89, 19, 58, 59, 59, 59,137, 68,162,
+141, 95,124,241, 69,239,246,237,219,227,225,195,135, 56,121,242, 36,250,245,235,135,128,128, 0,204,153, 51,231,189, 57,115,230,
+ 76, 3, 80,217,205,192,254, 3, 7, 14,120,184,186,186,150, 45,137,100, 97, 97,129,207, 62,251, 12,159,126,250, 41, 78,156, 56,
+209,126,201,146, 37, 7, 2, 2, 2, 28,130,130,130,216,183,185,209,150,250,183,135, 87,100, 38,158, 54, 41,110, 63, 74,141, 86,
+233,115,184,248,130,231, 31,108,176,116,186, 34,189, 80,200, 60, 84, 57,251,236,189,124,233,203,178, 46, 66,128,121,168,211, 21,
+233,139,195,230, 20,121, 69, 44,204,164, 12, 98, 82,242, 17,254, 52,163,162,147,244,220, 75,198,236,171,117,235,214, 97,197,138,
+ 21,189,212,106,117,193,179,103,207,146, 11, 10, 10, 10, 63,249,228, 19, 34, 20, 10,113,237,218, 53, 60,127,254, 28,205,155, 55,
+135,181,181, 53, 58,118,236, 40,238,222,189,187,219,168, 81,163, 62, 1,112,180, 34, 77, 18, 16, 32,116,150,218, 31, 92,185,104,
+176, 13,152, 40, 68,197,229,160,158,107,107,216, 89,185, 33, 49,189, 0,119, 34, 78,224,241,147,227,168,231, 82, 23,163,135,214,
+183, 90,189,249,218, 49,226, 55,166, 94,249,238,194,138,166,132,202, 4,198, 86,243,119,221,135, 49,235, 9,104,110, 28,104,225,
+171,171,196,200,237,220,208,184,157, 35,228, 86,246, 76,216,195,213,173, 42,219,118, 74,105,170, 80, 40,220, 34, 16, 48, 99, 0,
+160, 85,171,214,133,203,151, 47,175,232, 98,205,181,106,213,186, 80, 32, 96, 20,197, 17, 44,193,102,150,101, 83,171, 42,231, 75,
+102,102,165, 68, 34,157, 14,128,184,186,186, 21, 28, 57,114,132,251,240,195, 15,177,114,229, 74,233,172, 89,179,126,118,119,119,
+239, 18, 19, 19, 19, 91,213, 62, 26, 64, 72, 29,151,122,245,186, 47,190,118,141,138, 12, 6,146,117,251,118, 94,126,106,170, 33,
+ 49, 63, 95,246, 71, 72,200,192, 9, 51,102,200,156,188,188,112,253,220, 57,243,148,236,236,252,156,162, 34,221,179,103,207,168,
+209,104,188, 82,201,182,127,227,232,232,216,108,219,182,109,190,159,125,246,217,245,196,196,196, 1, 37,221, 24, 7, 1,180, 37,
+132, 68,150,127,237,224,193,131,237,135, 15, 31, 30,146,154,154,250, 77, 85,229, 44, 71, 83,123, 59, 59,249,174,205,219, 67,109,
+204,205, 24,123, 87, 21, 35,178,178, 18,178, 18, 51, 49, 7,168,235,184,121, 40, 0, 52,173,164,206, 94, 94, 52,156,184,187,187,
+ 31,252,253,247,223, 29, 68, 34, 17,140, 70, 35,236,237,237,241,252,249,115,228,228,228, 32, 63, 63, 31,207, 30, 70,194,195,205,
+ 13,147, 71,127,238,188,224,135, 85, 7, 9, 33,254,229, 27,177, 10, 23,227,214,235, 95,110,112, 42, 91, 32, 28,166,148,179, 50,
+ 56,142,123,158,148,148, 4,185, 92,142, 38, 77,154, 40,239,220,185,115, 37, 49, 49, 49,177, 58, 77,153, 76,246, 81,135, 14, 29,
+204,119,237,218, 5, 63, 63, 63, 88, 90, 90, 34, 40, 40, 8, 97, 97, 97,208,235,245, 76, 65, 65, 1,204,205,205,177,108,217, 50,
+212,173, 91, 23,121,121,121,136,139,139,179, 21,137, 68,118,149,105, 6,157, 14, 90,148,251,228,226,156, 20,114,170,231,214, 93,
+123,240,197,144,193,112,162, 79,175, 88,214, 35,139,186,247,237,240, 29, 21,184,245, 81,152,251, 88, 55,104,214, 23, 98,137, 18,
+ 19,103, 44, 68,212,131,163,214, 69,249,161, 19,136, 49,222, 13,192,228,151, 53, 73,113, 5, 49, 42,149,234,243,205,155, 55,155,
+151,221,209,151,172, 73, 88,222, 88,149, 62, 42,170,211,202, 22, 76,215,235,245,208,235,245, 48, 26,141,200,200,200, 64,126,126,
+ 62,172,172, 74, 18,245,207, 3, 8, 8,161,149,172, 66, 95, 94,147, 97,152, 97,123,246,236,113,147,203,229, 47,127, 6, 37,209,
+ 65,200,229,114,112, 28, 7,189, 94, 15,150,101,161,213,106,149, 1, 1, 1,227, 1,220,170, 72, 83, 32, 16, 76, 29, 55,110, 92,
+135, 99,199,142,121, 45, 90,180, 8,122,189,126,101,122,122, 58, 70,143, 30, 13,142,227,208,177, 99,199,182,148,210, 71,147, 39,
+ 79, 6, 0,204,159, 63,223, 80, 80, 80, 48,182,182,199,146,163,163,163,119,223,190,125,189,206,159, 63,143, 78,157, 58, 65,171,
+213,226,187,239,190,179, 88,177, 98,133,197,222,189,123,237,151, 46, 93,250, 27,128, 30, 85,105,250,249,249,137, 82, 83, 83,103,
+ 14, 27, 54,108, 90, 96, 96,160,101, 92, 92, 28,204,204,204,112,228,200, 17,108,222,188,249,164, 94,175,159,115,224,192,129,197,
+ 91,182,108,233,217,175, 95, 63,108,222,188,121, 82,201,176, 8,174, 2, 77,149,155,155, 27, 66, 67, 67, 97,109,109, 13, 59, 59,
+ 59,228,230,230,226,230,205,155,184,125,251, 54, 26, 55,110, 12, 66,136,117, 73,155,198,190,206,121, 84, 67, 35,250,255,174, 89,
+ 58, 67,141, 43,119,236, 82, 74,139, 55,154,214,190,156,132, 16,161, 74,165,234,103,101,101, 53,129, 82, 42,204,206,206,222, 44,
+151,203,247, 63,121,242, 68,247,255,181,237,255, 10,131,229,226,130,188,140, 12,235, 40, 7,167,230,123, 28,156,154,150,164,170,
+102, 30, 10, 4,214, 81,142,142, 69,121, 0,160,103, 41,174, 63,204, 65,104,116, 10,194,162, 83,160,144, 86,127,215,109,107,107,
+139,246,237,219,227,200,145, 35,136,143,143, 87, 46, 91,182,172,129, 94,175,215,247,237,219, 55,201,221,221, 61,187, 99,199,142,
+ 16,137, 68,184,115,231, 14,242,242,242,192, 48, 12,164, 82, 41, 56,142,171,244, 86,212, 33,219,122,248,240,209,205, 61,237,172,
+ 24, 28,189,122, 10,109, 27,247,135, 92, 42, 66,122,142, 26, 4, 4, 79,159,159, 3,199, 42,113, 63, 50, 6,237,125,228,120,167,
+181,149,107,193,249,172,209, 0,126, 54,165,130,244,207,130, 32,241, 30, 0,112, 77, 65,179,159,128,203, 75, 4,149, 59,160,144,
+ 51, 67, 70, 82, 44, 30, 94,217, 7,170,175,126,168, 24,203,178, 99, 29, 28, 28,152, 57,115,230,244,245,244,244,228, 38, 78,156,
+120,237,249,243,231,131,202,127,198,195,195, 99,223,250,245,235, 59, 60,123,246,172,104,209,162, 69, 71,211,210,210,198,213,240,
+196,156, 73, 8, 89, 13, 0,241,241,241,153,135, 15, 31,238,116,249,242,229,165,171, 87,175,118,157, 56,113,162,116,226,196,137,
+ 51, 1,140,171,170, 91, 80, 33,149, 6, 46,190,124,153,178, 9, 9,218, 67,155, 55, 11,214,220,184, 49, 75,207,113,117,236, 29,
+ 28,132, 1,157, 58,105,236,172,172, 10, 83, 83, 82, 56, 43,149,138, 60,127,242, 68,201,137, 68,250, 83,167, 78,229,103,101,101,
+ 85,186,196,141, 80, 40,212, 86,212, 45, 88,201, 49,194, 85, 52, 70,171, 10,242, 56, 74,245, 86,158,158,180,123,215,118,245,163,
+ 31, 61,125, 42,179,178, 18, 52,168,239,209, 40,252,225,243,219,212,200,106, 0,228,153,216,197, 54,120,222,188,121,205, 45, 44,
+ 44,192,113, 28, 44, 45, 45,145,158,158, 14,157, 78,135,188,188, 60,232,242,115,161,203,205, 69, 88,236,115,116, 8, 8, 64,247,
+118,109,155, 28, 55, 24, 6, 3,216, 93,149,174,141,143,111, 89,228,106,159,215,127,162,150, 31,199,228,148,153,173, 19,173,235,
+ 65,162, 84,160,249,148,111,106,125, 50, 39, 39, 39,135,212,173, 91,247, 68,175, 94,189,122,143, 25, 51,134, 73, 73, 73, 57,229,
+232,232,216, 33, 53, 53, 53,162,170,239, 41,149,202,122,165,134,194,210,210, 18,107,214,172,129,163,163, 35,138,138,138,112,231,
+206, 29,234,234,234, 74, 46, 94,188, 8, 87, 87, 87,100,100,100, 64,175,215,163,176,176, 48, 69,167,211, 85,122,224,151,116, 3,
+246,154,218,203,249,228,163,224,109,157, 92,200,179, 59, 31, 77,235, 28,253, 40,236, 97,220,153,179,215,190,103, 53,178,248,156,
+132,115, 51, 61, 91,133,216, 77,152,190, 0,235, 87,206,195,163, 91,151,179, 28,235,228,253,108, 70,180,127,180,233, 86,101, 4,
+ 93,243,240,225, 67,243,251,247,239,131, 16, 2, 75, 75, 75,200,229,242, 10, 77,150,169, 24,141,198,178,191, 25, 25, 25, 72, 79,
+ 79,199,147,216, 40, 28,184,176, 13, 6,214, 96,247,123, 27,139, 20, 47,177, 56,212, 46,151,204,206,120, 64, 67,170, 57, 15, 55,
+127,252,241,199,131, 93, 92, 92,204,203,191,222,162, 69, 11, 12, 27, 54, 12,219,183,111,199,221,187,119,203,186, 49, 41,165, 72,
+ 79, 79, 79, 54, 26,141,127, 84,166, 25, 23, 23,151,227,234,234,218,243,243,207, 63, 15, 62,116,232,144,197, 15, 63,252, 0,163,
+209, 8,150,101,203,186, 69, 75,255,238,220,185, 19,193,193,193,115, 83, 82, 82, 30,214,230, 56,114,114,114,106,220,183,111,223,
+203, 63,255,252,179, 85, 90, 90, 26, 50, 50, 50, 80, 80, 80,128,194,194, 66, 24,141, 70,120,120,120, 16,150,101, 27, 85,215, 29,
+200, 48,204,145, 11, 23, 46,244,108,208,160, 1, 0,192, 96, 48,224,250,245,235, 24, 61,122,116,166, 92, 46,255, 40, 38, 38,166,
+ 80,165, 82,125,123,252,248,241,158, 45, 91,182,132,143,143,143, 83, 90, 90,154, 57,128,220, 74,110, 32, 96, 52, 26,145,158,158,
+142,244,244,116,252,250,235,127,214,113,214,106,181, 37,193, 1, 29,105,213,170,149,199,157, 59,119,158,191,173,141,118,204,159,
+ 91, 17, 51,251, 75,184, 95,121, 4, 0, 8,246, 46, 30,114, 85,247, 82,100,241,240,131,225,195,107,164,167, 82,169,108, 41,165,
+ 95, 4, 6, 6, 78,233,217,179,167,189, 74,165,130,141,141, 13,194,194,194, 58,156, 62,125,250, 39, 87, 87,215, 77, 70,163,113,
+147, 41,209,122, 30,147,186, 8, 7, 26,237,236,246,103, 36, 38, 74,244, 18,137, 60,170, 52,170, 85,108,174, 6, 26,129, 93, 96,
+245,134,146, 11, 4, 45,121,152,214,173,161, 73,254, 16,156,250, 47, 56,200,251, 97,203,150, 67, 72, 75, 75, 19,175, 89,179,198,
+253,208,161, 67,174,195,134, 13,139,171, 95,191,126,110, 64, 64, 0,182,109,219, 6, 39, 39, 39,104,181, 90,112, 85,136,155,219,
+ 24, 7,182,109, 94, 95,240, 56,246, 1,252, 27, 14,132,135,170, 35,158, 38,230, 34, 43, 95,139,204, 92, 53, 26, 53,156,142,212,
+204, 34,228, 22,106, 16,246,104, 39, 92,156, 60, 25,129,232, 73, 79, 83, 13,150,230,254, 14,104,195,246, 64,236,213, 5,146,166,
+131, 33,114,109,135,248,176, 32,220, 59,241, 35, 18,194,175,130,114, 70, 56,186, 55, 49,105,219, 69, 34,209,194,227,199,143,119,
+ 95,178,100,137,168,107,215,174, 29, 84, 42, 85,251,164,164,164,235, 37, 7,121,251,222,189,123,119,112,112,112,192,218,181,107,
+117, 34,145,104, 97, 45,239,126,202,119,171, 93,116,114,114,154,120,240,224,193,191,198,140, 25, 3,103,103,231, 54, 85,125, 55,
+ 93, 36,106, 49, 98,201, 18, 42, 18, 8,232,241,223,126, 35,179, 79,156, 88,183,253,207, 63, 37, 29, 58,116, 0, 1, 16, 26, 22,
+ 38, 91,182,102,141,217,224,126,253,210,162,158, 63,199,153, 11, 23,180,105, 41, 41, 25,233,133,133, 51,222,212,236,162,154,194,
+178,236,141,184,248, 56, 23,255, 54, 45,237, 67, 34,159,133,247,120,183,125,123,134, 97,152, 71, 79, 99,175,219,219, 91,200,175,
+ 92,185,172,103, 89,246,134,137,251,167, 79,199,142, 29,133,217,217,217, 80,169, 84, 72, 79, 79, 71, 98, 98, 34, 12, 6, 3, 52,
+185,217,208,231,230,194,144,151, 3, 99, 97, 1,158,221,185, 13,111, 55, 23,233,153,226, 65,240,187,171,187,227,172, 40, 66, 85,
+ 62,146, 37, 53, 87, 66,170, 84,190,176, 56,181,137, 23,199,126, 22, 22, 22, 51,243,243,243, 79, 36, 38, 38, 46,210,233,116, 19,
+151, 44, 89,210,106,225,194,133,118,179,102,205,178,152, 49, 99,198, 62,119,119,247,150, 49, 49, 49,149,154,214,130,130,130, 39,
+ 44,203,218, 1,112, 56,127,254, 60, 28, 28, 28,144,155,155, 91,188,221, 26,141,174,168,168, 72,150,153,153, 9,173, 86, 11,157,
+ 78, 7, 11, 11, 11,220,189,123, 55,155,101,217,191,170, 43,159, 69, 61,178, 72,171,143,156, 99,219, 68,145,164,103,173, 59,167,
+101,113,217,243,126, 72, 90, 8,224,199, 94,245,234,109,213,115,151,159, 61,126,112,212,250,249,157,160,172,164,199,133, 94, 91,
+143, 63,205,175,162, 30, 41, 33,132, 35,132,208,134, 13, 27, 34, 61, 61, 29, 2,129, 0,114,185, 28, 74,165, 18,141, 27, 55, 70,
+124,124,124,173, 13, 22,203,178,101,230,234,236,141, 99,200, 44, 72,198,214,149,187,224,226,228,198, 0,176, 79, 76,137,239, 54,
+106,218,160, 54,158, 29,173,151, 62,187,154, 93,233,184,182,164,164,164,123, 0, 44, 94,188,105,117,233, 98, 99, 99,115, 65,167,
+211, 33, 38, 38, 6,103,206,156, 9, 72, 72, 72,184, 84,147,125,157,144,144,240,212,197,197,165,231, 7, 31,124,176,173,121,243,
+230,245, 40,165,104,220,184, 49,250,245,235,135, 3, 7, 14, 32, 34, 34, 2,121,121,121,220,149, 43, 87,126, 79, 78, 78,174,209,
+128, 28, 66, 8,161,148, 82,103,103,231, 70,125,250,244,185,186,126,253,122,235,140,140, 12,168,213,106, 20, 22, 22, 98,255,254,
+253,232,212,169, 19,108,108,108,112,248,240, 97,182,180, 71,161, 50,115, 69, 41, 61,114,232,208,161,158, 94, 94, 94,120,248,240,
+ 33,206,158, 61, 11, 79, 79, 79,136, 68, 34,244,233,211,199,118,207,158, 61, 19,189,189,189, 87,137, 68,162,239,123,247,238, 13,
+163,209,136,187,119,239, 38,199,198,198,230, 87,103,130, 43, 66,173, 86,131, 82, 10,131,193,176,134, 97,152,143,252,252,252,186,
+ 7, 7, 7,223,126, 91, 26,106, 87, 87,215,166, 34,145,104,178,181,181, 53, 50, 51, 50,144,203, 1, 89, 89, 89,160,148, 34,151,
+ 43, 14, 92, 41, 50,255,211,171,222,160, 65,131,227,106,181,122,118, 66, 66, 66,165,107,121,185,184,184,248,200,229,242, 41,125,
+251,246, 29,246,222,123,239, 9, 12, 6, 3,142, 30, 61,138,245,235,215,163,103,207,158,168, 95,191, 62,102,204,152, 97,169,209,
+104,102,157, 58,117,106,102,147, 38, 77, 78,229,231,231,127, 83,149, 38,143, 73, 6,171,216,100,185,184, 32,187,228,142,198,206,
+198,198,102,189,209,104,236, 2,124, 7,115,161, 37, 30,134,220, 65, 86,166, 0, 90,181, 17, 28, 45, 54, 89, 38,117, 99,168,255,
+130, 69, 67,138,188, 40, 2,131,193, 0, 71, 71, 71, 44, 91,182, 12,185,185,185,194, 81,163, 70,121, 44, 88,176,224,158, 78,167,
+ 67, 97, 97, 33,212,106, 53,212,106, 53,140, 70, 99,165, 6, 75, 44,213, 54,175,227,216, 0,249,234,214,144, 75, 37,200,202,211,
+ 22,155,171, 28, 13, 14,252,245, 49,180, 69,106, 24,245,122,176, 58, 3,148,142,253, 81,207,187, 11,128,232,102, 38,154,149,226,
+191, 28, 11, 93,244, 89,232,162,207, 66,209,101, 14,142, 44, 25,246,210,137,111,218,228,196,196,196,196, 68, 23, 23,151,237, 33,
+ 33, 33,159,125,244,209, 71,184,120,241,226,183, 40,153, 89, 37,147,201,190,253,232,163,143, 16, 18, 18,130,200,200,200,237,149,
+117,237,212, 20,137, 68, 82,168,211,233, 74,187,130,228,213,124,214,165,213,128, 1, 76,110, 72, 72,222,146, 11, 23,230,253,241,
+199, 31,146,119, 58,117,130,193, 80,108,166, 61, 60, 60,208,189, 71, 15,233,142,189,123,149,234,156,156, 59,179, 39, 78,252,107,
+195,240,225,121,183, 11, 10, 30,152, 88,159, 77, 74,186, 6, 65, 41,109, 82,217,107, 53,161,176,176,112,221,236, 89,211, 2,247,
+ 31, 56,226, 86,199,205,197,226,244,217, 75,247,165,102, 18,198,203,163,158, 32, 63, 63, 71,184,126,205,143,102, 5, 5, 5, 63,
+153, 40,215,196,206,206, 14, 41, 41, 41,136,142,142,134, 86,171, 45,222,246,162, 66,232,178,115,160,203,205, 2,209,168, 33, 53,
+ 26,161,201, 72,133,187,151, 39,240,159, 25,134,213, 53, 96, 21, 26,172,210,191,102, 22, 22, 16, 43, 20, 16,136, 68, 38,143,193,
+114,118,118,246,243,245,245,221,187,101,203, 22,241,212,169, 83,219,184,187,187,175, 79, 73, 73,137,117,117,117,237,186,114,229,
+202,219,139, 23, 47,150, 14, 27, 54,172,209,230,205,155,135, 3,216, 92,233, 77,132, 70,179,247,248,241,227, 67,235,214,173,235,
+ 16, 22, 22, 6,141, 70, 83, 58,222, 12, 0,100,165,159,123,244,232,145, 90,163,209,164, 61,120,240, 32, 47, 54, 54, 86, 7, 19,
+102,253,205, 91,155,116, 99,234, 32,215, 1,142, 78, 46, 55,101,102,238, 30,180, 32,164,255,212, 65,174, 43, 87,237, 75,208,156,
+124,242, 36,127,238, 4,175,101,133,249,161, 19,172, 92, 11,126, 62,121,244,105,190, 41,135, 81,201,140, 65,216,218,218, 66, 40,
+ 20, 66, 36, 18,161,116, 44,146,163,163, 35,114,115,115,171,236, 34,172,172,241,206,203,203, 67,110,110, 46, 30, 63,127,136,204,
+130,100,156,217,117, 3, 70,163, 17, 26,141,166,216,204, 58,186,226,220,238,219,230, 1, 3, 91,205,182,245, 33, 23, 51, 67,233,
+ 29, 83,143, 83,134, 97,166, 12, 24, 48, 0,122,189, 30,253,250,245,195,174, 93,187,166, 0,184, 84,211,227, 61, 49, 49,241, 38,
+ 33,164, 65,116,116,180,133,193, 96,120,191,111,223,190,127,244,238,221, 27, 55,110,220,192,249,243,231, 3,116, 58, 93,148,209,
+104, 84, 59, 59, 59, 47,117,118,118,118, 32,132, 44,173,106,130, 71, 73, 42,134, 13, 77,155, 54,125,191, 75,151, 46,247,123,247,
+238,221,108,253,250,245, 86,105,105,105,165,147, 26,144,144,144,128, 19, 39, 78, 36, 31, 61,122, 52,143,227, 56, 91,134, 97,142,
+103,100,100,124, 83, 89,183,160, 94,175, 63,116,244,232,209,158, 94, 94, 94,184,116,233, 18,150, 44, 89,130,230,205,155,227,248,
+241,227,112,119,119, 71,227,198,141, 97, 99, 99, 51, 57, 47, 47,175,221,138, 21, 43,122,251,250,250,226,208,161, 67, 72, 77, 77,
+253,169,170,148, 13, 44,203, 86,107,176,222,125,247,221,209, 83,167, 78, 69,223,190,125,207,248,251,251,183,190,123,247,238,255,
+124,154, 22,149, 74,181, 44, 48, 48,112,102,139, 22, 45,240,231,159,127, 66,227,215, 1,138,223,143,226, 65,159, 14,160, 0, 84,
+191, 31, 1,165, 20,225,253,222, 1, 5,224,209,117, 32,102,206,156,217,187,127,255,254,117, 80,201,240, 8,149, 74,245,195, 39,
+159,124, 50,237,211, 79, 63, 69,112,112, 48, 54,111,222,140,123,247,238,149,181,121, 6,131, 1,145,145,145,136,140,140,132,179,
+179, 51,250,244,233, 67,198,140, 25,211,171, 87,175, 94,246, 0,252,193,243,186, 6,171, 44, 92,108,103,109,109, 29,254,243,207,
+ 63,219,182,110,221, 90,192,178, 44, 46, 6, 5, 97,254,119,211,208,171,199,103,208,115,150, 96,117, 98,112, 98,153,105,191, 40,
+237,131,188, 40, 2, 78,220, 27, 58,157, 14, 95,236, 20,193,138,164, 97,205, 8, 71, 0, 32, 26,141,166,204, 88,149,222, 61, 85,
+ 21,193,202,207, 85,232, 13, 6,138,164,180, 88, 36, 36,135,195, 66,233, 6, 42,112, 67, 90, 86, 17, 8, 28,193,106,163, 96, 52,
+ 20, 27, 32,173, 58, 1, 69, 58,242, 90, 21,102,204,122,117, 54,176,145, 53,125, 76, 37,165,116,237,142, 29, 59,134,174, 90,181,
+ 74,250,222,123,239,249, 56, 59, 59,119, 7,128, 65,131, 6,249, 88, 88, 88, 96,199,142, 29, 90, 74,233,218, 55, 24,225,249,192,
+223,223, 31, 89, 89, 89,136,137,137,185, 94,229,182,233,116,182, 74, 7, 7, 65,218,197,139,134,172,252,252, 58,157, 74,204, 21,
+195, 48,200,206,206,198,243,231,207,161, 84, 40,240, 32, 34, 66,250,227,184,113, 59, 26,251,248, 48,165, 51, 12, 77,225,232,209,
+163,230, 0,218, 86,247, 90, 77, 72, 79, 79, 47,116,114,114, 26,249,237,236,217,135,126,250,233, 39,203,212,180,212, 40,169, 68,
+194, 42,149, 50,213,228,201,227,133,121,121,121, 67, 51, 50, 50, 10, 76,213,203,206,206,198,179,103,207, 96,102,102, 6,177, 72,
+ 4, 78, 93, 4, 99, 97, 1, 52, 89,233, 16,232,117,144, 24,141,176,145, 75,225,230,232,136, 58,246,118,166,117,221, 93, 60, 83,
+ 54,160,189,124,183,224,169,246,141, 32, 85, 42, 32, 85, 42,209,225,112,241, 16, 54,177, 88, 12,172,217, 98, 74, 55,142,157, 74,
+165,250,107,253,250,245,226,204,204, 76,132,135,135,223,143,137,137,201,181,177,177, 49, 23,137, 68,220,227,199,143,207, 61,124,
+248,176,143,167,167, 39, 40,165,213,205,254,250,241,224,193,131,221, 58,118,236,200,122,120,120, 40,210,210,210,234,228,230,230,
+146,228,228, 23,199, 48,223,185,115, 71, 22, 23, 23, 87,200,113,220, 33, 20,231,193,170,246,192,159, 58,200, 85,118, 61, 4,147,
+ 58,247,112,111,110, 97,231,131, 44, 54,164,249,205,251,201,147,166, 14,114, 93,183,106, 95,130,198,140,104,255, 32,198,120, 55,
+161, 76,179,205,196,243,135,122,123,123,131, 82,138,219,183,111,227,234,213,171,184,124,249, 50, 98, 99, 99,203, 62, 99,105,105,
+137,179,103,207,162, 75,151, 46, 38, 31, 71, 69, 69, 69,112,118,118,134,181,181, 53, 14, 94,220,142,173, 43,119,149, 13,116, 47,
+ 37, 35, 35, 3,114,185, 28,139,191, 94,165, 28, 53, 99,224,247, 0,186,155,162,237,230,230,230,217,161, 67,135,247, 28, 29, 29,
+145,157,157, 13, 7, 7, 7,180,106,213,170,175,163,163,163, 71,106,106,106,173,186,178,116, 58,221,248, 46, 93,186, 44,250,250,
+235,175,193,178, 44, 62,254,248, 99, 60,123,246,108,239,211,167, 79,215,212,173, 91,119,210,132, 9, 19, 28,237,236,236, 48,126,
+252,120, 5,128, 1, 85, 24,172,165, 43, 86,172, 24, 26, 24, 24,200, 24, 12,134,119,206,159, 63,143,152,152, 24,232,116, 58,176,
+ 44,139,152,152, 24,204,155, 55, 47, 57, 47, 47,175,115, 66, 66,194,147,234,202,149,146,146, 50,237,240,225,195,189, 27, 54,108,
+136,211,167, 79, 99,236,216,177,199, 45, 44, 44,154,250,248,248,212,169, 83,167, 14,254,250,235, 47,152,153,153,193,217,217,217,
+113,214,172, 89,125,122,244,232,129,115,231,206, 97,225,194,133,199,156,156,156,126,172,206, 4, 11,133, 66, 24, 12, 47,222,208,
+ 10, 4, 2,220,187,119, 15,239,190,251, 46,102,206,156, 9, 0, 56,119,238,156, 69,247,238,221, 31, 4, 4, 4, 88, 4, 5, 5,
+105,241, 63,140, 66,161, 24,249,251,239,191, 35, 58, 58, 26, 87,174, 92, 65, 70, 70, 6,116, 58, 29,114, 74,172,168,180, 36,146,
+ 69, 93,234,162,253,180,217, 24,210,103, 0,146,147,147,193, 48,140, 93, 21, 55,124,195,102,207,158,141,147, 39, 79, 98,249,242,
+229,200,205,205,173,240,115,102,102,102,104,213,170, 21, 90,182,108,137,103,207,158, 1,128, 29,120,222,156,193,178,182,182, 94,
+179, 97,195, 6,219, 14, 29, 58, 8, 74,204, 14, 90,183,106,133,225, 35, 71,226,236,193, 99,112,104,216, 19, 68,167, 4, 43,151,
+152, 22,193,178,216,134, 76, 67, 38,100, 98, 25,164, 58, 29, 56,206, 12,161, 9,154, 50,215,172, 86,171, 81,106,178, 10, 11, 11,
+161, 80, 40,170, 54, 16, 58, 73,112,228, 51,214, 45, 55,255, 30,110,134,108,135, 65,103, 64,189,134,179,161, 54,216, 66, 97,255,
+ 25, 52,186,191, 96,204, 41,158,185, 43,177, 8, 64, 74, 74, 6, 0, 98,106,196,229,213,147, 60,255,213,193,238,156,209,244,188,
+171, 73, 73, 73,153, 42,149,106,243,245,235,215, 39, 15, 24, 48, 0,103,207,158,157, 13, 0, 3, 6, 12,192,245,235,215,241,236,
+217,179,205, 73, 73, 21,207,160,170, 41, 46, 46, 46,195, 59,119,238, 60,161,117,235,214, 56,118,236, 24,140, 70,227, 9, 83,190,
+ 39, 16,137, 40, 33, 4,165, 51,156,178,178,179,241,232,209, 35,100,101,102,194,104, 52,162, 72,173,102,155, 54,106,148, 71, 57,
+206,188, 38,229, 41, 63, 99,176,162, 89,132,165,175,213,116, 59, 83, 82, 82, 98,235,213,171, 23, 87, 84, 84,104,111,109,101,157,
+ 47,145, 72,140,121,249,249,185,209, 81, 15,117,166, 52, 10,229,136,140,136,136,104,150,144,144,128,184,184, 56,176,133,249, 16,
+104,117, 96,180, 69,232,218,190, 29,204, 64, 33, 3, 7, 17,103,128, 72, 32, 66,126,241,108,187,200,106,143,249,114, 13, 66,169,
+185, 34,132, 64,166, 84, 66,162, 84, 64,106,174,124, 33,162,101,202,196, 47, 51, 51,179,157,155, 55,111,118,118,114,114,194,170,
+ 85,171,224,236,236,220, 56, 48, 48,176,168,115,231,206,102,118,118,118,104,216,176, 33,252,253,253,113,241,226, 69, 16, 66,158,
+ 84,115,156,179,132,144,238, 87,174, 92,153,118,237,218,181, 65, 42,149,138,124,250,233,167,232,217,179, 39,100, 50, 25,138,138,
+138,144,157,157,141,227,199,143, 19,163,209,232, 91, 98,240,234,186,187,187,239, 34,132, 36, 60,127,254,252,163,151, 53,183,175,
+246, 81,165,101,113,159, 57, 58,185,244,239,220,195,189,249,187, 61, 2,225,217,224, 93,188,219, 35, 14, 0,150,217, 8, 99, 62,
+ 94, 57,167,217, 33, 59, 55,155,223,206,156, 58, 59,175, 99,231,119,191,157, 53,198,122,209,178,205,217,213,142,151, 35,132,148,
+ 53,182, 12,195, 84, 24,165, 18, 10,133,101,179,205,170,189,105,226,140, 9, 61, 71,180, 43,123,110, 96, 13,118, 46, 78,110, 76,
+105,228, 10, 0,114,115,115, 17, 31, 31, 15,131,193, 0, 91, 91, 91, 24, 12,122,159, 26,116, 63, 78, 26, 60,120, 48,209,104, 52,
+152, 54,109, 26,126,248,225, 7,244,235,215,143,220,186,117,107, 18,128, 41,181,136,104,172,156, 48, 97,194,180,145, 35, 71, 34,
+ 39, 39, 7, 23, 46, 92, 64,151, 46, 93,176,113,227, 70,251, 11, 23, 46, 44,105,223,190, 61, 4, 2, 1,206,158, 61, 11,189, 94,
+255,168,202, 6, 64, 40,124, 63, 48, 48,144,137,143,143,135, 88, 44,134,191,191, 63, 18, 18, 18, 80, 84, 84,132,180,180, 52, 44,
+ 88,176, 32, 37, 55, 55, 55, 32, 49, 49,241,137, 9,251,133,233,208,161,195,228,250,245,235,227,194,133, 11, 24, 55,110,220, 73,
+133, 66, 49, 32, 51, 51,115,140, 70,163, 89, 55,120,240, 96, 52,110,220, 24, 81, 81, 81,120,239,189,247,208,170, 85, 43, 92,184,
+112, 1, 51,102,204, 56, 46,151,203, 63,172, 38, 15,214,227,160,160,160,102,254,254,254, 40, 42, 42, 66, 94, 94, 30, 68, 34, 17,
+172,172,172, 16, 25, 25,137, 6, 13, 26, 96,230,204,153, 88,181,106, 21,166, 78,157,202,117,239,222,157,213,235,245, 98,137, 68,
+242, 63,223, 72, 23, 22, 22,210,228,228,100, 88, 88, 88, 96,223,190,125, 8, 59,119, 26, 39,190,252, 12,178, 57, 43, 65, 41, 69,
+252,162, 89,232, 58, 99, 14,218,222,127,138,228,228,100,108,219,182, 13, 12,195,148,205,136,173,172,109,203,205,205, 69,203,150,
+ 45,113,251,246,109,108,219,182, 13,171, 87,175, 46,139,214,138, 68, 34, 4, 4, 4,160, 91,183,110,120,252,248, 49, 54,111,222,
+ 12, 11, 11, 11,222, 49,189,105,131,197,113,220,187,173, 90,181, 18, 20, 20, 20, 64,163,209, 32, 37, 37, 5, 49, 49, 49, 48,147,
+155, 33, 62, 35, 17, 45,124,245, 72,225,242, 16,121, 63,220, 72, 4,162,123,213,221,129,232,116, 58,232,116, 58,132,134,134, 22,
+ 79,125,111,176,180,108,160,167,193, 96,128, 86,171,133, 90,173,198,133, 11, 23,168, 84, 42,133, 66,161, 32, 85,245,189,115,172,
+246,228,133,171,247,123, 15,235,223, 69,114, 54,104, 43, 12, 58, 14,121, 26, 11, 20,168,181, 40,208,136,160,149,246, 0, 33, 87,
+192, 8,164,104,223,178, 62, 46, 92,141,210, 24, 13,122,147,210, 21,128, 51, 66,232,236, 3, 54, 57,244, 63, 47,189, 52,155, 80,
+ 44, 87,130, 51,214,108, 86,176,153,153,217,198,157, 59,119,142,108,215,174,157,121, 96, 96, 96, 3, 0,144, 74,165,220,206,157,
+ 59,243,205,204,204, 54,214,116, 39,190,156,189,221,217,217,185,163, 68, 34,153,216,183,111,223,142, 35, 71,142, 68,120,120, 56,
+254,252,243,207,251, 42,149,170,202, 49, 51, 2,137, 36,179, 32, 45,205, 74,233,225, 33,180, 50, 55, 79, 58,125,250,180,251, 59,
+157, 59, 35, 54, 38, 6, 89, 89, 89, 80,171,213,136,136,140,164, 98,134,137, 35, 22, 22,204,163,144, 16, 70, 32,145,100,214,160,
+156,145,213,205, 34,172,109, 52, 75, 97, 70,234,205,153, 57,198, 83,163,209, 52,203,203,203, 99, 69, 34,145, 72, 46,161,177, 53,
+209, 48, 24, 12,199,174, 92,185,242, 65,135, 14, 29,164, 81,161,247,192,230,230, 66,151,155, 13, 49,103,132,141,111, 11, 8,244,
+ 90, 64,103,128, 75, 19, 10, 77,142, 28,215,238, 61, 53, 24, 12,134, 99,166, 26, 44, 70, 32,120,113,220,149,133, 18, 82,115,115,
+ 72,148,202, 23, 94, 39,213,244,107, 57, 58, 58,202,123,245,234,213,213,215,183, 56,167,214,202,149, 43,161,215,235, 37, 6,131,
+161,108, 38, 92, 65, 65, 1,246,239,223,143,237,219,183, 95,179,180,180,252,221,132,155, 9,214,213,213,117, 34,199,113, 14, 44,
+203,234,237,237,237,197,123,247,238,133, 76, 38, 3,195, 48,104,217,178, 37,100, 50,153, 86,165, 82,233, 75,202, 96, 88,181,106,
+149,240,179,207, 62, 19, 87,164,215,168,121,227,233,158,172,117,103,153,153,187,135,133,157, 15, 60, 27,188, 11, 0,232,214,103,
+ 20, 60,235,215, 65, 94, 70,168,135, 70, 29,211, 95, 44,204,182, 14, 95,151, 24, 97,246, 94,179,145,133,105, 65,143, 1,252, 98,
+210,169,201,113, 8, 12, 12, 68,143, 30, 61,202,186, 3, 29, 28, 28,160,211,233, 96, 52, 26,107, 52,150,173, 52,137,232,130, 5,
+132,193, 60,224,247, 54, 22, 41, 0,236,203,155,171,184,184, 56,196,197,197,149,221, 8,114,212,180, 20, 42, 42,149,202,204,211,
+211,115, 68,179,102,205,112,254,252,121,132,134,134, 38, 6, 5, 5,185,180,110,221, 26,174,174,174, 35, 85, 42,213,236,164,164,
+ 36,147, 19, 42,219,219,219, 43, 58,117,234,244,229,200,145, 35,241,240,225, 67,204,154, 53, 43, 51, 57, 57,249,208,209,163, 71,
+ 63,255,234,171,175,152,206,157, 59, 35, 45, 45, 13, 27, 55,110, 52,222,190,125,251, 7,107,107,235,133,213,236,247,135, 73, 73,
+ 73,174, 26,141, 6, 89, 89, 89, 96, 89, 22, 69, 69, 69, 56,117,234, 20, 78,159, 62,157,154,147,147, 19,144,148,148, 20,109, 74,
+217,234,214,173,107,238,239,239,239,248,248,241, 99,236,218,181, 11,122,189,126, 78, 76, 76,140,222,210,210,114,199,146, 37, 75,
+230, 89, 90, 90,218, 4, 6, 6,162,244,184,253,235,175,191, 48,127,254,252,227,102,102,102, 3, 34, 34, 34,244,213,200,247,255,
+254,251,239,191,183,179,179,251,104,232,208,161,140,191,191, 63,238,222,189, 11,163,209,136,174, 93,187,150,153,171, 83,167, 78,
+237, 60,117,234,212, 64, 0, 98,165, 82, 41,251, 95,143, 94,149,162,209,104, 16, 21, 21, 5, 71, 71, 71,212,111,221, 14, 51, 31,
+ 60,199,149,235, 55, 64, 41, 69,199,240,231, 40, 40, 40,196,239,191,255,142,224,224, 96, 8, 4, 2,120,121,121, 85,171,169,215,
+235, 17, 29, 29,141,244,244,116,244,235,215, 15,195,134, 13,195,138, 21, 43,160,215,235,241,237,183,223, 34, 43, 43, 11, 91,182,
+108, 65,116,116, 52,132, 66, 33,148, 74, 37,239,152,222,180,193, 42,233,102, 2,199,113, 72, 76, 76,196,221,187,119,241,252,249,
+115, 40, 20, 10,168, 89, 35,183,241,220, 85,142, 16,113, 2, 71,233, 53,202, 22,103, 17,175,202,137, 27, 12, 6, 34, 20, 10,113,
+253,250,117, 60,125,250, 20,230,245,105,153,185, 42,141, 96, 21, 21, 21, 65, 36, 18, 21,220,184,113, 35, 38, 56, 56,216, 83, 40,
+ 20,234, 42,211, 76,179,206,222,118,246,252,185,233,126, 45,189, 27,116,235, 60, 31,199,142,205, 67,118,110, 30,138,116, 34,228,
+171,245, 40, 84, 83,184, 88, 52, 64,107, 31, 31,164,103,233,240, 56, 60, 56, 33, 67,108, 83,109, 31,140,129, 50,185, 59,151,141,
+181,124,127,216, 56,152,185,191, 3,109,248, 62,112,249, 41,224,242,139,187, 77, 36, 10, 11,152,219,185,161,160, 72,131,171, 15,
+158,194, 64,153, 92, 83, 43,253,201,147, 39,249, 42,149,106,221,212,169, 83,151,223,184,113, 93, 1, 0,247,238,221, 43, 76, 74,
+ 74, 90,148,148,148,148, 95,147, 29, 88, 46,123, 59, 81, 40, 20,143,235,215,175,111,120,239,189,247,108,251,247,239, 15, 59, 59,
+ 59,132,132,132, 96,217,178,101, 33,133,133,133, 67, 98, 98, 98, 12,213,116, 59, 36, 6, 31, 62,108, 17,240,233,167, 86,179,250,
+245, 91, 54,126,252,248,159, 22, 46, 92, 40,174, 87,191, 62, 56,163, 17, 17, 17, 17,116,199,142, 29,236, 47,115,231,174,148, 40,
+ 20,194,219, 71,142,136, 88,173, 54,241,191,125, 16,187,186,186,118,238,221,179,115,147, 31, 86,173,131, 70, 93,128, 91,215,143,
+ 35, 59, 59, 29,155,183, 28,108,226,234,234,218,217,212,193,196, 9, 9, 9,123, 14, 28, 56, 48,205,199,187,137,175,151,155, 27,
+194, 98,159, 67,194, 25, 33,102, 89, 8,244, 90, 48,172, 6,110,205, 40, 8, 99,142,148,148,124,108, 60,125,225, 65, 66, 66,194,
+158,106, 35,137,189,222,199,144,216, 92, 16, 66,112,166,147, 55,100,230, 74, 72, 20, 10,180, 63,112,169,204, 84,197, 46,253, 26,
+ 34,133, 18,214,173,223,169,182,156,169,169,169, 69,245,235,215,191,251,240,225,195, 86,141, 26, 53,194,130, 5, 11, 16, 31, 31,
+ 15, 74, 41,210,210,210, 52,233,233,233,137,153,153,153, 49,132,144, 67, 73, 73, 73, 91, 77, 93,138,132,227, 56,135,163, 71,143,
+ 2,128, 24, 0,206,159, 63, 15,149, 74, 5, 75, 75, 75,228,229,229,225,211, 79, 63,149,126,247,221,119, 0,128,187,119,239,138,
+204,204,204, 42,213, 10, 11,142,252, 33, 39,159,102,211,130,144,254, 89,108, 72,243,119,123,196,163, 91,159,145, 56,123,236,119,
+ 92, 56,125, 14, 54,194,152,231, 80,228,159,204,120,158,145,151, 80,216, 96, 83, 19,191,207, 5,201,133,167, 55, 77,234,103, 45,
+112,118,230,246,205,218, 80,121,226,222,210, 59,112,129, 64, 80, 54, 6,171,116, 64,123, 77,205, 85,121,230,205,163, 28, 1, 33,
+ 94, 98,113,104, 98, 74,124, 55,149,163, 43, 82, 83, 83, 17, 31, 31,143,184,184, 56,196,199,199,163,126,253,250,120, 30,251, 20,
+ 18,137,248,158,137, 81,240,161,125,251,246, 53,215,233,116, 56,124,248, 48, 75, 8,233,115,244,232,209,187, 45, 90,180, 16,118,
+233,210,197,252,247,223,127, 31, 10, 96,107, 77,238, 37,148, 74,165, 88,175,215,227,143, 63,254, 64, 66, 66, 66,231,148,148,148,
+ 72,149, 74,181,105,236,216,177, 27,154, 52,105, 82, 63, 50, 50,242,177, 90,173, 30,159,148,148, 20, 90,157, 88, 78, 78,206,168,
+158, 61,123,238,227, 56,174,110,199,142, 29, 21,243,230,205,179,120,244,232, 17,220,221,221, 65, 41, 13,171,201, 82, 83,177,177,
+177,249, 87,175, 94, 77,109,218,180,169,163,179,179, 51,196, 98,241, 50,103,103,231, 69, 74,165,242,135, 46, 93,186,216,236,216,
+177, 3,167, 79,159,134, 72, 36,194,211,167, 79,147, 30, 62,124,184,198,201,201,105,173, 41, 25,220,131,131,131,159, 1, 24,210,
+186,117,235,249,171, 87,175,158,195, 48,204, 39,103,206,156,129, 72, 36, 2,128, 50,115,229,225,225, 49,124,223,190,125,195,222,
+178,118,218,160,211,233, 96,107,107,139,244,244,116,164,165,165,161, 78,157, 58,104,215,174, 29, 12, 6, 3,142, 28, 59,142, 43,
+ 87,174,128, 82, 10, 59, 59, 59, 88, 90, 90,226,254,253,251, 0, 80,213,236, 97,131, 94,175,135,141,141, 13,114,114,114,112,255,
+254,125, 56, 56, 56, 96,234,212,169,208,233,116,216,187,119, 47,238,221,187, 7,134, 97,224,224,224, 0,115,115,115, 83, 52,121,
+106,106,176, 4, 2,193,197,139, 23, 47, 14,244,241,241, 17, 70, 71, 71, 35, 58,186,248,102, 70,173, 86,179, 66, 1,246,167,134,
+ 30, 30, 82, 69,227, 31, 88, 62, 87,134, 68, 34,217, 56,112,224,192,241,163, 70,141,194,196,137, 19, 65, 8,193,111,247,116,136,
+139,227, 96, 48, 24,144,154,154,138,176,176, 48,218,170, 85, 43,194,113,156, 62, 32, 32,224,139,224,224,224,214, 2,129, 32,175,
+ 50, 77, 26, 20,196, 58, 54,239,255,225,207, 27,183, 94, 26, 49, 98,132, 77,223,126, 63,227, 94,100, 4,114,139,236, 1, 74,225,
+ 98,175, 68,235,134, 95, 35, 45, 83,131,211, 39,143,101,115,172,230, 67,250, 96,183,161,170,114, 2, 64,186, 80,237,176,105,251,
+129,149,187,247, 29,252, 98,244,200,161,178,128,192, 79, 33,206, 8, 3,155, 20, 12, 23,239,142,160, 66, 51,220, 14, 14, 65,104,
+116,188,166, 72, 47,216,154, 39, 86, 79,175, 78,179, 60,217,217,217, 39, 82, 82,146,127, 46,157, 28,192, 48, 68, 33,145, 72, 79,
+ 84, 99,166, 2, 95,202, 11,244,114,134,248,134, 75,151, 46, 77,179,181,181,229,194,195,195,177,113,227, 70,227,221,187,119, 15,
+112, 28, 55, 39, 35, 35,163,168, 58, 77,123,131,225,254,206, 89,179,188, 91, 15, 24, 64,251,127,241,133,134,145,201,198, 47, 91,
+181,106,118,102,110,174, 11, 0,216, 88, 89,197,111,158, 63,127, 97,175,222,189,243,195,175, 94, 53,187,126,248,176,153,132,101,
+131,171, 43,231,155,160, 42,205,132,132,132, 75, 13,234,213,193, 31, 91, 87, 65,175,215, 34, 57,177, 56,112,149,145,153,139,170,
+204,213, 43,199, 82,241, 44,170, 1,171,215,172,189, 57,238,211, 79,156,222,233, 26,136,184,251,247,160,207, 74, 7, 49,176, 16,
+ 17, 33, 10,211,228, 72, 75, 45,192,210, 19,231,210,212, 26,205,128,151, 19, 57, 86, 86,206,178,110, 65, 11,115, 72, 20,197,227,
+174,202, 71,173,196,230, 22, 16, 41,148, 16,136,197, 21, 13,134, 15,172, 32,167,220,135,163, 71,143, 14, 61,113,226,132,245,144,
+ 33, 67,240,254,251,239,135,228,228,228,116,201,202,202,202,175,109,125, 50, 12,147,214,187,119,111, 7,157, 78,199, 14, 30, 60,
+ 88,152,145,145,129,210, 41,246, 5, 5, 5, 56,121,242, 36, 26, 53, 42,158,157, 31, 30, 30,142,166, 77,155, 86,170,249,249,140,
+176, 68, 0, 11,167, 14,114, 93,121,243,126,242, 36, 0,203, 60,235,187,225,194,233,115,184,114,225,250,172,182,205,184,117,189,
+135,181,250, 94,222,229,163,233, 77,252, 62, 23, 40, 45,156,177,237,224, 1, 65,100,240, 47,139,139,138,194,234, 1,248,186,178,
+114,150,118, 95,191,156,146, 65,173, 86,155,100,174,170, 58,150, 40, 40,181,203, 37,179, 71, 77, 27,212,230,236,174, 91,230, 74,
+165, 18,122,189, 30,148, 82,212,171, 87, 15, 66,145, 16,191, 30,250,169, 48, 39, 39, 99,174, 41,154, 10,133, 98, 98, 64, 64, 0,
+158, 60,121,130,208,208,208, 3, 73, 73, 73,161, 42,149,234,192,179,103,207, 6,183,105,211, 6,123,246,236,153, 88,153,193,170,
+ 76,179, 52, 99, 61,165, 20, 70,163, 49, 11, 0,146,146,146,238,155, 18,253,125, 89,179, 36, 89,104, 7, 0,104,210,164, 73,188,
+163,163,163,197,253,251,247,225,236,236, 12,189, 94,223,166, 38,199, 18,165,148, 83,169, 84,107,111,223,190,189,180,101,203,150,
+248,248,227,143,187,221,189,123,183, 91,139, 22, 45,224,229,229,133,107,215,174,225,204,153, 51,127,114, 28, 55, 54, 57, 57, 89,
+ 83, 85, 18,212,202,182,253,246,237,219,209, 0, 62,245,243,243,251, 72, 40, 20,194,194,194, 66,144,152,152, 40, 56,115,230, 12,
+ 0,140,222,183,111,159,177, 54,251,253,239,184, 46,189, 41, 77, 66,200,183,195,135, 15,223, 52,102,204, 24, 89,155, 54,109, 94,
+136,168,158, 56,113, 2, 28,199,193,214,214, 22,182,182,182,136,142,142,198,161, 67,135,116,185,185,185,107,196, 98,241,178,170,
+ 52, 63,253,244,211, 77, 99,198,140,145,181,110,221, 26,185,185,185,101,230,237,216,177, 99, 32,132,192,206,206, 14,182,182,182,
+120,252,248, 49, 14, 29, 58,164,201,206,206, 94,165,211,233, 86,252,157,219,254,175, 51, 88, 89, 89, 89,147,191,249,230,155, 46,
+ 95,124,241,133,109, 97, 97,161,192,214,214, 22, 41, 41, 41,236,169, 83,167,178,242,243,243, 39,215,228,199,174, 95,191, 62,161,
+ 79,159, 62,107,126,251,237,183, 45, 91,183,110,237, 60,120,240, 96,124,250,222,123, 24,215, 86, 14,173, 86, 11, 66, 8, 78,159,
+ 62,253,232,226,197,139,158, 98,177, 88, 59,111,222, 60, 14,192,205,106,239,232,195, 14, 69, 56, 54,239,223,121,221, 79, 27,246,
+251,250,183,173,235,238,225, 46,109,239,106, 9,189,193,136,212,180, 76, 92,186, 30,174,141,138,184,151, 72,245,250, 15,211, 34,
+170,207,226, 14, 0, 17, 17, 84, 15, 96,178,183,183,197,130, 21,155,118,108,220,190,107,127,255,209,195, 6, 8,125, 91,116,197,
+179,235,135,112,249,230, 5, 54, 91, 67, 15,229,139, 4,227, 34,162,243,178,107, 90,241, 90,173, 86, 71, 8, 40,254,147,125,157,
+106,181, 90, 93,109,206,199,242, 79,126,253,245, 87, 36, 39, 39,107, 99, 99, 99,119, 83, 74, 55, 37, 39, 39,155,156, 62, 97, 29,
+165,186, 1,132,156,155,211,177, 99,207, 57,167, 79,203, 6,125,249,165,174,255,135, 31, 78,135, 86,171,135, 68, 66,133, 10, 5,
+ 3,169, 84, 20,126,245,170,217,218,113,227,108,136, 78,119,246,119, 74, 77, 14,193,255, 29,179, 8,203, 69,176, 48,226,243,175,
+160, 46, 23,193,186,113, 39, 10, 53,137, 96, 1, 64,114,114,114,156,179,179,115,219, 69,107,215, 29,236,213,182,117,147, 6, 42,
+103,169,173,135, 59,148, 78, 78,200,202,200,192,173,123, 79, 12, 63,157,187,244, 64,173,209, 12, 48, 53, 47, 12,199,113,101,179,
+220,188,191,156, 9, 70, 32, 40, 51, 2,165, 73, 3, 45,252, 59,130, 8,133, 48, 82, 10,189, 94, 95,237, 32,172,164,164,164, 4,
+ 23, 23,151, 15,191,252,242,203,243,127,252,241, 7, 19, 16, 16,208,242,175,191,254,122,173, 69,115, 19, 18, 18, 92, 75,186,181,
+242, 44, 44, 44,132, 35, 71,142,132,193, 96, 64, 81, 81, 17,114,115,115,145,153,153,169,157, 50,101,138, 20, 0,196, 98,177,161,
+103,207,158,213, 94, 63, 86,237, 75,208, 76, 29,228,186,206, 70, 24,243,113, 94, 70,168,135,141, 48,230,121,219,102,220,186, 85,
+251, 18, 52, 11,190,178, 90,148, 17,115, 41, 42,185,240,244,166,109, 7, 15, 8,134,247,255,208,232,170,124, 60, 75,230, 64,247,
+191,219,183,218, 70,232,149,164,162,181,141, 92,189, 76,198, 3, 26,226,217,209,122,105,151, 65,173,103, 47,154,182, 74,233,224,
+ 96, 15,214,200,226,121,220, 51,252,118,112,125, 97,190, 54,123,113,102, 4,189,107,138,150,167,167,167,135, 64, 32,192,145, 35,
+ 71, 0, 96,125,201,203,235, 79,157, 58, 53,120,200,144, 33,168, 91,183,174,183,187,187,187,180,170, 52, 26, 21, 69,239, 12, 6,
+ 3,222,244,186,214,132,144,167, 27, 55,110,116,177,177,177, 33, 87,174, 92, 97, 25,134, 57, 90, 83, 13, 39, 39,167, 31,143, 31,
+ 63,222,137, 82,218,211,215,215, 23,117,235,214, 45,185,158, 70,224,202,149, 43,187, 18, 19, 19, 71,188,161,197,157, 41, 33, 4,
+121,121,121,165, 3,237,244, 74,165,242,173, 92, 52, 58, 49, 49,113,187,163,163,227,233,249,243,231,127, 87,175, 94,189,177,163,
+ 71,143, 22, 52,108,216, 16,185,185,185,176,176,176,128, 74,165, 66, 98, 98, 34,182,111,223,110, 76, 75, 75,251,141, 97,152, 5,
+ 73, 73, 73, 73,181,213,180,182,182,134,179,179, 51, 18, 18, 18, 74, 53,183, 24, 12,134,133,233,233,233,169,224,121,179, 6, 43,
+ 37, 37, 37,195,201,201,169,233,175,191,254,186,182, 56, 77, 67,113, 84, 43, 63, 63,127,114, 74,241,136,241, 26,113,236,216,177,
+ 39, 0, 2,250,244,233, 83,111,255,254,253, 91,118,238,220,217,185, 95,191,126, 24, 60,120, 48, 88,150, 69,175, 94,189, 70,188,
+ 28,181, 50,133,212,176, 67, 17, 36, 32,160,233,221, 91,151, 63, 13,185,123,179, 15,165,212, 7, 0, 33, 12,243,159,197,158, 35,
+106,190,216,115, 68, 68, 94, 54,128,143,124, 93, 45,188, 22,175,223,177,213, 76,200,117, 84,179,204, 85,181,150,249, 34, 36, 33,
+175,214, 11,140,150,100, 94, 95,206, 48,100, 70,241,115,211,150,134,169, 68, 99, 38, 0, 8,133,162, 61,119,239,222,157, 29, 27,
+ 27,155,104,202, 12,175,138, 56, 72,105,220,167,132,156,153,238,227,211,181,207,148, 41, 34,191,238,221,205,109,220,220, 56, 74,
+169,241,249,173, 91,228,198,145, 35,162, 27, 71,142,200, 12, 90,237,249,125,148,214,104, 6,212,223, 49,139,176, 52,130, 85,207,
+203,245,204,192, 1,189,187,123,121,168, 0, 0, 79,159, 39, 33, 35, 43,247, 76, 77,115, 13,149,154, 44, 66,136,255, 95, 44, 59,
+ 88, 36, 18,245, 33, 37,169, 24,104, 45, 22,123, 54, 26,141, 9,109,219, 86,178,121,243,150, 85,102,200, 82, 77,188,240, 6,169,
+ 84,170, 79,218,183,111,191, 44, 41, 41,233, 96,122,122,122,225, 27,186, 46,244,218,185,115,231, 9,142,227,204, 94,138,112,229,
+ 37, 37, 37,153,151, 52,164,117, 79,157, 58,181,139, 16, 82,173,129, 95,181, 47, 65,179,114, 78,179, 67, 26,117, 76,127,162, 44,
+ 58,180,106,109,241,172,150,121,171,115,114, 1,252, 50,169,191, 13, 23, 25,252,203, 10, 23,139,199, 51,214, 30,202,250,173, 58,
+ 61,134, 97, 30,183,105,211,166,204,104, 85, 83,255, 73,181,169,128,103, 87,179,151,217,250,144,139,159,205, 28,248,189, 78,175,
+111,193, 16, 80,145, 88,124, 63, 39, 39, 99,174,169,230,170,196, 88,252, 60,109,218,180,201, 79,158, 60,217, 85,154,243, 46, 41,
+ 41,233,186, 74,165,250, 49, 46, 46,110, 66,124,124,252,250,248,248,120,147,205,149, 82,169,212,168,213,106,142,101, 89, 70,171,
+213, 66, 34,145,232,223, 84, 99, 80, 88, 88, 56,116,195,134, 13,191, 26, 12,134, 38,132,144,163, 57, 57, 57, 53,206,122, 27, 28,
+ 28,108,240,246,246,238,119,252,248,241,201, 15, 30, 60,152,234,232,232,232,152,154,154, 26, 27, 23, 23,183, 52, 37, 37,229,151,
+ 55,100,174, 16, 28, 28, 44,245,243,243,211,150,171, 23,139,183,101,188, 85,133,237, 91,106,106, 58,128,137,174,174,174,107,166,
+ 79,159,190,184, 69,139, 22, 3, 71,141, 26, 69,228,114, 57,246,238,221,139,152,152,152, 67,148,210,217, 53,233,210,173, 76,211,
+204,204, 12,123,247,238,165, 49, 49, 49,251, 24,134,153,147,148,148,244,175, 88, 72,251,239,128,188,233,187,160,154,134, 79,251,
+244,233, 83, 47, 35, 35, 99,139, 86,171,125, 7, 64, 97,104,104,168,249,127, 59, 36, 91, 21, 1,222,246,138,160,136,234, 27, 50,
+ 83, 53, 95, 30,160, 94, 27,205,154,104,152,170, 89,217, 98,207,156, 86,155,100,203,178,119,215, 81,170, 51, 85,211,197,197,101,
+ 33, 76,204, 23, 85, 66,100, 98, 98,226,119,181,169,207, 6, 13, 26,208,232,232,104, 80, 74,201,155,220,239,127,199,177,244,111,
+210,220,190,218, 71,213,168,121,227,233, 97,193,145, 63,148,116, 31,150,177, 96,146,141,121,199,119, 3,230, 94,189, 16,244,253,
+188,117, 47,118,113,190, 13,219, 78, 8, 97, 42, 50, 22,165,201, 61,107,170, 89,167, 78,157, 77,190,190,190, 95,132,132,132,252,
+ 26, 23, 23, 55,250,159,186,237,132, 16, 82,183,110, 93, 73, 77,162,115,252,121,100,154,166,147,147,147, 63,195, 48,115, 75,110,
+ 56, 22, 39, 36, 36,220,126,131,154, 70, 74,233,162,228,228,228,144,255,239,109,255,215, 69,176,254,110, 74, 35, 90,239,191,255,
+190,131, 64, 32,248,199, 47,210,105,138,185,170,105, 20,234,159,160,241, 50, 37, 6,234,250,155,208,122,217, 44,253,157, 60,126,
+252,152,240,167,245, 63,143, 79,191, 10, 77, 2, 48,197,191,130,212, 84, 37,166,106,122,151,247,223,206,109,175, 44,106, 83,219,
+133,152,227,226,226,198,170, 84,170,169, 53,153,125,248, 95,218,110, 10, 64,203, 31,253,111,158,148,148,148,187, 0,250,254,211,
+ 53,121,131,245, 15,225,175,191,254, 74,227,119, 7, 15, 15, 15, 79,245,252,211,205, 21, 15, 15, 79,241, 0,233,192, 74,238, 62,
+ 76, 14,253, 17, 66, 2,107,113,119,115,142,215,228, 53,121, 77, 94,147,215,228, 53,121,205,127,151,230,191,134,210, 89, 76,127,
+199, 3, 64, 32,175,201,107,242,154,188, 38,175,201,107,242,154,188,230,191,237,193,240, 22,147,231,239,230,167, 1,196,229,167,
+ 1,196,229,239,250, 60, 15, 15, 15, 15, 15,207, 63, 13,225,219,182, 65,254,254,254,222,148,210,161,132,144,129, 37, 17,186,253,
+132,144,157,119,239,222, 53, 41, 3,173,153,153, 89,170, 70,163,113, 0, 0,153, 76,150,166,209,104,156,202, 71, 75,129, 87,150,
+200,160,197, 63, 83,249,128, 85, 79, 79,207, 84,173, 86,235, 96, 66, 52,241, 18, 33,228, 50,195, 48,151,106,147, 94,224,221,119,
+223, 29, 33, 16, 8, 22, 3,128,209,104,252,246,194,133, 11,127,252, 93,245, 76, 8,105,227,166,114,250, 93,111,208,179,169,233,
+ 89,115, 41,165, 71, 42,250,220,134,190,100,169,144, 96,122,201,255, 43,199, 31,165, 85, 78,253,174,233,231,171, 40,159,191, 72,
+ 36,154,232,232,232,216, 43, 33, 33,225, 46,128, 25,148,210,106,143, 1, 43, 23,239, 79, 69, 34,209, 48,131,209,232, 37, 18, 8,
+158, 26, 12,134, 29, 57,137, 17,219,249, 75, 5, 15, 15, 15, 15,207,223,102,176,218, 53,176,109, 72,168,126,186,136,208, 78, 6,
+ 74,174, 80, 34, 94,121,227,113,102,212,235, 20, 64,165, 82,185, 17, 66, 2, 40,165, 77, 24,134, 9,227, 56,238, 76, 77, 23, 59,
+246,243,243,115, 3,240, 49,128, 33,109,219,182,109, 54,110,220, 56,212,175, 95, 31, 26,141, 6,183,111,223,158,181, 99,199,142,
+ 89,126,126,126, 15, 0,236, 2,176, 59, 56, 56, 56,190, 50, 45,141, 70,227, 80,234,149, 8, 33, 14, 3, 7, 14,188, 93,222, 84,
+149, 44, 46, 75, 40,165, 55, 8, 33,215,141, 70,227,205,125,251,246,197, 55, 38,164,205, 24, 15,241,254,201,207,116,174, 47,107,
+106,181, 90,135, 99, 83, 39,128, 82, 14,154,204, 12,116, 88,182,182,236,189,147, 61,219,130, 49, 26, 32,145,138, 47, 5, 28,189,
+113, 25,192,165,146, 71,141, 17, 8, 4,139, 79,157, 58,229, 76, 41, 69,143, 30, 61, 22, 3,248, 91, 12, 22, 33, 68,218,214,191,
+197,197,163, 7,118,201, 10,178, 82,209,179,223,224, 29,132,144, 17,148,210, 3, 47,152,165,222,196,145, 8, 49,125,220,146,157,
+ 2, 0,216, 48,123,232,140, 53, 61,200,186, 41,167,105,138,139,139, 75, 23, 74,233,140, 18,189, 21,137,137,137, 23, 55,244, 38,
+142, 16, 96,230,184, 37, 59, 9, 0,108,156, 61,116,250,134,222,100,237,248, 19, 53,155, 37, 73, 8, 25, 63, 98,196,136,117,139,
+ 23, 47, 22, 56, 59, 59, 35, 49, 49,177,167,183,183,119, 67, 66,136, 55,165,180,210,193,193, 54,117,124,246,244,236,217,203,243,
+227, 65, 3,228,246,118,214, 72, 72,206,176,248,115,199,206, 49, 54,117,124,122,101,197,133, 14,230, 47, 23, 60, 60, 60, 60, 60,
+111,204, 96, 53,107,102,105,101,166,166, 83,205,196,244,227,158,109,188, 61,250,118,107, 79, 60, 61, 61, 17,245, 40,202,235,226,
+181, 59, 35,187, 52, 54,127,174,214,147,221,106, 51,178,234,193,131,170,215, 15, 27,225, 75, 12, 6, 99,241,111,138,133, 48, 94,
+ 72,119, 61, 20, 24, 24,232, 49,106,212, 40,248,250,250,226,238,221,187, 93,246,237,219, 55,217,205,205,237,142,193, 96, 56, 33,
+149, 74,131,170,203,161,226,231,231,183,204,197,197,101,198,180,105,211,136,191,191, 63,164, 82,105,217,123, 74,165, 18, 93,187,
+118, 69,215,174, 93,145,154,154,218,236,226,197,139,205,118,238,220,185,212,207,207,111, 69,112,112,240, 44, 83, 42,104,238,220,
+185,254, 21,188,124,138, 16,242,132,101,217,123, 62, 62, 62,241,141, 8,169, 63,182,119,251,179,227, 59, 52, 80, 84, 17,157,194,
+157,197,197,171,107,148, 55, 88,180, 40, 31, 34, 11,243, 75, 34,165,242, 21,115,213,132,144, 22,109,173,153,223,127,201, 50,250,
+212,192,100, 33, 62, 62, 30,150,150,150,102, 1, 1, 1,201,132,144,249, 23, 47, 94,220,242,134,143,155, 54,243,167,143, 23,103,
+199,132, 34,229,225, 13, 76, 29,212, 81, 62,229,167,191,190, 7,112,160,106,227,195, 48,127, 60,181,155, 53, 5,152,204,113,220,
+220,200,200,200,206, 0,208,164, 73, 19, 9,128,139,219,162,173,123,143,104,146, 91,235, 52, 11,132, 16,177, 64, 32,248,121,219,
+182,109,159,127,250,233,167,136,141,141,197,213,171, 87,161, 84, 42,177,112,225, 66,247,105,211,166, 45, 5, 48,185,178,200, 85,
+143,158,189, 61, 55,254, 48,199, 59, 63, 43, 87,187,249,231,189,119, 84,205, 26, 49, 83, 38, 77, 48,215,177,122, 39, 43, 23,239,
+ 79,249, 72, 22, 15, 15, 15, 15,207, 27, 49, 88,157,234, 43,110,247,247,171,231,215, 55,176, 61,211,160,145, 55,196, 50,121,217,
+123,205, 91,250,162,121, 75, 95, 50,122,100,190,231,253,251,247,231,156,186,116,107,118,167,250,138,224, 43,209,133,173, 43,211,
+ 51, 24, 33,220,185,115, 39, 0,224,199,175,135, 10,126,190, 18,229, 81,126,193,216,206,157, 59,163,115,231,206,204,210,165, 75,
+219, 92,188,120,177,205,238,221,187,245, 46, 46, 46,107, 18, 19, 19,247, 85, 81,204, 25,251,246,237, 35, 2,129, 0, 2,129,160,
+210, 15, 57, 58, 58,162, 91,183,110,112,118,118, 38, 95,127,253,245, 12, 0, 21, 26, 44,153, 76,150, 70, 8,113, 0, 0, 27, 27,
+ 27,227,252,249,243,239, 81, 90,214, 3, 72, 41,165, 55, 24,134,185,201,113,220,173, 35, 71,142, 36, 52, 37,196,161,143, 95,163,
+ 43,227, 63, 25, 40,167,251,215, 84,106, 14,180, 57, 89, 21,190, 46, 81,200, 47, 73, 20,138,203, 82, 51,179, 23,204, 85, 83, 66,
+ 92,219, 54,242, 56,179,225,171,161,230, 38, 70,241, 26,118,233,210, 69,102, 52, 26, 81, 88, 88,136,141, 27, 55, 90,154,153,153,
+ 89,246,234,213,107, 30,128, 50,131,229, 77, 72,243, 15, 85,130,209,243, 19,217, 9,181, 48, 48, 86,157,218,249,199,252,180,108,
+158,133,127,219, 78,120,124,241, 79,100,101,229, 35, 55,167, 0, 47,103,253, 6,128,241, 39,104,234,134,190,100,229,134,111,134,
+206, 36, 12, 67, 90,244,159,129, 30, 13,233, 36,149, 74, 21, 78, 8, 17,149, 46, 31, 67, 8, 17,186,186,186,170, 26, 54,108,185,
+178, 65,143,198,216,248,237, 39,160,197,139, 52,174, 52, 53,122, 69, 8,113, 48, 55, 55, 63,114,230,204,153, 54,173, 90,181,194,
+205,155, 55,241,236,217, 51,140, 31, 63, 94, 55, 97,194, 4,241,240,225,195,201,212,169, 83,191, 36,132,236,167,148, 94,123,249,
+251, 34,145,104,216, 71, 3, 62,144, 20,228,228,105,116, 90,189,206,198,206,138,211, 22,106,138, 50,178,243, 52,159, 12, 29,166,
+187,119, 55,120, 24,128, 87, 12,214,235,212, 39, 15, 15, 15, 15,207,191,212, 96,201, 4,198, 86,243,119,221,135, 49,235, 9,104,
+110, 28,104, 97,202, 43,159,145,219,185,161,113, 59, 71,200,173,236,153,176,135,171, 91,189, 20,181,169,114,170,102,169,185,218,
+ 60, 84,213,180, 48, 59, 89, 12, 0, 10,107,103,253,232, 29,137,225,173, 90,181,130,189,189,189,248,250,245,235, 83, 1,236,171,
+ 66,147,232,194,130,241,176, 79,123,212,123,152, 5,185, 92, 14,137, 68,242,194, 7,162,162,162,112,249,242,101,196,197,197,193,
+203,203, 11,120,105, 28, 85,121, 77,181, 90,237,216,179,103,207,160, 21, 43, 86,116,254,241,199, 31, 31,108,219,182,173,115,101,
+221, 74,222,132, 40, 90,184, 59, 5,125,255,245, 24,107,122,242,119,166, 40, 51, 13,226, 74,202,217,126,241, 42,180, 95,188, 10,
+ 0,176,215,219, 25, 50, 11,115,200,148,202, 75,129,167,239,190, 18,185,242, 35,196,194,203,217,246,194,250,249,147, 21,184,176,
+ 71,130, 47, 22, 86, 89,159,126,126,126, 13, 3, 2, 2,174, 47, 90,180,200, 42, 62, 62, 30,215,174, 93,131,187,187, 59,138,138,
+138, 94, 88,175,204,155, 16,199,214,141,234,158,153, 61,109,164, 37,128, 9,166,236,163, 23, 76,136, 64,240,253, 15,243,103, 88,
+ 88, 74, 41,158, 92, 59,132,103, 79,158,227,118,196,115,195,246,179,161, 70,157,193, 56,170,162,250, 28,127,148,126, 51,173,171,
+244,247,187,249, 94, 71,251,116,153,208, 96,209, 16, 71,232,245,250,173,233,233,233, 24, 61,122, 52, 56,142, 67,199,142, 29, 59,
+ 80, 74, 19, 39, 77,154, 4, 47, 47, 47,108, 57, 29, 85, 36,204,186, 21,176,227,122,222, 93, 83,142, 37, 66, 72,179,186,117,235,
+158,185,120,241,162,163,139,139, 11,130,130,130,144,146,146, 2, 39, 39, 39, 76,152, 48, 65,178,108,217,178,109,121,121,121,131,
+ 22, 47, 94, 44,123,240,224,193,110, 66,136, 91,137,105, 46,211, 52,114, 70,149,167,187, 74,121, 96,247,233,251,214,230,114,212,
+241,114, 19, 11,148, 22, 70, 10, 82, 84,199,217, 94,108,228,140,170, 10,246,255,107,213,167,169,240,154,188, 38,175,201,107,254,
+ 27, 52,255, 85, 6,171, 20,253,179, 32, 72,188, 7, 0, 92, 83,208,236, 39,224,242, 18, 65,229, 14, 40,228,204,144,145, 20,139,
+135, 87,246,129,234,171,207,123, 39, 18,128,157, 51, 97,168,208, 74, 6, 72,204,237,245,249,249,249, 80, 40, 20, 40,204, 78, 22,
+ 79,251,161, 44,178, 37,190,120,241, 34,130,131,131,161, 82,169, 76, 42, 35,213, 21,247, 34,234,116, 58,232,116, 58,164,244,110,
+ 13, 69,219,119,144,253,201, 4,156, 63,127, 30,105,105,105, 16,139,197,144, 72, 36, 96,217,234,147,197, 51, 37,171,198,150, 70,
+173, 42,250, 76, 0, 33, 66, 87, 27,229,209, 13,243, 38,123, 48, 55,142,137,212,113,209, 72,210, 24, 97,101, 66,125, 74,149, 10,
+ 72,228,102,151, 36, 74, 69, 69,230, 74,164, 80,202,142,254,190,104,170,147, 32,228,188, 76, 29, 29, 90,102,218,202,211,173, 91,
+183, 49, 0,230, 81, 74,115, 2, 2, 2, 28, 23, 47, 94,108,157,152,152,136,136,136, 8,236,221,187, 55,157, 45,222, 80, 66, 41,
+ 93, 0, 0,237, 8,145,213,177,183, 58,189,254,187,201,230,184,184, 71,130,207,106,158, 92,221,178, 73,223,227, 31, 14, 31, 55,
+ 97,221,228,190, 40,204, 87, 99,231,217, 16,156, 10,126,242, 62,128,171,148,210, 74, 51,220,255,120, 94, 27,237,226,226,210,245,
+139, 47,190,184,119,240,224, 65,187, 31,126,248, 1, 70,163, 17, 44,203,130,101,217,178,255,141, 70, 35,118,237,218,133,171,119,
+ 35, 38, 37, 37,229,153,180,222, 27, 33, 68,229,225,225,113,238,214,173, 91,246,114,185, 28,103,207,158, 69, 78, 78, 78, 89,228,
+106,196,136, 17, 36, 39, 39,231,227,141, 27, 55,126, 24, 19, 19,243,195,149, 43, 87, 50, 1, 8, 0,176, 47,238,115,225, 19,150,
+ 53, 52,118,110, 82, 95, 56,168,111,167, 78, 5,153,161, 80,218,250,224,198,253, 39, 71,179,179,115,212, 12, 35,124, 82,254,243,
+111,162, 62,121,120,120,120,120,254,229, 6, 75,115,127, 7,180, 97,123, 32,246,234, 2, 73,211,193, 16,185,182, 67,124, 88, 16,
+238,157,248, 17, 9,225, 87, 65, 57, 35, 28,221,171, 95,106,238,143, 16, 42, 82,169, 84,193, 73, 73, 73, 8, 9, 9,193,147, 39,
+ 79, 32,147,201, 94,249,220,249,243,231, 1, 0, 78, 78, 78, 38,109,132,196,191, 61,220,238, 39, 35,190,133, 51, 0,192,237,126,
+ 50, 0, 96,233,236,217, 16,139,197, 16,139,197,101,139,194,154, 98,176, 72,201,135,185,226,110, 42, 90,209,251,254, 82,209,206,
+221,243, 38,182,150,198,132, 73,180, 15,110, 32, 73,203,209,163,169,198,227,222,166, 24, 44,185,252,146, 68,169,188, 44, 86, 40,
+ 94, 48, 87, 0, 64, 69,162,237,127, 46,152,232,163, 72,125,170,208,220, 57,143,100, 13,167,183,168, 88,102,193,201,147, 39, 29,
+132, 66,161,147,209,104, 68, 92, 92, 28,194,195,195,177,118,237,218,212,252,252,252,128,224,224,224,168,114,229,101, 90,153, 73,
+246,110, 95, 56,217, 83, 24,122, 73,166,125,242,160, 66,211, 86, 21,246,205,251,247,120, 63,160,197,241, 49,159,124,139, 15,122,
+119,199,240, 0,111,250, 60, 41, 75, 3,224, 44,165,212, 88,221,247, 19, 19, 19, 19, 93, 92, 92,186, 13, 24, 48, 96, 71,211,166,
+ 77,155, 80, 74,209,184,113, 99,244,235,215, 15, 7, 14, 28, 64, 68, 68, 4,242,243,243,245, 87,174, 92, 89,147,148,148,244,155,
+ 41,101, 34,132,200,173,173,173, 79, 93,184,112,193, 94, 46,151,227,204,153, 51, 80,171,213,112,118,118,126, 33,114,181,116,233,
+ 82,217,243,231,207,215,159, 62,125,218, 29, 0, 83,209, 66,216,122, 86,187,229,183,109,187,215, 77,253,242, 11,151, 11, 55, 35,
+206,107, 11,242, 45,235,214,141,207,179,183, 86,154, 47, 94,186,188,142,158,213,141,169,184, 62,131,106, 85,159, 60, 60, 60, 60,
+ 60,255,114,131, 85,218,197, 68, 57, 22,186,232,179,208, 69,159,133,162,203, 28, 28, 89, 50,236,133,207, 25,141,134, 90, 21, 64,
+163,209, 64,172,180,213,255,248,245, 80, 49, 0,112, 34, 69,217,234,240, 28,103,218,194,235, 53, 89,210,171, 38, 6,171, 68,247,
+ 21,243,224, 33, 85, 94,218,242,213,160,182,182,198, 34,145,238,234, 81, 36,106, 57,246,135,104,125,209,157, 28,186, 98,118, 37,
+154,199,186,181,134, 33, 59, 3, 50,115,197,165,158, 23, 31, 84, 56, 91,208, 67,102,113,126,239,212, 33, 29,157,196, 16,235,142,
+239, 67,146,150,211,110,138, 49,252,182,182,146,109,166,148,226,217,179,103, 40, 42, 42,194,245,235,215,113,224,192,129,244,151,
+205, 85, 73,121,131,126,157, 49,172,141, 69,126,138, 88,119,231, 28,146,180,156,182,161, 41,166,202,167,127, 7, 49, 67,206, 16,
+ 70, 96,214,187,147, 55,166,124,209, 31,171,127,253,139,213, 57,116,234,179,238,200,137,143, 10,180,250,217,166,152,171,114, 38,
+ 43, 20,128,183,187,187,187,148,101,217, 46,125,251,246, 61,209,187,119,111,220,184,113, 3,231,206,157,107,160,215,235,147, 1,
+ 64,165, 82, 45, 4,224,200, 48,204,138,132,132,132,167,149,236, 35, 70, 44, 22,239, 62,119,238, 92, 83,149, 74,133,115,231,206,
+ 65,173, 86, 99,220,184,113,186,137, 19, 39,138, 71,140, 24, 65,114,115,115,203, 34, 87,215,175, 95,207,172,204, 92, 1, 64, 94,
+194,195,147,214,110, 77,219,119,233,220,174,127,131, 6,245, 45,158,230,231,165,201,229, 50,179,139,151,174,136,111,221,188,181,
+ 62, 47, 33,242,118,197,245,121,222,228,250,228,225,225,225,225,225, 13, 86,149, 24,179, 94,109,243,140,108,237,215,105,110, 55,
+243,116,184,153,153, 25, 54,110,220, 8,185, 92, 94, 99,227, 84,116,242, 16,226,199, 15, 45,139, 92,149, 70,178,208,115,196,107,
+ 25, 44,142,227,174, 3,120,193,229, 41, 28, 27, 13,217,253, 73,183, 14,222,158, 46,140, 97,239, 90, 36, 20,177,154,121,143,244,
+154,135,249,244,253,136, 10, 6, 79,151, 97,208, 65,166, 40,142, 92, 85,100,174,148, 78, 13, 63,220, 54,164, 75, 64,139, 70,245,
+ 24,118,207, 42, 36, 22, 25, 10,102, 69,234,245, 79, 11,233,193, 74, 76,229,188,238,221,187,207,179,181,181,149,173, 91,183,206,
+178,110,221,186, 96, 89, 86,247,178,185, 82, 56, 54, 26,178,103, 68,207, 14, 13,157,172, 25,195,254,159, 16,175, 54, 22,173,125,
+106,216,182,201, 4,115,101,103,169, 60,189,105,201,120, 51,185, 84, 4,141, 70,131,101, 27,246,227,204,181, 7,125,210,195, 14,
+157, 6,112,186,182,251, 91,175,215,127, 30, 24, 24,184,122,250,244,233, 96, 89, 22, 31,127,252, 49, 98, 98, 98,206, 68, 71, 71,
+175,117,117,117,253,122,252,248,241, 42,123,123,123,140, 29, 59, 86, 12, 96, 68, 37, 50,203,119,238,220,217,167, 69,139, 22,184,
+116,233, 18,114,114,114,224,236,236,140,137, 19, 39, 74,150, 46, 93,186, 45, 47, 47,111,208,146, 37, 75,100,207,158, 61,171, 50,
+114, 85,158, 28,154,187,232,151,213, 99,191,110,221,182, 3, 19, 29, 29,197,198,181,238,204,156, 63,119,226,114,182,131,116,219,
+ 11,245, 57,178, 87,141,235,147,135,135,135,135,135, 55, 88,213, 70,135,140,249,175, 14,118,231,140, 38, 7, 50, 76, 54, 78, 70,
+ 19, 53, 57,173,166, 58,195, 84, 35,131, 85, 50, 6,235, 20,165,244, 5,131,101,229,212,168,243,156,153,147,215,116,252,176, 39,
+147,250, 69, 59,228, 20,104,181, 51, 34, 88, 46,161,168, 26,115, 5,128, 49,234, 47,137, 44, 44, 46,139, 95,154, 45, 8, 0,102,
+142,245, 91,207,250,234,203, 13,239, 14,233, 75,210,199,117, 68,118,142, 90,251,117, 56, 75, 18,213,116, 80, 4,165, 23, 43,210,
+ 59,127,254,252,102, 0,155, 3, 2, 2, 82, 21, 10, 5, 10, 10, 10, 94,169,215,210,242,118,248,176, 39,147,250,121, 27,100, 21,
+234,181, 51,194, 89, 36,169,185,221,213,153, 43,123, 43,243,211,155, 22,143,151, 39, 37,196, 64, 44, 22, 67,169, 84,226,236,213,
+ 48,164, 63, 56,124,250,117, 14, 56, 87, 87,215,249,147, 38, 77,154, 55, 98,196, 8,100,103,103,227,236,217,179,120,247,221,119,
+241,243,207, 63,215,189,112,225,194,234,246,237,219, 67, 32, 16,224,236,217,179, 48, 24, 12,143, 43,217,159,253, 71,143, 30,253,
+245,135, 31,126,136,219,183,111, 35, 57, 57,249,133,200, 85, 78, 78,206,199, 27, 54,108,248,240,249,243,231,213, 70,174,202,227,
+ 2,180,246,172,215, 82,252,205,220, 31,161, 45, 74, 19,166, 39,222,188,116,254, 44,189, 81, 55, 43, 75, 14, 32,183,182,245,201,
+195,195,195,195,195, 27,172, 10,220,139, 17, 66,103, 31,176,201,161,255,121,233,165,217,132, 98,185, 18,156,177,122,227, 50,194,
+151, 24, 70,214,131,112, 85, 47, 6, 98,165,173,190,221,204,211,225,149,125, 86,169, 84,154,218, 69,104, 20,247,254, 80, 80,175,
+199, 7,120,218,220, 9,212,160, 47,139,100, 97,246,236, 23, 76,150, 88, 44,134, 78,167, 3, 42,232,246,123,137, 91,132,144, 24,
+ 0, 55, 40,165,212,175,161,215,247, 50,133, 98,164,191, 79, 61,187, 41,227, 63, 23, 61, 79,211,226, 66,199,111,114,246, 47,159,
+169,140,167,202, 9,177, 52,231, 90, 53,134,242, 82,239, 43, 15, 95,137, 92,249, 54,244,250, 86, 38,151,125,209,182, 89, 67,167,
+ 89, 83,199,139,158,167,106,201,133,214, 51,242, 14,172,152, 33,127, 6,243,175,227,105,246, 69, 19,182,127, 94,239,222,189,231,
+ 81, 74, 41,199,113,115, 1,160,124,121,167, 78,252, 66,244, 52, 69,131,243, 29,191,205, 62,176,124,166,121, 60,170, 46,175,189,
+ 79,255, 14,142,214, 22,167, 55, 45,153, 32, 79, 78,140,133, 84, 42,133,185,185, 57,226, 83,115, 33, 18, 10,212,175,115,176,185,
+187,187, 75,219,180,105, 51,115,248,240,225,136,140,140,196,172, 89,179,146,147,146,146, 14, 30, 57,114,100,220,212,169, 83,133,
+157, 59,119, 70, 90, 90, 26, 54,110,220,104,184,125,251,246,146,148,148,148,149, 21, 30,180, 66,225,231,223,127,255, 61, 77, 74,
+ 74, 34,207,158, 61,131,179,179, 51,190,252,242, 75,201,146, 37, 75,202,198, 92,213, 36,114, 85, 74, 66, 66,194,165, 6,245,234,
+224,253,147,107,192, 26,180,151,114, 50,227, 46, 63,124,154,125,201, 70, 34,153,214,209,207,167, 86,245,201,195,195,195,195,195,
+ 27,172, 87, 48, 80, 38,119,231,178,177,150,239, 15, 27, 7, 51,247,119,160, 13,223, 7, 46, 63, 5, 92,126,177,129,145, 40, 44,
+ 96,110,231,134,130, 34, 13,174, 62,120, 10, 3,101,114,171,212, 51, 66,184,232,231,255,204, 22,180,178,178, 66,110,110,238, 11,
+145, 23,185, 92, 14,149, 74,133,188,188, 60,236,223,191, 31,180,154,200, 16,165,244,251,225,195,135,127, 55,126,252,120,166,222,
+144, 81, 40,184,121,229,229,104, 20,204,204,204, 32,147,201,144,144,144,128, 71,143, 30,113,148,210,239,171,137,120,221, 98, 89,
+246,254,238,221,187, 19, 26,120,185,246, 12,104,213,122,210,236,111,102,153, 71, 92, 57,131,185, 75,214,115,245,253,123,228, 46,
+219,117, 56, 63, 87, 89,167,107, 81,210,195,123,213, 85, 50, 33,228,213, 36,162,158,117,222,109,231,219,114,250,220,185,223, 90,
+132, 95, 57,139,239, 86,108,162, 13, 90, 4,230,174, 56,112, 36, 47, 67,238,222, 93,157,250,159, 49, 63, 85, 17, 20, 20,180, 25,
+192,230,210,231, 47,151,119,214,194,181, 92,195, 86, 61,179,151,237, 58, 80,152,103, 94, 39,176,170,242, 58,120, 15,104,239,230,
+108,115,250,167, 69, 99,229, 41,137,113,144, 74,165, 80, 42,149,136, 75,206,193,188, 53,123, 11,245, 28,215,243, 53,143, 55,169,
+ 66,161,144,234,245,122,252,241,199, 31, 72, 76, 76,108,151,156,156, 28,231,228,228,180,105,236,216,177,235,154, 52,105,210,248,
+209,163, 71,143, 11, 10, 10, 38,164,164,164, 60,172, 76,196,202,202,170,157,189,189, 61,185,113,227, 6,198,142, 29,171,251,242,
+203, 47,197,195,135, 15, 39,217,217,217,181,138, 92,149,139,174,117,238,247, 94,123,116,232, 54,238,146, 78,147,115,249,249,195,
+109,151, 24,122, 77,230,215,210,167, 86,245,201,195,195,195,195,195, 27,172, 10, 73, 23,170, 29, 54,109, 63,176,114,247,190,131,
+ 95,140, 30, 57, 84, 22, 16,248, 41,196, 25, 97, 96,147,130,225,226,221, 17, 84,104,134,219,119, 67, 16,250, 36, 94, 83,164, 23,
+108,205, 19,171,167,191,100, 44, 2,171,202,149,145,155,155, 11,119,119,119,236, 26,215,168,169, 54, 47, 77, 92, 7, 0,147,104,
+169,191, 16,213, 59,252,242,229,203, 5, 0,182, 54,104,208, 96, 95, 85,154, 33, 33, 33, 11, 90,182,108,121,228,155,111,190, 89,
+218,160, 65,131,158,163, 23,254, 12,241,148,225, 80, 71,132, 66, 30, 48, 8, 54, 54, 54,200,204,204,196,237,219,183,145,159,159,
+127,138, 82,250,205,189,123,247,194,170,210,164,148,222,244,241,241, 73,168, 83,167,142,149,131,210,236,183,113,159, 13, 55,143,
+ 13,189,137,212,168,251,184,118, 53, 42,123,231,129, 35,137,121,185,233,159, 85,213,184,150,215,100, 24,230, 5,115,213,176,161,
+157, 82, 33,181,222, 62, 97,244, 40,139,184,176,219, 72,139,186,135, 43,215, 30,103,239,218,125, 40, 61, 51, 51,117,100,101,230,
+170,186,250,172,168,188, 55,175, 60,202,222,189,239, 80, 66,126, 97,246,231, 21,149,183,188,166, 82, 33,154,126,228,143, 69,242,
+164,132,216, 50,115, 21,155,156,141,239,214,236, 46, 84,235, 12, 61,211, 67, 15,153, 20,169,169,170,156, 28,199,129,101, 89, 80,
+ 74, 33,145, 72,242, 0,160,196, 76,117, 53, 85, 51, 35, 35, 35, 40, 38, 38,166,159, 82,169, 44,139, 92,229,230,230, 14, 90,182,
+108, 89,141, 34, 87, 47,151, 51, 33, 33,225, 82, 61, 79,215,229,201,131, 7,105,157,157,237, 47, 29, 61,121, 39,204, 65,105,246,
+176,182,245,249,166,224, 53,121, 77, 94,147,215,252, 55,104,254,171, 12, 86, 68, 4,213, 3,152,236,237,109,177, 96,197,166, 29,
+ 27,183,239,218,223,127,244,176, 1, 66,223, 22, 93,241,236,250, 33, 92,190,121,129,205,214,208, 67,249, 34,193,184,136,232,188,
+236,234,126, 76, 36, 0, 59,116,232, 80, 33, 0, 72,132, 96, 87,245,233, 19,212,180,105,211,142,109, 13,105,226,121,235,138, 35,
+ 91, 11, 38, 13, 21, 7,221, 14,218, 39,149, 74, 55, 63,123,246, 44,207,148,141, 40, 49, 76,189, 90,181,106,245,206,215, 95,127,
+189,188,183,135,107,235,254,237,187, 64, 36, 18,225,246,237,219,200,204,204,188,205, 48,204,204,144,144,144,203,166,232,133,133,
+133,101, 52,173,239, 62,217,198, 76, 60,125,194,208,254,246,233, 79, 34,144, 16, 25, 2, 0,208,106,213,134,228,168, 75, 45,106,
+ 82,201,165, 11, 55,123,123,123,139,141,218,130, 17, 50,161,197,220,113, 31,247,115,200,124,254, 16,241,225,197,233,158,180,154,
+ 34,125,124,212,133,198,181,217,137,238,238,238, 82,133, 8, 99, 42, 44,175, 78, 99, 72,121, 28,217,210, 20,157, 34,173,110,201,
+130,213,219,187, 47,154, 62, 82,106, 97, 97,129,224, 7,209,152,187,106, 87,141,204, 85,117, 80, 74, 97, 48, 24,106, 52,243,179,
+ 2,102,182,104,209,162,209,226,197,139, 27,148,140,229,122,173,200, 85,121,158, 60, 75,152, 21, 16, 16,224, 29,253, 40,184,139,
+141,153,120,199,235,212, 39, 15, 15, 15, 15, 15,111,176, 80,181,209,202,203, 6,240,145,175,171,133,215,226,245, 59,182,154, 9,
+185,142,106,150,185,170,214, 50, 95,132, 36,228, 61, 53,245,199,254, 8,161,162,151, 95,243,246,246, 86, 68, 11, 81, 80,250, 60,
+ 58, 11, 72, 74, 74, 90, 81,155,141,185,115,231,206,101, 0,109,124,125,125,251,159, 32,100, 54,240, 20,148,210, 37, 33, 33, 33,
+135,106,162, 99, 46,196,131,142,222, 94, 46,157,124,155,202, 4, 70, 53, 18, 34,159, 32,171, 80,131,179,225,177, 57, 12,101,126,
+175,109,101, 51,250,162,251,157,188,235,213,121,199,175,169, 92, 68,116, 72,136, 8, 70,174, 90,135, 51,225,177,185, 32,164,214,
+ 3,165,223, 84,121, 83, 66, 15,223,177,247,233, 31, 72, 8, 57, 55,123,226, 16,233,188, 85,187,223,168,185,178,177,177, 41, 74,
+ 73, 73,201,212,104, 52,182,169,169,169, 58, 27, 27,155,162, 90,154,180,104, 66, 72,243, 41, 83,166, 44,252,250,235,175,167, 47,
+ 95,190, 92, 92,155, 49, 87,149,145,157, 24,123,232,157,166,111,126,255,243,240,240,240,240,240, 6,171, 66, 74,204, 84, 64,128,
+183,189,226,234,163,244,194, 55, 81,128,136,136,136,194, 17,190,164, 44,178, 37, 18,128,125, 93,205, 18, 67,117,168,214, 2, 12,
+201,191,249, 56,182,224,214,227,216, 2,112,148,114,148,106, 25, 6,241,133,122,253,146,168,167, 9,181,159, 69, 71,136,241, 78,
+116,156,250,238,147,120, 13,229, 56,202, 81,170, 35, 4, 41, 6, 3,183,228,193,211,152, 35,255,132,242,166,135, 30,186,230,228,
+ 61,160,211,181, 91, 15,166, 22, 22,234,215,167, 71, 28,186,254,166, 14,182,224,224, 96,131,179,179,243,176,190,125,251,142,226,
+ 56,110, 83, 98, 98,162,161,182, 90,148, 82, 29,128,153,132,144,131, 97, 97, 97,123,175, 95,191,158,252, 38,204,213,223,186,255,
+121,120,120,120,120,120,131, 85, 21, 65, 17,111,198, 92,149, 82, 81,100,235,191, 73,216,227,231,126,127,135,238,131,199,207,155,
+253, 47,148, 55, 37,226,224, 93, 0, 31,255, 29,101, 77, 78, 78, 62, 3,224,204,155,210,163,148,222, 33,132,120, 0, 16,188, 17,
+115,245, 55,238,127, 30, 30, 30, 30, 30,222, 96,241,240,252,207, 64,139, 7,116,177,124, 77,240,240,240,240,240,252, 83, 32, 0,
+ 2, 43,105,180, 76,158, 29, 64, 8, 9,172, 69,163,120,142,215,228, 53,121, 77, 94,243, 45,209, 76,171, 66,243, 65, 53,154,149,
+ 69,182, 29,254,135,234,179,101, 37,154,203,171,209,156, 89,197,219,247,248,227,243,237,212,252, 55,221,253,255,109, 15, 0,129,
+188, 38,175,201,107,242,154,255, 2,205,102,124,125,190, 81,205,153,124,125,254,251, 52,223,182, 7,195, 91, 76, 30, 30, 30, 30,
+158,191,173,155,132, 16, 41, 33, 68, 90,219,247,121,120,254, 87,169,241, 24,172,214,173, 91,215, 7,128,219,183,111, 71,255,141,
+ 39,228, 68,103,103,231,209, 62, 62, 62, 77,196, 98, 49,147,159,159,191,224,194,133, 11,243, 95,254,220, 59, 77, 69,119, 5, 12,
+ 92,203,125, 19, 32, 2,128, 97, 96,164, 72,184,124,191,200,159,223,197,255, 93,156,157,157, 79,203,100,178,186, 28,199,129,229,
+ 40,140,172,177,248,175,145,131,193, 72,161,215,105, 98,181,133,185, 61,106,165,221,114, 64, 29,214, 72,151, 1,220, 6, 2,102,
+ 28, 5,183,145, 80,102, 28,101,176,129,112, 24, 11,161, 97, 37, 88,209,215, 66,177,240,219,164,224,125,241,111, 67,125,238,223,
+191, 95,240, 58,223, 31, 56,112, 96,133,203, 68,249,250,250, 30,147,201,100,245, 42,251, 94, 81, 81, 81,242,253,251,247,187,188,
+205,199,170,147,147,211, 59, 12,195,252, 4,160,233, 75,111, 61, 4, 48, 57, 41, 41,233,252,235,254, 70,107,185, 92,104, 39, 16,
+140, 17, 17, 50, 3, 0, 12,148,174,200, 48, 26, 55,223, 46, 42,250,199,140, 33,116,112,112,184, 44, 16, 8, 27, 20, 22, 21, 22,
+230,231,229,121,153,155, 91, 60, 53,147,203, 21, 70,214,248, 56, 35, 35,237,157, 26, 94,203,199, 3, 88, 89,242,255,116, 74,233,
+134,154,188,207,195,243, 86, 27, 44, 63, 63,191,134, 0, 58, 19, 66, 58, 83, 74,223,105,220,184,177, 99, 81, 81, 17,252,252,252,
+ 82, 9, 33,151, 41,165,151, 0, 92, 10, 14, 14,142,122, 19, 5, 18, 8, 4, 63,172, 93,187,118,218,151, 95,126, 89,182, 72,115,
+104,104,104,197,159,101,224,122,241,232, 57,135, 59, 97, 81,104, 21, 56,176,196, 96, 49, 64, 97, 50,186,116,107, 93,171,223,183,
+177,177, 49,119,112,112, 88, 64, 8, 25,196, 48, 76,181,141, 25,199,113, 70, 74,233,190,180,180,180,121, 89, 89, 89,249, 53,249,
+173, 86,254, 62,134, 98, 71, 88, 17,212,120,231,110,104,149,179, 43, 27, 55,110,124, 87, 32, 16,184,150, 92,156, 94,190,176, 85,
+248,191,209,104, 76, 8, 15, 15,247, 55,181, 46,100,114,249,116,194, 8, 3, 65,185,226, 36,168,132,121, 72, 57,246,156,166,168,
+104,165, 41,219, 43,149, 74,235, 6,135,220,107, 16, 17,245, 20, 94, 30,117,160,211,179,208,233, 89, 28, 57,119, 27, 45, 26,123,
+160,111,239,110,181, 62, 86,140,148, 44,152, 59,121, 88,151,197,107,119,182,250,118,242, 80,197,226,181, 59, 91,125, 59,101,168,
+114,241,186,157,254,223, 78, 25,166, 92,180,110,135,255,156, 41,195, 44, 22,175,219,169, 7,240, 89,109,126,227,179,230,117, 11,
+ 25, 35, 91,225,221, 53, 39, 16,106,127, 13,139, 85,252, 55, 78,220, 81,163, 70, 53, 44, 44, 44,140, 24,213,167,245,247, 77,220,
+ 29, 43, 28,255,147,147,153,234,240,248,193,237,185, 66,153,194,251,131,233,191, 85,121,126,138,197, 98,207,203,151, 47, 55,224,
+ 56, 14, 70,163, 17, 44,203,150,253,213,233,116,248,240,195, 15,223,200,132, 24,127,127,255, 81,148,210,197,197,135, 37, 89,116,
+247,238,221,245,175,113, 35,166, 20, 10,133, 95, 73, 36,146,206, 44,203, 54, 1, 0,145, 72, 20,169,213,106, 47,177, 44,187,154,
+ 82, 90, 80, 19, 61,134, 97,214,220,185,115,199, 91,169, 84, 66,175,215,151, 45, 12, 47, 16, 8, 26,183,105,211,230,103, 0, 13,
+ 94,119,251,237, 4,130, 49,237, 59,118, 92, 59,106,202, 20, 65,246,157, 59,248,105,235,214, 53,200,206, 6,128,159,171,251,174,
+171,171,235, 93, 66,136,107, 77,126,143, 82,154,144,144,144,224, 95,179,107,176,176, 65,108,124,146, 67, 93, 55, 21, 0, 64, 46,
+151, 43,238, 60,120,238,224,215,212,163,198,145, 43, 0, 43, 41,165,102, 37,245,187,182,125,251,246,237, 8, 33, 44, 0,202,113,
+ 28, 67, 8, 25,194,113,156,176,228,243, 43, 9, 33,191, 81, 74,181,124,211,204,243, 86, 27, 44, 63, 63,191, 19, 0, 58, 55,110,
+220,216,172, 91,183,110,240,245,245, 69,221,186,117, 33,147,201, 0, 0, 89, 89, 89,142, 17, 17, 17, 31,221,187,119,239,163, 27,
+ 55,110,192,207,207, 79, 13,224,106,112,112,112,133,209,136,192,190,157,190,148, 41,165,235, 0, 32, 61, 33, 51, 57,225, 89,218,
+186,228,228,228,149,148, 82,174,220, 9,233, 53,124,248,240,169,147, 38, 77,194,177, 99,199,176,107,215, 46,104,181, 90,228,231,
+231,227,194,133, 11,149,220, 90,167, 33,251,194, 50, 64,241, 28,136,187, 4,200, 29, 0,133,227,235,220,189, 45, 24, 60,120,240,
+ 20,111,111,239,178,172,227, 6,131, 1, 44,203,194, 96, 48, 32, 59, 59, 27, 83,167, 78, 45,189,120,129,227, 56, 92,184,112,225,
+203, 25, 51,102, 0,192, 87, 21,105,118,235, 92,239,174,144, 16, 87,238, 63,166, 44,225,236,229,167,254, 0, 17,220,185,123,159,
+ 84,108,190, 90, 8,170,191, 16, 10, 92, 67, 66, 66, 28,196, 98,177, 73,219,198,113, 28,124,125,125, 77,250,172,139,139, 75, 23,
+133,210, 98,215,128, 33,159, 91,183,244,109, 41,114,113,118,134,129,101,241,236,121, 92,235,251,247,130, 91,158, 57,186,231, 11,
+ 23, 23,151, 33,137,137,137, 85, 46, 72,109, 52,114,184, 31,241, 24,231,174,222, 67, 95,145, 12,133, 26, 29, 10,213, 58,108,255,
+235, 58, 18,210,114,107,189,159,218,180,105,227, 34, 23,216,183,254,114,212, 7,138, 21, 63,109, 83,124, 57,234, 3,172, 92,191,
+189,228,239, 54,197,151,163,250, 97,229,250, 63,148, 95,142,234,135,181, 27,126,107,219,166, 77, 27,151, 91,183,110, 37, 86,166,
+ 87,217, 62, 98,140,172,116,107, 68,162, 0, 0,210, 55,109,130, 33, 45, 13,170,121,243, 0, 0, 95,120,187,152,220,173,209,172,
+ 89,179,187, 66,161,176,218,198,145,101,217,132, 7, 15, 30,248,155, 98,174, 88,150,165, 66,161,112,238,213, 29,223,239,239,208,
+178,225, 11,149, 25, 21, 21,101,249,221,119,115, 7,238, 13,206,167, 31,249,153, 71, 28, 94, 57,170, 74,147,197,113, 28,163,213,
+106,241,248,241,227, 10,179,236, 51, 12, 99,172,205,126, 10, 8, 8,144, 22, 22, 22,238, 84, 42,149, 62,133,133,133,163, 40,165,
+223, 5, 5, 5, 57, 50, 12,131,192,192,192,239,252,253,253,159,203,100,178, 13,106,181,250,158, 82,169, 28, 18, 20, 20,100, 82,
+227, 74, 8,121,199,194,194, 98,251,161, 67,135,172,125,125,125,153,140,140, 12,120,120,120, 32, 43, 43,171,245,229,203,151,253,
+ 62,251,236,179,207, 8, 33,159, 82, 74, 47,215,160,184,141,228,114, 57, 29, 62,124, 56, 49, 26,255,179,185,191,254,250, 43,252,
+156, 83,235,141,237,169, 40,210,232,104,238,249,199,150, 99,197, 98,241,213,152,152,152, 26, 31,192, 34, 66,102,140,154, 50, 69,
+ 32, 78, 78,134, 34, 42, 10,125, 8, 17,110, 41,142,102,253,108,194, 54,187,174, 90,183,210, 65, 34,145,128,101,217, 50, 19, 88,
+122,141, 50, 24, 12,208,235,245, 48, 24, 12, 48, 26,141, 48,232, 13,216,186,233,183, 90,159, 99,114,133, 92,238,228,236,156,106,
+ 38, 87,200,223, 68, 99, 35,149, 74,133,219,182,109, 27, 34,145, 72, 0, 0, 58,157, 14,205,154, 53, 35,124, 51,204,243,111,140,
+ 96,245, 10, 10, 10, 2,203,178, 48, 55, 55,135, 64, 32,120, 57,186,129,119,222,121, 7,109,218,180, 65, 96, 96, 32, 30, 61,122,
+100,182,124,249,242, 74,195, 17, 67,167,245,129, 91,131, 98,227, 99, 48,112,206,215,142,223, 91,246,235,247,251,237, 1, 76, 43,
+ 31, 48, 24, 51,102, 12,201,204,204,196,160, 65,131, 46,107,181,218,247, 41,165,149, 46,151, 99,228,144,208,229,227, 97,224, 40,
+ 49, 91,125,107, 43,209,105,212,148, 97, 24,117,105, 23, 97, 45,239,138, 7,169, 84, 42,236,222,189, 27, 58,157,238,149,247, 45,
+ 44, 44, 16, 30, 30, 94,222,228,160,101,203,150, 2, 66,200,160,202, 12, 22, 67,136,235,201,160,232,178, 25, 65,131,223,111, 41,
+238,222,185, 94,170,144,145, 80, 0,228,219,111,191, 45, 51,108, 0,176, 96,193, 2,147,203, 43, 22,139,241,232,209, 35, 8, 4,
+ 2, 60,233, 80,124,131,221, 44, 36, 30, 2,129, 0,247,125,138,239, 64,219, 71,231, 64, 32, 16, 64,169, 84,154,106,174, 2, 28,
+157, 93, 15,127, 51,111,169,185,198, 64,113,252,194,109,196, 37,157, 5,165, 20,206, 14, 54,104,239,231, 43,106,218,188,133,195,
+175, 63,175, 56,236,226,226,210, 47, 49, 49, 49,168, 50, 45, 3,107, 68,147, 6,158,216,118,232, 50, 22,109, 56,128,204, 60, 53,
+242,139,138,235,181,107, 91,111,252, 82,251, 72,231,202, 70,238,238,110,191,239, 61,133,118,109, 91,225,143,189,167,209,174, 77,
+ 43, 20, 63,111,131, 63,246,158, 66,251,118,197,127,155, 54,169, 87, 39, 43, 38,119, 37,170,200,237,245,202, 62,234, 87,188,143,
+ 60, 4,226,178, 6, 32,102,220, 56, 0, 40, 51, 88, 53, 58,209,132, 66,215,123,247,238, 57, 84,247,185,150, 45, 91,154, 20,185,
+ 98, 89, 22,105,105,105, 36, 39, 39,135, 90, 89, 89, 13, 44,111,178, 74,205,213,158,187,121, 80,223, 92, 79,118,252,117,137, 27,
+246,126,231,136,195, 43, 71,121, 15, 28, 56, 48,178, 34, 93,189, 94,255,188,123,247,238,180,164,225,115,145, 72, 36,226,151, 12,
+152,170, 67,135, 14,175, 24,180,234,186, 14, 11, 11, 11,119,110,217,178,165,127,189,122,245, 48, 96,192,128, 51,222,222,222, 18,
+185, 92,142, 83,167, 78,193,205,205,205,206,220,220,252,196,210,165, 75,177,106,213,170, 58,103,206,156,217, 5,160,191, 9,231,
+104, 96,151, 46, 93,118, 31, 59,118, 76, 38, 22,139,161, 86,171, 17, 30, 30, 14, 75, 75, 75, 72, 36, 18,244,235,215, 79,208,161,
+ 67, 7,219,128,128,128, 3,132,144, 33, 53,153,209,164,209,104,232,236,217,179, 33,151,203, 33,151,203,161, 80, 40,160, 80, 40,
+ 96, 38,230,200,166,201, 30,102,147,182,228,152,125, 53,111,211,178,237, 27,230, 95,172, 83,167,206,119,113,113,113, 57, 53, 61,
+ 22,178,239,220,129, 34, 42, 10,154,187,119,107,124, 28, 89, 42,108, 48,107,214,172,234,142, 53,136,197, 98,180,111,223,190, 90,
+189, 38, 77,154,108, 18, 8, 4,246, 47,154,105, 34,152,251,237, 55,236,131,240, 40,133,222, 72, 21, 26, 45,139, 69, 11,231,178,
+ 2,134, 17, 52,107,214,236, 16,165, 52, 61, 60, 60,124,172, 9,209, 51, 45, 33,100, 58,195, 48,107,165, 82,169,208,221,221, 61,
+118,238,220,185, 55,138,187, 26, 0, 74, 41,227,238,238,222,218,204,204,172,174, 86,171,101, 1, 76,231,163, 87, 60,255, 22,131,
+ 5,165, 82,137, 59,119,238,128, 16, 2,115,115,115, 88, 88, 88,192,210,210, 18,121,121,121,136,136,136,192,195,135, 15, 17, 19,
+ 19, 3, 66, 8,188,188,188, 80,122,226,148, 59,193,202, 46,108, 59,127, 60, 6,153, 82, 10, 66, 0,223,119,125,224,243, 78, 51,
+180,186,253,116,178, 74,165,218,146,148,148,244,152, 16, 34,108,214,172,217,103,109,219,182,197,170, 85,171,160,213,106, 87, 85,
+100,174,202,107, 94, 14, 55,248, 3,128, 74,165,250,250,207, 83, 79,228,159,244,172, 87,148,148,148,244, 67, 77, 43,225,229, 11,
+112, 70, 70, 6, 56,142, 51, 57, 42,148,147,147, 83,165,230,203, 17,129, 69,203, 86, 91,229,231,166,226,251,229,127,194, 96, 48,
+ 96,218,180,105,224, 56,174,236, 81,145, 94, 69,229, 44,237,250, 19, 8, 4, 47, 24,224,234,158, 87,165,105,111,111,175,144,202,
+228,187,190,254,246,123,243,208,168, 4, 28,187,112, 27,148, 82, 28,217,242, 29, 0,160,223,232,133, 72, 76,201, 64, 7,191,198,
+ 24, 49,118,170,249,234, 37,179,119,217,219,219,215, 75, 79,255, 79,242,217,242,154, 6,150,195,129, 83, 55,144,148, 89,128,225,
+ 3,186, 66,163,213, 35, 61, 45, 5,191,253,188, 2,227, 71, 28,128,181,210,204,201,203,203, 43,170,124, 29, 81, 74,137, 88, 44,
+190, 26, 21, 21,245,121,101,229, 52, 24, 12,189,190,153,250, 5,214,110, 61,128,102,245,157,112,244,236,117,248, 55,173,139,147,
+ 23,110,163,109,115, 15,156,190, 20,140,182, 62,158,184,116, 51, 28, 83,198,126,138,233,147,175,246,170,201, 62, 90,188,116,181,
+ 85,126, 94, 42,142, 45,222,134,180,159,127, 70,236,196,137,104, 93,242,153,219,132, 64,236,234, 10,152, 87, 95,159, 47, 19, 25,
+ 25, 9,173, 86, 91,209,221, 61,154, 52,105, 82,237, 62, 42,141, 92,165,166,166,146,212,212, 84, 40, 20, 10, 18, 25,254,192,216,
+164,105,179,129,244,225,254,173, 0, 80, 28,185,202, 67,209,245,117, 80,223,248, 9, 98,143, 80,102,235,194,177,186, 47,190,219,
+ 20, 81,174,113,123,161,156,247,239,223, 47,171,159,182,109,219, 62,188,122,245,106,163,210,227,171,164,171, 80,204,178,108,131,
+210,110, 67,150,101,161,213,106, 49,100,200, 16, 65, 85,219,110,102,102,230,227,229,229,133,224,224, 96,140, 29, 59, 86,210,165,
+ 75, 23, 68, 71, 71,131, 16,130,145, 35, 71,194,219,219, 27,233,233,233,104,213,170, 21,174, 92,185,210,210,132, 99,222, 92,161,
+ 80,252,118,244,232, 81, 25,195, 48,200,207,207, 7,199,113,232,208,161, 3, 24,134,193,131, 7, 15,240,237,183,223,226,224,193,
+131, 56,124,248,176,153,159,159,223,111,132,144, 38,148,210,124, 19,246, 17,213,104, 52, 84, 42,149, 66, 42,149, 66, 38,147, 65,
+ 38,147, 65, 34,145, 64,173,103, 48,122,117,172, 86, 32,179,227,154,182,236, 88,111,228,164, 37,204, 15,115, 71, 93, 0,112,164,
+ 68,243,129, 41,215, 11, 3,165, 43,214,255,242,203,186,247, 80, 60,193,104, 95,126, 62,103,160,116,133, 41,231, 38, 0, 20,104,
+114, 81,215,203, 21, 7,246, 28,198,135,131, 63,168,208, 92,137, 68, 98,136, 69, 34, 88,216, 40,170,213, 20,137, 68,118, 33, 33,
+ 33, 86,229,175, 15, 44,203, 70,126,249,229,151, 94, 31,244,123,207,113,239,193, 99,130, 79, 6,247, 51, 58, 57,218,103,196,199,
+199, 70, 3,176,242,243,243,163,166, 30,243,148,210, 13, 45, 91,182,244, 61,116,232,208,168, 89,179,102,221,253,250,235,175,191,
+ 47,255,254,202,149, 43, 23,158, 56,113,162,110,255,254,253,183,223,187,119,111, 67,185,239, 45,127,211,141,221,223,145, 58,128,
+215,228,169,181,193, 42,223,248,228,229,229, 33, 47, 47, 15,241,241,241,216,180,105, 83,201,137, 44,130, 80, 40,132, 80, 40, 44,
+ 27,175, 80, 25,231,142, 94,249, 9,192, 79,126,126,126,162,176, 27,251, 78,206,216, 50,169,171,127,160,175, 32,248,124,216, 64,
+ 0,139, 0,244, 26, 62,124,184, 29, 0,108,219,182, 45, 3,192,201,255, 70,133, 80, 74,247, 61,126,252,120,138,179,179,115,217,
+ 24,148,242,221,132, 44,203, 66, 38,147,161,116,172,138, 86,171,197,206,157, 59, 89, 74,233,190,170,234, 47, 42,252, 2, 30,135,
+ 95, 44,254, 30,199,129, 51, 22,127, 95,163,209, 96,254,252,249,229,167,190, 98,220,184,113, 64, 13,214, 66,174, 44,114,213,238,
+113, 54,132, 66, 33,174,120, 22, 59,129,222,233,244,149,177, 90,175,116, 97, 72,100,211,122, 15, 24,102,195, 82, 65,153,185, 42,
+222,134, 98,195, 41, 17, 11, 97, 38, 21, 35,234,105, 28,220, 93,252,208,181,247, 7,214,231,142, 29,152, 6,160,194,176,155,222,
+200,161, 87,128, 31,126,222, 19,132,188, 2, 53,114,179,179,144, 30, 23,137,200,208, 59, 16, 10,133,184,123,247,174,185,133,133,
+165,185,167,167, 7,140, 28,135,107, 55,238,130,130,224,232, 95,135,188,234,122,120,226,255,216,187,234,240, 40,174,246,123,238,
+204,250,110,220,179, 9, 16, 72,136, 2, 81, 8,238,197, 41,238, 20,183,162,133, 34, 69,138,182,184,148,226, 80,164,180,184,187,
+ 20,119,146,160, 33, 36, 36, 1, 34, 27,247,108,214,119,230,247, 71,164,129, 70, 54, 41,223, 87,190, 95,247, 60,207, 60,187, 59,
+ 51,123,230,206,189,119,238,156,251,222,247,190,247,253,219,216,209,229, 8, 91, 78,179, 32, 31,228,103, 36,128,166,105, 52,245,
+119, 3, 77,211,104, 17,228, 1,154,166,209,188,161, 39, 56, 28, 14, 90, 55,246, 65,221,186,117, 81,236,231, 81,113, 25,253,129,
+168,151, 55, 74,137, 93, 22, 44, 0, 77, 82,210, 95, 95,148, 73, 73, 96, 77,237,170, 90,183, 48,123,246,236,236,164,164, 36,205,
+199,130, 78, 42,149,242,142, 31, 63,110, 81,217, 34,216, 18,137,196,135,195,225,132,103,102,102, 50, 98,177,152, 98, 24, 61,227,
+ 93,175, 62,125,231,183,165, 71,139,207, 89,178,100,233,209,254,129,102,125,247, 31, 57,203,242, 92,154, 19,194, 21,232,198,124,
+191,141,207, 17, 74,124, 12,236, 52, 80, 42,149, 10,175, 95,191,174,116, 81,110,150,101, 43,172, 80,114,185,124,120,159, 62,125,
+ 46, 79,152, 48, 65, 72, 8,193,237,219,183, 75, 4, 63, 77,211,136,137,137, 1, 69, 81,216,177, 99, 7, 84, 42,213, 4, 3, 44,
+129,211,142, 29, 59,102,206,231,243,145,151,151, 87,242,220,208, 52,141,136,136, 8,172, 89,179, 6,195,134, 13, 67, 92, 92, 28,
+164, 82, 41,102,204,152, 97,178, 98,197,138,105, 0,150, 24,112,235,207,212,106,117,144, 88, 44,134, 80, 40, 68,177,208, 2,128,
+208, 36,251, 23,177,177,177, 13,108,108,108, 28,108,111,158, 61,221,180,205,151,126,214,182,142, 77,138, 5,150,161,136,211,106,
+119,200,228,242,249,253,118,239,182,187,117,250, 52,243,226,244,233, 4,142, 94,191,221,224, 58,164,165,240, 62, 38, 1,129,129,
+129, 8, 13, 13, 69, 96, 96,224, 7,214,108, 62,159, 15, 30,143, 7, 30,143, 7, 27, 75,131, 92, 37, 88,154,166,145,156,156,252,
+193,190,177, 99,199,190, 31, 50,100,136, 29, 0, 36,201, 18,216,111,166, 77, 78, 76, 79, 79,103,237,237, 43,230,244,243,243,187,
+ 69, 81,148,203, 71,162,216,114,220,184,113,200,206,206,238, 50, 97,194,132,230,133, 86, 50, 42,113,243,230,205, 67, 1,128,207,
+231, 87,123, 8,218, 8, 35,254,231, 5,150, 33,168, 76, 96, 21, 35, 52, 52, 84,235,228,228,180, 51,234,201,187,118,110,190,174,
+ 16, 73, 4, 29, 8, 33, 63, 11, 4,130,233, 95,125,245, 21, 30, 60,120,128, 23, 47, 94,252,242,119,151, 61,105,208,160,193, 37,
+129, 64, 80,171,172, 99, 42,149,234,253,243,231,207,203,244, 21, 75, 77, 77, 93,248,232,209, 35, 84,228,228,222,191,127,255,210,
+ 47,163, 18, 39,247,114, 91, 48,134,133, 86,163,133,188, 64,241,231,203,187, 72, 96,201,229,114, 12, 24, 48,224, 3, 11, 86,106,
+106,106,181,238,185, 42,150,171,242, 64,209,116, 71, 95,191, 0,238,181,123,207, 62,120,185,246, 28,183, 12, 2, 30, 7, 98, 1,
+ 15, 66, 1, 23, 34, 1, 15,241,137, 41,240,242,170,207,187,121,233,108,199,242, 4,150, 86,199, 96,213, 47,231, 0, 0, 71,206,
+ 92, 67, 80,109, 49, 22,207,159,141,126,253,250,129,207, 23,226,216,177, 35, 88,179,121, 31,198,215, 42, 44,170, 70, 13,253,177,
+122,235, 65, 44, 93,178,152, 58,114,248, 72,115, 3, 94,184,224,112, 56,160,105,250, 47,159,197,223, 13,177, 70,178, 12, 11,205,
+199,101,196,176, 0,203,194,249,135, 31,224,252,195, 15,120, 84, 36, 78,125,228,114, 40, 20, 10,160,181,111,149,196,149, 90,173,
+134, 76, 38,211, 60,125,250,212,190,140, 23, 83,138, 90,173,174, 84,208,236,222,189, 59,114,228,200,145, 62, 86, 86, 86,225,207,
+158, 62,213,250,250,249,113, 63,246,193,242,240,240,200, 89,178,100,233,209,161,253,186,245,221,246,221, 64,221,248, 37,191,114,
+ 12,113,116, 47, 17,197, 26,205,219,246,237,219, 27, 36,241, 21, 10, 69,114,121,199,130,130,130, 70, 18, 66,126,240,240,240, 16,
+180,105,211, 6,183,110,221,194, 15, 63,252,192,232,116,186,116, 0,104,218,180,169,237,210,165, 75, 73,120,120, 56, 44, 44, 44,
+144,154,154,186, 55, 40, 40,104,105, 69,142,239,124, 62,191,117,195,134, 13, 41,149, 74,245, 23,113,181, 98,197, 10, 12, 26, 52,
+ 8, 30, 30, 30, 96, 24, 6,249,249,249,104,211,166, 13,119,227,198,141,173, 13, 17, 88, 20, 69, 77,109,215,174,221, 26, 20,206,
+ 34, 44, 45, 28, 95, 1,152, 89,100,221, 78,238,214,103,216,203, 22,237,123, 7,185,212,173,239, 88, 25,167,189,189,253,119, 20,
+ 69,245, 7, 64, 3,136,167,172,172,234,218,218,218,218,183,236,214, 13,249,132,208,219, 47, 94, 36, 28,145,200, 4,128, 65, 67,
+141, 74,173, 28,181, 92, 11, 93,249,250, 12,232,137,208,208, 80,244, 29,216, 11, 60, 30, 15, 28, 14, 23, 60, 46, 23, 92, 94,161,
+ 5,203,194,198,172, 90,237, 72, 81,231,145,152,155,155, 3, 44, 96,102,110, 94,108,201, 36, 0, 88,138,162,216, 10,234,185,251,
+254, 73, 99,237,120,102,230, 96,116, 90,212,252,178,111, 73,157,142,218,189, 69, 4,134, 17,229,199,189,197,212,235,143,184, 48,
+194, 8,163,192, 50, 12,165,157, 66,203, 66,219,182,109, 39,155,154,154,110, 44,106,120, 17,255, 32, 17,241, 15, 18,225,237, 89,
+175, 89,128, 95, 80,206,160, 65,131, 96,109,109,141,111,191,253,150, 5,240, 75, 85,175, 31, 19,249,210, 4, 0, 43,149, 74,191,
+ 45,178, 8,248, 61,122,244,200,246,241,227,199,104,216,176, 97,233,151, 7,154, 55, 47,255,189, 93, 52, 51,238, 27,148,227, 79,
+ 85, 77,171, 24, 52, 26, 13, 10, 10, 20, 80,171, 53,208,105, 25,232,116, 58, 4,214, 51,197,175, 59,230, 20,238,211, 21, 91,203,
+ 10,173,100, 2,158, 10,173, 26,215,208,130, 80,138,155,247,223, 87,216, 82,150,101,185,162,105, 26,119, 92, 11,255,214, 33, 73,
+107,176,208, 98, 25,189,167,131,189, 61,226, 46, 62, 4, 0,152,136,133,184,180,111, 41, 36,226,194,201, 13, 93,134,205,133, 72,
+192,131, 72,192,133, 70,163,129,189, 93,109,232,244, 90,207,114,133,183, 86,173,174,101,111, 14,199, 46,141,241,244,241,125,124,
+ 51,121, 12, 70,142, 28, 5,158,208, 20, 55,111, 94, 71,156, 44, 21,111, 18,178, 48,121,225, 22,104,117, 12, 52, 58, 61, 52, 90,
+ 61, 54,236, 61, 7,141,158,173,244, 37,207,227,241, 48, 99,198, 12, 81,121,199, 15, 30, 60,168, 48,188,140,180,144,203, 21, 80,
+169, 84,208,168,117,208,104,117,208,215,225, 97,233,252,193,208,105,116, 40, 24,216, 4, 26,173, 14,204,180, 94,208,168,181,136,
+ 23,115,168,230, 13,165, 90,128, 82,220,121,156, 96, 86, 25,127,177, 40,168, 72,128, 25,130, 98,145,229,235,231, 23, 62,188,107,
+163, 21,119,239, 63, 78,187,123,255,241, 95,206,115,173,215, 40,118,252,242,131,115,170, 34,174,128, 15,135, 11,255,102,189,255,
+254,198,141, 27,246, 38, 38, 38,136,140,140, 4, 77,211, 32,132,100,132,134,134,218, 3,192,162, 69,139,210,185, 92,174, 53, 77,
+211,152, 54,109, 26, 56, 28,142,237,215, 95,127,189, 0,192,166, 10, 58,114,222,166,166,166, 31, 88,175,120, 60, 30,230,204,153,
+131,161, 67,135,150,136, 43, 30,143,135,189,123,247, 34, 40, 40, 8,106,181,218,219,144,244, 38, 36, 36, 60, 6,208,194, 0, 1,
+ 66,138, 68,121,165,245,147,162,168,225, 79, 39, 76,168,171,124,244, 8, 95, 51,140,143,167,167, 39,148, 74,101,201,113, 55, 55,
+183,154, 9, 9, 9,201, 82,169,244, 55, 0, 91,100, 50,217,147,138,248,180, 74, 6,239, 99, 18,138, 59,171,104,212,168, 81,137,
+197,170,180,245,138,199,227, 65,196, 55,169,114,153, 49, 12,131,220,220, 92,122,239,222,189,117,124,124,234, 17, 0,240,246,174,
+ 71,206,157, 59, 95,211,196,196, 36,214,202,202, 74, 83,233, 51,105,102,142,171,163, 6, 0, 0,250,181,237, 84,108,197, 66,200,
+210,185,224,112,185,240,155, 62, 23,192,163,146,243,213,106, 53, 24,134,161, 97,132, 17, 70,129, 85,206,131,175,213, 86,120,124,
+221,186,117,104,208,160, 65,133, 47,160,141, 27, 55, 98,255,254,253,235, 88,150,141,169,234,245,187,181, 11,168,135,245, 39, 94,
+186,122, 20, 54, 10, 75,166,117,167,228,114, 57,238,222,189, 11,115,115,115,188,121, 99, 88,216,174,255, 68,152, 6,150, 5, 52,
+ 90, 29,228, 5, 74,168,213,106, 76,155,101,208,204,116,162, 81,231,113,186,118,106, 89,174,120, 40, 30,238,163, 40,170, 82, 31,
+172,202,134, 6, 63,176, 96,104,181, 40,126,117,228, 23, 40,209,118,240,119,120,116,106, 3, 0, 20,138, 43, 33, 23, 34, 62, 15,
+ 34, 62, 7, 20, 1, 8,202,231,214, 42,114,191, 92,191,116,214,237,173,191,252,234,220,179,229, 24, 76,158, 52, 25, 28,190, 24,
+150,214,182,208, 49, 44,106, 74,237, 16,157,152,133, 99, 63,207, 42, 26, 21,101,209,114,200, 34,172,155, 63, 6,171, 23, 86,110,
+196,228,112, 56,216,180,105,147,226, 99,171, 85,233, 79,182,242,247,224,159, 2,171, 64, 1,133, 82,133,111,191,219, 98,120, 25,
+117,108, 33, 50,228,228,138, 4, 84,101, 2,172, 44,145,101,200,243,235,215, 19,243,255,201, 6,134, 97, 24,156, 59,119,174,164,
+ 60,202, 43, 67, 67,173,173, 12,195,224,253,251,247,120,249,242, 37, 26, 55,110,140,156,156, 28,112, 41, 10, 51,158, 63,135,207,
+ 87, 95, 65,205,227,129, 97, 24,240,249,124,140, 27, 55,206,224,252,172,162,114, 44,242, 99,211, 87, 72,238,232,232,184,214,203,
+203,171,110, 76, 86, 22, 66,159, 62, 69,163,177, 99, 1, 0,119,238,220, 41,109, 1,196,224,193,131,249,177,177,177,163, 34, 34,
+ 34, 70, 57, 58, 58,174, 75, 74, 74,154, 81,238,243,196,170, 74,124,176,250, 15,238,131,186, 94,117,176,127,207,129,146,227,211,
+103, 78, 5,151,203, 3,151,199,133,133,185, 69,149,111, 45, 55, 55,151,179,118,237, 58,223,224,224,198,162, 33, 95,141,160, 52,
+ 58, 22, 75, 87,110,160, 15, 31,248,213,122,223,175,251, 69, 66,161,240, 85,165,101,164,213,252,165,157, 34,132,128,195,229,130,
+195,231, 1, 12, 3,150,101, 37,171, 87,175, 94,242,242,229,203,134, 94, 94, 94, 80,169, 84, 95, 17, 66,194,140,113,176,140,248,
+ 87, 9, 44,154,166, 43,181, 78, 81, 20, 85,233, 16,225,244,233,211, 97,106,106, 90,222,139,135,125,254,252,121,120, 82, 82,210,
+ 14,150,101,171, 21, 23,231,236, 31, 97, 47, 23,127,211, 43, 15,128, 2, 0, 44, 44, 44,210,219,182,109,155, 15, 64,115,248,240,
+225, 15,206, 85,169, 84,239,203,227,177,179,179, 91,188,106,213,170, 41,157, 59,119,166, 40,138,250, 75,227,254,241,166,213,106,
+113,230,204,153, 41,203,151, 47, 71,121, 86,175,226,151,119,129, 92, 1, 69,145,131,115,244,139,163,134, 54,230,149,158,242,204,
+207,169, 76,203,213, 23, 50, 13,104,154,198, 5,187,194,251,232,146, 86, 57, 23,161,232,200,183,239,227, 27, 57,216, 88, 32, 43,
+ 39, 31, 2, 62, 23, 34,193,159,214,124,145,176,208,122, 37, 18,112, 97,105, 97,138,140,140, 20,112,185,220,200, 10,132,195,123,
+ 66, 72,139, 1,189,186, 92,166,104,142,176,244, 49,174,200, 76,124,229,238,115,203,148, 76, 57, 74, 27, 3, 24,134,197,148,165,
+123, 12,171,192, 28, 14, 38, 78,156, 88,174,192, 57,125,250,116,149, 45, 88, 10,101, 21,203,200, 64,254,138,134, 0, 43, 59, 94,
+ 25,138,103, 23, 74, 36, 18,159, 34,241,101, 48,252,252,252, 46,136,197, 98,131,131, 28, 25, 26,116,148, 16,178,164,109,219,182,
+ 63, 56, 59, 59,219, 77,152, 48,129,208, 52,141,160,160, 32,155,239,191,255, 62,167,208, 50,226,109, 90,220,198,172, 95,191, 30,
+175, 94,189, 74, 35,132, 44,173,136,147,207,231, 71,152,155,155, 7,181,105,211, 6, 57, 57, 57,136,143,143,135, 68, 34,129,207,
+218,181,120,254,245,215,240,219,182, 13, 84,219,182, 32,132,128,207,231,227,249,243,231, 16,137, 68, 17,229,241, 57, 57, 57, 5,
+179,133, 78,230,205,240,231,176, 32, 11,224, 46, 33,100, 86, 98, 98,226,195, 50,218, 59, 10, 0,244, 12,195, 86,114,255,131,191,
+251,238, 59, 80, 34, 17, 28,155, 52,129, 34, 38, 6, 26,141, 6,141, 27, 55, 46,177,170, 55,110,220, 24, 52, 77,163,110,221,186,
+176,178,178,194,241,227,199, 7,227,195,153,213, 31, 64,153,175,193,251,152, 4, 52,105,210,164,196, 82,213,181,107,215, 18, 11,
+ 22,151,203, 45,177,100, 17,125,229,130,149, 16,194,126,212, 22, 19, 62,159, 39, 24, 54, 98, 20, 53,235,219,111, 24,173, 78,203,
+208, 52,151,250,118,254,114,234,205,235, 23, 2,185, 92, 78,145, 74,122,107, 53,123,244, 67,191,118,133, 70,208, 99,117,109, 65,
+ 23, 9,171, 30, 47, 18, 74,202,197,236,236, 31,252, 21, 43, 86,244,245,242,242, 42, 28,110, 7, 56,198, 56, 88, 70,252,155, 4,
+ 86,212,211,167, 79,221,235,213,171,135,184,184,184,191,204,108, 43,126,198, 36, 18, 9, 68, 34, 81,177,133, 40,170, 60,178,107,
+215,174,253, 12,224,231,226,223, 82,169,180, 73,155,254,173,239, 53,234,212, 16,191, 47, 63,144,147,148,148,228, 91, 28, 19,139,
+ 16, 66,164, 82,233, 80, 46,159, 51,192,181,126,205, 86, 96,152, 85, 87, 79,223, 89, 84,209,141,184,122,212,203, 7,160, 40, 53,
+139,112, 77,117, 50,132, 16,210,175,115,231,206, 84,120,120, 56, 6, 12, 24,128,253,251,247,151,123,238,208,161, 67,113,240,224,
+ 65,116,236,216,145, 90,177, 98, 69,191,202, 4, 86,161,117, 68,253, 31, 43,204,178, 44, 87, 31,139,196, 74,133, 0,163,187,250,
+252, 73,168,191,111, 80, 83,238,187,132, 20, 8,249, 28, 8, 5,127,206,216, 23, 21,249, 95,137, 4, 92, 56,216, 90,226,209,189,
+ 27, 26,157, 78,123,181, 18,113,241, 30,101, 4,105, 20,152,218, 68,126,209,172,129,101, 89,255, 89,251,221, 87,104,112,104,109,
+165,233,229,114,185,216,189,123,183,162, 60,235,149,161,121, 80,104,101,212,162,160, 64,129, 2,133,242,147,149,137,189,189,189,
+173,157,157,221, 86, 11, 11, 11, 97, 89, 2,234,227,227,127, 71, 92, 21,197,197, 10, 31, 57,114,100,149, 68, 22,159,207,175,125,
+247,238,221,146, 32,163, 21,125,170,213,106,244,239,223,223, 32,203,119, 72, 72,200,238,128,128,128,104, 91, 91,219, 43, 62, 62,
+ 62,130,232,232,104, 44, 91,182,140,112,185, 92,179,226,246, 35, 47, 47, 15, 52, 77, 35, 43, 43, 11,132,144,225, 33, 33, 33, 23,
+ 43,226, 84,169, 84, 55,111,222,188,233,223,189,123,119, 58, 34, 34, 2, 52, 77, 23,166,171, 73, 19,248,109,219,134, 23,223,124,
+131, 86,239,222, 65,169,209, 64, 40, 20,226,210,165, 75,154,130,130,130,155, 21,220,251,142,251,247,239,215, 19, 10,133,208,104,
+ 52, 96, 24, 6, 20, 69, 17, 14,135,211,220,199,199,103, 35,128,134, 31,117,192,236,198, 77, 95,233,169,215,233,244, 73,113,209,
+105, 6, 88,132,176,127,255,126, 52,110,220, 24,173, 90,181, 66, 98, 98, 34, 98, 98, 98,208,165, 75,151,146,115,158, 62,125,138,
+176,176, 48,184,185,185, 85,110,193,163,180,112,243,172, 13, 30,143, 7, 46,151, 11, 30,183,240,179,112, 43,180, 92,241,184, 60,
+112, 57, 92, 8, 69, 66, 3,181,255,135,117,210,188,200,242, 37, 22,139,152,186,117,235,134,191,137,142,241, 1, 11,202,204,204,
+220, 32, 95,219, 98, 62, 66, 72,137,184,226,242,121, 37,150, 44, 0,200,201,201, 81,246,236,217,243, 55,149, 74, 53, 2,159,112,
+ 36,197, 8, 35,254, 87, 4, 86,151,209,163, 71,111,235,208,161, 67,187, 25, 51,102,192,196,196, 4, 73, 73, 73, 37, 15, 24,159,
+207, 71,141, 26, 53, 80, 80, 80,128, 91,183,110, 33, 59, 59,251, 26,128,113,134, 94, 56, 41, 41,233,193,155, 39, 81, 25,109,250,
+ 54,181,174,215,212,211, 34, 62, 42,161, 49,128,123, 69,226,234,151, 65,211,187,140,104,211,187, 17,120,124, 46,226,223, 36,255,
+215, 50,132,162, 40,154, 16,130, 1, 3, 6, 24,116,254,192,129, 3,113,243,230, 77, 84, 52,156, 88, 98,193, 42, 80, 66,174,248,
+116,157, 51, 66, 8,244,122, 61, 26, 71,102,126, 48, 51,171,216,114, 85, 44, 44, 12,177, 92,149,244,144, 11, 10, 86,223,190,122,
+106,172, 87,125, 63,219,198,254,238,120, 19,155,128, 85,115,199,148, 28,255,118,252, 32,236, 61,116, 26, 78, 14, 54, 80, 22,228,
+225,226,249, 51, 57,185,185,185,171,171,123, 15,251, 78, 22,198,129,108, 49,248,195, 57, 2, 3,190,249,201,160,255,115,185, 92,
+140, 24, 49,162, 92, 11,214,149, 43, 87, 20,134, 12,143,178, 44, 11,141, 90,139,124,185, 2,138,130, 79, 35,176,164, 82,169, 95,
+227,198,141,175,108,223,190,221,218,198,198, 6, 50,153,236, 3,129, 37,149, 74,253,130,131,131,175,108,223,190,221,218,214,214,
+ 22,241,241,241, 6,135, 7, 41, 67, 92, 33, 45, 45,141,100,101,101, 49,150,150,150, 85, 18, 89, 20, 69, 65,165, 82,225,213,171,
+ 87,134, 62, 35, 6,207,248, 50, 49, 49,217,179,124,249,114, 65,106,106, 42,104,154,198,171, 87,175, 62,168,171,197,219,119,223,
+125,135,185,115,231,110, 5, 80,171, 34, 62,157, 78,183,110,232,208,161,163, 18, 19, 19, 45,237,236,236,144,148,148, 4, 62,159,
+ 15,150,101, 65,218,180, 65,139,216, 88,104,244,122,136, 68, 34, 68, 70, 70, 98,199,142, 29,114,149, 74,181,174, 44, 46, 55, 55,
+ 55, 62, 69, 81,238, 60, 30, 15, 67,134, 12,249,176, 94,238,219,135, 38,181,178,130,198,126, 33,200,215, 65,168, 74, 17,117,190,
+ 64,211, 52, 25,247,237, 42,143,224,150, 93,235,191,126,241, 48, 58, 45, 37,225,110, 37,183,175, 85,171,213,240,242,242,194,227,
+199,143,113,245,234, 85,180,109,219, 22, 45, 91,182,196,141, 27, 55, 16, 18, 18,130,176,176, 48, 16, 66, 96,109,109, 93,236,102,
+ 81,161,175,133,186, 64,135, 84, 89,198, 95,172, 85, 31,255,230,241,120, 80, 41, 52, 6,149, 81,105,209, 68, 8,129,149,149,149,
+106,195,250,213, 2, 19, 19, 19, 61, 0,152, 72,196,250,195,251, 54,195,198,218, 74,197, 26,104, 98, 45, 25, 22, 44, 18, 87, 52,
+151,251,129,155, 2,203,178,121,207,158, 61, 27, 75, 8,121, 70, 8, 41,110, 63,140,113,176,140,248,119, 8,172,208,208,208, 88,
+ 0,237, 3, 2, 2, 6,223,186,117,107,221,244,233,211,109,155, 55,111,142,204,204, 76,212,170, 85, 11, 82,169, 20,143, 31, 63,
+198,211,167, 79,211, 89,150,157, 17, 18, 18,178,191,140,135,172,125,121,177, 50, 88,150,101,165, 82,233, 17, 85,126,254,215,129,
+173,188,113,237,240,237,229,142,142,142,227,156,156,156,166, 13,159,219, 99, 68,235,158, 13, 17, 25,246, 22, 15, 46, 63, 71, 74,
+ 92, 58,134,183,152, 85, 33,231,199, 78,238, 22, 22, 22,163,196, 98, 49, 31,128,166,140, 94,240, 7,179, 8, 75,115, 50, 12,163,
+ 87,171,213, 56,116,232,144, 65, 34,235,192,129, 3, 80, 42,149, 96, 24, 70, 95,222,189,235, 25,134,112,184, 2, 72,107,120, 65,
+163,145,131, 97, 12,159, 32,201, 86,146,159, 58,157, 14,139, 23, 47,198,204,153, 51,177,116,105,249,163, 43, 28, 14, 7,155, 55,
+111, 70,101,101,148,153,153,153, 39,149, 74,135, 30,220,245,211,209, 33, 99,166,152, 58, 55,245,197,158,195, 23,160,213,104, 32,
+ 16,112, 97,105, 38, 65,221,218,206, 80, 43,229,216,182,105,125,174, 82,161, 24,250,177,239, 89, 69,229,254, 49,134,245,108,137,
+ 21, 59, 78,225,246,239,127, 78, 66,108, 49,120, 33,126, 91, 61, 9, 1, 1,187, 43,228,212,235,245,224,112, 56, 56,120,240,160,
+162,172,217,131, 52, 77,131,203,229,150,107,193,250,176,140,244,132,203, 19,162, 70, 45, 31,168, 85,249,159,164,140,172,173,173,
+103,238,218,181,203, 90,169, 84,226,245,235,215,120,245,234, 21, 8, 33, 37, 42,166,248,120, 65, 65, 1, 94,188,120, 81, 44,112,
+ 94, 85,229, 57, 42,182, 92,165,165,165,145,164,164, 36,136,197, 98,234,217,179,103, 74, 95, 95,223,240,138,158,239,210,156, 42,
+149,234, 93,187,118,237,202,179, 24, 57, 9, 4,130, 15,102,124, 21, 7, 29,253,120,168,176,172,116, 22, 20, 20, 60, 95,183,110,
+ 93,157,134, 13, 27, 98,251,246,237,106, 83, 83, 83,254,244,233,211, 89,154,166,201,134, 13, 27,144,149,149,165,158, 51,103, 14,
+255,246,237,219,144,203,229, 79, 42,187,119,150,101,243, 8, 33, 99,155, 54,109,186,239,226,197,139, 98,119,119,119,228,230,230,
+130,101, 89,236,221,187, 23,147, 38, 77,130, 80, 40, 68,100,100, 36,190,252,242,203,130,130,130,130,177,165, 99, 96,149,230,212,
+233,116,132,203,229,178, 12,195, 96,193,130, 5, 37, 65, 69,139,131,140,138,120,122,236,152,238, 42,153,186, 51, 71, 50,248,251,
+157, 95, 1,128, 94,167,211,191,126,241, 48,122,239,166,239,175,243,120,188, 91,165, 56,235,127, 28, 11,139, 16, 50,239,199, 31,
+127,220,218,172, 89, 51,145,137,137, 9,220,221,221,113,247,238, 93,220,189,123, 23,183,111,223, 46,174, 3,176,178,178, 66,118,
+118, 54,226,227,227, 21,132,144,121, 21,229, 39, 95,204,133,171, 71,237,194,217,130, 69, 22, 43,110,169,217,131,165,173, 89, 60,
+ 46,183,210,231,253, 99,247, 14, 43, 43, 43, 93, 96, 96, 64,184, 66,161,160,139,181,148,141,141,205,139,162,115,217, 26, 53,106,
+168, 63,170,242,127,225,140,218,181, 25, 33,203,230, 21, 14, 11, 62,143, 47, 17, 91,215,191, 8, 0,135,199, 67,141,110,125, 74,
+191, 7,182, 16, 66,118, 23,125, 87,149,226,156,253,169, 99, 97, 85,165, 93, 50,114,254, 51,156,255, 38, 11, 22, 0, 32, 44, 44,
+236,247,250,245,235, 95, 88,177, 98,197,138, 19, 39, 78,140,153, 50,101, 10, 49, 51, 51,195,145, 35, 71,216,140,140,140, 61,124,
+ 62,127,230,253,251,247,179,170,115,113,150,101,247,220, 56,126,111,194,176, 57, 61,201,244, 13,195,155,135,252,241, 34,162, 65,
+ 83,119, 52,104,234,142,144,107,225,216, 52,247,192,126,189, 86,191, 32, 41, 41, 41,174, 18, 42, 85,251,102,158, 31, 59,185, 91,
+223,188,254,135,117, 85,103, 17,178, 44,123,228,196,137, 19, 83,186,116,233, 66, 61,122,244,232, 47, 62, 87,197,203,227, 48, 12,
+131, 43, 87,174, 64,163,209,224,200,145, 35, 76, 69,113,176, 24,176,167,182,109, 89, 61,108,219,174,227,124, 62,143,224,254,173,
+ 99,200,201,170,216, 42,199,227,113,241,219,129, 83, 26, 14,135,126, 93, 65, 90,223,135,133,133, 89,175, 90,181,138, 38,132, 96,
+203,150, 45,160, 40,170, 92,135,246, 23, 47, 94, 48, 90,173,182,210,178,146,201,100, 87, 28, 28, 28, 6,110, 89,183,120,111,155,
+142, 61, 44,188,189,124, 56,118,118, 53,193,161, 9,178, 50,210, 17,242,224,182,238,226,185, 83,217, 42,149,106,184, 76, 38,187,
+242,119, 42,224,242,237, 39,203,220,223,103,202,186,202,172, 40, 58,173, 86,203,145, 72, 36,208,233,116,101,134,106,104,219,182,
+173,232,238,221,187, 10,141, 70, 3,154,166, 43, 84, 76, 12,240,201,203, 72,175,215,123,103,101,101, 65, 46,151, 35, 52, 52,148,
+221,180,105, 83, 90,118,118,246,220,210,199, 51, 51, 51,145,151,151,135,144,144, 16,118,251,246,237,105,185,185,185,115,171,146,
+127,197,113,177,178,178,178, 24,177, 88, 76,105,181, 90,173,175,175,175, 80, 34, 49, 44,230, 21, 0, 60,121,242,164, 83,121,199,
+154, 53,107, 22,117,247,238,221,186,122,189,190,244, 26,133, 60,165, 82,233,222,163, 71, 15,142, 1,233, 27,124,249,242,229,223,
+111,223,190,221, 64,165, 82,141, 74, 77, 77,221, 7,160, 38,135,195,193,155, 55,111,210,212,106,117,159,121,243,230,237,145,203,
+229,207, 77, 76, 76, 6, 27,216,110, 92, 36,132, 12,241,246,246,222,189,120,241, 98,147, 86,173, 90,113,164, 82, 41, 26, 54,108,
+136,200,200, 72,156, 59,119, 78,187,101,203, 22,121, 65, 65,193, 72,150,101,175, 84,208,233, 96, 1, 16,157, 78, 7, 62,159, 95,
+178, 9, 4, 2,240,120, 60, 20,168, 41,140, 94, 27,163,208, 65,164, 88,183,104,236, 57, 22, 32,201,241, 49,233,169,201,241, 15,
+ 9, 33,183,100, 50, 89, 78,121,150, 49,165, 82,233,207,178, 44, 39, 55, 55,119,131, 74,165, 26, 62,125,250,116,199, 85,171, 86,
+193,215,215, 23,233,233,233,176,178,178,130,163,163, 35,242,243,243, 17, 27, 27,171,215,104, 52,219,244,122,253,146,148,148,148,
+ 10,135, 29,179,211,115,225,236, 80,243, 3, 75, 39,203,178, 96,245,128, 86,165,135, 94,195, 66, 77,180,224,114,181, 48,112, 9,
+ 45, 86,167,211,161, 91,183,110, 56,123,246, 44,122,246,236,201, 2, 40,215,138,116,246,236,217,202,135,220, 25, 6, 92, 1, 31,
+ 28,222,159,195,130,133,214,172,194,125, 20,249, 75,121, 26,173, 86, 70,252, 59, 5, 86,209,139, 57, 27,192,184,134, 13, 27,238,
+155, 60,121,242, 89,134, 97,184, 12,195,116,125,242,228,201,237,191,115,241,164,164,164, 80,169, 84,250,157,189,179,229,138,206,
+ 67,155,195,211,191, 22,244, 58, 61,238,158,127,130, 61, 63,158, 60,152, 24,159, 56,188,244, 90,133,229, 63,207,204,245,102, 65,
+158, 20, 0, 94,169,225, 23,166, 58,179, 8, 83, 83, 83, 23, 46, 91,182, 12, 63,252,240, 67,149,103, 17,150,119,206,189,199,137,
+227,154, 4, 57, 58, 15,236,211,182, 35, 69, 40, 86,165, 86, 85,208, 43, 0, 91,236, 21,193,225,208,175,111, 62,136,247, 45,239,
+220,228,228,228,118, 19, 38, 76,248,131,162,168, 90,165, 77,243,229, 65,175,215, 39,101,100,100,116, 48, 36, 31,146,147,147, 47,
+ 56, 59, 59,123,220,188,120,234,187, 59, 87,207,183,214,235, 53,110, 4, 4, 60, 30, 47, 90,171,215,221,208,170,213,203, 19, 18,
+ 18,178,254,110, 5,252,110, 92, 79,188,151,165,131,195,161, 11, 3,123, 22, 21,247,177,141,211, 17, 16,240, 91,185,255, 19, 8,
+ 4, 23,118,239,222,221,109,216,176, 97,164,216,239,140,101,217, 15, 26,244,135, 15, 31, 42,212,106, 53,246,236,217,195,138, 68,
+162, 10, 3,215,126, 88, 70,132, 85, 85,224, 15,101,104, 25,229,231,231,143,236,209,163,199, 94, 0, 2, 0,111,114,114,114,198,
+203,100,178,132,210,199,123,246,236,185, 23,128,128, 16,242,151,227,134,160, 56,100,131,165,165,101,120,145,229, 74, 88, 29, 71,
+247, 10,234, 55, 93,222,240,161, 33, 67,133, 69,107, 11,246, 46,254, 29, 20, 20,180,100,194,132, 9, 37,139, 61,135,133,133,221,
+ 1,224, 90,141,206,217, 21, 66, 72,189, 5, 11, 22,124, 35, 20, 10,219, 20, 20, 20,120, 20, 9,186, 72,149, 74,117, 93,161, 80,
+172,103, 89,182,194,216, 82,209,209,209,234, 58,117,234, 68,234,116,186,250,182,182,182,224,112, 56, 37, 34, 11, 0, 30,196, 89,
+133, 36, 38, 38, 54,172,106,218,206,159, 63,239, 98,105,105,217,129, 16,210,151,101, 89,207,188,188, 60,213,247,223,127,127,239,
+230,205,155,185, 17, 17, 17,157, 90,180,104, 65, 28, 28, 28,240,246,237, 91, 54, 63, 63,255, 40, 69, 81,243,100, 50, 89,140, 1,
+247,156,176,103,207,158,170,230, 83,133,245, 73,173, 86,167,221,191,127,223,234,234,213,171,180, 94,175,199,197,139, 23, 75, 58,
+146,101,141, 6,198,196,196, 64,173, 86, 87, 56,134,174,201,201,130,239,212,217, 96,139,102,115, 22,163,102,215, 62, 32, 96,193,
+170,141,122,202,136,127, 7,200,127,100, 26,115, 21, 77,136, 82,169,116,128, 80, 34,152, 88,203,195,209, 87, 22,147, 26,158,151,
+ 83,176, 63, 41, 41,105, 59,203,178,250,234,114, 86, 37,208,168,209,204,251,207,112,242,197,102,151, 8,205,171, 85,238,203, 65,
+175,121,175, 46,200,237, 88, 22,103,112,112,176, 19,143,199, 91,173, 82,169, 58, 87, 20,165,157,166,105,157, 72, 36,186,160, 84,
+ 42,103,126,188,216,243,255, 98,126, 30, 61,122,180, 76,209,111,232, 44,194,190,125,251,234,171,146, 78, 63, 63,191,235, 98,177,
+184,204,128,154, 5, 5, 5,113, 79,159, 62,237,240, 57,228,103,241,204, 54, 67,124,132, 74,115, 86,103, 22, 97, 57,156, 37, 67,
+132, 46, 46, 46, 2,141, 70, 19, 0,192, 3,128, 5,128, 76,173, 86,123, 49, 45, 45, 45,197,193,193, 33,136,162,168, 5, 69,226,
+117,105,114,114,114,200, 63,249,108, 58, 59, 59, 11,205,204,204, 86, 83, 20,229,104,200,255, 25,134, 81,167,166,166, 78, 79, 79,
+ 79, 79, 46,139,179, 94,189,122, 33, 52, 77, 87,186,168,185, 94,175, 79,120,249,242,101, 80, 5,233, 52, 14, 17,254, 11, 57,255,
+149, 22,172,255, 52,100, 50,217, 33, 0,135, 62, 37,103,121,145,218,141,248,124, 80, 44,158,170,131, 34,177, 52,240,223,150,103,
+197, 2,169,140,253,175, 0,144, 79,125, 61, 67,194, 49,124, 14, 96,171,217, 83, 44, 18, 80, 45, 62,101, 90,222,189,123,167, 2,
+112,175,104,251, 0, 69,130,170,251,231,146,111, 9, 9, 9, 74, 0,147, 62, 21, 95, 69,162,201, 8, 35,254,109,160,140, 89, 96,
+132, 17, 70, 24, 97,132, 17, 70, 24,241,105, 65, 0,180, 47,167, 71,104,176,233,143, 16,210,190, 26, 61,206,171, 70, 78, 35,167,
+145,211,200,249,255,132, 51,181, 2,206, 23,149,112,214, 47,231,144,221,255, 80,126,250,151,195,185,178, 18,206,217, 21, 28,126,
+ 98,172,159,255, 63, 57,255, 53, 40,118,102,252, 79,108, 0,218, 27, 57,141,156, 70, 78, 35,167,145,211,200,105,228, 52,114,254,
+219, 54,227, 16,161, 17, 70, 24, 97,132, 17, 70, 24, 97,196, 39,134,193, 2,203,196,193,219,219,214,197,111,175, 85, 13,223,103,
+ 86, 53,124,159,217,186,248,237, 53,113,240,246,254, 55,102,154, 84, 42, 21, 57, 58, 58, 14,174, 89,179,230, 21,127,127,255, 92,
+ 39, 39,167,111,140, 85,169,234,104, 77, 8,103, 32, 33, 19,135, 17, 18, 55,140,144,184,129,132, 76,108, 77,200,255,187,101, 51,
+ 22, 79,149, 54,185,125,113,200,133,197, 83,165, 77,202, 60,254,173,212,250,225,149,254, 63, 45,159,228,100,245, 41,174, 71, 8,
+ 49,181,183,183,223,225,224,224,240,206,222,222,254,189,189,189,253,110, 66,136,185,177,198, 25, 97,132, 17, 70,252,247, 96,208,
+203,204,170, 86,131,209,222, 94,158, 51,151, 45,154, 75, 28,236,108,196, 58, 61,163,121,251, 46,222,103,225,178, 21, 71,173,106,
+ 53, 88,151,249,254,249,174,106,188, 4,136,179,179,243, 0, 46,151,219, 13, 64,177, 80,123,165,213,106,207, 38, 36, 36, 28, 50,
+116, 86,144,175,175,239, 29,154,166,107, 86,229,218, 12,195,188,123,250,244,105,203,234,100,152,147,147, 83, 63, 39, 39,167,221,
+141, 27, 55, 22,251,251,251,131,199,227, 97,213,170, 85, 51, 0,172, 55,248,222, 91,183,230,216,101, 91,125, 69,115, 56,221, 1,
+248,178, 44, 0, 66, 63, 99, 52,234,243,169, 60,171,189,108,232,118,173, 33, 60,142,142,142,115, 9, 33,195, 81, 56,173,124,151,
+ 76, 38, 91,253,159,168, 36, 82,169,180, 6, 33,164, 13,203,178, 94, 20, 69, 61,103, 24,230,178, 76, 38,203,248,187,188,246,192,
+184,166,205,155,255, 52,108,198, 12, 90,113,235, 22,126,218,189,123, 3,114,115, 1, 96,115, 85,235, 82,112,176,127, 95, 83, 83,
+116, 35, 64, 0, 8, 8, 5,246, 73,102, 54,117,254,241,227,176, 67,134,196, 82, 43, 15,129,129,129,231, 0, 20, 47, 28,119, 62,
+ 52, 52,180,107, 85, 57,114,162,217,249,130,238,222, 45,114,162,175,207, 7,208,249,227,227, 58,165,112, 24, 75,215,232,166, 96,
+195,226, 1,172,253, 59,121, 74, 8, 17,219,218,218, 62, 59,117,234,148,115,163, 70,141, 56, 0, 16, 18, 18,242, 85,183,110,221,
+218, 22,133, 18,200,253, 39, 26,154, 38, 77,154, 88,234,116,186,125, 52, 33,141, 25,134,177, 0, 0,138,162,178,245, 44,251,128,
+195,225, 12,171,110,176, 98, 35,140, 48,194,136,255, 89,129,101, 98,239,229, 83,175,158,247,140,139, 39,246,213,200,206,204, 86,
+254,188,102, 95,168,156,195, 47,112,247,113,231,253,188,126,181,229,196,169,211,167,153,216,123, 61,204, 79,137, 8, 55,244,162,
+142,142,142, 53, 93, 92, 92,142,207,157, 59,183,126,243,230,205,185,118,118,118, 72, 73, 73,193,235,215,175,235,223,189,123,183,
+231,201,147, 39,103, 56, 58, 58,246, 54, 32,130, 59, 36,124, 94,157, 67,171,150, 59,240,205, 45,192,234,117,176,172,239, 95, 56,
+254,201, 48, 72,190,121, 21,122,141, 6, 44,163,135,115,167, 47,139,197, 21,130,131,131,121,213,201, 44,103,103,103,169,135,135,
+199,254, 57,115,230,240,212,106, 53,194,194,194,112,255,254,125, 38, 53, 53,117,133,193,162,162, 65, 47, 31, 7,142,195,209, 30,
+ 61, 59,187,116,253,194,142, 95,203,193, 22, 44, 35, 68, 68,172,166,230,149,219, 97,157,206, 93,184, 52,203,206,167, 87,159,212,
+240, 19,207, 43,226,169, 95,191,126, 99,138,162,126, 72, 76, 76, 44, 22, 65,171,130,131,131,191, 47,125,206,199, 26,149, 97, 24,
+112, 56,156,148,130,130,130, 1, 47, 94,188, 8, 43,139,119,120, 0,209,106,245,133,245,130,199,129,254, 90,154,243,137,246,237,
+219,215, 30, 57,114, 36, 2, 2, 2, 16, 18, 18,210,230,200,145, 35, 83,107,212,168,241, 88,171,213,158, 23, 8, 4, 55,138,166,
+165, 87, 25, 60, 96,214,176, 25, 51,104,147,119,239, 96,242,244, 41,134,228,230,114, 86, 2,179,170, 34,176, 2, 3, 3,235,116,
+104, 31,112,180,103,239, 86,222, 14, 14, 62, 60, 46,215, 6, 44,203, 66,171,205,244, 72, 75,123,213,215,220, 28,115, 26, 53,106,
+212,231,209,163, 71, 6, 69,154,109,216,176,161, 61,195, 48,219, 88,150,229, 17, 66, 38, 3,232,114,241,226, 69,232,245,122,116,
+237,218,181, 75, 96, 96, 96, 29,150,101,127, 54, 49, 49, 97, 21, 10,197,168,199,143, 31,167, 84,100,185,202,141,102,231, 39, 19,
+215, 78,158,129,195,144, 76, 46,118,154,222,217,241,130,153, 27, 89,182,240, 39,217,125, 0,232,236,230,102,234,234, 37,153,109,
+ 98,214,192, 42, 55,241,234,236,206,110,110, 59, 47, 68, 71,231, 85,167,195, 82, 84, 15, 86,255,250,235,175, 53,130,131,131, 75,
+226,101,249,251,251,211,171, 87,175,118,250,230,155,111, 54, 0, 24, 97,160,168,246,176,182,182,190,196, 48,140,234,229,203,151,
+ 30,197,251,237,252,122, 55,181, 54,149,180, 75,203,202,187,149,254,242,228, 77, 67,184,130,130,130, 70,242, 40,106,199,250, 5,
+147,104,175, 6,126, 16,219,218, 66,147, 32,131, 92,175,181,122,240,244,101,215,149,235,119,164, 5, 5, 5,141, 13, 9, 9,217,
+109,108,146,141, 48,194,136,127,141,192, 18, 8,248,115, 22,206,155, 77,178, 51,178, 21,202,220, 60,181, 86,169, 84, 82, 60, 86,
+249, 60, 60, 54,149,226,208,217,223, 76,157, 98, 58,231,187,121,115, 0, 12, 49, 84, 92,121,121,121, 61,218,185,115,167,157,149,
+149, 21,114,114,114,144,145,145,129, 71,143, 30,129,101, 89,116,238,220, 89,224,215,160,126,192,186,245, 27,238, 59, 58, 58, 54,
+169, 76,100,113,184, 28,194, 21,139,113,172, 85, 0, 40, 30, 15,125, 34,146, 10,197,133, 86,131, 11, 3,186, 1, 0,104, 62, 31,
+253,163, 10, 39,249, 8,133,194,106,103, 22,203,178, 77,154, 53,107,198, 3,128,233,211,167,231,202,229,242,229,132,144,223,101,
+ 50, 89,162,161,226,202,198,214,246,230,154,101, 99,172,234,215,113,133, 70,171, 69,124,106, 34, 88,194,135,163,157, 4, 67,123,
+249,243,154, 7,241, 93,215,108,190,122,195,190,126,143,150, 41, 47, 78,189, 44, 87, 88, 74, 36,251, 54,108,216,128,195,135, 15,
+ 3, 0,174, 95,191, 14,119,119,119, 73,101,105,120,253,250,181,235,240,225,195, 15, 2,168, 91,214,113,173, 30,156,223,127,255,
+ 29, 0,176,246,219,193,244,230,219,145,181, 69,162, 63,215, 82,110,213,170, 21, 90,181,106, 69, 45, 95,190, 60,248,250,245,235,
+193, 7, 15, 30,212, 56, 57, 57,109, 72, 76, 76, 60, 82,157, 60, 85,220,186, 5,147,167, 79,129,155, 55,171,252,223,192,192,192,
+ 58, 94, 94,214, 15,214,173,253,222,230,204,217,151, 88,179,102, 55,162,163,163, 1, 0,174,174,174, 24, 60,168, 31,247,247,223,
+182,213,155, 51,103,209,189,192,192,192,230,161,161,161,149, 70, 55,103, 24,102,219,183,223,126,251,165,147,147, 19,230,207,159,
+ 31, 89,167, 78, 29,152,153,153, 97,251,246,237,176,180,180,132, 86,171,141, 92,181,106, 21, 71, 38,147, 97,227,198,141,191,148,
+178,110,253, 5,173, 59,182,158, 47,232,238,221,194, 51,112, 24, 76,204, 28,177,243,192, 33,188, 14,221,215, 66,165,121, 53,127,
+249, 36,167,161, 10, 86, 48,220,217,221,116,142, 75, 80, 43,235,186,245,190, 68,173,192, 48, 27,165,254,118,236,130,137,174, 43,
+ 56, 66,229,190,133,107,254,106, 37, 36,253,142,210,245,115, 35,172, 94, 92, 65, 6,203, 46,100,138,132, 85, 73,252, 43, 61,139,
+ 47, 91,182,108, 89, 34,174,222,189,123, 7,149, 74, 5,111,111,111, 74,173, 86, 27, 20,211, 74, 42,149,122,180,108,217,242,206,
+254,253,251,173, 91,180,104,241,193,210, 45, 14,214, 22, 29,111, 30,223, 48,229,135,159,126,243,178,243,233,149, 93, 89, 71, 32,
+ 40, 40,104,100, 3, 79,183, 93, 27, 86,125, 79,232,188,120,112, 44,210, 0,125, 58,146, 14,253, 2, 34,182, 66,215,241,211,209,
+ 48, 56,152,158,242,205,220, 93, 13, 27, 54,100, 31, 63,126,188,199,216, 44, 27, 97,132, 17,255, 10,129,197,176,140,175,189,157,
+181,104,195,154,189,143,105,141, 90, 45,177, 48, 87,115,205,205, 24, 98,106, 78,107,212,218,252, 90,174,181,248, 12,203,248,150,
+ 35, 72,174,126,220,203,118,113,113, 57,190,103,207, 30, 59, 46,151, 11,134, 97, 96,107,107,139,183,111,223, 34, 59, 59, 27,121,
+121,121,136,126,245, 10,181,107,214,192,148,177, 99, 28,151,174, 89,123,156, 16, 18, 84,122,184,240, 99, 78,150, 97,193,232,116,
+ 31,247,230,129, 50,150,140, 41,111, 25, 25, 67,167,148, 50, 12,243, 86, 38,147, 65, 44, 22,195,219,219,219,228,241,227,199,183,
+ 19,139, 77, 72,149,221,123,235,214, 28, 71,129,237,241,213,203, 6, 88,129,138, 68,100, 92, 54,220,156, 27,193,198,162, 6, 18,
+211,242,241, 56,252, 60,162,162,207,193,205,169, 22,198, 14,174,107,177,126,251,221,179, 36,112,156, 91,233,225,194,210,156,121,
+121,121, 38,181,106,213,130,147,147, 19, 24,134,129, 94,175, 71,120,120, 56,244,122,125,201,239,210,159,123,143, 93,131, 46,247,
+ 61,134,125,245, 21, 50, 51, 51, 77, 12,189,247, 98,113,181,125,176,180,158, 60, 43,137, 7, 0, 18, 75, 71,205,216,223, 18, 95,
+ 54,108,216, 16,182,182,182,188,123,247,238, 77, 7,112,164,170,249,169, 1, 86,253,180,103,207,198, 33, 57, 57, 20, 0,236, 34,
+132,209, 20, 70,213, 54,168, 46,181,111,239,119,108,195,134, 5, 54,132, 13,135,149,249, 74, 60,122,244, 30, 26, 77, 97, 85,201,
+200, 72,197,228,137,185,224,112, 76,177,118,221, 34,235,254,253,199, 31, 43, 26, 34, 99, 42, 74, 39,203,178,188,107,215,174, 97,
+208,160, 65, 56,120,240, 32,135,166,105, 60,124,248, 16, 34,145, 8, 35, 70,140, 64,189,122,245, 56, 34,145, 8,119,238,220, 65,
+110,110, 46,169, 40,157, 55, 46,221, 88,150, 19,125,125,126, 50,185,216,105,231,129, 67, 24, 51,104, 0, 28,216,152,219,230,110,
+100, 89,135,238,205,190,103,233, 26,221, 36,166,190,150,238,245,187,131,199, 55,193,164, 89, 75, 16,249,226,140,101, 65,222,179,
+137, 68, 31, 95, 3,192,212,143, 57,217, 35,125,245, 27, 15,220, 11,188, 82,243,113, 45,105,224,184,135, 0,158,253, 41,176, 92,
+ 57,132,210,155, 23, 91, 47,223,188,121,131,232,232,104,112, 56, 28, 40, 20,138, 15, 22,245, 45,205, 25, 16, 16, 48, 78,175,215,
+127, 15, 0,106,181,122,175,189,189,253,200,159,127,254,217,186,120, 9,162,210,150,171,204,236,220,172,123,143, 95,190,158, 62,
+174,111,235, 91, 15, 94,196, 91,248,245,140,203,126,122, 50,167,172,252,108,210,164,137, 37,159,166,119,252,180,122, 33,209,199,
+ 92,131,192,187, 53, 56, 38,238,208,107, 19,161,204,146, 67, 25,155, 4,245,246, 77,112,157,240, 13, 86,175,252,129, 12, 26, 58,
+106,135,155,155,219,241,232, 82, 22,188,255,196,116,111, 35,167,145,211,200,249,121,114,254,235, 4, 22, 33, 84,174, 94,207, 8,
+120,182,118,202, 81,253,219, 53,184,124, 53,228,137,216,198,140,211,177,117, 64,171, 71,207, 99,239, 19,138,104, 9,161, 12,242,
+235,112,118,118, 30,176,112,225,194, 6,102,102,102, 96, 24, 6,230,230,230, 72, 75, 75,131, 90,173, 70, 78, 78, 14, 84,121,185,
+208,228,229,226,105,252, 59, 52,107,213, 26,237,155, 52,246,190,160,213, 14, 0,112,176, 60, 78, 61, 69,179,214, 1,141,208, 47,
+ 38, 3,140, 70,141, 35,174,214, 37, 86,171,129,239,178, 65, 8, 1,163, 81,227, 66,112, 93,240, 77, 36,240,155,185,176,218,153,
+149,148,148, 20, 86,171, 86,173, 11,157, 59,119,238, 60,110,220, 56, 42, 57, 57,249,162,189,189,125,179,148,148,148, 74,135, 71,
+237,178, 44,135, 13, 27,219,160,142,141, 5,133, 51,119, 46,162,177, 87, 47,136, 5, 92,164,101, 43, 64, 64, 16,243,246, 42, 24,
+157, 9,158,190,122,135,166,190, 98,180,108,100,225,156,255, 71,230, 88,148, 63, 92, 70,178,178,178,144,154,154, 10,173, 86, 11,
+173, 86,139,190,253,250,225,215,125,251, 32,151,203,161, 80, 40,160, 86,171,161,215,235, 65, 81, 20,174,156, 61,130,248,216, 87,
+104,218,164, 9, 80, 65,196,111, 46, 13,221,218,111, 7,115, 0,128,111,106,171,201,203,203,131, 68, 34,129, 60, 43,137, 55, 99,
+ 77,137,101,139,119,253,250,117,132,134,134, 66, 42,149, 26, 84,143,202, 66, 52,176,227,173, 94, 63,191,243,137, 19,118,119, 79,
+156, 96, 30,156, 57,147, 32,200,203,219,110,200,127,131,131,253,251, 78,153,220,213, 83, 36, 20, 33, 33,110, 3,188,188,120,152,
+241,141, 53,150,175, 76, 7, 0, 76,153,236,140,134, 65, 54,200,205, 62, 10, 27, 59, 55,204,152,222,211, 45, 63,159,253, 10,192,
+222,138,235, 59,153,252,236,217,179, 72,123,123,123, 78, 88, 88, 24,248,124, 62, 68, 34, 17, 68, 34, 17,132, 66, 33,146,147,147,
+161, 86,171,113,248,240, 97, 93,209, 16, 98,185, 40, 26, 6,236, 60,189,179,227,133,215,161,251, 90, 56,209,177, 79,251, 76,106,
+254,238,217,131,176,188,203, 87,238, 46,213, 41,133,241,217, 9, 87,103,215,105, 24,102, 51,113,230, 98,108, 90,189, 16,175, 31,
+222,202,180,175,153,187, 89, 68, 84,123,131,191, 40,195, 42,214,122, 49,103,226,130,254,186,113,195,251, 88,156,177,191, 55,238,
+ 60,135,164, 37,167,135,174,193,219, 48,133,160,110,192, 80, 15, 87, 74,125,237,218, 53, 81,203,150, 45,161, 84, 22, 46, 25, 71,
+211, 52,246,239,223,207,232,116,186,235,101, 90, 45,181,218,239, 67, 67, 67, 29, 21, 10, 5, 6, 14, 28, 56,101,209,162, 69, 18,
+ 46,151, 91,248,124,233,245, 31, 88,174,150,173,255,245,210,180,239, 55, 95,191,116,112,165,116,217,156,145,173,135, 76,250,225,
+ 58,128,139,101,241,234,116,186,125, 27, 86,126, 71, 11, 44,180, 32, 13, 59, 64,147,162,192,251,157, 99,160,206, 85,194, 99,233,
+ 98, 0,124,168,181, 20,206,245,232, 11,202, 74,138,209, 45,154,113,182,223,186,179, 15, 64, 79, 99,211,108,132, 17, 70,252,255,
+183, 96, 49,204,173, 55,177,239,186,116,104, 31,236,124,246,230,243,199,227, 70,116,237, 72, 81, 20,121, 18,254,254,166, 91, 45,
+ 7,155,235, 55,110,177, 12,195,220, 50,228, 98, 92, 46,183, 91,243,230,205, 57, 89, 89, 89,144, 74,165, 72, 75, 75, 67, 98, 98,
+ 34,180, 90, 45,148, 57,217, 80,231,229, 66,157,155, 3,189, 60, 15,209, 33,143,224, 85,211, 89,112,181,208, 9,254,160, 33,252,
+ 31, 91,168,138, 23,253, 5, 33, 16,152,154, 64, 96, 98, 82,249, 74,240, 31, 65, 42,149,246, 48, 51, 51,155,157,151,151,119, 62,
+ 49, 49,113,153, 90,173,158,248,227,143, 63, 62, 94,178,100,137,205,156, 57,115,204,102,205,154,117,196,197,197,197,191, 50, 63,
+ 36, 83, 43,125,223,198, 13,234,210, 81,239, 95, 32,200,163, 47,106, 75,155, 35, 38, 49, 7,153,121, 42,100,228, 40,224,233, 49,
+ 19, 41, 25, 5,200,145, 43,241,252,245,239,112,114,168, 67,209,220,232, 78, 21, 8, 44,164,164,164,124,112,207, 7, 15, 28, 64,
+ 65, 78, 14,220,220,220,224,237,237, 13, 91, 91, 91,188,127,255, 30,119,238,220,193,144,254, 95,130,203,237,131,212,212,212, 10,
+239,119,111, 24,203,149, 74,165,161, 50,153, 12, 97, 97, 97,136,142,142, 46,115, 88,245,143, 63,254, 40,124,241, 58, 56, 24,156,
+151,246,246,246,223, 81, 20,213, 31, 0, 13, 32,158,146, 74,235,218,218,218,218, 55,235,217, 19, 57, 92, 46,253,243,245,235,132,
+ 99,110,110, 2, 32,187, 50, 46, 51, 51,116, 13, 10,106,206,207,206,218, 13,160,208, 40, 53,114,132, 45, 58,119,178, 7,161, 4,
+144, 58,154,130, 80, 2, 16,194, 71,129,252, 26,124,234,249,242, 76, 77,143,119,171, 72, 96, 21, 59,180,215,171, 87, 15,227,199,
+143,199,201,147, 39,177,119,239,159,167,247,233,211, 7,189,123,247, 70,126,126, 62,236,237,237, 57, 50,153, 44, 38, 48, 48,176,
+ 82,199,119, 51, 55,178, 76,165,121, 53,223,194, 93,146,166,135, 77,211,124,173, 32, 99,225,154,152,133, 0,214,118,118,115,219,
+169, 97,110,197, 70,189, 56, 99,249,246,241,141, 76, 89,148,220,117,231,185,152,114,125,176,110,222, 4, 99,239,123, 83,243,101,
+167, 86,156,158,221,219, 20, 56, 57,219,123,252,188, 89,189, 63,211,201,122,153, 75, 77,231, 33, 11,127,156,173, 25,218,171,133,
+102,246,140,201,220,122, 62,222, 36, 55, 55, 23,135, 14, 29,210, 93,184,112, 33,137, 97,152,105,229,208,210, 69, 66, 11,253,251,
+247,151,136,197, 98,196,199,199,195,203,203, 11, 12, 83,152,183, 73,105, 25,207,239, 62,126, 17, 49,125,124,191, 86,191,159,190,
+254,234,210,141,144, 87, 61, 59, 53,243, 35,132,117, 41, 47,173, 52, 33,141,125,124,125,193,178,137,160,185, 30, 72,216, 63, 18,
+202,140, 60,168,228, 74, 80, 92, 9,212, 90, 26, 26,134, 64,224,219, 8,111, 78,158, 70,221,193,245,192, 33,164,153,177, 89, 54,
+194, 8, 35,254, 63,160, 82,181, 65, 43,213,203,191,157, 61, 31,150,230, 34,243, 70, 1,238, 14,167, 46,222, 12,185,117, 47,228,
+149, 75, 13, 27, 91, 86,171,182, 92,181,110,147, 51, 41, 80, 24,234,228,237,109, 99, 99, 3,141, 70,131, 55,111,222, 32, 33, 33,
+ 1, 26,141, 6, 58,185, 28,170,236,108, 40,179,178,160,151,231,129,167,215, 67,145,150, 10, 75, 33, 31,248,115,134, 97, 69,166,
+202, 63,197, 84, 25,130,139, 16, 2,145,153, 25, 4,166,166,160, 56,180,193,153,227,232,232, 24,232,239,239,127,248,218,181,107,
+193,205,155, 55, 95,234,226,226, 98,158,156,156,252, 62, 37, 37,165,221,234,213,171, 85,182,182,182, 24, 50,100,136,167, 86,171,
+ 29, 86, 25, 23, 79,160,106, 80,211,222, 29, 53,236,191,132,212,166, 49, 50,115, 85, 72,205, 86, 32, 37,163, 0,135,142, 15,192,
+229,243, 3,241,228,206, 87,120,243,112, 36,210,243,205, 32,180,106, 3,128,173, 95, 17,231,189,123,247,176,109,219, 54,108,219,
+182, 13, 91,183,110,197,166, 77,155,144,149,149,133,250,245,235, 35, 46, 46, 14, 23, 46, 92, 64, 82, 82, 18,108,108,108,240,228,
+201, 19,108,223,190, 29,143, 30, 61,170,114, 37, 81, 42,149,224,153, 88,107,214,126, 59, 24,107,191, 29, 12,134, 43,209,148, 18,
+224,134, 87, 54,138, 26,158,212,179,103,131, 36, 11, 11, 31, 95, 95,223,206,253,251,247,119, 13, 14, 14, 46, 57,238,230,230, 86,
+147,195,225, 36, 75,165,210, 93, 82,169,212,191, 98,229,207, 6, 88, 90,121, 67,173,138, 40, 42, 99, 46, 8, 17,162,237, 23,175,
+208,172, 69, 8, 52, 90, 30, 40, 34, 0, 69, 9,161,211,101,192,204,212, 30, 44, 75,234, 87,146,196, 46, 23, 47, 94,196,182,109,
+219,240,246,237,219, 18, 97,217,173, 91,183,201,131, 6, 13, 58,174,215,235,113,246,236, 89,156, 60,121, 18,181,107,215,134,159,
+159, 31, 52, 26, 77,151,202,238,123,225, 79,178,251,191,175,187, 48,144,171,181,244, 23,138, 92,106, 67,110,210, 99, 98,107, 91,
+ 9, 0, 92,136,142,206,179,171,153,187, 66,158,247, 44,206,194, 57,127,101,101, 14,238, 44,187,144, 9,141,138,120,240,251,137,
+139, 57,169, 41, 89,220,128, 6,245, 20,203,151,204,228,185,212,174,187,106,225,236,241, 14,137,185,194,236, 47,166, 92,136, 56,
+126,241, 81,254,208, 17, 99,116,163,198, 78, 82, 94,184,120,229, 4,195, 48, 13,202,155, 65,200, 48, 12,146,146,146,240,242,229,
+ 75,196,196,196, 32, 45, 45, 13,233,233,233,200,203,203, 43, 25, 86, 20,231,229,158,219,180,231,204, 83,137, 72, 36, 14,110,224,
+ 94,243, 97, 88,120,170, 68, 36, 18,187,215,174,233, 65,200, 98,170, 28, 94, 11,161, 72, 8,128, 32,239,197, 45, 40, 51,243,161,
+200,206,135, 50, 43, 31, 42, 13, 13,165,138,130, 66, 77,193,166, 69, 7,228,203,149, 80,102,100,129, 97, 89, 75, 99,179,108,132,
+ 17, 70,252, 43, 44, 88,233,233,145,249,102,182, 62,189,191,153,245,253,133, 3,191,252,108,167, 82, 21,196, 89, 91,154,232, 77,
+196,124,155, 81,227,126, 64, 94,126, 86,175,252, 76,195,103, 61,101,101,101, 33, 54, 54, 22, 34,145, 8, 60, 46, 23,122,133, 2,
+122,133, 28,138,172, 12, 80, 26, 21,120,122, 61,172,196, 34,212,146, 58,192,197,190,114,235, 8,205,232,137,236,202,121, 92, 26,
+218,235, 47,195,130, 23,155,122, 66, 96, 34,129,208,194, 18,205, 78,222, 46, 20, 58, 60, 30,176,176,242, 69,218, 29, 28, 28,108,
+164, 82,233,233, 77,155, 54,241, 50, 50, 50,240,242,229,203,167,239,222,189,203,177,178,178, 50,229,114,185, 76, 84, 84,212,213,
+136,136,136,110,117,234,212, 1,203,178,110,149,241,229,229, 72, 52, 90, 45, 11, 89,234,123, 36, 36,189,132,153, 73, 13,176,116,
+ 13,164,102, 22,128,192, 30, 58, 85, 36,244,218, 66,119, 43,149, 34, 1, 5,106,195,214,237,213,104, 52,208,104, 52,208,106,181,
+ 80,169, 84, 24, 58,116, 40,238,222,187,135,131, 39,255, 64,108,116, 36, 60,107, 59,224,171,175,134,194,223,223, 31,143, 31, 63,
+174,118, 69,105, 50,251,210, 75,145, 72,132,173, 91,183, 66, 44, 22,127, 32,110, 13, 20,171,107,219,181,107, 87, 55, 82, 46,199,
+203,136, 8, 52,234,215, 15, 0,112,231,206,157,146,115, 20, 10, 5, 6, 15, 30,204,143,141,141, 29, 21, 17, 17, 49,202,209,209,
+113, 93, 82, 82,210,140,242, 56,207,157,187,143,241,227,195,145,150, 86,232,135,125,232, 64,189,146, 99,111, 99, 53,232,212,181,
+112,228,202,194,194, 2,235,214,213, 55, 40,157,122,189, 30, 59,118,236, 40, 25, 22, 4, 0, 14,135,211,108,250,244,233,189,203,
+ 58,223,199,199,167, 82,206,233,253,156,133, 79,222,139, 38,154,215,117,169,103,102,227,139, 12,109, 88,253,176,196,164,201,211,
+251, 57,111, 88,119, 36, 65, 41, 34,170,189, 68, 31, 95,131, 35, 84,238, 51, 36,141,209, 23, 54,170, 45, 92, 70,236, 75, 78,203,
+157, 55,105,204, 96,107, 51, 11, 59,249,174, 77,203, 45, 41,154, 98, 79,135,104,178,235,185, 90, 91,244,104,252, 83,254,248,111,
+ 22,132,169,117,241,147, 16,127, 58,178,162, 80, 21, 12,195, 64, 38,147, 33, 45, 45, 13,113,113,113, 72, 79, 79, 47,122,246,211,
+ 75,134, 8,171, 3, 66, 8,212,113,113, 72, 57,185, 11, 14, 67,134,194, 99,201, 18,232, 25, 14,148, 5,122, 28,109,217, 14,185,
+217, 10,168, 25, 2,139,192,166,232,112,246, 54, 8,163, 7, 30,220, 51,182,202, 70, 24, 97,196,191, 67, 96, 1, 64,110, 90,120,
+140,117, 45, 95,153, 92, 33, 23,219,219,217,170,196, 66, 1,147,147,155, 71,135, 61,127,170,201, 79,122,243,186, 10,215,123, 21,
+ 30, 30, 94, 63, 33, 33, 1,113,239,223, 67,167,144,131, 82,169,193, 42, 11,208,190,121, 83, 8, 1, 8, 41, 2, 30,163, 1,135,
+230, 35, 47, 63, 23, 0, 94, 85, 70,202,104,181, 31, 52,234,132, 16, 16,138,130,208,196, 4,124, 83, 9, 4,102,166, 31, 88,180,
+ 12,129, 72, 36,250,125,251,246,237,142, 14, 14, 14, 88,183,110, 29, 28, 29, 29,189,218,183,111, 95,208,170, 85, 43,145,141,141,
+ 13, 60, 60, 60, 16, 20, 20,132,235,215,175,131, 16, 18, 93, 25,159, 78,205, 15,125, 21,171,171,145,147,247, 4, 15,194,126,133,
+ 86,173,133,155,199, 92, 40,180,214,144,216,142,130, 82,125, 26,250,236, 27, 0, 0,190, 89,107, 36, 39,167, 3, 32, 47,170, 82,
+152, 44,203,226,217,179,103, 56,112,234, 38, 28,107,121, 35, 46, 42, 2, 17,215,175,226,174,173, 53, 92,124,234, 65,171,213, 26,
+ 44,136, 12, 61,207,208, 23, 48, 33,100,240,152, 49, 99,144,205,225, 0, 93,187,130, 23, 19, 3,141, 70,131,198,141, 27,163, 97,
+195,134, 0,128,198,141, 27,131,166,105,212,173, 91, 23,214,214,214, 56,118,236,216, 96, 0,101, 10, 44,150,144, 39,140, 62,195,
+203,213,213,181, 68, 96,237,251, 53, 13, 97, 33, 95,128,128,143,141,155,254,140,202, 80,179,102, 77, 36, 39,199,130, 16,182,178,
+252, 60,223,181,107,215, 46,150,150,150, 24, 57,114, 36,132, 66, 33,122,245,234, 5,165, 82,217, 31, 0, 86,172, 88,129,239,190,
+251,174,208, 42,181,112, 33, 22, 45, 90,132,130,130,130,114,135,134,127, 93,239, 43, 77,205,100, 70,217, 59, 56,245,106, 99,227,
+210,160,109,199,246,168,227,222, 22,109, 59,198, 1,192,143, 86,156,119,253, 87,207,175,127,194,166,134,213,238,203, 23,175, 44,
+108,222,170,237,188, 57,227, 44,151,173,216,158, 85,169, 79, 99,206,251,189,121,175,249, 3,214,255,188,237,215,245,223,127, 55,
+ 85, 24,151,166,206, 74,204, 98,243, 77, 4, 28, 19, 55,123, 98, 50,121,214,210, 88,153, 44,102, 6,226, 47, 70, 26, 82,134, 49,
+ 49, 49, 37, 62,123, 74,165, 18,114,185, 28,241,241,241, 37,229,171,144,152,117,154, 52,162,187,159, 92,161, 40,120,248, 60, 42,
+110,254,148, 33, 77,228, 10, 69, 65,212,219,184, 72,150,253,137, 41,167,204,179, 11,228, 5, 86,170, 28, 37,114,158,190,134,117,
+219, 90,208,232, 8, 84,122, 61,178,210,243,160,214, 1, 90,154, 11,231,190, 95, 65, 11, 14,114,211,146, 65, 17, 98,140,135,101,
+132, 17, 70,252,123, 4, 22, 33,132,248, 53,168, 37, 93,189,112,136, 51,163,211,121,166,166,167,232, 56, 28, 1,183,134,185, 34,
+169, 42, 23,211,106,181,103,111,223,190,221,179,121,243,230,130,168,231, 79,161,206,201,129, 58, 39, 27, 92, 70, 7, 43, 81, 16,
+ 40,141, 10, 68,173,134,147, 23, 3,101,158, 8,247, 30,189,214,106,181,218,179, 21, 10, 1,176, 44,163, 43, 20, 88,132,162, 62,
+ 24, 42, 20,152,155, 66, 96, 98, 2,129,169,105,153, 67,136,229,193,222,222, 94,220,185,115,231,118, 1, 1, 1, 96, 89, 22,171,
+ 87,175,134, 70,163,225,107,181,218, 18,139, 81,126,126, 62,142, 30, 61,138, 95,127,253,245,174,185,185,121,165, 83,203, 25,157,
+234,194,181, 59, 79,187, 12,233,213,134,127,229,198, 78,104,213, 12,114,149,102,200, 87,168,144,175,228, 66, 37,232, 8, 66,110,
+131,162, 5,104,234, 95, 23,215,238, 68, 42,245, 90,205,197,170, 10, 33,165, 82,137,248,184,119, 72,136,142,132, 73,110, 50,108,
+205,196, 40,136,137,132,255, 87,195,160, 86,171, 43,189,247,225, 1, 68, 59,189, 62, 56,235, 58, 83,224,153, 88,107,154,204,190,
+ 84,110,168, 8, 19, 19,147, 42, 13, 17,166,167,167,227,204,153, 51,104,220,184, 49, 90,181,106,133,196,196, 68,196,196,196,160,
+ 75,151, 63, 71,217,158, 62,125,138,176,176, 48,184,185, 85,108, 20,204,205,101,207,103,102,190,233,215,163, 71, 15,222,131, 7,
+ 15,192,178, 44,220,221,205, 96,102, 42, 1,161, 4,240,246,182, 3, 80,168,253, 91,183,110, 13,181, 58, 81, 39,151,227,124, 69,
+156,161,161,161, 93, 3, 3, 3,235,104,181,218,200, 86,173, 90,113,222,188,121,131,190,125,251,226,208,161, 67, 0,128, 57,115,
+230, 96,206,156, 57, 31,252, 39, 63, 63, 95, 89, 30,159,103, 3,175,153,117,116,150,173,132, 34,151,218,102, 54,190,168,227,222,
+ 22, 0,240, 69,183,145,168, 83,183, 38,114,211,159,213, 86, 42,222,245,226,113,178, 44,159,109, 76, 12, 23,117,173, 63, 66,153,
+122, 35, 10,128, 33,129,123, 89, 69,212,161,148, 56,238,208,195, 39, 79, 95, 24,215,165,219,151, 92,173, 94,167,171, 95,139,107,
+113,228,196,185,212,196,247,113, 63, 33,238,226,139,146,199,164, 98,129,165,207,205,205,133, 68, 34, 65, 76, 76,140,170,123,247,
+238, 2,133, 66,129, 55,111,222,148, 8, 44, 59, 27, 43,159,102, 13,235,123, 45, 91,255,235, 37,137, 64, 32,232,216, 58,200, 59,
+ 60,234,125, 2,203,146,119,229,242,178,236,131, 55,175, 94,119,181,115,172, 11,217,205, 7, 16, 55,239, 2,149,138,130, 82,205,
+ 64,165, 3,116, 52, 15,230,126,193, 16,185,122,131, 5,240,234,249, 83,232, 88,246,174,177, 89, 54,194, 8, 35,254, 53, 2,203,
+198,198,198, 46, 32, 32,200,109,231, 47,135,193,178, 44, 94,135,173, 65, 86,106, 4, 22,252,120,223,205,217,217,185, 85, 66, 66,
+194, 77, 67,120, 18, 18, 18, 14, 29, 59,118,108,134,175,143, 79, 64,109,103,103, 60,125,247, 22, 60, 86, 15,158, 94, 15, 74,163,
+ 2, 71,175,134,115,125, 61, 40, 98,130,164,164, 92,108,191,120,245, 69, 66, 66,194,161, 10, 95, 14,132, 70,141,238,125, 48,232,
+139,174, 96,181, 26, 92,110,225, 3,161,169, 9, 4, 22, 22,104,122,244, 6, 8, 33, 96,117, 90,188, 95,254, 45,184, 18, 19, 88,
+ 53,169, 60, 20, 80, 74, 74, 74, 65,221,186,117, 67, 34, 34, 34, 26,122,122,122, 98,241,226,197,136,143,143, 7,203,178, 72, 77,
+ 77, 85,166,165,165, 37,102,100,100,188, 35,132,156,144,201,100, 59, 13,137, 20,158,106,153,181,239,202, 31, 87,103, 6,250,251,
+184,127,209,106, 17,206,158, 93,136,172,156, 92, 20,168,185,200, 83,104, 32, 87,176,112, 50,115, 71, 35, 95, 95,164,101,170, 17,
+245, 50, 52, 33,157,103,181,163, 42,214, 43,138,162,240,244,233, 83,184, 74, 77, 17,121,251, 38,108,196, 92,248, 73, 29, 32,109,
+214, 28, 49, 49, 49,134,137, 96, 61, 56,165,103, 11, 90, 88, 88, 32, 39, 39,231, 3, 33, 39, 22,139, 33,149, 74,145,155,155,139,
+163, 71,143,130, 53,236,165,168, 85,171,213,240,242,242,194,227,199,143,113,245,234, 85,180,109,219, 22,173, 90,181,194,179,103,
+207,112,249,242,101,132,133,133,129, 16, 2,107,107,235, 98,223,159,114, 35,218, 63,122,244,244,136,137, 9,153, 59, 98,196,132,
+122, 67,134, 12,193,177, 99, 7, 49,114,132,103,145, 99,187, 0, 95,118,247,196,146,165,143, 17, 28,220, 26,182, 54, 60, 92,185,
+250, 50,150,195, 49,255,213,128,124,252,249,231,159,127,230, 40, 20, 10,228,231,231,195,196,196, 4, 25, 25,133,225,168,202,177,
+ 96,149, 27, 88,237,121,232,171, 53,217,121,108, 22,155, 31,214, 43, 83, 23,214,160,109,199,120,124,209,109, 4,174,156,221,131,
+107,151,174,194,138,243,238, 45, 36,121, 23,210,223,166,231, 38,201,221,183,121, 7,142,166, 19,228,151,182, 77,233, 97, 73, 59,
+ 58, 50, 71,230,108,201,201,174, 32,157, 44, 33,132,100,134,239, 63,125,130,197,151, 77,155, 4,215,173, 95,211,145,159,149,158,
+202, 30, 61,117,225,133,230,237,177, 51,197,194,202,128, 85, 17,150,108,216,176,225,123, 0, 96, 24,102,239,250,245,235, 71,207,
+156, 57,211, 86, 38,147,149, 8,172,212,244,204,107, 77,187, 78,214,103,100,231,168,119,175,159,213, 87, 36, 20,240,231,175,216,
+125, 67, 75,227, 65,185,141, 11,135, 51,108,238,214,223,210,142, 29,217, 67,219, 8,121,184, 59,103, 33,162,175, 94,135,134,226,
+161,227,229,135, 80,107,244,200, 77,203,192,245, 81, 19, 97,225, 96,137,243,233, 81,250,156,188,220, 97,198,102,217, 8, 35,140,
+248,255, 0,131,166,212,165,167,167,167,222,186,245, 16, 55,206, 46,195,205,179,203,240, 50,236, 41,100,137,106, 36,166, 40, 97,
+102,102,118,191, 2,203, 87,251,143, 95, 10, 74,165,178,247,250, 13, 27,146,197, 18, 9, 90,182,107, 7, 7, 91, 59,136,121, 92,
+208, 58, 6, 52,225, 34, 63,205, 2, 81,207, 21, 88,126,226,108,170, 66,169,236,253,241,203,225, 99,206, 82,251, 1, 66, 32, 50,
+ 51, 5,223,196, 4,194,210, 86, 43, 66,192, 51, 53, 3,207,212, 12, 52,143, 95,105, 58, 1,160,160,160,160,207,216,177, 99,179,
+242,242,242, 48,104,208, 32, 60,120,240, 32,236,226,197,139,102, 87,175, 94, 21, 61,127,254,188,174, 76, 38,235,144,152,152,184,
+189, 60,113,245,151,123,191,113, 67,199,234, 52,125, 54,111,221,153,169,208,218,163,123,143,205, 48,227,103, 64,171,211, 3, 44,
+ 11, 39, 91, 19, 52,106,246, 45, 82, 85, 77,113,246,204,217, 44, 70,167,236,243,241,146, 57,165, 57, 89,150,101,173,173,173, 63,
+176,202, 81, 20,133, 27, 55,110,160, 95,223, 62,232,216,171, 39,108,107,187,194,174,125, 23,116, 28, 61, 30,219,183,111, 7, 69,
+ 81,176,178,178,250,192,162, 81, 94,126, 22, 35, 39, 39, 7, 46, 46, 46,120,184,186, 75,189, 11,211,189, 2,106, 70,255, 28, 32,
+126,178,182,222,181,107,215,176,118,237,218,252,200,200,200,117,238,238,238,223, 86,150,159,132,144,121, 63,254,248,163,226,253,
+251,247, 48, 49, 49,129, 78,167,195,221,187,119,177,101,203, 22,172, 93,187, 22, 97, 97, 97,176,182,182, 70,221,186,117, 65, 81,
+ 20,226,226,226, 20,132,144,121, 21,212, 37, 38, 47,143,211,231,242,229, 19, 25,221,187,183,196,238,221,155,224,224,208, 20, 92,
+142, 3, 56, 92, 91, 72, 76,188,176,107,231, 74,116,237, 18,136, 87, 17, 79, 50,243,243, 57,125,110,220,184,161, 51, 32,157,154,
+231,207,159,227,248,241,227, 88,178,100,137,110,241,226,197,200,201,201, 41,177, 96, 21,175,146,190,104,209, 34, 0,128, 74,165,
+ 18,148,199, 57,122,214,243,196,153,203, 94, 44, 73, 73, 78,108,124,243,250,253,193,215, 46, 93, 69,108,212, 53, 92,187,116, 21,
+183,175,221,155,147,146,156,216, 56,160,145, 7,175,247,232, 73, 51,247, 29, 63, 70,155,152, 57, 98,223,241, 99,244,160,201,211,
+126, 8,234,216,118,158, 1,101,196, 2, 96,243, 83, 83,190,251,113,205,207,249, 58,141,146, 90,253,211,102,153, 34, 45,105, 30,
+138,167, 86,150, 99,189, 42,205, 25, 19, 19,179,253,237,219,183,210,183,111,223, 74,223,191,127, 63, 47, 49, 49,177,229,242,229,
+203,211,138, 4, 87,161,192,122,121,234,254,171,219,123,126,180,179,177, 20, 53,109, 88,207,115,221,246,163, 55,226,226, 83,126,
+ 43,142,129, 85, 86, 58,239,223,191,159,165,210,234,198,126, 59,107, 17,155,157,173,134,231,212, 57,208, 9, 76,160,210, 1, 26,
+134,134, 6, 28,132, 45, 91, 7, 83,107, 83,220,101,179, 88, 21, 77,141,137,254,200,201,191,178,250, 89, 29, 24, 57,141,156, 70,
+206,207,147,243, 95,105,193,114,114,114,106,217,227,203,246,104,221,109, 62, 88,150, 69, 68,232, 42,100,165,189,134,147,131, 0,
+ 49,113,185, 77, 0,220, 52,244,130, 73, 73, 73,113,142,142,142,141,151,109,216,120,188, 99,112, 35,111,119, 39, 71,129,133, 75,
+ 45, 72,236,236,144,158,158,134, 7, 33,145,218,173,151,175,189, 80, 40,149, 6, 45,149,195, 48, 12,203, 48, 12,120, 60, 30, 88,
+154,134,207,148, 57, 32, 20, 5,138,203, 41,177,236,128, 16,152, 5, 54, 3,225,114,161, 53,208,103, 72, 38,147, 37, 56, 57, 57,
+245,153, 60,121,242, 31,123,247,238,165, 90,183,110,237,127,250,244,105,230,239,100,118,202,243, 19,225,246, 13,122,181,218,248,
+243,150,163, 1, 65,141,107,185,212,118, 17, 52,117, 54,135, 70,171, 71, 74,106, 6,110,222,123,169,138, 12,127,146,200,106, 52,
+125, 82,195,203,143,226, 14, 0, 90,173, 54,206,217,217,217,126,241,226,197,208,233,116,208,233,116,208,235,245, 72, 79, 79,199,
+253,251,247,209,160, 97, 48,188, 71,140, 66, 90, 90, 26, 54,110,220, 8,103,103,103,252,248,227,143,200,203,203,195,173, 91,183,
+202,205, 87, 46, 13,221,224,193, 69,113,176, 56,208,173,235,214,237, 70,189,122,245,154, 55,214,166,242, 22,110, 44,180,108, 77,
+ 29, 51,152,119, 35,238,198, 17,129, 64,176, 61, 54, 54,182, 66,127, 33, 55, 55, 55,190, 82,169,244,103, 89,150,206,205,205,221,
+160, 84, 42,135, 79,159, 62,221,113,197,138, 21,112,119,119, 71,122,122, 58, 36, 18, 9,220,221,221,145,151,151,135,216,216, 88,
+189, 70,163,217,166,215,235,151,164,164,164,164, 85,196,253,232,209,163, 55, 1, 1, 1,141, 83, 83,182, 30,159, 48,190,163,187,
+ 86, 23,196, 55, 51,107, 1,150,213, 34, 59, 43, 1,192, 51,205,137,147, 87,163,179,179,233,222, 33, 33, 33, 81, 6,245, 56, 40,
+106,252,250,245,235, 81,188, 84, 78, 98, 98, 98,137,233,175, 44, 11,150, 33, 88,119, 36, 65, 9,224,192,234,111,154,126,147,155,
+254,204,221,138,243,238,109,227,250,204,198,117, 71, 18,148,139,191,177, 88,150,254,238,102,100,146,252,210,182,125,199,143,209,
+195,122,245,209, 59,155, 68,205, 17,218,177, 71,219,118,175,212,218,198,250,251,251,215, 32, 36,179, 78,106,198,235,144,145,163,
+199,245, 55,231, 41,206,251, 57,103,184, 81, 53, 3,132, 97, 97, 97,111, 13, 93,211,243,163,186, 31, 41,149, 74, 91,174, 89,179,
+230, 18,128, 15,124,204, 82,211, 51,175, 53,233, 54,137,205,206,206,121,146, 26,126,234,121,101, 92, 33, 33, 33,187,131,130,130,
+240,213,208,145, 59,198,140, 26, 67,215,159, 50, 19,137, 55,174, 1,122, 45,146,111,223,132,200, 68,143,179,233,239,244, 5, 52,
+ 53, 54, 36, 36,196, 24,197,221, 8, 35,140,248,119, 9,172,132,132,132,155,110,174,206,151, 35, 35, 91,118,168,233,108, 91,216,
+235,125, 43, 67, 98,138,234,178,161,195,131, 31,139, 44, 66, 72,208, 57,157,110,192,101, 46,183, 27, 41, 10,197,192, 86, 99,177,
+231,130,130,130,148,198,141, 27,151, 19,123,225,199, 50,247,234,245,250, 4, 67,184, 19, 19, 19,111, 72,165,210,161, 77,155, 54,
+ 93, 33,147,201,142,167,165,165,201,255,110,134,167, 60, 63, 17, 78, 90,183,174, 23,242,240,214, 87, 97, 33, 15,186,177, 44,235,
+ 11,128, 16,138,250,115,177,231,240,202, 23,123, 86, 40, 20,227,230,207,159,191,157,195,225,212, 68, 81,224,208,226, 44,211,104,
+ 52,244,238,221,187,133,106,181,154, 6, 64,120, 60,158,206,196,196, 68,121,247,238, 93,157, 94,175,143,211,106,181,227,202,227,
+221, 27,198,114, 63,222,231,227,227, 35,121,195, 65,126,241,239, 12, 5, 32,147,201, 86, 25,114,191,231,207,159,119,177,180,180,
+236, 64, 8,233,203,178,172, 87, 94, 94,158,234,251,239,191,191,119,253,250,245,220,215,175, 95,119,106,209,162, 5,113,112,112,
+ 64,108,108, 44,155,159,159,127,148,162,168,121, 50,153, 44,198,208,252, 12, 11, 11,139, 33,132,248,201, 11,216,129,166, 38, 23,
+187, 50, 44,252, 0,150, 16, 66,158,231,231,147,243,142,142,174,191, 93,185,114,196,224,169,112, 69,107, 11,246, 40,254, 29, 24,
+ 24,120,254,245,235,215, 93,138, 45, 88, 31,251, 96, 85, 9,226,252,211, 74,197,187, 62,196,164,224,196,186,159, 18,148, 0,176,
+112,125,118, 14,128, 93, 83,122, 89, 49,175, 66,119,173,114, 50,139,154,245,211,137, 76,131,214,228, 11, 8, 8,112,165, 40,106,
+ 0,128,250,118,130,236,186,182,252, 28, 61, 33,108, 27, 66, 40, 27, 0,207,124,124,124,206, 2, 72,168, 78, 82,101, 50, 89, 36,
+128, 90, 31,239, 79,125,121,234, 62,128,251, 85,225, 10, 9, 9,217,221,164, 73,147, 83,155,119,108,219, 71, 19,210,152,232,245,
+ 22,250,241,131,254, 92,236, 89,192, 31, 22, 98, 92,236,217, 8, 35,140,248, 55, 10, 44, 0,136,142, 73,232, 8, 0,238,238,238,
+236,155, 55,111,192,178, 44,249, 59, 23, 46, 18, 80, 7, 97, 96, 16,209,242,240,226,197,139,128,255,100, 6,201,100,178, 3, 0,
+ 14,124, 74, 78,182,112,168,106,119,209, 86, 45, 36, 38, 38, 62, 7, 16,252,223,168, 36,225,225,225,242,225, 1,164,196,178,197,
+165,161, 51,244,191, 29, 58,116,120,175,209,104,174, 2,136, 39,132, 88, 0,200,212,104, 52,151,210,210,210, 82, 28, 28, 28,130,
+222,191,127,191,160,200, 18,185, 52, 57, 57, 57,164,154,117,137, 1,240,123,209,246, 73, 17, 26, 26,218, 85, 42,149,134, 89, 91,
+ 91,187, 41,149, 74,190, 82,169,228,149,214,254, 34,145, 40,205, 80, 46, 11, 83,178,151,199,201,178,182, 48, 37,127, 41,119, 43,
+ 39, 28, 83,200, 95,120, 90, 57,225, 88, 85,196,165,191,191,255,126,138,162,106,179, 44,107, 15,176,230, 44,139, 52,150,101,211,
+ 57, 28, 78, 98,120,120,120,226,231,210,208,220, 47, 20, 80,221,140, 77,174, 17, 70, 24, 97, 20, 88,229, 32, 42, 42,138, 24,179,
+237,223,135,178, 44, 91,134,160, 40,194,253,189,162,237, 3, 20, 9,170,238,159,251,189,203,100,178, 79, 34,226, 71,207,122,158,
+ 8, 96, 90, 80, 25,243, 44, 22,110,204,204, 3, 48,179,205,151, 85,227,124,242,228, 73, 28,128, 56, 99, 13, 53,194, 8, 35,140,
+248,188, 64, 25,179,192, 8, 35,140, 48,194, 8, 35,140, 48,226,211,130, 0, 40,115, 38, 64, 85, 86,202,174,206,108,130,202,248,
+141,156, 70, 78, 35,167,145,211,200,105,228, 52,114,254,255,227,252,215,160,120,218,249,127, 98, 3,208,222,200,105,228, 52,114,
+ 26, 57,141,156, 70, 78, 35,167,145,243,223,182, 25,135, 8,141, 48,194, 8, 35,140, 48,194, 8, 35, 62, 49,202,117,114,119,117,
+173,225, 67,233,153,102, 44, 75,209, 44,197,106, 73,174,226, 80,116,102,230, 7, 65, 0,107,214,172,105,193,165,208,157,176,172,
+132, 16, 70,207,208,212,221,152,152,248,112, 67, 46,236,227,227,195, 3, 48,156,203,229, 54,215,106,181,142, 28, 14, 39, 73,169,
+ 84,222,225,114,185,123,195,195,195, 53,159, 83, 38, 53,111,222,124,208,209,163, 71, 45,186,117,235,166,210,104, 52, 58,129, 64,
+192,249,253,247,223, 5, 35, 70,140,200,190,115,231, 78,181,102, 24,250,251,251,183, 93,189,122,117,157,182,109,219,162,121,243,
+230,242, 46, 93,186,240,130,130,130,120, 51,103,206,140,125,242,228,201,181,170,112,217,219,219,251,112, 56,156, 95, 9, 33, 52,
+203,178, 95, 21,205, 48,252,143,128, 16, 50, 8, 64, 63, 0,142, 0,146, 1, 28,102, 89,246, 64, 53,185, 58,161,208,201,221,183,
+104,215, 51, 0,103, 88,150,189,248, 55,210,215, 9, 64,119,154,166,253, 1, 64,175,215, 63,249, 84,156, 92, 46,215, 15, 0,180,
+ 90,237,211, 79,197, 73, 8,241, 43,178, 36, 87,139, 51, 48, 48,240,123, 62,159, 63, 6, 0,212,106,245,110, 19, 19,147,229,101,
+157,119,243,230, 77,117,121,161, 79,124,234, 16, 54,124,150, 87,225,247, 85, 17, 0,128, 74,127,199, 86,115, 22,241,118,111,182,
+ 44, 94,140,123, 85,237,201, 51, 82,169,244,235, 46, 93,186,204,190,120,241,226, 15, 9, 9, 9, 59, 96,132, 17, 70, 24,241,185,
+ 10, 44, 87,215, 26, 62,125,123,246,254,113,252,184, 9,132,166, 41,188,138,136,224, 76,156,242, 77, 7,111,111,111, 39,137, 82,
+233,205, 2,140, 66, 36,122, 65,211, 84,226,214,205, 63,155,122,122,120,232,245,122, 6,219,182,111,237,236,234, 90, 99,110,101,
+ 34,203,206,206,174,142,163,163,227,134, 41, 83,166,216,117,232,208,129,178,183,183, 71, 66, 66,130,217,137, 19, 39,234,254,242,
+203, 47,221,236,236,236,166,165,166,166,198, 86,231,134, 28, 29, 29, 91,216, 89,160,131,137,144,109,135, 92,130,124, 61,254, 72,
+ 85,225,114, 82, 82,210,237,234,102,146, 90,173,158, 92, 80, 80, 16,236,237,237,205,110,219,182,141,140, 25, 51,134, 37,132, 16,
+133, 66,177, 23,213, 12,225, 32, 22,139, 55,183,109,219,214,189, 89,179,102, 49,247,238,221,235,194,178,236,249,190,125,251,186,
+138,197,226, 40, 0, 30, 85,225,162,105,122, 79,120,120,184,159, 82,169, 68, 96, 96,224, 47, 0, 2,255, 67,226,234, 23,107,107,
+107,102,235,214,173,219, 27, 52,104,224, 38,151,203, 11, 70,143, 30,221,145, 16,210,150,101,217, 81, 85,224,145, 0,216,104,110,
+110,206, 91,182,108,217,131,214,173, 91,199,241,249,124,113,100,100, 36, 59,101,202,148,145,132,144,190, 0,166,176, 44, 43,175,
+ 42,167, 84, 42, 53, 91,185,114,229,235,128,128,128,123,124, 62,159,247,246,237, 91, 76,157, 58,117,252,223,225,244,242,242, 18,
+175, 92,185,242,169,183,183,119,134, 80, 40,228,189,127,255, 30,211,167, 79, 31, 77,211,116, 95,134, 97,170,197,105,103,103, 39,
+ 89,190,124,249,243,160,160,160,108,161, 80,200,139,142,142,102,191,249,230,155, 49, 85, 73,103,171, 86,173, 6, 82, 20,181,248,
+214,173, 91, 0,128, 38, 77,154,124,175, 86,171,231,127,124, 30,203,178,104,222,188,185,178, 85,171, 86, 99,110,222,188, 89,102,
+ 88,148,125,130, 89,131, 0, 96,230,247, 69,191,139,246,151,245,123,152,106, 85,149,235,188, 79, 29,194, 2,192,196,111,183, 12,
+ 45,252, 44,220,191,181, 40,116,239,230, 58,132,173,138,104,115,114,114, 26,215,168, 81,163,239, 30, 62,124,184, 47, 40, 40,104,
+234,142, 29, 59,184,221,186,117, 91, 38,149, 74,221, 58,117,234,212,247,254,253,251,171, 35, 34, 34, 54, 27,155,120, 35,140, 48,
+226,179, 18, 88,148,158,105, 54,126,220, 4, 50, 96,208,192,228,164,148, 84,198,196,212,124,208,225, 35, 71,196, 30, 30, 30,148,
+242,231,159,161, 75, 75,131,126,198,140,166, 55,111,222,212, 78,154, 54, 67,161, 82, 22,236,113,180,183, 19, 31, 58,112,208,225,
+248,177,163,205, 0,132, 87,100,185,114,116,116,220,112,236,216, 49,135, 58,117,234, 64,173, 86, 35, 35, 35, 3, 90,173, 22,189,
+122,245,162, 27, 55,110,236, 48,114,228,200, 13, 62, 62, 62,189,171, 98,201,178,181,181,181,119,175,201, 61,187,112, 90,103,143,
+182,173, 2, 37, 14, 78,181,129, 4, 6,137,177,111, 26, 94,125, 24, 58,165,185,155,115,100, 84,174,186, 91, 90, 90, 90, 74, 85,
+ 51, 41, 35, 35, 99,214,184,113,227,142,249,250,250,218, 10, 4, 2, 56, 56, 56,144,209,163, 71,167, 38, 37, 37, 45,254, 27, 98,
+165, 48,175, 41, 74, 95,250,211,208, 5,169, 63,130,179,185,185, 57,204,205,205, 1,192,233,239, 84,136,126,253,250,209,113,113,
+113, 99, 24,134,241, 46,189, 63, 41, 41,201,213,214,214, 54,229,237,219,119,126, 10,181, 38,104,194,164,185,139, 6,244,109,111,
+113,239,222, 61,116,237,218,149, 34,132, 12,170,130, 37,107, 99,112,112,112,212,138, 21, 43,120, 81, 49,111,235, 61,120,252, 4,
+ 18, 33, 79,239,236,236, 36,120,246,236, 25,127,229,202,149, 41, 63,252,240,195, 70, 0, 35,171,144,244,141,253,250,245,203,154,
+ 54,109, 90, 65,100,244,219,218, 15,195,158,179, 38, 2,158,214,222,222,150,190,119,239, 30,119,243,230,205,100,222,188,121, 85,
+230, 28, 61,122,116,210,180,105,211, 56,105, 25,217,117,147, 83,210, 89, 62,143,214, 88, 88, 88,112,174, 92,185, 66,237,217,179,
+ 71, 51,101,202,148, 42,115,118,237,218, 53,101,206,156, 57,220,136,168, 24,215, 7,161,207, 97, 34,224,106, 29, 28,236,232, 7,
+ 15, 30,208, 27, 55,110,212, 45, 92,184,208, 32, 78,150,101,183,173, 89,179, 6,167, 78,157, 2, 0, 28, 56,112, 0,174,174,174,
+ 31, 12,251, 43,148, 42, 80, 4,120,251,246,173,120,252,248,241,219, 80, 70,220,185,240, 89, 94,216, 7, 96,216,176, 97,201,134,
+ 89,161, 86, 85,173, 82,109,247,102,139,133,213,132, 9, 19,202,139,205, 53,212,167, 10, 34,171, 89,179,102,179, 15, 29, 58,100,
+115,228,200,145,111, 79,156, 56, 81,220,105, 17,111,218,180,233,235, 30, 61,122, 96,212,168, 81,179, 1, 24, 5,150, 17, 70, 24,
+241,121, 9, 44,150,165,104,154,166,144,154,146,174,253,162,125,135,145,155,182,108, 17,240,249,124,168,213,106,200,175, 93, 3,
+171, 84,194, 66, 44, 70,151, 46, 93,184,245,235,215, 55, 27, 55,122,244,232,148,100,217,118,154,166, 28, 88,150,162, 43,185,230,
+240, 41, 83,166,216,213,169, 83,231,131,157,122,189, 30,153,153,153, 48, 53, 53, 69,255,254,253,109,246,239,223, 63, 28,128, 65,
+230,126,123,123,123, 23, 15, 87,251,187, 71,119,205,112,180,179,160,128,180,163,192,251, 55,192,239, 66,184,219,213,132,123,155,
+214,146, 30,141, 26, 4,244, 95,189, 59,204,222,222,190, 89, 74, 74,202,187,170,100,210,219,183,111,239, 72,165,210,209, 10,133,
+226, 20, 0,234,238,221,187,108, 92, 92,220,184,228,228,228,247,213,205,120,134, 97,144,157,157, 13,134, 97,232,162,223,197,159,
+255, 88,101,232,215,175, 31, 29, 31, 31, 63,206,219,219,187,238,206,157, 59,145,154,154, 10,145, 72, 4,189, 94,143,166, 77,155,
+214,108,215,174, 93,116, 90, 70,182,165, 86,167, 85, 39, 37, 68, 55, 58,184,227, 93,129,159,187,251,189,195,135, 15, 55,176,182,
+182,238,111,136, 53,143, 16,210,201,212,212,148,243,227,143, 63, 82,166, 22, 14, 93, 27, 5, 75,185,207,195, 95,191,227, 9, 56,
+ 76, 78, 78,110,198,211,167, 79, 35, 22, 46, 92,216,226,244,233,211,201,132,144, 78,134, 12,153, 17, 66, 58, 57, 56, 56,152, 78,
+157, 58, 85, 46, 50,181,105,222, 48,216,142,243, 34,252, 77, 34,151, 71,105,155, 53,107,214,230,254,253,251,123,102,204,152,225,
+123,238,220,185,156,170,112,214,173, 91, 87, 52,109,218, 52,218,220,194,166,189,173,131,148,182,181,178,112, 3,128,152,152,152,
+253, 41, 41, 41, 81, 19, 38, 76,104,120,238,220,185,188,170,112,218,216,216,136,231,204,153,195,169,237,234,217,199,213,221,147,
+186,122,227,225,115, 62,159,210, 42, 20,138,204, 87,175, 94,189,153, 61,123,118,208,185,115,231,114, 13,225, 44, 40, 40, 48,117,
+114,114,130,189,189, 61, 24,133, 2, 57, 57, 57, 56,126,252, 56,242,242,242,160,215,235, 33, 18,137,240,195,186,237,136,126,241,
+ 0,183,111,223,134, 66,161, 48,253, 20,245,196,103, 85, 4,194,199, 25, 46,174,182, 50,147,134, 86, 32,172, 80, 74,120, 13,197,
+118,111,182,162,225,194, 82,150,171,132, 35, 71,142,216,185,185,185,161,117,235,214, 0,128,145, 35, 71,162,125,251,246, 56,117,
+234, 20, 46, 95,190, 28,215,164, 73,147, 55,241,241,241,107, 19, 19, 19,183, 27,155,122, 35,140, 48,226,191,141, 50,157,220, 89,
+ 66,228, 47, 95,189,226,154, 88, 88, 12,221,180,101,139,128,203,229,226,253,251,247, 8, 15, 15, 71,193, 31,127, 64,113,239, 30,
+ 82, 82, 82,144,159,159, 15, 91, 91, 91, 44, 95,181, 74,194, 19, 73, 70, 70,189,121, 67,179, 20,171, 45,213,195,254,203, 84, 77,
+ 62,159,223,188, 75,151, 46,229, 58,215, 39, 39, 39,163, 67,135, 14, 28, 14,135,211,188,156, 94,251,213,143, 94, 90, 68,106, 75,
+206, 28,217, 49,213,209,142,243, 28,120, 51, 29,200, 11, 3, 88, 21,160, 83, 3,113, 17,192,201,117,112,202,136, 34, 7, 38,247,
+119,112, 18,241,206,144,143,204, 68,149, 77, 41,117,118,118,118,117,117,117,221,213,183,111, 95, 10, 0,154, 55,111, 78, 92, 93,
+ 93,119, 56, 59, 59,187, 86, 96, 93,168,144, 83,169, 84, 62,200,202,202, 66,183,110,221,172,155, 54,109,122,181, 91,183,110,214,
+197,251,171,203, 89, 4,235,182,109,219,102,184,186,186, 30,112,113,113, 17, 24, 96, 5, 41,225,140,139,139, 27,227,229,229, 85,
+119,231,206,157, 52, 77,211,216,185,115, 39, 14, 29, 58,132, 59,119,238, 32, 53, 53, 85, 60,125,250,116,139,179, 87, 31, 92,188,
+123,231,209,233, 53,243,191,181,238,213,174,181,171,101, 78, 90,174,149,149, 85, 23, 0, 14, 6,166,179,251,252,249,243,111, 62,
+121, 21, 99, 71,113,184, 60, 1,143, 43,178,181,177,168,229, 96,107, 89,215,201,218,178,174, 41,159,107,145,155,155, 27,123,242,
+228, 73, 29, 74, 5, 33,173,140,115,245,234,213,175, 34, 98,226,173, 41,154,195,229,210, 92,190,133,185,137,245,151,221, 58,180,
+ 1, 0, 17, 77, 4,185,185,185,241,251,247,239,175, 18,231,138, 21, 43, 66,147,210,178,236,184, 60, 62, 71,192,227, 10,139, 15,
+ 88,154,153,216, 75, 4, 2, 81, 65, 65,193,251, 93,187,118,169,171,200,249,244,101,212,123, 27, 66,129,166, 64,184,150,150,166,
+118,182, 22,166, 14,118,102, 38, 14, 66, 10,194,220,220,220,119, 7, 14, 28,208, 24,202,153,154,154,138,136,136, 8,212,104,216,
+ 16, 87,175, 94, 69,205,154, 53,209,191,127,127, 12, 28, 56, 16, 34,145, 8,109,155, 52,192,220,185,115, 17, 29, 29, 93,110,185,
+ 23,251, 67, 85, 4,169, 84,122,163, 42,117, 9, 40, 28, 22,172, 72, 92,125,204, 89,214,121, 31,115, 54,107,214,108,246,241,227,
+199,109,214,175, 95,239,255,205, 55,223,196, 28, 63,126, 28,190,190,190,120,245,234, 21,156,156,156,112,240,224, 65, 76,154, 52,
+ 41,102,209,162, 69,254, 87,174, 92,145, 74,165,210, 89,213,124,142,170, 4, 35,167,145,211,200,105,132, 65, 22, 44, 45,131, 51,
+147,167, 78,239,126,236,248,113, 49,159,207,199,219,183,111,145,154,154,138,115,103,206,232,207, 55,104, 80, 64,211, 52,219,251,
+216, 49,211,254, 3, 7, 18, 46,151,139,186,117,235,162, 75,151, 46,162,209, 99, 39,164,114,228,138, 67,149, 20,138,157,173,173,
+ 45,190,251,238, 59, 44, 95,254,161, 63,238,240,225,195,177, 97,195, 6,152,154,154,130, 16, 98,103,200, 13, 56, 58, 58,246, 27,
+ 57,179,141,179, 89, 45,179, 20, 54,108, 31,151,208, 98, 43,208, 98,128,226, 1, 34, 17,160, 85, 3,106, 10,170,199,119, 50,217,
+ 54,155,115, 59, 6,228, 57, 37,171, 15,246, 3,112,216,208, 76,178,177,177, 89,112,244,232, 81,219,153, 51,103,178,121,121,121,
+ 36, 37, 37,133,157, 61,123,182,237,252,249,243, 23, 0, 24, 86,157,140,151,201,100, 75, 71,142, 28,217,113,247,238,221,246,125,
+250,244, 49, 47,234,129,167,200,100,178,165,127,167, 64,185, 92, 46,125,237,218, 53,171,109,219,182, 13, 92,182,108, 89,189,118,
+237,218, 57,100,103,103,191, 75, 74, 74,234, 91,153,197,141, 97, 24,239,157, 59,119,130,166, 11,141,144, 20, 69,129,207,231,131,
+207,231,195,220,220, 60, 59, 38, 38, 70,239, 98, 47,226,203, 83,146,114, 44, 57,150, 92,226,232, 96,109,225,224,216, 90, 46,151,
+223, 1, 32, 49, 48,137,190,173, 91,183, 14,191,118,255,133,126,194,240,182,117,197, 60,138,107, 42, 18,210, 34, 62,151, 16,150,
+213,107,180,234, 38,155,247, 93,223, 93,187,118,237, 96, 0, 6, 13, 17, 19, 66,252,124,125,125,111,221, 15,139,196,211,151, 49,
+ 9,182, 86, 98,235, 78,109,155,121,150, 92,176, 81,227,129,165, 78, 55,104,105, 27, 14,135,227,215,160, 65,131,228,184,164, 76,
+216,217,152,127, 32,164, 45,109,236,218, 3,128, 60, 39,103,179,163,163,163, 71,209,122,144, 6,165, 51, 40, 40, 40,237, 78, 72,
+ 36, 28,108,173,172,138,118,155,149, 62, 39, 61, 41,105,155,139,139,139, 7, 33,196,217, 16,206,147, 39, 79, 34, 52, 52, 20, 75,
+235,213,195, 76, 23, 23,216,218,218,226,143, 63,254, 0,203,178, 48, 49, 49, 65,118,118, 54, 14, 31, 62,140,118,237,218,253,237,
+198, 66, 42,149,222,144,201,100,173, 75, 28,211, 63, 1,138, 57, 13,181,142,221,185,115,231,248,145, 35, 71,190,118,115,115,195,
+136, 17, 35, 92,247,236,217, 19,227,233,233,233,218,188,121,115,220,185,115, 7,179,102,205,138, 89,180,104,145,235,240,225,195,
+177,119,239, 94, 36, 38, 38,254,102,108,230,141, 48,194,136,207, 70, 96,197,197,197,101,123,123,123, 59,185,185,185, 81,106,181,
+ 26, 57, 57, 57,184,116,225,130,254,224,225,195,231,212,106,245, 20,138,162,120,123,127,253,117,155,131,163, 99,155,222,125,250,
+ 16,173, 86,139,246,237,219,243,175, 93,187,102,253, 44, 46, 46,175,162, 11,210, 52, 93, 98, 61,250,250,235,175,177,126,253,122,
+ 0,192, 87, 95,125,245,167,192,211,106, 13,246, 69, 18,153, 48, 93, 90,181,175,111, 22, 47,249,217, 76,211, 84,155,239, 18,109,
+250, 64,146, 47, 10, 2,197,231, 64, 36, 4,163, 22,234,162,178,219,135, 68,191,173,237, 35, 82,166,214,110,230, 25,140, 67, 15,
+ 78,116,169,138,192, 18,137, 68,141,196, 98, 49, 34, 34, 34, 50, 3, 3, 3,179,205,204,204,204,221,221,221,109, 68, 34, 81,163,
+234,102,124, 74, 74,202, 91, 39, 39,167,150,189,123,247,158, 68, 81, 84,123,134, 97,174,102,100,100,108, 74, 73, 73,121,107,200,
+255,157,156,156, 38,176, 44,187, 16,192,209,226,125,106,181, 26, 20, 69,129,101, 89,116,239,222, 29, 43, 86,172,240,185,122,245,
+ 42,110,221,186,101, 53,120,240,224, 7, 82,169, 52,155, 16, 50, 42, 49, 49,177, 92, 43, 89, 70, 70, 6,182,109,219, 6, 14,135,
+ 3, 11, 11, 11,152,154,154, 66, 40, 20,162,117,235,214, 41,107,214,172,113, 63,112,224,128, 54, 59, 53,149,136,242,114, 84,196,
+218, 90, 8,105,205, 78, 67,251, 15,120, 0,224,136,161,247,110, 98, 98, 34,226, 67,149, 71,233,149,212,234, 69,155, 57, 98, 30,
+143, 8,121, 28, 8,152, 2,122,238,138,101,172,144,176,220,226, 33, 83, 67, 33, 20, 10,249, 18, 62,171,226, 10, 40,173,152, 98,
+ 63,201, 56, 43,135,195, 17, 8,184, 80,148,119,156, 71, 17,154, 16, 34, 2,160,170, 74, 58, 77,248,250,114,207, 23, 82,160, 41,
+138, 18,150,199,217,175, 30, 97,143, 76, 42, 22, 56, 37, 70, 53,232,116, 58, 52,106,212, 8, 7, 79, 93,199,249, 63,238, 33,253,
+253, 51, 76,153, 48, 18,238,238,238,184,116,233, 82,133,105, 42,246,193, 50,160, 83, 80, 40,136,190, 55,175,252,228, 34,191,171,
+202,134, 6, 75,115,250,172,138,168,112,118,162,179,179,243, 88,127,127,255, 97, 39, 78,156, 64,155, 54,109,208,173, 91, 55,120,
+122,122,186, 14, 30, 60, 24, 0,208,178,101, 75, 44, 88,176,192,117,224,192,129, 56,121,242, 36,206,159, 63,143,160,160,160,169,
+ 82,169, 52, 85, 38,147,109, 49, 54,247, 70, 24, 97,196, 63, 46,176, 0, 64,160,209,120,170,182,109,131,252,234, 85,240, 47, 95,
+198, 89, 63,191,124,157, 78, 55, 67, 38,147,197, 3,128,189,189,253,180,195, 71,142,220,109,255,199, 31,102,234,136, 8, 56, 63,
+127, 14,142,135,135,191,161, 23, 46,182, 94,169,213,106, 0,192,175,191,254,138,156,156, 28,228,228,228, 64,167, 51,120, 45, 97,
+112,249,104,110,103, 93, 19, 73,136, 2,195,161, 76,222,121, 22, 52, 54, 81,154,202,156,226,236,229, 57, 60, 15, 68, 36,212,147,
+ 40,178, 85,141, 9,173,134, 50,189, 0,206,205,221,193, 65,217,195,143,229,129,162,168,226,151, 99,102,104,104,104,247,230,205,
+155,159, 1, 96, 83,188,191,186, 72, 76, 76,124, 3, 96, 74,117,254, 75,211,244,194,219,183,111,219, 29, 62,124,120,210, 79, 63,
+253,196,150, 22, 88,197,223, 57, 28, 14, 88,150,133, 68, 34, 1,135,195,177, 63,121,242,164,253,151, 95,126,185, 25, 64,185,229,
+ 36, 22,139, 97,103,103, 7, 62,159, 15, 83, 83, 83,200,115,179, 36, 91,127,156,223, 90,108,105,111, 53,101,234, 12,106,236,216,
+177,225, 27, 54,108,168,225,224,233,233,253,226,197,139,183,189, 6, 12,188,119,234,212, 41, 69, 21, 28,220,159, 69, 68, 68,208,
+238,110, 46, 60, 70,171, 96, 36, 60, 64,248,244, 39,134,111,234, 0, 33, 77,131, 67,192,138,196, 18,187,248,164,164, 56, 0, 73,
+134, 16,178, 44,251,244,221,187,119,196, 89,106,207,201,147, 43,179, 37, 28,134, 31,251,248,209,171, 58, 13, 27,121, 3,128,242,
+241,189, 19, 2,207,122,166,178,220, 60,145,147,147, 83,140, 33,156, 58,157,238,105, 66, 66, 2,177,178,178,226, 70, 69,189,249,
+205,218,204, 84,106,101,111,223, 26, 0,212,153,105,183,136, 66, 41,227,114,185, 78,105, 25, 25, 73, 58,157, 46,206,208,116,198,
+198,198, 18,103,169, 61,231,204,185,243, 7, 29, 36, 98, 71, 11,145,192, 92, 72,129, 8, 89, 38,135,175,211, 37,139,196, 18,105,
+ 66, 98, 98, 10,203,178,229,250, 9,110,101, 38, 13, 45,252,246,203,254,143,172, 59,184, 30, 18, 11,115, 90, 15,174, 86,142, 7,
+199, 15,163,247,228,111, 12,122,158, 86, 47, 25,126, 96,245,146,225,229,134,103,248, 72, 16, 65, 54,238,111,182, 60,219,189,111,
+252,133, 83, 86,177,131,123,167, 78,157,230,237,216,177, 67, 92,252,251,213,171, 87,104,222,188,240, 81, 94,188,120, 49, 58,118,
+236, 8, 63, 63, 63,188,122,245, 10,181,106,213,194,241,227,199, 65,211, 52,119,236,216,177,179, 1, 24, 5,150, 17, 70, 24,241,
+ 95, 69,185, 10,129, 97, 89, 70,151,153, 9, 86, 85,216,145,230,241,120, 44,203,178, 37,141, 27,151,203, 21,155,155,155, 19,174,
+179, 51,136,160,200,213,135, 16,253, 39,176, 26, 64,175, 55,156, 70,175, 7, 13,162, 1,139, 63, 67,252,200,133, 4, 63,216,180,
+195, 20,201, 55, 72,230,155,151,126,195,129,213, 49,208,163,106,214, 17, 66, 8, 43,151,203,161, 82,169, 44,221,220,220,206, 41,
+149, 74,203,162, 23, 38,251, 79, 21,156, 78,167,139,225,112, 56, 24, 62,124, 56, 80,184,228, 17,212,106, 53,158, 60,121, 2,149,
+ 74, 5,181, 90,141,187,119,239, 34, 39, 39, 7,106,181, 26, 87,174, 92, 65,173, 90,181,192,225,112, 28, 43,226,101, 24, 6,182,
+182,182,176,183,183,135, 74,158, 43, 57,182, 99, 67,215, 85,139,190,179, 25,228,198, 82,191,108, 92,203,184,185,185,101,213,175,
+ 95,223, 74, 36, 18,101, 5, 6, 6,102,159, 60,121,242,116, 85, 66, 52, 0, 56, 51,103,206, 28,223,224,224, 96, 23, 11, 19,137,
+ 70,192,167, 33,208,201, 89,129, 42,131,229, 40,210,217, 90,206, 46, 26, 72, 76, 26,245,233,211, 71, 15,224,140,161,156, 83,166,
+ 76,169,233,237,237,109, 99, 97, 38,201,229, 80, 72,228,233,245,137, 89, 33,247,174, 0, 0,207,198, 78, 1,137, 73,163,193,131,
+ 7,107,171,194, 57, 99,198, 12, 55, 39, 39, 39,107,138, 34,217, 58,141,230,125, 73,125, 80, 42, 82,104,129, 80, 14,129,176,197,
+168, 81,163,116, 85, 76,167,171,175,175,175,181,165,185, 89, 54,151, 34,113, 60,189, 46, 94,196,234, 19,248, 90, 77,154,192,206,
+ 62, 31, 18,147,102,131, 6, 13, 42, 55,157,197,214,171,143, 45, 67, 28, 14, 7,137,137,137, 40,144, 61, 3, 47, 49, 2,126, 38,
+ 92, 52,118,176,129, 68, 34,169, 92, 96,141,123, 69,194, 99, 89, 18, 30,203, 18,140,123, 69,202,250, 93,134,200,170,176,238, 87,
+232,215,181,221,251, 70,117, 56,207,159, 63,191,178, 71,143, 30,218, 1, 3, 6,224,202,149, 43, 32,132,224,206,157, 59, 72, 76,
+ 76, 68,199,142, 29,193,178, 44,158, 60,121, 82, 34,190,250,246,237,139,110,221,186, 21, 92,188,120,241, 7, 99, 83,111,132, 17,
+ 70,124, 54, 2, 75, 43, 16,188,100, 38, 79,134,197,233,211,224, 70, 69,161,111,239,222,102, 2,129, 96,163,163,163, 99,160, 84,
+ 42,109, 38, 18,137, 54,207,152, 62,221,212,102,249,114, 72,111,221, 66,242,213,171,208,114,185,143,171,114,113,133, 66, 81, 44,
+ 96,160, 42, 18,114, 22, 22, 22, 85, 18, 88,140, 14,247,147,210,162,192,135, 11, 24,176,249, 23,115, 91, 62, 28, 20, 51,223,238,
+108,110, 29,247, 55,114,158,251, 18,219,198,118, 27,107, 53,127, 40, 39,156,124,190,133, 16,178, 68, 25,244, 96,238, 87, 37,157,
+ 74,165, 50, 71, 46,151,163,110,221,186,214,161,161,161,110,238,238,238, 86, 69,130,230,209,223,201,124,169, 84,218, 36, 32, 32,
+224, 72, 96, 96,224,219,128,128,128, 35, 82,169,180, 73, 21,254,254,203,227,199,143, 65,211, 52,198,142, 29,139,188,188, 60,104,
+ 52, 26,100,100,100, 32, 46, 46, 14,106,181, 26, 9, 9, 9,120,253,250, 53,212,106, 53,222,189,123, 87,146,199, 21, 65,171,213,
+194,212,212, 20,217, 25,169,146, 67, 91,215,118, 93,182,104,158, 40, 39, 58, 20, 9,178, 20, 48,122,133,108,193,130, 5, 49,110,
+110,110,119, 84, 42,149,151, 78,167,235,194,178,236,161, 42, 8, 85, 10,192, 19,119,119,247, 14,107,214,172,105,190, 96,197, 46,
+129, 41,157,199,242, 77, 5, 12,223,148,207,242,189, 26, 99,244,194, 77,194,117,235, 86,223, 15, 9, 9,201, 49,112,102, 30, 5,
+224, 73, 96, 96, 96,147,228,228,228,230,126,126,126,254, 14,117, 61,132, 2, 39,105, 58, 95, 90, 43,131, 85, 20, 92,165,106,214,
+238,190,103,207,158,219,183,110,221, 74,169, 10,167,189,189,125,243,109,219,182, 5,212,172, 89,179,161,208,220, 92,148,159,157,
+189, 67,149,157,185,139,107,227, 32,162,172,109,250, 29, 59,118,236,143,115,231,206,101, 84,133,211,211,211,179,217,242,229,203,
+253, 2, 2, 2, 2, 29, 61, 60,133, 34, 39,231, 52,158, 83,173, 84,145,111,144,144,170,229,218,119,215,174, 93,215,239,222,189,
+155,110,104,192, 81,138,162,192,229,114, 33,145, 72,112,243,230, 77, 12,234,221, 9, 14,118,102,240,240,244, 68,235,113,147,113,
+238,220, 57,240,249,124,252, 93,107,235,199, 48, 68, 16, 85, 85,124, 85,198, 41,147,201,182,132,132,132,252,212,191,127,127,180,
+111,223, 30, 79,159, 62,197,172, 89,179, 98,206,157, 59, 7, 0,120,250,244, 41,150, 45, 91, 22,115,255,254,125,140, 24, 49, 2,
+205,155, 55,199,147, 39, 79,246, 25,131,143, 26, 97,132, 17,159,141,192,114,179,178, 50, 85, 42, 11, 18,110,221,186,165,161, 40,
+ 10, 98,177, 24,253, 6, 12,160,126,252,241,199, 22, 61,253,252,174, 13,110,210,228,194,225, 67,135, 2,252, 3, 2, 10,215,219,
+161, 40,156, 58,117, 74,145,147,147,157, 81,179,102, 77, 11, 67, 47,158,150,150, 86,210,251, 86, 40, 20, 96, 89, 22,166,166,166,
+ 85, 18, 88,138,124,234,234,237,155,225, 89,172,254,235,184, 46,111,214,107, 86, 36,247, 12,206,102,244,156, 28,189, 22, 57, 10,
+ 22,121, 74,112, 30, 82, 86,193,195,221,123,105, 98,219, 7,191,126,248, 54, 44, 67,205,170,171, 52,251, 33, 43, 43,107,222,132,
+ 9, 19, 50,236,237,237,137,169,169, 41,236,237,237,169,209,163, 71,167,199,199,199, 47,169,110,198,251,248,248, 12,108,210,164,
+201,153,176,176,176,190,135, 15, 31,118, 57,114,228, 72,223, 38, 77,154,156,241,241,241, 25,104, 32,197,225,149, 43, 87,202,249,
+124, 62, 26, 55,110,140,188,188, 60,168,213,234, 74,183, 74, 5, 43,195, 64, 40, 20,226,200,174, 13, 29,150, 45,154, 39,202,140,
+120,136,103,119,174,224,226, 91, 85,193,194, 21, 63, 61, 16, 10,133,213,186, 95,119, 59, 73,131, 6, 82,211, 87,223,140, 28, 32,
+155, 51,123,182,249,243,231,207,197,211,191,153,198,202,210,178, 89, 97,215,117, 52,213,122, 1,245, 82,105, 67,122,116,107,139,
+ 31, 22,207,234, 0, 3,134, 78,125,236, 36, 13,234, 75, 77,195,191, 29, 59, 40,102,202,148, 41,226,149, 43, 87, 22, 52,111,222,
+ 60, 59, 39, 39, 71,100,110,239, 24, 32,176,179, 15,150,101,101, 75,154, 54,107,246,100,228,200,145,242,170,114, 46, 88,176, 64,
+114,251,246,109, 65,167, 78,157,242,114,115,115, 37, 66, 19,147, 96,158,153, 69,203,180,156, 28,179,206,157, 59,135,245,239,223,
+ 95, 91, 29,206,215,175, 95, 11,154, 54,109,154,151,147,147, 35, 49,179,119,108, 36,180,115,104,145,152,153,101,218,184, 73,147,
+176, 49, 99,198,168, 43,226,236,183,233, 79,113, 34, 22,139, 51,189,189,189, 49,127,254,124, 44, 94,188, 24,253,250,245, 67,236,
+219, 88,180, 26, 49, 22,117,134,143,199,153,251, 15,145,152,152,136,185,115,231,194,221,221, 29, 20, 69, 37,125,202,198,163, 34,
+ 65, 84,158, 35,188, 79, 29,114,163, 34, 63,171,202, 68, 86,135, 14, 29, 70,244,232,209, 3,167, 78,157, 42,113,104, 31, 50,100,
+ 8, 0,192,223,223, 31, 51,102,204,112, 93,179,102, 77,204,186,117,235,208,164, 73, 19, 56, 59, 59,127,105,108,230,141, 48,194,
+136,127, 2,101,199,193, 50, 19, 13,216,177,101,179,249,164,105, 51,228,222,222,222,150, 14, 14, 14, 32,132,160, 83,167, 78,164,
+201,197,139,166, 92,169, 20,214, 13, 26,148, 44,104,120,251,214, 45, 92,187,118, 77,190,127,247, 47, 78, 35, 71,143,238, 14,148,
+239, 51, 91,122, 88, 45, 35, 35, 3, 14, 14, 14, 37,179,213,100, 50, 25, 28, 28, 28,192,227,241, 64,211, 52,167,104,233,151, 10,
+213,150,131,131,195,175, 43,150,189,156,147,224, 59,163, 78,176,152, 34, 23,228,201,208,179, 44,184, 68, 15, 40, 88,104,245,128,
+ 74,203, 34,168, 54,109,245,135, 26,150, 15, 95, 94,142,117,112,112,248,181, 42,153, 20, 19, 19,115,221,209,209,113, 92, 65, 65,
+193, 81, 0,212,131, 7, 15,152,183,111,223, 78, 52,212, 33,189, 44,136, 68,162, 89, 71,143, 30,181, 90,178,100, 73,214,181,107,
+215,114,218,182,109,107,190, 98,197, 10,171,129, 3, 7,206, 66, 25,193, 32,203,120, 17, 41,164, 82,233,190,164,164,164,137, 13,
+ 27, 54, 68,102,102, 38, 52, 26, 13, 66, 67, 67,225,238,238,142,144,144, 16,120,120,120,224,241,227,199,240,244,244,132, 94,175,
+135, 82,169,132,222, 0,245, 42,139,127,111, 34, 86,101,153,201, 30, 94, 64,228,243, 80,156,143, 81, 21,172,222,125,232,124, 3,
+255, 32,121,241, 12,195,170,192,211, 94, 82,207,201,206,250,242,138,197,223,219,189,187,126, 8,199,119,111, 98,174,159, 63, 95,
+ 95,100,134, 97,205, 6, 76, 29,168,209,194, 5, 4,130,150,205,154,162,187, 85,164,158, 87, 3, 41,127,188,172, 56,146,185,167,
+189,164,158,212,214,250,210,234,229, 75, 76,163, 47,238,197,225,237,235,216,163,191, 30, 8, 80, 2,245,220,220,220,186,211, 52,
+109, 15, 64,161,215,235,163, 97,224, 18, 52,101,113,254,113,246,108,160, 18,168,231,236,236,220,157,203,229,214, 0,160,210,106,
+181,239, 63, 5,103,221,186,117,187, 19, 66,156, 0, 40,139,124,174,170,180, 84, 78,251,246,237, 87,239,218,181,107,186, 74,165,
+178, 42,101,109, 37,167, 78,157,130, 70,163, 33, 60, 30,143,145, 72, 36,136,139,139, 99, 1, 36,177, 44, 59,254, 83, 53, 28,125,
+250,244,193,131, 7, 15, 22, 3, 88, 88,209,121,153,153,153, 28, 43, 43, 43, 93,101,194,203, 80,206,135, 15, 31,174, 28, 51,102,
+204,204,139, 23, 47, 38, 44, 90,180,200,127,248,240,225, 56,121,242, 36,106,214,172,137,215,175, 95, 99,250,244,233, 32,132,184,
+174, 89,179,230,201,193,131, 7, 29,147,147,147,215, 26,155,121, 35,140, 48,226,179,177, 96, 17,134,112,221,235,214,213,171, 11,
+242,247,140, 30, 49,162,224,229,203,151,208,235,245,208,233,116, 80, 62,122, 4,249,197,139,208,235,245, 96, 89, 22, 15, 31, 60,
+192,148,201,147,243,149, 5,249,187,106,215,118, 97, 9,203,150, 76,215, 39,132,180,255,152, 91, 93,202,140,162, 80, 40,160, 80,
+ 40,192,225,112, 96,106,106,138,212,212, 84,240,249,124,136, 68, 34,248,249,249, 81,206,206,206,221,254,146,182,143, 56, 67, 67,
+ 67,181,200, 85,245, 61, 53,124,106,146,115,129,142, 29,103, 81, 27,181,120,162,146, 89,136, 14,102, 4, 95,250,113, 97,207, 75,
+103,159,237, 29, 36, 35,186,156,190,161,161,161,218,138, 56, 63,134, 84, 42,245,240,241,241,217,210,167, 79, 31, 10, 0, 90,180,
+104, 65,213,171, 87,239,103,169, 84, 90,238,146, 54,149,113, 10,133, 66, 1, 0, 92,189,122, 53,243,246,237,219,157,174, 94,189,
+154, 89,122,191, 33,156, 20, 69,237,216,186,117, 43,196, 98, 49,116, 58, 29,212,106,117,137,255, 85,233, 79,141, 70, 3, 27, 27,
+ 27,252,241,199, 31, 96, 24,230, 92,101,233,244,174,239,155,159,195,177, 72,217,119,230, 26, 46,188,211,228, 87, 85, 92,149,230,
+172,235,104,226,233, 96, 99,125,101,245,143, 75,109,179,222,132, 34, 33, 33,129,189,116,241,220,125, 5,203, 38,102,228,176, 63,
+100,230,177, 62,249, 74, 86, 28, 84, 27,241,231,126,158,206,126,219, 4, 58, 16,176, 21,113,214,115, 52,241,116,178,181,190,180,
+118,245,143,166,217,111, 66,145,148,156,140,243,231,206, 60, 81,176,108, 34,203,178, 23, 89,150,157,160,211,233, 26,233,116,186,
+ 70, 44,203, 78, 40, 79,180, 84,149, 83,163,209, 4,107, 52,154,224, 79,201,201, 48, 76, 48,195, 48, 6,115,254, 57,131, 16,152,
+ 63,127,254,163, 91,183,110,245,127,244,232, 81,187,226,237,197,139, 23,109, 99, 99, 99,219, 38, 36, 36,180,137,157, 37,160,159,
+ 63,127,206,121,252,248, 49,247,241,227,199, 53, 67, 66, 66, 46, 26, 90, 63, 43,120, 22, 74,139,252, 69, 50,153,140,148,201, 57,
+238, 21,217,188,230,235,253, 71,142, 28,177,255,100,156, 0, 34, 34, 34, 54,239,218,181,171,150,147,147,147,227,192,129, 3,177,
+119,239, 94,236,218,181, 11, 64, 97, 36,251, 82,150, 43,187,144,144,144, 58,101, 5, 25,173,238,189, 27, 90,231,141,156, 70, 78,
+ 35,167, 17,229, 11, 44,194,232,245,122, 6,118,246,118,166,105,169,169,155, 38, 76, 24,159,177,100,201, 18,229,205,155, 55,161,
+142,136,128, 50, 44, 12, 87,174, 92,193,212,169, 83, 11,198,142, 27,151,164, 44,200,223,224, 96,111,103,163,215, 51, 32,132,169,
+208, 66, 66, 81, 84, 76, 84, 84, 84,113,111, 27,155, 54,109,210,105, 52, 26,152,154, 22, 6,153,222,185,115, 39,195,178, 44,218,
+181,107, 39,225,114,185, 6, 45, 65,146,152,152,248, 44, 55, 78,214,241,216,128,241,209,175, 14,157,206,242,205,208, 96,136, 72,
+138, 1,129,128,143,105, 28, 18, 31,254,146,117,111, 75,207,232,130,204,248, 78,137,137,137,207,170,154, 73,246,246,246, 11,127,
+255,253,119,187,208,208, 80, 86,165, 82, 33, 49, 49,145,157, 53,107,150,157,189,189,253,194,234,102, 60,203,178, 36, 59, 59, 27,
+132, 16,166,168,178, 50,197,251, 13,229, 72, 72, 72,120,113,228,200,145, 83,215,175, 95,135,179,179,115,137,200,250, 88, 96,113,
+ 56, 28, 16, 66,176,117,235,214,108, 66,200,119,149,241, 10, 4, 2,236, 60,122,241,194,183, 91,143, 31, 62,124,245,209,241,234,
+ 90,174, 0,128, 79, 81,139, 86, 46,253,222, 46,253,213, 3,242,226,254, 53,230,208,211,164, 20,157,158,157, 84,230,201,121, 50,
+182,168, 82, 86,236,219, 67,209,139, 86,254,184,196,188,120,248,242,247, 80, 89, 46,209,179,147,255,222,147,240, 63,194,249, 15,
+162,112,166,159,140, 72,165, 82, 28, 59,118,172,202, 62, 88, 62,117,200, 95,156,219,171,203, 41,147,201, 86,125,241,197, 23,178,
+ 69,139, 22,109, 81, 42,149,242,162,206,155,102,237,218,181,107, 38, 77,154,148,146,152,152,104,180, 92, 25, 97,132, 17,255, 40,
+202, 28, 34,100,104,234,238,182,237, 91, 59, 31, 58,112,208,129,166, 41,135,216,216,183,143,191, 26, 53, 42,241,214,173, 91, 86,
+220,186,117, 27, 81, 20,197,168,231,204,185,159,159,155,147,249,235,158,221,181,106,215,118,241, 43, 90,236,153,101,104,234,110,
+ 69, 23,204,204,204,220, 59,109,218,180, 70,251,246,237,227,173, 90,181, 74,158,152,152,120,249,193,131, 7,157,183,108,217, 34,
+220,185,115,103, 65, 94, 94,222,233,243,231,207,247,104,211,166,141, 78,173, 86, 23, 24,122, 35, 41, 41, 41,225,132, 16,111,106,
+237,174,193,175,183,254,254, 5, 75,147,102, 80,241, 64, 88,221, 93, 74, 39,191,146, 34,147,253,206,178,172,174, 58,153, 36, 18,
+137,252, 68, 34, 17,222,188,121,147,213,168, 81, 35, 53,159,207,231,185,184,184, 88,139, 68, 34,191,191, 33,176,216,172,172, 44,
+176, 44,203, 1, 64, 24,134,225, 20,237,175, 82, 12, 39, 30,143, 55,112,228,200,145,167,182,108,217,210,161,125,251,246,112,117,
+117,133, 86,171,133,135,135, 7,212,106, 53,220,221,221,161, 82,169,176, 97,195, 6,228,231,231, 79, 79, 76, 76,204,170,140, 83,
+ 40, 20,130,207,231,195,211,187,126,129, 80, 40, 68,117,197, 21, 0, 72,184,148,235,235,179,187,145,154,145,206, 28,126,154,146,
+ 82,160,209,119,140, 74,149,191,252,248,188, 2, 61,228,109, 70, 76, 73, 4, 0, 21,131,252, 10, 57,249,112,141, 60,183, 19, 41,
+169,233, 56, 20,150,148, 45,215, 48,157, 94,151,193, 89,165,116,254,143,112,246,219, 20,129,214, 95, 27,126,238,145,113,159,166,
+161, 40,109, 85, 50, 20,225,177, 44,193,118,111, 22,219, 55,149, 25,227,170, 58,156,165, 58, 85,219, 1,108, 7, 0,103,103,231,
+232, 41, 83,166,204, 76, 76, 76, 92, 95, 20,239,106,161,177,105, 55,194, 8, 35, 62, 75,129, 21, 19, 19, 31,238,234, 90, 99,238,
+241, 99, 71,155,177, 44, 69,179,132,200, 1,234,204,203,151, 47,179, 75,159,231,102,101,101, 58,114,204,200, 1,132, 33, 92, 66,
+ 24, 61, 67, 83,119, 99, 98,226,195, 43,105, 24,159, 15, 27, 54,108, 83,155, 54,109, 70,233,245,250, 85, 81, 81, 81,151, 61, 61,
+ 61,159,116,234,212,233, 91,157, 78,183, 38, 58, 58,250,178,151,151,215,149, 67,135, 14,205,210,235,245,223, 87, 81,180,232, 80,
+232,255,181,239, 83,102, 18, 69, 81, 75, 88,150, 53, 23,137, 68, 57, 33, 33, 33, 7, 90,182,108, 57,136,101, 89,115,138,162,114,
+170,203,169, 86,171, 39,231,229,229,217, 12, 28, 56, 80, 75, 8,241,236,213,171,215,156,168,168, 40,174, 92, 46,143,169, 10,207,
+187,119,239, 84, 46, 46, 46, 61,190,254,250,235, 93, 60, 30,175, 29, 10, 67, 54,176,165,242, 4, 44,203, 66,175,215,159,150,201,
+100, 21,230, 11,151,203,205,239,220,185,179, 73,165, 86, 41, 62, 63,223,208,244,229,169,245,211,182, 94,123,185, 92,169,101, 89,
+ 29,195,142,123,157, 34, 47,115, 10,217,163,215,108, 61,131, 57,149,204,180,141,151,194,151,171,180, 12,163, 99,216,241,229,113,
+ 86, 5,255, 43,156, 0, 48,129,218,180, 31,219, 55,149, 56,188, 23, 15, 27,126,252,251, 63,133, 34,139, 19, 11,160,242,197,206,
+139, 44, 86,149,173, 93, 88, 37,206,143, 80, 52, 75,208, 56, 83,208, 8, 35,140,248,188, 80,252, 2,254, 79,108, 0,218, 27, 57,
+141,156, 70, 78, 35,167,145,211,200,105,228, 52,114,254,219, 54,202, 40, 49,141, 48,194, 8, 35,140, 48,194, 8, 35, 62, 45, 8,
+128,246,229, 88,182, 12,142, 21, 85,157,217, 4,149,241, 27, 57,141,156, 70, 78, 35,167,145,211,200,105,228,252,255,199,249,175,
+129,113,136,208,200,105,228, 52,114, 26, 57,141,156, 70, 78, 35,167,113,136,208, 56, 68,104,132, 17, 70, 24, 97,132, 17, 70, 24,
+241, 89,195, 40,176,170, 1, 66,200, 87,132,144,139,132,144, 23,132,144, 75,132,144,175,254, 6,151,136, 16, 50,167, 20,223, 5,
+ 66,200, 44, 66,136,192,152,211,159,117, 29,160,141,185, 96, 68,117, 81, 20,188, 56,180,162, 96,197, 70, 24, 97,196,255, 54, 56,
+229, 29,112,115,115,187, 71, 81, 84,157,226, 69, 98,139, 35,163, 23,127,255,248, 55, 0,176, 44, 27, 27, 30, 30,222,180, 60,206,
+ 58,117,234,148,112, 22,111,132, 16,104,181, 90, 83,154,166,243,202,226,212,235,245, 9,175, 95,191, 14,250,140, 94,172,251,173,
+172,172,152,109,219,182,109,246,245,245,173,155,151,151, 87, 48,102,204,152, 46,132,144,246, 44,203, 14,173, 34, 87,125, 66,200,
+175, 13, 27, 54, 60, 62,105,210,164, 35, 62, 62, 62,102, 10,133,130,127,224,192, 1,135,109,219,182,221, 38,132,140,100, 89, 54,
+220, 88, 77, 63, 31, 56, 58, 58, 6, 16, 66, 54,185,187,187, 7, 73,165,210,199, 0, 38,202,100,178,167,198,156,249,175, 62,131,
+163,249,124,126, 39,119,119,247, 70, 42,149, 42, 43, 54, 54,246,145, 94,175,255,158,101,217,228, 79,196,111, 14,224,123,129, 64,
+ 16,236,230,230, 86, 35, 42, 42, 42, 94,163,209, 60, 4,176,132,101,217,156, 79, 33,174,130,131,131,239,252,248,227,143,214,223,
+125,247,221, 29,169, 84,218, 92, 38,147, 69, 26, 75,214,136,127, 2, 53,107,214,180,144,203,229,187, 56, 28, 78,128, 64, 32,112,
+ 48, 49, 49,129,137,137, 73,178, 64, 32,120, 34, 22,139, 71,157, 59,119, 46,219,152, 75,159, 88, 96,209, 52,237,252,232,209, 35,
+187,226,197,151, 25,134, 1,195, 48, 96, 89,182,228,179, 24, 69,113,150,208,166, 77, 27, 77,133, 23,227,112,106,132,134,134,218,
+153,152,252, 25,106, 73,163,209,192,215,215,151, 9, 11, 11,179,251,120, 33, 97,181, 90,141,192,192, 64,246,115,201, 44, 66,200,
+ 16,107,107,107,249,251,247,113, 45,149, 42, 77,240,152,201,223,205, 29,210,247, 11,203,187,119,239,162,123,247,238, 52, 33,228,
+ 43,150,101,127, 53,144, 75, 68, 8,249,101,238,220,185, 43,185,124,177,221,177,115,119,232, 13, 59,246,191,247,247,168, 77,166,
+ 76,153,104, 50,105,210,164,199, 62, 62, 62,187, 9, 33, 45, 88,150, 85, 25,171,234,103, 81,254,156, 26, 53,106,156, 90,190,124,
+185, 83,114, 82, 18,214,173, 95,223, 24,192, 22, 0,141,141,185,243, 95, 43,131, 57,139, 23, 47, 94, 62,120,240, 96,232,245,122,
+ 40, 20, 10,233,155, 55,111,234,205,159, 63,191, 23, 33,164, 17,203,178, 49,127,147,223,214,221,221, 61, 98,218,180,105, 86,141,
+ 26, 53, 2, 69, 81,200,201,201,145,222,190,125,187,241, 47,191,252,242, 21, 33,196,139,101,217,180,191,115, 13, 75, 75,203,223,
+214,172, 89, 99, 45, 16, 8,176,103,207, 30,235,254,253,251,223,150, 74,165, 45,170, 43,178, 8, 33,148,181,181,245, 20, 0,109,
+ 25,134,225, 3,120,152,149,149,181,140,101, 89,141,177,198, 24, 81, 17,108,108,108, 70,231,229,229,109, 22,139,197, 60, 51, 51,
+ 51,136,197, 98,112,185, 92,240,249,252,154,150,150,150, 53, 77, 76, 76,186, 12, 26, 52,104,226,129, 3, 7,118, 25,115,235, 19,
+ 10, 44,138,162, 32, 18,137,112,248,240, 97,208, 52, 13, 46,151, 11, 46,151, 11, 30,143, 87,230,247,154, 53,107, 26,210, 16, 0,
+ 0,206,156, 57, 3, 51, 51, 51,152,155,155,195,203,203, 11,132, 16, 8, 4, 2,252,241,199, 31,224,114,185,224,112, 56,224,114,
+185, 8, 10, 10,250,192, 82,246,223, 64,191,122,132, 5,202, 14,222,216,181,158, 9,186, 79,254,177, 79,129, 82,211, 14,128, 60,
+ 59, 43, 43,235,241,241,227, 50,127, 15, 15,222,225,195,135,253,172,172,172, 6, 1, 48,116, 33,233,169,141, 27, 55, 62,205,242,
+ 36,246,195,134,143, 24, 54,138, 67,105,190, 26,247,237, 15,241, 73,233,242,177, 99,199, 30, 63,125,250,244,176,141, 27, 55, 70,
+ 77,156, 56,113, 10,128, 85,134,166,223,197,197,229, 30, 77,211,197,150, 71,217,155, 55,111, 2, 62,147, 23,163, 20,192,106, 0,
+ 90, 0, 43, 89,150,141, 40,117,204,131,199,227,173,210,104, 52,153, 0, 22,178, 44, 27,255, 57, 62, 44, 78, 78, 78, 94, 67,135,
+ 14,181,201, 76, 79,199,186,245,235,139,119, 7, 25,178, 40,249,167, 70, 96, 96, 96, 29,161, 80,184, 26, 64,128, 74,165,114, 2,
+ 0,145, 72,148,200,178,236, 9,133, 66, 49, 47, 52, 52, 84, 81,205,114,170, 1,160, 30, 10,103, 24,151, 5,118,249,242,229, 81,
+115,230,204,137,249,111,115, 18, 66, 92,236,237,237,127,236,215,175, 31,206,157, 59,135,243,231,207,107, 69, 34, 17,103,248,240,
+225,100,226,196,137,150,211,166, 77,235, 2,224,167,191,153,181, 93, 22, 47, 94,108,229,237,237,141,163, 71,143,226,217,179,103,
+ 10,119,119,119, 81,235,214,173,193,225,112,172,230,206,157,219, 25,192,222,191,115,129,172,172,172,101, 75,151, 46,221,183,105,
+211, 38,211,216,216, 88, 44, 89,178,196,102,210,164, 73, 55,165, 82,105, 43, 67, 69, 86,145, 11,193, 20, 0,109,104,154,110, 49,
+124,248,112,221,228,201,147,185, 20, 69,105,215,175, 95,111,251,203, 47,191, 12,176,177,177, 9, 72, 79, 79,207,135, 17,168,192,
+144,160, 97, 24,134, 11, 64,200,178,172,170,178,223,255,159,238,221,218,218,122, 66, 86, 86,214, 22,169, 84, 10, 91, 91,219,146,
+119, 45,195, 48,144,203,229, 80, 40, 20,168, 83,167, 14,207,219,219,123,231,164, 73,147,184,155, 54,109,218,106,172, 49,159, 72,
+ 96, 17, 66,192, 48, 12,184, 92,238, 7, 2,171, 88,252,124,252,189,204, 86,243,163,169,154, 20, 69,145,252,252,252, 18,113,101,
+102,102, 86, 98, 9,211,106,181,127,225,213,235,245,160, 40,138,173,136,179,156,180, 79, 0,240, 7,203,178,209,134,100, 66,105,
+206, 35,147,188,176, 79, 48,107, 80,113,200,243, 46,223, 22,126,238, 3,112,245,205,184, 85,171,154, 53,171, 49,101,193,198, 69,
+138, 12, 89,250,220,161,221, 93,220, 29,172, 69,146,236,212, 28, 75, 79,207,238, 0, 82,170,144,206,230, 99,199,142, 61,122,252,
+234, 75,161, 80,200,227,113,104,154,219,188,129,135,117, 13,115,218,220, 20, 48,143,143,137,186,247,213, 87, 95,141,153, 56,113,
+162, 85,177,192, 50,228,222,185, 92,174,243,195,135, 15,237, 56, 28, 14,154, 53,107,166,175,202,189,127, 42,148,195, 57, 63, 37,
+ 37,101,160, 82,169, 68, 80, 80,208,151,132,144, 54, 44,203, 62, 33,132, 52,232,209,163,199,237, 35, 71,142,152,134,133,133,161,
+113,227,198, 34, 0,253,255,193,116,254, 5, 82,169,244, 50,128, 47,104,154,134, 90,169, 84,175, 94,251,193, 50,119, 33,165,197,
+213,127, 35,157,254,254,254, 94, 98,177,248,222,218,181,107,205,124,124,124, 8,151,203,133, 78,167, 67, 84, 84, 84,141,253,251,
+247,143,123,252,248,113,231,192,192, 64,159,143, 23, 53, 55,240,222,235,221,190,125, 91,238,234,234, 90,102,221,201,205,205,229,
+120,120,120,180, 2, 16,243, 15,112, 38,164,164,164,244,252,226,139, 47,198, 39, 39, 39, 71,232,116,186,217, 0,234,219,216,216,
+132,245,238,221, 27, 34,145,168,141, 33, 2,171,162, 50,178,179,179,235,209,180,105, 83,108,218,180, 9, 43, 87,174,108,207,178,
+236, 31,132,144,118,185,185,185, 87,191,252,242, 75, 88, 88, 88,244, 44, 75, 96, 85,161, 46,121, 52,106,212,104,231,244,233,211,
+ 77,207,157, 59, 7,119,119,119,228,228,228, 96,196,136, 17,118, 27, 55,110,188, 33,149, 74, 91, 23,139,172,242, 56, 9, 33, 62,
+ 2,129, 96,239,129, 3, 7, 76, 92, 93, 93, 93,121, 60, 30,229,234,234,138,204,204, 76, 40,149, 74,193, 15, 63,252,208, 64, 36,
+ 18, 61,253,233,167,159,246, 2,232,253, 79, 62, 71,132,144, 28, 0,102, 0, 44,170, 50,188, 90,193,189,231, 0, 16,148,106,239,
+ 32, 20, 10, 33, 20, 10, 33, 16, 8, 16, 27, 27,123,140,166,233, 17, 69, 29,185, 74, 57,201,159, 61,120, 63, 66,200, 35,154,166,
+ 43,252,253,241, 82,102,255, 68,187, 68, 8,113, 38,132,108, 0,208, 6,133,126,212, 55,237,236,236,166, 38, 39, 39,191, 55,148,
+ 83, 42,149, 90,231,231,231,255, 36,149, 74, 97,103,103, 87, 44, 54, 17, 20, 20, 4,165, 82,137,151, 47, 95,130, 97, 24, 68, 71,
+ 71,195,204,204, 12, 13, 26, 52,248,105,241,226,197, 71, 23, 46, 92,152,241,159,188,247,127,141,192, 42, 86,178, 28, 14,231, 3,
+129,245,241, 86, 44,134, 8, 33,149, 46, 84, 76, 8,161,212,106,117,137,184, 50, 55, 55, 47,249,175, 78,167, 43, 83, 96, 85, 83,
+153,251, 50, 12, 83,135, 16,178,221, 80,145,245, 49,134, 13, 27,246, 23,127,142, 57,115,230, 36,164,167,167, 51,125, 58,250, 73,
+ 34, 46,200,146,220, 44, 77, 68,182,166,166,181,133,150, 86, 22,249,249,249,183, 0,152, 84,225, 18, 78,222,222,222,230,155,247,
+ 93,144,141,249,102,249,210, 32, 87,107, 51, 95,103, 27, 75, 7,115, 17,223,132, 34,114,161, 78,155, 32,145, 72,124, 0,100, 84,
+ 37,221, 20, 69,193,204,204, 12,167, 79,159, 70,177,255,220,103, 2, 75,133, 66,129,172,172, 44,108,219,182,205,108,252,248,241,
+215, 9, 33, 83,123,246,236,185,233,200,145, 35,146,236,236,108,104, 52, 26, 0, 80,124,134,207,201, 82, 75, 75,203,150,109,218,
+180,225, 31, 60,124,152,207,178,172, 28,133,203, 17,229,179,108, 57, 11, 87,255, 7, 33, 20, 10,191, 93,182,108,153,153,143,143,
+ 15,201,200,200, 0,195, 48,160, 40, 10, 54, 54, 54,152, 57,115,166,112,254,252,249, 78,175, 95,191,158,139,106, 44, 59, 3,128,
+148, 39,132, 0,192,204,204, 76,135,170, 79,142, 41,147, 83,167,211,145,102,205,154,205, 76, 79, 79,111,160, 80, 40,126, 48,224,
+197,163, 3,112,186,104, 43,110, 83,158, 70, 68, 68, 40,250,247,239, 47,170, 93,187,118,240,223,205, 91, 15, 15,143, 38, 92, 46,
+ 23, 15, 31, 62, 84, 1,184, 89,180,251,230,179,103,207, 84,189,123,247, 22,212,168, 81,163,137,161, 92, 82,169,212,195,205,205,
+237,138,141,141,141,168,120,218,118,215,174, 93,185,171, 87,175, 54, 77, 72, 72,128, 70,163,193,156, 57,115,208,173, 91, 55, 88,
+ 90, 90, 98,228,200,145,246, 59,118,236,248, 13, 64, 96, 5,109,168,144,207,231,255,250,230,205, 27,119, 71, 71, 71,209,131, 7,
+ 15,224,235,235,139,244,244,116, 36, 39, 39, 35, 63, 63, 31,201,201,201, 24, 53,106,148,221,186,117,235,164,159,209, 51,148,205,
+227,241, 32, 22,139, 45,178,179,179,115,254, 6,143, 0, 0,191,180,184, 18, 8, 4, 16, 8, 4,248,216,197,228,255, 35, 8, 33,
+ 78,132,144,112, 30,143, 39, 16,139,197, 60,138,162, 32,145, 72, 58,214,168, 81,227,229, 87, 95,125, 85,255,215, 95,127,125,103,
+ 8,143, 82,169,252, 85, 36, 18,113,109,109,109, 1, 0, 29, 58,116,192,240,225,195,145,150,150,198,200,100, 50,120,121,121, 81,
+ 55,110,220, 64, 74, 74, 10,158, 62,125,138, 70,141, 26,113,173,172,172,126, 5,208,217, 40,155, 62,161, 5,139,195,225,148,108,
+101, 89,174,138,183,143, 29,223,203,227,212,235,245,176,183,183,135, 88, 44,134, 88, 44, 46,237,204,254, 23,126,150,101,171, 53,
+ 68, 40,145, 72, 48,120,240, 96,118,235,214,173,227,139, 68,214, 27, 67,255,219,111, 83, 68,137,213,234, 99,248,250,250,222,157,
+ 55,111, 94,167, 75,151, 46,101, 5,185,214,230, 72,100,239,243,133,102, 22, 22,112,174,217,245,171,126, 3,238, 1, 56, 80,133,
+100,202, 84, 42, 21,207,205, 89,172,166, 40, 37,169, 41,224,152, 58, 74,120, 2, 7, 75, 75, 39,158, 90,149,106,102,105,201, 47,
+ 26, 50,147, 85, 70, 84, 60,121,128, 16, 2, 11, 11, 11,110,209, 39,236,236,236, 4,245,235,215, 79,161, 40, 10, 44,203,202,158,
+ 63,127,110,240,112,161,171,171,107, 8, 69, 81,206,132,144, 15, 38, 36,148,222, 24,134, 73,120,249,242,165,161, 19, 16,230,249,
+249,249,181,218,178,101,139,173,187,187, 59,182,109,219,102,118,244,232,209,189,191,253,246, 27,178,179,179,241,238,221, 59,140,
+ 26, 53, 42, 23,133,195,136,159, 21,172,172,172,238,244,235,215, 15, 59,119,238,100,139, 58, 17, 18, 66,136,175,185,185,249,235,
+240,240,240,255,186,159, 11, 69, 81, 29,189,188,188, 72, 78, 78, 14, 24,134, 1, 77,211, 37, 29, 33,154,166,241,237,183,223,138,
+ 70,141, 26, 53,191, 73,147, 38, 51,185, 92,110,174, 78,167, 59,152,159,159,255,195,139, 23, 47, 62, 43,103,213, 22, 45, 90,124,
+ 19, 31, 31,223,173, 86,173, 90,103,254, 70,111,159,109,216,176,161, 26,128,136,166,105,238, 39,120,129,209, 69,237,145,178,120,
+113,120,150,101,117,129,129,129,202,162,151, 59, 93,133,122,243,219,254,253,251,157,157,157,157,161,213,106,161,211,233,144,159,
+159,143, 27, 55,110, 64,165, 82, 65,167,211,193,203,203, 11, 43, 87,174, 84, 78,156, 56, 81,120,232,208,161, 84,133, 66, 49,164,
+ 18,218,169, 71,143, 30,149, 56, 58, 58,138, 20, 10, 5, 98, 98, 98, 16, 24, 24,136,188,188, 60,200,229,114, 20, 20, 20, 64,163,
+209, 32, 55, 55,215, 66,175,215,171, 63,155, 23, 13,135, 3,129, 64, 0, 30,143,151, 93,171, 86, 45, 16, 66,132,239,222,189,171,
+206,144,155, 25,128, 92, 46,151,203, 47, 45,172, 4, 2, 1,158, 63,127,126,168, 60,235, 85, 69,245,167, 42,191, 63, 3,129,181,
+129,199,227, 9,172,172,172,120,197,251, 52, 26, 13,207,210,210, 18,181,107,215,222, 4,160,139,129,109,136,191,165,165, 37, 8,
+ 33,224,241,120, 24, 51,102, 12, 30, 61,122,116, 34, 33, 33,225,171,212,212, 84, 20, 20, 20,252,106,110,110,222, 43, 53, 53, 21,
+122,189, 30,111,223,190,133,191,191,191,191, 81, 50,125, 98, 11, 86,121,130,234, 99,193,101,136,181, 68,163,209,152,116,237,218,
+149, 41,253,146, 46,250, 31,169, 64, 96, 85,171,130,115,185, 92,211, 9, 19, 38,228,109,221,186,117, 28, 33,100, 7,203,178, 81,
+213,205,164, 51,199, 14,216,175,252,126,206,247, 86,210,218,110,179,103,207,230,244,238,221,251,218,158, 61,123, 26, 90,121,123,
+127,113,253,242,126,251, 77,179,231,158, 60,117,234, 84,129,161, 14,238, 69,184,123,226,196, 9,199,233, 83, 38,242,190,255,118,
+234, 69, 51,119, 27,190, 9,177,146, 8, 85,242, 52, 19,176, 10, 65, 93,175,110,103, 47, 93,138, 7,112,199,128,198,203,249,225,
+195,135,118, 22, 22, 22, 0, 10, 39, 7, 88, 88, 88, 96,235,214,173,150,197,150, 66, 67,134, 11, 63,122, 0,157,195,194,194,236,
+ 76, 76, 76, 32,151,203, 75, 94, 8, 44,203,150, 52,150, 45, 91,182,172,202,139, 48,134, 16,210,242,235,175,191,190,181,101,203,
+ 22, 91, 55, 55, 55, 44, 93,186, 20, 25, 25, 25,136,139,139,195,144, 33, 67,114, 99, 98, 98,218,148,246,205,250, 28,208,160, 65,
+ 3,246,238,221,187,184,120,241, 34,190,252,242, 75,114,234,212, 41,141, 94,175,231, 37, 38, 38, 62,255,167,210,164,211,233, 76,
+121, 60, 94,201,176,122,177,176, 42,222,156,157,157,113,245,234, 85, 78, 65, 65, 1, 39, 61, 61, 93,252,203, 47,191, 76, 14, 9,
+ 9,113, 4, 48,232,159,204,203,173, 91,183,214, 26, 51,102, 76, 28,135,195, 97, 59,117,234, 52,244,253,251,247, 61, 29, 29, 29,
+255,184,126,253,250, 90, 0, 85, 14, 87, 80,191,126,253, 16, 14,135,227,204,178, 44,239,228,201,147, 90,189, 94,207,107,208,160,
+ 65,202, 71,193, 16,161,211,233, 18, 34, 35, 35,131, 12,225, 19, 10,133,188, 29, 59,118,104,149, 74, 37,207,215,215, 55,165, 20,
+ 15,239,212,169, 83, 90,173, 86,203,243,244,244, 12, 49,100,102,115,102,102,230,144,105,211,166,221, 62,124,248,176, 13, 77,211,
+120,255,254, 61, 50, 50, 50, 96, 97, 97,129, 95,127,253, 21,181,107,215,198,149, 43, 87, 50,117, 58,221,232,157, 59,119,206, 87,
+ 40, 20, 67, 12,240,193,106, 25, 28, 28, 92, 43, 59, 59, 27, 22, 22, 22,144,203,229, 8, 9, 9,129,143,143, 15,100, 50, 25, 40,
+138,130,133,133, 5,182,108,217, 82, 64, 8,201,252, 28,158, 33,154,166, 75,172, 76,165, 68,145,178, 73,147, 38,184,115,231,206,
+239, 85, 17, 69, 44,203,170,185, 92,238, 7,194,170,248, 59, 77,211, 85, 30,242,208,235,245, 60, 66,136, 63,138,252, 3, 43,251,
+253, 25,160,149, 88, 44,230,149, 81,215,120, 30, 30, 30, 45, 12, 37,225,243,249,214, 34,145,168,144,176, 85, 43,164,166,166,234,
+ 93, 93, 93, 7,244,239,223, 95, 11, 0,227,198,141, 27,144,154,154,170,212,233,116, 52, 77,211, 72, 75, 75, 67,237,218,181,173,
+141,146,233, 63, 96,193,170,200,114, 85,218,130, 85, 89, 37,164, 40, 42, 59, 52, 52, 84, 34,145, 72, 74,246,105,181, 90,248,251,
+251, 51, 12,195,144,143,175, 83,156,142,234,130,203,229,154,126,247,221,119,217, 91,182,108,249, 10,192, 60, 67,254,115,100,146,
+ 23,246,125, 36,174,182,173, 92,178,233,231,149,203,172,162, 47,238,193,174,141,107,244, 92,190, 73,136,191,191,127,203,156,156,
+ 28,149,133, 68,133,228, 12,156, 96, 89,246,183, 42,244, 66, 40, 0,135,238,223,191,255,164, 67,135, 14, 15,118, 31, 58,110, 37,
+139,137,185, 47,200, 77, 79, 50,171,235,206,225, 57,213,234, 37, 87,171,185,189,122,245, 50, 1,176,209, 0, 62,196,197,197,225,
+222,189,123, 48, 51, 51,131,153,153, 25, 44, 44, 44, 74,190, 87, 39, 15,139,135,109,207,158, 61, 11,137, 68,130,162,169,187,144,
+ 72, 36,224,243,249, 40, 93,134, 85, 16, 89,145,132,144,169,199,143, 31, 63,184,124,249,114,100,102,102, 66, 46,151, 99,225,194,
+133,136,137,137,153,198,178,236,147,207,233,225,240,245,245,101,239,223,191,143,187,119,239, 66, 46,151,227,231,159,127,134,163,
+163, 99, 91, 0, 11,254,201,116, 49, 12,195, 43,182, 40,150, 22, 86,165,173, 88, 52, 77, 67, 40, 20,194,198,198, 6,115,231,206,
+229,125,249,229,151,221,254,201, 52,175, 90,181,170,238,134, 13, 27,126,217,183,111,223,133, 33, 67,134, 28,126,241,226,197, 8,
+115,115,243,231,215,174, 93, 91, 38, 16, 8,152,106, 90, 69,156,159, 60,121, 98, 87,250,145,103, 24, 70,172,211,233,160,211,233,
+160,213,106, 81, 80, 80,128,246,237,219, 27,204,247,232,209, 35, 49, 0, 44, 88,176,128, 11, 64,204, 48, 12,244,122, 61,138, 57,
+ 11, 10, 10,184,237,218,181,115, 54,200, 68, 45,147, 69, 74,165,210, 22,253,251,247,191,119,240,224, 65,203, 90,181,106, 33, 49,
+ 49, 17,137,137,137,168, 91,183, 46, 54,110,220, 40,103, 89,182, 89,145,168, 58,101,224,109, 75, 45, 45, 45,185,113,113,113,208,
+233,116,240,247,247,199,150, 45, 91, 48, 96,192, 0,212,175, 95, 31,185,185,185, 8, 15, 15,199,222,189,123, 45,121, 60, 94,159,
+127,250, 25,162, 40,234, 47,226,170,244, 86,205, 14,134,153, 80, 40,204, 21, 8, 4,252, 98,255,171, 71,143, 30, 85,217,122, 85,
+170, 93,122, 82,149,223,255, 36, 76, 77, 77, 97, 98, 98, 2,173,246,195,219,148, 72, 36,168, 91,183,174,193, 60, 38, 38, 38,164,
+216,136,161,213,106,145,148,148,164,127,241,226,133, 62, 32,160,112,144,195,209,209, 81,255,240,225, 67,189, 82,169,164, 77, 77,
+ 77, 81, 52, 42, 66, 96,196,167,179, 96, 21, 91, 43, 42,178, 92, 21,127, 47,182, 68, 85,246,176,209, 52,141,139, 23, 47,150, 84,
+ 20, 47, 47,175,146,107,125,106,129,101,109,109, 45, 15, 14, 14, 54,139,143,143, 63, 80,157,255, 23,139,171,229, 75, 23, 90,101,
+190,122,128, 4, 89, 18, 50, 83,181,161,119,158,191,189, 12,224, 50, 0, 96,187,247, 13,140,123,101,176,184,242,182, 21,251, 53,
+144,154,158,248,162, 75,183, 26,253,199,126, 67, 77,156, 56,177,241,136, 17, 35, 50,134, 12, 25, 50, 81, 36, 18,121,235,116,186,
+140,179,151, 46, 69,247,234,213,203, 65,167,211, 13,103, 89,214, 16,159,164,132,193,131, 7,243, 8, 33,176,179,179,227,238,219,
+183,207,210,204,204, 12, 35, 70,140,200,122,251,246,173,182,168, 39,150, 82,197,219, 79,104,214,172,217, 95,134, 5,139, 95,236,
+197,150,129, 42,138, 54,255,110,221,186,237, 60,124,248, 48,210,211,211, 33,151,203,193,229,114,177,122,245,106,196,197,197,253,
+ 68, 8,121,241,185, 52,102,126,126,126,236,195,135, 15,241,252,249,115,168, 84, 42,140, 30, 61,186,180,143, 97,135,127,122,164,
+ 32, 49, 49, 17,251,247,239, 7,195, 48, 24, 50,100, 8,106,213,170, 85, 34,172,146,147,147,177,123,247,110,232,245,122,140, 25,
+ 51, 6, 53,107,214,132, 86,171, 21,182,110,221,154,115,227,198, 13,221, 63,145,224,233,211,167, 71,159, 56,113,226, 66,124,124,
+124,231,149, 43, 87,182, 34,132, 48, 51,103,206, 92, 97,102,102,246,183,102, 95,102,229,228,225,245,155,247, 37, 2,232,227,205,
+214,198,170,202,124, 81, 49,241, 37,255,215,235, 75,243,233, 97,109,101, 89, 37,190,164,164,164,130,140,140, 12,249,232,209,163,
+ 45,118,238,220, 73,234,214,173,139,216,216, 88,112,185, 92,152,154,154, 22, 68, 68, 68, 84, 53, 52, 67, 98,102,102,166, 59, 77,
+211,188, 55,111,222,192,197,197, 5,193,193,193,248,225,135, 31,144,158,158, 14,157, 78, 7, 59, 59, 59, 70,171,213,134,169,213,
+234, 91,255,244,115, 84,218,202, 84,122,187,123,247,238,239, 52, 77, 83, 0,206, 0,168,146,192,102, 89, 86, 93,179,102,205, 15,
+184,171, 99,189,250, 15, 90,236,254, 99, 51, 19, 61, 60, 60,110, 74, 36,146,110,175, 95,191,254,192,138, 53,120,240, 96,141,155,
+155,219,109, 67,121,204,204,204,178,120, 60,158,181, 82,169,196,253,251,247,225,237,237,205,203,201,201, 89, 78, 8,153, 83,212,
+185, 92,158,146,146,194,147, 74, 11,221,248, 60, 61, 61,145,151,151,151,101,148, 76,159, 88, 96,149,101,185, 42, 75,100,209,116,
+229,174, 9,132, 16, 40, 20, 10, 72, 36,146,146,173,216,207,170, 44,129, 85,228,251, 83,173, 33,194, 34,113, 37, 58,120,240,224,
+239, 27, 55,110,188,107,232,255, 74,251, 96,109, 95,187,116,101,177,184,122,118,247, 10, 78, 69,228,164,207, 90,190,126, 67,117,
+ 51,219,199, 86,226,235, 96,111,115, 99,245,143, 75,204,162, 47,238,197,225,237,235,216,103,143, 30, 53, 28,255,232, 81,159,241,
+227,199, 91, 1, 72, 2,144, 8,224, 62,128,159, 12, 20, 87,136,140,140, 44, 9,238, 26, 16, 16, 16,111,105,105,105, 41, 18,137,
+ 32,147,201, 84, 79,158, 60,169,150,163,107, 84, 84,212, 39, 13,238, 74, 8,241,232,222,189,251,173, 99,199,142, 73,178,179,179,
+241,254,253,123,204,156, 57, 19,155, 55,111,134,153,153, 25,206,157, 59,103,218,173, 91,183, 27,132,144,166,255,116,112, 85,127,
+127,127,246,241,227,199,120,247,238, 29,116, 58, 29,122,244,232, 81,233, 4,142,255,178, 5,139,157, 54,109, 26,118,238,220, 9,
+154,166,241,213, 87, 95, 33, 55, 55,183,228,184,149,149, 85, 89,199,232,162,231,253, 31, 17, 88, 28, 14,135,189,121,243,230,202,
+ 86,173, 90, 33, 62, 62,190,115, 96, 96,224,207, 35, 70,140, 72,252,187,188,150,230,166,240,243,113,133, 74,165,130, 74,165,130,
+ 84, 42, 69, 94, 94, 30,162,163,163,161, 82,169, 96,111,103, 81,101,190,128,250,117, 75,248,236,236,236, 32,151,203,241,246,237,
+ 91,168,213,106,216,216, 88, 86,165,206,215,232,216,177,227,245,223,127,255,221,250,247,223,127, 87,247,238,221,155,191,100,201,
+ 18, 98,102,102,134,212,212, 84, 84,211,189,231,230,157, 59,119,106,181,111,223,222,243,213,171, 87,184,121,243, 38,212,106, 53,
+ 2, 2, 2, 16, 21, 21,133, 38, 77,154, 32, 63, 63,255,225,227,199,143, 79,127, 14,117,181,120,248,174,120, 11, 9, 9, 57,196,
+227,241, 88, 0,213,178, 54, 21, 35, 46, 46, 78,224,235,235,171, 18, 10,133,252, 34,177,246,183,248, 62,113, 91,247,183,102, 38,
+ 86, 4, 87, 87,215,105,206,206,206,237, 3, 2, 2,240,234,213, 43,158, 64, 32,192,208,161, 67, 53, 93,186,116,209,112, 56, 28,
+131, 39,220,136, 68,162, 87, 38, 38, 38, 45, 85, 42, 21,212,106, 53,174, 92,185, 2,107,107,235, 89,221,187,119,159,154,148,148,
+ 4,153, 76,198,231,243,249, 37,254,183,173, 91,183, 70, 70, 70,198, 43,163,100,250, 68, 2,171,184,142, 24, 50, 60,104,168, 15,
+ 22, 69, 81, 80,171,213,144, 72, 36, 16,139,197,144, 72, 36, 37,215, 33,132,148, 41,176,170,131, 26, 53,106, 32, 56, 56, 88,116,
+248,240,225,223,214,172, 89,115,175, 58, 28, 71,127,223,239,104,206, 20,212,144, 61, 60,143,200,231,161, 56, 17,158,157, 62,107,
+249,250, 41,221,251, 12, 74,249, 88,144, 29, 25,103, 64,207,195, 78, 82,223,201,222,250,198,218, 85,203,205, 50, 95, 61, 64, 82,
+114, 50,206, 63,124, 28,170, 42,244, 13,251,225, 19, 62,220, 40, 30, 91,255,156, 32, 16, 8,166, 29, 61,122, 84,146,157,157,141,
+152,152, 24, 12, 25, 50, 36,251,221,187,119, 95,247,236,217,115,243,229,203,151, 45, 45, 44, 44,112,249,242,101,211, 26, 53,106,
+ 44, 7,208,237, 31,108, 28, 89,189, 94,143,204,204, 66,247,149,102,205,154,125, 86,226, 10, 0, 66, 66, 66,120,221,187,119,255,
+ 3, 64,219, 87,175, 94,129, 97,152,123,161,161,161,205,138,143, 87,116,204, 16,253,150,151,151,199, 53, 53, 53, 45,243,101,197,
+227,241,120, 85,181, 56,148,230,188,123,247,238,138,181,107,215,158,152, 49, 99,198,155,191,201, 89,166, 5,171, 91,183,110, 80,
+168, 52, 72, 72,201,129, 94,175,131, 66,147,250,183, 44, 88,221,186,117, 67,129, 82,141,184,164, 76,232,116,122,228, 41,116,134,
+214, 35,241, 23, 95,124,113,233,224,193,131, 14,247,239,223,135, 74,165, 98, 66, 66, 66,222,142, 29, 59,214,108,212,168, 81,214,
+229,133,182, 49, 0, 27, 7, 13, 26,212,247,238,221,187,153,158,158,158, 86, 15, 31, 62, 68,106,106, 42,116, 58, 29,218,182,109,
+ 11, 62,159, 31,183,124,249,114, 30, 12,112, 45,248,111, 9, 44,129, 64,128,240,240,240, 98, 97, 53,236, 83, 9, 33, 62,159, 95,
+237, 97,198,255, 85,252,246,219,111,137,123,246,236,241,113,114,114,218, 48,108,216,176, 54, 82,169,148, 18, 8, 4, 55, 57, 28,
+206, 84, 0,239, 13,229,225,241,120, 35, 44, 44, 44,162, 41,138,162, 19, 19, 19,241,230,205, 27,196,198,198, 2, 0,191,160,160,
+ 0,118,118,118, 37, 70,147, 65,131, 6,161, 70,141, 26,250,168,168,168, 17, 70,201,244,137, 45, 88, 75,150, 44,193,246,237,219,
+ 49,110, 92,197, 42,226,204,153, 51,192, 71, 67,132, 69,203,199, 92, 45,253,242,215,235,245, 88,184,112,225, 7,255, 43, 30,126,
+250,250,235,175, 63,224, 60,121,242,228, 95,134, 8, 63,230, 44, 11,169,169,169,175,142, 28, 57,242,120,213,170, 85, 15, 13,108,
+ 12, 75, 56,139,125,176,250, 14, 30,154,180,105,197,247, 47,246,157,185, 86, 63, 73,193, 38,205, 90,190,126,198,199,226,202, 80,
+ 78,111, 7, 19,111,103, 59,235,155,107, 86, 45, 55, 47,182,134, 29, 12, 75,206,129,142, 29, 87,149,194, 50,228,222,117, 58, 93,
+130,191,191, 63, 15, 48,108, 88,208, 16,206,106,136,148,191,112,170, 84, 42, 60,120,240, 0, 0, 48,114,228,200,236,119,239,222,
+181,100, 89,246, 37, 33,228, 85,199,142, 29,111, 94,186,116,201,146, 97, 24,160,156,176, 20,255,173,116, 22,229, 27, 56, 28, 14,
+220,221,221,171, 44,174,254, 91,233, 76, 74, 74, 26, 55,126,252,248,237, 42,149,138, 35,151,203,199, 25,122,172,178,116, 30, 57,
+114,228,141,187,187,123, 43,148, 31,138,129, 41,178,176, 86,155,115,195,134, 13, 0,224,249,119, 56,203,179, 96, 29, 58,116, 8,
+ 12,195,160,134,131, 5, 84, 42, 21,196, 98,113,149, 56, 63,182, 96, 29, 62,124, 24, 12,195,160,166,163, 21,212,106,117,185,157,
+151,143, 57,173,173,173,215,237,219,183,207, 57, 34, 34, 2, 9, 9, 9, 88,191,126,253,251,180,180,180, 46, 28, 14, 71,240,243,
+207, 63,223,232,218,181,171,189, 78,167, 83, 85,181,220, 89,150, 85, 17, 66, 70, 52,109,218,244,215,101,203,150,197,122,121,121,
+213,108,214,172,153, 69, 70, 70, 70,218,147, 39, 79,222,110,223,190,221, 68,167,211,141, 40,111,232,233,191,249, 28, 1, 64, 98,
+ 98,226,105, 0,220,170, 10, 43, 67,210,249,232,209,163,195, 69,220,231, 13,225,254,111,221,251,223,157,153, 88, 89, 58, 71,140,
+ 24,145,128,143,226,155, 85, 53,157,151, 47, 95,126, 55,120,240,224,165,245,235,215, 95,100, 98, 98,130,200,200,200,146,176, 72,
+197,117,156, 16,130,126,253,250,225,235,175,191,198,165, 75,151,150,246,237,219,247,221,127, 58, 63,255, 53, 2, 75,175,215,199,
+191,123,247,206,113,223,190,125, 52, 33, 4,191,253,246, 27, 74, 79,217,167,105, 26, 20, 69,129,195, 41,164,120,240,224,129,174,
+178,152, 83,122,189, 62, 62, 36, 36,196,126,239,222,189,220, 98,147,113, 98, 98, 34, 24,134, 97, 82, 82, 82,168,223,127,255,189,
+196, 26,198,225,112,240,224,193, 3,157, 70,163,137,171,234, 77, 69, 70, 70,126,146,222,219,173,151,239,166, 94, 58,127,210,166,
+113,112,139,108, 51, 43,171, 50,187,174,197, 17,223, 43,172,220, 28,234,135,149, 63, 46,177, 40, 22, 87,135,194,146,179,149, 42,
+125,155, 87,105, 5,207, 62,117,129, 62,123,246,172,233,103, 90,215, 22,182,106,213,138, 1, 96, 3, 96,126,241,172,206, 34,145,
+213,184,110,221,186, 51, 0,136, 0, 44,252, 39,173, 87,165, 67,131,124,110,150,171,210, 8, 13, 13,141, 5,208,174,170,199, 42,
+ 67,223,190,125, 99, 80, 70,192,207,191,131,255, 4,103, 49, 50,179,115, 17,243, 46, 17,133,206,232, 12,244,239, 83, 74,252,166,
+180, 90, 29, 50,115,171, 20, 70, 14, 89, 57,121,136,126,155, 88,180, 52,152, 30,122,189,172,136,175,208,209,157,205, 42,168,148,
+131,203,229, 54,223,176, 97, 67, 23,138,162,168, 7, 15, 30,168, 86,173, 90, 21,159,150,150,214,131,101,217, 56, 0,144, 74,165,
+173, 79,158, 60,249,155, 1, 33, 25,202,235,248,134, 19, 66,154,204,158, 61,123, 10,128,230, 0,106, 2,136, 67,225,140,227,141,
+159, 89,196,241, 97,255,163,220,213,198,255,202,204,196,223,127,255,125,241,215, 95,127,205, 9, 14, 14,158,219,176, 97, 67,234,
+237,219,183, 72, 77, 77, 5,135,195,129,135,135, 7, 58,116,232, 0, 23, 23, 23,230,220,185,115, 63,246,234,213,107, 49,140,248,
+116, 2, 43, 61, 61,189,227,176, 97,195,174, 80, 20, 85,187,244, 48, 94, 89,159, 0,192, 48,204,187,148,148,148, 10,131,144,165,
+167,167,119, 92,184,112,225, 21, 14,135, 83,187, 84,252, 43, 85, 70, 70,198,215,253,250,245,219,194,229,114, 5,165,173, 93, 12,
+195,188, 79, 74, 74,250,175, 58, 20,127, 28, 7,171, 99,151,158,233,127,151,211,132, 71,185, 69,158,219,137,148,212,116, 28, 10,
+ 75,206,202, 83,235, 91, 71,166,201, 95,252,155, 42, 26,203,178,169, 0,190, 46,231,216, 27, 0,227, 62,131, 52,146, 34,145,101,
+156, 45,243, 63, 0,157, 78,151,208,190,109,107,124, 28,150,225,227,223,122,189, 62,193, 80,190,118,109, 90,149,203, 83,252,189,
+ 50, 62,154,166,103, 4, 7, 7,211, 51,102,204, 72,185,112,225,194, 31, 89, 89, 89,211, 89,150, 45, 81,102, 69,179, 6, 3,255,
+102, 93, 85,161,112,133,135, 85,198,154,240, 89,182,119,255, 19, 51, 19,183,108,217,178, 96,214,172, 89,123,157,157,157,247, 55,
+111,222,220,211,205,205,205,204,212,212, 20,185,185,185,121, 89, 89, 89,175,207,158, 61, 59,100,216,176, 97,177,198, 18,253,196,
+ 2, 43, 45, 45, 77, 14,160,201,167,188, 88, 37,156,181, 62,155, 46,151,106,213, 1,108, 95,245,193, 58,132,197,226,171,204,223,
+149, 72,131, 28,133,110,226,198, 75, 47,215,168,116, 44,163,209, 49, 35, 35, 83,229,225,198,170,247,217, 54,140, 70,113,245, 63,
+130, 23, 47, 94, 4,125,142,124,106,181,122,106,211,166, 77,127,210,235,245,107,181, 90,237, 29, 99, 73, 25,241, 57, 99,213,170,
+ 85,177,197,239,229,126,253,250,209, 0,112,228,200, 17,189, 49,103,254,131, 2,235,223,138, 35, 47,255,124,193,126, 44,156, 42,
+251, 93, 30, 94, 39,231,223,252,187, 61, 86, 35,140, 48,226,127, 70,164,199, 1,232, 97,204, 9, 35,254,231,222,127, 70, 97,245,
+ 73, 65, 25,179,192, 8, 35,140, 48,194, 8, 35,140, 48,226,211,130, 0,104, 95, 78, 47,204,224,217, 1,132,144,246, 85,189,176,
+ 1, 43,134, 27, 57,141,156, 70, 78, 35,167,145,211,200,105,228,252,127,198,249,175, 65,105, 71,206, 79,189, 1,104,111,228, 52,
+114, 26, 57,141,156, 70, 78, 35,167,145,211,200,249,111,219,140, 67,132, 70, 24, 97,132, 17, 70, 24, 97,132, 17,159, 24, 70, 39,
+119, 35,140, 48,194,136, 82,144, 74,165,221, 1, 44, 70,161, 11,197,114,153, 76,118,216,152, 43, 70,252,127,130,173,173,173,196,
+218,218,250, 15,138,162,106, 1, 31,134, 92, 42, 35,184, 55,244,122,125, 82,102,102,102,135,228,228,228,244,255, 38,231,191, 78,
+ 96,181,173,107,209,194,181,142,203,239,105,169,233, 97,249,202,220, 81,127,188,206,203,172,206,133, 9, 33,214,124, 62,127,128,
+ 68, 34,105,207,178,172, 43, 77,211, 17, 57, 57, 57, 87,181, 90,237, 65,150,101,243,141,143,128, 17,255, 52,252,253,253, 27,240,
+249,252, 89,132,144,198, 58,157,206,153,203,229,202, 0, 60, 84,169, 84,171,195,194,194,194,140, 57,244,255, 3,132, 16,202,209,
+209,241, 39, 11, 11,139,224,236,236,236, 33, 0,230, 70, 70, 70,250, 82, 20, 5, 31, 31,159,185, 82,169, 52,218,204,204,108, 87,
+110,110,238,189,164,164,164,169, 85, 89, 59,206,136,207, 23,110,110,110, 33, 20, 69, 57, 23, 47,201,246,177, 32, 40, 75, 32,176,
+ 44, 27, 27, 30, 30, 94,110, 48,103,103,103,103, 87, 51, 51,179, 45, 0, 26,126, 44, 42, 62, 70,209, 48,219,227,220,220,220,175,
+ 19, 18, 18,202, 12,196,107,101,101,101,106,103,103,183,152, 16,210,143,162,168, 74, 23,252,101, 24, 70,207,178,236,145,212,212,
+212,133,153,153,153,121,229,157,103,109,109,125,245,214,173, 91, 13,109,108,108, 42, 13, 75,163,211,233,144,152,152,104,219,181,
+107,215, 91, 0,188,254,155,156,255, 58,129, 5,150, 26,186,122,222, 24,167,180,248,104,167,185, 27,142,123,180,240,178,105,125,
+ 59, 34, 61,185, 42, 20, 34,145,104,128,175,175,239,198,159,126,250,201,218,197,197,133,136,197, 98, 36, 37, 37,121, 61,121,242,
+164,215,162, 69,139, 22,114,185,220, 17, 90,173,246,202,223,108, 52, 45,172,196,156, 89, 25,114,237,119,198,166,196,136,170,160,
+ 95,191,126,116,124,124,252, 34, 27, 27,155,111,231,204,153, 35,168, 93,187, 54, 76, 76, 76,144,154,154, 90,243,205,155, 55, 53,
+ 54,111,222,220,189,105,211,166, 63,171,213,234,249,161,161,161, 90, 99,142,253,111,195,209,209,241,167, 83,167, 78, 77,242,244,
+244, 68,203,150, 45,239,249,251,251,155,137,197, 98, 92,188,120, 17,110,110,110,245,204,204,204, 30,110,219,182,141,187,120,241,
+ 98,191,227,199,143, 3,192,100, 99,174,253,239,131,162, 40,231,176,176, 48, 59,177, 88, 12,189, 94, 95, 20,189,159, 1,203,178,
+ 37,159,165,197,144, 94,175, 71,155, 54,109, 52, 21,113, 10,133,194,205,207,159, 63,111, 95,188,142, 95, 41, 33, 85, 38,100, 50,
+ 89,251, 54,109,218,108, 6, 80,102, 64,109, 59, 59,187,197,253,251,247,159, 86,191,126,125, 0, 40, 73,103,241,103,122,122, 58,
+ 38, 78,156, 88,114, 13,134, 97,112,235,214,173, 41,223,124,243, 13, 0,124, 83,193,189,215,178,177,177, 33,149, 45,129,183,104,
+209, 34, 44, 90,180, 8, 27, 55,110, 36, 28, 14,199,162,146,252,252,228,156,255, 58,129, 69, 40,114,126,211,182,189,163,166,247,
+111, 76, 86,141,109,225, 62,111,215,141,251,237,235, 88,182,188, 26,155, 21,111,160,184,154, 50,126,252,248, 21, 75,150, 44, 17,
+190,126,253, 26,225,225,225,208,233,116, 48, 53, 53,133,175,175, 47,117,254,252,121,199,169, 83,167, 30,229,243,249, 35,213,106,
+245,241,234,222,152,131, 25,119,181, 68, 64, 13,230,115, 56, 15,213, 58,221,233,207, 49,243, 93, 92, 92, 46,107,181,218,149,137,
+137,137,215,255, 87, 42,140, 84, 42,109,198,231,243, 23,190,123,247,174, 19,203,178,186,255,143, 15, 69, 92, 92,220,146,230,205,
+155, 79, 95,180,104,145,224,237,219,183,136,138,138,130, 76, 38, 67,237,218,181,225,226,226, 66, 54,110,220, 40,252,249,231,159,
+ 39, 63,125,250,148, 11, 96,122, 85, 44, 37, 14, 14, 14,163,219,181,107,215,199,198,198,198, 60, 49, 49, 49,231,238,221,187,167,
+146,146,146,118, 84, 55, 47, 9, 33,148,141,141,205,240,110,221,186,245,177,178,178,178, 74, 78, 78,206,186,122,245,234,201,212,
+212,212, 93,127,199,210, 66, 8,113, 4,224, 11,192,186,104, 87,146,139,139,203,203,183,111,223,166,126, 66, 78,153,139,139, 75,
+120,117, 56,109,109,109, 37, 28, 14,231, 48, 33, 68, 90,129,133, 64,166,211,233,250, 23, 5, 56, 46, 23,102,102,102,141,221,221,
+221, 17, 26, 26,138,249,243,231, 91,181,105,211, 6,111,222,188, 1, 33, 4, 51,102,204, 32, 62, 62, 62,220,164,164, 36, 4, 5,
+ 5,225,234,213,171, 77, 97, 68, 85,202,252, 8, 0, 11, 0,131, 88,150, 77, 47,181,223, 6,192, 73, 0,169, 44,203,246,254,167,
+210, 39, 18,137,112,240,224, 65,112,185, 92,112,185, 92,100,101,101,193,217,217,185,228, 55,143,199, 43,249, 94,179,102,205, 74,
+249, 24,134,105, 68,211, 52,242,243,243,161,215,235, 75,182,236,236,108,176, 44, 11,129, 64, 0,189,190,112,217,165,226, 99, 12,
+195, 52,170, 32,255,250, 73,165, 82, 28, 56,112, 0,106,181,186,172,186,139, 23, 47,254, 92, 20,132,166,105,248,249,249, 81,132,
+144,126, 21, 9, 44, 66, 8, 11, 0, 99,199,142, 5, 77,211, 37, 75,223, 21,127, 47,222,244,122, 61, 22, 45, 90, 84,232,176, 77,
+ 81,149,149,245, 39,231,252,159,175,255, 21,169,235, 54,110,150, 95,183,110,209,120,181, 80,192, 17, 49, 58, 45,244, 58, 45, 24,
+157, 26, 52, 97,208,194,219, 14, 1, 53,133,200,204,202,195,252,253, 79,115,101, 25,202,224,203, 81, 25,145,149, 20,128, 75,112,
+112,112,216,181,107,215, 44,254,248,227, 15, 68, 70, 70,226,135, 31,126, 0, 0, 72, 36, 18, 92,188,120, 17, 52, 77,131, 97, 24,
+116,234,212, 41, 77, 38,147,121,177, 44,155, 89,141,135,186, 86,203,250,206,161,199,191,107,105, 85,111,194,209,247,201, 57,106,
+ 87,150,101, 63,187, 0,106, 82,169,148,229,114,185, 5, 58,157,174,251,255,130,200,146, 74,165,205,184, 92,238, 69,157, 78, 39,
+230,114,185,162,119,239,222,169,254,191, 61, 16,254,254,254, 13,172,172,172, 30,156, 56,113, 66,248,232,209, 35,100,101,101, 33,
+ 53, 53, 21, 83,166, 76,193,214,173, 91, 81,175, 94, 61, 72, 36, 18,240,249,124, 76,156, 56, 81,145,151,151,215, 58, 36, 36,228,
+177, 1,117,146,110,217,178,229,129,223,126,251,205, 69,167,211, 81, 0,160, 86,171, 17, 31, 31,175,159, 55,111, 94, 92, 72, 72,
+200,160,170,138, 44, 66, 8,213,180,105,211,253,191,253,246,155, 27,159,207,167, 24,134,129, 86,171,197,155, 55,111,244,243,230,
+205,123, 23, 26, 26, 58,184, 58,245,158, 16,226, 47, 22,139,125,190,254,250,235,180, 30, 61,122,104, 0,224,241,227,199,212,179,
+103,207,204,234,212,169,243,126,193,130, 5, 97,213,224, 12, 52, 53, 53,245, 28, 55,110, 92,122,183,110,221,180, 60, 30,143,185,
+123,247, 46, 39, 50, 50,210,204,197,197, 37,102,238,220,185,207,170, 88, 23,207,157, 56,113,162,181, 84, 42,213, 3, 96,139, 27,
+120,138,162,216,162, 79,196,196,196,112,250,246,237,123, 67, 38,147,125, 89, 97,103,204,193,193,219,209,209,241,214,130, 5, 11,
+172,138, 95, 82,165,183,226,178, 90,180,104,145, 38, 41, 41,169,177, 76, 38,123, 2, 35, 12, 45,247,135, 0, 26, 1,120, 9,160,
+ 45,203,178,233, 69,226,234, 58, 0, 31, 0,119, 89,150,109,254, 79,164,205,211,211, 51,229,197,139, 23,118,167, 78,157, 2,151,
+203,197,149, 43, 87,176,117,235, 86, 28, 60,120,176, 76,145,229,232,232,136, 22, 45, 90, 36, 60,121,242,164, 70,121,156,110,110,
+110, 57,209,209,209,102, 57, 57, 57,208,235,245,120,248,240, 33,118,237,218, 5, 59, 59, 59,216,216,216,192,214,214, 22,141, 26,
+ 53,130, 68, 34, 41, 17, 89,253,250,245,203,141,142,142, 54, 47,139,207,219,219, 91, 54,100,200, 16,199,208,208, 80,104,181,218,
+ 50, 5,214,180,105,211, 74, 91,145, 32,145, 72,208,163, 71,143,164, 87,175, 94,149,219,249,168, 87,175, 94,210,203,151, 47, 29,
+158, 61,123,246, 65, 93, 47, 75, 16,209, 52, 13, 83, 83, 83, 52,105,210, 36,229,201,147, 39, 14,255, 77,206,255,215, 22, 44,247,
+ 90, 14,243,190, 27,223, 83, 4,189, 6,172, 86, 1,104, 10, 0, 77, 62, 24,117, 1, 8, 79, 4,104, 21,176,226,103, 98,227,176,
+ 58,102,203, 79,189,123,213,214,213,182,235,181,152,180,139,229,241, 89, 88, 88, 44,218,182,109,155,197,139, 23, 47, 16, 25, 25,
+137,117,235,214, 97,233,210,165,224,241,120,200,204,204, 68,247,238,221,113,239,222, 61,104, 52, 26,204,159, 63,223,106,246,236,
+217,147, 80,232,108, 90, 69,235, 21,103,235,225,221, 27,173,172,232, 12,140,108, 27, 98,189,249,242,219,175, 1,252,252, 57, 22,
+192,234,213,171,197,179,102,205, 58,227,228,228,244, 89,139, 44,169, 84,218, 76, 36, 18, 93,156, 54,109,154,100,197,138, 21,159,
+ 68,172, 58, 59, 59,215,227,112, 56,135,212,106,245,140,164,164,164, 75,213,104,188,107, 7, 7, 7,175, 8, 15, 15, 63,150,159,
+159,127,164,172,115, 76, 76, 76,250,121,122,122,246, 12, 9, 9,153,199,178,236,219,202, 56, 5, 2,193,148,153, 51,103, 10, 19,
+ 19, 19,145,157,157, 13, 62,159, 95,178,202, 60, 33, 4, 2,129, 0, 20, 69,129,207,231,227,171,175,190, 18,254,242,203, 47,223,
+ 0, 24, 88,105,157,116,112, 24,181,127,255,126, 23,141, 70, 67,201,229,114,240,120, 60,240,120, 60, 52,104,208,128,158, 57,115,
+102,141, 41, 83,166,140, 7,176,169, 42,247,111,105,105, 57,108,255,254,253,110,124, 62,159, 74, 74, 74, 66,179,102,205,240,240,
+225, 67, 4, 7, 7,211,179,102,205,170, 57,105,210,164,177, 0,182, 86,213,202, 36, 22,139,235, 95,191,126, 61,190, 70,141, 26,
+ 37,189,175,218,181,107,235,187,118,237,154, 25, 17, 17,225,121,255,254,253,140, 38, 77,154,196, 85,129,211, 73, 44, 22,123,157,
+ 63,127, 62,105,201,146, 37,237,182,111,223,222, 3, 0, 26, 53,106,116,122,233,210,165,215, 50, 51, 51,235,221,190,125, 59,179,
+ 69,139, 22, 9, 85, 72,170,181,189,189,189,238,235,175,191, 54, 45,239,132,189,123,247,102, 0,176,171,164, 94,119,167, 40,106,
+113,189,122,245,204,218,180,105,131, 91,183,110, 97,242,228,201, 42,173, 86, 27, 5, 0,237,219,183,247, 88,180,104, 17, 63, 52,
+ 52, 20, 22, 22, 22,220,164,164,164,221, 82,169,212,232,248,110, 56,122, 0,184, 1,160, 30,128,107,132,144,254, 0,142, 2,240,
+ 6, 16, 9,160,239, 63,153, 56,189, 94, 15, 14,135,131,132,132, 4,252,242,203, 47,248,241,199, 31,225,238,238, 14,173, 86, 91,
+ 34,176, 56, 28, 14,184, 92, 46, 8, 33, 6, 47,165,165,211,233,240,248,241, 99,236,255,245, 87,204,159, 55, 15,166,166,133,213,
+ 84,163,209, 32, 51, 43, 11, 66,161,176,196,130, 85, 17, 88,150, 61,242,230,205,155,105,206,206,206, 31, 12, 13, 22,127, 22,181,
+113, 96, 24, 6, 58,157, 14, 42,149, 10, 59,119,238,212,177, 44,123,164,146,103,178,196,226, 53,109,218, 52,168, 84,127,246,149,
+125,125,125, 1, 0, 46, 46, 46,240,243,243, 43,249, 93,108,161, 50,132,115,103,211,250, 80,148, 58,219,115,209,154,226, 54, 31,
+158,158,158,112,116,116, 52,136,243,255,181,192,138,138, 75, 93, 57,107,241, 79,107, 36,124,154, 59,162,179, 55,164,102, 92, 64,
+100, 5, 94,203,217, 32, 22,181, 10, 43, 64,102, 44,112,121, 54,230,119,200,160,230, 40, 52, 39, 59,187, 89,217, 94,136, 46,215,
+185,174, 81,141, 26, 53,112,251,246,109,212,169, 83, 7, 11, 22, 44,128,151,151, 23, 36, 18, 9, 82, 82, 82, 32,151,203, 33,145,
+ 72,144,155,155,139,128,128, 0,218,212,212,180, 77, 85, 5, 22, 33, 36, 96,116,247,224, 70, 28,123,111, 52,107,215, 24,151, 23,
+182,150,236,189,153,248, 29, 33,100,119,233, 5, 87, 63, 23,244,237,219, 23,201,201,201,226, 13, 27, 54, 84, 91,100,185,184,184,
+ 92,214,104, 52, 95, 24, 96, 14,191, 30, 29, 29,221,182,186,226,234,204,153, 51, 18, 83, 83, 83,172, 88,177,226, 83,137,171, 59,
+ 29, 59,118, 52,187,116,233,210, 9, 71, 71,199, 94, 85, 17, 89,132,144,218,253,250,245, 59,187,107,215, 46,143,182,109,219,234,
+ 1,148,217,160,248,248,248,244,185,124,249,114,239,209,163, 71,215, 39,132,116,171, 76,100, 17, 66,154,214,174, 93, 27,241,241,
+241, 72, 73, 73,129, 82,169, 68, 74, 74, 10, 0, 32, 33, 33, 1,206,206,206,176,176,176,128,179,179, 51, 60, 60, 60, 8, 69, 81,
+193,134,164,183, 77,155, 54, 61, 0, 80, 49, 49, 49, 72, 75, 75,131,185,185, 57, 36, 18, 9,156,157,157,209,186,117,107,142,155,
+155, 91,151,170, 10,172,206,157, 59,247, 17,139,197, 84,124,124, 60,222,190,125, 11,149, 74,133,168,168, 40,152,155,155,163, 93,
+187,118, 92, 55, 55,183,110, 85, 21, 88, 0,234,143, 29, 59, 54,165,180,184, 42,134, 68, 34, 33, 30, 30, 30,153,214,214,214,129,
+ 0,226,170,194, 57,105,210,164,212,229,203,151,183,188,122,245,234,236,226,157, 87,175, 94,157, 5, 0, 63,253,244,211,109, 91,
+ 91,219, 64, 0, 85, 17, 88, 96, 89,150, 25, 61,122,244, 27, 30,143, 7, 62,159, 95,178, 9, 4, 2,112,185, 92,208, 52,109,110,
+ 0,205,220,200,200, 72, 95, 19, 19, 19, 68, 70, 70,130,166,105, 16, 66,222,200,100, 50, 95, 0,152, 61,123,118,180, 66,161,112,
+ 85, 42,149,232,219,183, 47,233,222,189,123,131,117,235,214,205, 3,240, 89, 8, 44, 66, 72, 67, 0,235, 0,168, 1,204, 99, 89,
+246,225,231,212,190,177, 44,155, 66, 8,105, 93, 74,100, 61, 1, 32, 40, 18, 87,173, 89,150, 77,249, 7,243, 14, 12,195,128,203,
+229, 98,205,154, 53,208,104, 52,248,237,183,223,112,244,232, 81, 80, 20, 85,226,232,110,102,102,134,141, 27, 55,254,197,241,189,
+ 50,225,182,119,239, 94,204,158, 53,171, 68, 92, 1, 0,143,199,131,131,189, 61,172,109,108, 16, 19, 19, 83,169,192, 74, 77, 77,
+ 93,248,232,209, 35, 84,228,228,222,187,247,159, 35,172,165,157,220, 13, 73, 39, 77,211, 80,169, 84,248,226,139, 63, 95, 31,147,
+ 38, 77, 42,249,158,153,153, 89,252, 76,128, 24,120,243, 52, 77, 67,193, 2, 61,133,127,238,235, 50, 99, 70,201,247,244,244,244,
+ 42,115,254,191, 20, 88, 45,163, 51, 55,221, 35,240,155, 53,178,221,112,169,141, 25,216,252, 20,240,218, 46,196,243, 76, 49, 54,
+108, 43,124, 23, 78,235, 27,128,250,237,151, 65,189,167, 3, 70,249,235,249,223, 36, 97, 38,128, 5,101,241,217,216,216, 88,235,
+116, 58, 16, 66, 32,145, 72,224,237,237, 13,161, 80,136,180,180, 52, 76,158, 60, 25, 23, 47, 94,132, 70,163, 1,143,199, 67,157,
+ 58,117,160,209,104, 92,171, 97,189,218,181,126,245,143, 22, 25, 97, 7, 16, 26,155, 13,177,117, 13,204, 27,212,200,114,209,111,
+143, 22, 2,152,245, 57, 22,130,159,159, 31,150, 44, 89, 34, 94,184,112, 97,181, 68,150, 70,163, 89,202,229,114,155,253,248,227,
+143,162, 65,131, 6,253,229,248,211,167, 79,209,183,111, 95,133, 82,169,252,161,186,226,234,244,233,211, 18, 43, 43, 43,196,199,
+199,227,239, 62, 19,197,226,234,247,223,127, 55,171, 85,171, 22,234,213,171, 39, 92,187,118,173,193, 34,139, 16,226,219,187,119,
+239,227,187,118,237,170, 53, 98,196,136,247, 33, 33, 33, 41,132,144,242,132,184,108,228,200,145,239,247,236,217,227, 65, 8, 57,
+ 91,153,200,210,233,116, 53,197, 98, 49,210,210,210, 48,117,234,212, 15, 28, 84,139,135,179, 1, 32, 50, 50, 18,206,206,206, 80,
+ 42,149, 78,134,220,179,149,149,149, 37, 0,140, 25, 51, 6,241,241,127,186, 43, 58, 57, 57, 33, 62, 62, 30, 58,157,206,170,170,
+249,104,101,101,101,165,213,106,209,162, 69, 11, 40,149, 74, 0, 64,255,254,253,193,229,114,145,154,154, 10,141, 70, 99, 93,141,
+226,177,233,218,181,171,172,188,131,102,102,102, 26, 75, 75, 75,239, 42,114, 90,119,239,222, 61,113,199,142, 29,127, 25,170,123,
+244,232,209,151, 86, 86, 86, 87,173,172,172, 60,170,145, 86,166,180,160, 42,254,206,231,243,139, 45, 14, 6,245,142, 25,134,193,
+185,115,231, 64,211, 52, 56,156, 63,155,196, 5, 11, 22,140,179,176,176,176,191,117,235, 22,146,147,147, 33,151,203,145,159,159,
+143,186,117,235,214,105,223,190,253,211,228,228,228,119,225,225,225,189,254,105, 35, 56,128, 98,191,176,173, 0,252, 62,183,246,
+173, 72,100,245, 3, 16, 82, 36,174,212, 0,250,252,147,226,170,116,217,115, 56,156,146,231, 92, 40, 20, 34, 32, 32,160, 68, 76,
+ 17, 66, 80, 80, 80, 0, 14,135, 83,236, 47,100, 80,227,151,157,157, 13, 71, 7, 7,152,154,154,162,174,187, 59,222, 68, 69, 1,
+ 64,201,119,129, 64, 0, 66, 8,116,186,138,189, 2,138,102, 2,126,131, 10,252,169,170, 41, 46,217, 98, 49, 84, 73,251, 15,134,
+ 97,138,219,124,246, 83,112,218,216,216, 32, 63, 63,223, 32,206,255,183, 2,107, 49, 33,212,189,186, 86,191,204, 26,222,122,120,
+ 11, 15, 75, 40,211,222, 66, 96,106, 3, 98,225,130, 13,219, 46,225,213,187, 66,215,168, 13, 71,195,176,247,187,142,128,200, 10,
+174, 38,145,176,145,136,123,149, 39,176, 50, 51, 51,229, 90,173,214, 74, 36, 18,129,195,225,128,207,231, 35, 35, 35, 3, 11, 22,
+ 44,192,225,195,135,225,226,226, 2,189, 94, 15,129, 64,128,212,212, 84,240,120,188, 42,205, 78,228,112, 72,215, 69, 99, 58,215,
+150, 56,184, 35,227,202,210,194,157,246,254, 24,219,157,226,175, 61,254,124, 24, 33,100, 45,203,178,169,159, 91, 33,152,152,152,
+160, 81,163, 70,152, 48, 97,130,120,219,182,109,251, 0, 56, 87,229,255, 50,153,236,174, 84, 42,237, 48,111,222,188,203,137,137,
+137,162,198,141, 27,195,196,196, 4, 38, 38, 38,136,136,136,192,255,177,119,237, 81, 81, 92,121,250,171,170,126, 3,205, 75,161,
+ 21, 80, 48, 1,154,230, 49,108, 0, 17,118,112,243, 24, 53,146, 77,102,141,102, 98, 98,226,104, 52,179,192,100, 93,204, 26, 95,
+135,205,104,194, 14,171, 39,103,116, 18, 71,196,179, 74,102,207, 1, 93, 38,232,134, 56,113, 9,230,140,154,241, 57,193, 30, 26,
+ 21,232,238,129, 70, 4,177, 5, 58, 60,187,171,155,174,187,127,208,221,211,102,120,116, 35,137,168,245,157,115, 79, 83,221,156,
+175,234,222,170,186,247,171,239,254,238,175,242,243,243,205, 44,203, 62, 63, 25,119, 76, 40, 20,150,102,103,103,251, 74, 36, 18,
+232,116, 58, 4, 7, 7,223, 83, 93,157,226,234,200,145, 35,254, 74,165, 18, 13, 13, 13,200,204,204,196,236,217,179,165,155, 54,
+109,154, 80,100, 57,158,120,126,125,244,232,209, 40,129, 64, 64,125,242,201, 39,243, 0,228,123,178,239,178,178,178,184,138,138,
+138, 95, 81, 20,181,140,140, 17,124, 40, 18,137,218,140, 70, 99,244,156, 57,115,112,232,208, 33,208, 52,141,142,142, 14,108,223,
+190, 29, 69, 69, 69, 88,176, 96, 1,228,114, 57,230,204,153, 3,157, 78, 7,169, 84,218,225,201,190,111,222,188,217,205,113, 92,
+232,201,147, 39, 97, 52, 26, 93,223, 71, 70, 70,162,167,167, 7, 22,139,165,203,219,182,108,107,107,235, 2,160, 80,171,213,104,
+105,105,193,210,165, 75,113,252,248,113,164,165,165,193, 17,143,213, 53,137, 83,100,103, 24,134, 76,208,254, 65, 83,201,233, 24,
+180,188,229, 4, 33,132,184, 11, 42,231,223,206, 34, 16, 8, 60, 9,242,255,165, 74,165,218,249,216, 99,143,197, 23, 20, 20, 8,
+ 25,134, 65, 86, 86,150,242,157,119,222, 49, 72,165,210, 25, 91,183,110,245, 25,205, 12, 6,144, 28, 31, 31,239, 59, 13,186, 15,
+119,151,110, 90, 46, 58,161, 40, 42,212,225,248,137, 1, 88, 29,159, 71, 40,138,122,198, 61,240,253,126, 58, 88, 59,119,238, 68,
+ 78, 78, 14, 20, 10, 5,182,108,217, 2,129, 64,224, 42, 20, 69,185, 28, 45,111, 16,170, 80,140,251,187, 51, 6,107,130,135,168,
+239, 36, 77,131,167, 98,104,100, 92, 21,120,228,222,125, 23,156, 15,165,192,114,138,171, 45, 63, 93,184, 38, 75,233,143,154, 51,
+127,194,211,143,211, 0, 43, 30,167, 11,181,129, 18,249, 66, 33,167, 35,198,177, 14,213, 6,131, 97,110, 96, 96, 32,172, 86, 43,
+196, 98, 49, 18, 19, 19,113,254,252,121,176, 44, 11,139,197,226,234, 28,175, 94,189, 10,171,213,122,198,139,155,133, 81,200,133,
+ 31,110, 46,120, 95, 14,205, 97, 4,250,138,241,116,106, 52, 48, 67, 5,166,187, 17,191,218,248, 66,240, 63,239, 58,182, 23, 30,
+196,203,220, 15,129,165,213,106, 81, 82, 82, 50,104,177, 88,126, 58, 25, 14,167,200, 42, 46, 46,174, 14, 12, 12,148, 61,249,228,
+147,208,104, 52,216,180,105,147,153,101,217,127,156,108,124,151,205,102, 91,251,217,103,159,157,140,142,142,246, 93,184,112,225,
+ 93,118,247,100,196, 21,195, 48, 95,173, 91,183, 78, 30, 21, 21, 5,189, 94,143,128,128, 0,248,249,249, 97,222,188,121, 40, 47,
+ 47,151,174, 90,181,106, 92,145, 69, 8, 33, 20, 69,229,173, 92,185,178,170,180,180, 52,114,237,218,181,134,202,202,202, 42, 0,
+ 99,117, 38,242,229,203,151,191, 80, 90, 90, 26,185,126,253,250, 70, 0,111,147,113, 86,118,112, 28,119, 78,167,211, 61,174, 82,
+169, 40,165, 82, 9,177, 88,140,240,240, 17,147, 42, 57, 57, 25,241,241,241, 16, 10,133, 0, 0,173, 86, 11, 0,151, 60,169,251,
+217,179,103, 63,109,106,106, 90,151,150,150,198,204,154, 53,203, 21, 60, 43, 18,137, 80, 88, 88,104, 53, 24, 12, 39,188,109,207,
+ 47,191,252,242,184, 70,163,121, 51, 43, 43, 75, 16, 20, 20, 4,137, 68,130,164,164, 36,132,133,133,161,176,176,208,218,220,220,
+124, 98, 18,167,169, 85,163,209, 72, 99, 99, 99, 71,237,249,101, 50,153, 63, 0,111,157,135, 27,151, 47, 95, 22,103,100,100,124,
+250,249,231,159, 39,186,255,144,158,158,254,169,159,159, 95, 0,128,142, 73, 28, 43,231, 46,168,156,197, 57,101,232,137,192,106,
+111,111,175,154, 53,107,214, 95, 20, 10,197, 31, 19, 18, 18, 2, 52, 26, 13, 10, 10, 10, 68, 22,139,101,110, 77, 77,141,107, 32,
+ 30,229, 58,196,192,192,128,108, 26,116, 31,249, 0,246, 0,240, 1,176,101, 26,138, 43, 5, 70, 2,218,227, 48, 50, 45,248,178,
+ 67,108, 57, 99,178,238,171,200, 34,132, 64, 40, 20, 34, 46, 46, 14, 27, 55,110,196,174, 93,187,144,151,151,135,216,216, 88,215,
+185,119, 6,185,123,227, 96,137, 68, 34, 40, 20,138,145, 69, 39, 14,247, 10, 0,180, 77, 77, 16, 8, 4,224, 56, 14, 44,203, 78,
+232, 96,133,134,134,238,220,189,123,247,134,236,236,108,250,219, 43,238,156,105, 37,220,139,205,102, 67, 85, 85,213,134,162,162,
+ 34,120,226,122, 49, 12,131,228,228,228,187,166, 5,247,237,251,107,164, 66, 74, 74, 10, 22, 47, 94,236,145,104,114,231,140,219,
+241,193, 93,211,130,191, 15,249,107,179,205, 89,253, 51,196,254,242, 35,175, 56, 31, 84,140,186, 70,242, 92, 76, 96,225,150,215,
+126,184, 38, 43, 70,142, 47,206, 92,193,222,223, 55, 55, 24, 58,186,192,117,106,192, 25,175, 35,255,165, 20,196, 71, 5, 35, 62,
+ 42, 24,249, 47,165,128,187, 93, 15,210,163, 7,145, 4,226,134, 9,237,227,216,166,187,222,127,255,125, 83,112,112, 48,100, 50,
+ 25,196, 98, 49,218,218,218,144,144,144, 0,137, 68,226,122, 2,165,105, 26, 5, 5, 5, 70,163,209,120,192,211,138,248,138,233,
+159,237,250,183,151, 21, 34,169, 31,112,227, 12,252,229,126, 56,244,155, 15,128,254,118,128, 17,225,133, 39,255,142,153, 61, 51,
+240, 25,138,162,148,211,237, 36,232,245,122,108,216,176, 97,208,108, 54,223, 83,160,123,123,123,251, 31,173, 86,235,146,162,162,
+162,161,178,178,178,123, 22, 87, 78, 78,150,101,151,238,217,179,103, 64,167,211,221,147,192, 18, 8, 4, 91,109, 54,155,127, 73,
+ 73, 9,151,154,154,106, 95,182,108,153,125,201,146, 37,246,204,204, 76,123, 66, 66,130,125,197,138, 21,118,179,217, 44,241,241,
+241,217, 61, 65,167,120,173,178,178,114,209,250,245,235, 27, 75, 75, 75, 35, 23, 44, 88, 16, 70, 8,249,197,104, 37, 45, 45, 77,
+225, 20, 87, 21, 21, 21, 19,198, 96, 89, 44,150,125,197,197,197,102,231, 42, 23,177, 88,140,144,144, 16,151, 16, 22,137, 68,144,
+ 72, 36,176, 90,173,216,191,127,255,208,208,208,208, 94, 79,234,222,213,213,117,120,243,230,205,173,213,213,213,182,222,222, 94,
+ 80, 20,133,155, 55,111,162,176,176,208,122,240,224,193,155, 38,147,233,160,183,237,217,219,219, 91,186,121,243,230,150, 19, 39,
+ 78,216,104,154, 70, 79, 79, 15,252,253,253, 93,156,125,125,125, 94,115,102,102,102,234, 12, 6,131,255,224,224,224,104,110, 38,
+229,235,235, 59, 31,192,151,222,112,166,164,164,232, 91, 91, 91,229,133,133,133,167, 23, 45, 90,180, 75, 46,151, 55,201,229,242,
+166, 69,139, 22,237,254,232,163,143,254, 32,149, 74,211, 1,120,253,114, 88,154,166, 57,247,126,195, 61, 6, 75, 34,145, 64, 36,
+ 18,121,148,166, 34, 32, 32,224,227,226,226,226,128,142,142, 14, 88, 44, 22,168,213,106,168,213,106,180,181,181,185, 6,225, 81,
+222,195,134,193,193, 65,233,253,238, 59, 8, 33,127, 32,132, 36, 19, 66,162, 9, 33,211,113,145,204,239,220,196,213, 83,132, 16,
+ 13,128,167, 28,219,137, 0,254,247,126, 58, 88, 78,129, 37, 16, 8,240,234,171,175,226,212,169, 83,136,137,137,113, 5,182,187,
+ 7,185,123, 35, 8,134,135,135,145,148,148, 4, 11,203,222, 37,208, 5, 2, 1, 66, 66, 67,161,211,233, 60,114,176, 40,138,250,
+ 73,118,118, 54,125,245,234, 85,168, 84, 42,212,214,214,186,138, 90,173, 70, 93, 93, 29,234,235,235,113,237,218, 53,164,166,166,
+194, 96, 48,224,217,103,159,117,166,105, 24,247,210,241,212,109,114,174, 4,244,192,109,250, 46, 56, 31, 62, 7, 43, 34,196,103,
+237, 15,231, 81,248,226,236, 21,124, 88,221,254, 49, 33,164,242,164,166,247,179,156,212, 97, 88, 43, 86, 33,233,165,255, 30,153,
+ 22, 4,192,221,174,135,181,226,117, 80, 62, 51,113,169, 83,140, 94,179,109,204,167,102,171,213,122, 49, 40, 40,232,200,225,195,
+135,215,189,241,198, 27, 98, 0,240,241,241,193,219,111,191, 13, 66, 8,196, 98, 49, 24,134, 65,110,110,110,255,237,219,183,247,
+ 16, 66,116, 30,222, 40,178,240, 32,113,193,107, 63,255,119, 41,212, 7, 1, 90,132, 59,126, 41, 72,126,118, 29,110, 55,158, 7,
+186,174, 3,140, 8, 7,118,188, 57,243,199,111,125,112, 16,192,194,233,114, 2,234,235,235,241,214, 91,111,221,179,184,250,182,
+147, 85, 94, 94,254, 91,150,101,223,156, 66,206,165, 91,182,108, 57,169, 80, 40, 38, 61, 45, 98, 48, 24, 86, 71, 70, 70,174,155,
+232,198,211,235,245, 19, 78,117, 16, 66,154, 41,138,122,190,165,165,229, 63, 26, 26, 26,142,143,245,127, 13, 13, 13,199, 23, 47,
+ 94,204, 92,188,120,113,171, 39,171, 8,107,107,107,107, 51, 50, 50,138,247,238,221,155,155,159,159, 47,147, 72, 36,240,247,247,
+ 71, 99, 99,163, 43, 15, 14,203,178,216,182,109,219,144,205,102,251,248,242,229,203,231, 61, 28, 8,135, 41,138,122, 37, 39, 39,
+103,189, 82,169,252, 49,199,113, 51, 88,150,237, 50, 24, 12, 39,250,250,250, 38,149, 7,139, 16,194, 81, 20,181, 42, 55, 55,119,
+ 77,108,108,236, 10,171,213, 58,195,110,183,119,181,182,182,126,218,219,219,123,104, 50,156,231,206,157, 51,238,223,191,255, 47,
+ 70,163, 81, 21, 17, 17,241,141,159,159, 31,203,178, 44, 35,147,201,252,125,125,125, 83, 0,156, 7,112,205, 27,206,175,191,254,
+250,214,129, 3, 7, 90, 44, 22, 75,220,129, 3, 7,206,250,251,251,159,162, 40,138, 18,137, 68, 65, 50,153,236,105, 0,167, 1,
+104,189, 61, 86,134, 97,198,117,176,224, 97,124, 71, 95, 95,223,197, 29, 59,118,164, 62,241,196, 19, 40, 46, 46,238,246,243,243,
+147,175, 88,177, 66, 96, 50,153,168,241, 28,172,233, 32,176, 30, 0,116, 57, 92,222,127,114,198, 92,185, 5,190,255, 14,128,233,
+ 62, 11,212,187,132,212,220,185,115, 93,219,238,197, 45, 6,203, 35,216,237,118,136, 68, 34, 8, 4, 2,204, 14, 11,115,137, 57,
+ 66, 8,116, 58, 29,186,187,187, 61, 18, 88, 52, 77, 51, 20, 69, 97,229,202,149, 30,237,247,149, 87, 94,193,233,211,167, 49,209,
+116,162,251,138,191,168,168,168, 9,197,144,227, 88, 60, 94, 69, 24, 17, 17, 49, 37,156, 15,165,192,106, 53,154, 11, 55, 30,188,
+188, 77,127,219, 82,249,247,218,158,141, 59, 0, 2, 4, 85,171,130,169, 37, 11,233, 54, 88, 14,102,129,242, 31, 25,108, 72,127,
+ 7, 40, 95, 5, 58, 16,129, 95, 87,235,111,217,136,117, 92,247,193,100, 50,229,239,219,183,143,169,174,174,126,185,168,168, 40,
+ 64,165, 82,225,245,215, 95, 7,203,178,168,171,171, 67, 78, 78, 78,183,209,104, 44, 49,153, 76,187, 60,173,196, 76, 63,193,187,
+123,255,101,201, 12,218,214, 15,220,170, 5, 36, 1,152, 25,228,135, 63, 95, 58, 3,220,250, 26, 96, 68, 0, 35, 70,218, 15, 84,
+ 72,142,143, 86, 81, 20,149, 69, 8,249,106, 58,156,128, 23, 95,124,113,202,196,149,187, 32, 2,240,216, 84, 30,167, 83,100,173,
+ 89,179,230, 36,199,113, 62,147,177,119, 29, 57,153,236, 83,216, 57, 54, 99,130, 41, 95, 71,250,134, 10,111,120,109, 54,219, 54,
+141, 70,131,220,220,220,220,213,171, 87,203,148, 74, 37,162,162,162,208,212,212,132,198,198, 70,148,148,148, 12, 13, 15, 15, 31,
+ 50,153, 76,155, 38, 81,255, 18, 71,153,170, 54,224, 0, 28,118,148, 41, 65, 94, 94,222,159,245,122,125, 87, 72, 72,200, 2,145,
+ 72,244, 3,140,196,249,220,114,236, 67, 59, 25,206,156,156, 28,181, 94,175,191, 19, 30, 30,158,225,224, 12, 4,112, 19,192,127,
+ 77,146,179, 75,173, 86, 71,167,167,167,115, 2,129,128, 56, 28, 6, 34, 20, 10,137, 80, 40, 36, 0, 80, 93, 93, 45, 1, 48, 97,
+204,101, 71, 71,199,191, 30, 59,118, 12, 53, 53, 53, 11,250,251,251, 95, 3,240,219,193,193,193,244,111,190,249,198, 53, 8,143,
+225,118, 74,120,253, 52,225,245,185,108,140,239, 59, 1,100, 77,131,227,195,123,239,189,135,146,146, 18, 76,148,129,188,170,170,
+ 10,152, 96,138,208,121,173, 56,197,147,213,106, 69,125,125,189,243,221,123,174,105, 65,103,138,134,225,225,225,113, 51,189,115,
+ 28,103,103, 89, 22, 71,143, 30,245, 72,100,149,151,151,195,108, 54,131,227, 56,143,250, 89, 71, 98, 82,116,119,119, 35, 44, 44,
+204,233, 56,187,155, 34, 94,183, 41,195, 48,136,139,139,195,157, 59,119, 48,115,230, 76, 0, 35,211,130, 46,119,111, 96,224,145,
+185,254,199, 77, 52,234,142,167,162, 2, 3,104, 17,117,236, 71, 49,162,167,158, 79,146, 99, 78,136, 31, 4, 98, 9,110,247,218,
+241,149,190, 31,255,115,222,120,131,181,219,159, 63,213,216,163,241,208,117,202,152, 61,123,246,118,187,221,158, 72,211,180, 15,
+ 33,164,159, 97,152, 43,237,237,237, 59, 9, 33,245,222, 84, 34, 80,198,104,131,124,153, 0,161, 80, 76,236, 28, 7,128, 6, 40,
+103, 97, 70, 62,233,145,237, 33,179, 85,100, 39, 84,101,167,241,206,250,251,221,248, 74,165,178,122, 96, 96,224,129,203,228,238,
+235,235,251, 11,173, 86,251,208,102,114,119, 98,254,252,249,105, 50,153,108, 59,199,113,243,205,102,243, 44,153, 76,214, 73, 81,
+212,159,250,250,250,254,243,202,149, 43, 23,248,225,243,254, 97, 42, 51,185,143,114,141,191, 0, 96,231,140, 25, 51,148,117,117,
+117, 18,119, 7,203,189,191,244, 38, 47, 18,143,233,135,248,248,248,139,101,101,101,105,115,231,206,165,221, 3,217,105,154,118,
+ 37,199,164,105,218,181,178,244,194,133, 11,195,121,121,121,231,213,106,245, 63,140,197, 25, 19, 19, 83, 93, 83, 83,179,216,100,
+ 50,253,141,144,114,207,236,238,220, 30, 26, 26,194,187,239,190,251,133, 86,171, 29,245, 85, 57, 42,149,106, 79, 65, 65,193,134,
+231,158,123,142,166,105,250,111, 98,174,156,175,245,113, 22,171,213,138,202,202, 74,174,180,180,244,195,235,215,175,143, 25,131,
+149,146,146,114,163,182,182, 54,194,153, 50, 97,172,226,142,140,140,140,142, 11, 23, 46,132,125,159,156,143,140,192,114,116, 40,
+212, 51, 49,129, 47, 19, 66,253,132, 2,149, 68, 83, 68, 60, 76,208, 72, 1,213, 62,131,146,253, 85,237,237, 67,252,109,203,227,
+161,188, 81, 40,138,230, 95,242,251,104, 33, 38, 38, 70,171,213,106,163,199,185, 38,120,129,245,128,139,244,144,144,144, 83, 52,
+ 77, 71, 58, 69,244, 88,159, 14, 55,169,165,179,179,243, 71,157,157,157, 99,230, 83,140,136,136,120, 92, 42,149,254,134,227,184,
+116, 79, 94,246, 76,211,244, 37,179,217,252,243,239,251,101,207,137,137,137,186, 75,151, 46, 61, 46,147,201,238,138, 43,116,214,
+249,219,199,222,220,220,140,229,203,151, 27,212,106,117,212,247,201,249, 72, 9, 44, 30, 60,120,240,120, 84, 16, 30, 30,126,209,
+106,181,170,204,102,179,208, 98,177, 8,135,135,135,239, 26,224,100, 50,153,113,112,112, 48,148,111, 41, 30, 15, 26,194,194,194,
+148,129,129,129,255, 39, 20, 10, 37,163, 61, 56,124, 27,118,187,221,220,213,213,181,180,189,189,189,241,251,228,124,224, 49,218,
+ 10,153,169, 42, 0, 22,241,156, 60, 39,207,201,115,242,156, 60, 39,207,201,115, 62,106,133,230,181, 60, 15, 30, 60,120,240,224,
+193,131,199,212,130, 23, 88, 60,120,240,224,193,131, 7, 15, 30,188,192,226,193,131, 7, 15, 30, 60,120,240,224, 5, 22, 15, 30,
+ 60,120,240,224,193,131,199, 35,133,255, 31, 0, 6,160,247, 56,137, 5,159,139, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130,
0};
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 81ee2378717..735f1ffddb9 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -67,12 +67,279 @@
#include "ED_sequencer.h"
#include "ED_util.h"
+#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "gpencil_intern.h"
/* ************************************************** */
+/* GREASE PENCIL PANEL-UI DRAWING */
+
+/* Every space which implements Grease-Pencil functionality should have a panel
+ * for the settings. All of the space-dependent parts should be coded in the panel
+ * code for that space, but the rest is all handled by generic panel here.
+ */
+
+/* ------- Callbacks ----------- */
+/* These are just 'dummy wrappers' around gpencil api calls */
+
+#if 0
+// XXX
+/* make layer active one after being clicked on */
+void gp_ui_activelayer_cb (void *gpd, void *gpl)
+{
+ gpencil_layer_setactive(gpd, gpl);
+
+ scrarea_queue_winredraw(curarea);
+ allqueue(REDRAWACTION, 0);
+}
+
+/* rename layer and set active */
+void gp_ui_renamelayer_cb (void *gpd_arg, void *gpl_arg)
+{
+ bGPdata *gpd= (bGPdata *)gpd_arg;
+ bGPDlayer *gpl= (bGPDlayer *)gpl_arg;
+
+ BLI_uniquename(&gpd->layers, gpl, "GP_Layer", '.', offsetof(bGPDlayer, info[0]), 128);
+ gpencil_layer_setactive(gpd, gpl);
+
+ scrarea_queue_winredraw(curarea);
+ allqueue(REDRAWACTION, 0);
+}
+
+/* add a new layer */
+void gp_ui_addlayer_cb (void *gpd, void *dummy)
+{
+ gpencil_layer_addnew(gpd);
+
+ scrarea_queue_winredraw(curarea);
+ allqueue(REDRAWACTION, 0);
+}
+
+/* delete active layer */
+void gp_ui_dellayer_cb (void *gpd, void *dummy)
+{
+ gpencil_layer_delactive(gpd);
+
+ scrarea_queue_winredraw(curarea);
+ allqueue(REDRAWACTION, 0);
+}
+
+/* delete last stroke of active layer */
+void gp_ui_delstroke_cb (void *gpd, void *gpl)
+{
+ bGPDframe *gpf= gpencil_layer_getframe(gpl, CFRA, 0);
+
+ if (gpf) {
+ if (gpf->framenum != CFRA) return;
+
+ gpencil_layer_setactive(gpd, gpl);
+ gpencil_frame_delete_laststroke(gpl, gpf);
+
+ scrarea_queue_winredraw(curarea);
+ }
+}
+
+/* delete active frame of active layer */
+void gp_ui_delframe_cb (void *gpd, void *gpl)
+{
+ bGPDframe *gpf= gpencil_layer_getframe(gpl, CFRA, 0);
+
+ gpencil_layer_setactive(gpd, gpl);
+ gpencil_layer_delframe(gpl, gpf);
+
+ scrarea_queue_winredraw(curarea);
+ allqueue(REDRAWACTION, 0);
+}
+
+/* convert the active layer to geometry */
+void gp_ui_convertlayer_cb (void *gpd, void *gpl)
+{
+ gpencil_layer_setactive(gpd, gpl);
+ gpencil_convert_menu();
+
+ scrarea_queue_winredraw(curarea);
+}
+#endif
+
+/* ------- Drawing Code ------- */
+
+#if 0
+/* XXX */
+/* draw the controls for a given layer */
+static void gp_drawui_layer (uiBlock *block, bGPdata *gpd, bGPDlayer *gpl, short *xco, short *yco)
+{
+ uiBut *but;
+ short active= (gpl->flag & GP_LAYER_ACTIVE);
+ short width= 314;
+ short height;
+ int rb_col;
+
+ /* unless button has own callback, it adds this callback to button */
+ uiBlockSetFunc(block, gp_ui_activelayer_cb, gpd, gpl);
+
+ /* draw header */
+ {
+ uiBlockSetEmboss(block, UI_EMBOSSN);
+
+ /* rounded header */
+ if (active) uiBlockSetCol(block, TH_BUT_ACTION);
+ rb_col= (active)?-20:20;
+ uiDefBut(block, ROUNDBOX, B_REDR, "", *xco-8, *yco-2, width, 24, NULL, 5.0, 0.0, 15.0, (float)(rb_col-20), "");
+ if (active) uiBlockSetCol(block, TH_AUTO);
+
+ /* lock toggle */
+ uiDefIconButBitI(block, ICONTOG, GP_LAYER_LOCKED, B_REDR, ICON_UNLOCKED, *xco-7, *yco-1, 20, 20, &gpl->flag, 0.0, 0.0, 0, 0, "Layer cannot be modified");
+ }
+
+ /* when layer is locked or hidden, only draw header */
+ if (gpl->flag & (GP_LAYER_LOCKED|GP_LAYER_HIDE)) {
+ char name[256]; /* gpl->info is 128, but we need space for 'locked/hidden' as well */
+
+ height= 0;
+
+ /* visibility button (only if hidden but not locked!) */
+ if ((gpl->flag & GP_LAYER_HIDE) && !(gpl->flag & GP_LAYER_LOCKED))
+ uiDefIconButBitI(block, ICONTOG, GP_LAYER_HIDE, B_REDR, ICON_RESTRICT_VIEW_OFF, *xco+12, *yco-1, 20, 20, &gpl->flag, 0.0, 0.0, 0, 0, "Visibility of layer");
+
+ /* name */
+ if (gpl->flag & GP_LAYER_HIDE)
+ sprintf(name, "%s (Hidden)", gpl->info);
+ else
+ sprintf(name, "%s (Locked)", gpl->info);
+ uiDefBut(block, LABEL, 1, name, *xco+35, *yco, 240, 20, NULL, 0.0, 0.0, 0, 0, "Short description of what this layer is for (optional)");
+
+ /* delete button (only if hidden but not locked!) */
+ if ((gpl->flag & GP_LAYER_HIDE) & !(gpl->flag & GP_LAYER_LOCKED)) {
+ but= uiDefIconBut(block, BUT, B_REDR, ICON_X, *xco+(width-30), *yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, "Delete layer");
+ uiButSetFunc(but, gp_ui_dellayer_cb, gpd, NULL);
+ }
+ uiBlockSetEmboss(block, UI_EMBOSS);
+ }
+ else {
+ height= 97;
+
+ /* draw rest of header */
+ {
+ /* visibility button */
+ uiDefIconButBitI(block, ICONTOG, GP_LAYER_HIDE, B_REDR, ICON_RESTRICT_VIEW_OFF, *xco+12, *yco-1, 20, 20, &gpl->flag, 0.0, 0.0, 0, 0, "Visibility of layer");
+
+ uiBlockSetEmboss(block, UI_EMBOSS);
+
+ /* name */
+ but= uiDefButC(block, TEX, B_REDR, "Info:", *xco+36, *yco, 240, 19, gpl->info, 0, 127, 0, 0, "Short description of what this layer is for (optional)");
+ uiButSetFunc(but, gp_ui_renamelayer_cb, gpd, gpl);
+
+ /* delete 'button' */
+ uiBlockSetEmboss(block, UI_EMBOSSN);
+
+ but= uiDefIconBut(block, BUT, B_REDR, ICON_X, *xco+(width-30), *yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, "Delete layer");
+ uiButSetFunc(but, gp_ui_dellayer_cb, gpd, NULL);
+
+ uiBlockSetEmboss(block, UI_EMBOSS);
+ }
+
+ /* draw backdrop */
+ if (active) uiBlockSetCol(block, TH_BUT_ACTION);
+ uiDefBut(block, ROUNDBOX, B_DIFF, "", *xco-8, *yco-height, width, height-1, NULL, 5.0, 0.0, 12.0, (float)rb_col, "");
+ if (active) uiBlockSetCol(block, TH_AUTO);
+
+ /* draw settings */
+ {
+ /* color */
+ uiBlockBeginAlign(block);
+ uiDefButF(block, COL, B_REDR, "", *xco, *yco-26, 150, 19, gpl->color, 0, 0, 0, 0, "Color to use for all strokes on this Grease Pencil Layer");
+ uiDefButF(block, NUMSLI, B_REDR, "Opacity: ", *xco,*yco-45,150,19, &gpl->color[3], 0.3f, 1.0f, 0, 0, "Visibility of stroke (0.3 to 1.0)");
+ uiBlockEndAlign(block);
+
+ /* stroke thickness */
+ uiDefButS(block, NUMSLI, B_REDR, "Thickness:", *xco, *yco-75, 150, 20, &gpl->thickness, 1, 10, 0, 0, "Thickness of strokes (in pixels)");
+
+ /* debugging options */
+ if (G.f & G_DEBUG) {
+ uiDefButBitI(block, TOG, GP_LAYER_DRAWDEBUG, B_REDR, "Show Points", *xco, *yco-95, 150, 20, &gpl->flag, 0, 0, 0, 0, "Show points which form the strokes");
+ }
+
+ /* onion-skinning */
+ uiBlockBeginAlign(block);
+ uiDefButBitI(block, TOG, GP_LAYER_ONIONSKIN, B_REDR, "Onion-Skin", *xco+160, *yco-26, 140, 20, &gpl->flag, 0, 0, 0, 0, "Ghost frames on either side of frame");
+ uiDefButS(block, NUMSLI, B_REDR, "GStep:", *xco+160, *yco-46, 140, 20, &gpl->gstep, 0, 120, 0, 0, "Max number of frames on either side of active frame to show (0 = just 'first' available sketch on either side)");
+ uiBlockEndAlign(block);
+
+ /* options */
+ uiBlockBeginAlign(block);
+ if (curarea->spacetype == SPACE_VIEW3D) {
+ but= uiDefBut(block, BUT, B_REDR, "Convert to...", *xco+160, *yco-75, 140, 20, NULL, 0, 0, 0, 0, "Converts this layer's strokes to geometry (Hotkey = Alt-Shift-C)");
+ uiButSetFunc(but, gp_ui_convertlayer_cb, gpd, gpl);
+ }
+ else {
+ but= uiDefBut(block, BUT, B_REDR, "Del Active Frame", *xco+160, *yco-75, 140, 20, NULL, 0, 0, 0, 0, "Erases the the active frame for this layer (Hotkey = Alt-XKEY/DEL)");
+ uiButSetFunc(but, gp_ui_delframe_cb, gpd, gpl);
+ }
+
+ but= uiDefBut(block, BUT, B_REDR, "Del Last Stroke", *xco+160, *yco-95, 140, 20, NULL, 0, 0, 0, 0, "Erases the last stroke from the active frame (Hotkey = Alt-XKEY/DEL)");
+ uiButSetFunc(but, gp_ui_delstroke_cb, gpd, gpl);
+ uiBlockEndAlign(block);
+ }
+ }
+
+ /* adjust height for new to start */
+ (*yco) -= (height + 27);
+}
+#endif
+/* Draw the contents for a grease-pencil panel. This assumes several things:
+ * - that panel has been created, is 318 x 204. max yco is 225
+ * - that a toggle for turning on/off gpencil drawing is 150 x 20, starting from (10,225)
+ * which is basically the top left-hand corner
+ * It will return the amount of extra space to extend the panel by
+ */
+short draw_gpencil_panel (uiBlock *block, bGPdata *gpd, ScrArea *sa)
+{
+#if 0
+ uiBut *but;
+ bGPDlayer *gpl;
+ short xco= 10, yco= 170;
+
+ /* draw gpd settings first */
+ {
+ /* add new layer buttons */
+ but= uiDefBut(block, BUT, B_REDR, "Add New Layer", 10,205,150,20, 0, 0, 0, 0, 0, "Adds a new Grease Pencil Layer");
+ uiButSetFunc(but, gp_ui_addlayer_cb, gpd, NULL);
+
+
+ /* show override lmb-clicks button + painting lock */
+ uiBlockBeginAlign(block);
+ if ((gpd->flag & GP_DATA_EDITPAINT)==0) {
+ uiDefButBitI(block, TOG, GP_DATA_EDITPAINT, B_REDR, "Draw Mode", 170, 225, 130, 20, &gpd->flag, 0, 0, 0, 0, "Interpret click-drag as new strokes");
+
+ uiBlockSetCol(block, TH_BUT_SETTING);
+ uiDefIconButBitI(block, ICONTOG, GP_DATA_LMBPLOCK, B_REDR, ICON_UNLOCKED, 300, 225, 20, 20, &gpd->flag, 0.0, 0.0, 0, 0, "Painting cannot occur with Shift-LMB (when making selections)");
+ uiBlockSetCol(block, TH_AUTO);
+ }
+ else
+ uiDefButBitI(block, TOG, GP_DATA_EDITPAINT, B_REDR, "Draw Mode", 170, 225, 150, 20, &gpd->flag, 0, 0, 0, 0, "Interpret click-drag as new strokes");
+ uiBlockEndAlign(block);
+
+ /* 'view align' button (naming depends on context) */
+ if (sa->spacetype == SPACE_VIEW3D)
+ uiDefButBitI(block, TOG, GP_DATA_VIEWALIGN, B_REDR, "Sketch in 3D", 170, 205, 150, 20, &gpd->flag, 0, 0, 0, 0, "New strokes are added in 3D-space");
+ else
+ uiDefButBitI(block, TOG, GP_DATA_VIEWALIGN, B_REDR, "Stick to View", 170, 205, 150, 20, &gpd->flag, 0, 0, 0, 0, "New strokes are added on 2d-canvas");
+ }
+
+ /* draw for each layer */
+ for (gpl= gpd->layers.first; gpl; gpl= gpl->next) {
+ gp_drawui_layer(block, gpd, gpl, &xco, &yco);
+ }
+
+ /* return new height if necessary */
+ return (yco < 0) ? (204 - yco) : 204;
+#endif
+ return 0;
+}
+
+/* ************************************************** */
/* GREASE PENCIL DRAWING */
/* ----- General Defines ------ */
@@ -83,7 +350,6 @@ enum {
GP_DRAWDATA_ONLY3D = (1<<1), /* only draw 3d-strokes */
GP_DRAWDATA_ONLYV2D = (1<<2), /* only draw 'canvas' strokes */
GP_DRAWDATA_ONLYI2D = (1<<3), /* only draw 'image' strokes */
- GP_DRAWDATA_IEDITHACK = (1<<4), /* special hack for drawing strokes in Image Editor (weird coordinates) */
};
/* thickness above which we should use special drawing */
@@ -123,21 +389,11 @@ static void gp_draw_stroke_buffer (tGPspoint *points, int totpoints, short thick
glBegin(GL_LINE_STRIP);
for (i=0, pt=points; i < totpoints && pt; i++, pt++) {
- /* if there was a significant pressure change, stop the curve, change the thickness of the stroke,
- * and continue drawing again (since line-width cannot change in middle of GL_LINE_STRIP)
- */
if (fabs(pt->pressure - oldpressure) > 0.2f) {
glEnd();
glLineWidth(pt->pressure * thickness);
glBegin(GL_LINE_STRIP);
- /* need to roll-back one point to ensure that there are no gaps in the stroke */
- if (i != 0) {
- pt--;
- glVertex2f(pt->x, pt->y);
- pt++;
- }
- /* now the point we want... */
glVertex2f(pt->x, pt->y);
oldpressure = pt->pressure;
@@ -176,8 +432,8 @@ static void gp_draw_stroke_point (bGPDspoint *points, short thickness, short sfl
co[1]= (points->y * winy) + offsy;
}
else {
- co[0]= (points->x / 100 * winx);
- co[1]= (points->y / 100 * winy);
+ co[0]= (points->x / 1000 * winx);
+ co[1]= (points->y / 1000 * winy);
}
/* if thickness is less than GP_DRAWTHICKNESS_SPECIAL, simple dot looks ok
@@ -217,21 +473,11 @@ static void gp_draw_stroke_3d (bGPDspoint *points, int totpoints, short thicknes
/* draw stroke curve */
glBegin(GL_LINE_STRIP);
for (i=0, pt=points; i < totpoints && pt; i++, pt++) {
- /* if there was a significant pressure change, stop the curve, change the thickness of the stroke,
- * and continue drawing again (since line-width cannot change in middle of GL_LINE_STRIP)
- */
if (fabs(pt->pressure - oldpressure) > 0.2f) {
glEnd();
glLineWidth(pt->pressure * thickness);
glBegin(GL_LINE_STRIP);
- /* need to roll-back one point to ensure that there are no gaps in the stroke */
- if (i != 0) {
- pt--;
- glVertex3f(pt->x, pt->y, pt->z);
- pt++;
- }
- /* now the point we want... */
glVertex3f(pt->x, pt->y, pt->z);
oldpressure = pt->pressure;
@@ -255,12 +501,14 @@ static void gp_draw_stroke_3d (bGPDspoint *points, int totpoints, short thicknes
/* draw a given stroke in 2d */
static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness, short dflag, short sflag,
short debug, int offsx, int offsy, int winx, int winy)
-{
+{
+ int spacetype= 0; // XXX make local gpencil state var?
+
/* if thickness is less than GP_DRAWTHICKNESS_SPECIAL, 'smooth' opengl lines look better
* - 'smooth' opengl lines are also required if Image Editor 'image-based' stroke
*/
if ( (thickness < GP_DRAWTHICKNESS_SPECIAL) ||
- ((dflag & GP_DRAWDATA_IEDITHACK) && (dflag & GP_DRAWDATA_ONLYV2D)) )
+ ((spacetype==SPACE_IMAGE) && (dflag & GP_DRAWDATA_ONLYV2D)) )
{
bGPDspoint *pt;
int i;
@@ -277,8 +525,8 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness,
glVertex2f(x, y);
}
else {
- const float x= (pt->x / 100 * winx);
- const float y= (pt->y / 100 * winy);
+ const float x= (pt->x / 1000 * winx);
+ const float y= (pt->y / 1000 * winy);
glVertex2f(x, y);
}
@@ -317,10 +565,10 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness,
s1[1]= (pt2->y * winy) + offsy;
}
else {
- s0[0]= (pt1->x / 100 * winx);
- s0[1]= (pt1->y / 100 * winy);
- s1[0]= (pt2->x / 100 * winx);
- s1[1]= (pt2->y / 100 * winy);
+ s0[0]= (pt1->x / 1000 * winx);
+ s0[1]= (pt1->y / 1000 * winy);
+ s1[0]= (pt2->x / 1000 * winx);
+ s1[1]= (pt2->y / 1000 * winy);
}
/* calculate gradient and normal - 'angle'=(ny/nx) */
@@ -465,8 +713,8 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness,
glVertex2f(x, y);
}
else {
- const float x= (float)(pt->x / 100 * winx);
- const float y= (float)(pt->y / 100 * winy);
+ const float x= (float)(pt->x / 1000 * winx);
+ const float y= (float)(pt->y / 1000 * winy);
glVertex2f(x, y);
}
@@ -518,9 +766,6 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy
{
bGPDlayer *gpl, *actlay=NULL;
- /* reset line drawing style (in case previous user didn't reset) */
- setlinestyle(0);
-
/* turn on smooth lines (i.e. anti-aliasing) */
glEnable(GL_LINE_SMOOTH);
@@ -627,7 +872,47 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy
/* turn off alpha blending, then smooth lines */
glDisable(GL_BLEND); // alpha blending
glDisable(GL_LINE_SMOOTH); // smooth lines
+
+ /* show info for debugging the status of gpencil */
+#if 0
+ if ( ((dflag & GP_DRAWDATA_NOSTATUS)==0) && (gpd->flag & GP_DATA_DISPINFO) ) {
+ char printable[256];
+ short xmax;
+
+ /* get text to display */
+ if (actlay) {
+ if (gpd->flag & GP_DATA_EDITPAINT)
+ UI_ThemeColor(TH_BONE_POSE); // should be blue-ish
+ else if (actlay->actframe == NULL)
+ UI_ThemeColor(TH_REDALERT);
+ else if (actlay->actframe->framenum == cfra)
+ UI_ThemeColor(TH_VERTEX_SELECT); // should be yellow
+ else
+ UI_ThemeColor(TH_TEXT_HI);
+
+ if (actlay->actframe) {
+ sprintf(printable, "GPencil: Layer ('%s'), Frame (%d)%s",
+ actlay->info, actlay->actframe->framenum,
+ ((gpd->flag & GP_DATA_EDITPAINT)?" , Draw Mode On":"") );
+ }
+ else {
+ sprintf(printable, "GPencil: Layer ('%s'), Frame <None>%s",
+ actlay->info, ((gpd->flag & GP_DATA_EDITPAINT)?" , Draw Mode On":"") );
+ }
+ }
+ else {
+ UI_ThemeColor(TH_REDALERT);
+ sprintf(printable, "GPencil: Layer <None>");
+ }
+ xmax= GetButStringLength(printable);
+ /* only draw it if view is wide enough (assume padding of 20 is enough for now) */
+ if (winx > (xmax + 20)) {
+ BLF_draw_default(winx-xmax, winy-20, 0.0f, printable);
+ }
+ }
+#endif
+
/* restore initial gl conditions */
glLineWidth(1.0);
glPointSize(1.0);
@@ -636,12 +921,6 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy
/* ----- Grease Pencil Sketches Drawing API ------ */
-// ............................
-// XXX
-// We need to review the calls below, since they may be/are not that suitable for
-// the new ways that we intend to be drawing data...
-// ............................
-
/* draw grease-pencil sketches to specified 2d-view that uses ibuf corrections */
void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf)
{
@@ -654,7 +933,7 @@ void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf)
/* check that we have grease-pencil stuff to draw */
if (ELEM(NULL, sa, ibuf)) return;
- gpd= gpencil_data_get_active(C); // XXX
+ gpd= gpencil_data_getactive(sa);
if (gpd == NULL) return;
/* calculate rect */
@@ -671,7 +950,7 @@ void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf)
wmOrtho2(ar->v2d.cur.xmin, ar->v2d.cur.xmax, ar->v2d.cur.ymin, ar->v2d.cur.ymax);
- dflag |= GP_DRAWDATA_ONLYV2D|GP_DRAWDATA_IEDITHACK;
+ dflag |= GP_DRAWDATA_ONLYV2D;
}
break;
@@ -728,14 +1007,9 @@ void draw_gpencil_2dview (bContext *C, short onlyv2d)
/* check that we have grease-pencil stuff to draw */
if (sa == NULL) return;
- gpd= gpencil_data_get_active(C); // XXX
+ gpd= gpencil_data_getactive(sa);
if (gpd == NULL) return;
- /* special hack for Image Editor */
- // FIXME: the opengl poly-strokes don't draw at right thickness when done this way, so disabled
- if (sa->spacetype == SPACE_IMAGE)
- dflag |= GP_DRAWDATA_IEDITHACK;
-
/* draw it! */
if (onlyv2d) dflag |= (GP_DRAWDATA_ONLYV2D|GP_DRAWDATA_NOSTATUS);
gp_draw_data(gpd, 0, 0, ar->winx, ar->winy, CFRA, dflag);
@@ -746,13 +1020,14 @@ void draw_gpencil_2dview (bContext *C, short onlyv2d)
*/
void draw_gpencil_3dview (bContext *C, short only3d)
{
+ ScrArea *sa= CTX_wm_area(C);
ARegion *ar= CTX_wm_region(C);
Scene *scene= CTX_data_scene(C);
bGPdata *gpd;
int dflag = 0;
/* check that we have grease-pencil stuff to draw */
- gpd= gpencil_data_get_active(C); // XXX
+ gpd= gpencil_data_getactive(sa);
if (gpd == NULL) return;
/* draw it! */
@@ -772,7 +1047,7 @@ void draw_gpencil_oglrender (bContext *C)
/* assume gpencil data comes from v3d */
if (v3d == NULL) return;
- gpd= gpencil_data_get_active(C);
+ gpd= v3d->gpd;
if (gpd == NULL) return;
/* pass 1: draw 3d-strokes ------------ > */
@@ -780,7 +1055,7 @@ void draw_gpencil_oglrender (bContext *C)
/* pass 2: draw 2d-strokes ------------ > */
/* adjust view matrices */
- wmOrtho2(-0.375f, (float)(ar->winx)-0.375f, -0.375f, (float)(ar->winy)-0.375f); // XXX may not be correct anymore
+ wmOrtho2(-0.375f, (float)(ar->winx)-0.375f, -0.375f, (float)(ar->winy)-0.375f);
glLoadIdentity();
/* draw it! */
diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c
deleted file mode 100644
index b25de4d5f1d..00000000000
--- a/source/blender/editors/gpencil/gpencil_buttons.c
+++ /dev/null
@@ -1,281 +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2008, Blender Foundation, Joshua Leung
- * This is a new part of Blender
- *
- * Contributor(s): Joshua Leung
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stddef.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_arithb.h"
-#include "BLI_blenlib.h"
-
-#include "DNA_gpencil_types.h"
-#include "DNA_listBase.h"
-#include "DNA_scene_types.h"
-#include "DNA_screen_types.h"
-#include "DNA_userdef_types.h"
-#include "DNA_windowmanager_types.h"
-
-#include "BKE_context.h"
-#include "BKE_global.h"
-#include "BKE_gpencil.h"
-#include "BKE_utildefines.h"
-
-#include "WM_api.h"
-#include "WM_types.h"
-
-#include "RNA_access.h"
-
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
-
-#include "ED_gpencil.h"
-#include "ED_sequencer.h"
-#include "ED_util.h"
-
-#include "UI_interface.h"
-#include "UI_resources.h"
-#include "UI_view2d.h"
-
-#include "gpencil_intern.h"
-
-/* ************************************************** */
-/* GREASE PENCIL PANEL-UI DRAWING */
-
-/* Every space which implements Grease-Pencil functionality should have a panel
- * for the settings. All of the space-dependent parts should be coded in the panel
- * code for that space, but the rest is all handled by generic panel here.
- */
-
-/* ------- Callbacks ----------- */
-/* These are just 'dummy wrappers' around gpencil api calls */
-
-/* make layer active one after being clicked on */
-void gp_ui_activelayer_cb (bContext *C, void *gpd, void *gpl)
-{
- gpencil_layer_setactive(gpd, gpl);
-
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX please work!
-}
-
-/* delete 'active' layer */
-void gp_ui_dellayer_cb (bContext *C, void *gpd, void *gpl)
-{
- /* make sure the layer we want to remove is the active one */
- gpencil_layer_setactive(gpd, gpl);
- gpencil_layer_delactive(gpd);
-
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX please work!
-}
-
-/* ------- Drawing Code ------- */
-
-/* draw the controls for a given layer */
-static void gp_drawui_layer (uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl)
-{
- uiLayout *box=NULL, *split=NULL;
- uiLayout *col=NULL, *subcol=NULL;
- uiLayout *row=NULL, *subrow=NULL;
- uiBlock *block;
- uiBut *but;
- PointerRNA ptr;
- int icon;
-
- /* make pointer to layer data */
- RNA_pointer_create((ID *)gpd, &RNA_GPencilLayer, gpl, &ptr);
-
- /* unless button has own callback, it adds this callback to button */
- block= uiLayoutGetBlock(layout);
- uiBlockSetFunc(block, gp_ui_activelayer_cb, gpd, gpl);
-
- /* draw header ---------------------------------- */
- /* get layout-row + UI-block for header */
- box= uiLayoutBox(layout);
-
- row= uiLayoutRow(box, 0);
- block= uiLayoutGetBlock(row); // err...
-
- uiBlockSetEmboss(block, UI_EMBOSSN);
-
- /* left-align ............................... */
- subrow= uiLayoutRow(row, 1);
- uiLayoutSetAlignment(subrow, UI_LAYOUT_ALIGN_LEFT);
-
- /* active */
- icon= (gpl->flag & GP_LAYER_ACTIVE) ? ICON_RADIOBUT_ON : ICON_RADIOBUT_OFF;
- uiItemR(subrow, "", icon, &ptr, "active", 0);
-
- /* locked */
- icon= (gpl->flag & GP_LAYER_LOCKED) ? ICON_LOCKED : ICON_UNLOCKED;
- uiItemR(subrow, "", icon, &ptr, "locked", 0);
-
- /* when layer is locked or hidden, only draw header */
- if (gpl->flag & (GP_LAYER_LOCKED|GP_LAYER_HIDE)) {
- char name[256]; /* gpl->info is 128, but we need space for 'locked/hidden' as well */
-
- /* visibility button (only if hidden but not locked!) */
- if ((gpl->flag & GP_LAYER_HIDE) && !(gpl->flag & GP_LAYER_LOCKED))
- uiItemR(subrow, "", ICON_RESTRICT_VIEW_ON, &ptr, "hide", 0);
-
-
- /* name */
- if (gpl->flag & GP_LAYER_HIDE)
- sprintf(name, "%s (Hidden)", gpl->info);
- else
- sprintf(name, "%s (Locked)", gpl->info);
- uiItemL(subrow, name, 0);
-
- /* delete button (only if hidden but not locked!) */
- if ((gpl->flag & GP_LAYER_HIDE) & !(gpl->flag & GP_LAYER_LOCKED)) {
- /* right-align ............................... */
- subrow= uiLayoutRow(row, 1);
- uiLayoutSetAlignment(subrow, UI_LAYOUT_ALIGN_RIGHT);
- block= uiLayoutGetBlock(subrow); // XXX... err...
-
- but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "Delete layer");
- uiButSetFunc(but, gp_ui_dellayer_cb, gpd, gpl);
- }
- uiBlockSetEmboss(block, UI_EMBOSS);
- }
- else {
- /* draw rest of header -------------------------------- */
- /* visibility button */
- uiItemR(subrow, "", ICON_RESTRICT_VIEW_OFF, &ptr, "hide", 0);
-
- uiBlockSetEmboss(block, UI_EMBOSS);
-
- /* name */
- uiItemR(subrow, "", 0, &ptr, "info", 0);
-
- /* delete 'button' */
- uiBlockSetEmboss(block, UI_EMBOSSN);
- /* right-align ............................... */
- subrow= uiLayoutRow(row, 1);
- uiLayoutSetAlignment(subrow, UI_LAYOUT_ALIGN_RIGHT);
- block= uiLayoutGetBlock(subrow); // XXX... err...
-
- but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "Delete layer");
- uiButSetFunc(but, gp_ui_dellayer_cb, gpd, gpl);
- uiBlockSetEmboss(block, UI_EMBOSS);
-
-
- /* new backdrop ----------------------------------- */
- box= uiLayoutBox(layout);
- split= uiLayoutSplit(box, 0.5f);
-
-
- /* draw settings ---------------------------------- */
- /* left column ..................... */
- col= uiLayoutColumn(split, 0);
-
- /* color */
- subcol= uiLayoutColumn(col, 1);
- uiItemR(subcol, "", 0, &ptr, "color", 0);
- uiItemR(subcol, NULL, 0, &ptr, "opacity", UI_ITEM_R_SLIDER);
-
- /* stroke thickness */
- subcol= uiLayoutColumn(col, 1);
- uiItemR(subcol, NULL, 0, &ptr, "line_thickness", UI_ITEM_R_SLIDER);
-
- /* debugging options */
- if (G.f & G_DEBUG) {
- subcol= uiLayoutColumn(col, 1);
- uiItemR(subcol, NULL, 0, &ptr, "show_points", 0);
- }
-
- /* right column ................... */
- col= uiLayoutColumn(split, 0);
-
- /* onion-skinning */
- subcol= uiLayoutColumn(col, 1);
- uiItemR(subcol, "Onion Skinning", 0, &ptr, "use_onion_skinning", 0);
- uiItemR(subcol, "Frames", 0, &ptr, "max_ghost_range", 0); // XXX shorter name here? (i.e. GStep)
-
- /* additional options... */
- subcol= uiLayoutColumn(col, 1);
- uiItemO(subcol, "Delete Frame", 0, "GPENCIL_OT_active_frame_delete");
- uiItemO(subcol, "Convert...", 0, "GPENCIL_OT_convert");
- }
-}
-
-/* Draw the contents for a grease-pencil panel*/
-static void draw_gpencil_panel (bContext *C, uiLayout *layout, bGPdata *gpd, PointerRNA *ctx_ptr)
-{
- PointerRNA gpd_ptr;
- bGPDlayer *gpl;
- uiLayout *col;
-
- /* make new PointerRNA for Grease Pencil block */
- RNA_id_pointer_create((ID *)gpd, &gpd_ptr);
-
- /* draw gpd settings first ------------------------------------- */
- col= uiLayoutColumn(layout, 0);
- /* current Grease Pencil block */
- // TODO: show some info about who owns this?
- uiTemplateID(col, C, ctx_ptr, "grease_pencil", "GPENCIL_OT_data_add", NULL, "GPENCIL_OT_data_unlink");
-
- /* add new layer button - can be used even when no data, since it can add a new block too */
- uiItemO(col, NULL, 0, "GPENCIL_OT_layer_add");
-
- /* sanity checks... */
- if (gpd == NULL)
- return;
-
- /* draw each layer --------------------------------------------- */
- for (gpl= gpd->layers.first; gpl; gpl= gpl->next) {
- col= uiLayoutColumn(layout, 1);
- gp_drawui_layer(col, gpd, gpl);
- }
-
- /* draw gpd drawing settings first ------------------------------------- */
- col= uiLayoutColumn(layout, 0);
- /* label */
- uiItemL(col, "Drawing Settings:", 0);
-
- /* 'stick to view' option */
- uiItemR(col, NULL, 0, &gpd_ptr, "view_space_draw", 0);
-}
-
-
-/* Standard panel to be included whereever Grease Pencil is used... */
-void gpencil_panel_standard(const bContext *C, Panel *pa)
-{
- bGPdata **gpd_ptr = NULL;
- PointerRNA ptr;
-
- //if (v3d->flag2 & V3D_DISPGP)... etc.
-
- /* get pointer to Grease Pencil Data */
- gpd_ptr= gpencil_data_get_pointers((bContext *)C, &ptr);
-
- if (gpd_ptr)
- draw_gpencil_panel((bContext *)C, pa->layout, *gpd_ptr, &ptr);
-}
-
-/* ************************************************** */
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 8cf1affa8c6..ef4e09274f2 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -17,7 +17,7 @@
* 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) 2008, Blender Foundation, Joshua Leung
+ * The Original Code is Copyright (C) 2008, Blender Foundation
* This is a new part of Blender
*
* Contributor(s): Joshua Leung
@@ -25,7 +25,6 @@
* ***** END GPL LICENSE BLOCK *****
*/
-
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -60,8 +59,6 @@
#include "BKE_gpencil.h"
#include "BKE_image.h"
#include "BKE_library.h"
-#include "BKE_object.h"
-#include "BKE_report.h"
#include "BKE_utildefines.h"
#include "BIF_gl.h"
@@ -70,9 +67,6 @@
#include "WM_api.h"
#include "WM_types.h"
-#include "RNA_access.h"
-#include "RNA_define.h"
-
#include "UI_view2d.h"
#include "ED_armature.h"
@@ -80,312 +74,275 @@
#include "ED_sequencer.h"
#include "ED_view3d.h"
+#include "PIL_time.h" /* sleep */
+
#include "gpencil_intern.h"
-/* ************************************************ */
-/* Context Wrangling... */
+/* XXX */
+static void BIF_undo_push() {}
+static void error() {}
+static int pupmenu() {return 0;}
+static void add_object_draw() {}
+static int get_activedevice() {return 0;}
+#define L_MOUSE 0
+#define R_MOUSE 0
+
+/* ************************************************** */
+/* XXX - OLD DEPRECEATED CODE... */
-/* Get pointer to active Grease Pencil datablock, and an RNA-pointer to trace back to whatever owns it */
-bGPdata **gpencil_data_get_pointers (bContext *C, PointerRNA *ptr)
+/* ----------- GP-Datablock API ------------- */
+
+/* get the appropriate bGPdata from the active/given context */
+// XXX region or region data?
+bGPdata *gpencil_data_getactive (ScrArea *sa)
{
- Scene *scene= CTX_data_scene(C);
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *curarea= NULL; // XXX
- /* if there's an active area, check if the particular editor may
- * have defined any special Grease Pencil context for editing...
- */
- if (sa) {
- switch (sa->spacetype) {
- case SPACE_VIEW3D: /* 3D-View */
- {
- Object *ob= CTX_data_active_object(C);
-
- // TODO: we can include other data-types such as bones later if need be...
-
- /* just in case no active object */
- if (ob) {
- /* for now, as long as there's an object, default to using that in 3D-View */
- if (ptr) RNA_id_pointer_create(&ob->id, ptr);
- return &ob->gpd;
- }
- }
- break;
+ /* error checking */
+ if ((sa == NULL) && (curarea == NULL))
+ return NULL;
+ if (sa == NULL)
+ sa= curarea;
+
+ /* handle depending on spacetype */
+ switch (sa->spacetype) {
+ case SPACE_VIEW3D:
+ {
+ View3D *v3d= sa->spacedata.first;
+ return v3d->gpd;
+ }
+ break;
+ case SPACE_NODE:
+ {
+ SpaceNode *snode= sa->spacedata.first;
+ return snode->gpd;
+ }
+ break;
+ case SPACE_SEQ:
+ {
+ SpaceSeq *sseq= sa->spacedata.first;
- case SPACE_NODE: /* Nodes Editor */
- {
- //SpaceNode *snode= (SpaceNode *)CTX_wm_space_data(C);
-
- /* return the GP data for the active node block/node */
- }
- break;
-
- case SPACE_SEQ: /* Sequencer */
- {
- //SpaceSeq *sseq= (SpaceSeq *)CTX_wm_space_data(C);
-
- /* return the GP data for the active strips/image/etc. */
- }
- break;
-
- case SPACE_IMAGE: /* Image/UV Editor */
- {
- SpaceImage *sima= (SpaceImage *)CTX_wm_space_data(C);
-
- /* for now, Grease Pencil data is associated with the space... */
- // XXX our convention for everything else is to link to data though...
- if (ptr) RNA_pointer_create((ID *)CTX_wm_screen(C), &RNA_SpaceImageEditor, sima, ptr);
- return &sima->gpd;
- }
- break;
-
- default: /* unsupported space */
- return NULL;
+ /* only applicable for image modes */
+ if (sseq->mainb != SEQ_DRAW_SEQUENCE)
+ return sseq->gpd;
+ }
+ break;
+ case SPACE_IMAGE:
+ {
+ SpaceImage *sima= sa->spacedata.first;
+ return sima->gpd;
}
+ break;
}
- /* just fall back on the scene's GP data */
- if (ptr) RNA_id_pointer_create((ID *)scene, ptr);
- return (scene) ? &scene->gpd : NULL;
-}
-
-/* Get the active Grease Pencil datablock */
-bGPdata *gpencil_data_get_active (bContext *C)
-{
- bGPdata **gpd_ptr= gpencil_data_get_pointers(C, NULL);
- return (gpd_ptr) ? *(gpd_ptr) : NULL;
+ /* nothing found */
+ return NULL;
}
-/* ************************************************ */
-/* Panel Operators */
-
-/* poll callback for adding data/layers - special */
-static int gp_add_poll (bContext *C)
-{
- /* the base line we have is that we have somewhere to add Grease Pencil data */
- return gpencil_data_get_pointers(C, NULL) != NULL;
-}
-
-/* ******************* Add New Data ************************ */
-
-/* add new datablock - wrapper around API */
-static int gp_data_add_exec (bContext *C, wmOperator *op)
+/* set bGPdata for the active/given context, and return success/fail */
+short gpencil_data_setactive (ScrArea *sa, bGPdata *gpd)
{
- bGPdata **gpd_ptr= gpencil_data_get_pointers(C, NULL);
+ ScrArea *curarea= NULL; // XXX
- if (gpd_ptr == NULL) {
- BKE_report(op->reports, RPT_ERROR, "Nowhere for Grease Pencil data to go");
- return OPERATOR_CANCELLED;
- }
- else {
- /* just add new datablock now */
- *gpd_ptr= gpencil_data_addnew("GPencil");
- }
-
- /* notifiers */
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX need a nicer one that will work
+ /* error checking */
+ if ((sa == NULL) && (curarea == NULL))
+ return 0;
+ if (gpd == NULL)
+ return 0;
+ if (sa == NULL)
+ sa= curarea;
- return OPERATOR_FINISHED;
-}
-
-void GPENCIL_OT_data_add (wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Grease Pencil Add New";
- ot->idname= "GPENCIL_OT_data_add";
- ot->description= "Add new Grease Pencil datablock.";
-
- /* callbacks */
- ot->exec= gp_data_add_exec;
- ot->poll= gp_add_poll;
-}
-
-/* ******************* Unlink Data ************************ */
-
-/* poll callback for adding data/layers - special */
-static int gp_data_unlink_poll (bContext *C)
-{
- bGPdata **gpd_ptr= gpencil_data_get_pointers(C, NULL);
+ /* handle depending on spacetype */
+ // TODO: someday we should have multi-user data, so no need to loose old data
+ switch (sa->spacetype) {
+ case SPACE_VIEW3D:
+ {
+ View3D *v3d= sa->spacedata.first;
+
+ /* free the existing block */
+ if (v3d->gpd)
+ free_gpencil_data(v3d->gpd);
+ v3d->gpd= gpd;
+
+ return 1;
+ }
+ break;
+ case SPACE_NODE:
+ {
+ SpaceNode *snode= sa->spacedata.first;
+
+ /* free the existing block */
+ if (snode->gpd)
+ free_gpencil_data(snode->gpd);
+ snode->gpd= gpd;
+
+ /* set special settings */
+ gpd->flag |= GP_DATA_VIEWALIGN;
+
+ return 1;
+ }
+ break;
+ case SPACE_SEQ:
+ {
+ SpaceSeq *sseq= sa->spacedata.first;
+
+ /* only applicable if right mode */
+ if (sseq->mainb != SEQ_DRAW_SEQUENCE) {
+ /* free the existing block */
+ if (sseq->gpd)
+ free_gpencil_data(sseq->gpd);
+ sseq->gpd= gpd;
+
+ return 1;
+ }
+ }
+ break;
+ case SPACE_IMAGE:
+ {
+ SpaceImage *sima= sa->spacedata.first;
+
+ if (sima->gpd)
+ free_gpencil_data(sima->gpd);
+ sima->gpd= gpd;
+
+ return 1;
+ }
+ break;
+ }
- /* if we have access to some active data, make sure there's a datablock before enabling this */
- return (gpd_ptr && *gpd_ptr);
+ /* failed to add */
+ return 0;
}
-
-/* unlink datablock - wrapper around API */
-static int gp_data_unlink_exec (bContext *C, wmOperator *op)
+/* return the ScrArea that has the given GP-datablock
+ * - assumes that only searching in current screen
+ * - is based on GP-datablocks only being able to
+ * exist for one area at a time (i.e. not multiuser)
+ */
+ScrArea *gpencil_data_findowner (bGPdata *gpd)
{
- bGPdata **gpd_ptr= gpencil_data_get_pointers(C, NULL);
+ bScreen *curscreen= NULL; // XXX
+ ScrArea *sa;
- if (gpd_ptr == NULL) {
- BKE_report(op->reports, RPT_ERROR, "Nowhere for Grease Pencil data to go");
- return OPERATOR_CANCELLED;
- }
- else {
- /* just unlink datablock now, decreasing its user count */
- bGPdata *gpd= (*gpd_ptr);
+ /* error checking */
+ if (gpd == NULL)
+ return NULL;
- gpd->id.us--;
- *gpd_ptr= NULL;
+ /* loop over all scrareas for current screen, and check if that area has this gpd */
+ for (sa= curscreen->areabase.first; sa; sa= sa->next) {
+ /* use get-active func to see if match */
+ if (gpencil_data_getactive(sa) == gpd)
+ return sa;
}
- /* notifiers */
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX need a nicer one that will work
-
- return OPERATOR_FINISHED;
+ /* not found */
+ return NULL;
}
-void GPENCIL_OT_data_unlink (wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Grease Pencil Unlink";
- ot->idname= "GPENCIL_OT_data_unlink";
- ot->description= "Unlink active Grease Pencil datablock.";
-
- /* callbacks */
- ot->exec= gp_data_unlink_exec;
- ot->poll= gp_data_unlink_poll;
-}
+/* ************************************************** */
+/* GREASE-PENCIL EDITING - Tools */
-/* ******************* Add New Layer ************************ */
+/* --------- Data Deletion ---------- */
-/* add new layer - wrapper around API */
-static int gp_layer_add_exec (bContext *C, wmOperator *op)
+/* delete the last stroke on the active layer */
+void gpencil_delete_laststroke (bGPdata *gpd, int cfra)
{
- bGPdata **gpd_ptr= gpencil_data_get_pointers(C, NULL);
-
- /* if there's no existing Grease-Pencil data there, add some */
- if (gpd_ptr == NULL) {
- BKE_report(op->reports, RPT_ERROR, "Nowhere for Grease Pencil data to go");
- return OPERATOR_CANCELLED;
- }
- if (*gpd_ptr == NULL)
- *gpd_ptr= gpencil_data_addnew("GPencil");
-
- /* add new layer now */
- gpencil_layer_addnew(*gpd_ptr);
-
- /* notifiers */
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX please work!
+ bGPDlayer *gpl= gpencil_layer_getactive(gpd);
+ bGPDframe *gpf= gpencil_layer_getframe(gpl, cfra, 0);
- return OPERATOR_FINISHED;
-}
-
-void GPENCIL_OT_layer_add (wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Add New Layer";
- ot->idname= "GPENCIL_OT_layer_add";
- ot->description= "Add new Grease Pencil layer for the active Grease Pencil datablock.";
-
- /* callbacks */
- ot->exec= gp_layer_add_exec;
- ot->poll= gp_add_poll;
+ gpencil_frame_delete_laststroke(gpl, gpf);
}
-/* ******************* Delete Active Frame ************************ */
-
-static int gp_actframe_delete_poll (bContext *C)
+/* delete the active frame */
+void gpencil_delete_actframe (bGPdata *gpd, int cfra)
{
- bGPdata *gpd= gpencil_data_get_active(C);
bGPDlayer *gpl= gpencil_layer_getactive(gpd);
+ bGPDframe *gpf= gpencil_layer_getframe(gpl, cfra, 0);
- /* only if there's an active layer with an active frame */
- return (gpl && gpl->actframe);
+ gpencil_layer_delframe(gpl, gpf);
}
-/* delete active frame - wrapper around API calls */
-static int gp_actframe_delete_exec (bContext *C, wmOperator *op)
+
+
+/* delete various grase-pencil elements
+ * mode: 1 - last stroke
+ * 2 - active frame
+ * 3 - active layer
+ */
+void gpencil_delete_operation (int cfra, short mode)
{
- Scene *scene= CTX_data_scene(C);
- bGPdata *gpd= gpencil_data_get_active(C);
- bGPDlayer *gpl= gpencil_layer_getactive(gpd);
- bGPDframe *gpf= gpencil_layer_getframe(gpl, CFRA, 0);
-
- /* if there's no existing Grease-Pencil data there, add some */
- if (gpd == NULL) {
- BKE_report(op->reports, RPT_ERROR, "No Grease Pencil data");
- return OPERATOR_CANCELLED;
- }
- if ELEM(NULL, gpl, gpf) {
- BKE_report(op->reports, RPT_ERROR, "No active frame to delete");
- return OPERATOR_CANCELLED;
- }
+ bGPdata *gpd;
- /* delete it... */
- gpencil_layer_delframe(gpl, gpf);
+ /* get datablock to work on */
+ gpd= gpencil_data_getactive(NULL);
+ if (gpd == NULL) return;
- /* notifiers */
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX please work!
+ switch (mode) {
+ case 1: /* last stroke */
+ gpencil_delete_laststroke(gpd, cfra);
+ break;
+ case 2: /* active frame */
+ gpencil_delete_actframe(gpd, cfra);
+ break;
+ case 3: /* active layer */
+ gpencil_layer_delactive(gpd);
+ break;
+ }
- return OPERATOR_FINISHED;
+ /* redraw and undo-push */
+ BIF_undo_push("GPencil Delete");
}
-void GPENCIL_OT_active_frame_delete (wmOperatorType *ot)
+/* display a menu for deleting different grease-pencil elements */
+void gpencil_delete_menu (void)
{
- /* identifiers */
- ot->name= "Delete Active Frame";
- ot->idname= "GPENCIL_OT_active_frame_delete";
- ot->description= "Delete the active frame for the active Grease Pencil datablock.";
-
- /* callbacks */
- ot->exec= gp_actframe_delete_exec;
- ot->poll= gp_actframe_delete_poll;
+ bGPdata *gpd= gpencil_data_getactive(NULL);
+ int cfra= 0; // XXX
+ short mode;
+
+ /* only show menu if it will be relevant */
+ if (gpd == NULL) return;
+
+ mode= pupmenu("Grease Pencil Erase...%t|Last Stroke%x1|Active Frame%x2|Active Layer%x3");
+ if (mode <= 0) return;
+
+ gpencil_delete_operation(cfra, mode);
}
-/* ************************************************ */
-/* Grease Pencil to Data Operator */
+/* --------- Data Conversion ---------- */
-/* defines for possible modes */
-enum {
- GP_STROKECONVERT_PATH = 1,
- GP_STROKECONVERT_CURVE,
-};
-
-/* RNA enum define */
-static EnumPropertyItem prop_gpencil_convertmodes[] = {
- {GP_STROKECONVERT_PATH, "PATH", 0, "Path", ""},
- {GP_STROKECONVERT_CURVE, "CURVE", 0, "Bezier Curve", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-/* --- */
-
-/* convert the coordinates from the given stroke point into 3d-coordinates
- * - assumes that the active space is the 3D-View
- */
-static void gp_strokepoint_convertcoords (bContext *C, bGPDstroke *gps, bGPDspoint *pt, float p3d[3])
+/* convert the coordinates from the given stroke point into 3d-coordinates */
+static void gp_strokepoint_convertcoords (bGPDstroke *gps, bGPDspoint *pt, float p3d[3])
{
- Scene *scene= CTX_data_scene(C);
- View3D *v3d= CTX_wm_view3d(C);
- ARegion *ar= CTX_wm_region(C);
+ ARegion *ar= NULL; // XXX
if (gps->flag & GP_STROKE_3DSPACE) {
/* directly use 3d-coordinates */
VecCopyf(p3d, &pt->x);
}
else {
- float *fp= give_cursor(scene, v3d);
- float dvec[3];
short mval[2];
- int mx, my;
+ int mx=0, my=0;
+ float *fp= give_cursor(NULL, NULL); // XXX should be scene, v3d
+ float dvec[3];
/* get screen coordinate */
if (gps->flag & GP_STROKE_2DSPACE) {
- View2D *v2d= &ar->v2d;
- UI_view2d_view_to_region(v2d, pt->x, pt->y, &mx, &my);
+ // XXX
+ // View2D *v2d= spacelink_get_view2d(curarea->spacedata.first);
+ // UI_view2d_view_to_region(v2d, pt->x, pt->y, &mx, &my);
}
else {
- mx= (int)(pt->x / 100 * ar->winx);
- my= (int)(pt->y / 100 * ar->winy);
+ // XXX
+ // mx= (short)(pt->x / 1000 * curarea->winx);
+ // my= (short)(pt->y / 1000 * curarea->winy);
}
- mval[0]= (short)mx;
- mval[1]= (short)my;
/* convert screen coordinate to 3d coordinates
* - method taken from editview.c - mouse_cursor()
*/
project_short_noclip(ar, fp, mval);
- window_to_3d(ar, dvec, mval[0]-mx, mval[1]-my);
+ window_to_3d_delta(ar, dvec, mval[0]-mx, mval[1]-my);
VecSubf(p3d, fp, dvec);
}
}
@@ -393,7 +350,7 @@ static void gp_strokepoint_convertcoords (bContext *C, bGPDstroke *gps, bGPDspoi
/* --- */
/* convert stroke to 3d path */
-static void gp_stroke_to_path (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, Curve *cu)
+static void gp_stroke_to_path (bGPDlayer *gpl, bGPDstroke *gps, Curve *cu)
{
bGPDspoint *pt;
Nurb *nu;
@@ -416,7 +373,7 @@ static void gp_stroke_to_path (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, Cur
float p3d[3];
/* get coordinates to add at */
- gp_strokepoint_convertcoords(C, gps, pt, p3d);
+ gp_strokepoint_convertcoords(gps, pt, p3d);
VecCopyf(bp->vec, p3d);
/* set settings */
@@ -429,7 +386,7 @@ static void gp_stroke_to_path (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, Cur
}
/* convert stroke to 3d bezier */
-static void gp_stroke_to_bezier (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, Curve *cu)
+static void gp_stroke_to_bezier (bGPDlayer *gpl, bGPDstroke *gps, Curve *cu)
{
bGPDspoint *pt;
Nurb *nu;
@@ -450,7 +407,7 @@ static void gp_stroke_to_bezier (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, C
float p3d[3];
/* get coordinates to add at */
- gp_strokepoint_convertcoords(C, gps, pt, p3d);
+ gp_strokepoint_convertcoords(gps, pt, p3d);
/* TODO: maybe in future the handles shouldn't be in same place */
VecCopyf(bezt->vec[0], p3d);
@@ -471,12 +428,10 @@ static void gp_stroke_to_bezier (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, C
}
/* convert a given grease-pencil layer to a 3d-curve representation (using current view if appropriate) */
-static void gp_layer_to_curve (bContext *C, bGPdata *gpd, bGPDlayer *gpl, short mode)
+static void gp_layer_to_curve (bGPdata *gpd, bGPDlayer *gpl, Scene *scene, short mode)
{
- Scene *scene= CTX_data_scene(C);
- bGPDframe *gpf= gpencil_layer_getframe(gpl, CFRA, 0);
+ bGPDframe *gpf= gpencil_layer_getframe(gpl, scene->r.cfra, 0);
bGPDstroke *gps;
- Base *base= BASACT;
Object *ob;
Curve *cu;
@@ -491,7 +446,8 @@ static void gp_layer_to_curve (bContext *C, bGPdata *gpd, bGPDlayer *gpl, short
/* init the curve object (remove rotation and get curve data from it)
* - must clear transforms set on object, as those skew our results
*/
- ob= add_object(scene, OB_CURVE);
+ add_object_draw(OB_CURVE);
+ ob= OBACT;
ob->loc[0]= ob->loc[1]= ob->loc[2]= 0;
ob->rot[0]= ob->rot[1]= ob->rot[2]= 0;
cu= ob->data;
@@ -504,84 +460,1240 @@ static void gp_layer_to_curve (bContext *C, bGPdata *gpd, bGPDlayer *gpl, short
/* add points to curve */
for (gps= gpf->strokes.first; gps; gps= gps->next) {
switch (mode) {
- case GP_STROKECONVERT_PATH:
- gp_stroke_to_path(C, gpl, gps, cu);
+ case 1:
+ gp_stroke_to_path(gpl, gps, cu);
break;
- case GP_STROKECONVERT_CURVE:
- gp_stroke_to_bezier(C, gpl, gps, cu);
+ case 2:
+ gp_stroke_to_bezier(gpl, gps, cu);
break;
}
}
-
- /* restore old active object */
- BASACT= base;
}
/* --- */
-static int gp_convert_poll (bContext *C)
+/* convert a stroke to a bone chain */
+static void gp_stroke_to_bonechain (bGPDlayer *gpl, bGPDstroke *gps, bArmature *arm, ListBase *bones)
{
- bGPdata *gpd= gpencil_data_get_active(C);
- ScrArea *sa= CTX_wm_area(C);
+ EditBone *ebo, *prev=NULL;
+ bGPDspoint *pt, *ptn;
+ int i;
- /* only if there's valid data, and the current view is 3D View */
- return ((sa->spacetype == SPACE_VIEW3D) && gpencil_layer_getactive(gpd));
+ /* add each segment separately */
+ for (i=0, pt=gps->points, ptn=gps->points+1; i < (gps->totpoints-1); prev=ebo, i++, pt++, ptn++) {
+ float p3da[3], p3db[3];
+
+ /* get coordinates to add at */
+ gp_strokepoint_convertcoords(gps, pt, p3da);
+ gp_strokepoint_convertcoords(gps, ptn, p3db);
+
+ /* allocate new bone */
+ ebo= MEM_callocN(sizeof(EditBone), "eBone");
+
+ VecCopyf(ebo->head, p3da);
+ VecCopyf(ebo->tail, p3db);
+
+ /* add new bone - note: sync with editarmature.c::add_editbone() */
+ {
+ BLI_strncpy(ebo->name, "Stroke", 32);
+ unique_editbone_name(bones, ebo->name, NULL);
+
+ BLI_addtail(bones, ebo);
+
+ if (i > 0)
+ {
+ ebo->flag |= BONE_CONNECTED;
+ }
+ ebo->weight= 1.0f;
+ ebo->dist= 0.25f;
+ ebo->xwidth= 0.1f;
+ ebo->zwidth= 0.1f;
+ ebo->ease1= 1.0f;
+ ebo->ease2= 1.0f;
+ ebo->rad_head= pt->pressure * gpl->thickness * 0.1f;
+ ebo->rad_tail= ptn->pressure * gpl->thickness * 0.1f;
+ ebo->segments= 1;
+ ebo->layer= arm->layer;
+ }
+
+ /* set parenting */
+ ebo->parent= prev;
+ }
}
-static int gp_convert_layer_exec (bContext *C, wmOperator *op)
+/* convert a given grease-pencil layer to a 3d-curve representation (using current view if appropriate) */
+// XXX depreceated... we now have etch-a-ton for this...
+static void gp_layer_to_armature (bGPdata *gpd, bGPDlayer *gpl, Scene *scene, View3D *v3d, short mode)
{
- bGPdata *gpd= gpencil_data_get_active(C);
- bGPDlayer *gpl= gpencil_layer_getactive(gpd);
- Scene *scene= CTX_data_scene(C);
- View3D *v3d= CTX_wm_view3d(C);
- float *fp= give_cursor(scene, v3d);
- int mode= RNA_enum_get(op->ptr, "type");
+ bGPDframe *gpf= gpencil_layer_getframe(gpl, scene->r.cfra, 0);
+ bGPDstroke *gps;
+ Object *ob;
+ bArmature *arm;
+
+ /* error checking */
+ if (ELEM3(NULL, gpd, gpl, gpf))
+ return;
+
+ /* only convert if there are any strokes on this layer's frame to convert */
+ if (gpf->strokes.first == NULL)
+ return;
+
+ /* init the armature object (remove rotation and assign armature data to it)
+ * - must clear transforms set on object, as those skew our results
+ */
+ add_object_draw(OB_ARMATURE);
+ ob= OBACT;
+ ob->loc[0]= ob->loc[1]= ob->loc[2]= 0;
+ ob->rot[0]= ob->rot[1]= ob->rot[2]= 0;
+ arm= ob->data;
- /* check if there's data to work with */
- if (gpd == NULL) {
- BKE_report(op->reports, RPT_ERROR, "No Grease Pencil data to work on.");
- return OPERATOR_CANCELLED;
+ /* rename object and armature to layer name */
+ rename_id((ID *)ob, gpl->info);
+ rename_id((ID *)arm, gpl->info);
+
+ /* this is editmode armature */
+ arm->edbo= MEM_callocN(sizeof(ListBase), "arm edbo");
+
+ /* convert segments to bones, strokes to bone chains */
+ for (gps= gpf->strokes.first; gps; gps= gps->next) {
+ gp_stroke_to_bonechain(gpl, gps, arm, arm->edbo);
}
+ /* adjust roll of bones
+ * - set object as EditMode object, but need to clear afterwards!
+ * - use 'align to world z-up' option
+ */
+ {
+ /* set our data as if we're in editmode to fool auto_align_armature() */
+ scene->obedit= ob;
+
+ /* WARNING: need to make sure this magic number doesn't change */
+ auto_align_armature(scene, v3d, 2);
+
+ scene->obedit= NULL;
+ }
+
+ /* flush editbones to armature */
+ ED_armature_from_edit(scene, ob);
+ ED_armature_edit_free(ob);
+}
+
+/* --- */
+
+/* convert grease-pencil strokes to another representation
+ * mode: 1 - Active layer to path
+ * 2 - Active layer to bezier
+ * 3 - Active layer to armature
+ */
+void gpencil_convert_operation (short mode)
+{
+ Scene *scene= NULL; // XXX
+ View3D *v3d= NULL; // XXX
+ RegionView3D *rv3d= NULL; // XXX
+ bGPdata *gpd;
+ float *fp= give_cursor(scene, v3d);
+
+ /* get datablock to work on */
+ gpd= gpencil_data_getactive(NULL);
+ if (gpd == NULL) return;
+
/* initialise 3d-cursor correction globals */
- initgrabz(CTX_wm_region_view3d(C), fp[0], fp[1], fp[2]);
+ initgrabz(rv3d, fp[0], fp[1], fp[2]);
- /* handle conversion modes */
+ /* handle selection modes */
switch (mode) {
- case GP_STROKECONVERT_PATH:
- case GP_STROKECONVERT_CURVE:
- gp_layer_to_curve(C, gpd, gpl, mode);
+ case 1: /* active layer only (to path) */
+ case 2: /* active layer only (to bezier) */
+ {
+ bGPDlayer *gpl= gpencil_layer_getactive(gpd);
+ gp_layer_to_curve(gpd, gpl, scene, mode);
+ }
+ break;
+ case 3: /* active layer only (to armature) */
+ {
+ bGPDlayer *gpl= gpencil_layer_getactive(gpd);
+ gp_layer_to_armature(gpd, gpl, scene, v3d, mode);
+ }
+ break;
+ }
+
+ /* redraw and undo-push */
+ BIF_undo_push("GPencil Convert");
+}
+
+/* ************************************************** */
+/* GREASE-PENCIL EDITING MODE - Painting */
+
+/* ---------- 'Globals' and Defines ----------------- */
+
+/* maximum sizes of gp-session buffer */
+#define GP_STROKE_BUFFER_MAX 5000
+
+/* Macros for accessing sensitivity thresholds... */
+ /* minimum number of pixels mouse should move before new point created */
+#define MIN_MANHATTEN_PX (U.gp_manhattendist)
+ /* minimum length of new segment before new point can be added */
+#define MIN_EUCLIDEAN_PX (U.gp_euclideandist)
+
+/* macro to test if only converting endpoints - only for use when converting! */
+#define GP_BUFFER2STROKE_ENDPOINTS ((gpd->flag & GP_DATA_EDITPAINT) && (ctrl))
+
+/* ------ */
+
+/* Temporary 'Stroke' Operation data */
+typedef struct tGPsdata {
+ Scene *scene; /* current scene from context */
+ ScrArea *sa; /* area where painting originated */
+ ARegion *ar; /* region where painting originated */
+ View2D *v2d; /* needed for GP_STROKE_2DSPACE */
+
+ ImBuf *ibuf; /* needed for GP_STROKE_2DIMAGE */
+ struct IBufViewSettings {
+ int offsx, offsy; /* offsets */
+ int sizex, sizey; /* dimensions to use as scale-factor */
+ } im2d_settings; /* needed for GP_STROKE_2DIMAGE */
+
+ bGPdata *gpd; /* gp-datablock layer comes from */
+ bGPDlayer *gpl; /* layer we're working on */
+ bGPDframe *gpf; /* frame we're working on */
+
+ short status; /* current status of painting */
+ short paintmode; /* mode for painting */
+
+ short mval[2]; /* current mouse-position */
+ short mvalo[2]; /* previous recorded mouse-position */
+
+ float pressure; /* current stylus pressure */
+ float opressure; /* previous stylus pressure */
+
+ short radius; /* radius of influence for eraser */
+} tGPsdata;
+
+/* values for tGPsdata->status */
+enum {
+ GP_STATUS_NORMAL = 0, /* running normally */
+ GP_STATUS_ERROR, /* something wasn't correctly set up */
+ GP_STATUS_DONE /* painting done */
+};
+
+/* values for tGPsdata->paintmode */
+enum {
+ GP_PAINTMODE_DRAW = 0,
+ GP_PAINTMODE_ERASER
+};
+
+/* Return flags for adding points to stroke buffer */
+enum {
+ GP_STROKEADD_INVALID = -2, /* error occurred - insufficient info to do so */
+ GP_STROKEADD_OVERFLOW = -1, /* error occurred - cannot fit any more points */
+ GP_STROKEADD_NORMAL, /* point was successfully added */
+ GP_STROKEADD_FULL /* cannot add any more points to buffer */
+};
+
+/* ---------- Stroke Editing ------------ */
+
+/* clear the session buffers (call this before AND after a paint operation) */
+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)
+ memset(gpd->sbuffer, 0, sizeof(tGPspoint)*GP_STROKE_BUFFER_MAX);
+ else
+ gpd->sbuffer= MEM_callocN(sizeof(tGPspoint)*GP_STROKE_BUFFER_MAX, "gp_session_strokebuffer");
+
+ /* reset indices */
+ gpd->sbuffer_size = 0;
+
+ /* reset flags */
+ gpd->sbuffer_sflag= 0;
+}
+
+/* check if the current mouse position is suitable for adding a new point */
+static short gp_stroke_filtermval (tGPsdata *p, short mval[2], short pmval[2])
+{
+ short dx= abs(mval[0] - pmval[0]);
+ short dy= abs(mval[1] - pmval[1]);
+
+ /* check if mouse moved at least certain distance on both axes (best case) */
+ if ((dx > MIN_MANHATTEN_PX) && (dy > MIN_MANHATTEN_PX))
+ return 1;
+
+ /* check if the distance since the last point is significant enough */
+ // future optimisation: sqrt here may be too slow?
+ else if (sqrt(dx*dx + dy*dy) > MIN_EUCLIDEAN_PX)
+ return 1;
+
+ /* mouse 'didn't move' */
+ else
+ return 0;
+}
+
+/* convert screen-coordinates to buffer-coordinates */
+static void gp_stroke_convertcoords (tGPsdata *p, short mval[], float out[])
+{
+ bGPdata *gpd= p->gpd;
+
+ /* in 3d-space - pt->x/y/z are 3 side-by-side floats */
+ if (gpd->sbuffer_sflag & GP_STROKE_3DSPACE) {
+ const short mx=mval[0], my=mval[1];
+ float *fp= give_cursor(p->scene, NULL); // XXX NULL could be v3d
+ float dvec[3];
+
+ /* Current method just converts each point in screen-coordinates to
+ * 3D-coordinates using the 3D-cursor as reference. In general, this
+ * works OK, but it could of course be improved.
+ *
+ * TODO:
+ * - investigate using nearest point(s) on a previous stroke as
+ * reference point instead or as offset, for easier stroke matching
+ * - investigate projection onto geometry (ala retopo)
+ */
+
+ /* method taken from editview.c - mouse_cursor() */
+ project_short_noclip(p->ar, fp, mval);
+ window_to_3d_delta(p->ar, dvec, mval[0]-mx, mval[1]-my);
+ VecSubf(out, fp, dvec);
+ }
+
+ /* 2d - on 'canvas' (assume that p->v2d is set) */
+ else if ((gpd->sbuffer_sflag & GP_STROKE_2DSPACE) && (p->v2d)) {
+ float x, y;
+
+ UI_view2d_region_to_view(p->v2d, mval[0], mval[1], &x, &y);
+
+ out[0]= x;
+ out[1]= y;
+ }
+
+ /* 2d - on image 'canvas' (assume that p->v2d is set) */
+ else if (gpd->sbuffer_sflag & GP_STROKE_2DIMAGE) {
+ int sizex, sizey, offsx, offsy;
+
+ /* get stored settings
+ * - assume that these have been set already (there are checks that set sane 'defaults' just in case)
+ */
+ sizex= p->im2d_settings.sizex;
+ sizey= p->im2d_settings.sizey;
+ offsx= p->im2d_settings.offsx;
+ offsy= p->im2d_settings.offsy;
+
+ /* calculate new points */
+ out[0]= (float)(mval[0] - offsx) / (float)sizex;
+ out[1]= (float)(mval[1] - offsy) / (float)sizey;
+ }
+
+ /* 2d - relative to screen (viewport area) */
+ else {
+ out[0] = (float)(mval[0]) / (float)(p->sa->winx) * 1000;
+ out[1] = (float)(mval[1]) / (float)(p->sa->winy) * 1000;
+ }
+}
+
+/* add current stroke-point to buffer (returns whether point was successfully added) */
+static short gp_stroke_addpoint (tGPsdata *p, short mval[2], float pressure)
+{
+ bGPdata *gpd= p->gpd;
+ tGPspoint *pt;
+
+ /* check if still room in buffer */
+ if (gpd->sbuffer_size >= GP_STROKE_BUFFER_MAX)
+ return GP_STROKEADD_OVERFLOW;
+
+ /* get pointer to destination point */
+ pt= ((tGPspoint *)(gpd->sbuffer) + gpd->sbuffer_size);
+
+ /* store settings */
+ pt->x= mval[0];
+ pt->y= mval[1];
+ pt->pressure= pressure;
+
+ /* increment counters */
+ gpd->sbuffer_size++;
+
+ /* check if another operation can still occur */
+ if (gpd->sbuffer_size == GP_STROKE_BUFFER_MAX)
+ return GP_STROKEADD_FULL;
+ else
+ return GP_STROKEADD_NORMAL;
+}
+
+/* smooth a stroke (in buffer) before storing it */
+static void gp_stroke_smooth (tGPsdata *p)
+{
+ bGPdata *gpd= p->gpd;
+ int i=0, cmx=gpd->sbuffer_size;
+ int ctrl= 0; // XXX
+
+ /* only smooth if smoothing is enabled, and we're not doing a straight line */
+ if (!(U.gp_settings & GP_PAINT_DOSMOOTH) || GP_BUFFER2STROKE_ENDPOINTS)
+ return;
+
+ /* don't try if less than 2 points in buffer */
+ if ((cmx <= 2) || (gpd->sbuffer == NULL))
+ return;
+
+ /* apply weighting-average (note doing this along path sequentially does introduce slight error) */
+ for (i=0; i < gpd->sbuffer_size; i++) {
+ tGPspoint *pc= (((tGPspoint *)gpd->sbuffer) + i);
+ tGPspoint *pb= (i-1 > 0)?(pc-1):(pc);
+ tGPspoint *pa= (i-2 > 0)?(pc-2):(pb);
+ tGPspoint *pd= (i+1 < cmx)?(pc+1):(pc);
+ tGPspoint *pe= (i+2 < cmx)?(pc+2):(pd);
+
+ pc->x= (short)(0.1*pa->x + 0.2*pb->x + 0.4*pc->x + 0.2*pd->x + 0.1*pe->x);
+ pc->y= (short)(0.1*pa->y + 0.2*pb->y + 0.4*pc->y + 0.2*pd->y + 0.1*pe->y);
+ }
+}
+
+/* simplify a stroke (in buffer) before storing it
+ * - applies a reverse Chaikin filter
+ * - code adapted from etch-a-ton branch (editarmature_sketch.c)
+ */
+static void gp_stroke_simplify (tGPsdata *p)
+{
+ bGPdata *gpd= p->gpd;
+ tGPspoint *old_points= (tGPspoint *)gpd->sbuffer;
+ short num_points= gpd->sbuffer_size;
+ short flag= gpd->sbuffer_sflag;
+ short i, j;
+ int ctrl= 0; // XXX
+
+ /* only simplify if simlification is enabled, and we're not doing a straight line */
+ if (!(U.gp_settings & GP_PAINT_DOSIMPLIFY) || GP_BUFFER2STROKE_ENDPOINTS)
+ return;
+
+ /* don't simplify if less than 4 points in buffer */
+ if ((num_points <= 2) || (old_points == NULL))
+ return;
+
+ /* clear buffer (but don't free mem yet) so that we can write to it
+ * - firstly set sbuffer to NULL, so a new one is allocated
+ * - secondly, reset flag after, as it gets cleared auto
+ */
+ gpd->sbuffer= NULL;
+ gp_session_validatebuffer(p);
+ gpd->sbuffer_sflag = flag;
+
+/* macro used in loop to get position of new point
+ * - used due to the mixture of datatypes in use here
+ */
+#define GP_SIMPLIFY_AVPOINT(offs, sfac) \
+ { \
+ co[0] += (float)(old_points[offs].x * sfac); \
+ co[1] += (float)(old_points[offs].y * sfac); \
+ pressure += old_points[offs].pressure * sfac; \
+ }
+
+ for (i = 0, j = 0; i < num_points; i++)
+ {
+ if (i - j == 3)
+ {
+ float co[2], pressure;
+ short mco[2];
+
+ /* initialise values */
+ co[0]= 0;
+ co[1]= 0;
+ pressure = 0;
+
+ /* using macro, calculate new point */
+ GP_SIMPLIFY_AVPOINT(j, -0.25f);
+ GP_SIMPLIFY_AVPOINT(j+1, 0.75f);
+ GP_SIMPLIFY_AVPOINT(j+2, 0.75f);
+ GP_SIMPLIFY_AVPOINT(j+3, -0.25f);
+
+ /* set values for adding */
+ mco[0]= (short)co[0];
+ mco[1]= (short)co[1];
+
+ /* ignore return values on this... assume to be ok for now */
+ gp_stroke_addpoint(p, mco, pressure);
+
+ j += 2;
+ }
+ }
+
+ /* free old buffer */
+ MEM_freeN(old_points);
+}
+
+
+/* make a new stroke from the buffer data */
+static void gp_stroke_newfrombuffer (tGPsdata *p)
+{
+ bGPdata *gpd= p->gpd;
+ bGPDstroke *gps;
+ bGPDspoint *pt;
+ tGPspoint *ptc;
+ int i, totelem;
+ int ctrl= 0; // XXX
+
+ /* get total number of points to allocate space for:
+ * - in 'Draw Mode', holding the Ctrl-Modifier will only take endpoints
+ * - otherwise, do whole stroke
+ */
+ if (GP_BUFFER2STROKE_ENDPOINTS)
+ totelem = (gpd->sbuffer_size >= 2) ? 2: gpd->sbuffer_size;
+ else
+ totelem = gpd->sbuffer_size;
+
+ /* exit with error if no valid points from this stroke */
+ if (totelem == 0) {
+ if (G.f & G_DEBUG)
+ printf("Error: No valid points in stroke buffer to convert (tot=%d) \n", gpd->sbuffer_size);
+ 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;
+
+ /* copy points from the buffer to the stroke */
+ if (GP_BUFFER2STROKE_ENDPOINTS) {
+ /* 'Draw Mode' + Ctrl-Modifier - only endpoints */
+ {
+ /* first point */
+ ptc= gpd->sbuffer;
+
+ /* convert screen-coordinates to appropriate coordinates (and store them) */
+ gp_stroke_convertcoords(p, &ptc->x, &pt->x);
+
+ /* copy pressure */
+ pt->pressure= ptc->pressure;
+
+ pt++;
+ }
+
+ if (totelem == 2) {
+ /* last point if applicable */
+ ptc= ((tGPspoint *)gpd->sbuffer) + (gpd->sbuffer_size - 1);
+
+ /* convert screen-coordinates to appropriate coordinates (and store them) */
+ gp_stroke_convertcoords(p, &ptc->x, &pt->x);
+
+ /* copy pressure */
+ pt->pressure= ptc->pressure;
+ }
+ }
+ else {
+ /* convert all points (normal behaviour) */
+ for (i=0, ptc=gpd->sbuffer; i < gpd->sbuffer_size && ptc; i++, ptc++) {
+ /* convert screen-coordinates to appropriate coordinates (and store them) */
+ gp_stroke_convertcoords(p, &ptc->x, &pt->x);
+
+ /* copy pressure */
+ pt->pressure= ptc->pressure;
+
+ pt++;
+ }
+ }
+
+ /* add stroke to frame */
+ BLI_addtail(&p->gpf->strokes, gps);
+}
+
+/* --- 'Eraser' for 'Paint' Tool ------ */
+
+/* eraser tool - remove segment from stroke/split stroke (after lasso inside) */
+static short gp_stroke_eraser_splitdel (bGPDframe *gpf, bGPDstroke *gps, int i)
+{
+ bGPDspoint *pt_tmp= gps->points;
+ bGPDstroke *gsn = NULL;
+
+ /* if stroke only had two points, get rid of stroke */
+ if (gps->totpoints == 2) {
+ /* free stroke points, then stroke */
+ MEM_freeN(pt_tmp);
+ BLI_freelinkN(&gpf->strokes, gps);
+
+ /* nothing left in stroke, so stop */
+ return 1;
+ }
+
+ /* if last segment, just remove segment from the stroke */
+ else if (i == gps->totpoints - 2) {
+ /* allocate new points array, and assign most of the old stroke there */
+ gps->totpoints--;
+ gps->points= MEM_callocN(sizeof(bGPDspoint)*gps->totpoints, "gp_stroke_points");
+ memcpy(gps->points, pt_tmp, sizeof(bGPDspoint)*gps->totpoints);
+
+ /* free temp buffer */
+ MEM_freeN(pt_tmp);
+
+ /* nothing left in stroke, so stop */
+ return 1;
+ }
+
+ /* if first segment, just remove segment from the stroke */
+ else if (i == 0) {
+ /* allocate new points array, and assign most of the old stroke there */
+ gps->totpoints--;
+ gps->points= MEM_callocN(sizeof(bGPDspoint)*gps->totpoints, "gp_stroke_points");
+ memcpy(gps->points, pt_tmp + 1, sizeof(bGPDspoint)*gps->totpoints);
+
+ /* free temp buffer */
+ MEM_freeN(pt_tmp);
+
+ /* no break here, as there might still be stuff to remove in this stroke */
+ return 0;
+ }
+
+ /* segment occurs in 'middle' of stroke, so split */
+ else {
+ /* duplicate stroke, and assign 'later' data to that stroke */
+ gsn= MEM_dupallocN(gps);
+ gsn->prev= gsn->next= NULL;
+ BLI_insertlinkafter(&gpf->strokes, gps, gsn);
+
+ gsn->totpoints= gps->totpoints - i;
+ gsn->points= MEM_callocN(sizeof(bGPDspoint)*gsn->totpoints, "gp_stroke_points");
+ memcpy(gsn->points, pt_tmp + i, sizeof(bGPDspoint)*gsn->totpoints);
+
+ /* adjust existing stroke */
+ gps->totpoints= i;
+ gps->points= MEM_callocN(sizeof(bGPDspoint)*gps->totpoints, "gp_stroke_points");
+ memcpy(gps->points, pt_tmp, sizeof(bGPDspoint)*i);
+
+ /* free temp buffer */
+ MEM_freeN(pt_tmp);
+
+ /* nothing left in stroke, so stop */
+ return 1;
+ }
+}
+
+/* eraser tool - check if part of stroke occurs within last segment drawn by eraser */
+static short gp_stroke_eraser_strokeinside (short mval[], short mvalo[], short rad, short x0, short y0, short x1, short y1)
+{
+ /* simple within-radius check for now */
+ if (edge_inside_circle(mval[0], mval[1], rad, x0, y0, x1, y1))
+ return 1;
+
+ /* not inside */
+ return 0;
+}
+
+/* eraser tool - evaluation per stroke */
+static void gp_stroke_eraser_dostroke (tGPsdata *p, short mval[], short mvalo[], short rad, rcti *rect, bGPDframe *gpf, bGPDstroke *gps)
+{
+ bGPDspoint *pt1, *pt2;
+ int x0=0, y0=0, x1=0, y1=0;
+ short xyval[2];
+ int i;
+
+ if (gps->totpoints == 0) {
+ /* just free stroke */
+ if (gps->points)
+ MEM_freeN(gps->points);
+ BLI_freelinkN(&gpf->strokes, gps);
+ }
+ else if (gps->totpoints == 1) {
+ /* get coordinates */
+ if (gps->flag & GP_STROKE_3DSPACE) {
+ project_short(p->ar, &gps->points->x, xyval);
+ x0= xyval[0];
+ y0= xyval[1];
+ }
+ else if (gps->flag & GP_STROKE_2DSPACE) {
+ UI_view2d_view_to_region(p->v2d, gps->points->x, gps->points->y, &x0, &y0);
+ }
+ else if (gps->flag & GP_STROKE_2DIMAGE) {
+ int offsx, offsy, sizex, sizey;
+
+ /* get stored settings */
+ sizex= p->im2d_settings.sizex;
+ sizey= p->im2d_settings.sizey;
+ offsx= p->im2d_settings.offsx;
+ offsy= p->im2d_settings.offsy;
+
+ /* calculate new points */
+ x0= (short)((gps->points->x * sizex) + offsx);
+ y0= (short)((gps->points->y * sizey) + offsy);
+ }
+ else {
+ x0= (short)(gps->points->x / 1000 * p->sa->winx);
+ y0= (short)(gps->points->y / 1000 * p->sa->winy);
+ }
+
+ /* do boundbox check first */
+ if (BLI_in_rcti(rect, x0, y0)) {
+ /* only check if point is inside */
+ if ( ((x0-mval[0])*(x0-mval[0]) + (y0-mval[1])*(y0-mval[1])) <= rad*rad ) {
+ /* free stroke */
+ MEM_freeN(gps->points);
+ BLI_freelinkN(&gpf->strokes, gps);
+ }
+ }
+ }
+ else {
+ /* loop over the points in the stroke, checking for intersections
+ * - an intersection will require the stroke to be split
+ */
+ for (i=0; (i+1) < gps->totpoints; i++) {
+ /* get points to work with */
+ pt1= gps->points + i;
+ pt2= gps->points + i + 1;
+
+ /* get coordinates */
+ if (gps->flag & GP_STROKE_3DSPACE) {
+ project_short(p->ar, &pt1->x, xyval);
+ x0= xyval[0];
+ y0= xyval[1];
+
+ project_short(p->ar, &pt2->x, xyval);
+ x1= xyval[0];
+ y1= xyval[1];
+ }
+ else if (gps->flag & GP_STROKE_2DSPACE) {
+ UI_view2d_view_to_region(p->v2d, pt1->x, pt1->y, &x0, &y0);
+
+ UI_view2d_view_to_region(p->v2d, pt2->x, pt2->y, &x1, &y1);
+ }
+ else if (gps->flag & GP_STROKE_2DIMAGE) {
+ int offsx, offsy, sizex, sizey;
+
+ /* get stored settings */
+ sizex= p->im2d_settings.sizex;
+ sizey= p->im2d_settings.sizey;
+ offsx= p->im2d_settings.offsx;
+ offsy= p->im2d_settings.offsy;
+
+ /* calculate new points */
+ x0= (short)((pt1->x * sizex) + offsx);
+ y0= (short)((pt1->y * sizey) + offsy);
+
+ x1= (short)((pt2->x * sizex) + offsx);
+ y1= (short)((pt2->y * sizey) + offsy);
+ }
+ else {
+ x0= (short)(pt1->x / 1000 * p->sa->winx);
+ y0= (short)(pt1->y / 1000 * p->sa->winy);
+ x1= (short)(pt2->x / 1000 * p->sa->winx);
+ y1= (short)(pt2->y / 1000 * p->sa->winy);
+ }
+
+ /* check that point segment of the boundbox of the eraser stroke */
+ if (BLI_in_rcti(rect, x0, y0) || BLI_in_rcti(rect, x1, y1)) {
+ /* check if point segment of stroke had anything to do with
+ * eraser region (either within stroke painted, or on its lines)
+ * - this assumes that linewidth is irrelevant
+ */
+ if (gp_stroke_eraser_strokeinside(mval, mvalo, rad, x0, y0, x1, y1)) {
+ /* if function returns true, break this loop (as no more point to check) */
+ if (gp_stroke_eraser_splitdel(gpf, gps, i))
+ break;
+ }
+ }
+ }
+ }
+}
+
+/* erase strokes which fall under the eraser strokes */
+static void gp_stroke_doeraser (tGPsdata *p)
+{
+ bGPDframe *gpf= p->gpf;
+ bGPDstroke *gps, *gpn;
+ rcti rect;
+
+ /* rect is rectangle of eraser */
+ rect.xmin= p->mval[0] - p->radius;
+ rect.ymin= p->mval[1] - p->radius;
+ rect.xmax= p->mval[0] + p->radius;
+ rect.ymax= p->mval[1] + p->radius;
+
+ /* loop over strokes, checking segments for intersections */
+ for (gps= gpf->strokes.first; gps; gps= gpn) {
+ gpn= gps->next;
+ gp_stroke_eraser_dostroke(p, p->mval, p->mvalo, p->radius, &rect, gpf, gps);
+ }
+}
+
+/* ---------- 'Paint' Tool ------------ */
+
+/* init new painting session */
+static void gp_session_initpaint (bContext *C, tGPsdata *p)
+{
+ ScrArea *curarea= CTX_wm_area(C);
+ ARegion *ar= CTX_wm_region(C);
+
+ /* clear previous data (note: is on stack) */
+ memset(p, 0, sizeof(tGPsdata));
+
+ /* 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;
+ }
+
+ /* pass on current scene */
+ p->scene= CTX_data_scene(C);
+
+ switch (curarea->spacetype) {
+ /* supported views first */
+ case SPACE_VIEW3D:
+ {
+ View3D *v3d= curarea->spacedata.first;
+
+ /* set current area */
+ p->sa= curarea;
+ p->ar= ar;
+
+ /* check that gpencil data is allowed to be drawn */
+ if ((v3d->flag2 & V3D_DISPGP)==0) {
+ p->status= GP_STATUS_ERROR;
+ if (G.f & G_DEBUG)
+ printf("Error: In active view, Grease Pencil not shown \n");
+ return;
+ }
+ }
+ break;
+ case SPACE_NODE:
+ {
+ SpaceNode *snode= curarea->spacedata.first;
+
+ /* set current area */
+ p->sa= curarea;
+ p->ar= ar;
+ p->v2d= &ar->v2d;
+
+ /* check that gpencil data is allowed to be drawn */
+ if ((snode->flag & SNODE_DISPGP)==0) {
+ p->status= GP_STATUS_ERROR;
+ if (G.f & G_DEBUG)
+ printf("Error: In active view, Grease Pencil not shown \n");
+ return;
+ }
+ }
break;
+ case SPACE_SEQ:
+ {
+ SpaceSeq *sseq= curarea->spacedata.first;
+
+ /* set current area */
+ p->sa= curarea;
+ p->ar= ar;
+ p->v2d= &ar->v2d;
+
+ /* check that gpencil data is allowed to be drawn */
+ if (sseq->mainb == SEQ_DRAW_SEQUENCE) {
+ p->status= GP_STATUS_ERROR;
+ if (G.f & G_DEBUG)
+ printf("Error: In active view (sequencer), active mode doesn't support Grease Pencil \n");
+ return;
+ }
+ 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;
+ }
+ }
+ break;
+ case SPACE_IMAGE:
+ {
+ SpaceImage *sima= curarea->spacedata.first;
+
+ /* set the current area */
+ p->sa= curarea;
+ p->ar= ar;
+ p->v2d= &ar->v2d;
+ p->ibuf= BKE_image_get_ibuf(sima->image, &sima->iuser);
- default: /* unsupoorted */
- BKE_report(op->reports, RPT_ERROR, "Unknown conversion option.");
- return OPERATOR_CANCELLED;
+ /* check that gpencil data is allowed to be drawn */
+ if ((sima->flag & SI_DISPGP)==0) {
+ p->status= GP_STATUS_ERROR;
+ if (G.f & G_DEBUG)
+ printf("Error: In active view, Grease Pencil not shown \n");
+ return;
+ }
+ }
+ break;
+ /* unsupported views */
+ default:
+ {
+ p->status= GP_STATUS_ERROR;
+ if (G.f & G_DEBUG)
+ printf("Error: Active view not appropriate for Grease Pencil drawing \n");
+ return;
+ }
+ break;
}
+
+ /* get gp-data */
+ p->gpd= gpencil_data_getactive(p->sa);
+ if (p->gpd == NULL) {
+ short ok;
- /* notifiers */
- WM_event_add_notifier(C, NC_OBJECT|NA_ADDED, NULL);
+ p->gpd= gpencil_data_addnew("GPencil");
+ ok= gpencil_data_setactive(p->sa, p->gpd);
+
+ /* most of the time, the following check isn't needed */
+ if (ok == 0) {
+ /* free gpencil data as it can't be used */
+ free_gpencil_data(p->gpd);
+ p->gpd= NULL;
+ p->status= GP_STATUS_ERROR;
+ if (G.f & G_DEBUG)
+ printf("Error: Could not assign newly created Grease Pencil data to active area \n");
+ return;
+ }
+ }
+
+ /* set edit flags */
+ G.f |= G_GREASEPENCIL;
- /* done */
- return OPERATOR_FINISHED;
+ /* clear out buffer (stored in gp-data) in case something contaminated it */
+ gp_session_validatebuffer(p);
+
+ /* set 'default' im2d_settings just in case something that uses this doesn't set it */
+ p->im2d_settings.sizex= 1;
+ p->im2d_settings.sizey= 1;
}
-void GPENCIL_OT_convert (wmOperatorType *ot)
+/* cleanup after a painting session */
+static void gp_session_cleanup (tGPsdata *p)
{
- /* identifiers */
- ot->name= "Convert Grease Pencil";
- ot->idname= "GPENCIL_OT_convert";
- ot->description= "Convert the active Grease Pencil layer to a new Object.";
+ bGPdata *gpd= p->gpd;
+
+ /* error checking */
+ if (gpd == NULL)
+ return;
- /* callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= gp_convert_layer_exec;
- ot->poll= gp_convert_poll;
+ /* free stroke buffer */
+ if (gpd->sbuffer) {
+ MEM_freeN(gpd->sbuffer);
+ gpd->sbuffer= NULL;
+ }
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ /* clear flags */
+ gpd->sbuffer_size= 0;
+ gpd->sbuffer_sflag= 0;
+}
+
+/* init new stroke */
+static void gp_paint_initstroke (tGPsdata *p, short paintmode)
+{
+ /* get active layer (or add a new one if non-existent) */
+ p->gpl= gpencil_layer_getactive(p->gpd);
+ if (p->gpl == NULL)
+ p->gpl= gpencil_layer_addnew(p->gpd);
+ if (p->gpl->flag & GP_LAYER_LOCKED) {
+ p->status= GP_STATUS_ERROR;
+ if (G.f & G_DEBUG)
+ printf("Error: Cannot paint on locked layer \n");
+ return;
+ }
+
+ /* get active frame (add a new one if not matching frame) */
+ p->gpf= gpencil_layer_getframe(p->gpl, p->scene->r.cfra, 1);
+ if (p->gpf == NULL) {
+ p->status= GP_STATUS_ERROR;
+ if (G.f & G_DEBUG)
+ printf("Error: No frame created (gpencil_paint_init) \n");
+ return;
+ }
+ else
+ p->gpf->flag |= GP_FRAME_PAINT;
+
+ /* set 'eraser' for this stroke if using eraser */
+ p->paintmode= paintmode;
+ if (p->paintmode == GP_PAINTMODE_ERASER)
+ p->gpd->sbuffer_sflag |= GP_STROKE_ERASER;
+
+ /* check if points will need to be made in view-aligned space */
+ if (p->gpd->flag & GP_DATA_VIEWALIGN) {
+ switch (p->sa->spacetype) {
+ case SPACE_VIEW3D:
+ {
+ View3D *v3d= (View3D *)p->sa->spacedata.first;
+ RegionView3D *rv3d= NULL; // XXX
+ float *fp= give_cursor(p->scene, v3d);
+
+ initgrabz(rv3d, fp[0], fp[1], fp[2]);
+
+ p->gpd->sbuffer_sflag |= GP_STROKE_3DSPACE;
+ }
+ break;
+ case SPACE_NODE:
+ {
+ p->gpd->sbuffer_sflag |= GP_STROKE_2DSPACE;
+ }
+ break;
+ case SPACE_SEQ:
+ {
+ SpaceSeq *sseq= (SpaceSeq *)p->sa->spacedata.first;
+ int rectx, recty;
+ float zoom, zoomx, zoomy;
+
+ /* set draw 2d-stroke flag */
+ p->gpd->sbuffer_sflag |= GP_STROKE_2DIMAGE;
+
+ /* calculate zoom factor */
+ zoom= (float)(SEQ_ZOOM_FAC(sseq->zoom));
+ if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
+ zoomx = zoom * ((float)p->scene->r.xasp / (float)p->scene->r.yasp);
+ zoomy = zoom;
+ }
+ else
+ zoomx = zoomy = zoom;
+
+ /* calculate rect size to use to calculate the size of the drawing area
+ * - We use the size of the output image not the size of the ibuf being shown
+ * as it is too messy getting the ibuf (and could be too slow). This should be
+ * a reasonable for most cases anyway.
+ */
+ rectx= (p->scene->r.size * p->scene->r.xsch) / 100;
+ recty= (p->scene->r.size * p->scene->r.ysch) / 100;
+
+ /* set offset and scale values for opertations to use */
+ p->im2d_settings.sizex= (int)(zoomx * rectx);
+ p->im2d_settings.sizey= (int)(zoomy * recty);
+ p->im2d_settings.offsx= (int)((p->sa->winx-p->im2d_settings.sizex)/2 + sseq->xof);
+ p->im2d_settings.offsy= (int)((p->sa->winy-p->im2d_settings.sizey)/2 + sseq->yof);
+ }
+ break;
+ case SPACE_IMAGE:
+ {
+ /* check if any ibuf available */
+ if (p->ibuf)
+ p->gpd->sbuffer_sflag |= GP_STROKE_2DSPACE;
+ }
+ break;
+ }
+ }
+}
+
+/* finish off a stroke (clears buffer, but doesn't finish the paint operation) */
+static void gp_paint_strokeend (tGPsdata *p)
+{
+ /* check if doing eraser or not */
+ if ((p->gpd->sbuffer_sflag & GP_STROKE_ERASER) == 0) {
+ /* smooth stroke before transferring? */
+ gp_stroke_smooth(p);
+
+ /* simplify stroke before transferring? */
+ gp_stroke_simplify(p);
+
+ /* transfer stroke to frame */
+ gp_stroke_newfrombuffer(p);
+ }
+
+ /* clean up buffer now */
+ gp_session_validatebuffer(p);
+}
+
+/* finish off stroke painting operation */
+static void gp_paint_cleanup (tGPsdata *p)
+{
+ /* finish off a stroke */
+ gp_paint_strokeend(p);
+
+ /* "unlock" frame */
+ p->gpf->flag &= ~GP_FRAME_PAINT;
+
+ /* add undo-push so stroke can be undone */
+ /* FIXME: currently disabled, as it's impossible to get this working nice
+ * as gpenci data is on currently screen-level (which isn't saved to undo files)
+ */
+ //BIF_undo_push("GPencil Stroke");
+
+ /* force redraw after drawing action */
+ // XXX force_draw_plus(SPACE_ACTION, 0);
+}
+
+/* -------- */
+
+/* main call to paint a new stroke */
+// XXX will become modal(), gets event, includes all info!
+short gpencil_paint (bContext *C, short paintmode)
+{
+ tGPsdata p;
+ short ok = GP_STROKEADD_NORMAL;
+
+ /* init paint-data */
+ gp_session_initpaint(C, &p);
+ if (p.status == GP_STATUS_ERROR) {
+ gp_session_cleanup(&p);
+ return 0;
+ }
+ gp_paint_initstroke(&p, paintmode);
+ if (p.status == GP_STATUS_ERROR) {
+ gp_session_cleanup(&p);
+ return 0;
+ }
+
+ /* set cursor to indicate drawing */
+ // XXX (cursor callbacks in regiontype) setcursor_space(p.sa->spacetype, CURSOR_VPAINT);
+
+ /* init drawing-device settings */
+ // XXX getmouseco_areawin(p.mval);
+ // XXX p.pressure = get_pressure();
+
+ p.mvalo[0]= p.mval[0];
+ p.mvalo[1]= p.mval[1];
+ p.opressure= p.pressure;
+
+ /* radius for eraser circle is defined in userprefs now */
+ // TODO: make this more easily tweaked...
+ p.radius= U.gp_eraser;
+
+ /* start drawing eraser-circle (if applicable) */
+ //if (paintmode == GP_PAINTMODE_ERASER)
+ // XXX draw_sel_circle(p.mval, NULL, p.radius, p.radius, 0); // draws frontbuffer, but sets backbuf again
+
+ /* only allow painting of single 'dots' if:
+ * - pressure is not excessive (as it can be on some windows tablets)
+ * - draw-mode for active datablock is turned on
+ * - not erasing
+ */
+ if (paintmode != GP_PAINTMODE_ERASER) {
+ if (!(p.pressure >= 0.99f) || (p.gpd->flag & GP_DATA_EDITPAINT)) {
+ gp_stroke_addpoint(&p, p.mval, p.pressure);
+ }
+ }
+
+ /* XXX paint loop */
+ if(0) {
+ /* get current user input */
+ // XXX getmouseco_areawin(p.mval);
+ // XXX p.pressure = get_pressure();
+
+ /* only add current point to buffer if mouse moved (otherwise wait until it does) */
+ if (paintmode == GP_PAINTMODE_ERASER) {
+ /* do 'live' erasing now */
+ gp_stroke_doeraser(&p);
+
+ // XXX draw_sel_circle(p.mval, p.mvalo, p.radius, p.radius, 0);
+ // XXX force_draw(0);
+
+ p.mvalo[0]= p.mval[0];
+ p.mvalo[1]= p.mval[1];
+ p.opressure= p.pressure;
+ }
+ else if (gp_stroke_filtermval(&p, p.mval, p.mvalo)) {
+ /* try to add point */
+ ok= gp_stroke_addpoint(&p, p.mval, p.pressure);
+
+ /* handle errors while adding point */
+ if ((ok == GP_STROKEADD_FULL) || (ok == GP_STROKEADD_OVERFLOW)) {
+ /* finish off old stroke */
+ gp_paint_strokeend(&p);
+
+ /* start a new stroke, starting from previous point */
+ gp_stroke_addpoint(&p, p.mvalo, p.opressure);
+ ok= gp_stroke_addpoint(&p, p.mval, p.pressure);
+ }
+ else if (ok == GP_STROKEADD_INVALID) {
+ /* the painting operation cannot continue... */
+ error("Cannot paint stroke");
+ p.status = GP_STATUS_ERROR;
+
+ if (G.f & G_DEBUG)
+ printf("Error: Grease-Pencil Paint - Add Point Invalid \n");
+ // XXX break;
+ }
+ // XXX force_draw(0);
+
+ p.mvalo[0]= p.mval[0];
+ p.mvalo[1]= p.mval[1];
+ p.opressure= p.pressure;
+ }
+
+ /* do mouse checking at the end, so don't check twice, and potentially
+ * miss a short tap
+ */
+ }
+
+ /* clear edit flags */
+ G.f &= ~G_GREASEPENCIL;
+
+ /* restore cursor to indicate end of drawing */
+ // XXX (cursor callbacks in regiontype) setcursor_space(p.sa->spacetype, CURSOR_STD);
+
+ /* check size of buffer before cleanup, to determine if anything happened here */
+ if (paintmode == GP_PAINTMODE_ERASER) {
+ ok= 1; /* assume that we did something... */
+ // XXX draw_sel_circle(NULL, p.mvalo, 0, p.radius, 0);
+ }
+ else
+ ok= p.gpd->sbuffer_size;
+
+ /* cleanup */
+ gp_paint_cleanup(&p);
+ gp_session_cleanup(&p);
+
+ /* done! return if a stroke was successfully added */
+ return ok;
+}
+
+
+/* All event (loops) handling checking if stroke drawing should be initiated
+ * should call this function.
+ */
+short gpencil_do_paint (bContext *C)
+{
+ ScrArea *sa= CTX_wm_area(C);
+ bGPdata *gpd = gpencil_data_getactive(sa);
+ short retval= 0;
+ int alt= 0, shift= 0, mbut= 0; // XXX
+
+ /* check if possible to do painting */
+ if (gpd == NULL)
+ return 0;
+
+ /* currently, we will only 'paint' if:
+ * 1. draw-mode on gpd is set (for accessibility reasons)
+ * a) single dots are only available by this method if a single click is made
+ * b) a straight line is drawn if ctrl-modifier is held (check is done when stroke is converted!)
+ * 2. if shift-modifier is held + lmb -> 'quick paint'
+ *
+ * OR
+ *
+ * draw eraser stroke if:
+ * 1. using the eraser on a tablet
+ * 2. draw-mode on gpd is set (for accessiblity reasons)
+ * (eraser is mapped to right-mouse)
+ * 3. Alt + 'select' mouse-button
+ * i.e. if LMB = select: Alt-LMB
+ * if RMB = select: Alt-RMB
+ */
+ if (get_activedevice() == 2) {
+ /* eraser on a tablet - always try to erase strokes */
+ retval = gpencil_paint(C, GP_PAINTMODE_ERASER);
+ }
+ else if (gpd->flag & GP_DATA_EDITPAINT) {
+ /* try to paint/erase */
+ if (mbut == L_MOUSE)
+ retval = gpencil_paint(C, GP_PAINTMODE_DRAW);
+ else if (mbut == R_MOUSE)
+ retval = gpencil_paint(C, GP_PAINTMODE_ERASER);
+ }
+ else if (!(gpd->flag & GP_DATA_LMBPLOCK)) {
+ /* try to paint/erase as not locked */
+ if (shift && (mbut == L_MOUSE)) {
+ retval = gpencil_paint(C, GP_PAINTMODE_DRAW);
+ }
+ else if (alt) {
+ if ((U.flag & USER_LMOUSESELECT) && (mbut == L_MOUSE))
+ retval = gpencil_paint(C, GP_PAINTMODE_ERASER);
+ else if (!(U.flag & USER_LMOUSESELECT) && (mbut == R_MOUSE))
+ retval = gpencil_paint(C, GP_PAINTMODE_ERASER);
+ }
+ }
- /* properties */
- RNA_def_enum(ot->srna, "type", prop_gpencil_convertmodes, 0, "Type", "");
+ /* return result of trying to paint */
+ return retval;
}
-/* ************************************************ */
+/* ************************************************** */
diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h
index 57e8c882d20..721d8544225 100644
--- a/source/blender/editors/gpencil/gpencil_intern.h
+++ b/source/blender/editors/gpencil/gpencil_intern.h
@@ -29,38 +29,8 @@
#define ED_GPENCIL_INTERN_H
/* internal exports only */
-
-
-/* ***************************************************** */
-/* Operator Defines */
-
-struct wmOperatorType;
-
-/* drawing ---------- */
-
-void GPENCIL_OT_draw(struct wmOperatorType *ot);
-
-/* Paint Modes for operator*/
-typedef enum eGPencil_PaintModes {
- GP_PAINTMODE_DRAW = 0,
- GP_PAINTMODE_ERASER,
- GP_PAINTMODE_DRAW_STRAIGHT,
-} eGPencil_PaintModes;
-
-/* buttons editing --- */
-
-void GPENCIL_OT_data_add(struct wmOperatorType *ot);
-void GPENCIL_OT_data_unlink(struct wmOperatorType *ot);
-
-void GPENCIL_OT_layer_add(struct wmOperatorType *ot);
-
-void GPENCIL_OT_active_frame_delete(struct wmOperatorType *ot);
-
-void GPENCIL_OT_convert(struct wmOperatorType *ot);
-
-
/******************************************************* */
-/* FILTERED ACTION DATA - TYPES ---> XXX DEPRECEATED OLD ANIM SYSTEM CODE! */
+/* FILTERED ACTION DATA - TYPES */
/* XXX - TODO: replace this with the modern bAnimListElem... */
/* This struct defines a structure used for quick access */
diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c
deleted file mode 100644
index d33ad16dfb1..00000000000
--- a/source/blender/editors/gpencil/gpencil_ops.c
+++ /dev/null
@@ -1,86 +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2009, Blender Foundation, Joshua Leung
- * This is a new part of Blender
- *
- * Contributor(s): Joshua Leung
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <stdlib.h>
-#include <stddef.h>
-#include <stdio.h>
-
-#include "BLI_blenlib.h"
-
-#include "DNA_windowmanager_types.h"
-
-#include "WM_api.h"
-#include "WM_types.h"
-
-#include "RNA_access.h"
-#include "RNA_define.h"
-#include "RNA_enum_types.h"
-
-#include "gpencil_intern.h"
-
-/* ****************************************** */
-/* Generic Editing Keymap */
-
-void ED_keymap_gpencil(wmWindowManager *wm)
-{
- ListBase *keymap= WM_keymap_listbase(wm, "Grease Pencil", 0, 0);
- wmKeymapItem *kmi;
-
- /* Draw */
- /* draw */
- WM_keymap_add_item(keymap, "GPENCIL_OT_draw", LEFTMOUSE, KM_PRESS, 0, DKEY);
- /* 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);
- /* erase */
- kmi=WM_keymap_add_item(keymap, "GPENCIL_OT_draw", RIGHTMOUSE, KM_PRESS, 0, DKEY);
- RNA_enum_set(kmi->ptr, "mode", GP_PAINTMODE_ERASER);
-}
-
-/* ****************************************** */
-
-void ED_operatortypes_gpencil (void)
-{
- /* Drawing ----------------------- */
-
- WM_operatortype_append(GPENCIL_OT_draw);
-
- /* Editing (Buttons) ------------ */
-
- WM_operatortype_append(GPENCIL_OT_data_add);
- WM_operatortype_append(GPENCIL_OT_data_unlink);
-
- WM_operatortype_append(GPENCIL_OT_layer_add);
-
- WM_operatortype_append(GPENCIL_OT_active_frame_delete);
-
- WM_operatortype_append(GPENCIL_OT_convert);
-
- /* Editing (Time) --------------- */
-}
-
-/* ****************************************** */
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
deleted file mode 100644
index 99b85d62026..00000000000
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ /dev/null
@@ -1,1434 +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2008, Blender Foundation, Joshua Leung
- * This is a new part of Blender
- *
- * Contributor(s): Joshua Leung
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <stdio.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_blenlib.h"
-#include "BLI_arithb.h"
-
-#include "BKE_gpencil.h"
-#include "BKE_context.h"
-#include "BKE_global.h"
-#include "BKE_report.h"
-#include "BKE_utildefines.h"
-
-#include "DNA_gpencil_types.h"
-#include "DNA_action_types.h"
-#include "DNA_object_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_screen_types.h"
-#include "DNA_space_types.h"
-#include "DNA_view2d_types.h"
-#include "DNA_view3d_types.h"
-#include "DNA_windowmanager_types.h"
-
-#include "UI_view2d.h"
-
-#include "ED_armature.h"
-#include "ED_gpencil.h"
-#include "ED_sequencer.h"
-#include "ED_screen.h"
-#include "ED_view3d.h"
-
-#include "RNA_access.h"
-
-#include "RNA_define.h"
-#include "WM_api.h"
-#include "WM_types.h"
-
-#include "gpencil_intern.h"
-
-/* ******************************************* */
-/* 'Globals' and Defines */
-
-/* Temporary 'Stroke' Operation data */
-typedef struct tGPsdata {
- Scene *scene; /* current scene from context */
- ScrArea *sa; /* area where painting originated */
- ARegion *ar; /* region where painting originated */
- View2D *v2d; /* needed for GP_STROKE_2DSPACE */
-
-#if 0 // XXX review this 2d image stuff...
- ImBuf *ibuf; /* needed for GP_STROKE_2DIMAGE */
- struct IBufViewSettings {
- int offsx, offsy; /* offsets */
- int sizex, sizey; /* dimensions to use as scale-factor */
- } im2d_settings; /* needed for GP_STROKE_2DIMAGE */
-#endif
-
- PointerRNA ownerPtr;/* pointer to owner of gp-datablock */
- bGPdata *gpd; /* gp-datablock layer comes from */
- bGPDlayer *gpl; /* layer we're working on */
- bGPDframe *gpf; /* frame we're working on */
-
- short status; /* current status of painting */
- short paintmode; /* mode for painting */
-
- int mval[2]; /* current mouse-position */
- int mvalo[2]; /* previous recorded mouse-position */
-
- float pressure; /* current stylus pressure */
- float opressure; /* previous stylus pressure */
-
- short radius; /* radius of influence for eraser */
- short flags; /* flags that can get set during runtime */
-} tGPsdata;
-
-/* values for tGPsdata->status */
-enum {
- GP_STATUS_IDLING = 0, /* stroke isn't in progress yet */
- GP_STATUS_PAINTING, /* a stroke is in progress */
- GP_STATUS_ERROR, /* something wasn't correctly set up */
- GP_STATUS_DONE /* painting done */
-};
-
-/* Return flags for adding points to stroke buffer */
-enum {
- GP_STROKEADD_INVALID = -2, /* error occurred - insufficient info to do so */
- GP_STROKEADD_OVERFLOW = -1, /* error occurred - cannot fit any more points */
- GP_STROKEADD_NORMAL, /* point was successfully added */
- GP_STROKEADD_FULL /* cannot add any more points to buffer */
-};
-
-/* Runtime flags */
-enum {
- GP_PAINTFLAG_FIRSTRUN = (1<<0), /* operator just started */
-};
-
-/* ------ */
-
-/* maximum sizes of gp-session buffer */
-#define GP_STROKE_BUFFER_MAX 5000
-
-/* Macros for accessing sensitivity thresholds... */
- /* minimum number of pixels mouse should move before new point created */
-#define MIN_MANHATTEN_PX (U.gp_manhattendist)
- /* minimum length of new segment before new point can be added */
-#define MIN_EUCLIDEAN_PX (U.gp_euclideandist)
-
-/* ------ */
-/* Forward defines for some functions... */
-
-static void gp_session_validatebuffer(tGPsdata *p);
-
-/* ******************************************* */
-/* Context Wrangling... */
-
-/* check if context is suitable for drawing */
-static int gpencil_draw_poll (bContext *C)
-{
- /* check if current context can support GPencil data */
- return (gpencil_data_get_pointers(C, NULL) != NULL);
-}
-
-/* ******************************************* */
-/* Calculations/Conversions */
-
-/* Utilities --------------------------------- */
-
-/* get the reference point for stroke-point conversions */
-static void gp_get_3d_reference (tGPsdata *p, float *vec)
-{
- View3D *v3d= p->sa->spacedata.first;
- float *fp= give_cursor(p->scene, v3d);
-
- /* the reference point used depends on the owner... */
- if (p->ownerPtr.type == &RNA_Object) {
- Object *ob= (Object *)p->ownerPtr.data;
-
- /* active Object
- * - use relative distance of 3D-cursor from object center
- */
- VecSubf(vec, fp, ob->loc);
- }
- else {
- /* use 3D-cursor */
- VecCopyf(vec, fp);
- }
-}
-
-/* Stroke Editing ---------------------------- */
-
-/* check if the current mouse position is suitable for adding a new point */
-static short gp_stroke_filtermval (tGPsdata *p, int mval[2], int pmval[2])
-{
- int dx= abs(mval[0] - pmval[0]);
- int dy= abs(mval[1] - pmval[1]);
-
- /* if buffer is empty, just let this go through (i.e. so that dots will work) */
- if (p->gpd->sbuffer_size == 0)
- return 1;
-
- /* check if mouse moved at least certain distance on both axes (best case) */
- else if ((dx > MIN_MANHATTEN_PX) && (dy > MIN_MANHATTEN_PX))
- return 1;
-
- /* check if the distance since the last point is significant enough */
- // future optimisation: sqrt here may be too slow?
- else if (sqrt(dx*dx + dy*dy) > MIN_EUCLIDEAN_PX)
- return 1;
-
- /* mouse 'didn't move' */
- else
- return 0;
-}
-
-/* convert screen-coordinates to buffer-coordinates */
-// XXX this method needs a total overhaul!
-static void gp_stroke_convertcoords (tGPsdata *p, short mval[], float out[])
-{
- bGPdata *gpd= p->gpd;
-
- /* in 3d-space - pt->x/y/z are 3 side-by-side floats */
- if (gpd->sbuffer_sflag & GP_STROKE_3DSPACE) {
- const short mx=mval[0], my=mval[1];
- float rvec[3], dvec[3];
-
- /* Current method just converts each point in screen-coordinates to
- * 3D-coordinates using the 3D-cursor as reference. In general, this
- * works OK, but it could of course be improved.
- *
- * TODO:
- * - investigate using nearest point(s) on a previous stroke as
- * reference point instead or as offset, for easier stroke matching
- * - investigate projection onto geometry (ala retopo)
- */
- gp_get_3d_reference(p, rvec);
-
- /* method taken from editview.c - mouse_cursor() */
- project_short_noclip(p->ar, rvec, mval);
- window_to_3d_delta(p->ar, dvec, mval[0]-mx, mval[1]-my);
- VecSubf(out, rvec, dvec);
- }
-
- /* 2d - on 'canvas' (assume that p->v2d is set) */
- else if ((gpd->sbuffer_sflag & GP_STROKE_2DSPACE) && (p->v2d)) {
- float x, y;
-
- UI_view2d_region_to_view(p->v2d, mval[0], mval[1], &x, &y);
-
- out[0]= x;
- out[1]= y;
- }
-
-#if 0
- /* 2d - on image 'canvas' (assume that p->v2d is set) */
- else if (gpd->sbuffer_sflag & GP_STROKE_2DIMAGE) {
- int sizex, sizey, offsx, offsy;
-
- /* get stored settings
- * - assume that these have been set already (there are checks that set sane 'defaults' just in case)
- */
- sizex= p->im2d_settings.sizex;
- sizey= p->im2d_settings.sizey;
- offsx= p->im2d_settings.offsx;
- offsy= p->im2d_settings.offsy;
-
- /* calculate new points */
- out[0]= (float)(mval[0] - offsx) / (float)sizex;
- out[1]= (float)(mval[1] - offsy) / (float)sizey;
- }
-#endif
-
- /* 2d - relative to screen (viewport area) */
- else {
- out[0] = (float)(mval[0]) / (float)(p->ar->winx) * 100;
- out[1] = (float)(mval[1]) / (float)(p->ar->winy) * 100;
- }
-}
-
-/* add current stroke-point to buffer (returns whether point was successfully added) */
-static short gp_stroke_addpoint (tGPsdata *p, int mval[2], float pressure)
-{
- bGPdata *gpd= p->gpd;
- tGPspoint *pt;
-
- /* check painting mode */
- if (p->paintmode == GP_PAINTMODE_DRAW_STRAIGHT) {
- /* straight lines only - i.e. only store start and end point in buffer */
- if (gpd->sbuffer_size == 0) {
- /* first point in buffer (start point) */
- pt= (tGPspoint *)(gpd->sbuffer);
-
- /* store settings */
- pt->x= mval[0];
- pt->y= mval[1];
- pt->pressure= pressure;
-
- /* increment buffer size */
- gpd->sbuffer_size++;
- }
- else {
- /* normally, we just reset the endpoint to the latest value
- * - assume that pointers for this are always valid...
- */
- pt= ((tGPspoint *)(gpd->sbuffer) + 1);
-
- /* store settings */
- pt->x= mval[0];
- pt->y= mval[1];
- pt->pressure= pressure;
-
- /* if this is just the second point we've added, increment the buffer size
- * so that it will be drawn properly...
- * otherwise, just leave it alone, otherwise we get problems
- */
- if (gpd->sbuffer_size != 2)
- gpd->sbuffer_size= 2;
- }
-
- /* can keep carrying on this way :) */
- return GP_STROKEADD_NORMAL;
- }
- else if (p->paintmode == GP_PAINTMODE_DRAW) { /* normal drawing */
- /* check if still room in buffer */
- if (gpd->sbuffer_size >= GP_STROKE_BUFFER_MAX)
- return GP_STROKEADD_OVERFLOW;
-
- /* get pointer to destination point */
- pt= ((tGPspoint *)(gpd->sbuffer) + gpd->sbuffer_size);
-
- /* store settings */
- pt->x= mval[0];
- pt->y= mval[1];
- pt->pressure= pressure;
-
- /* increment counters */
- gpd->sbuffer_size++;
-
- /* check if another operation can still occur */
- if (gpd->sbuffer_size == GP_STROKE_BUFFER_MAX)
- return GP_STROKEADD_FULL;
- else
- return GP_STROKEADD_NORMAL;
- }
-
- /* return invalid state for now... */
- return GP_STROKEADD_INVALID;
-}
-
-/* smooth a stroke (in buffer) before storing it */
-static void gp_stroke_smooth (tGPsdata *p)
-{
- bGPdata *gpd= p->gpd;
- 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))
- return;
-
- /* don't try if less than 2 points in buffer */
- if ((cmx <= 2) || (gpd->sbuffer == NULL))
- return;
-
- /* apply weighting-average (note doing this along path sequentially does introduce slight error) */
- for (i=0; i < gpd->sbuffer_size; i++) {
- tGPspoint *pc= (((tGPspoint *)gpd->sbuffer) + i);
- tGPspoint *pb= (i-1 > 0)?(pc-1):(pc);
- tGPspoint *pa= (i-2 > 0)?(pc-2):(pb);
- tGPspoint *pd= (i+1 < cmx)?(pc+1):(pc);
- tGPspoint *pe= (i+2 < cmx)?(pc+2):(pd);
-
- pc->x= (short)(0.1*pa->x + 0.2*pb->x + 0.4*pc->x + 0.2*pd->x + 0.1*pe->x);
- pc->y= (short)(0.1*pa->y + 0.2*pb->y + 0.4*pc->y + 0.2*pd->y + 0.1*pe->y);
- }
-}
-
-/* simplify a stroke (in buffer) before storing it
- * - applies a reverse Chaikin filter
- * - code adapted from etch-a-ton branch (editarmature_sketch.c)
- */
-static void gp_stroke_simplify (tGPsdata *p)
-{
- bGPdata *gpd= p->gpd;
- tGPspoint *old_points= (tGPspoint *)gpd->sbuffer;
- short num_points= gpd->sbuffer_size;
- short flag= gpd->sbuffer_sflag;
- short i, j;
-
- /* only simplify if simlification is enabled, and we're not doing a straight line */
- if (!(U.gp_settings & GP_PAINT_DOSIMPLIFY) || (p->paintmode == GP_PAINTMODE_DRAW_STRAIGHT))
- return;
-
- /* don't simplify if less than 4 points in buffer */
- if ((num_points <= 2) || (old_points == NULL))
- return;
-
- /* clear buffer (but don't free mem yet) so that we can write to it
- * - firstly set sbuffer to NULL, so a new one is allocated
- * - secondly, reset flag after, as it gets cleared auto
- */
- gpd->sbuffer= NULL;
- gp_session_validatebuffer(p);
- gpd->sbuffer_sflag = flag;
-
-/* macro used in loop to get position of new point
- * - used due to the mixture of datatypes in use here
- */
-#define GP_SIMPLIFY_AVPOINT(offs, sfac) \
- { \
- co[0] += (float)(old_points[offs].x * sfac); \
- co[1] += (float)(old_points[offs].y * sfac); \
- pressure += old_points[offs].pressure * sfac; \
- }
-
- for (i = 0, j = 0; i < num_points; i++)
- {
- if (i - j == 3)
- {
- float co[2], pressure;
- int mco[2];
-
- /* initialise values */
- co[0]= 0;
- co[1]= 0;
- pressure = 0;
-
- /* using macro, calculate new point */
- GP_SIMPLIFY_AVPOINT(j, -0.25f);
- GP_SIMPLIFY_AVPOINT(j+1, 0.75f);
- GP_SIMPLIFY_AVPOINT(j+2, 0.75f);
- GP_SIMPLIFY_AVPOINT(j+3, -0.25f);
-
- /* set values for adding */
- mco[0]= (int)co[0];
- mco[1]= (int)co[1];
-
- /* ignore return values on this... assume to be ok for now */
- gp_stroke_addpoint(p, mco, pressure);
-
- j += 2;
- }
- }
-
- /* free old buffer */
- MEM_freeN(old_points);
-}
-
-
-/* make a new stroke from the buffer data */
-static void gp_stroke_newfrombuffer (tGPsdata *p)
-{
- bGPdata *gpd= p->gpd;
- bGPDstroke *gps;
- bGPDspoint *pt;
- tGPspoint *ptc;
- int i, totelem;
-
- /* get total number of points to allocate space for
- * - drawing straight-lines only requires the endpoints
- */
- if (p->paintmode == GP_PAINTMODE_DRAW_STRAIGHT)
- totelem = (gpd->sbuffer_size >= 2) ? 2: gpd->sbuffer_size;
- else
- totelem = gpd->sbuffer_size;
-
- /* exit with error if no valid points from this stroke */
- if (totelem == 0) {
- if (G.f & G_DEBUG)
- printf("Error: No valid points in stroke buffer to convert (tot=%d) \n", gpd->sbuffer_size);
- 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;
-
- /* copy points from the buffer to the stroke */
- if (p->paintmode == GP_PAINTMODE_DRAW_STRAIGHT) {
- /* straight lines only -> only endpoints */
- {
- /* first point */
- ptc= gpd->sbuffer;
-
- /* convert screen-coordinates to appropriate coordinates (and store them) */
- gp_stroke_convertcoords(p, &ptc->x, &pt->x);
-
- /* copy pressure */
- pt->pressure= ptc->pressure;
-
- pt++;
- }
-
- if (totelem == 2) {
- /* last point if applicable */
- ptc= ((tGPspoint *)gpd->sbuffer) + (gpd->sbuffer_size - 1);
-
- /* convert screen-coordinates to appropriate coordinates (and store them) */
- gp_stroke_convertcoords(p, &ptc->x, &pt->x);
-
- /* copy pressure */
- pt->pressure= ptc->pressure;
- }
- }
- else {
- /* convert all points (normal behaviour) */
- for (i=0, ptc=gpd->sbuffer; i < gpd->sbuffer_size && ptc; i++, ptc++) {
- /* convert screen-coordinates to appropriate coordinates (and store them) */
- gp_stroke_convertcoords(p, &ptc->x, &pt->x);
-
- /* copy pressure */
- pt->pressure= ptc->pressure;
-
- pt++;
- }
- }
-
- /* add stroke to frame */
- BLI_addtail(&p->gpf->strokes, gps);
-}
-
-/* --- 'Eraser' for 'Paint' Tool ------ */
-
-/* eraser tool - remove segment from stroke/split stroke (after lasso inside) */
-static short gp_stroke_eraser_splitdel (bGPDframe *gpf, bGPDstroke *gps, int i)
-{
- bGPDspoint *pt_tmp= gps->points;
- bGPDstroke *gsn = NULL;
-
- /* if stroke only had two points, get rid of stroke */
- if (gps->totpoints == 2) {
- /* free stroke points, then stroke */
- MEM_freeN(pt_tmp);
- BLI_freelinkN(&gpf->strokes, gps);
-
- /* nothing left in stroke, so stop */
- return 1;
- }
-
- /* if last segment, just remove segment from the stroke */
- else if (i == gps->totpoints - 2) {
- /* allocate new points array, and assign most of the old stroke there */
- gps->totpoints--;
- gps->points= MEM_callocN(sizeof(bGPDspoint)*gps->totpoints, "gp_stroke_points");
- memcpy(gps->points, pt_tmp, sizeof(bGPDspoint)*gps->totpoints);
-
- /* free temp buffer */
- MEM_freeN(pt_tmp);
-
- /* nothing left in stroke, so stop */
- return 1;
- }
-
- /* if first segment, just remove segment from the stroke */
- else if (i == 0) {
- /* allocate new points array, and assign most of the old stroke there */
- gps->totpoints--;
- gps->points= MEM_callocN(sizeof(bGPDspoint)*gps->totpoints, "gp_stroke_points");
- memcpy(gps->points, pt_tmp + 1, sizeof(bGPDspoint)*gps->totpoints);
-
- /* free temp buffer */
- MEM_freeN(pt_tmp);
-
- /* no break here, as there might still be stuff to remove in this stroke */
- return 0;
- }
-
- /* segment occurs in 'middle' of stroke, so split */
- else {
- /* duplicate stroke, and assign 'later' data to that stroke */
- gsn= MEM_dupallocN(gps);
- gsn->prev= gsn->next= NULL;
- BLI_insertlinkafter(&gpf->strokes, gps, gsn);
-
- gsn->totpoints= gps->totpoints - i;
- gsn->points= MEM_callocN(sizeof(bGPDspoint)*gsn->totpoints, "gp_stroke_points");
- memcpy(gsn->points, pt_tmp + i, sizeof(bGPDspoint)*gsn->totpoints);
-
- /* adjust existing stroke */
- gps->totpoints= i;
- gps->points= MEM_callocN(sizeof(bGPDspoint)*gps->totpoints, "gp_stroke_points");
- memcpy(gps->points, pt_tmp, sizeof(bGPDspoint)*i);
-
- /* free temp buffer */
- MEM_freeN(pt_tmp);
-
- /* nothing left in stroke, so stop */
- return 1;
- }
-}
-
-/* eraser tool - check if part of stroke occurs within last segment drawn by eraser */
-static short gp_stroke_eraser_strokeinside (int mval[], int mvalo[], short rad, short x0, short y0, short x1, short y1)
-{
- /* simple within-radius check for now */
- if (edge_inside_circle(mval[0], mval[1], rad, x0, y0, x1, y1))
- return 1;
-
- /* not inside */
- return 0;
-}
-
-/* eraser tool - evaluation per stroke */
-// TODO: this could really do with some optimisation (KD-Tree/BVH?)
-static void gp_stroke_eraser_dostroke (tGPsdata *p, int mval[], int mvalo[], short rad, rcti *rect, bGPDframe *gpf, bGPDstroke *gps)
-{
- bGPDspoint *pt1, *pt2;
- int x0=0, y0=0, x1=0, y1=0;
- short xyval[2];
- int i;
-
- if (gps->totpoints == 0) {
- /* just free stroke */
- if (gps->points)
- MEM_freeN(gps->points);
- BLI_freelinkN(&gpf->strokes, gps);
- }
- else if (gps->totpoints == 1) {
- /* get coordinates */
- if (gps->flag & GP_STROKE_3DSPACE) {
- project_short(p->ar, &gps->points->x, xyval);
- x0= xyval[0];
- y0= xyval[1];
- }
- else if (gps->flag & GP_STROKE_2DSPACE) {
- UI_view2d_view_to_region(p->v2d, gps->points->x, gps->points->y, &x0, &y0);
- }
-#if 0
- else if (gps->flag & GP_STROKE_2DIMAGE) {
- int offsx, offsy, sizex, sizey;
-
- /* get stored settings */
- sizex= p->im2d_settings.sizex;
- sizey= p->im2d_settings.sizey;
- offsx= p->im2d_settings.offsx;
- offsy= p->im2d_settings.offsy;
-
- /* calculate new points */
- x0= (int)((gps->points->x * sizex) + offsx);
- y0= (int)((gps->points->y * sizey) + offsy);
- }
-#endif
- else {
- x0= (int)(gps->points->x / 100 * p->ar->winx);
- y0= (int)(gps->points->y / 100 * p->ar->winy);
- }
-
- /* do boundbox check first */
- if (BLI_in_rcti(rect, x0, y0)) {
- /* only check if point is inside */
- if ( ((x0-mval[0])*(x0-mval[0]) + (y0-mval[1])*(y0-mval[1])) <= rad*rad ) {
- /* free stroke */
- MEM_freeN(gps->points);
- BLI_freelinkN(&gpf->strokes, gps);
- }
- }
- }
- else {
- /* loop over the points in the stroke, checking for intersections
- * - an intersection will require the stroke to be split
- */
- for (i=0; (i+1) < gps->totpoints; i++) {
- /* get points to work with */
- pt1= gps->points + i;
- pt2= gps->points + i + 1;
-
- /* get coordinates */
- if (gps->flag & GP_STROKE_3DSPACE) {
- project_short(p->ar, &pt1->x, xyval);
- x0= xyval[0];
- y0= xyval[1];
-
- project_short(p->ar, &pt2->x, xyval);
- x1= xyval[0];
- y1= xyval[1];
- }
- else if (gps->flag & GP_STROKE_2DSPACE) {
- UI_view2d_view_to_region(p->v2d, pt1->x, pt1->y, &x0, &y0);
-
- UI_view2d_view_to_region(p->v2d, pt2->x, pt2->y, &x1, &y1);
- }
-#if 0
- else if (gps->flag & GP_STROKE_2DIMAGE) {
- int offsx, offsy, sizex, sizey;
-
- /* get stored settings */
- sizex= p->im2d_settings.sizex;
- sizey= p->im2d_settings.sizey;
- offsx= p->im2d_settings.offsx;
- offsy= p->im2d_settings.offsy;
-
- /* calculate new points */
- x0= (int)((pt1->x * sizex) + offsx);
- y0= (int)((pt1->y * sizey) + offsy);
-
- x1= (int)((pt2->x * sizex) + offsx);
- y1= (int)((pt2->y * sizey) + offsy);
- }
-#endif
- else {
- x0= (int)(pt1->x / 100 * p->ar->winx);
- y0= (int)(pt1->y / 100 * p->ar->winy);
- x1= (int)(pt2->x / 100 * p->ar->winx);
- y1= (int)(pt2->y / 100 * p->ar->winy);
- }
-
- /* check that point segment of the boundbox of the eraser stroke */
- if (BLI_in_rcti(rect, x0, y0) || BLI_in_rcti(rect, x1, y1)) {
- /* check if point segment of stroke had anything to do with
- * eraser region (either within stroke painted, or on its lines)
- * - this assumes that linewidth is irrelevant
- */
- if (gp_stroke_eraser_strokeinside(mval, mvalo, rad, x0, y0, x1, y1)) {
- /* if function returns true, break this loop (as no more point to check) */
- if (gp_stroke_eraser_splitdel(gpf, gps, i))
- break;
- }
- }
- }
- }
-}
-
-/* erase strokes which fall under the eraser strokes */
-static void gp_stroke_doeraser (tGPsdata *p)
-{
- bGPDframe *gpf= p->gpf;
- bGPDstroke *gps, *gpn;
- rcti rect;
-
- /* rect is rectangle of eraser */
- rect.xmin= p->mval[0] - p->radius;
- rect.ymin= p->mval[1] - p->radius;
- rect.xmax= p->mval[0] + p->radius;
- rect.ymax= p->mval[1] + p->radius;
-
- /* loop over strokes, checking segments for intersections */
- for (gps= gpf->strokes.first; gps; gps= gpn) {
- gpn= gps->next;
- gp_stroke_eraser_dostroke(p, p->mval, p->mvalo, p->radius, &rect, gpf, gps);
- }
-}
-
-/* ******************************************* */
-/* Sketching Operator */
-
-/* clear the session buffers (call this before AND after a paint operation) */
-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)
- memset(gpd->sbuffer, 0, sizeof(tGPspoint)*GP_STROKE_BUFFER_MAX);
- else
- gpd->sbuffer= MEM_callocN(sizeof(tGPspoint)*GP_STROKE_BUFFER_MAX, "gp_session_strokebuffer");
-
- /* reset indices */
- gpd->sbuffer_size = 0;
-
- /* reset flags */
- gpd->sbuffer_sflag= 0;
-}
-
-/* init new painting session */
-static tGPsdata *gp_session_initpaint (bContext *C)
-{
- 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) {
- if (G.f & G_DEBUG)
- printf("Error: No active view for painting \n");
- return NULL;
- }
-
- /* create new context data */
- p= MEM_callocN(sizeof(tGPsdata), "GPencil Drawing Data");
-
- /* pass on current scene */
- p->scene= CTX_data_scene(C);
-
- switch (curarea->spacetype) {
- /* supported views first */
- case SPACE_VIEW3D:
- {
- //View3D *v3d= curarea->spacedata.first;
-
- /* set current area
- * - must verify that region data is 3D-view (and not something else)
- */
- p->sa= curarea;
- p->ar= ar;
-
- if (ar->regiondata == NULL) {
- 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;
- }
-
-#if 0 // XXX will this sort of antiquated stuff be restored?
- /* check that gpencil data is allowed to be drawn */
- if ((v3d->flag2 & V3D_DISPGP)==0) {
- p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: In active view, Grease Pencil not shown \n");
- return p;
- }
-#endif
- }
- break;
-#if 0 // XXX these other spaces will come over time...
- case SPACE_NODE:
- {
- SpaceNode *snode= curarea->spacedata.first;
-
- /* set current area */
- p->sa= curarea;
- p->ar= ar;
- p->v2d= &ar->v2d;
-
- /* check that gpencil data is allowed to be drawn */
- if ((snode->flag & SNODE_DISPGP)==0) {
- p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: In active view, Grease Pencil not shown \n");
- return;
- }
- }
- break;
- case SPACE_SEQ:
- {
- SpaceSeq *sseq= curarea->spacedata.first;
-
- /* set current area */
- p->sa= curarea;
- p->ar= ar;
- p->v2d= &ar->v2d;
-
- /* check that gpencil data is allowed to be drawn */
- if (sseq->mainb == SEQ_DRAW_SEQUENCE) {
- p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: In active view (sequencer), active mode doesn't support Grease Pencil \n");
- return;
- }
- 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;
- }
- }
- break;
-#endif
- case SPACE_IMAGE:
- {
- //SpaceImage *sima= curarea->spacedata.first;
-
- /* set the current area */
- p->sa= curarea;
- p->ar= ar;
- p->v2d= &ar->v2d;
- //p->ibuf= BKE_image_get_ibuf(sima->image, &sima->iuser);
-
-#if 0 // XXX disabled for now
- /* check that gpencil data is allowed to be drawn */
- if ((sima->flag & SI_DISPGP)==0) {
- p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: In active view, Grease Pencil not shown \n");
- return p;
- }
-#endif
- }
- break;
-
- /* unsupported views */
- default:
- {
- p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: Active view not appropriate for Grease Pencil drawing \n");
- return p;
- }
- break;
- }
-
- /* get gp-data */
- gpd_ptr= gpencil_data_get_pointers(C, &p->ownerPtr);
- if (gpd_ptr == NULL) {
- 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;
- }
- else {
- /* if no existing GPencil block exists, add one */
- if (*gpd_ptr == NULL)
- *gpd_ptr= gpencil_data_addnew("GPencil");
- p->gpd= *gpd_ptr;
- }
-
- /* set edit flags - so that buffer will get drawn */
- G.f |= G_GREASEPENCIL;
-
- /* set initial run flag */
- p->flags |= GP_PAINTFLAG_FIRSTRUN;
-
- /* clear out buffer (stored in gp-data), in case something contaminated it */
- gp_session_validatebuffer(p);
-
-#if 0
- /* set 'default' im2d_settings just in case something that uses this doesn't set it */
- p->im2d_settings.sizex= 1;
- p->im2d_settings.sizey= 1;
-#endif
-
- /* return context data for running paint operator */
- return p;
-}
-
-/* cleanup after a painting session */
-static void gp_session_cleanup (tGPsdata *p)
-{
- bGPdata *gpd= (p) ? p->gpd : NULL;
-
- /* error checking */
- if (gpd == NULL)
- return;
-
- /* free stroke buffer */
- if (gpd->sbuffer) {
- MEM_freeN(gpd->sbuffer);
- gpd->sbuffer= NULL;
- }
-
- /* clear flags */
- gpd->sbuffer_size= 0;
- gpd->sbuffer_sflag= 0;
-}
-
-/* init new stroke */
-static void gp_paint_initstroke (tGPsdata *p, short paintmode)
-{
- /* get active layer (or add a new one if non-existent) */
- p->gpl= gpencil_layer_getactive(p->gpd);
- if (p->gpl == NULL)
- p->gpl= gpencil_layer_addnew(p->gpd);
- if (p->gpl->flag & GP_LAYER_LOCKED) {
- p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: Cannot paint on locked layer \n");
- return;
- }
-
- /* get active frame (add a new one if not matching frame) */
- p->gpf= gpencil_layer_getframe(p->gpl, p->scene->r.cfra, 1);
- if (p->gpf == NULL) {
- p->status= GP_STATUS_ERROR;
- if (G.f & G_DEBUG)
- printf("Error: No frame created (gpencil_paint_init) \n");
- return;
- }
- else
- p->gpf->flag |= GP_FRAME_PAINT;
-
- /* set 'eraser' for this stroke if using eraser */
- p->paintmode= paintmode;
- if (p->paintmode == GP_PAINTMODE_ERASER)
- p->gpd->sbuffer_sflag |= GP_STROKE_ERASER;
-
- /* check if points will need to be made in view-aligned space */
- if (p->gpd->flag & GP_DATA_VIEWALIGN) {
- switch (p->sa->spacetype) {
- case SPACE_VIEW3D:
- {
- RegionView3D *rv3d= p->ar->regiondata;
- float rvec[3];
-
- gp_get_3d_reference(p, rvec);
- initgrabz(rv3d, rvec[0], rvec[1], rvec[2]);
-
- p->gpd->sbuffer_sflag |= GP_STROKE_3DSPACE;
- }
- break;
-#if 0 // XXX other spacetypes to be restored in due course
- case SPACE_NODE:
- {
- p->gpd->sbuffer_sflag |= GP_STROKE_2DSPACE;
- }
- break;
- case SPACE_SEQ:
- {
- SpaceSeq *sseq= (SpaceSeq *)p->sa->spacedata.first;
- int rectx, recty;
- float zoom, zoomx, zoomy;
-
- /* set draw 2d-stroke flag */
- p->gpd->sbuffer_sflag |= GP_STROKE_2DIMAGE;
-
- /* calculate zoom factor */
- zoom= (float)(SEQ_ZOOM_FAC(sseq->zoom));
- if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
- zoomx = zoom * ((float)p->scene->r.xasp / (float)p->scene->r.yasp);
- zoomy = zoom;
- }
- else
- zoomx = zoomy = zoom;
-
- /* calculate rect size to use to calculate the size of the drawing area
- * - We use the size of the output image not the size of the ibuf being shown
- * as it is too messy getting the ibuf (and could be too slow). This should be
- * a reasonable for most cases anyway.
- */
- rectx= (p->scene->r.size * p->scene->r.xsch) / 100;
- recty= (p->scene->r.size * p->scene->r.ysch) / 100;
-
- /* set offset and scale values for opertations to use */
- p->im2d_settings.sizex= (int)(zoomx * rectx);
- p->im2d_settings.sizey= (int)(zoomy * recty);
- p->im2d_settings.offsx= (int)((p->sa->winx-p->im2d_settings.sizex)/2 + sseq->xof);
- p->im2d_settings.offsy= (int)((p->sa->winy-p->im2d_settings.sizey)/2 + sseq->yof);
- }
- break;
-#endif
- case SPACE_IMAGE:
- {
- p->gpd->sbuffer_sflag |= GP_STROKE_2DSPACE;
- }
- break;
- }
- }
-}
-
-/* finish off a stroke (clears buffer, but doesn't finish the paint operation) */
-static void gp_paint_strokeend (tGPsdata *p)
-{
- /* check if doing eraser or not */
- if ((p->gpd->sbuffer_sflag & GP_STROKE_ERASER) == 0) {
- /* smooth stroke before transferring? */
- gp_stroke_smooth(p);
-
- /* simplify stroke before transferring? */
- gp_stroke_simplify(p);
-
- /* transfer stroke to frame */
- gp_stroke_newfrombuffer(p);
- }
-
- /* clean up buffer now */
- gp_session_validatebuffer(p);
-}
-
-/* finish off stroke painting operation */
-static void gp_paint_cleanup (tGPsdata *p)
-{
- /* finish off a stroke */
- gp_paint_strokeend(p);
-
- /* "unlock" frame */
- p->gpf->flag &= ~GP_FRAME_PAINT;
-}
-
-/* ------------------------------- */
-
-
-static int gpencil_draw_init (bContext *C, wmOperator *op)
-{
- tGPsdata *p;
- int paintmode= RNA_enum_get(op->ptr, "mode");
-
- /* check context */
- p= op->customdata= gp_session_initpaint(C);
- if ((p == NULL) || (p->status == GP_STATUS_ERROR)) {
- /* something wasn't set correctly in context */
- gp_session_cleanup(p);
- return 0;
- }
-
- /* init painting data */
- gp_paint_initstroke(p, paintmode);
- if (p->status == GP_STATUS_ERROR) {
- gp_session_cleanup(p);
- return 0;
- }
-
- /* radius for eraser circle is defined in userprefs now */
- p->radius= U.gp_eraser;
-
- /* everything is now setup ok */
- return 1;
-}
-
-/* ------------------------------- */
-
-static void gpencil_draw_exit (bContext *C, wmOperator *op)
-{
- tGPsdata *p= op->customdata;
-
- /* clear edit flags */
- G.f &= ~G_GREASEPENCIL;
-
- /* restore cursor to indicate end of drawing */
- WM_cursor_restore(CTX_wm_window(C));
-
- /* check size of buffer before cleanup, to determine if anything happened here */
- if (p->paintmode == GP_PAINTMODE_ERASER) {
- // TODO clear radial cursor thing
- // XXX draw_sel_circle(NULL, p.mvalo, 0, p.radius, 0);
- }
-
- /* cleanup */
- gp_paint_cleanup(p);
- gp_session_cleanup(p);
-
- /* finally, free the temp data */
- MEM_freeN(p);
- op->customdata= NULL;
-}
-
-static int gpencil_draw_cancel (bContext *C, wmOperator *op)
-{
- /* this is just a wrapper around exit() */
- gpencil_draw_exit(C, op);
- return OPERATOR_CANCELLED;
-}
-
-/* ------------------------------- */
-
-/* create a new stroke point at the point indicated by the painting context */
-static void gpencil_draw_apply (bContext *C, wmOperator *op, tGPsdata *p)
-{
- /* handle drawing/erasing -> test for erasing first */
- if (p->paintmode == GP_PAINTMODE_ERASER) {
- /* do 'live' erasing now */
- gp_stroke_doeraser(p);
-
- /* store used values */
- p->mvalo[0]= p->mval[0];
- p->mvalo[1]= p->mval[1];
- p->opressure= p->pressure;
- }
- /* only add current point to buffer if mouse moved (even though we got an event, it might be just noise) */
- else if (gp_stroke_filtermval(p, p->mval, p->mvalo)) {
- /* try to add point */
- short ok= gp_stroke_addpoint(p, p->mval, p->pressure);
-
- /* handle errors while adding point */
- if ((ok == GP_STROKEADD_FULL) || (ok == GP_STROKEADD_OVERFLOW)) {
- /* finish off old stroke */
- gp_paint_strokeend(p);
-
- /* start a new stroke, starting from previous point */
- gp_stroke_addpoint(p, p->mvalo, p->opressure);
- ok= gp_stroke_addpoint(p, p->mval, p->pressure);
- }
- else if (ok == GP_STROKEADD_INVALID) {
- /* the painting operation cannot continue... */
- BKE_report(op->reports, RPT_ERROR, "Cannot paint stroke");
- p->status = GP_STATUS_ERROR;
-
- if (G.f & G_DEBUG)
- printf("Error: Grease-Pencil Paint - Add Point Invalid \n");
- return;
- }
-
- /* store used values */
- p->mvalo[0]= p->mval[0];
- p->mvalo[1]= p->mval[1];
- p->opressure= p->pressure;
- }
-}
-
-/* handle draw event */
-static void gpencil_draw_apply_event (bContext *C, wmOperator *op, wmEvent *event)
-{
- tGPsdata *p= op->customdata;
- ARegion *ar= p->ar;
- //PointerRNA itemptr;
- //float mousef[2];
- int tablet=0;
-
- /* convert from window-space to area-space mouse coordintes */
- // NOTE: float to ints conversions, +1 factor is probably used to ensure a bit more accurate rounding...
- p->mval[0]= event->x - ar->winrct.xmin + 1;
- p->mval[1]= event->y - ar->winrct.ymin + 1;
-
- /* handle pressure sensitivity (which is supplied by tablets) */
- if (event->custom == EVT_DATA_TABLET) {
- wmTabletData *wmtab= event->customdata;
-
- tablet= (wmtab->Active != EVT_TABLET_NONE);
- p->pressure= wmtab->Pressure;
- //if (wmtab->Active == EVT_TABLET_ERASER)
- // TODO... this should get caught by the keymaps which call drawing in the first place
- }
- else
- p->pressure= 1.0f;
-
- /* special exception for start of strokes (i.e. maybe for just a dot) */
- if (p->flags & GP_PAINTFLAG_FIRSTRUN) {
- p->flags &= ~GP_PAINTFLAG_FIRSTRUN;
-
- p->mvalo[0]= p->mval[0];
- p->mvalo[1]= p->mval[1];
- p->opressure= p->pressure;
-
- /* special exception here for too high pressure values on first touch in
- * windows for some tablets, then we just skip first touch ..
- */
- if (tablet && (p->pressure >= 0.99f))
- return;
- }
-
-#if 0 // NOTE: disabled for now, since creating this data is currently useless anyways (and slows things down)
- /* fill in stroke data (not actually used directly by gpencil_draw_apply) */
- RNA_collection_add(op->ptr, "stroke", &itemptr);
-
- mousef[0]= p->mval[0];
- mousef[1]= p->mval[1];
- RNA_float_set_array(&itemptr, "mouse", mousef);
- RNA_float_set(&itemptr, "pressure", p->pressure);
-#endif
-
- /* apply the current latest drawing point */
- gpencil_draw_apply(C, op, p);
-
- /* force refresh */
- ED_region_tag_redraw(p->ar); /* just active area for now, since doing whole screen is too slow */
-}
-
-/* ------------------------------- */
-
-/* operator 'redo' (i.e. after changing some properties) */
-static int gpencil_draw_exec (bContext *C, wmOperator *op)
-{
- tGPsdata *p = NULL;
-
- //printf("GPencil - Starting Re-Drawing \n");
-
- /* try to initialise context data needed while drawing */
- if (!gpencil_draw_init(C, op)) {
- if (op->customdata) MEM_freeN(op->customdata);
- //printf("\tGP - no valid data \n");
- return OPERATOR_CANCELLED;
- }
- else
- p= op->customdata;
-
- //printf("\tGP - Start redrawing stroke \n");
-
- /* loop over the stroke RNA elements recorded (i.e. progress of mouse movement),
- * setting the relevant values in context at each step, then applying
- */
- RNA_BEGIN(op->ptr, itemptr, "stroke")
- {
- float mousef[2];
-
- //printf("\t\tGP - stroke elem \n");
-
- /* get relevant data for this point from stroke */
- RNA_float_get_array(&itemptr, "mouse", mousef);
- p->mval[0] = (short)mousef[0];
- p->mval[1] = (short)mousef[1];
- p->pressure= RNA_float_get(&itemptr, "pressure");
-
- /* if first run, set previous data too */
- if (p->flags & GP_PAINTFLAG_FIRSTRUN) {
- p->flags &= ~GP_PAINTFLAG_FIRSTRUN;
-
- p->mvalo[0]= p->mval[0];
- p->mvalo[1]= p->mval[1];
- p->opressure= p->pressure;
- }
-
- /* apply this data as necessary now (as per usual) */
- gpencil_draw_apply(C, op, p);
- }
- RNA_END;
-
- //printf("\tGP - done \n");
-
- /* cleanup */
- gpencil_draw_exit(C, op);
-
- /* refreshes */
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX need a nicer one that will work
-
- /* done */
- return OPERATOR_FINISHED;
-}
-
-/* ------------------------------- */
-
-/* start of interactive drawing part of operator */
-static int gpencil_draw_invoke (bContext *C, wmOperator *op, wmEvent *event)
-{
- tGPsdata *p = NULL;
- wmWindow *win= CTX_wm_window(C);
-
- //printf("GPencil - Starting Drawing \n");
-
- /* try to initialise context data needed while drawing */
- if (!gpencil_draw_init(C, op)) {
- if (op->customdata) MEM_freeN(op->customdata);
- printf("\tGP - no valid data \n");
- return OPERATOR_CANCELLED;
- }
- else
- p= op->customdata;
-
- // TODO: set any additional settings that we can take from the events?
- // TODO? if tablet is erasing, force eraser to be on?
-
- /* if eraser is on, draw radial aid */
- if (p->paintmode == GP_PAINTMODE_ERASER) {
- // TODO: this involves mucking around with radial control, so we leave this for now..
- }
-
- /* set cursor */
- if (p->paintmode == GP_PAINTMODE_ERASER)
- WM_cursor_modal(win, BC_CROSSCURSOR); // XXX need a better cursor
- else
- WM_cursor_modal(win, BC_PAINTBRUSHCURSOR);
-
- /* special hack: if there was an initial event, then we were invoked via a hotkey, and
- * painting should start immediately. Otherwise, this was called from a toolbar, in which
- * case we should wait for the mouse to be clicked.
- */
- if (event->type) {
- /* hotkey invoked - start drawing */
- //printf("\tGP - set first spot\n");
- p->status= GP_STATUS_PAINTING;
-
- /* handle the initial drawing - i.e. for just doing a simple dot */
- gpencil_draw_apply_event(C, op, event);
- }
- else {
- /* toolbar invoked - don't start drawing yet... */
- //printf("\tGP - hotkey invoked... waiting for click-drag\n");
- }
-
- /* add a modal handler for this operator, so that we can then draw continuous strokes */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
- return OPERATOR_RUNNING_MODAL;
-}
-
-/* events handling during interactive drawing part of operator */
-static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
-{
- tGPsdata *p= op->customdata;
-
- //printf("\tGP - handle modal event...\n");
-
- switch (event->type) {
- /* end of stroke -> ONLY when a mouse-button release occurs
- * otherwise, carry on to mouse-move...
- */
- case LEFTMOUSE:
- case RIGHTMOUSE:
- /* if painting, end stroke */
- if (p->status == GP_STATUS_PAINTING) {
- /* basically, this should be mouse-button up */
- //printf("\t\tGP - end of stroke \n");
- gpencil_draw_exit(C, op);
-
- /* one last flush before we're done */
- WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL); // XXX need a nicer one that will work
-
- return OPERATOR_FINISHED;
- }
- else {
- /* not painting, so start stroke (this should be mouse-button down) */
- //printf("\t\tGP - start stroke \n");
- p->status= GP_STATUS_PAINTING;
- /* no break now, since we should immediately start painting */
- }
-
- /* moving mouse - assumed that mouse button is down if in painting status */
- case MOUSEMOVE:
- /* check if we're currently painting */
- if (p->status == GP_STATUS_PAINTING) {
- /* handle drawing event */
- //printf("\t\tGP - add point\n");
- gpencil_draw_apply_event(C, op, event);
-
- /* finish painting operation if anything went wrong just now */
- if (p->status == GP_STATUS_ERROR) {
- //printf("\t\t\tGP - error done! \n");
- gpencil_draw_exit(C, op);
- return OPERATOR_CANCELLED;
- }
- }
- break;
-
- default:
- //printf("\t\tGP unknown event - %d \n", event->type);
- break;
- }
-
- return OPERATOR_RUNNING_MODAL;
-}
-
-/* ------------------------------- */
-
-static EnumPropertyItem prop_gpencil_drawmodes[] = {
- {GP_PAINTMODE_DRAW, "DRAW", 0, "Draw Freehand", ""},
- {GP_PAINTMODE_DRAW_STRAIGHT, "DRAW_STRAIGHT", 0, "Draw Straight Lines", ""},
- {GP_PAINTMODE_ERASER, "ERASER", 0, "Eraser", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-void GPENCIL_OT_draw (wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Grease Pencil Draw";
- ot->idname= "GPENCIL_OT_draw";
- ot->description= "Make annotations on the active data.";
-
- /* api callbacks */
- ot->exec= gpencil_draw_exec;
- ot->invoke= gpencil_draw_invoke;
- ot->modal= gpencil_draw_modal;
- ot->cancel= gpencil_draw_cancel;
- ot->poll= gpencil_draw_poll;
-
- /* flags */
- 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.");
- // xxx the stuff below is used only for redo operator, but is not really working
- RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");
-}
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 799829a6e87..179f362b13f 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -433,10 +433,8 @@ void ED_nla_postop_refresh(bAnimContext *ac);
/* ------------- Utility macros ----------------------- */
-/* provide access to Keyframe Type info in BezTriple
- * NOTE: this is so that we can change it from being stored in 'hide'
- */
-#define BEZKEYTYPE(bezt) ((bezt)->hide)
+/* checks if the given BezTriple is selected */
+#define BEZSELECTED(bezt) ((bezt->f2 & SELECT) || (bezt->f1 & SELECT) || (bezt->f3 & SELECT))
/* set/clear/toggle macro
* - channel - channel with a 'flag' member that we're setting
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index 8bdfe41ef80..738cbf094cb 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -95,7 +95,7 @@ void ED_operatortypes_armature(void);
void ED_keymap_armature(struct wmWindowManager *wm);
/* editarmature.c */
-void ED_armature_from_edit(struct Object *obedit);
+void ED_armature_from_edit(struct Scene *scene, struct Object *obedit);
void ED_armature_to_edit(struct Object *ob);
void ED_armature_edit_free(struct Object *ob);
void ED_armature_edit_remake(struct Object *obedit);
@@ -116,8 +116,6 @@ void transform_armature_mirror_update(struct Object *obedit);
void clear_armature(struct Scene *scene, struct Object *ob, char mode);
void docenter_armature (struct Scene *scene, struct View3D *v3d, struct Object *ob, int centermode);
-void ED_armature_apply_transform(struct Object *ob, float mat[4][4]);
-
#define ARM_GROUPS_NAME 1
#define ARM_GROUPS_ENVELOPE 2
#define ARM_GROUPS_AUTO 3
diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h
index 57ab6a5f8f6..c56807ad09a 100644
--- a/source/blender/editors/include/ED_fileselect.h
+++ b/source/blender/editors/include/ED_fileselect.h
@@ -65,7 +65,6 @@ typedef struct FileLayout
short height;
short flag;
short dirty;
- short textheight;
float column_widths[MAX_FILE_COLUMN];
} FileLayout;
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index 388da9a2acc..ad8124c89d7 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -38,32 +38,38 @@ struct SpaceSeq;
struct bGPdata;
struct bGPDlayer;
struct bGPDframe;
-struct PointerRNA;
-struct Panel;
+struct bGPdata;
+struct uiBlock;
struct ImBuf;
-struct wmWindowManager;
-/* ------------- Grease-Pencil Helpers ---------------- */
-/* Temporary 'Stroke Point' data
- *
- * Used as part of the 'stroke cache' used during drawing of new strokes
- */
+/* ------------- Grease-Pencil Helpers -------------- */
+
+/* Temporary 'Stroke Point' data */
typedef struct tGPspoint {
short x, y; /* x and y coordinates of cursor (in relative to area) */
float pressure; /* pressure of tablet at this point */
} tGPspoint;
-/* ----------- Grease Pencil Tools/Context ------------- */
+/* ------------ Grease-Pencil Depreceated Stuff ------------------ */
-struct bGPdata **gpencil_data_get_pointers(struct bContext *C, struct PointerRNA *ptr);
-struct bGPdata *gpencil_data_get_active(struct bContext *C);
+struct bGPdata *gpencil_data_getactive(struct ScrArea *sa);
+short gpencil_data_setactive(struct ScrArea *sa, struct bGPdata *gpd);
+struct ScrArea *gpencil_data_findowner(struct bGPdata *gpd);
-/* ----------- Grease Pencil Operators ----------------- */
+/* ------------ Grease-Pencil Editing API ------------------ */
-void ED_keymap_gpencil(struct wmWindowManager *wm);
-void ED_operatortypes_gpencil(void);
+void gpencil_delete_actframe(struct bGPdata *gpd, int cfra);
+void gpencil_delete_laststroke(struct bGPdata *gpd, int cfra);
+
+void gpencil_delete_operation(int cfra, short mode);
+void gpencil_delete_menu(void);
+
+void gpencil_convert_operation(short mode);
+void gpencil_convert_menu(void);
+
+short gpencil_do_paint(struct bContext *C);
/* ------------ Grease-Pencil Drawing API ------------------ */
/* drawgpencil.c */
@@ -73,7 +79,5 @@ void draw_gpencil_2dview(struct bContext *C, short onlyv2d);
void draw_gpencil_3dview(struct bContext *C, short only3d);
void draw_gpencil_oglrender(struct bContext *C);
-void gpencil_panel_standard(const struct bContext *C, struct Panel *pa);
-
#endif /* ED_GPENCIL_H */
diff --git a/source/blender/editors/include/ED_info.h b/source/blender/editors/include/ED_info.h
deleted file mode 100644
index d09e174d71d..00000000000
--- a/source/blender/editors/include/ED_info.h
+++ /dev/null
@@ -1,32 +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2009, Blender Foundation
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef ED_INFO_H
-#define ED_INFO_H
-
-/* info_stats.c */
-void ED_info_stats_clear(struct Scene *scene);
-char *ED_info_stats_string(struct Scene *scene);
-
-#endif /* ED_INFO_H */
diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h
index 0969398f1e2..e940aaed36e 100644
--- a/source/blender/editors/include/ED_keyframes_draw.h
+++ b/source/blender/editors/include/ED_keyframes_draw.h
@@ -56,8 +56,8 @@ typedef struct ActKeyColumn {
char tree_col; /* DLRB_BLACK or DLRB_RED */
/* keyframe info */
- char key_type; /* eBezTripe_KeyframeType */
- short sel;
+ char sel;
+ short handle_type;
float cfra;
/* only while drawing - used to determine if long-keyframe needs to be drawn */
@@ -99,7 +99,7 @@ typedef enum eKeyframeShapeDrawOpts {
} eKeyframeShapeDrawOpts;
/* draw simple diamond-shape keyframe (with OpenGL) */
-void draw_keyframe_shape(float x, float y, float xscale, float hsize, short sel, short key_type, short mode);
+void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel, short mode);
/* ******************************* Methods ****************************** */
diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h
index b2bf05ea5ea..77e95dc77de 100644
--- a/source/blender/editors/include/ED_keyframes_edit.h
+++ b/source/blender/editors/include/ED_keyframes_edit.h
@@ -40,6 +40,8 @@ struct Scene;
/* --------- BezTriple Selection ------------- */
+#define BEZSELECTED(bezt) ((bezt->f2 & SELECT) || (bezt->f1 & SELECT) || (bezt->f3 & SELECT))
+
#define BEZ_SEL(bezt) { (bezt)->f1 |= SELECT; (bezt)->f2 |= SELECT; (bezt)->f3 |= SELECT; }
#define BEZ_DESEL(bezt) { (bezt)->f1 &= ~SELECT; (bezt)->f2 &= ~SELECT; (bezt)->f3 &= ~SELECT; }
#define BEZ_INVSEL(bezt) { (bezt)->f1 ^= SELECT; (bezt)->f2 ^= SELECT; (bezt)->f3 ^= SELECT; }
@@ -131,7 +133,6 @@ BeztEditFunc ANIM_editkeyframes_mirror(short mode);
BeztEditFunc ANIM_editkeyframes_select(short mode);
BeztEditFunc ANIM_editkeyframes_handles(short mode);
BeztEditFunc ANIM_editkeyframes_ipo(short mode);
-BeztEditFunc ANIM_editkeyframes_keytype(short mode);
/* ----------- BezTriple Callback (Assorted Utilities) ---------- */
@@ -147,7 +148,6 @@ void duplicate_fcurve_keys(struct FCurve *fcu);
void clean_fcurve(struct FCurve *fcu, float thresh);
void smooth_fcurve(struct FCurve *fcu);
-void sample_fcurve(struct FCurve *fcu);
/* ----------- */
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index 20c2301d2ac..64672e3502b 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -65,14 +65,13 @@ struct FCurve *verify_fcurve(struct bAction *act, const char group[], const char
* Use this when validation of necessary animation data isn't necessary as it already
* exists, and there is a beztriple that can be directly copied into the array.
*/
-int insert_bezt_fcurve(struct FCurve *fcu, struct BezTriple *bezt, short flag);
+int insert_bezt_fcurve(struct FCurve *fcu, struct BezTriple *bezt);
/* Main Keyframing API call:
* Use this when validation of necessary animation data isn't necessary as it
* already exists. It will insert a keyframe using the current value being keyframed.
- * Returns the index at which a keyframe was added (or -1 if failed)
*/
-int insert_vert_fcurve(struct FCurve *fcu, float x, float y, short flag);
+void insert_vert_fcurve(struct FCurve *fcu, float x, float y, short flag);
/* -------- */
@@ -157,9 +156,12 @@ void init_builtin_keyingsets(void);
/* -------- */
-/* KeyingSet managment operators for UI buttons. */
-void ANIM_OT_add_keyingset_button(struct wmOperatorType *ot);
-void ANIM_OT_remove_keyingset_button(struct wmOperatorType *ot);
+/* KeyingSet Editing Operators:
+ * These can add a new KeyingSet and/or add 'destinations' to the KeyingSets,
+ * acting as a means by which they can be added outside the Outliner.
+ */
+void ANIM_OT_keyingset_add_new(struct wmOperatorType *ot);
+void ANIM_OT_keyingset_add_destination(struct wmOperatorType *ot);
/* ************ Drivers ********************** */
diff --git a/source/blender/editors/include/ED_mball.h b/source/blender/editors/include/ED_mball.h
index 49c1d856a27..adb50867bf9 100644
--- a/source/blender/editors/include/ED_mball.h
+++ b/source/blender/editors/include/ED_mball.h
@@ -26,10 +26,6 @@
* ***** END GPL LICENSE BLOCK *****
*/
-struct bContext;
-struct Object;
-struct wmWindowManager;
-
void ED_operatortypes_metaball(void);
void ED_keymap_metaball(struct wmWindowManager *wm);
@@ -41,5 +37,3 @@ void free_editMball(struct Object *obedit);
void make_editMball(struct Object *obedit);
void load_editMball(struct Object *obedit);
-void undo_push_mball(struct bContext *C, char *name);
-
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index 1045da5a596..696e8f823eb 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -161,23 +161,25 @@ void convert_to_triface(struct EditMesh *em, int direction);
/* editface.c */
struct MTFace *EM_get_active_mtface(struct EditMesh *em, struct EditFace **act_efa, struct MCol **mcol, int sloppy);
-/* object_vgroup.c */
+/* editdeform.c XXX rename functions? */
#define WEIGHT_REPLACE 1
#define WEIGHT_ADD 2
#define WEIGHT_SUBTRACT 3
-struct bDeformGroup *ED_vgroup_add(struct Object *ob);
-struct bDeformGroup *ED_vgroup_add_name(struct Object *ob, char *name);
-void ED_vgroup_select_by_name(struct Object *ob, char *name);
-void ED_vgroup_data_create(struct ID *id);
+void add_defgroup (Object *ob);
+void create_dverts(struct ID *id);
+float get_vert_defgroup (Object *ob, struct bDeformGroup *dg, int vertnum);
+void remove_vert_defgroup (Object *ob, struct bDeformGroup *dg, int vertnum);
+void remove_verts_defgroup (Object *obedit, int allverts);
+void vertexgroup_select_by_name(Object *ob, char *name);
+void add_vert_to_defgroup (Object *ob, struct bDeformGroup *dg, int vertnum,
+ float weight, int assignmode);
-void ED_vgroup_vert_add(struct Object *ob, struct bDeformGroup *dg, int vertnum, float weight, int assignmode);
-void ED_vgroup_vert_remove(struct Object *ob, struct bDeformGroup *dg, int vertnum);
-float ED_vgroup_vert_weight(struct Object *ob, struct bDeformGroup *dg, int vertnum);
+struct bDeformGroup *add_defgroup_name (Object *ob, char *name);
+struct MDeformWeight *verify_defweight (struct MDeformVert *dv, int defgroup);
+struct MDeformWeight *get_defweight (struct MDeformVert *dv, int defgroup);
-struct MDeformWeight *ED_vgroup_weight_verify(struct MDeformVert *dv, int defgroup);
-struct MDeformWeight *ED_vgroup_weight_get(struct MDeformVert *dv, int defgroup);
#endif /* ED_MESH_H */
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index 67dc6dada5f..d31f85d08ea 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -89,11 +89,14 @@ void object_test_constraints(struct Object *ob);
void ED_object_constraint_rename(struct Object *ob, struct bConstraint *con, char *oldname);
void ED_object_constraint_set_active(struct Object *ob, struct bConstraint *con);
-/* object_lattice.c */
+/* editlattice.c */
void mouse_lattice(struct bContext *C, short mval[2], int extend);
void undo_push_lattice(struct bContext *C, char *name);
-/* object_shapekey.c */
+/* editmball.c */
+void undo_push_mball(struct bContext *C, char *name);
+
+/* editkey.c */
void insert_shapekey(struct Scene *scene, struct Object *ob);
void delete_key(struct Scene *scene, struct Object *ob);
void key_to_mesh(struct KeyBlock *kb, struct Mesh *me);
diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h
index 28807caa255..43cb5053f48 100644
--- a/source/blender/editors/include/ED_particle.h
+++ b/source/blender/editors/include/ED_particle.h
@@ -37,19 +37,20 @@ struct ParticleSystem;
struct RadialControl;
struct rcti;
struct wmWindowManager;
-struct PTCacheEdit;
/* particle edit mode */
-void PE_free_ptcache_edit(struct PTCacheEdit *edit);
-int PE_start_edit(struct PTCacheEdit *edit);
+void PE_change_act(void *ob_v, void *act_v);
+void PE_change_act_psys(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys);
+int PE_can_edit(struct ParticleSystem *psys);
/* access */
-struct PTCacheEdit *PE_get_current(struct Scene *scene, struct Object *ob);
+struct ParticleSystem *PE_get_current(struct Scene *scene, struct Object *ob);
+short PE_get_current_num(struct Object *ob);
int PE_minmax(struct Scene *scene, float *min, float *max);
struct ParticleEditSettings *PE_settings(Scene *scene);
/* update calls */
-void PE_hide_keys_time(struct Scene *scene, struct PTCacheEdit *edit, float cfra);
+void PE_hide_keys_time(struct Scene *scene, struct ParticleSystem *psys, float cfra);
void PE_update_object(struct Scene *scene, struct Object *ob, int useflag);
/* selection tools */
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index 0153b3c9bdb..6cb7593e07d 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -58,7 +58,6 @@ void ED_region_panels_init(struct wmWindowManager *wm, struct ARegion *ar);
void ED_region_panels(const struct bContext *C, struct ARegion *ar, int vertical, char *context, int contextnr);
void ED_region_header_init(struct ARegion *ar);
void ED_region_header(const struct bContext *C, struct ARegion *ar);
-void region_scissor_winrct(struct ARegion *ar, struct rcti *winrct);
/* spaces */
void ED_spacetypes_init(void);
@@ -150,7 +149,7 @@ int ED_operator_posemode(struct bContext *C);
#define ED_KEYMAP_MARKERS 4
#define ED_KEYMAP_ANIMATION 8
#define ED_KEYMAP_FRAMES 16
-#define ED_KEYMAP_GPENCIL 32
+
#endif /* ED_SCREEN_H */
diff --git a/source/blender/editors/include/ED_sound.h b/source/blender/editors/include/ED_sound.h
deleted file mode 100644
index afb2752fa6b..00000000000
--- a/source/blender/editors/include/ED_sound.h
+++ /dev/null
@@ -1,35 +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2008 Blender Foundation.
- * All rights reserved.
- *
- *
- * Contributor(s): Blender Foundation
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef ED_SOUND_H
-#define ED_SOUND_H
-
-void ED_operatortypes_sound(void);
-
-#endif /* ED_SOUND_H */
-
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index fd1b7e1351d..07aa44cadd8 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -70,7 +70,6 @@ float *give_cursor(struct Scene *scene, struct View3D *v3d);
void initgrabz(struct RegionView3D *rv3d, float x, float y, float z);
void window_to_3d(struct ARegion *ar, float *vec, short mx, short my);
void window_to_3d_delta(struct ARegion *ar, float *vec, short mx, short my);
-void view3d_unproject(struct bglMats *mats, float out[3], const short x, const short y, const float z);
/* Depth buffer */
float read_cached_depth(struct ViewContext *vc, int x, int y);
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h
index f16fc9ebe05..010101a1a80 100644
--- a/source/blender/editors/include/UI_icons.h
+++ b/source/blender/editors/include/UI_icons.h
@@ -101,7 +101,7 @@ DEF_ICON(ICON_RENDER_REGION)
DEF_ICON(ICON_BORDER_RECT)
DEF_ICON(ICON_BORDER_LASSO)
DEF_ICON(ICON_FREEZE)
-DEF_ICON(ICON_STYLUS_PRESSURE)
+DEF_ICON(ICON_BLANK031)
DEF_ICON(ICON_BLANK032)
DEF_ICON(ICON_BLANK033)
DEF_ICON(ICON_BLANK034)
@@ -241,7 +241,7 @@ DEF_ICON(ICON_BLANK080F)
DEF_ICON(ICON_BOIDS)
DEF_ICON(ICON_STRANDS)
DEF_ICON(ICON_LIBRARY_DATA_INDIRECT)
-DEF_ICON(ICON_GREASEPENCIL)
+DEF_ICON(ICON_BLANK082)
DEF_ICON(ICON_BLANK083)
DEF_ICON(ICON_BLANK084)
DEF_ICON(ICON_GROUP_BONE)
@@ -538,7 +538,7 @@ DEF_ICON(ICON_MOD_CLOTH)
DEF_ICON(ICON_MOD_EXPLODE)
DEF_ICON(ICON_MOD_FLUIDSIM)
DEF_ICON(ICON_MOD_MULTIRES)
-DEF_ICON(ICON_MOD_SMOKE)
+DEF_ICON(ICON_BLANK157)
DEF_ICON(ICON_BLANK158)
DEF_ICON(ICON_BLANK159)
DEF_ICON(ICON_BLANK160)
@@ -686,10 +686,10 @@ DEF_ICON(ICON_BLANK231)
DEF_ICON(ICON_BLANK232)
DEF_ICON(ICON_BLANK233)
DEF_ICON(ICON_BLANK234)
-DEF_ICON(ICON_UV_VERTEXSEL)
-DEF_ICON(ICON_UV_EDGESEL)
-DEF_ICON(ICON_UV_FACESEL)
-DEF_ICON(ICON_UV_ISLANDSEL)
+DEF_ICON(ICON_BLANK235)
+DEF_ICON(ICON_BLANK236)
+DEF_ICON(ICON_BLANK237)
+DEF_ICON(ICON_BLANK238)
DEF_ICON(ICON_BLANK239)
DEF_ICON(ICON_BLANK240)
DEF_ICON(ICON_BLANK241)
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index e2338078a8a..42280ad17c9 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -100,8 +100,6 @@ typedef struct uiLayout uiLayout;
#define UI_BLOCK_KEEP_OPEN 256
#define UI_BLOCK_POPUP 512
#define UI_BLOCK_OUT_1 1024
-#define UI_BLOCK_NO_FLIP 2048
-#define UI_BLOCK_POPUP_MEMORY 4096
/* uiPopupBlockHandle->menuretval */
#define UI_RETURN_CANCEL 1 /* cancel all menus cascading */
@@ -256,6 +254,8 @@ void uiPupMenuNotice(struct bContext *C, char *str, ...);
void uiPupMenuError(struct bContext *C, char *str, ...);
void uiPupMenuReports(struct bContext *C, struct ReportList *reports);
+void uiPupMenuSetActive(int val);
+
/* Popup Blocks
*
* Functions used to create popup blocks. These are like popup menus
@@ -585,21 +585,16 @@ void UI_exit(void);
#define UI_LAYOUT_ALIGN_CENTER 2
#define UI_LAYOUT_ALIGN_RIGHT 3
-#define UI_ITEM_O_RETURN_PROPS 1
-#define UI_ITEM_R_EXPAND 2
-#define UI_ITEM_R_SLIDER 4
-#define UI_ITEM_R_TOGGLE 8
-
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(const struct bContext *C, uiBlock *block, int *x, int *y);
uiBlock *uiLayoutGetBlock(uiLayout *layout);
+void uiLayoutSetOperatorContext(uiLayout *layout, int opcontext);
void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv);
void uiLayoutSetContextPointer(uiLayout *layout, char *name, struct PointerRNA *ptr);
-void uiLayoutSetOperatorContext(uiLayout *layout, int opcontext);
void uiLayoutSetActive(uiLayout *layout, int active);
void uiLayoutSetEnabled(uiLayout *layout, int enabled);
void uiLayoutSetRedAlert(uiLayout *layout, int redalert);
@@ -633,7 +628,7 @@ uiBlock *uiLayoutFreeBlock(uiLayout *layout);
/* templates */
void uiTemplateHeader(uiLayout *layout, struct bContext *C, int menus);
void uiTemplateID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
- char *newop, char *openop, char *unlinkop);
+ char *newop, char *unlinkop);
uiLayout *uiTemplateModifier(uiLayout *layout, struct PointerRNA *ptr);
uiLayout *uiTemplateConstraint(uiLayout *layout, struct PointerRNA *ptr);
void uiTemplatePreview(uiLayout *layout, struct ID *id, struct ID *parent, struct MTex *slot);
@@ -645,6 +640,9 @@ void uiTemplateImageLayers(uiLayout *layout, struct bContext *C, struct Image *i
void uiTemplateRunningJobs(uiLayout *layout, struct bContext *C);
void uiTemplateOperatorSearch(uiLayout *layout);
void uiTemplateHeader3D(uiLayout *layout, struct bContext *C);
+void uiTemplate_view3d_select_metaballmenu(uiLayout *layout, struct bContext *C);
+void uiTemplate_view3d_select_armaturemenu(uiLayout *layout, struct bContext *C);
+void uiTemplate_view3d_select_posemenu(uiLayout *layout, struct bContext *C);
void uiTemplate_view3d_select_faceselmenu(uiLayout *layout, struct bContext *C);
void uiTemplateTextureImage(uiLayout *layout, struct bContext *C, struct Tex *tex);
@@ -666,10 +664,10 @@ void uiItemBooleanO(uiLayout *layout, char *name, int icon, char *opname, char *
void uiItemIntO(uiLayout *layout, char *name, int icon, char *opname, char *propname, int value);
void uiItemFloatO(uiLayout *layout, char *name, int icon, char *opname, char *propname, float value);
void uiItemStringO(uiLayout *layout, char *name, int icon, char *opname, char *propname, char *value);
-PointerRNA uiItemFullO(uiLayout *layout, char *name, int icon, char *idname, struct IDProperty *properties, int context, int flag);
+void uiItemFullO(uiLayout *layout, char *name, int icon, char *idname, struct IDProperty *properties, int context);
-void uiItemR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, int flag);
-void uiItemFullR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag);
+void uiItemR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, int expand, int slider, int toggle);
+void uiItemFullR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int expand, int slider, int toggle);
void uiItemEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, int value);
void uiItemEnumR_string(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, char *value);
void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, char *propname);
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 3c6e12905d6..92a3a4cf841 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -225,7 +225,6 @@ static void ui_text_bounds_block(uiBlock *block, float offset)
uiStyle *style= U.uistyles.first; // XXX pass on as arg
uiBut *bt;
int i = 0, j, x1addval= offset, nextcol;
- int lastcol= 0, col= 0;
uiStyleFontSet(&style->widget);
@@ -238,26 +237,18 @@ static void ui_text_bounds_block(uiBlock *block, float offset)
if(j > i) i = j;
}
-
- if(bt->next && bt->x1 < bt->next->x1)
- lastcol++;
}
/* cope with multi collumns */
bt= block->buttons.first;
while(bt) {
- if(bt->next && bt->x1 < bt->next->x1) {
+ if(bt->next && bt->x1 < bt->next->x1)
nextcol= 1;
- col++;
- }
else nextcol= 0;
bt->x1 = x1addval;
bt->x2 = bt->x1 + i + block->bounds;
- if(col == lastcol)
- bt->x2= MAX2(bt->x2, offset + block->minbounds);
-
ui_check_but(bt); // clips text again
if(nextcol)
@@ -290,7 +281,7 @@ void ui_bounds_block(uiBlock *block)
if(bt->x2 > block->maxx) block->maxx= bt->x2;
if(bt->y2 > block->maxy) block->maxy= bt->y2;
-
+
bt= bt->next;
}
@@ -300,8 +291,6 @@ void ui_bounds_block(uiBlock *block)
block->maxy += block->bounds;
}
- block->maxx= block->minx + MAX2(block->maxx - block->minx, block->minbounds);
-
/* hardcoded exception... but that one is annoying with larger safety */
bt= block->buttons.first;
if(bt && strncmp(bt->str, "ERROR", 5)==0) xof= 10;
@@ -1089,7 +1078,7 @@ void ui_get_but_vectorf(uiBut *but, float *vec)
vec[0]= vec[1]= vec[2]= 0.0f;
if(RNA_property_type(prop) == PROP_FLOAT) {
- tot= RNA_property_array_length(&but->rnapoin, prop);
+ tot= RNA_property_array_length(prop);
tot= MIN2(tot, 3);
for(a=0; a<tot; a++)
@@ -1123,7 +1112,7 @@ void ui_set_but_vectorf(uiBut *but, float *vec)
prop= but->rnaprop;
if(RNA_property_type(prop) == PROP_FLOAT) {
- tot= RNA_property_array_length(&but->rnapoin, prop);
+ tot= RNA_property_array_length(prop);
tot= MIN2(tot, 3);
for(a=0; a<tot; a++)
@@ -1181,19 +1170,19 @@ double ui_get_but_val(uiBut *but)
switch(RNA_property_type(prop)) {
case PROP_BOOLEAN:
- if(RNA_property_array_length(&but->rnapoin, prop))
+ if(RNA_property_array_length(prop))
value= RNA_property_boolean_get_index(&but->rnapoin, prop, but->rnaindex);
else
value= RNA_property_boolean_get(&but->rnapoin, prop);
break;
case PROP_INT:
- if(RNA_property_array_length(&but->rnapoin, prop))
+ if(RNA_property_array_length(prop))
value= RNA_property_int_get_index(&but->rnapoin, prop, but->rnaindex);
else
value= RNA_property_int_get(&but->rnapoin, prop);
break;
case PROP_FLOAT:
- if(RNA_property_array_length(&but->rnapoin, prop))
+ if(RNA_property_array_length(prop))
value= RNA_property_float_get_index(&but->rnapoin, prop, but->rnaindex);
else
value= RNA_property_float_get(&but->rnapoin, prop);
@@ -1245,19 +1234,19 @@ void ui_set_but_val(uiBut *but, double value)
if(RNA_property_editable(&but->rnapoin, prop)) {
switch(RNA_property_type(prop)) {
case PROP_BOOLEAN:
- if(RNA_property_array_length(&but->rnapoin, prop))
+ if(RNA_property_array_length(prop))
RNA_property_boolean_set_index(&but->rnapoin, prop, but->rnaindex, value);
else
RNA_property_boolean_set(&but->rnapoin, prop, value);
break;
case PROP_INT:
- if(RNA_property_array_length(&but->rnapoin, prop))
+ if(RNA_property_array_length(prop))
RNA_property_int_set_index(&but->rnapoin, prop, but->rnaindex, value);
else
RNA_property_int_set(&but->rnapoin, prop, value);
break;
case PROP_FLOAT:
- if(RNA_property_array_length(&but->rnapoin, prop))
+ if(RNA_property_array_length(prop))
RNA_property_float_set_index(&but->rnapoin, prop, but->rnaindex, value);
else
RNA_property_float_set(&but->rnapoin, prop, value);
@@ -2297,12 +2286,8 @@ uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, char *str, short x1,
dynstr= BLI_dynstr_new();
BLI_dynstr_appendf(dynstr, "%s%%t", RNA_property_ui_name(prop));
for(i=0; i<totitem; i++) {
- if(!item[i].identifier[0]) {
- if(item[i].name)
- BLI_dynstr_appendf(dynstr, "|%s%%l", item[i].name);
- else
- BLI_dynstr_append(dynstr, "|%l");
- }
+ if(!item[i].identifier[0])
+ BLI_dynstr_append(dynstr, "|%l");
else if(item[i].icon)
BLI_dynstr_appendf(dynstr, "|%s %%i%d %%x%d", item[i].name, item[i].icon, item[i].value);
else
@@ -2414,7 +2399,7 @@ uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, char *str, short x1,
but->rnapoin= *ptr;
but->rnaprop= prop;
- if(RNA_property_array_length(&but->rnapoin, but->rnaprop))
+ if(RNA_property_array_length(but->rnaprop))
but->rnaindex= index;
else
but->rnaindex= 0;
@@ -2854,8 +2839,6 @@ void uiBlockFlipOrder(uiBlock *block)
if(U.uiflag & USER_MENUFIXEDORDER)
return;
- else if(block->flag & UI_BLOCK_NO_FLIP)
- return;
for(but= block->buttons.first; but; but= but->next) {
if(but->flag & UI_BUT_ALIGN) return;
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index 8c41726b81b..2993a1aba15 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -152,8 +152,6 @@ void ui_but_anim_autokey(uiBut *but, Scene *scene, float cfra)
flag |= INSERTKEY_NEEDED;
if (IS_AUTOKEY_FLAG(AUTOMATKEY))
flag |= INSERTKEY_MATRIX;
- if (IS_AUTOKEY_MODE(scene, EDITKEYS))
- flag |= INSERTKEY_REPLACE;
fcu->flag &= ~FCURVE_SELECTED;
insert_keyframe(id, action, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag);
@@ -209,18 +207,6 @@ void ui_but_anim_remove_driver(bContext *C)
WM_operator_name_call(C, "ANIM_OT_remove_driver_button", WM_OP_INVOKE_DEFAULT, NULL);
}
-void ui_but_anim_add_keyingset(bContext *C)
-{
- /* this operator calls uiAnimContextProperty above */
- WM_operator_name_call(C, "ANIM_OT_add_keyingset_button", WM_OP_INVOKE_DEFAULT, NULL);
-}
-
-void ui_but_anim_remove_keyingset(bContext *C)
-{
- /* this operator calls uiAnimContextProperty above */
- WM_operator_name_call(C, "ANIM_OT_remove_keyingset_button", WM_OP_INVOKE_DEFAULT, NULL);
-}
-
void ui_but_anim_menu(bContext *C, uiBut *but)
{
uiPopupMenu *pup;
@@ -231,7 +217,7 @@ void ui_but_anim_menu(bContext *C, uiBut *but)
pup= uiPupMenuBegin(C, RNA_property_ui_name(but->rnaprop), 0);
layout= uiPupMenuLayout(pup);
- length= RNA_property_array_length(&but->rnapoin, but->rnaprop);
+ length= RNA_property_array_length(but->rnaprop);
if(but->flag & UI_BUT_ANIMATED_KEY) {
if(length) {
@@ -276,20 +262,6 @@ void ui_but_anim_menu(bContext *C, uiBut *but)
else
uiItemBooleanO(layout, "Add Driver", 0, "ANIM_OT_add_driver_button", "all", 0);
}
-
- if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) {
- uiItemS(layout);
-
- if(length) {
- uiItemBooleanO(layout, "Add All to Keying Set", 0, "ANIM_OT_add_keyingset_button", "all", 1);
- uiItemBooleanO(layout, "Add Single to Keying Set", 0, "ANIM_OT_add_keyingset_button", "all", 0);
- uiItemO(layout, "Remove from Keying Set", 0, "ANIM_OT_remove_keyingset_button");
- }
- else {
- uiItemBooleanO(layout, "Add to Keying Set", 0, "ANIM_OT_add_keyingset_button", "all", 0);
- uiItemO(layout, "Remove from Keying Set", 0, "ANIM_OT_remove_keyingset_button");
- }
- }
uiPupMenuEnd(C, pup);
}
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 259ccba6b89..e3518b446ba 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -678,11 +678,7 @@ static void ui_add_link(uiBut *from, uiBut *to)
return;
}
- if (from->type==INLINK && to->type==INLINK) {
- printf("cannot link\n");
- return;
- }
- else if (from->type==LINK && to->type==INLINK) {
+ if (from->type==LINK && to->type==INLINK) {
if( from->link->tocode != (int)to->hardmin ) {
printf("cannot link\n");
return;
@@ -1724,7 +1720,6 @@ static void ui_blockopen_begin(bContext *C, uiBut *but, uiHandleButtonData *data
uiBlockCreateFunc func= NULL;
uiBlockHandleCreateFunc handlefunc= NULL;
uiMenuCreateFunc menufunc= NULL;
- char *menustr= NULL;
void *arg= NULL;
switch(but->type) {
@@ -1749,15 +1744,16 @@ static void ui_blockopen_begin(bContext *C, uiBut *but, uiHandleButtonData *data
data->value= data->origvalue;
but->editval= &data->value;
- menustr= but->str;
+ handlefunc= ui_block_func_MENU;
+ arg= but;
}
break;
case ICONROW:
- menufunc= ui_block_func_ICONROW;
+ handlefunc= ui_block_func_ICONROW;
arg= but;
break;
case ICONTEXTROW:
- menufunc= ui_block_func_ICONTEXTROW;
+ handlefunc= ui_block_func_ICONTEXTROW;
arg= but;
break;
case COL:
@@ -1775,8 +1771,8 @@ static void ui_blockopen_begin(bContext *C, uiBut *but, uiHandleButtonData *data
if(but->block->handle)
data->menu->popup= but->block->handle->popup;
}
- else if(menufunc || menustr) {
- data->menu= ui_popup_menu_create(C, data->region, but, menufunc, arg, menustr);
+ else if(menufunc) {
+ data->menu= ui_popup_menu_create(C, data->region, but, menufunc, arg);
if(but->block->handle)
data->menu->popup= but->block->handle->popup;
}
@@ -3265,18 +3261,18 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
ui_but_copy_paste(C, but, data, (event->type == CKEY)? 'c': 'v');
return WM_UI_HANDLER_BREAK;
}
- /* handle keyframing */
+ /* handle keyframeing */
else if(event->type == IKEY && event->val == KM_PRESS) {
if(event->alt)
ui_but_anim_delete_keyframe(C);
else
ui_but_anim_insert_keyframe(C);
-
+
ED_region_tag_redraw(CTX_wm_region(C));
-
+
return WM_UI_HANDLER_BREAK;
}
- /* handle drivers */
+ /* handle driver adding */
else if(event->type == DKEY && event->val == KM_PRESS) {
if(event->alt)
ui_but_anim_remove_driver(C);
@@ -3287,17 +3283,6 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
return WM_UI_HANDLER_BREAK;
}
- /* handle keyingsets */
- else if(event->type == KKEY && event->val == KM_PRESS) {
- if(event->alt)
- ui_but_anim_remove_keyingset(C);
- else
- ui_but_anim_remove_keyingset(C);
-
- ED_region_tag_redraw(CTX_wm_region(C));
-
- return WM_UI_HANDLER_BREAK;
- }
/* handle menu */
else if(event->type == RIGHTMOUSE && event->val == KM_PRESS) {
/* RMB has two options now */
@@ -3744,15 +3729,10 @@ static void button_activate_exit(bContext *C, uiHandleButtonData *data, uiBut *b
}
}
- if(!data->cancel) {
- /* autokey & undo push */
+ /* autokey & undo push */
+ if(!data->cancel)
ui_apply_autokey_undo(C, but);
- /* popup menu memory */
- if(block->flag & UI_BLOCK_POPUP_MEMORY)
- ui_popup_menu_memory(block, but);
- }
-
/* disable tooltips until mousemove + last active flag */
for(block=data->region->uiblocks.first; block; block=block->next) {
for(bt=block->buttons.first; bt; bt=bt->next)
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 6c4110c8c37..549164c23a1 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -34,7 +34,6 @@
#else
#include <io.h>
#include <direct.h>
-#include "BLI_winstuff.h"
#endif
#include "MEM_guardedalloc.h"
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 2e623114fe9..9ef5d65b69f 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -287,8 +287,7 @@ struct uiBlock {
char *lockstr;
float xofs, yofs; // offset to parent button
- int dobounds, mx, my; // for doing delayed
- int bounds, minbounds; // for doing delayed
+ int bounds, dobounds, mx, my; // for doing delayed
int endblock; // uiEndBlock done?
rctf safety; // pulldowns, to detect outside, can differ per case how it is created
@@ -298,7 +297,6 @@ struct uiBlock {
int tooltipdisabled; // to avoid tooltip after click
int active; // to keep blocks while drawing and free them afterwards
- int puphash; // popup menu hash for memory
void *evil_C; // XXX hack for dynamic operator enums
};
@@ -374,15 +372,14 @@ struct uiPopupBlockHandle {
float retvec[3];
};
+uiBlock *ui_block_func_MENU(struct bContext *C, uiPopupBlockHandle *handle, void *arg_but);
+uiBlock *ui_block_func_ICONROW(struct bContext *C, uiPopupBlockHandle *handle, void *arg_but);
+uiBlock *ui_block_func_ICONTEXTROW(struct bContext *C, uiPopupBlockHandle *handle, void *arg_but);
uiBlock *ui_block_func_COL(struct bContext *C, uiPopupBlockHandle *handle, void *arg_but);
-void ui_block_func_ICONROW(struct bContext *C, uiLayout *layout, void *arg_but);
-void ui_block_func_ICONTEXTROW(struct bContext *C, uiLayout *layout, void *arg_but);
struct ARegion *ui_tooltip_create(struct bContext *C, struct ARegion *butregion, uiBut *but);
void ui_tooltip_free(struct bContext *C, struct ARegion *ar);
-uiBut *ui_popup_menu_memory(uiBlock *block, uiBut *but);
-
/* searchbox for string button */
ARegion *ui_searchbox_create(struct bContext *C, struct ARegion *butregion, uiBut *but);
int ui_searchbox_inside(struct ARegion *ar, int x, int y);
@@ -397,8 +394,7 @@ typedef uiBlock* (*uiBlockHandleCreateFunc)(struct bContext *C, struct uiPopupBl
uiPopupBlockHandle *ui_popup_block_create(struct bContext *C, struct ARegion *butregion, uiBut *but,
uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func, void *arg);
uiPopupBlockHandle *ui_popup_menu_create(struct bContext *C, struct ARegion *butregion, uiBut *but,
- uiMenuCreateFunc create_func, void *arg, char *str);
-
+ uiMenuCreateFunc create_func, void *arg);
void ui_popup_block_free(struct bContext *C, uiPopupBlockHandle *handle);
void ui_set_name_menu(uiBut *but, int value);
@@ -467,8 +463,6 @@ void ui_but_anim_insert_keyframe(struct bContext *C);
void ui_but_anim_delete_keyframe(struct bContext *C);
void ui_but_anim_add_driver(struct bContext *C);
void ui_but_anim_remove_driver(struct bContext *C);
-void ui_but_anim_add_keyingset(struct bContext *C);
-void ui_but_anim_remove_keyingset(struct bContext *C);
void ui_but_anim_menu(struct bContext *C, uiBut *but);
int ui_but_anim_expression_get(uiBut *but, char *str, int maxlen);
int ui_but_anim_expression_set(uiBut *but, const char *str);
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 04d575d96d4..fc4f7da56d2 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -310,30 +310,6 @@ static uiLayout *ui_item_local_sublayout(uiLayout *test, uiLayout *layout, int a
return sub;
}
-static void ui_layer_but_cb(bContext *C, void *arg_but, void *arg_index)
-{
- wmWindow *win= CTX_wm_window(C);
- uiBut *but= arg_but, *cbut;
- PointerRNA *ptr= &but->rnapoin;
- PropertyRNA *prop= but->rnaprop;
- int i, index= GET_INT_FROM_POINTER(arg_index);
- int shift= win->eventstate->shift;
- int len= RNA_property_array_length(ptr, prop);
-
- if(!shift) {
- RNA_property_boolean_set_index(ptr, prop, index, 1);
-
- for(i=0; i<len; i++)
- if(i != index)
- RNA_property_boolean_set_index(ptr, prop, i, 0);
-
- RNA_property_update(C, ptr, prop);
-
- for(cbut=but->block->buttons.first; cbut; cbut=cbut->next)
- ui_check_but(cbut);
- }
-}
-
/* create buttons for an item with an RNA array */
static void ui_item_array(uiLayout *layout, uiBlock *block, char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int len, int x, int y, int w, int h, int expand, int slider)
{
@@ -342,7 +318,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, char *name, int icon
PropertyType type;
PropertySubType subtype;
uiLayout *sub;
- int a, b;
+ int a;
/* retrieve type and subtype */
type= RNA_property_type(prop);
@@ -356,11 +332,9 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, char *name, int icon
uiDefBut(block, LABEL, 0, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
/* create buttons */
- if(type == PROP_BOOLEAN && ELEM(subtype, PROP_LAYER, PROP_LAYER_MEMBER)) {
+ if(type == PROP_BOOLEAN && len == 20) {
/* special check for layer layout */
int butw, buth, unit;
- int cols= (len >= 20)? 2: 1;
- int colbuts= len/(2*cols);
uiBlockSetCurLayout(block, uiLayoutFree(layout, 0));
@@ -368,23 +342,21 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, char *name, int icon
butw= unit;
buth= unit;
- for(b=0; b<cols; b++) {
- uiBlockBeginAlign(block);
+ uiBlockBeginAlign(block);
+ for(a=0; a<5; a++)
+ uiDefAutoButR(block, ptr, prop, a, "", ICON_BLANK1, x + butw*a, y+buth, butw, buth);
+ for(a=0; a<5; a++)
+ uiDefAutoButR(block, ptr, prop, a+10, "", ICON_BLANK1, x + butw*a, y, butw, buth);
+ uiBlockEndAlign(block);
- for(a=0; a<colbuts; a++) {
- but= uiDefAutoButR(block, ptr, prop, a+b*colbuts, "", ICON_BLANK1, x + butw*a, y+buth, butw, buth);
- if(subtype == PROP_LAYER_MEMBER)
- uiButSetFunc(but, ui_layer_but_cb, but, SET_INT_IN_POINTER(a+b*colbuts));
- }
- for(a=0; a<colbuts; a++) {
- but= uiDefAutoButR(block, ptr, prop, a+len/2+b*colbuts, "", ICON_BLANK1, x + butw*a, y, butw, buth);
- if(subtype == PROP_LAYER_MEMBER)
- uiButSetFunc(but, ui_layer_but_cb, but, SET_INT_IN_POINTER(a+len/2+b*colbuts));
- }
- uiBlockEndAlign(block);
+ x += 5*butw + style->buttonspacex;
- x += colbuts*butw + style->buttonspacex;
- }
+ uiBlockBeginAlign(block);
+ for(a=0; a<5; a++)
+ uiDefAutoButR(block, ptr, prop, a+5, "", ICON_BLANK1, x + butw*a, y+buth, butw, buth);
+ for(a=0; a<5; a++)
+ uiDefAutoButR(block, ptr, prop, a+15, "", ICON_BLANK1, x + butw*a, y, butw, buth);
+ uiBlockEndAlign(block);
}
else if(subtype == PROP_MATRIX) {
/* matrix layout */
@@ -563,7 +535,7 @@ static void ui_item_disabled(uiLayout *layout, char *name)
}
/* operator items */
-PointerRNA uiItemFullO(uiLayout *layout, char *name, int icon, char *idname, IDProperty *properties, int context, int flag)
+void uiItemFullO(uiLayout *layout, char *name, int icon, char *idname, IDProperty *properties, int context)
{
uiBlock *block= layout->root->block;
wmOperatorType *ot= WM_operatortype_find(idname, 0);
@@ -572,7 +544,7 @@ PointerRNA uiItemFullO(uiLayout *layout, char *name, int icon, char *idname, IDP
if(!ot) {
ui_item_disabled(layout, idname);
- return PointerRNA_NULL;
+ return;
}
if(!name)
@@ -593,21 +565,10 @@ PointerRNA uiItemFullO(uiLayout *layout, char *name, int icon, char *idname, IDP
but= uiDefButO(block, BUT, ot->idname, context, (char*)name, 0, 0, w, UI_UNIT_Y, NULL);
/* assign properties */
- if(properties || (flag & UI_ITEM_O_RETURN_PROPS)) {
+ if(properties) {
PointerRNA *opptr= uiButGetOperatorPtrRNA(but);
-
- if(properties) {
- opptr->data= properties;
- }
- else {
- IDPropertyTemplate val = {0};
- opptr->data= IDP_New(IDP_GROUP, val, "wmOperatorProperties");
- }
-
- return *opptr;
+ opptr->data= properties;
}
-
- return PointerRNA_NULL;
}
static char *ui_menu_enumpropname(uiLayout *layout, char *opname, char *propname, int retval)
@@ -650,7 +611,7 @@ void uiItemEnumO(uiLayout *layout, char *name, int icon, char *opname, char *pro
if(!name)
name= ui_menu_enumpropname(layout, opname, propname, value);
- uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext, 0);
+ uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext);
}
void uiItemsEnumO(uiLayout *layout, char *opname, char *propname)
@@ -658,8 +619,6 @@ void uiItemsEnumO(uiLayout *layout, char *opname, char *propname)
wmOperatorType *ot= WM_operatortype_find(opname, 0);
PointerRNA ptr;
PropertyRNA *prop;
- uiBut *bt;
- uiBlock *block= layout->root->block;
if(!ot || !ot->srna) {
ui_item_disabled(layout, opname);
@@ -672,31 +631,14 @@ void uiItemsEnumO(uiLayout *layout, char *opname, char *propname)
if(prop && RNA_property_type(prop) == PROP_ENUM) {
EnumPropertyItem *item;
int totitem, i, free;
- uiLayout *split= uiLayoutSplit(layout, 0);
- uiLayout *column= uiLayoutColumn(split, 0);
-
- RNA_property_enum_items(block->evil_C, &ptr, prop, &item, &totitem, &free);
- for(i=0; i<totitem; i++) {
- if(item[i].identifier[0]) {
- uiItemEnumO(column, (char*)item[i].name, item[i].icon, opname, propname, item[i].value);
- }
- else {
- if(item[i].name) {
- if(i != 0) {
- column= uiLayoutColumn(split, 0);
- /* inconsistent, but menus with labels do not look good flipped */
- block->flag |= UI_BLOCK_NO_FLIP;
- }
+ RNA_property_enum_items(layout->root->block->evil_C, &ptr, prop, &item, &totitem, &free);
- uiItemL(column, (char*)item[i].name, 0);
- bt= block->buttons.last;
- bt->flag= UI_TEXT_LEFT;
- }
- else
- uiItemS(column);
- }
- }
+ for(i=0; i<totitem; i++)
+ if(item[i].identifier[0])
+ uiItemEnumO(layout, (char*)item[i].name, item[i].icon, opname, propname, item[i].value);
+ else
+ uiItemS(layout);
if(free)
MEM_freeN(item);
@@ -738,7 +680,7 @@ void uiItemEnumO_string(uiLayout *layout, char *name, int icon, char *opname, ch
if(!name)
name= ui_menu_enumpropname(layout, opname, propname, value);
- uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext, 0);
+ uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext);
}
void uiItemBooleanO(uiLayout *layout, char *name, int icon, char *opname, char *propname, int value)
@@ -748,7 +690,7 @@ void uiItemBooleanO(uiLayout *layout, char *name, int icon, char *opname, char *
WM_operator_properties_create(&ptr, opname);
RNA_boolean_set(&ptr, propname, value);
- uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext, 0);
+ uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext);
}
void uiItemIntO(uiLayout *layout, char *name, int icon, char *opname, char *propname, int value)
@@ -758,7 +700,7 @@ void uiItemIntO(uiLayout *layout, char *name, int icon, char *opname, char *prop
WM_operator_properties_create(&ptr, opname);
RNA_int_set(&ptr, propname, value);
- uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext, 0);
+ uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext);
}
void uiItemFloatO(uiLayout *layout, char *name, int icon, char *opname, char *propname, float value)
@@ -768,7 +710,7 @@ void uiItemFloatO(uiLayout *layout, char *name, int icon, char *opname, char *pr
WM_operator_properties_create(&ptr, opname);
RNA_float_set(&ptr, propname, value);
- uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext, 0);
+ uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext);
}
void uiItemStringO(uiLayout *layout, char *name, int icon, char *opname, char *propname, char *value)
@@ -778,17 +720,17 @@ void uiItemStringO(uiLayout *layout, char *name, int icon, char *opname, char *p
WM_operator_properties_create(&ptr, opname);
RNA_string_set(&ptr, propname, value);
- uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext, 0);
+ uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext);
}
void uiItemO(uiLayout *layout, char *name, int icon, char *opname)
{
- uiItemFullO(layout, name, icon, opname, NULL, layout->root->opcontext, 0);
+ uiItemFullO(layout, name, icon, opname, NULL, layout->root->opcontext);
}
/* RNA property items */
-static void ui_item_rna_size(uiLayout *layout, char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int index, int *r_w, int *r_h)
+static void ui_item_rna_size(uiLayout *layout, char *name, int icon, PropertyRNA *prop, int index, int *r_w, int *r_h)
{
PropertyType type;
PropertySubType subtype;
@@ -797,7 +739,7 @@ static void ui_item_rna_size(uiLayout *layout, char *name, int icon, PointerRNA
/* arbitrary extended width by type */
type= RNA_property_type(prop);
subtype= RNA_property_subtype(prop);
- len= RNA_property_array_length(ptr, prop);
+ len= RNA_property_array_length(prop);
if(ELEM3(type, PROP_STRING, PROP_POINTER, PROP_ENUM) && !name[0])
name= "non-empty text";
@@ -812,7 +754,7 @@ static void ui_item_rna_size(uiLayout *layout, char *name, int icon, PointerRNA
if(!name[0] && icon == 0)
h= 0;
- if(ELEM(subtype, PROP_LAYER, PROP_LAYER_MEMBER))
+ if(type == PROP_BOOLEAN && len == 20)
h += 2*UI_UNIT_Y;
else if(subtype == PROP_MATRIX)
h += ceil(sqrt(len))*UI_UNIT_Y;
@@ -821,24 +763,24 @@ static void ui_item_rna_size(uiLayout *layout, char *name, int icon, PointerRNA
}
else if(ui_layout_vary_direction(layout) == UI_ITEM_VARY_X) {
if(type == PROP_BOOLEAN && strcmp(name, "") != 0)
- w += UI_UNIT_X/5;
+ w += UI_UNIT_X;
else if(type == PROP_ENUM)
w += UI_UNIT_X/2;
else if(type == PROP_FLOAT || type == PROP_INT)
- w += UI_UNIT_X*3;
+ w += UI_UNIT_X*2;
}
*r_w= w;
*r_h= h;
}
-void uiItemFullR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int index, int value, int flag)
+void uiItemFullR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int index, int value, int expand, int slider, int toggle)
{
uiBlock *block= layout->root->block;
uiBut *but;
PropertyType type;
char namestr[UI_MAX_NAME_STR];
- int len, w, h, slider, toggle, expand;
+ int len, w, h;
if(!ptr->data || !prop)
return;
@@ -847,7 +789,7 @@ void uiItemFullR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, Proper
/* retrieve info */
type= RNA_property_type(prop);
- len= RNA_property_array_length(ptr, prop);
+ len= RNA_property_array_length(prop);
/* set name and icon */
if(!name)
@@ -869,12 +811,8 @@ void uiItemFullR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, Proper
icon= (RNA_property_enum_get(ptr, prop) == value)? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT;
}
- slider= (flag & UI_ITEM_R_SLIDER);
- toggle= (flag & UI_ITEM_R_TOGGLE);
- expand= (flag & UI_ITEM_R_EXPAND);
-
/* get size */
- ui_item_rna_size(layout, name, icon, ptr, prop, index, &w, &h);
+ ui_item_rna_size(layout, name, icon, prop, index, &w, &h);
/* array property */
if(index == RNA_NO_INDEX && len > 0)
@@ -910,7 +848,7 @@ void uiItemFullR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, Proper
}
}
-void uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, char *propname, int flag)
+void uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, char *propname, int expand, int slider, int toggle)
{
PropertyRNA *prop;
@@ -925,7 +863,7 @@ void uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, char *prop
return;
}
- uiItemFullR(layout, name, icon, ptr, prop, RNA_NO_INDEX, 0, flag);
+ uiItemFullR(layout, name, icon, ptr, prop, RNA_NO_INDEX, 0, expand, slider, toggle);
}
void uiItemEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, int value)
@@ -943,7 +881,7 @@ void uiItemEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr,
return;
}
- uiItemFullR(layout, name, icon, ptr, prop, RNA_ENUM_VALUE, value, 0);
+ uiItemFullR(layout, name, icon, ptr, prop, RNA_ENUM_VALUE, value, 0, 0, 0);
}
void uiItemEnumR_string(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, char *value)
@@ -974,7 +912,7 @@ void uiItemEnumR_string(uiLayout *layout, char *name, int icon, struct PointerRN
for(a=0; item[a].identifier; a++) {
if(item[a].value == ivalue) {
- uiItemFullR(layout, (char*)item[a].name, item[a].icon, ptr, prop, RNA_ENUM_VALUE, ivalue, 0);
+ uiItemFullR(layout, (char*)item[a].name, item[a].icon, ptr, prop, RNA_ENUM_VALUE, ivalue, 0, 0, 0);
break;
}
}
@@ -986,8 +924,6 @@ void uiItemEnumR_string(uiLayout *layout, char *name, int icon, struct PointerRN
void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, char *propname)
{
PropertyRNA *prop;
- uiBlock *block= layout->root->block;
- uiBut *bt;
prop= RNA_struct_find_property(ptr, propname);
@@ -999,31 +935,14 @@ void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, char *propname)
if(RNA_property_type(prop) == PROP_ENUM) {
EnumPropertyItem *item;
int totitem, i, free;
- uiLayout *split= uiLayoutSplit(layout, 0);
- uiLayout *column= uiLayoutColumn(split, 0);
-
- RNA_property_enum_items(block->evil_C, ptr, prop, &item, &totitem, &free);
- for(i=0; i<totitem; i++) {
- if(item[i].identifier[0]) {
- uiItemEnumR(column, (char*)item[i].name, 0, ptr, propname, item[i].value);
- }
- else {
- if(item[i].name) {
- if(i != 0) {
- column= uiLayoutColumn(split, 0);
- /* inconsistent, but menus with labels do not look good flipped */
- block->flag |= UI_BLOCK_NO_FLIP;
- }
+ RNA_property_enum_items(layout->root->block->evil_C, ptr, prop, &item, &totitem, &free);
- uiItemL(column, (char*)item[i].name, 0);
- bt= block->buttons.last;
- bt->flag= UI_TEXT_LEFT;
- }
- else
- uiItemS(column);
- }
- }
+ for(i=0; i<totitem; i++)
+ if(item[i].identifier[0])
+ uiItemEnumR(layout, (char*)item[i].name, 0, ptr, propname, item[i].value);
+ else
+ uiItemS(layout);
if(free)
MEM_freeN(item);
@@ -1160,7 +1079,7 @@ void uiItemPointerR(uiLayout *layout, char *name, int icon, struct PointerRNA *p
/* create button */
block= uiLayoutGetBlock(layout);
- ui_item_rna_size(layout, name, icon, ptr, prop, 0, &w, &h);
+ ui_item_rna_size(layout, name, icon, prop, 0, &w, &h);
but= ui_item_with_label(layout, block, name, icon, ptr, prop, 0, 0, 0, w, h);
ui_but_add_search(but, ptr, prop, searchptr, searchprop);
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 1d911fef418..bf921715524 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -38,7 +38,6 @@
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
#include "BLI_dynstr.h"
-#include "BLI_ghash.h"
#include "BKE_context.h"
#include "BKE_icons.h"
@@ -76,14 +75,13 @@
/*********************** Menu Data Parsing ********************* */
-typedef struct MenuEntry {
+typedef struct {
char *str;
int retval;
int icon;
- int sepr;
} MenuEntry;
-typedef struct MenuData {
+typedef struct {
char *instr;
char *title;
int titleicon;
@@ -113,7 +111,7 @@ static void menudata_set_title(MenuData *md, char *title, int titleicon)
md->titleicon= titleicon;
}
-static void menudata_add_item(MenuData *md, char *str, int retval, int icon, int sepr)
+static void menudata_add_item(MenuData *md, char *str, int retval, int icon)
{
if (md->nitems==md->itemssize) {
int nsize= md->itemssize?(md->itemssize<<1):1;
@@ -131,7 +129,6 @@ static void menudata_add_item(MenuData *md, char *str, int retval, int icon, int
md->items[md->nitems].str= str;
md->items[md->nitems].retval= retval;
md->items[md->nitems].icon= icon;
- md->items[md->nitems].sepr= sepr;
md->nitems++;
}
@@ -145,13 +142,12 @@ void menudata_free(MenuData *md)
/**
* Parse menu description strings, string is of the
- * form "[sss%t|]{(sss[%xNN]|), (%l|), (sss%l|)}", ssss%t indicates the
+ * form "[sss%t|]{(sss[%xNN]|), (%l|)}", ssss%t indicates the
* menu title, sss or sss%xNN indicates an option,
* if %xNN is given then NN is the return value if
* that option is selected otherwise the return value
* is the index of the option (starting with 1). %l
- * indicates a seperator, sss%l indicates a label and
- * new column.
+ * indicates a seperator.
*
* @param str String to be parsed.
* @retval new menudata structure, free with menudata_free()
@@ -161,7 +157,7 @@ MenuData *decompose_menu_string(char *str)
char *instr= BLI_strdup(str);
MenuData *md= menudata_new(instr);
char *nitem= NULL, *s= instr;
- int nicon=0, nretval= 1, nitem_is_title= 0, nitem_is_sepr= 0;
+ int nicon=0, nretval= 1, nitem_is_title= 0;
while (1) {
char c= *s;
@@ -178,10 +174,7 @@ MenuData *decompose_menu_string(char *str)
*s= '\0';
s++;
} else if (s[1]=='l') {
- nitem_is_sepr= 1;
- if(!nitem) nitem= "";
-
- *s= '\0';
+ nitem= "%l";
s++;
} else if (s[1]=='i') {
nicon= atoi(s+2);
@@ -193,18 +186,15 @@ MenuData *decompose_menu_string(char *str)
if (nitem) {
*s= '\0';
- if(nitem_is_title) {
+ if (nitem_is_title) {
menudata_set_title(md, nitem, nicon);
nitem_is_title= 0;
- }
- else if(nitem_is_sepr) {
+ } else {
/* prevent separator to get a value */
- menudata_add_item(md, nitem, -1, nicon, 1);
- nretval= md->nitems+1;
- nitem_is_sepr= 0;
- }
- else {
- menudata_add_item(md, nitem, nretval, nicon, 0);
+ if(nitem[0]=='%' && nitem[1]=='l')
+ menudata_add_item(md, nitem, -1, nicon);
+ else
+ menudata_add_item(md, nitem, nretval, nicon);
nretval= md->nitems+1;
}
@@ -837,8 +827,6 @@ static void ui_searchbox_region_free(ARegion *ar)
ar->regiondata= NULL;
}
-static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but, uiBlock *block);
-
ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
{
uiStyle *style= U.uistyles.first; // XXX pass on as arg
@@ -859,7 +847,7 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
/* create searchbox data */
data= MEM_callocN(sizeof(uiSearchboxData), "uiSearchboxData");
-
+
/* set font, get bb */
data->fstyle= style->widget; /* copy struct */
data->fstyle.align= UI_STYLE_TEXT_CENTER;
@@ -941,14 +929,10 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
}
}
if(y1 < 0) {
- int newy1;
- UI_view2d_to_region_no_clip(&butregion->v2d, 0, but->y2 + ofsy, 0, &newy1);
- newy1 += butregion->winrct.ymin;
-
- y2= y2-y1 + newy1;
- y1= newy1;
+ y1 += 36;
+ y2 += 36;
}
-
+
/* widget rect, in region coords */
data->bbox.xmin= MENU_SHADOW_SIDE;
data->bbox.xmax= x2-x1 + MENU_SHADOW_SIDE;
@@ -1326,21 +1310,24 @@ void ui_popup_block_free(bContext *C, uiPopupBlockHandle *handle)
/***************************** Menu Button ***************************/
-static void ui_block_func_MENUSTR(bContext *C, uiLayout *layout, void *arg_str)
+uiBlock *ui_block_func_MENU(bContext *C, uiPopupBlockHandle *handle, void *arg_but)
{
- uiBlock *block= uiLayoutGetBlock(layout);
- uiPopupBlockHandle *handle= block->handle;
- uiLayout *split, *column=NULL;
+ uiBut *but= arg_but;
+ uiBlock *block;
uiBut *bt;
MenuData *md;
- MenuEntry *entry;
- char *instr= arg_str;
- int columns, rows, a, b;
+ ListBase lb;
+ float aspect;
+ int width, height, boxh, columns, rows, startx, starty, x1, y1, xmax, a;
+
+ /* create the block */
+ block= uiBeginBlock(C, handle->region, "menu", UI_EMBOSSP);
+ block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT;
/* compute menu data */
- md= decompose_menu_string(instr);
+ md= decompose_menu_string(but->str);
- /* columns and row estimation */
+ /* columns and row calculation */
columns= (md->nitems+20)/20;
if(columns<1)
columns= 1;
@@ -1352,114 +1339,180 @@ static void ui_block_func_MENUSTR(bContext *C, uiLayout *layout, void *arg_str)
rows= 1;
while(rows*columns<md->nitems)
rows++;
+
+ /* prevent scaling up of pupmenu */
+ aspect= but->block->aspect;
+ if(aspect < 1.0f)
+ aspect = 1.0f;
+
+ /* size and location */
+ if(md->title)
+ width= 1.5*aspect*strlen(md->title)+UI_GetStringWidth(md->title);
+ else
+ width= 0;
- /* create title */
- if(md->title) {
- if(md->titleicon) {
- uiItemL(layout, md->title, md->titleicon);
- }
- else {
- uiItemL(layout, md->title, 0);
- bt= block->buttons.last;
- bt->flag= UI_TEXT_LEFT;
- }
+ for(a=0; a<md->nitems; a++) {
+ xmax= aspect*UI_GetStringWidth(md->items[a].str);
+ if(md->items[a].icon)
+ xmax += 20*aspect;
+ if(xmax>width)
+ width= xmax;
}
- /* inconsistent, but menus with labels do not look good flipped */
- for(a=0, b=0; a<md->nitems; a++, b++) {
- entry= &md->items[a];
+ width+= 10;
+ if(width < (but->x2 - but->x1))
+ width = (but->x2 - but->x1);
+ if(width<50)
+ width=50;
+
+ boxh= MENU_BUTTON_HEIGHT;
+
+ height= rows*boxh;
+ if(md->title)
+ height+= boxh;
- if(entry->sepr && entry->str[0])
- block->flag |= UI_BLOCK_NO_FLIP;
- }
+ /* here we go! */
+ startx= but->x1;
+ starty= but->y1;
+
+ if(md->title) {
+ uiBut *bt;
- /* create items */
- split= uiLayoutSplit(layout, 0);
+ if (md->titleicon) {
+ bt= uiDefIconTextBut(block, LABEL, 0, md->titleicon, md->title, startx, (short)(starty+rows*boxh), (short)width, (short)boxh, NULL, 0.0, 0.0, 0, 0, "");
+ } else {
+ bt= uiDefBut(block, LABEL, 0, md->title, startx, (short)(starty+rows*boxh), (short)width, (short)boxh, NULL, 0.0, 0.0, 0, 0, "");
+ bt->flag= UI_TEXT_LEFT;
+ }
+ }
- for(a=0, b=0; a<md->nitems; a++, b++) {
- if(block->flag & UI_BLOCK_NO_FLIP)
- entry= &md->items[a];
- else
- entry= &md->items[md->nitems-a-1];
+ for(a=0; a<md->nitems; a++) {
- /* new column on N rows or on separation label */
- if((b % rows == 0) || (entry->sepr && entry->str[0])) {
- column= uiLayoutColumn(split, 0);
- b= 0;
- }
+ x1= startx + width*((int)(md->nitems-a-1)/rows);
+ y1= starty - boxh*(rows - ((md->nitems - a - 1)%rows)) + (rows*boxh);
- if(entry->sepr) {
- uiItemL(column, entry->str, entry->icon);
- bt= block->buttons.last;
- bt->flag= UI_TEXT_LEFT;
+ if (strcmp(md->items[md->nitems-a-1].str, "%l")==0) {
+ bt= uiDefBut(block, SEPR, B_NOP, "", x1, y1,(short)(width-(rows>1)), (short)(boxh-1), NULL, 0.0, 0.0, 0, 0, "");
}
- else if(entry->icon) {
- uiDefIconTextButF(block, BUTM|FLO, B_NOP, entry->icon, entry->str, 0, 0,
- UI_UNIT_X*5, UI_UNIT_Y, &handle->retvalue, (float) entry->retval, 0.0, 0, 0, "");
+ else if(md->items[md->nitems-a-1].icon) {
+ bt= uiDefIconTextButF(block, BUTM|FLO, B_NOP, md->items[md->nitems-a-1].icon ,md->items[md->nitems-a-1].str, x1, y1,(short)(width-(rows>1)), (short)(boxh-1), &handle->retvalue, (float) md->items[md->nitems-a-1].retval, 0.0, 0, 0, "");
}
else {
- uiDefButF(block, BUTM|FLO, B_NOP, entry->str, 0, 0,
- UI_UNIT_X*5, UI_UNIT_X, &handle->retvalue, (float) entry->retval, 0.0, 0, 0, "");
+ bt= uiDefButF(block, BUTM|FLO, B_NOP, md->items[md->nitems-a-1].str, x1, y1,(short)(width-(rows>1)), (short)(boxh-1), &handle->retvalue, (float) md->items[md->nitems-a-1].retval, 0.0, 0, 0, "");
}
}
menudata_free(md);
+
+ /* the code up here has flipped locations, because of change of preferred order */
+ /* thats why we have to switch list order too, to make arrowkeys work */
+
+ lb.first= lb.last= NULL;
+ bt= block->buttons.first;
+ while(bt) {
+ uiBut *next= bt->next;
+ BLI_remlink(&block->buttons, bt);
+ BLI_addhead(&lb, bt);
+ bt= next;
+ }
+ block->buttons= lb;
+
+ block->direction= UI_TOP;
+ uiEndBlock(C, block);
+
+ return block;
}
-void ui_block_func_ICONROW(bContext *C, uiLayout *layout, void *arg_but)
+uiBlock *ui_block_func_ICONROW(bContext *C, uiPopupBlockHandle *handle, void *arg_but)
{
- uiBlock *block= uiLayoutGetBlock(layout);
- uiPopupBlockHandle *handle= block->handle;
uiBut *but= arg_but;
+ uiBlock *block;
int a;
- for(a=(int)but->hardmin; a<=(int)but->hardmax; a++)
- uiDefIconButF(block, BUTM|FLO, B_NOP, but->icon+(a-but->hardmin), 0, 0, UI_UNIT_X*5, UI_UNIT_Y,
- &handle->retvalue, (float)a, 0.0, 0, 0, "");
+ block= uiBeginBlock(C, handle->region, "menu", UI_EMBOSSP);
+ block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT;
+
+ for(a=(int)but->hardmin; a<=(int)but->hardmax; a++) {
+ uiDefIconButF(block, BUTM|FLO, B_NOP, but->icon+(a-but->hardmin), 0, (short)(18*a), (short)(but->x2-but->x1-4), 18, &handle->retvalue, (float)a, 0.0, 0, 0, "");
+ }
+
+ block->direction= UI_TOP;
+
+ uiEndBlock(C, block);
+
+ return block;
}
-void ui_block_func_ICONTEXTROW(bContext *C, uiLayout *layout, void *arg_but)
+uiBlock *ui_block_func_ICONTEXTROW(bContext *C, uiPopupBlockHandle *handle, void *arg_but)
{
- uiBlock *block= uiLayoutGetBlock(layout);
- uiPopupBlockHandle *handle= block->handle;
- uiBut *but= arg_but, *bt;
+ uiBut *but= arg_but;
+ uiBlock *block;
MenuData *md;
- MenuEntry *entry;
- int a;
+ int width, xmax, ypos, a;
+
+ block= uiBeginBlock(C, handle->region, "menu", UI_EMBOSSP);
+ block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT;
md= decompose_menu_string(but->str);
- /* title */
- if(md->title) {
- bt= uiDefBut(block, LABEL, 0, md->title, 0, 0, UI_UNIT_X*5, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
- bt->flag= UI_TEXT_LEFT;
+ /* size and location */
+ /* expand menu width to fit labels */
+ if(md->title)
+ width= 2*strlen(md->title)+UI_GetStringWidth(md->title);
+ else
+ width= 0;
+
+ for(a=0; a<md->nitems; a++) {
+ xmax= UI_GetStringWidth(md->items[a].str);
+ if(xmax>width) width= xmax;
}
+ width+= 30;
+ if (width<50) width=50;
+
+ ypos = 1;
+
/* loop through the menu options and draw them out with icons & text labels */
for(a=0; a<md->nitems; a++) {
- entry= &md->items[md->nitems-a-1];
- if(entry->sepr)
- uiItemS(layout);
- else
- uiDefIconTextButF(block, BUTM|FLO, B_NOP, (short)((but->icon)+(entry->retval-but->hardmin)), entry->str,
- 0, 0, UI_UNIT_X*5, UI_UNIT_Y, &handle->retvalue, (float) entry->retval, 0.0, 0, 0, "");
+ /* add a space if there's a separator (%l) */
+ if (strcmp(md->items[a].str, "%l")==0) {
+ ypos +=3;
+ }
+ else {
+ uiDefIconTextButF(block, BUTM|FLO, B_NOP, (short)((but->icon)+(md->items[a].retval-but->hardmin)), md->items[a].str, 0, ypos,(short)width, 19, &handle->retvalue, (float) md->items[a].retval, 0.0, 0, 0, "");
+ ypos += 20;
+ }
}
+
+ if(md->title) {
+ uiBut *bt;
+ bt= uiDefBut(block, LABEL, 0, md->title, 0, ypos, (short)width, 19, NULL, 0.0, 0.0, 0, 0, "");
+ bt->flag= UI_TEXT_LEFT;
+ }
+
menudata_free(md);
+
+ block->direction= UI_TOP;
+
+ uiBoundsBlock(block, 3);
+ uiEndBlock(C, block);
+
+ return block;
}
-#if 0
static void ui_warp_pointer(short x, short y)
{
/* XXX 2.50 which function to use for this? */
+#if 0
/* OSX has very poor mousewarp support, it sends events;
this causes a menu being pressed immediately ... */
#ifndef __APPLE__
warp_pointer(x, y);
#endif
-}
#endif
+}
/********************* Color Button ****************/
@@ -2105,115 +2158,406 @@ void uiBlockColorbandButtons(uiBlock *block, ColorBand *coba, rctf *butr, int ev
}
-/************************ Popup Menu Memory ****************************/
+/* ******************** PUPmenu ****************** */
+
+static int pupmenu_set= 0;
-static int ui_popup_menu_hash(char *str)
+void uiPupMenuSetActive(int val)
{
- return BLI_ghashutil_strhash(str);
+ pupmenu_set= val;
}
-/* but == NULL read, otherwise set */
-uiBut *ui_popup_menu_memory(uiBlock *block, uiBut *but)
+/* value== -1 read, otherwise set */
+static int pupmenu_memory(char *str, int value)
{
static char mem[256], first=1;
- int hash= block->puphash;
+ int val=0, nr=0;
if(first) {
- /* init */
- memset(mem, -1, sizeof(mem));
+ memset(mem, 0, 256);
first= 0;
}
-
- if(but) {
- /* set */
- mem[hash & 255 ]= BLI_findindex(&block->buttons, but);
- return NULL;
- }
- else {
- /* get */
- return BLI_findlink(&block->buttons, mem[hash & 255]);
+ while(str[nr]) {
+ val+= str[nr];
+ nr++;
}
+
+ if(value >= 0) mem[ val & 255 ]= value;
+ else return mem[ val & 255 ];
+
+ return 0;
}
-/******************** Popup Menu with callback or string **********************/
+#define PUP_LABELH 6
-struct uiPopupMenu {
+typedef struct uiPupMenuInfo {
+ char *instr;
+ int mx, my;
+ int startx, starty;
+ int maxrow;
+} uiPupMenuInfo;
+
+uiBlock *ui_block_func_PUPMENU(bContext *C, uiPopupBlockHandle *handle, void *arg_info)
+{
uiBlock *block;
- uiLayout *layout;
- uiBut *but;
+ uiPupMenuInfo *info;
+ int columns, rows, mousemove[2]= {0, 0}, mousewarp= 0;
+ int width, height, xmax, ymax, maxrow;
+ int a, startx, starty, endx, endy, x1, y1;
+ int lastselected;
+ MenuData *md;
- int mx, my, popup, slideout;
- int startx, starty, maxrow;
+ info= arg_info;
+ maxrow= info->maxrow;
+ height= 0;
- uiMenuCreateFunc menu_func;
- void *menu_arg;
-};
+ /* block stuff first, need to know the font */
+ block= uiBeginBlock(C, handle->region, "menu", UI_EMBOSSP);
+ uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1|UI_BLOCK_NUMSELECT);
+ block->direction= UI_DOWN;
+
+ md= decompose_menu_string(info->instr);
-static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, void *arg_pup)
-{
- uiBlock *block;
- uiBut *bt;
- ScrArea *sa;
- ARegion *ar;
- uiPopupMenu *pup= arg_pup;
- int offset, direction, minwidth, flip;
+ rows= md->nitems;
+ if(rows<1)
+ rows= 1;
+
+ columns= 1;
+
+ /* size and location, title slightly bigger for bold */
+ if(md->title) {
+ width= 2*strlen(md->title)+UI_GetStringWidth(md->title);
+ width /= columns;
+ }
+ else width= 0;
+
+ for(a=0; a<md->nitems; a++) {
+ xmax= UI_GetStringWidth(md->items[a].str);
+ if(xmax>width) width= xmax;
+
+ if(strcmp(md->items[a].str, "%l")==0) height+= PUP_LABELH;
+ else height+= MENU_BUTTON_HEIGHT;
+ }
+
+ width+= 10;
+ if (width<50) width=50;
+
+ wm_window_get_size(CTX_wm_window(C), &xmax, &ymax);
+
+ /* set first item */
+ lastselected= 0;
+ if(pupmenu_set) {
+ lastselected= pupmenu_set-1;
+ pupmenu_set= 0;
+ }
+ else if(md->nitems>1) {
+ lastselected= pupmenu_memory(info->instr, -1);
+ }
+
+ startx= info->mx-(0.8*(width));
+ starty= info->my-height+MENU_BUTTON_HEIGHT/2;
+ if(lastselected>=0 && lastselected<md->nitems) {
+ for(a=0; a<md->nitems; a++) {
+ if(a==lastselected) break;
+ if( strcmp(md->items[a].str, "%l")==0) starty+= PUP_LABELH;
+ else starty+=MENU_BUTTON_HEIGHT;
+ }
+
+ //starty= info->my-height+MENU_BUTTON_HEIGHT/2+lastselected*MENU_BUTTON_HEIGHT;
+ }
+
+ if(startx<10) {
+ startx= 10;
+ }
+ if(starty<10) {
+ mousemove[1]= 10-starty;
+ starty= 10;
+ }
+
+ endx= startx+width*columns;
+ endy= starty+height;
+
+ if(endx>xmax) {
+ endx= xmax-10;
+ startx= endx-width*columns;
+ }
+ if(endy>ymax-20) {
+ mousemove[1]= ymax-endy-20;
+ endy= ymax-20;
+ starty= endy-height;
+ }
- if(pup->menu_func) {
- pup->block->handle= handle;
- pup->menu_func(C, pup->layout, pup->menu_arg);
- pup->block->handle= NULL;
+ if(mousemove[0] || mousemove[1]) {
+ ui_warp_pointer(info->mx+mousemove[0], info->my+mousemove[1]);
+ mousemove[0]= info->mx;
+ mousemove[1]= info->my;
+ mousewarp= 1;
}
- if(pup->but) {
- /* minimum width to enforece */
- minwidth= pup->but->x2 - pup->but->x1;
+ /* here we go! */
+ if(md->title) {
+ uiBut *bt;
+ char titlestr[256];
- if(pup->but->type == PULLDOWN || pup->but->menu_create_func) {
- direction= UI_DOWN;
- flip= 1;
+ if(md->titleicon) {
+ width+= 20;
+ sprintf(titlestr, " %s", md->title);
+ uiDefIconTextBut(block, LABEL, 0, md->titleicon, titlestr, startx, (short)(starty+height), width, MENU_BUTTON_HEIGHT, NULL, 0.0, 0.0, 0, 0, "");
}
else {
- direction= UI_TOP;
- flip= 0;
+ bt= uiDefBut(block, LABEL, 0, md->title, startx, (short)(starty+height), columns*width, MENU_BUTTON_HEIGHT, NULL, 0.0, 0.0, 0, 0, "");
+ bt->flag= UI_TEXT_LEFT;
}
+
+ //uiDefBut(block, SEPR, 0, "", startx, (short)(starty+height)-MENU_SEPR_HEIGHT, width, MENU_SEPR_HEIGHT, NULL, 0.0, 0.0, 0, 0, "");
}
- else {
- minwidth= 50;
- direction= UI_DOWN;
- flip= 1;
+
+ x1= startx + width*((int)a/rows);
+ y1= starty + height - MENU_BUTTON_HEIGHT; // - MENU_SEPR_HEIGHT;
+
+ for(a=0; a<md->nitems; a++) {
+ char *name= md->items[a].str;
+ int icon = md->items[a].icon;
+
+ if(strcmp(name, "%l")==0) {
+ uiDefBut(block, SEPR, B_NOP, "", x1, y1, width, PUP_LABELH, NULL, 0, 0.0, 0, 0, "");
+ y1 -= PUP_LABELH;
+ }
+ else if (icon) {
+ uiDefIconButF(block, BUTM, B_NOP, icon, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, &handle->retvalue, (float) md->items[a].retval, 0.0, 0, 0, "");
+ y1 -= MENU_BUTTON_HEIGHT;
+ }
+ else {
+ uiDefButF(block, BUTM, B_NOP, name, x1, y1, width, MENU_BUTTON_HEIGHT-1, &handle->retvalue, (float) md->items[a].retval, 0.0, 0, 0, "");
+ y1 -= MENU_BUTTON_HEIGHT;
+ }
}
+
+ uiBoundsBlock(block, 1);
+ uiEndBlock(C, block);
- block= pup->block;
+ menudata_free(md);
+
+ /* XXX 2.5 need to store last selected */
+#if 0
+ /* calculate last selected */
+ if(event & ui_return_ok) {
+ lastselected= 0;
+ for(a=0; a<md->nitems; a++) {
+ if(val==md->items[a].retval) lastselected= a;
+ }
+
+ pupmenu_memory(info->instr, lastselected);
+ }
+#endif
- /* in some cases we create the block before the region,
- so we set it delayed here if necessary */
- if(BLI_findindex(&handle->region->uiblocks, block) == -1)
- uiBlockSetRegion(block, handle->region);
+ /* XXX 2.5 need to warp back */
+#if 0
+ if(mousemove[1] && (event & ui_return_out)==0)
+ ui_warp_pointer(mousemove[0], mousemove[1]);
+ return val;
+#endif
- block->direction= direction;
+ return block;
+}
- uiBlockLayoutResolve(C, block, NULL, NULL);
+uiBlock *ui_block_func_PUPMENUCOL(bContext *C, uiPopupBlockHandle *handle, void *arg_info)
+{
+ uiBlock *block;
+ uiPupMenuInfo *info;
+ int columns, rows, mousemove[2]= {0, 0}, mousewarp;
+ int width, height, xmax, ymax, maxrow;
+ int a, startx, starty, endx, endy, x1, y1;
+ float fvalue;
+ MenuData *md;
- if(pup->popup) {
- uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT|UI_BLOCK_RET_1);
- uiBlockSetDirection(block, direction);
+ info= arg_info;
+ maxrow= info->maxrow;
+ height= 0;
- /* offset the mouse position, possibly based on earlier selection */
- offset= 1.5*MENU_BUTTON_HEIGHT;
+ /* block stuff first, need to know the font */
+ block= uiBeginBlock(C, handle->region, "menu", UI_EMBOSSP);
+ uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1|UI_BLOCK_NUMSELECT);
+ block->direction= UI_DOWN;
+
+ md= decompose_menu_string(info->instr);
- if(block->flag & UI_BLOCK_POPUP_MEMORY) {
- bt= ui_popup_menu_memory(block, NULL);
+ /* columns and row calculation */
+ columns= (md->nitems+maxrow)/maxrow;
+ if (columns<1) columns= 1;
+
+ if(columns > 8) {
+ maxrow += 5;
+ columns= (md->nitems+maxrow)/maxrow;
+ }
+
+ rows= (int) md->nitems/columns;
+ if (rows<1) rows= 1;
+
+ while (rows*columns<(md->nitems+columns) ) rows++;
- if(bt)
- offset= -bt->y1 - 0.5f*MENU_BUTTON_HEIGHT;
+ /* size and location, title slightly bigger for bold */
+ if(md->title) {
+ width= 2*strlen(md->title)+UI_GetStringWidth(md->title);
+ width /= columns;
+ }
+ else width= 0;
+
+ for(a=0; a<md->nitems; a++) {
+ xmax= UI_GetStringWidth(md->items[a].str);
+ if(xmax>width) width= xmax;
+ }
+
+ width+= 10;
+ if (width<50) width=50;
+
+ height= rows*MENU_BUTTON_HEIGHT;
+ if (md->title) height+= MENU_BUTTON_HEIGHT;
+
+ wm_window_get_size(CTX_wm_window(C), &xmax, &ymax);
+
+ /* find active item */
+ fvalue= handle->retvalue;
+ for(a=0; a<md->nitems; a++) {
+ if( md->items[a].retval== (int)fvalue ) break;
+ }
+
+ /* no active item? */
+ if(a==md->nitems) {
+ if(md->title) a= -1;
+ else a= 0;
+ }
+
+ if(a>0)
+ startx = info->mx-width/2 - ((int)(a)/rows)*width;
+ else
+ startx= info->mx-width/2;
+ starty = info->my-height + MENU_BUTTON_HEIGHT/2 + ((a)%rows)*MENU_BUTTON_HEIGHT;
+
+ if (md->title) starty+= MENU_BUTTON_HEIGHT;
+
+ if(startx<10) {
+ mousemove[0]= 10-startx;
+ startx= 10;
+ }
+ if(starty<10) {
+ mousemove[1]= 10-starty;
+ starty= 10;
+ }
+
+ endx= startx+width*columns;
+ endy= starty+height;
+
+ if(endx>xmax) {
+ mousemove[0]= xmax-endx-10;
+ endx= xmax-10;
+ startx= endx-width*columns;
+ }
+ if(endy>ymax) {
+ mousemove[1]= ymax-endy-10;
+ endy= ymax-10;
+ starty= endy-height;
+ }
+
+ if(mousemove[0] || mousemove[1]) {
+ ui_warp_pointer(info->mx+mousemove[0], info->my+mousemove[1]);
+ mousemove[0]= info->mx;
+ mousemove[1]= info->my;
+ mousewarp= 1;
+ }
+
+ /* here we go! */
+ if(md->title) {
+ uiBut *bt;
+
+ if(md->titleicon) {
}
+ else {
+ bt= uiDefBut(block, LABEL, 0, md->title, startx, (short)(starty+rows*MENU_BUTTON_HEIGHT), columns*width, MENU_BUTTON_HEIGHT, NULL, 0.0, 0.0, 0, 0, "");
+ bt->flag= UI_TEXT_LEFT;
+ }
+ }
+
+ for(a=0; a<md->nitems; a++) {
+ char *name= md->items[a].str;
+ int icon = md->items[a].icon;
- block->minbounds= minwidth;
- uiMenuPopupBoundsBlock(block, 1, 20, offset);
+ x1= startx + width*((int)a/rows);
+ y1= starty - MENU_BUTTON_HEIGHT*(a%rows) + (rows-1)*MENU_BUTTON_HEIGHT;
+
+ if(strcmp(name, "%l")==0) {
+ uiDefBut(block, SEPR, B_NOP, "", x1, y1, width, PUP_LABELH, NULL, 0, 0.0, 0, 0, "");
+ y1 -= PUP_LABELH;
+ }
+ else if (icon) {
+ uiDefIconButF(block, BUTM, B_NOP, icon, x1, y1, width+16, MENU_BUTTON_HEIGHT-1, &handle->retvalue, (float) md->items[a].retval, 0.0, 0, 0, "");
+ y1 -= MENU_BUTTON_HEIGHT;
+ }
+ else {
+ uiDefButF(block, BUTM, B_NOP, name, x1, y1, width, MENU_BUTTON_HEIGHT-1, &handle->retvalue, (float) md->items[a].retval, 0.0, 0, 0, "");
+ y1 -= MENU_BUTTON_HEIGHT;
+ }
+ }
+
+ uiBoundsBlock(block, 1);
+ uiEndBlock(C, block);
+
+ menudata_free(md);
+
+ /* XXX 2.5 need to warp back */
+#if 0
+ if((event & UI_RETURN_OUT)==0)
+ ui_warp_pointer(mousemove[0], mousemove[1]);
+#endif
+
+ return block;
+}
+
+/************************** Menu Definitions ***************************/
+
+/* prototype */
+static uiBlock *ui_block_func_MENU_ITEM(bContext *C, uiPopupBlockHandle *handle, void *arg_info);
+
+struct uiPopupMenu {
+ uiBlock *block;
+ uiLayout *layout;
+};
+
+typedef struct uiMenuInfo {
+ uiPopupMenu *pup;
+ int mx, my, popup, slideout;
+ int startx, starty;
+} uiMenuInfo;
+
+/************************ Menu Definitions to uiBlocks ***********************/
+
+static uiBlock *ui_block_func_MENU_ITEM(bContext *C, uiPopupBlockHandle *handle, void *arg_info)
+{
+ uiBlock *block;
+ uiMenuInfo *info= arg_info;
+ uiPopupMenu *pup;
+ ScrArea *sa;
+ ARegion *ar;
+
+ pup= info->pup;
+ block= pup->block;
+
+ /* block stuff first, need to know the font */
+ uiBlockSetRegion(block, handle->region);
+ block->direction= UI_DOWN;
+
+ uiBlockLayoutResolve(C, block, NULL, NULL);
+
+ if(info->popup) {
+ uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT|UI_BLOCK_RET_1);
+ uiBlockSetDirection(block, UI_DOWN);
+
+ /* here we set an offset for the mouse position */
+ uiMenuPopupBoundsBlock(block, 1, 0, 1.5*MENU_BUTTON_HEIGHT);
}
else {
/* for a header menu we set the direction automatic */
- if(!pup->slideout && flip) {
+ if(!info->slideout) {
sa= CTX_wm_area(C);
ar= CTX_wm_region(C);
@@ -2225,77 +2569,59 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
}
}
- block->minbounds= minwidth;
- uiTextBoundsBlock(block, 40);
+ uiTextBoundsBlock(block, 50);
}
/* if menu slides out of other menu, override direction */
- if(pup->slideout)
+ if(info->slideout)
uiBlockSetDirection(block, UI_RIGHT);
uiEndBlock(C, block);
-
- return pup->block;
+
+ return block;
}
-uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg, char *str)
+uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg)
{
- wmWindow *window= CTX_wm_window(C);
uiStyle *style= U.uistyles.first;
uiPopupBlockHandle *handle;
uiPopupMenu *pup;
+ uiMenuInfo info;
pup= MEM_callocN(sizeof(uiPopupMenu), "menu dummy");
- pup->block= uiBeginBlock(C, NULL, "ui_button_menu_create", UI_EMBOSSP);
+ pup->block= uiBeginBlock(C, NULL, "ui_popup_menu_create", UI_EMBOSSP);
pup->layout= uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style);
- pup->slideout= (but && (but->block->flag & UI_BLOCK_LOOP));
- pup->but= but;
uiLayoutSetOperatorContext(pup->layout, WM_OP_INVOKE_REGION_WIN);
- if(!but) {
- /* no button to start from, means we are a popup */
- pup->mx= window->eventstate->x;
- pup->my= window->eventstate->y;
- pup->popup= 1;
- }
+ /* create in advance so we can let buttons point to retval already */
+ pup->block->handle= MEM_callocN(sizeof(uiPopupBlockHandle), "uiPopupBlockHandle");
- if(str) {
- /* menu is created from a string */
- pup->menu_func= ui_block_func_MENUSTR;
- pup->menu_arg= str;
- }
- else {
- /* menu is created from a callback */
- pup->menu_func= menu_func;
- pup->menu_arg= arg;
- }
+ menu_func(C, pup->layout, arg);
- handle= ui_popup_block_create(C, butregion, but, NULL, ui_block_func_POPUP, pup);
-
- if(!but) {
- handle->popup= 1;
-
- UI_add_popup_handlers(C, &window->handlers, handle);
- WM_event_add_mousemove(C);
- }
+ memset(&info, 0, sizeof(info));
+ info.pup= pup;
+ info.slideout= (but && (but->block->flag & UI_BLOCK_LOOP));
+
+ handle= ui_popup_block_create(C, butregion, but, NULL, ui_block_func_MENU_ITEM, &info);
MEM_freeN(pup);
return handle;
}
-/******************** Popup Menu API with begin and end ***********************/
+/*************************** Menu Creating API **************************/
+
+
+/*************************** Popup Menu API **************************/
/* only return handler, and set optional title */
uiPopupMenu *uiPupMenuBegin(bContext *C, const char *title, int icon)
{
uiStyle *style= U.uistyles.first;
- uiPopupMenu *pup= MEM_callocN(sizeof(uiPopupMenu), "popup menu");
+ uiPopupMenu *pup= MEM_callocN(sizeof(uiPopupMenu), "menu start");
uiBut *but;
pup->block= uiBeginBlock(C, NULL, "uiPupMenuBegin", UI_EMBOSSP);
- pup->block->flag |= UI_BLOCK_POPUP_MEMORY;
- pup->block->puphash= ui_popup_menu_hash((char*)title);
pup->layout= uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style);
uiLayoutSetOperatorContext(pup->layout, WM_OP_EXEC_REGION_WIN);
@@ -2314,6 +2640,8 @@ uiPopupMenu *uiPupMenuBegin(bContext *C, const char *title, int icon)
but= uiDefBut(pup->block, LABEL, 0, (char*)title, 0, 0, 200, MENU_BUTTON_HEIGHT, NULL, 0.0, 0.0, 0, 0, "");
but->flag= UI_TEXT_LEFT;
}
+
+ //uiDefBut(block, SEPR, 0, "", startx, (short)(starty+height)-MENU_SEPR_HEIGHT, width, MENU_SEPR_HEIGHT, NULL, 0.0, 0.0, 0, 0, "");
}
return pup;
@@ -2323,13 +2651,16 @@ uiPopupMenu *uiPupMenuBegin(bContext *C, const char *title, int icon)
void uiPupMenuEnd(bContext *C, uiPopupMenu *pup)
{
wmWindow *window= CTX_wm_window(C);
+ uiMenuInfo info;
uiPopupBlockHandle *menu;
- pup->popup= 1;
- pup->mx= window->eventstate->x;
- pup->my= window->eventstate->y;
+ memset(&info, 0, sizeof(info));
+ info.popup= 1;
+ info.mx= window->eventstate->x;
+ info.my= window->eventstate->y;
+ info.pup= pup;
- menu= ui_popup_block_create(C, NULL, NULL, NULL, ui_block_func_POPUP, pup);
+ menu= ui_popup_block_create(C, NULL, NULL, NULL, ui_block_func_MENU_ITEM, &info);
menu->popup= 1;
UI_add_popup_handlers(C, &window->handlers, menu);
@@ -2343,7 +2674,32 @@ uiLayout *uiPupMenuLayout(uiPopupMenu *pup)
return pup->layout;
}
-/*************************** Standard Popup Menus ****************************/
+/* ************** standard pupmenus *************** */
+
+/* this one can called with operatortype name and operators */
+static uiPopupBlockHandle *ui_pup_menu(bContext *C, int maxrow, uiMenuHandleFunc func, void *arg, char *str, ...)
+{
+ wmWindow *window= CTX_wm_window(C);
+ uiPupMenuInfo info;
+ uiPopupBlockHandle *menu;
+
+ memset(&info, 0, sizeof(info));
+ info.mx= window->eventstate->x;
+ info.my= window->eventstate->y;
+ info.maxrow= maxrow;
+ info.instr= str;
+
+ menu= ui_popup_block_create(C, NULL, NULL, NULL, ui_block_func_PUPMENU, &info);
+ menu->popup= 1;
+
+ UI_add_popup_handlers(C, &window->handlers, menu);
+ WM_event_add_mousemove(C);
+
+ menu->popup_func= func;
+ menu->popup_arg= arg;
+
+ return menu;
+}
static void operator_name_cb(bContext *C, void *arg, int retval)
{
@@ -2353,6 +2709,17 @@ static void operator_name_cb(bContext *C, void *arg, int retval)
WM_operator_name_call(C, opname, WM_OP_EXEC_DEFAULT, NULL);
}
+static void vconfirm_opname(bContext *C, char *opname, char *title, char *itemfmt, va_list ap)
+{
+ char *s, buf[512];
+
+ s= buf;
+ if (title) s+= sprintf(s, "%s%%t|", title);
+ vsprintf(s, itemfmt, ap);
+
+ ui_pup_menu(C, 0, operator_name_cb, opname, buf);
+}
+
static void operator_cb(bContext *C, void *arg, int retval)
{
wmOperator *op= arg;
@@ -2368,21 +2735,6 @@ static void confirm_cancel_operator(void *opv)
WM_operator_free(opv);
}
-static void vconfirm_opname(bContext *C, char *opname, char *title, char *itemfmt, va_list ap)
-{
- uiPopupBlockHandle *handle;
- char *s, buf[512];
-
- s= buf;
- if (title) s+= sprintf(s, "%s%%t|", title);
- vsprintf(s, itemfmt, ap);
-
- handle= ui_popup_menu_create(C, NULL, NULL, NULL, NULL, buf);
-
- handle->popup_func= operator_name_cb;
- handle->popup_arg= opname;
-}
-
static void confirm_operator(bContext *C, wmOperator *op, char *title, char *item)
{
uiPopupBlockHandle *handle;
@@ -2391,13 +2743,11 @@ static void confirm_operator(bContext *C, wmOperator *op, char *title, char *ite
s= buf;
if (title) s+= sprintf(s, "%s%%t|%s", title, item);
- handle= ui_popup_menu_create(C, NULL, NULL, NULL, NULL, buf);
-
- handle->popup_func= operator_cb;
- handle->popup_arg= op;
+ handle= ui_pup_menu(C, 0, operator_cb, op, buf);
handle->cancel_func= confirm_cancel_operator;
}
+
void uiPupMenuOkee(bContext *C, char *opname, char *str, ...)
{
va_list ap;
@@ -2410,6 +2760,7 @@ void uiPupMenuOkee(bContext *C, char *opname, char *str, ...)
va_end(ap);
}
+
void uiPupMenuSaveOver(bContext *C, wmOperator *op, char *filename)
{
size_t len= strlen(filename);
@@ -2425,7 +2776,7 @@ void uiPupMenuSaveOver(bContext *C, wmOperator *op, char *filename)
if(BLI_exists(filename)==0)
operator_cb(C, op, 1);
else
- confirm_operator(C, op, "Save Over", filename);
+ confirm_operator(C, op, "Save over", filename);
}
void uiPupMenuNotice(bContext *C, char *str, ...)
@@ -2475,7 +2826,7 @@ void uiPupMenuReports(bContext *C, ReportList *reports)
}
str= BLI_dynstr_get_cstring(ds);
- ui_popup_menu_create(C, NULL, NULL, NULL, NULL, str);
+ ui_pup_menu(C, 0, NULL, NULL, str);
MEM_freeN(str);
BLI_dynstr_free(ds);
@@ -2519,4 +2870,3 @@ void uiPupBlockOperator(bContext *C, uiBlockCreateFunc func, wmOperator *op, int
UI_add_popup_handlers(C, &window->handlers, handle);
WM_event_add_mousemove(C);
}
-
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 2b7d6f383bf..0557512cc2a 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -157,7 +157,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
{
TemplateID *template= (TemplateID*)arg_litem;
PointerRNA idptr= RNA_property_pointer_get(&template->ptr, template->prop);
- ID *id= idptr.data, *newid;
+ ID *id= idptr.data;
int event= GET_INT_FROM_POINTER(arg_event);
switch(event) {
@@ -185,48 +185,28 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
}
else return;
break;
- case UI_ID_LOCAL:
- if(id) {
- if(id_make_local(id, 0)) {
- /* reassign to get get proper updates/notifiers */
- idptr= RNA_property_pointer_get(&template->ptr, template->prop);
- RNA_property_pointer_set(&template->ptr, template->prop, idptr);
- RNA_property_update(C, &template->ptr, template->prop);
- }
- }
- break;
+#if 0
case UI_ID_ALONE:
- if(id) {
- /* make copy */
- if(id_copy(id, &newid, 0) && newid) {
- /* us is 1 by convention, but RNA_property_pointer_set
- will also incremement it, so set it to zero */
- newid->us= 0;
-
- /* assign copy */
- RNA_id_pointer_create(newid, &idptr);
- RNA_property_pointer_set(&template->ptr, template->prop, idptr);
- RNA_property_update(C, &template->ptr, template->prop);
- }
- }
+ if(!id || id->us < 1)
+ return;
+ break;
+ case UI_ID_LOCAL:
+ if(!id || id->us < 1)
+ return;
break;
-#if 0
case UI_ID_AUTO_NAME:
break;
#endif
}
}
-static void template_ID(bContext *C, uiBlock *block, TemplateID *template, StructRNA *type, int flag, char *newop, char *openop, char *unlinkop)
+static void template_ID(bContext *C, uiBlock *block, TemplateID *template, StructRNA *type, int flag, char *newop, char *unlinkop)
{
uiBut *but;
PointerRNA idptr;
ListBase *lb;
- ID *id, *idfrom;
idptr= RNA_property_pointer_get(&template->ptr, template->prop);
- id= idptr.data;
- idfrom= template->ptr.id.data;
lb= template->idlb;
uiBlockBeginAlign(block);
@@ -241,86 +221,33 @@ static void template_ID(bContext *C, uiBlock *block, TemplateID *template, Struc
but->flag|= UI_HAS_ICON;
but->flag|= UI_ICON_LEFT;
}
-
- if((idfrom && idfrom->lib))
- uiButSetFlag(but, UI_BUT_DISABLED);
}
/* text button with name */
- if(id) {
+ if(idptr.data) {
char name[64];
- //text_idbutton(id, name);
+ //text_idbutton(idptr.data, name);
name[0]= '\0';
but= uiDefButR(block, TEX, 0, name, 0, 0, UI_UNIT_X*6, UI_UNIT_Y, &idptr, "name", -1, 0, 0, -1, -1, NULL);
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_RENAME));
-
- 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, 0, 0, 0, 0, 0,
- "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, 0, 0, 0, 0, 0,
- "Direct linked library datablock, click to make local.");
- if(!id_make_local(id, 1 /* test */) || (idfrom && idfrom->lib))
- uiButSetFlag(but, UI_BUT_DISABLED);
- }
-
- uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_LOCAL));
- }
-
- if(id->us > 1) {
- char str[32];
-
- sprintf(str, "%d", id->us);
-
- if(id->us<10)
- but= uiDefBut(block, BUT, 0, str, 0,0,UI_UNIT_X,UI_UNIT_Y, 0, 0, 0, 0, 0, "Displays number of users of this data. Click to make a single-user copy.");
- else
- but= uiDefBut(block, BUT, 0, str, 0,0,UI_UNIT_X+10,UI_UNIT_Y, 0, 0, 0, 0, 0, "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))
- uiButSetFlag(but, UI_BUT_DISABLED);
- }
}
if(flag & UI_ID_ADD_NEW) {
- int w= id?UI_UNIT_X: (flag & UI_ID_OPEN)? UI_UNIT_X*3: UI_UNIT_X*6;
+ int w= idptr.data?UI_UNIT_X:UI_UNIT_X*6;
if(newop) {
- but= uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_REGION_WIN, ICON_ZOOMIN, (id)? "": "New", 0, 0, w, UI_UNIT_Y, NULL);
+ but= uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_REGION_WIN, ICON_ZOOMIN, "Add 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, "Add 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));
}
-
- if((idfrom && idfrom->lib))
- uiButSetFlag(but, UI_BUT_DISABLED);
- }
-
- if(flag & UI_ID_OPEN) {
- 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_REGION_WIN, ICON_FILESEL, (id)? "": "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);
- uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_OPEN));
- }
-
- if((idfrom && idfrom->lib))
- uiButSetFlag(but, UI_BUT_DISABLED);
}
/* delete button */
- if(id && (flag & UI_ID_DELETE)) {
+ if(idptr.data && (flag & UI_ID_DELETE)) {
if(unlinkop) {
but= uiDefIconButO(block, BUT, unlinkop, WM_OP_INVOKE_REGION_WIN, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL);
}
@@ -328,15 +255,12 @@ static void template_ID(bContext *C, uiBlock *block, TemplateID *template, Struc
but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_DELETE));
}
-
- if((idfrom && idfrom->lib))
- uiButSetFlag(but, UI_BUT_DISABLED);
}
uiBlockEndAlign(block);
}
-void uiTemplateID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname, char *newop, char *openop, char *unlinkop)
+void uiTemplateID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname, char *newop, char *unlinkop)
{
TemplateID *template;
uiBlock *block;
@@ -362,8 +286,6 @@ void uiTemplateID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname
if(newop)
flag |= UI_ID_ADD_NEW;
- if(openop)
- flag |= UI_ID_OPEN;
type= RNA_property_pointer_type(ptr, prop);
template->idlb= wich_libbase(CTX_data_main(C), RNA_type_to_ID_code(type));
@@ -371,7 +293,7 @@ void uiTemplateID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname
if(template->idlb) {
uiLayoutRow(layout, 1);
block= uiLayoutGetBlock(layout);
- template_ID(C, block, template, type, flag, newop, openop, unlinkop);
+ template_ID(C, block, template, type, flag, newop, unlinkop);
}
MEM_freeN(template);
@@ -406,6 +328,7 @@ void uiTemplateID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname
static void modifiers_setOnCage(bContext *C, void *ob_v, void *md_v)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob = ob_v;
ModifierData *md;
@@ -420,11 +343,12 @@ static void modifiers_setOnCage(bContext *C, void *ob_v, void *md_v)
}
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
static void modifiers_convertToReal(bContext *C, void *ob_v, void *md_v)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob = ob_v;
ModifierData *md = md_v;
ModifierData *nmd = modifier_new(md->type);
@@ -437,7 +361,7 @@ static void modifiers_convertToReal(bContext *C, void *ob_v, void *md_v)
ob->partype = PAROBJECT;
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
ED_undo_push(C, "Modifier convert to real");
}
@@ -504,15 +428,15 @@ static uiLayout *draw_modifier(uiLayout *layout, Object *ob, ModifierData *md, i
else {
/* real modifier */
uiBlockBeginAlign(block);
- uiItemR(row, "", 0, &ptr, "name", 0);
+ uiItemR(row, "", 0, &ptr, "name", 0, 0, 0);
/* Softbody not allowed in this situation, enforce! */
if(((md->type!=eModifierType_Softbody && md->type!=eModifierType_Collision) || !(ob->pd && ob->pd->deflect)) && (md->type!=eModifierType_Surface)) {
- uiItemR(row, "", ICON_SCENE, &ptr, "render", 0);
- uiItemR(row, "", ICON_RESTRICT_VIEW_OFF, &ptr, "realtime", 0);
+ uiItemR(row, "", ICON_SCENE, &ptr, "render", 0, 0, 0);
+ uiItemR(row, "", ICON_RESTRICT_VIEW_OFF, &ptr, "realtime", 0, 0, 0);
if(mti->flags & eModifierTypeFlag_SupportsEditmode)
- uiItemR(row, "", ICON_EDITMODE_HLT, &ptr, "editmode", 0);
+ uiItemR(row, "", ICON_EDITMODE_HLT, &ptr, "editmode", 0, 0, 0);
}
@@ -673,8 +597,8 @@ void do_constraint_panels(bContext *C, void *arg, int event)
if(ob->pose) update_pose_constraint_flags(ob->pose);
- if(ob->type==OB_ARMATURE) DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
- else DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ if(ob->type==OB_ARMATURE) DAG_object_flush_update(scene, ob, OB_RECALC_DATA|OB_RECALC_OB);
+ else DAG_object_flush_update(scene, ob, OB_RECALC_OB);
// XXX allqueue(REDRAWVIEW3D, 0);
// XXX allqueue(REDRAWBUTSOBJECT, 0);
@@ -1300,9 +1224,9 @@ void uiTemplateTriColorSet(uiLayout *layout, PointerRNA *ptr, char *propname)
/* nselected, selected, active color swatches */
csPtr= RNA_property_pointer_get(ptr, prop);
- uiItemR(row, "", 0, &csPtr, "normal", 0);
- uiItemR(row, "", 0, &csPtr, "selected", 0);
- uiItemR(row, "", 0, &csPtr, "active", 0);
+ uiItemR(row, "", 0, &csPtr, "normal", 0, 0, 0);
+ uiItemR(row, "", 0, &csPtr, "selected", 0, 0, 0);
+ uiItemR(row, "", 0, &csPtr, "active", 0, 0, 0);
}
/********************* Layer Buttons Template ************************/
@@ -1334,7 +1258,7 @@ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, char *propname)
* the 'remainder' is added to this, as it will be ok to have first row slightly wider if need be
* - for now, only split into groups if if group will have at least 5 items
*/
- layers= RNA_property_array_length(ptr, prop);
+ layers= RNA_property_array_length(prop);
cols= (layers / 2) + (layers % 2);
groups= ((cols / 2) < 5) ? (1) : (cols / 2);
@@ -1354,7 +1278,7 @@ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, char *propname)
/* add layers as toggle buts */
for (col= 0; (col < cols) && (layer < layers); col++, layer++) {
int icon=0; // XXX - add some way of setting this...
- uiItemFullR(uRow, "", icon, ptr, prop, layer, 0, UI_ITEM_R_TOGGLE);
+ uiItemFullR(uRow, "", icon, ptr, prop, layer, 0, 0, 0, 1);
}
}
}
@@ -1394,7 +1318,7 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr
Panel *pa;
ListBase lb, *itemlb;
char *name, str[32];
- int icon=0, i= 0, activei= 0, len= 0, items, found, min, max;
+ int icon=0, i= 0, activei= 0, len, items, found, min, max;
lb.first= lb.last= NULL;
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index 5b44f6544d1..4201850f5e4 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -72,7 +72,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
{
uiBut *but=NULL;
const char *propname= RNA_property_identifier(prop);
- int arraylen= RNA_property_array_length(ptr, prop);
+ int arraylen= RNA_property_array_length(prop);
switch(RNA_property_type(prop)) {
case PROP_BOOLEAN: {
@@ -81,7 +81,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
if(arraylen && index == -1)
return NULL;
- length= RNA_property_array_length(ptr, prop);
+ length= RNA_property_array_length(prop);
if(length)
value= RNA_property_boolean_get_index(ptr, prop, index);
@@ -175,7 +175,7 @@ void uiDefAutoButsRNA(const bContext *C, uiLayout *layout, PointerRNA *ptr, int
if(strcmp(name, "Axis")==0) {
uiDefButR(uiLayoutGetBlock(col), BUT_NORMAL, 0, name, 0, 0, 100, 100, ptr, "axis", -1, 0, 0, -1, -1, NULL);
}
- else uiItemFullR(col, "", 0, ptr, prop, -1, 0, 0);
+ else uiItemFullR(col, "", 0, ptr, prop, -1, 0, 0, 0, 0);
}
RNA_STRUCT_END;
}
@@ -444,20 +444,6 @@ int uiDefIDPoinButs(uiBlock *block, Main *bmain, ID *parid, ID *id, int id_code,
uiBlockClearButLock(block);
}
- /* add button */
- if(events & UI_ID_ADD_NEW) {
- uiBlockSetButLock(block, (events & UI_ID_PIN) && *pin_p, "Can't unlink pinned data");
- if(parid && parid->lib);
- else {
- dup_params= MEM_dupallocN(params);
- but= uiDefIconBut(block, BUT, 0, ICON_ZOOMIN, x,y,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, &dup_params->browsenr, params->browsenr, 32767.0, 0, 0, "Add new data block");
- uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_ADD_NEW));
- x+= DEF_ICON_BUT_WIDTH;
- }
-
- uiBlockClearButLock(block);
- }
-
/* delete button */
if(events & UI_ID_DELETE) {
uiBlockSetButLock(block, (events & UI_ID_PIN) && *pin_p, "Can't unlink pinned data");
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index f0085f71373..a70fbab1aa4 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -835,11 +835,9 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
// else transopts= ui_translate_buttons();
/* cut string in 2 parts - only for menu entries */
- if((but->block->flag & UI_BLOCK_LOOP)) {
- if(ELEM5(but->type, SLI, NUM, TEX, NUMSLI, NUMABS)==0) {
- cpoin= strchr(but->drawstr, '|');
- if(cpoin) *cpoin= 0;
- }
+ if(ELEM5(but->type, SLI, NUM, TEX, NUMSLI, NUMABS)==0) {
+ cpoin= strchr(but->drawstr, '|');
+ if(cpoin) *cpoin= 0;
}
glColor3ubv((unsigned char*)wcol->text);
@@ -1085,7 +1083,7 @@ static struct uiWidgetColors wcol_tool= {
{255, 255, 255, 255},
1,
- 15, -15
+ 25, -25
};
static struct uiWidgetColors wcol_box= {
@@ -1897,7 +1895,7 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
widget_init(&wtb);
/* half rounded */
- round_box_edges(&wtb, roundboxalign, rect, 5.0f);
+ round_box_edges(&wtb, roundboxalign, rect, 4.0f);
ui_get_but_vectorf(but, col);
wcol->inner[0]= FTOCHAR(col[0]);
@@ -1916,7 +1914,7 @@ static void widget_textbut(uiWidgetColors *wcol, rcti *rect, int state, int roun
widget_init(&wtb);
/* half rounded */
- round_box_edges(&wtb, roundboxalign, rect, 4.0f);
+ round_box_edges(&wtb, roundboxalign, rect, 5.0f);
widgetbase_draw(&wtb, wcol);
@@ -1946,11 +1944,11 @@ static void widget_pulldownbut(uiWidgetColors *wcol, rcti *rect, int state, int
{
if(state & UI_ACTIVE) {
uiWidgetBase wtb;
- float rad= 0.5f*(rect->ymax - rect->ymin); // 4.0f
+ float rad= 0.5f*(rect->ymax - rect->ymin);
widget_init(&wtb);
- /* half rounded */
+ /* fully rounded */
round_box_edges(&wtb, 15, rect, rad);
widgetbase_draw(&wtb, wcol);
@@ -2045,11 +2043,11 @@ static void widget_but(uiWidgetColors *wcol, rcti *rect, int state, int roundbox
static void widget_roundbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
{
uiWidgetBase wtb;
- float rad= 5.0f; //0.5f*(rect->ymax - rect->ymin);
+ float rad= 0.5f*(rect->ymax - rect->ymin);
widget_init(&wtb);
- /* half rounded */
+ /* fully rounded */
round_box_edges(&wtb, roundboxalign, rect, rad);
widgetbase_draw(&wtb, wcol);
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index c54e09b2b40..5b51d898235 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -445,7 +445,6 @@ void ui_theme_init_userdef(void)
SETCOL(btheme->tv3d.text_hi, 255, 255, 255, 255);
SETCOLF(btheme->tv3d.header, 0.45, 0.45, 0.45, 1.0);
- SETCOLF(btheme->tv3d.button, 0.45, 0.45, 0.45, 1.0);
SETCOL(btheme->tv3d.panel, 165, 165, 165, 127);
SETCOL(btheme->tv3d.shade1, 160, 160, 160, 100);
@@ -1245,18 +1244,6 @@ void init_userdef_do_versions(void)
SETCOLF(btheme->tuserpref.back, 0.45, 0.45, 0.45, 1.0);
}
}
-
- if (G.main->versionfile < 250 || (G.main->versionfile == 250 && G.main->subversionfile < 3)) {
- /* new audio system */
- if(U.audiochannels == 0)
- U.audiochannels = 2;
- if(U.audiodevice == 0)
- U.audiodevice = 2;
- if(U.audioformat == 0)
- U.audioformat = 0x24;
- if(U.audiorate == 0)
- U.audiorate = 44100;
- }
/* GL Texture Garbage Collection (variable abused above!) */
if (U.textimeout == 0) {
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 3e009884dee..1e8cda68e6d 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -235,7 +235,6 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event)
}
break;
- case LEFTMOUSE:
case MIDDLEMOUSE:
if (event->val==0) {
/* calculate overall delta mouse-movement for redo */
@@ -257,7 +256,6 @@ void VIEW2D_OT_pan(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Pan View";
- ot->description= "Pan the view.";
ot->idname= "VIEW2D_OT_pan";
/* api callbacks */
@@ -306,7 +304,6 @@ void VIEW2D_OT_scroll_right(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scroll Right";
- ot->description= "Scroll the view right.";
ot->idname= "VIEW2D_OT_scroll_right";
/* api callbacks */
@@ -353,7 +350,6 @@ void VIEW2D_OT_scroll_left(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scroll Left";
- ot->description= "Scroll the view left.";
ot->idname= "VIEW2D_OT_scroll_left";
/* api callbacks */
@@ -399,7 +395,6 @@ void VIEW2D_OT_scroll_down(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scroll Down";
- ot->description= "Scroll the view down.";
ot->idname= "VIEW2D_OT_scroll_down";
/* api callbacks */
@@ -446,7 +441,6 @@ void VIEW2D_OT_scroll_up(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scroll Up";
- ot->description= "Scroll the view up.";
ot->idname= "VIEW2D_OT_scroll_up";
/* api callbacks */
@@ -580,7 +574,6 @@ void VIEW2D_OT_zoom_in(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Zoom In";
- ot->description= "Zoom in the view.";
ot->idname= "VIEW2D_OT_zoom_in";
/* api callbacks */
@@ -617,7 +610,6 @@ void VIEW2D_OT_zoom_out(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Zoom Out";
- ot->description= "Zoom out the view.";
ot->idname= "VIEW2D_OT_zoom_out";
/* api callbacks */
@@ -834,7 +826,6 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, wmEvent *event)
}
break;
- case LEFTMOUSE:
case MIDDLEMOUSE:
if (event->val==0) {
/* for redo, store the overall deltas - need to respect zoom-locks here... */
@@ -864,7 +855,6 @@ void VIEW2D_OT_zoom(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Zoom View";
- ot->description= "Zoom in/out the view.";
ot->idname= "VIEW2D_OT_zoom";
/* api callbacks */
@@ -966,7 +956,6 @@ void VIEW2D_OT_zoom_border(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Zoom to Border";
- ot->description= "Zoom in the view to the nearest item contained in the border.";
ot->idname= "VIEW2D_OT_zoom_border";
/* api callbacks */
@@ -1306,7 +1295,6 @@ void VIEW2D_OT_scroller_activate(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scroller Activate";
- ot->description= "Scroll view by mouse click and drag.";
ot->idname= "VIEW2D_OT_scroller_activate";
/* flags */
@@ -1373,7 +1361,6 @@ void VIEW2D_OT_reset(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Reset View";
- ot->description= "Reset the view.";
ot->idname= "VIEW2D_OT_reset";
/* api callbacks */
diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c
index 980d699dda5..17838d6042c 100644
--- a/source/blender/editors/mesh/editmesh.c
+++ b/source/blender/editors/mesh/editmesh.c
@@ -743,6 +743,78 @@ static void edge_drawflags(Mesh *me, EditMesh *em)
}
}
+static int editmesh_pointcache_edit(Scene *scene, Object *ob, int totvert, PTCacheID *pid_p, float mat[][4], int load)
+{
+ Cloth *cloth;
+ SoftBody *sb;
+ ClothModifierData *clmd;
+ PTCacheID pid, tmpid;
+ int cfra= (int)scene->r.cfra, found= 0;
+
+ pid.cache= NULL;
+
+ /* check for cloth */
+ if(modifiers_isClothEnabled(ob)) {
+ clmd= (ClothModifierData*)modifiers_findByType(ob, eModifierType_Cloth);
+ cloth= clmd->clothObject;
+
+ BKE_ptcache_id_from_cloth(&tmpid, ob, clmd);
+
+ /* verify vertex count and baked status */
+ if(cloth && (totvert == cloth->numverts)) {
+ if((tmpid.cache->flag & PTCACHE_BAKED) && (tmpid.cache->flag & PTCACHE_BAKE_EDIT)) {
+ pid= tmpid;
+
+ if(load && (pid.cache->flag & PTCACHE_BAKE_EDIT_ACTIVE))
+ found= 1;
+ }
+ }
+ }
+
+ /* check for softbody */
+ if(!found && ob->soft) {
+ sb= ob->soft;
+
+ BKE_ptcache_id_from_softbody(&tmpid, ob, sb);
+
+ /* verify vertex count and baked status */
+ if(sb->bpoint && (totvert == sb->totpoint)) {
+ if((tmpid.cache->flag & PTCACHE_BAKED) && (tmpid.cache->flag & PTCACHE_BAKE_EDIT)) {
+ pid= tmpid;
+
+ if(load && (pid.cache->flag & PTCACHE_BAKE_EDIT_ACTIVE))
+ found= 1;
+ }
+ }
+ }
+
+ /* if not making editmesh verify editing was active for this point cache */
+ if(load) {
+ if(found)
+ pid.cache->flag &= ~PTCACHE_BAKE_EDIT_ACTIVE;
+ else
+ return 0;
+ }
+
+ /* check if we have cache for this frame */
+ if(pid.cache && BKE_ptcache_id_exist(&pid, cfra)) {
+ *pid_p = pid;
+
+ if(load) {
+ Mat4CpyMat4(mat, ob->obmat);
+ }
+ else {
+ pid.cache->editframe= cfra;
+ pid.cache->flag |= PTCACHE_BAKE_EDIT_ACTIVE;
+ Mat4Invert(mat, ob->obmat); /* ob->imat is not up to date */
+ }
+
+ return 1;
+ }
+
+ return 0;
+}
+
/* turns Mesh into editmesh */
void make_editMesh(Scene *scene, Object *ob)
{
@@ -756,8 +828,11 @@ void make_editMesh(Scene *scene, Object *ob)
EditFace *efa;
EditEdge *eed;
EditSelection *ese;
- float *co;
- int tot, a, eekadoodle= 0;
+ PTCacheID pid;
+ Cloth *cloth;
+ SoftBody *sb;
+ float cacheco[3], cachemat[4][4], *co;
+ int tot, a, cacheedit= 0, eekadoodle= 0;
if(me->edit_mesh==NULL)
me->edit_mesh= MEM_callocN(sizeof(EditMesh), "editmesh");
@@ -792,10 +867,26 @@ void make_editMesh(Scene *scene, Object *ob)
CustomData_copy(&me->vdata, &em->vdata, CD_MASK_EDITMESH, CD_CALLOC, 0);
mvert= me->mvert;
+ cacheedit= editmesh_pointcache_edit(scene, ob, tot, &pid, cachemat, 0);
+
evlist= (EditVert **)MEM_mallocN(tot*sizeof(void *),"evlist");
for(a=0; a<tot; a++, mvert++) {
- co= mvert->co;
+ if(cacheedit) {
+ if(pid.type == PTCACHE_TYPE_CLOTH) {
+ cloth= ((ClothModifierData*)pid.calldata)->clothObject;
+ VECCOPY(cacheco, cloth->verts[a].x)
+ }
+ else if(pid.type == PTCACHE_TYPE_SOFTBODY) {
+ sb= (SoftBody*)pid.calldata;
+ VECCOPY(cacheco, sb->bpoint[a].pos)
+ }
+
+ Mat4MulVecfl(cachemat, cacheco);
+ co= cacheco;
+ }
+ else
+ co= mvert->co;
eve= addvertlist(em, co, NULL);
evlist[a]= eve;
@@ -920,6 +1011,11 @@ void make_editMesh(Scene *scene, Object *ob)
if (EM_get_actFace(em, 0)==NULL) {
EM_set_actFace(em, em->faces.first ); /* will use the first face, this is so we alwats have an active face */
}
+
+ /* vertex coordinates change with cache edit, need to recalc */
+ if(cacheedit)
+ recalc_editnormals(em);
+
}
/* makes Mesh out of editmesh */
@@ -935,8 +1031,12 @@ void load_editMesh(Scene *scene, Object *ob)
EditFace *efa, *efa_act;
EditEdge *eed;
EditSelection *ese;
- float *fp, *newkey, *oldkey, nor[3];
- int i, a, ototvert;
+ SoftBody *sb;
+ Cloth *cloth;
+ ClothModifierData *clmd;
+ PTCacheID pid;
+ float *fp, *newkey, *oldkey, nor[3], cacheco[3], cachemat[4][4];
+ int i, a, ototvert, cacheedit= 0;
/* this one also tests of edges are not in faces: */
/* eed->f2==0: not in face, f2==1: draw it */
@@ -990,8 +1090,48 @@ void load_editMesh(Scene *scene, Object *ob)
eve= em->verts.first;
a= 0;
+ /* check for point cache editing */
+ cacheedit= editmesh_pointcache_edit(scene, ob, em->totvert, &pid, cachemat, 1);
+
while(eve) {
- VECCOPY(mvert->co, eve->co);
+ if(cacheedit) {
+ if(pid.type == PTCACHE_TYPE_CLOTH) {
+ clmd= (ClothModifierData*)pid.calldata;
+ cloth= clmd->clothObject;
+
+ /* assign position */
+ VECCOPY(cacheco, cloth->verts[a].x)
+ VECCOPY(cloth->verts[a].x, eve->co);
+ Mat4MulVecfl(cachemat, cloth->verts[a].x);
+
+ /* find plausible velocity, not physical correct but gives
+ * nicer results when commented */
+ VECSUB(cacheco, cloth->verts[a].x, cacheco);
+ VecMulf(cacheco, clmd->sim_parms->stepsPerFrame*10.0f);
+ VECADD(cloth->verts[a].v, cloth->verts[a].v, cacheco);
+ }
+ else if(pid.type == PTCACHE_TYPE_SOFTBODY) {
+ sb= (SoftBody*)pid.calldata;
+
+ /* assign position */
+ VECCOPY(cacheco, sb->bpoint[a].pos)
+ VECCOPY(sb->bpoint[a].pos, eve->co);
+ Mat4MulVecfl(cachemat, sb->bpoint[a].pos);
+
+ /* changing velocity for softbody doesn't seem to give
+ * good results? */
+#if 0
+ VECSUB(cacheco, sb->bpoint[a].pos, cacheco);
+ VecMulf(cacheco, sb->minloops*10.0f);
+ VECADD(sb->bpoint[a].vec, sb->bpoint[a].pos, cacheco);
+#endif
+ }
+
+ if(oldverts)
+ VECCOPY(mvert->co, oldverts[a].co)
+ }
+ else
+ VECCOPY(mvert->co, eve->co);
mvert->mat_nr= 32767; /* what was this for, halos? */
@@ -1015,6 +1155,10 @@ void load_editMesh(Scene *scene, Object *ob)
eve= eve->next;
mvert++;
}
+
+ /* write changes to cache */
+ if(cacheedit)
+ BKE_ptcache_write_cache(&pid, pid.cache->editframe);
/* the edges */
a= 0;
@@ -1280,7 +1424,7 @@ void load_editMesh(Scene *scene, Object *ob)
void remake_editMesh(Scene *scene, Object *ob)
{
make_editMesh(scene, ob);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
BIF_undo_push("Undo all changes");
}
@@ -1390,8 +1534,8 @@ static int mesh_separate_selected(Scene *scene, Base *editbase)
/* hashedges are invalid now, make new! */
editMesh_set_hash(em);
- DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
- DAG_id_flush_update(&basenew->object->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, basenew->object, OB_RECALC_DATA);
BKE_mesh_end_editmesh(me, em);
@@ -1469,7 +1613,7 @@ static int mesh_separate_exec(bContext *C, wmOperator *op)
retval= mesh_separate_loose(scene, base);
if(retval) {
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, base->object->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, base->object);
return OPERATOR_FINISHED;
}
return OPERATOR_CANCELLED;
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index 4af5ddf56fa..19078d2f6ff 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -217,8 +217,8 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event)
}
//retopo_do_all();
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, vc.obedit->data);
- DAG_id_flush_update(vc.obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, vc.obedit);
+ DAG_object_flush_update(vc.scene, vc.obedit, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -343,8 +343,9 @@ static int make_fgon_exec(bContext *C, wmOperator *op)
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
if( make_fgon(em, op, 1) ) {
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -375,8 +376,9 @@ static int clear_fgon_exec(bContext *C, wmOperator *op)
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
if( make_fgon(em, op, 0) ) {
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -664,7 +666,7 @@ void addfaces_from_edgenet(EditMesh *em)
EM_select_flush(em);
-// XXX DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// XXX DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
static void addedgeface_mesh(EditMesh *em, wmOperator *op)
@@ -693,7 +695,7 @@ static void addedgeface_mesh(EditMesh *em, wmOperator *op)
eed= addedgelist(em, neweve[0], neweve[1], NULL);
EM_select_edge(eed, 1);
- // XXX DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ // XXX DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
return;
}
else if(amount > 4) {
@@ -790,8 +792,9 @@ static int addedgeface_mesh_exec(bContext *C, wmOperator *op)
addedgeface_mesh(em, op);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
+ DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1308,6 +1311,7 @@ static float new_primitive_matrix(bContext *C, float primmat[][4])
static int add_primitive_plane_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1317,8 +1321,8 @@ static int add_primitive_plane_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_PLANE, mat, 4, 0, 0, dia, 0.0f, 0, 1);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1340,6 +1344,7 @@ void MESH_OT_primitive_plane_add(wmOperatorType *ot)
static int add_primitive_cube_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1349,8 +1354,8 @@ static int add_primitive_cube_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_CUBE, mat, 4, 0, 0, dia, 1.0f, 1, 1);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1372,6 +1377,7 @@ void MESH_OT_primitive_cube_add(wmOperatorType *ot)
static int add_primitive_circle_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1381,8 +1387,8 @@ static int add_primitive_circle_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_CIRCLE, mat, RNA_int_get(op->ptr, "vertices"), 0, 0, dia, 0.0f, 0,
RNA_boolean_get(op->ptr, "fill"));
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1409,6 +1415,7 @@ void MESH_OT_primitive_circle_add(wmOperatorType *ot)
static int add_primitive_cylinder_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1418,8 +1425,8 @@ static int add_primitive_cylinder_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_CYLINDER, mat, RNA_int_get(op->ptr, "vertices"), 0, 0, dia,
RNA_float_get(op->ptr, "depth"), 1, 1);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1446,6 +1453,7 @@ void MESH_OT_primitive_cylinder_add(wmOperatorType *ot)
static int add_primitive_tube_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1455,8 +1463,8 @@ static int add_primitive_tube_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_CYLINDER, mat, RNA_int_get(op->ptr, "vertices"), 0, 0, dia,
RNA_float_get(op->ptr, "depth"), 1, 0);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1483,6 +1491,7 @@ void MESH_OT_primitive_tube_add(wmOperatorType *ot)
static int add_primitive_cone_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1492,8 +1501,8 @@ static int add_primitive_cone_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_CONE, mat, RNA_int_get(op->ptr, "vertices"), 0, 0, dia,
RNA_float_get(op->ptr, "depth"), 0, RNA_boolean_get(op->ptr, "cap_end"));
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1522,6 +1531,7 @@ void MESH_OT_primitive_cone_add(wmOperatorType *ot)
static int add_primitive_grid_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1531,8 +1541,8 @@ static int add_primitive_grid_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_GRID, mat, RNA_int_get(op->ptr, "x_subdivisions"),
RNA_int_get(op->ptr, "y_subdivisions"), 0, dia, 0.0f, 0, 1);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1559,6 +1569,7 @@ void MESH_OT_primitive_grid_add(wmOperatorType *ot)
static int add_primitive_monkey_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float mat[4][4];
@@ -1566,8 +1577,8 @@ static int add_primitive_monkey_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_MONKEY, mat, 0, 0, 2, 0.0f, 0.0f, 0, 0);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1589,6 +1600,7 @@ void MESH_OT_primitive_monkey_add(wmOperatorType *ot)
static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1598,8 +1610,8 @@ static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_UVSPHERE, mat, RNA_int_get(op->ptr, "rings"),
RNA_int_get(op->ptr, "segments"), 0, dia, 0.0f, 0, 0);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1626,6 +1638,7 @@ void MESH_OT_primitive_uv_sphere_add(wmOperatorType *ot)
static int add_primitive_icosphere_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1635,8 +1648,8 @@ static int add_primitive_icosphere_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_ICOSPHERE, mat, 0, 0,
RNA_int_get(op->ptr, "subdivisions"), dia, 0.0f, 0, 0);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1664,6 +1677,7 @@ void MESH_OT_primitive_ico_sphere_add(wmOperatorType *ot)
static int mesh_duplicate_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(ob->data);
@@ -1671,8 +1685,8 @@ static int mesh_duplicate_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(ob->data, em);
- DAG_id_flush_update(ob->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c
index 4c3e76f2285..b46f745e8f5 100644
--- a/source/blender/editors/mesh/editmesh_loop.c
+++ b/source/blender/editors/mesh/editmesh_loop.c
@@ -389,7 +389,7 @@ void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcuts)
EM_selectmode_set(em);
}
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
return;
}
@@ -624,6 +624,7 @@ static float seg_intersect(EditEdge *e, CutCurve *c, int len, char mode, struct
static int knife_cut_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
ARegion *ar= CTX_wm_region(C);
@@ -704,8 +705,8 @@ static int knife_cut_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index 61762522565..363b6ecc4e4 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -39,7 +39,7 @@ editmesh_mods.c, UI level access, no geometry changes
#include "MEM_guardedalloc.h"
-
+#include "MTC_matrixops.h"
#include "DNA_mesh_types.h"
#include "DNA_material_types.h"
@@ -127,7 +127,7 @@ void EM_automerge(int update)
// if (len) {
// em->totvert -= len; /* saves doing a countall */
// if (update) {
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
// }
// }
// }
@@ -807,7 +807,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
if (selcount) {
/* here was an edge-mode only select flush case, has to be generalized */
EM_selectmode_flush(em);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(me, em);
return OPERATOR_FINISHED;
}
@@ -839,7 +839,7 @@ static EnumPropertyItem prop_simedge_types[] = {
{0, NULL, 0, NULL, NULL}
};
-static int similar_edge_select__internal(ToolSettings *ts, EditMesh *em, int mode)
+static int similar_edge_select__internal(Scene *scene, EditMesh *em, int mode)
{
EditEdge *eed, *base_eed=NULL;
unsigned int selcount=0; /* count how many new edges we select*/
@@ -849,7 +849,7 @@ static int similar_edge_select__internal(ToolSettings *ts, EditMesh *em, int mod
unsigned int deselcount=0;
short ok=0;
- float thresh= ts->select_thresh;
+ float thresh= scene->toolsettings->select_thresh;
for(eed= em->edges.first; eed; eed= eed->next) {
if (!eed->h) {
@@ -1039,17 +1039,17 @@ static int similar_edge_select__internal(ToolSettings *ts, EditMesh *em, int mod
/* wrap the above function but do selection flushing edge to face */
static int similar_edge_select_exec(bContext *C, wmOperator *op)
{
- ToolSettings *ts= CTX_data_tool_settings(C);
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
Mesh *me= obedit->data;
EditMesh *em= BKE_mesh_get_editmesh(me);
- int selcount = similar_edge_select__internal(ts, em, RNA_int_get(op->ptr, "type"));
+ int selcount = similar_edge_select__internal(scene, em, RNA_int_get(op->ptr, "type"));
if (selcount) {
/* here was an edge-mode only select flush case, has to be generalized */
EM_selectmode_flush(em);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(me, em);
return OPERATOR_FINISHED;
}
@@ -1081,7 +1081,7 @@ static EnumPropertyItem prop_simvertex_types[] = {
static int similar_vert_select_exec(bContext *C, wmOperator *op)
{
- ToolSettings *ts= CTX_data_tool_settings(C);
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
Mesh *me= obedit->data;
EditMesh *em= BKE_mesh_get_editmesh(me);
@@ -1094,7 +1094,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
int mode= RNA_enum_get(op->ptr, "type");
short ok=0;
- float thresh= ts->select_thresh;
+ float thresh= scene->toolsettings->select_thresh;
for(eve= em->verts.first; eve; eve= eve->next) {
if (!eve->h) {
@@ -1207,7 +1207,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
} /* end basevert loop */
if(selcount) {
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(me, em);
return OPERATOR_FINISHED;
}
@@ -1413,7 +1413,7 @@ void EM_mesh_copy_edge(EditMesh *em, short type)
}
if (change) {
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
}
@@ -1541,7 +1541,7 @@ void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type)
}
if (change) {
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
}
@@ -1671,7 +1671,7 @@ void EM_mesh_copy_face_layer(EditMesh *em, wmOperator *op, short type)
}
if (change) {
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
}
@@ -1991,7 +1991,7 @@ static int loop_multiselect(bContext *C, wmOperator *op)
MEM_freeN(edarray);
// if (EM_texFaceCheck())
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2060,7 +2060,7 @@ static void mouse_mesh_loop(bContext *C, short mval[2], short extend, short ring
EM_selectmode_flush(em);
// if (EM_texFaceCheck())
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, vc.obedit);
}
}
@@ -2159,8 +2159,9 @@ static void mouse_mesh_shortest_path(bContext *C, short mval[2])
break;
}
- DAG_id_flush_update(vc.obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit->data);
+ DAG_object_flush_update(vc.scene, vc.obedit, OB_RECALC_DATA);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, vc.obedit);
}
}
@@ -2260,7 +2261,7 @@ void mouse_mesh(bContext *C, short mval[2], short extend)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, vc.obedit);
}
@@ -2404,12 +2405,12 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event
/* return warning! */
if(limit) {
int retval= select_linked_limited_invoke(&vc, 0, sel);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return retval;
}
if( unified_findnearest(&vc, &eve, &eed, &efa)==0 ) {
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_CANCELLED;
}
@@ -2463,7 +2464,7 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event
// if (EM_texFaceCheck())
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -2544,7 +2545,7 @@ static int select_linked_exec(bContext *C, wmOperator *op)
else
selectconnected_mesh_all(em);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2670,7 +2671,7 @@ void EM_hide_mesh(EditMesh *em, int swap)
em->totedgesel= em->totfacesel= em->totvertsel= 0;
// if(EM_texFaceCheck())
- // DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ // DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
static int hide_mesh_exec(bContext *C, wmOperator *op)
@@ -2680,7 +2681,7 @@ static int hide_mesh_exec(bContext *C, wmOperator *op)
EM_hide_mesh(em, RNA_boolean_get(op->ptr, "unselected"));
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2737,7 +2738,7 @@ void EM_reveal_mesh(EditMesh *em)
EM_selectmode_flush(em);
// if (EM_texFaceCheck())
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
static int reveal_mesh_exec(bContext *C, wmOperator *op)
@@ -2747,7 +2748,7 @@ static int reveal_mesh_exec(bContext *C, wmOperator *op)
EM_reveal_mesh(em);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2797,7 +2798,7 @@ int select_by_number_vertices_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -2923,7 +2924,7 @@ static int select_sharp_edges_exec(bContext *C, wmOperator *op)
// if (EM_texFaceCheck())
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); //TODO is this needed ?
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); //TODO is this needed ?
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3091,7 +3092,7 @@ static int select_linked_flat_faces_exec(bContext *C, wmOperator *op)
select_linked_flat_faces(em, op, RNA_float_get(op->ptr, "sharpness"));
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3192,7 +3193,7 @@ static int select_non_manifold_exec(bContext *C, wmOperator *op)
select_non_manifold(em, op);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3256,7 +3257,7 @@ static int select_inverse_mesh_exec(bContext *C, wmOperator *op)
EM_select_swap(em);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3299,7 +3300,7 @@ static int toggle_select_all_exec(bContext *C, wmOperator *op)
EM_toggle_select_all(em);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3370,7 +3371,7 @@ static int select_more(bContext *C, wmOperator *op)
// if (EM_texFaceCheck(em))
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3460,7 +3461,7 @@ static int select_less(bContext *C, wmOperator *op)
EM_select_less(em);
// if (EM_texFaceCheck(em))
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3530,7 +3531,7 @@ static int mesh_select_random_exec(bContext *C, wmOperator *op)
selectrandom_mesh(em, RNA_float_get(op->ptr,"percent"));
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3581,7 +3582,7 @@ void EM_deselect_by_material(EditMesh *em, int index)
EM_selectmode_flush(em);
}
-static void mesh_selection_type(ToolSettings *ts, EditMesh *em, int val)
+static void mesh_selection_type(Scene *scene, EditMesh *em, int val)
{
if(val>0) {
if(val==1) {
@@ -3602,7 +3603,7 @@ static void mesh_selection_type(ToolSettings *ts, EditMesh *em, int val)
/* note, em stores selectmode to be able to pass it on everywhere without scene,
this is only until all select modes and toolsettings are settled more */
- ts->selectmode= em->selectmode;
+ scene->toolsettings->selectmode= em->selectmode;
// if (EM_texFaceCheck())
}
}
@@ -3616,13 +3617,13 @@ static EnumPropertyItem prop_mesh_edit_types[] = {
static int mesh_selection_type_exec(bContext *C, wmOperator *op)
{
- ToolSettings *ts= CTX_data_tool_settings(C);
+
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
- mesh_selection_type(ts, em, RNA_enum_get(op->ptr,"type"));
+ mesh_selection_type(CTX_data_scene(C), em, RNA_enum_get(op->ptr,"type"));
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3652,6 +3653,7 @@ void MESH_OT_selection_type(wmOperatorType *ot)
static int editmesh_mark_seam(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
Mesh *me= ((Mesh *)obedit->data);
@@ -3684,8 +3686,8 @@ static int editmesh_mark_seam(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -3709,6 +3711,7 @@ void MESH_OT_mark_seam(wmOperatorType *ot)
static int editmesh_mark_sharp(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
Mesh *me= ((Mesh *)obedit->data);
@@ -3736,8 +3739,8 @@ static int editmesh_mark_sharp(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -3967,7 +3970,7 @@ void righthandfaces(EditMesh *em, int select) /* makes faces righthand turning *
recalc_editnormals(em);
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
waitcursor(0);
}
@@ -3975,6 +3978,7 @@ void righthandfaces(EditMesh *em, int select) /* makes faces righthand turning *
static int righthandfaces_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
@@ -3985,8 +3989,8 @@ static int righthandfaces_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); //TODO is this needed ?
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); //TODO is this needed ?
return OPERATOR_FINISHED;
}
@@ -4186,7 +4190,7 @@ void editmesh_align_view_to_selected(Object *obedit, EditMesh *em, wmOperator *o
static int smooth_vertex(bContext *C, wmOperator *op)
{
- ToolSettings *ts= CTX_data_tool_settings(C);
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
EditVert *eve, *eve_mir = NULL;
@@ -4274,7 +4278,7 @@ static int smooth_vertex(bContext *C, wmOperator *op)
if(eve->f & SELECT) {
if(eve->f1) {
- if (ts->editbutflag & B_MESH_X_MIRROR) {
+ if (scene->toolsettings->editbutflag & B_MESH_X_MIRROR) {
eve_mir= editmesh_get_x_mirror_vert(obedit, em, eve->co);
}
@@ -4316,8 +4320,8 @@ static int smooth_vertex(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -4350,7 +4354,7 @@ void MESH_OT_vertices_smooth(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_int(ot->srna, "repeat", 1, 1, 100, "Smooth Iterations", "", 1, INT_MAX);
+ RNA_def_int(ot->srna, "repeat", 1, 1, 100, "Number of times to smooth the mesh", "", 1, INT_MAX);
}
void vertexnoise(Object *obedit, EditMesh *em)
@@ -4394,7 +4398,7 @@ void vertexnoise(Object *obedit, EditMesh *em)
}
recalc_editnormals(em);
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
@@ -4451,23 +4455,23 @@ static void vertices_to_sphere(Scene *scene, View3D *v3d, Object *obedit, EditMe
}
recalc_editnormals(em);
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
static int vertices_to_sphere_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
View3D *v3d = CTX_wm_view3d(C);
+ Scene *scene = CTX_data_scene(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
vertices_to_sphere(scene, v3d, obedit, em, RNA_float_get(op->ptr,"percent"));
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -4476,8 +4480,7 @@ void MESH_OT_vertices_transform_to_sphere(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Vertices to Sphere";
- //added "around cursor" to differentiate between "TFM_OT_tosphere()"
- ot->description= "Move selected vertices outward in a spherical shape around cursor.";
+ ot->description= "Move selected vertices outward in a spherical shape.";
ot->idname= "MESH_OT_vertices_transform_to_sphere";
/* api callbacks */
@@ -4513,6 +4516,7 @@ void flipface(EditMesh *em, EditFace *efa)
static int flip_normals(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
EditFace *efa;
@@ -4530,8 +4534,8 @@ static int flip_normals(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 5a4397256de..ac65820bfea 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -484,11 +484,11 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
static int removedoublesflag_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
- ToolSettings *ts= CTX_data_tool_settings(C);
+ Scene *scene = CTX_data_scene(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
char msg[100];
- int cnt = removedoublesflag(em,1,0,ts->doublimit);
+ int cnt = removedoublesflag(em,1,0,scene->toolsettings->doublimit);
if(cnt)
{
@@ -496,8 +496,8 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_INFO, msg);
}
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -677,7 +677,7 @@ void extrude_mesh(Scene *scene, Object *obedit, EditMesh *em, wmOperator *op)
* This shouldn't be necessary, derived queries should be
* automatically building this data if invalid. Or something.
*/
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
object_handle_update(scene, obedit);
/* individual faces? */
@@ -711,8 +711,8 @@ static int mesh_extrude_invoke(bContext *C, wmOperator *op, wmEvent *event)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
RNA_enum_set(op->ptr, "proportional", 0);
RNA_boolean_set(op->ptr, "mirror", 0);
@@ -736,8 +736,8 @@ static int mesh_extrude_exec(bContext *C, wmOperator *op)
extrude_mesh(scene, obedit, em, op);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -762,6 +762,7 @@ void MESH_OT_extrude(wmOperatorType *ot)
static int split_mesh(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -775,8 +776,8 @@ static int split_mesh(bContext *C, wmOperator *op)
WM_cursor_wait(0);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -800,6 +801,7 @@ void MESH_OT_split(wmOperatorType *ot)
static int extrude_repeat_mesh(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -835,8 +837,8 @@ static int extrude_repeat_mesh(bContext *C, wmOperator *op)
EM_fgon_flags(em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -867,7 +869,7 @@ void MESH_OT_extrude_repeat(wmOperatorType *ot)
static int spin_mesh(bContext *C, wmOperator *op, float *dvec, int steps, float degr, int dupli )
{
Object *obedit= CTX_data_edit_object(C);
- ToolSettings *ts= CTX_data_tool_settings(C);
+ Scene *scene = CTX_data_scene(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
EditVert *eve,*nextve;
float nor[3]= {0.0f, 0.0f, 0.0f};
@@ -889,7 +891,7 @@ static int spin_mesh(bContext *C, wmOperator *op, float *dvec, int steps, float
phi= degr*M_PI/360.0;
phi/= steps;
- if(ts->editbutflag & B_CLOCKWISE) phi= -phi;
+ if(scene->toolsettings->editbutflag & B_CLOCKWISE) phi= -phi;
RNA_float_get_array(op->ptr, "axis", n);
Normalize(n);
@@ -905,7 +907,7 @@ static int spin_mesh(bContext *C, wmOperator *op, float *dvec, int steps, float
Mat3MulMat3(bmat,imat,tmat);
if(dupli==0)
- if(ts->editbutflag & B_KEEPORIG)
+ if(scene->toolsettings->editbutflag & B_KEEPORIG)
adduplicateflag(em, 1);
for(a=0; a<steps; a++) {
@@ -939,7 +941,7 @@ static int spin_mesh(bContext *C, wmOperator *op, float *dvec, int steps, float
EM_fgon_flags(em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
BKE_mesh_end_editmesh(obedit->data, em);
@@ -948,6 +950,7 @@ static int spin_mesh(bContext *C, wmOperator *op, float *dvec, int steps, float
static int spin_mesh_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
int ok;
@@ -957,8 +960,8 @@ static int spin_mesh_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -1003,6 +1006,7 @@ void MESH_OT_spin(wmOperatorType *ot)
static int screw_mesh_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
EditVert *eve,*v1=0,*v2=0;
@@ -1058,8 +1062,8 @@ static int screw_mesh_exec(bContext *C, wmOperator *op)
}
if(spin_mesh(C, op, dvec, turns*steps, 360.0f*turns, 0)) {
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1304,13 +1308,14 @@ static EnumPropertyItem prop_mesh_delete_types[] = {
static int delete_mesh_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
delete_mesh(obedit, em, op, RNA_enum_get(op->ptr, "type"));
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2717,7 +2722,7 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float smooth, float
}
}
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
// Now for each face in the mesh we need to figure out How many edges were cut
// and which filling method to use for that face
for(ef = em->faces.first;ef;ef = ef->next) {
@@ -3691,6 +3696,7 @@ static void edge_rotate(EditMesh *em, wmOperator *op, EditEdge *eed, int dir)
/* only accepts 1 selected edge, or 2 selected faces */
static int edge_rotate_selected(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
EditEdge *eed;
@@ -3754,8 +3760,8 @@ static int edge_rotate_selected(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -4605,7 +4611,7 @@ useless:
} else {
draw = 0;
}
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
@@ -4625,7 +4631,7 @@ useless:
if(!immediate)
EM_automerge(0);
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
// scrarea_queue_winredraw(curarea);
//BLI_ghash_free(edgesgh, freeGHash, NULL);
@@ -4675,7 +4681,7 @@ int EdgeLoopDelete(EditMesh *em, wmOperator *op)
EM_select_more(em);
removedoublesflag(em, 1,0, 0.001);
EM_select_flush(em);
- // DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ // DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
return 1;
}
@@ -4787,6 +4793,7 @@ static void mesh_rip_setface(EditMesh *em, EditFace *sefa)
/* based on mouse cursor position, it defines how is being ripped */
static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
+ Scene *scene= CTX_data_scene(C);
ARegion *ar= CTX_wm_region(C);
RegionView3D *rv3d= ar->regiondata;
Object *obedit= CTX_data_edit_object(C);
@@ -4982,8 +4989,8 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
}
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
@@ -5054,7 +5061,7 @@ void shape_propagate(Scene *scene, Object *obedit, EditMesh *em, wmOperator *op)
}
}
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
return;
}
@@ -5099,7 +5106,7 @@ void shape_copy_from_lerp(EditMesh *em, KeyBlock* thisBlock, KeyBlock* fromBlock
}
}
sprintf(str,"Blending at %d%c MMB to Copy at 100%c",(int)(perc*100),'%','%');
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
// headerprint(str);
// force_draw(0);
@@ -5757,6 +5764,7 @@ int merge_target(EditMesh *em, int target, int uvmerge)
static int merge_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
int count= 0, uvs= RNA_boolean_get(op->ptr, "uvs");
@@ -5786,8 +5794,8 @@ static int merge_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -6032,7 +6040,7 @@ int select_vertex_path_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -6100,7 +6108,7 @@ static int region_to_loop(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -6276,7 +6284,7 @@ static int loop_to_region(bContext *C, wmOperator *op)
freecollections(&allcollections);
BKE_mesh_end_editmesh(obedit->data, em);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -6303,6 +6311,7 @@ void MESH_OT_loop_to_region(wmOperatorType *ot)
static int mesh_rotate_uvs(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -6369,14 +6378,15 @@ static int mesh_rotate_uvs(bContext *C, wmOperator *op)
if(!change)
return OPERATOR_CANCELLED;
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
static int mesh_mirror_uvs(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -6458,14 +6468,15 @@ static int mesh_mirror_uvs(bContext *C, wmOperator *op)
if(!change)
return OPERATOR_CANCELLED;
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
static int mesh_rotate_colors(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -6514,8 +6525,8 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op)
if(!change)
return OPERATOR_CANCELLED;
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -6523,6 +6534,7 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op)
static int mesh_mirror_colors(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -6570,8 +6582,8 @@ static int mesh_mirror_colors(bContext *C, wmOperator *op)
if(!change)
return OPERATOR_CANCELLED;
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -6652,7 +6664,7 @@ void MESH_OT_colors_mirror(wmOperatorType *ot)
static int subdivide_exec(bContext *C, wmOperator *op)
{
- ToolSettings *ts= CTX_data_tool_settings(C);
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
int cuts= RNA_int_get(op->ptr,"number_cuts");
@@ -6665,10 +6677,10 @@ static int subdivide_exec(bContext *C, wmOperator *op)
if(fractal != 0.0f)
flag |= B_FRACTAL;
- esubdivideflag(obedit, em, 1, smooth, fractal, ts->editbutflag|flag, cuts, 0);
+ esubdivideflag(obedit, em, 1, smooth, fractal, scene->toolsettings->editbutflag|flag, cuts, 0);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
return OPERATOR_FINISHED;
}
@@ -6941,6 +6953,7 @@ static void fill_mesh(EditMesh *em)
static int fill_mesh_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -6948,8 +6961,8 @@ static int fill_mesh_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
@@ -6972,6 +6985,7 @@ void MESH_OT_fill(wmOperatorType *ot)
static int beauty_fill_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -6979,8 +6993,8 @@ static int beauty_fill_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -7004,13 +7018,14 @@ void MESH_OT_beauty_fill(wmOperatorType *ot)
static int quads_convert_to_tris_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
convert_to_triface(em,0);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -7033,13 +7048,14 @@ void MESH_OT_quads_convert_to_tris(wmOperatorType *ot)
static int tris_convert_to_quads_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
join_triangles(em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -7062,13 +7078,14 @@ void MESH_OT_tris_convert_to_quads(wmOperatorType *ot)
static int edge_flip_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
edge_flip(em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -7107,6 +7124,7 @@ void mesh_set_smooth_faces(EditMesh *em, short smooth)
static int mesh_faces_shade_smooth_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -7114,8 +7132,8 @@ static int mesh_faces_shade_smooth_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -7137,13 +7155,14 @@ void MESH_OT_faces_shade_smooth(wmOperatorType *ot)
static int mesh_faces_shade_flat_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
mesh_set_smooth_faces(em, 0);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/mesh/mesh_layers.c b/source/blender/editors/mesh/mesh_layers.c
index a36c7a56b7c..17a448ecf90 100644
--- a/source/blender/editors/mesh/mesh_layers.c
+++ b/source/blender/editors/mesh/mesh_layers.c
@@ -152,21 +152,20 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la
/*********************** UV texture operators ************************/
-static int layers_poll(bContext *C)
-{
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- ID *data= (ob)? ob->data: NULL;
- return (ob && !ob->id.lib && ob->type==OB_MESH && data && !data->lib);
-}
-
static int uv_texture_add_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Mesh *me= ob->data;
+ Mesh *me;
EditMesh *em;
int layernum;
- if(me->edit_mesh) {
+ if(!ob || ob->type!=OB_MESH)
+ return OPERATOR_CANCELLED;
+
+ me= (Mesh*)ob->data;
+
+ if(scene->obedit == ob) {
em= me->edit_mesh;
layernum= CustomData_number_of_layers(&em->fdata, CD_MTFACE);
@@ -176,7 +175,7 @@ static int uv_texture_add_exec(bContext *C, wmOperator *op)
EM_add_data_layer(em, &em->fdata, CD_MTFACE);
CustomData_set_layer_active(&em->fdata, CD_MTFACE, layernum);
}
- else {
+ else if(ob) {
layernum= CustomData_number_of_layers(&me->fdata, CD_MTFACE);
if(layernum >= MAX_MTFACE)
return OPERATOR_CANCELLED;
@@ -190,8 +189,8 @@ static int uv_texture_add_exec(bContext *C, wmOperator *op)
mesh_update_customdata_pointers(me);
}
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
return OPERATOR_FINISHED;
}
@@ -204,7 +203,6 @@ void MESH_OT_uv_texture_add(wmOperatorType *ot)
ot->idname= "MESH_OT_uv_texture_add";
/* api callbacks */
- ot->poll= layers_poll;
ot->exec= uv_texture_add_exec;
/* flags */
@@ -213,11 +211,16 @@ void MESH_OT_uv_texture_add(wmOperatorType *ot)
static int uv_texture_remove_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Mesh *me= ob->data;
+ Mesh *me;
CustomDataLayer *cdl;
int index;
+ if(!ob || ob->type!=OB_MESH)
+ return OPERATOR_CANCELLED;
+
+ me= (Mesh*)ob->data;
index= CustomData_get_active_layer_index(&me->fdata, CD_MTFACE);
cdl= (index == -1)? NULL: &me->fdata.layers[index];
@@ -226,8 +229,8 @@ static int uv_texture_remove_exec(bContext *C, wmOperator *op)
delete_customdata_layer(C, ob, cdl);
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
return OPERATOR_FINISHED;
}
@@ -240,7 +243,6 @@ void MESH_OT_uv_texture_remove(wmOperatorType *ot)
ot->idname= "MESH_OT_uv_texture_remove";
/* api callbacks */
- ot->poll= layers_poll;
ot->exec= uv_texture_remove_exec;
/* flags */
@@ -253,12 +255,17 @@ static int vertex_color_add_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Mesh *me= ob->data;
+ Mesh *me;
EditMesh *em;
MCol *mcol;
int layernum;
- if(me->edit_mesh) {
+ if(!ob || ob->type!=OB_MESH)
+ return OPERATOR_CANCELLED;
+
+ me= (Mesh*)ob->data;
+
+ if(scene->obedit == ob) {
em= me->edit_mesh;
layernum= CustomData_number_of_layers(&em->fdata, CD_MCOL);
@@ -287,8 +294,8 @@ static int vertex_color_add_exec(bContext *C, wmOperator *op)
shadeMeshMCol(scene, ob, me);
}
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
return OPERATOR_FINISHED;
}
@@ -301,7 +308,6 @@ void MESH_OT_vertex_color_add(wmOperatorType *ot)
ot->idname= "MESH_OT_vertex_color_add";
/* api callbacks */
- ot->poll= layers_poll;
ot->exec= vertex_color_add_exec;
/* flags */
@@ -310,11 +316,16 @@ void MESH_OT_vertex_color_add(wmOperatorType *ot)
static int vertex_color_remove_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Mesh *me= ob->data;
+ Mesh *me;
CustomDataLayer *cdl;
int index;
+ if(!ob || ob->type!=OB_MESH)
+ return OPERATOR_CANCELLED;
+
+ me= (Mesh*)ob->data;
index= CustomData_get_active_layer_index(&me->fdata, CD_MCOL);
cdl= (index == -1)? NULL: &me->fdata.layers[index];
@@ -323,8 +334,8 @@ static int vertex_color_remove_exec(bContext *C, wmOperator *op)
delete_customdata_layer(C, ob, cdl);
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
return OPERATOR_FINISHED;
}
@@ -338,7 +349,6 @@ void MESH_OT_vertex_color_remove(wmOperatorType *ot)
/* api callbacks */
ot->exec= vertex_color_remove_exec;
- ot->poll= layers_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -348,16 +358,22 @@ void MESH_OT_vertex_color_remove(wmOperatorType *ot)
static int sticky_add_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Mesh *me= ob->data;
+ Mesh *me;
+
+ if(!ob || ob->type!=OB_MESH)
+ return OPERATOR_CANCELLED;
+
+ me= (Mesh*)ob->data;
if(me->msticky)
return OPERATOR_CANCELLED;
// XXX RE_make_sticky();
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
return OPERATOR_FINISHED;
}
@@ -370,7 +386,6 @@ void MESH_OT_sticky_add(wmOperatorType *ot)
ot->idname= "MESH_OT_sticky_add";
/* api callbacks */
- ot->poll= layers_poll;
ot->exec= sticky_add_exec;
/* flags */
@@ -379,8 +394,14 @@ void MESH_OT_sticky_add(wmOperatorType *ot)
static int sticky_remove_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Mesh *me= ob->data;
+ Mesh *me;
+
+ if(!ob || ob->type!=OB_MESH)
+ return OPERATOR_CANCELLED;
+
+ me= (Mesh*)ob->data;
if(!me->msticky)
return OPERATOR_CANCELLED;
@@ -388,8 +409,8 @@ static int sticky_remove_exec(bContext *C, wmOperator *op)
CustomData_free_layer_active(&me->vdata, CD_MSTICKY, me->totvert);
me->msticky= NULL;
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
return OPERATOR_FINISHED;
}
@@ -402,7 +423,6 @@ void MESH_OT_sticky_remove(wmOperatorType *ot)
ot->idname= "MESH_OT_sticky_remove";
/* api callbacks */
- ot->poll= layers_poll;
ot->exec= sticky_remove_exec;
/* flags */
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 4aa99820a6e..5d4be254593 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -34,7 +34,6 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
-#include <float.h>
#include "MEM_guardedalloc.h"
@@ -682,7 +681,7 @@ void sort_faces(Scene *scene, View3D *v3d)
MEM_freeN(index);
- DAG_id_flush_update(ob->data, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/editmball.c
index 9ab985fb3fb..b9bb219783f 100644
--- a/source/blender/editors/metaball/mball_edit.c
+++ b/source/blender/editors/metaball/editmball.c
@@ -212,8 +212,8 @@ static int select_deselect_all_metaelems_exec(bContext *C, wmOperator *op)
else ml->flag |= SELECT;
ml= ml->next;
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, mb);
- //DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ //DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
return OPERATOR_FINISHED;
@@ -251,7 +251,7 @@ static int select_inverse_metaelems_exec(bContext *C, wmOperator *op)
ml->flag |= SELECT;
ml= ml->next;
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, mb);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
}
return OPERATOR_FINISHED;
@@ -296,7 +296,7 @@ static int select_random_metaelems_exec(bContext *C, wmOperator *op)
ml= ml->next;
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, mb);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -325,6 +325,7 @@ void MBALL_OT_select_random_metaelems(struct wmOperatorType *ot)
/* Duplicate selected MetaElements */
static int duplicate_metaelems_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
MetaBall *mb = (MetaBall*)obedit->data;
MetaElem *ml, *newml;
@@ -340,8 +341,8 @@ static int duplicate_metaelems_exec(bContext *C, wmOperator *op)
}
ml= ml->prev;
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
return OPERATOR_FINISHED;
@@ -383,6 +384,7 @@ void MBALL_OT_duplicate_metaelems(wmOperatorType *ot)
/* Delete all selected MetaElems (not MetaBall) */
static int delete_metaelems_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
MetaBall *mb= (MetaBall*)obedit->data;
MetaElem *ml, *next;
@@ -398,8 +400,8 @@ static int delete_metaelems_exec(bContext *C, wmOperator *op)
}
ml= next;
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
return OPERATOR_FINISHED;
@@ -424,6 +426,7 @@ void MBALL_OT_delete_metaelems(wmOperatorType *ot)
/* Hide selected MetaElems */
static int hide_metaelems_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
MetaBall *mb= (MetaBall*)obedit->data;
MetaElem *ml;
@@ -447,8 +450,8 @@ static int hide_metaelems_exec(bContext *C, wmOperator *op)
ml= ml->next;
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
return OPERATOR_FINISHED;
@@ -476,6 +479,7 @@ void MBALL_OT_hide_metaelems(wmOperatorType *ot)
/* Unhide all edited MetaElems */
static int reveal_metaelems_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
MetaBall *mb= (MetaBall*)obedit->data;
MetaElem *ml;
@@ -487,8 +491,8 @@ static int reveal_metaelems_exec(bContext *C, wmOperator *op)
ml->flag &= ~MB_HIDE;
ml= ml->next;
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
}
return OPERATOR_FINISHED;
@@ -580,7 +584,7 @@ void mouse_mball(bContext *C, short mval[2], int extend)
}
mb->lastelem= act;
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, mb);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
}
}
}
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/editconstraint.c
index 9b073ed5878..23b3caf8e26 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/editconstraint.c
@@ -76,6 +76,9 @@
#include "object_intern.h"
+/* XXX */
+static int pupmenu() {return 0;}
+
/* -------------- Get Active Constraint Data ---------------------- */
/* if object in posemode, active bone constraints, else object constraints */
@@ -462,12 +465,6 @@ void object_test_constraints (Object *owner)
/* ---------- Distance-Dependent Constraints ---------- */
/* StretchTo, Limit Distance */
-static int stretchto_poll(bContext *C)
-{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", &RNA_StretchToConstraint);
- return (ptr.id.data && ptr.data);
-}
-
static int stretchto_reset_exec (bContext *C, wmOperator *op)
{
PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", &RNA_StretchToConstraint);
@@ -487,7 +484,6 @@ void CONSTRAINT_OT_stretchto_reset (wmOperatorType *ot)
ot->description= "Reset original length of bone for Stretch To Constraint.";
ot->exec= stretchto_reset_exec;
- ot->poll= stretchto_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -505,12 +501,6 @@ static int limitdistance_reset_exec (bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int limitdistance_poll(bContext *C)
-{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", &RNA_LimitDistanceConstraint);
- return (ptr.id.data && ptr.data);
-}
-
void CONSTRAINT_OT_limitdistance_reset (wmOperatorType *ot)
{
/* identifiers */
@@ -519,7 +509,6 @@ void CONSTRAINT_OT_limitdistance_reset (wmOperatorType *ot)
ot->description= "Reset limiting distance for Limit Distance Constraint.";
ot->exec= limitdistance_reset_exec;
- ot->poll= limitdistance_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -527,12 +516,6 @@ void CONSTRAINT_OT_limitdistance_reset (wmOperatorType *ot)
/* ------------- Child-Of Constraint ------------------ */
-static int childof_poll(bContext *C)
-{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", &RNA_ChildOfConstraint);
- return (ptr.id.data && ptr.data);
-}
-
/* ChildOf Constraint - set inverse callback */
static int childof_set_inverse_exec (bContext *C, wmOperator *op)
{
@@ -599,12 +582,12 @@ void CONSTRAINT_OT_childof_set_inverse (wmOperatorType *ot)
ot->description= "Set inverse correction for ChildOf constraint.";
ot->exec= childof_set_inverse_exec;
- ot->poll= childof_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
+
/* ChildOf Constraint - clear inverse callback */
static int childof_clear_inverse_exec (bContext *C, wmOperator *op)
{
@@ -629,7 +612,6 @@ void CONSTRAINT_OT_childof_clear_inverse (wmOperatorType *ot)
ot->description= "Clear inverse correction for ChildOf constraint.";
ot->exec= childof_clear_inverse_exec;
- ot->poll= childof_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -702,12 +684,6 @@ void ED_object_constraint_set_active(Object *ob, bConstraint *con)
}
}
-static int constraint_poll(bContext *C)
-{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint);
- return (ptr.id.data && ptr.data);
-}
-
static int constraint_delete_exec (bContext *C, wmOperator *op)
{
PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint);
@@ -735,7 +711,6 @@ void CONSTRAINT_OT_delete (wmOperatorType *ot)
/* callbacks */
ot->exec= constraint_delete_exec;
- ot->poll= constraint_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -772,7 +747,6 @@ void CONSTRAINT_OT_move_down (wmOperatorType *ot)
/* callbacks */
ot->exec= constraint_move_down_exec;
- ot->poll= constraint_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -810,7 +784,6 @@ void CONSTRAINT_OT_move_up (wmOperatorType *ot)
/* callbacks */
ot->exec= constraint_move_up_exec;
- ot->poll= constraint_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -822,6 +795,7 @@ void CONSTRAINT_OT_move_up (wmOperatorType *ot)
static int pose_constraints_clear_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
/* free constraints for all selected bones */
@@ -832,7 +806,7 @@ static int pose_constraints_clear_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
/* do updates */
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_object_flush_update(scene, ob, OB_RECALC_OB);
WM_event_add_notifier(C, NC_OBJECT|ND_POSE|ND_CONSTRAINT|NA_REMOVED, ob);
return OPERATOR_FINISHED;
@@ -853,6 +827,7 @@ void POSE_OT_constraints_clear(wmOperatorType *ot)
static int object_constraints_clear_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
/* do freeing */
@@ -860,7 +835,7 @@ static int object_constraints_clear_exec(bContext *C, wmOperator *op)
free_constraints(&ob->constraints);
/* do updates */
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_object_flush_update(scene, ob, OB_RECALC_OB);
WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, ob);
return OPERATOR_FINISHED;
@@ -1104,7 +1079,7 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
#ifndef DISABLE_PYTHON
/* popup a list of usable scripts */
menustr = buildmenu_pyconstraints(NULL, &scriptint);
- // XXX scriptint = pupmenu(menustr);
+ scriptint = pupmenu(menustr);
MEM_freeN(menustr);
/* only add constraint if a script was chosen */
@@ -1133,10 +1108,10 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
if ((ob->type==OB_ARMATURE) && (pchan)) {
ob->pose->flag |= POSE_RECALC; /* sort pose channels */
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA|OB_RECALC_OB);
}
else
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
/* notifiers for updates */
WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_ADDED, ob);
@@ -1371,6 +1346,7 @@ void POSE_OT_ik_add(wmOperatorType *ot)
/* remove IK constraints from selected bones */
static int pose_ik_clear_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
/* only remove IK Constraints */
@@ -1391,7 +1367,7 @@ static int pose_ik_clear_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
/* */
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, ob);
@@ -1413,4 +1389,3 @@ void POSE_OT_ik_clear(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/editgroup.c
index c83f3022c7c..9a184892e71 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/editgroup.c
@@ -32,20 +32,28 @@
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
+#include "BLI_arithb.h"
#include "DNA_group_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
+#include "DNA_view3d_types.h"
-#include "BKE_context.h"
#include "BKE_depsgraph.h"
-#include "BKE_global.h"
#include "BKE_group.h"
+#include "BKE_global.h"
+#include "BKE_context.h"
#include "BKE_main.h"
#include "BKE_report.h"
-#include "BKE_scene.h"
+#include "ED_view3d.h"
+#include "ED_space_api.h"
#include "ED_screen.h"
+#include "ED_types.h"
+#include "ED_util.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -55,8 +63,6 @@
#include "object_intern.h"
-/********************* 3d view operators ***********************/
-
static int objects_add_active_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
@@ -64,12 +70,13 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
Group *group;
int ok = 0;
- if(!ob) return OPERATOR_CANCELLED;
+ if (!ob) return OPERATOR_CANCELLED;
/* linking to same group requires its own loop so we can avoid
looking up the active objects groups each time */
- for(group= G.main->group.first; group; group=group->id.next) {
+ group= G.main->group.first;
+ while(group) {
if(object_in_group(ob, group)) {
/* Assign groups to selected objects */
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
@@ -82,18 +89,22 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
}
+ group= group->id.next;
}
- if(!ok) BKE_report(op->reports, RPT_ERROR, "Active Object contains no groups");
+ if (!ok) BKE_report(op->reports, RPT_ERROR, "Active Object contains no groups");
- DAG_scene_sort(scene);
+ DAG_scene_sort(CTX_data_scene(C));
+
WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
return OPERATOR_FINISHED;
+
}
void GROUP_OT_objects_add_active(wmOperatorType *ot)
{
+
/* identifiers */
ot->name= "Add Selected To Active Group";
ot->description = "Add the object to an object group that contains the active object.";
@@ -114,12 +125,13 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
Group *group;
int ok = 0;
- if(!ob) return OPERATOR_CANCELLED;
+ if (!ob) return OPERATOR_CANCELLED;
/* linking to same group requires its own loop so we can avoid
looking up the active objects groups each time */
- for(group= G.main->group.first; group; group=group->id.next) {
+ group= G.main->group.first;
+ while(group) {
if(object_in_group(ob, group)) {
/* Assign groups to selected objects */
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
@@ -132,18 +144,22 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
}
+ group= group->id.next;
}
- if(!ok) BKE_report(op->reports, RPT_ERROR, "Active Object contains no groups");
+ if (!ok) BKE_report(op->reports, RPT_ERROR, "Active Object contains no groups");
- DAG_scene_sort(scene);
+ DAG_scene_sort(CTX_data_scene(C));
+
WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
return OPERATOR_FINISHED;
+
}
void GROUP_OT_objects_remove_active(wmOperatorType *ot)
{
+
/* identifiers */
ot->name= "Remove Selected From Active Group";
ot->description = "Remove the object from an object group that contains the active object.";
@@ -157,37 +173,39 @@ void GROUP_OT_objects_remove_active(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int group_objects_remove_exec(bContext *C, wmOperator *op)
+static int group_remove_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Group *group= NULL;
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
group = NULL;
- while((group = find_group(base->object, group)))
+ while( (group = find_group(base->object, group)) ) {
rem_from_group(group, base->object);
-
+ }
base->object->flag &= ~OB_FROMGROUP;
base->flag &= ~OB_FROMGROUP;
base->object->recalc= OB_RECALC_OB;
}
CTX_DATA_END;
- DAG_scene_sort(scene);
+ DAG_scene_sort(CTX_data_scene(C));
+
WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
return OPERATOR_FINISHED;
+
}
void GROUP_OT_objects_remove(wmOperatorType *ot)
{
+
/* identifiers */
ot->name= "Remove From Groups";
ot->description = "Remove selected objects from all groups.";
ot->idname= "GROUP_OT_objects_remove";
/* api callbacks */
- ot->exec= group_objects_remove_exec;
+ ot->exec= group_remove_exec;
ot->poll= ED_operator_scene_editable;
/* flags */
@@ -196,7 +214,6 @@ void GROUP_OT_objects_remove(wmOperatorType *ot)
static int group_create_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Group *group= NULL;
char gid[32]; //group id
@@ -212,14 +229,17 @@ static int group_create_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- DAG_scene_sort(scene);
+ DAG_scene_sort(CTX_data_scene(C));
+
WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
return OPERATOR_FINISHED;
+
}
void GROUP_OT_group_create(wmOperatorType *ot)
{
+
/* identifiers */
ot->name= "Create New Group";
ot->description = "Create an object group.";
@@ -235,130 +255,3 @@ void GROUP_OT_group_create(wmOperatorType *ot)
RNA_def_string(ot->srna, "GID", "Group", 32, "Name", "Name of the new group");
}
-/****************** properties window operators *********************/
-
-static int group_add_exec(bContext *C, wmOperator *op)
-{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Base *base;
- Group *group;
- int value= RNA_enum_get(op->ptr, "group");
-
- if(!ob)
- return OPERATOR_CANCELLED;
-
- base= object_in_scene(ob, scene);
- if(!base)
- return OPERATOR_CANCELLED;
-
- if(value == -1)
- group= add_group( "Group" );
- else
- group= BLI_findlink(&bmain->group, value);
-
- if(group) {
- add_to_group(group, ob);
- ob->flag |= OB_FROMGROUP;
- base->flag |= OB_FROMGROUP;
- }
-
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
-
- return OPERATOR_FINISHED;
-}
-
-static EnumPropertyItem group_items[]= {
- {-1, "ADD_NEW", 0, "Add New Group", ""},
- {0, NULL, 0, NULL, NULL}};
-
-static EnumPropertyItem *group_itemf(bContext *C, PointerRNA *ptr, int *free)
-{
- EnumPropertyItem tmp = {0, "", 0, "", ""};
- EnumPropertyItem *item= NULL;
- Main *bmain;
- Group *group;
- int a, totitem= 0;
-
- if(!C) /* needed for docs */
- return group_items;
-
- RNA_enum_items_add_value(&item, &totitem, group_items, -1);
-
- bmain= CTX_data_main(C);
- if(bmain->group.first)
- RNA_enum_item_add_separator(&item, &totitem);
-
- for(a=0, group=bmain->group.first; group; group=group->id.next, a++) {
- tmp.value= a;
- tmp.identifier= group->id.name+2;
- tmp.name= group->id.name+2;
- RNA_enum_item_add(&item, &totitem, &tmp);
- }
-
- RNA_enum_item_end(&item, &totitem);
-
- *free= 1;
-
- return item;
-}
-
-void OBJECT_OT_group_add(wmOperatorType *ot)
-{
- PropertyRNA *prop;
-
- /* identifiers */
- ot->name= "Add Group";
- ot->idname= "OBJECT_OT_group_add";
-
- /* api callbacks */
- ot->exec= group_add_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- prop= RNA_def_enum(ot->srna, "group", group_items, -1, "Group", "Group to add object to.");
- RNA_def_enum_funcs(prop, group_itemf);
-}
-
-static int group_remove_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Group *group= CTX_data_pointer_get_type(C, "group", &RNA_Group).data;
- Base *base;
-
- if(!ob || !group)
- return OPERATOR_CANCELLED;
-
- base= object_in_scene(ob, scene);
- if(!base)
- return OPERATOR_CANCELLED;
-
- rem_from_group(group, ob);
-
- if(find_group(ob, NULL) == NULL) {
- ob->flag &= ~OB_FROMGROUP;
- base->flag &= ~OB_FROMGROUP;
- }
-
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_group_remove(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Remove Group";
- ot->idname= "OBJECT_OT_group_remove";
-
- /* api callbacks */
- ot->exec= group_remove_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/editkey.c
index 2ec3edd846a..82194a4c3b4 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/editkey.c
@@ -473,7 +473,7 @@ int ED_object_shape_key_remove(bContext *C, Scene *scene, Object *ob)
free_libblock_us(&(bmain->key), key);
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, OBACT, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
return 1;
@@ -481,18 +481,14 @@ int ED_object_shape_key_remove(bContext *C, Scene *scene, Object *ob)
/********************** shape key operators *********************/
-static int shape_key_poll(bContext *C)
-{
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- ID *data= (ob)? ob->data: NULL;
- return (ob && !ob->id.lib && data && !data->lib);
-}
-
static int shape_key_add_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ if(!ob)
+ return OPERATOR_CANCELLED;
+
ED_object_shape_key_add(C, scene, ob);
return OPERATOR_FINISHED;
@@ -505,7 +501,6 @@ void OBJECT_OT_shape_key_add(wmOperatorType *ot)
ot->idname= "OBJECT_OT_shape_key_add";
/* api callbacks */
- ot->poll= shape_key_poll;
ot->exec= shape_key_add_exec;
/* flags */
@@ -514,9 +509,12 @@ void OBJECT_OT_shape_key_add(wmOperatorType *ot)
static int shape_key_remove_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ Scene *scene= CTX_data_scene(C);
+ if(!ob)
+ return OPERATOR_CANCELLED;
+
if(!ED_object_shape_key_remove(C, scene, ob))
return OPERATOR_CANCELLED;
@@ -530,10 +528,97 @@ void OBJECT_OT_shape_key_remove(wmOperatorType *ot)
ot->idname= "OBJECT_OT_shape_key_remove";
/* api callbacks */
- ot->poll= shape_key_poll;
ot->exec= shape_key_remove_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
+void move_keys(Object *ob)
+{
+#if 0
+ /* XXX probably goes away entirely */
+ Key *key;
+ KeyBlock *kb;
+ float div, dy, oldpos, vec[3], dvec[3];
+ int afbreek=0, firsttime= 1;
+ unsigned short event = 0;
+ short mval[2], val, xo, yo;
+ char str[32];
+
+ if(G.sipo->blocktype!=ID_KE) return;
+
+ if(G.sipo->ipo && G.sipo->ipo->id.lib) return;
+ if(G.sipo->editipo==NULL) return;
+
+ key= ob_get_key(ob);
+ if(key==NULL) return;
+
+ /* which kb is involved */
+ kb= BLI_findlink(&key->block, ob->shapenr-1);
+ if(kb==NULL) return;
+
+ oldpos= kb->pos;
+
+ getmouseco_areawin(mval);
+ xo= mval[0];
+ yo= mval[1];
+ dvec[0]=dvec[1]=dvec[2]= 0.0;
+
+ while(afbreek==0) {
+ getmouseco_areawin(mval);
+ if(mval[0]!=xo || mval[1]!=yo || firsttime) {
+ firsttime= 0;
+
+ dy= (float)(mval[1]- yo);
+
+ div= (float)(G.v2d->mask.ymax-G.v2d->mask.ymin);
+ dvec[1]+= (G.v2d->cur.ymax-G.v2d->cur.ymin)*(dy)/div;
+
+ VECCOPY(vec, dvec);
+
+ apply_keyb_grid(vec, 0.0, 1.0, 0.1, U.flag & USER_AUTOGRABGRID);
+ apply_keyb_grid(vec+1, 0.0, 1.0, 0.1, U.flag & USER_AUTOGRABGRID);
+
+ kb->pos= oldpos+vec[1];
+
+ sprintf(str, "Y: %.3f ", vec[1]);
+ headerprint(str);
+
+ xo= mval[0];
+ yo= mval[1];
+
+ force_draw(0);
+ }
+ else BIF_wait_for_statechange();
+
+ while(qtest()) {
+ event= extern_qread(&val);
+ if(val) {
+ switch(event) {
+ case ESCKEY:
+ case LEFTMOUSE:
+ case SPACEKEY:
+ afbreek= 1;
+ break;
+ default:
+ arrows_move_cursor(event);
+ }
+ }
+ }
+ }
+
+ if(event==ESCKEY) {
+ kb->pos= oldpos;
+ }
+
+ sort_keys(key);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+
+ /* for boundbox */
+ editipo_changed(G.sipo, 0);
+
+ BIF_undo_push("Move Shapekey(s)");
+#endif
+}
+
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/editlattice.c
index b35d3908b43..3e30efd635a 100644
--- a/source/blender/editors/object/object_lattice.c
+++ b/source/blender/editors/object/editlattice.c
@@ -31,15 +31,21 @@
#include "MEM_guardedalloc.h"
+#include "BLI_blenlib.h"
+#include "BLI_arithb.h"
+
#include "DNA_curve_types.h"
#include "DNA_key_types.h"
#include "DNA_lattice_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
+#include "DNA_view3d_types.h"
+#include "BKE_armature.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
+#include "BKE_global.h"
#include "BKE_key.h"
#include "BKE_lattice.h"
#include "BKE_mesh.h"
@@ -197,7 +203,7 @@ int de_select_all_exec(bContext *C, wmOperator *op)
else
setflagsLatt(obedit, 1);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
return OPERATOR_FINISHED;
}
@@ -228,6 +234,7 @@ int make_regular_poll(bContext *C)
int make_regular_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_edit_object(C);
Lattice *lt;
@@ -241,8 +248,8 @@ int make_regular_exec(bContext *C, wmOperator *op)
resizelattice(lt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
return OPERATOR_FINISHED;
}
@@ -311,7 +318,7 @@ void mouse_lattice(bContext *C, short mval[2], int extend)
else
bp->f1 ^= SELECT; /* swap */
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, vc.obedit);
}
}
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
deleted file mode 100644
index eaf7d41b9fe..00000000000
--- a/source/blender/editors/object/object_add.c
+++ /dev/null
@@ -1,1451 +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., 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.
- *
- * Contributor(s): Blender Foundation, 2002-2008 full recode
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <stdlib.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "DNA_action_types.h"
-#include "DNA_curve_types.h"
-#include "DNA_group_types.h"
-#include "DNA_material_types.h"
-#include "DNA_mesh_types.h"
-#include "DNA_meta_types.h"
-#include "DNA_object_fluidsim.h"
-#include "DNA_object_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_screen_types.h"
-#include "DNA_userdef_types.h"
-#include "DNA_view3d_types.h"
-#include "DNA_vfont_types.h"
-
-#include "BLI_arithb.h"
-#include "BLI_listbase.h"
-
-#include "BKE_anim.h"
-#include "BKE_armature.h"
-#include "BKE_constraint.h"
-#include "BKE_context.h"
-#include "BKE_curve.h"
-#include "BKE_customdata.h"
-#include "BKE_depsgraph.h"
-#include "BKE_DerivedMesh.h"
-#include "BKE_displist.h"
-#include "BKE_global.h"
-#include "BKE_group.h"
-#include "BKE_lattice.h"
-#include "BKE_library.h"
-#include "BKE_main.h"
-#include "BKE_material.h"
-#include "BKE_mball.h"
-#include "BKE_mesh.h"
-#include "BKE_modifier.h"
-#include "BKE_object.h"
-#include "BKE_particle.h"
-#include "BKE_report.h"
-#include "BKE_sca.h"
-#include "BKE_scene.h"
-#include "BKE_texture.h"
-#include "BKE_utildefines.h"
-
-#include "RNA_access.h"
-#include "RNA_define.h"
-#include "RNA_enum_types.h"
-
-#include "WM_api.h"
-#include "WM_types.h"
-
-#include "ED_anim_api.h"
-#include "ED_armature.h"
-#include "ED_curve.h"
-#include "ED_mball.h"
-#include "ED_mesh.h"
-#include "ED_object.h"
-#include "ED_screen.h"
-#include "ED_transform.h"
-
-#include "UI_interface.h"
-#include "UI_resources.h"
-
-#include "object_intern.h"
-
-/************************** Exported *****************************/
-
-void ED_object_base_init_from_view(bContext *C, Base *base)
-{
- View3D *v3d= CTX_wm_view3d(C);
- Scene *scene= CTX_data_scene(C);
- Object *ob= base->object;
-
- if (scene==NULL)
- return;
-
- if (v3d==NULL) {
- base->lay = scene->lay;
- VECCOPY(ob->loc, scene->cursor);
- }
- else {
- if (v3d->localview) {
- base->lay= ob->lay= v3d->layact | v3d->lay;
- VECCOPY(ob->loc, v3d->cursor);
- }
- else {
- base->lay= ob->lay= v3d->layact;
- VECCOPY(ob->loc, scene->cursor);
- }
-
- if (U.flag & USER_ADD_VIEWALIGNED) {
- ARegion *ar= CTX_wm_region(C);
- if(ar) {
- RegionView3D *rv3d= ar->regiondata;
-
- rv3d->viewquat[0]= -rv3d->viewquat[0];
- QuatToEul(rv3d->viewquat, ob->rot);
- rv3d->viewquat[0]= -rv3d->viewquat[0];
- }
- }
- }
- where_is_object(scene, ob);
-}
-
-/********************* Add Object Operator ********************/
-
-void add_object_draw(Scene *scene, View3D *v3d, int type) /* for toolbox or menus, only non-editmode stuff */
-{
- /* keep here to get things compile, remove later */
-}
-
-/* for object add primitive operators */
-static Object *object_add_type(bContext *C, int type)
-{
- Scene *scene= CTX_data_scene(C);
- Object *ob;
-
- /* for as long scene has editmode... */
- if (CTX_data_edit_object(C))
- ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* freedata, and undo */
-
- /* deselects all, sets scene->basact */
- ob= add_object(scene, type);
- /* editor level activate, notifiers */
- ED_base_object_activate(C, BASACT);
-
- /* more editor stuff */
- ED_object_base_init_from_view(C, BASACT);
-
- DAG_scene_sort(scene);
-
- return ob;
-}
-
-/* for object add operator */
-static int object_add_exec(bContext *C, wmOperator *op)
-{
- object_add_type(C, RNA_int_get(op->ptr, "type"));
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Add Object";
- ot->description = "Add an object to the scene.";
- ot->idname= "OBJECT_OT_add";
-
- /* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_add_exec;
-
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_enum(ot->srna, "type", object_type_items, 0, "Type", "");
-}
-
-/* ***************** add primitives *************** */
-/* ****** work both in and outside editmode ****** */
-
-static EnumPropertyItem prop_mesh_types[] = {
- {0, "PLANE", ICON_MESH_PLANE, "Plane", ""},
- {1, "CUBE", ICON_MESH_CUBE, "Cube", ""},
- {2, "CIRCLE", ICON_MESH_CIRCLE, "Circle", ""},
- {3, "UVSPHERE", ICON_MESH_UVSPHERE, "UVsphere", ""},
- {4, "ICOSPHERE", ICON_MESH_ICOSPHERE, "Icosphere", ""},
- {5, "CYLINDER", ICON_MESH_TUBE, "Cylinder", ""},
- {6, "CONE", ICON_MESH_CONE, "Cone", ""},
- {0, "", 0, NULL, NULL},
- {7, "GRID", ICON_MESH_GRID, "Grid", ""},
- {8, "MONKEY", ICON_MESH_MONKEY, "Monkey", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-static int object_add_mesh_exec(bContext *C, wmOperator *op)
-{
- Object *obedit= CTX_data_edit_object(C);
- int newob= 0;
-
- if(obedit==NULL || obedit->type!=OB_MESH) {
- object_add_type(C, OB_MESH);
- ED_object_enter_editmode(C, EM_DO_UNDO);
- newob = 1;
- }
- else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
-
- switch(RNA_enum_get(op->ptr, "type")) {
- case 0:
- WM_operator_name_call(C, "MESH_OT_primitive_plane_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case 1:
- WM_operator_name_call(C, "MESH_OT_primitive_cube_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case 2:
- WM_operator_name_call(C, "MESH_OT_primitive_circle_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case 3:
- WM_operator_name_call(C, "MESH_OT_primitive_uv_sphere_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case 4:
- WM_operator_name_call(C, "MESH_OT_primitive_ico_sphere_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case 5:
- WM_operator_name_call(C, "MESH_OT_primitive_cylinder_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case 6:
- WM_operator_name_call(C, "MESH_OT_primitive_cone_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case 7:
- WM_operator_name_call(C, "MESH_OT_primitive_grid_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- case 8:
- WM_operator_name_call(C, "MESH_OT_primitive_monkey_add", WM_OP_INVOKE_REGION_WIN, NULL);
- break;
- }
- /* userdef */
- if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
- ED_object_exit_editmode(C, EM_FREEDATA);
- }
-
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
-
- return OPERATOR_FINISHED;
-}
-
-
-void OBJECT_OT_mesh_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Add Mesh";
- ot->description = "Add a mesh object to the scene.";
- ot->idname= "OBJECT_OT_mesh_add";
-
- /* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_add_mesh_exec;
-
- ot->poll= ED_operator_scene_editable;
-
- /* flags: no register or undo, this operator calls operators */
- ot->flag= 0; //OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_enum(ot->srna, "type", prop_mesh_types, 0, "Primitive", "");
-}
-
-static EnumPropertyItem prop_curve_types[] = {
- {CU_BEZIER|CU_PRIM_CURVE, "BEZIER_CURVE", ICON_CURVE_BEZCURVE, "Bezier Curve", ""},
- {CU_BEZIER|CU_PRIM_CIRCLE, "BEZIER_CIRCLE", ICON_CURVE_BEZCIRCLE, "Bezier Circle", ""},
- {CU_NURBS|CU_PRIM_CURVE, "NURBS_CURVE", ICON_CURVE_NCURVE, "NURBS Curve", ""},
- {CU_NURBS|CU_PRIM_CIRCLE, "NURBS_CIRCLE", ICON_CURVE_NCIRCLE, "NURBS Circle", ""},
- {CU_NURBS|CU_PRIM_PATH, "PATH", ICON_CURVE_PATH, "Path", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-static int object_add_curve_exec(bContext *C, wmOperator *op)
-{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb;
- Nurb *nu;
- int newob= 0;
-
- if(obedit==NULL || obedit->type!=OB_CURVE) {
- object_add_type(C, OB_CURVE);
- ED_object_enter_editmode(C, 0);
- newob = 1;
- }
- else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
-
- obedit= CTX_data_edit_object(C);
- nu= add_nurbs_primitive(C, RNA_enum_get(op->ptr, "type"), newob);
- editnurb= curve_get_editcurve(obedit);
- BLI_addtail(editnurb, nu);
-
- /* userdef */
- if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
- ED_object_enter_editmode(C, 0);
- ED_object_exit_editmode(C, EM_FREEDATA);
- }
-
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
-
- return OPERATOR_FINISHED;
-}
-
-static int object_add_curve_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
- Object *obedit= CTX_data_edit_object(C);
- uiPopupMenu *pup;
- uiLayout *layout;
-
- pup= uiPupMenuBegin(C, op->type->name, 0);
- layout= uiPupMenuLayout(pup);
- if(!obedit || obedit->type == OB_CURVE)
- uiItemsEnumO(layout, op->type->idname, "type");
- else
- uiItemsEnumO(layout, "OBJECT_OT_surface_add", "type");
- uiPupMenuEnd(C, pup);
-
- return OPERATOR_CANCELLED;
-}
-
-void OBJECT_OT_curve_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Add Curve";
- ot->description = "Add a curve object to the scene.";
- ot->idname= "OBJECT_OT_curve_add";
-
- /* api callbacks */
- ot->invoke= object_add_curve_invoke;
- ot->exec= object_add_curve_exec;
-
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_enum(ot->srna, "type", prop_curve_types, 0, "Primitive", "");
-}
-
-static EnumPropertyItem prop_surface_types[]= {
- {CU_PRIM_CURVE|CU_NURBS, "NURBS_CURVE", ICON_SURFACE_NCURVE, "NURBS Curve", ""},
- {CU_PRIM_CIRCLE|CU_NURBS, "NURBS_CIRCLE", ICON_SURFACE_NCIRCLE, "NURBS Circle", ""},
- {CU_PRIM_PATCH|CU_NURBS, "NURBS_SURFACE", ICON_SURFACE_NSURFACE, "NURBS Surface", ""},
- {CU_PRIM_TUBE|CU_NURBS, "NURBS_TUBE", ICON_SURFACE_NTUBE, "NURBS Tube", ""},
- {CU_PRIM_SPHERE|CU_NURBS, "NURBS_SPHERE", ICON_SURFACE_NSPHERE, "NURBS Sphere", ""},
- {CU_PRIM_DONUT|CU_NURBS, "NURBS_DONUT", ICON_SURFACE_NDONUT, "NURBS Donut", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-static int object_add_surface_exec(bContext *C, wmOperator *op)
-{
- Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb;
- Nurb *nu;
- int newob= 0;
-
- if(obedit==NULL || obedit->type!=OB_SURF) {
- object_add_type(C, OB_SURF);
- ED_object_enter_editmode(C, 0);
- newob = 1;
- }
- else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
-
- obedit= CTX_data_edit_object(C);
- nu= add_nurbs_primitive(C, RNA_enum_get(op->ptr, "type"), newob);
- editnurb= curve_get_editcurve(obedit);
- BLI_addtail(editnurb, nu);
-
- /* userdef */
- if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
- ED_object_exit_editmode(C, EM_FREEDATA);
- }
-
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_surface_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Add Surface";
- ot->description = "Add a surface object to the scene.";
- ot->idname= "OBJECT_OT_surface_add";
-
- /* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_add_surface_exec;
-
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_enum(ot->srna, "type", prop_surface_types, 0, "Primitive", "");
-}
-
-static EnumPropertyItem prop_metaball_types[]= {
- {MB_BALL, "MBALL_BALL", ICON_META_BALL, "Meta Ball", ""},
- {MB_TUBE, "MBALL_TUBE", ICON_META_TUBE, "Meta Tube", ""},
- {MB_PLANE, "MBALL_PLANE", ICON_META_PLANE, "Meta Plane", ""},
- {MB_CUBE, "MBALL_CUBE", ICON_META_CUBE, "Meta Cube", ""},
- {MB_ELIPSOID, "MBALL_ELLIPSOID", ICON_META_ELLIPSOID, "Meta Ellipsoid", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-static int object_metaball_add_exec(bContext *C, wmOperator *op)
-{
- Object *obedit= CTX_data_edit_object(C);
- MetaBall *mball;
- MetaElem *elem;
- int newob= 0;
-
- if(obedit==NULL || obedit->type!=OB_MBALL) {
- object_add_type(C, OB_MBALL);
- ED_object_enter_editmode(C, 0);
- newob = 1;
- }
- else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
-
- obedit= CTX_data_edit_object(C);
- elem= (MetaElem*)add_metaball_primitive(C, RNA_enum_get(op->ptr, "type"), newob);
- mball= (MetaBall*)obedit->data;
- BLI_addtail(mball->editelems, elem);
-
- /* userdef */
- if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
- ED_object_exit_editmode(C, EM_FREEDATA);
- }
-
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
-
- return OPERATOR_FINISHED;
-}
-
-static int object_metaball_add_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
- Object *obedit= CTX_data_edit_object(C);
- uiPopupMenu *pup;
- uiLayout *layout;
-
- pup= uiPupMenuBegin(C, op->type->name, 0);
- layout= uiPupMenuLayout(pup);
- if(!obedit || obedit->type == OB_MBALL)
- uiItemsEnumO(layout, op->type->idname, "type");
- else
- uiItemsEnumO(layout, "OBJECT_OT_metaball_add", "type");
- uiPupMenuEnd(C, pup);
-
- return OPERATOR_CANCELLED;
-}
-
-void OBJECT_OT_metaball_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Metaball";
- ot->description= "Add an metaball object to the scene.";
- ot->idname= "OBJECT_OT_metaball_add";
-
- /* api callbacks */
- ot->invoke= object_metaball_add_invoke;
- ot->exec= object_metaball_add_exec;
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_enum(ot->srna, "type", prop_metaball_types, 0, "Primitive", "");
-}
-static int object_add_text_exec(bContext *C, wmOperator *op)
-{
- Object *obedit= CTX_data_edit_object(C);
-
- if(obedit && obedit->type==OB_FONT)
- return OPERATOR_CANCELLED;
-
- object_add_type(C, OB_FONT);
- obedit= CTX_data_active_object(C);
-
- if(U.flag & USER_ADD_EDITMODE)
- ED_object_enter_editmode(C, 0);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_text_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Add Text";
- ot->description = "Add a text object to the scene";
- ot->idname= "OBJECT_OT_text_add";
-
- /* api callbacks */
- ot->exec= object_add_text_exec;
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-static int object_armature_add_exec(bContext *C, wmOperator *op)
-{
- Object *obedit= CTX_data_edit_object(C);
- View3D *v3d= CTX_wm_view3d(C);
- RegionView3D *rv3d= NULL;
- int newob= 0;
-
- if ((obedit==NULL) || (obedit->type != OB_ARMATURE)) {
- object_add_type(C, OB_ARMATURE);
- ED_object_enter_editmode(C, 0);
- newob = 1;
- }
- else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
-
- if(v3d)
- rv3d= CTX_wm_region(C)->regiondata;
-
- /* v3d and rv3d are allowed to be NULL */
- add_primitive_bone(CTX_data_scene(C), v3d, rv3d);
-
- /* userdef */
- if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
- ED_object_exit_editmode(C, EM_FREEDATA);
- }
-
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_armature_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Add Armature";
- ot->description = "Add an armature object to the scene.";
- ot->idname= "OBJECT_OT_armature_add";
-
- /* api callbacks */
- ot->exec= object_armature_add_exec;
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-static int object_primitive_add_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
- uiPopupMenu *pup= uiPupMenuBegin(C, "Add Object", 0);
- uiLayout *layout= uiPupMenuLayout(pup);
-
- uiItemMenuEnumO(layout, "Mesh", ICON_OUTLINER_OB_MESH, "OBJECT_OT_mesh_add", "type");
- uiItemMenuEnumO(layout, "Curve", ICON_OUTLINER_OB_CURVE, "OBJECT_OT_curve_add", "type");
- uiItemMenuEnumO(layout, "Surface", ICON_OUTLINER_OB_SURFACE, "OBJECT_OT_surface_add", "type");
- uiItemMenuEnumO(layout, NULL, ICON_OUTLINER_OB_META, "OBJECT_OT_metaball_add", "type");
- uiItemO(layout, "Text", ICON_OUTLINER_OB_FONT, "OBJECT_OT_text_add");
- uiItemS(layout);
- uiItemO(layout, "Armature", ICON_OUTLINER_OB_ARMATURE, "OBJECT_OT_armature_add");
- uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_LATTICE, "OBJECT_OT_add", "type", OB_LATTICE);
- uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_EMPTY, "OBJECT_OT_add", "type", OB_EMPTY);
- uiItemS(layout);
- uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_CAMERA, "OBJECT_OT_add", "type", OB_CAMERA);
- uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_LAMP, "OBJECT_OT_add", "type", OB_LAMP);
-
- uiPupMenuEnd(C, pup);
-
- /* this operator is only for a menu, not used further */
- return OPERATOR_CANCELLED;
-}
-
-/* only used as menu */
-void OBJECT_OT_primitive_add(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Add Primitive";
- ot->description = "Add a primitive object.";
- ot->idname= "OBJECT_OT_primitive_add";
-
- /* api callbacks */
- ot->invoke= object_primitive_add_invoke;
-
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= 0;
-}
-
-/**************************** Delete Object *************************/
-
-/* remove base from a specific scene */
-/* note: now unlinks constraints as well */
-void ED_base_object_free_and_unlink(Scene *scene, Base *base)
-{
- BLI_remlink(&scene->base, base);
- free_libblock_us(&G.main->object, base->object);
- if(scene->basact==base) scene->basact= NULL;
- MEM_freeN(base);
-}
-
-static int object_delete_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- int islamp= 0;
-
- if(CTX_data_edit_object(C))
- return OPERATOR_CANCELLED;
-
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
-
- if(base->object->type==OB_LAMP) islamp= 1;
-
- /* remove from current scene only */
- ED_base_object_free_and_unlink(scene, base);
- }
- CTX_DATA_END;
-
- if(islamp) reshadeall_displist(scene); /* only frees displist */
-
- DAG_scene_sort(scene);
- ED_anim_dag_flush_update(C);
-
- WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, CTX_data_scene(C));
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_delete(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Delete";
- ot->description = "Delete selected objects.";
- ot->idname= "OBJECT_OT_delete";
-
- /* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= object_delete_exec;
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-/**************************** Copy Utilities ******************************/
-
-static void copy_object__forwardModifierLinks(void *userData, Object *ob,
- ID **idpoin)
-{
- /* this is copied from ID_NEW; it might be better to have a macro */
- if(*idpoin && (*idpoin)->newid) *idpoin = (*idpoin)->newid;
-}
-
-/* after copying objects, copied data should get new pointers */
-static void copy_object_set_idnew(bContext *C, int dupflag)
-{
- Object *ob;
- Material *ma, *mao;
- ID *id;
-#if 0 // XXX old animation system
- Ipo *ipo;
- bActionStrip *strip;
-#endif // XXX old animation system
- int a;
-
- /* XXX check object pointers */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- ob= base->object;
- relink_constraints(&ob->constraints);
- if (ob->pose){
- bPoseChannel *chan;
- for (chan = ob->pose->chanbase.first; chan; chan=chan->next){
- relink_constraints(&chan->constraints);
- }
- }
- modifiers_foreachIDLink(ob, copy_object__forwardModifierLinks, NULL);
- ID_NEW(ob->parent);
- ID_NEW(ob->track);
- ID_NEW(ob->proxy);
- ID_NEW(ob->proxy_group);
-
-#if 0 // XXX old animation system
- for(strip= ob->nlastrips.first; strip; strip= strip->next) {
- bActionModifier *amod;
- for(amod= strip->modifiers.first; amod; amod= amod->next)
- ID_NEW(amod->ob);
- }
-#endif // XXX old animation system
- }
- CTX_DATA_END;
-
- /* materials */
- if( dupflag & USER_DUP_MAT) {
- mao= G.main->mat.first;
- while(mao) {
- if(mao->id.newid) {
-
- ma= (Material *)mao->id.newid;
-
- if(dupflag & USER_DUP_TEX) {
- for(a=0; a<MAX_MTEX; a++) {
- if(ma->mtex[a]) {
- id= (ID *)ma->mtex[a]->tex;
- if(id) {
- ID_NEW_US(ma->mtex[a]->tex)
- else ma->mtex[a]->tex= copy_texture(ma->mtex[a]->tex);
- id->us--;
- }
- }
- }
- }
-#if 0 // XXX old animation system
- id= (ID *)ma->ipo;
- if(id) {
- ID_NEW_US(ma->ipo)
- else ma->ipo= copy_ipo(ma->ipo);
- id->us--;
- }
-#endif // XXX old animation system
- }
- mao= mao->id.next;
- }
- }
-
-#if 0 // XXX old animation system
- /* lamps */
- if( dupflag & USER_DUP_IPO) {
- Lamp *la= G.main->lamp.first;
- while(la) {
- if(la->id.newid) {
- Lamp *lan= (Lamp *)la->id.newid;
- id= (ID *)lan->ipo;
- if(id) {
- ID_NEW_US(lan->ipo)
- else lan->ipo= copy_ipo(lan->ipo);
- id->us--;
- }
- }
- la= la->id.next;
- }
- }
-
- /* ipos */
- ipo= G.main->ipo.first;
- while(ipo) {
- if(ipo->id.lib==NULL && ipo->id.newid) {
- Ipo *ipon= (Ipo *)ipo->id.newid;
- IpoCurve *icu;
- for(icu= ipon->curve.first; icu; icu= icu->next) {
- if(icu->driver) {
- ID_NEW(icu->driver->ob);
- }
- }
- }
- ipo= ipo->id.next;
- }
-#endif // XXX old animation system
-
- set_sca_new_poins();
-
- clear_id_newpoins();
-}
-
-/********************* Make Duplicates Real ************************/
-
-static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base)
-{
- Base *basen;
- Object *ob;
- ListBase *lb;
- DupliObject *dob;
-
- if(!base && !(base = BASACT))
- return;
-
- if(!(base->object->transflag & OB_DUPLI))
- return;
-
- lb= object_duplilist(scene, base->object);
-
- for(dob= lb->first; dob; dob= dob->next) {
- ob= copy_object(dob->ob);
- /* font duplis can have a totcol without material, we get them from parent
- * should be implemented better...
- */
- if(ob->mat==NULL) ob->totcol= 0;
-
- basen= MEM_dupallocN(base);
- basen->flag &= ~OB_FROMDUPLI;
- BLI_addhead(&scene->base, basen); /* addhead: othwise eternal loop */
- basen->object= ob;
- ob->ipo= NULL; /* make sure apply works */
- ob->parent= ob->track= NULL;
- ob->disp.first= ob->disp.last= NULL;
- ob->transflag &= ~OB_DUPLI;
-
- Mat4CpyMat4(ob->obmat, dob->mat);
- ED_object_apply_obmat(ob);
- }
-
- copy_object_set_idnew(C, 0);
-
- free_object_duplilist(lb);
-
- base->object->transflag &= ~OB_DUPLI;
-}
-
-static int object_duplicates_make_real_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
-
- clear_id_newpoins();
-
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- make_object_duplilist_real(C, scene, base);
- }
- CTX_DATA_END;
-
- DAG_scene_sort(scene);
- ED_anim_dag_flush_update(C);
- WM_event_add_notifier(C, NC_SCENE, scene);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_duplicates_make_real(wmOperatorType *ot)
-{
-
- /* identifiers */
- ot->name= "Make Duplicates Real";
- ot->description = "Make dupli objects attached to this object real.";
- ot->idname= "OBJECT_OT_duplicates_make_real";
-
- /* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= object_duplicates_make_real_exec;
-
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-/**************************** Convert **************************/
-
-static EnumPropertyItem convert_target_items[]= {
- {OB_CURVE, "CURVE", 0, "Curve", ""},
- {OB_MESH, "MESH", 0, "Mesh", ""},
- {0, NULL, 0, NULL, NULL}};
-
-static void curvetomesh(Scene *scene, Object *ob)
-{
- Curve *cu= ob->data;
-
- if(cu->disp.first==0)
- makeDispListCurveTypes(scene, ob, 0); /* force creation */
-
- nurbs_to_mesh(ob); /* also does users */
-
- if(ob->type == OB_MESH)
- object_free_modifiers(ob);
-}
-
-static int convert_poll(bContext *C)
-{
- Object *obact= CTX_data_active_object(C);
- Scene *scene= CTX_data_scene(C);
-
- return (!scene->id.lib && obact && scene->obedit != obact && (obact->flag & SELECT));
-}
-
-static int convert_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- Base *basen=NULL, *basact, *basedel=NULL;
- Object *ob, *ob1, *obact= CTX_data_active_object(C);
- DerivedMesh *dm;
- Curve *cu;
- Nurb *nu;
- MetaBall *mb;
- Mesh *me;
- int target= RNA_enum_get(op->ptr, "target");
- int keep_original= RNA_boolean_get(op->ptr, "keep_original");
- int a;
-
- /* don't forget multiple users! */
-
- /* reset flags */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- ob= base->object;
- ob->flag &= ~OB_DONE;
- }
- CTX_DATA_END;
-
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- ob= base->object;
-
- if(ob->flag & OB_DONE)
- continue;
- else if(ob->type==OB_MESH && ob->modifiers.first) { /* converting a mesh with no modifiers causes a segfault */
- ob->flag |= OB_DONE;
- basedel = base;
-
- ob1= copy_object(ob);
- ob1->recalc |= OB_RECALC;
-
- basen= MEM_mallocN(sizeof(Base), "duplibase");
- *basen= *base;
- BLI_addhead(&scene->base, basen); /* addhead: otherwise eternal loop */
- basen->object= ob1;
- basen->flag |= SELECT;
- base->flag &= ~SELECT;
- ob->flag &= ~SELECT;
-
- /* decrement original mesh's usage count */
- me= ob1->data;
- me->id.us--;
-
- /* make a new copy of the mesh */
- ob1->data= copy_mesh(me);
-
- /* make new mesh data from the original copy */
- dm= mesh_get_derived_final(scene, ob1, CD_MASK_MESH);
- /* dm= mesh_create_derived_no_deform(ob1, NULL); this was called original (instead of get_derived). man o man why! (ton) */
-
- DM_to_mesh(dm, ob1->data);
-
- dm->release(dm);
- object_free_modifiers(ob1); /* after derivedmesh calls! */
- }
- else if(ob->type==OB_FONT) {
- ob->flag |= OB_DONE;
-
- ob->type= OB_CURVE;
- cu= ob->data;
-
- if(cu->vfont) {
- cu->vfont->id.us--;
- cu->vfont= 0;
- }
- if(cu->vfontb) {
- cu->vfontb->id.us--;
- cu->vfontb= 0;
- }
- if(cu->vfonti) {
- cu->vfonti->id.us--;
- cu->vfonti= 0;
- }
- if(cu->vfontbi) {
- cu->vfontbi->id.us--;
- cu->vfontbi= 0;
- }
- /* other users */
- if(cu->id.us>1) {
- for(ob1= G.main->object.first; ob1; ob1=ob1->id.next) {
- if(ob1->data==cu) {
- ob1->type= OB_CURVE;
- ob1->recalc |= OB_RECALC;
- }
- }
- }
-
- for(nu=cu->nurb.first; nu; nu=nu->next)
- nu->charidx= 0;
-
- if(target == OB_MESH)
- curvetomesh(scene, ob);
- }
- else if(ELEM(ob->type, OB_CURVE, OB_SURF)) {
- ob->flag |= OB_DONE;
-
- if(target == OB_MESH)
- curvetomesh(scene, ob);
- }
- else if(ob->type==OB_MBALL) {
- ob= find_basis_mball(scene, ob);
-
- if(ob->disp.first && !(ob->flag & OB_DONE)) {
- ob->flag |= OB_DONE;
- basedel = base;
-
- ob1= copy_object(ob);
- ob1->recalc |= OB_RECALC;
-
- basen= MEM_mallocN(sizeof(Base), "duplibase");
- *basen= *base;
- BLI_addhead(&scene->base, basen); /* addhead: otherwise eternal loop */
- basen->object= ob1;
- basen->flag |= SELECT;
- basedel->flag &= ~SELECT;
- ob->flag &= ~SELECT;
-
- mb= ob1->data;
- mb->id.us--;
-
- ob1->data= add_mesh("Mesh");
- ob1->type= OB_MESH;
-
- me= ob1->data;
- me->totcol= mb->totcol;
- if(ob1->totcol) {
- me->mat= MEM_dupallocN(mb->mat);
- for(a=0; a<ob1->totcol; a++) id_us_plus((ID *)me->mat[a]);
- }
-
- mball_to_mesh(&ob->disp, ob1->data);
-
- /* So we can see the wireframe */
- BASACT= basen; // XXX hm
- }
- else
- continue;
- }
- else
- continue;
-
- /* If the original object is active then make this object active */
- if(basen) {
- if(ob == obact) {
- ED_base_object_activate(C, basen);
- basact = basen;
- }
-
- basen= NULL;
- }
-
- /* delete original if needed */
- if(basedel) {
- if(!keep_original)
- ED_base_object_free_and_unlink(scene, basedel);
-
- basedel = NULL;
- }
- }
- CTX_DATA_END;
-
- /* delete object should renew depsgraph */
- if(!keep_original)
- DAG_scene_sort(scene);
-
- /* texspace and normals */
- if(!basen) BASACT= NULL; // XXX base;
-
-// XXX ED_object_enter_editmode(C, 0);
-// XXX exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR); /* freedata, but no undo */
- BASACT= basact;
-
- DAG_scene_sort(scene);
- WM_event_add_notifier(C, NC_SCENE, scene);
-
- return OPERATOR_FINISHED;
-}
-
-static int convert_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
- Object *obact= CTX_data_active_object(C);
- uiPopupMenu *pup;
- uiLayout *layout;
- char *title;
-
- if(obact->type==OB_FONT) {
- pup= uiPupMenuBegin(C, "Convert Font to", 0);
- layout= uiPupMenuLayout(pup);
-
- uiItemEnumO(layout, "Curve", 0, op->type->idname, "target", OB_CURVE);
- }
- else {
- if(obact->type == OB_MBALL)
- title= "Convert Metaball to";
- else if(obact->type == OB_CURVE)
- title= "Convert Curve to";
- else if(obact->type == OB_SURF)
- title= "Convert Nurbs Surface to";
- else if(obact->type == OB_MESH)
- title= "Convert Modifiers to";
- else
- return OPERATOR_CANCELLED;
-
- pup= uiPupMenuBegin(C, title, 0);
- layout= uiPupMenuLayout(pup);
- }
-
- uiItemBooleanO(layout, "Mesh (keep original)", 0, op->type->idname, "keep_original", 1);
- uiItemBooleanO(layout, "Mesh (delete original)", 0, op->type->idname, "keep_original", 0);
-
- uiPupMenuEnd(C, pup);
-
- return OPERATOR_CANCELLED;
-}
-
-void OBJECT_OT_convert(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Convert";
- ot->description = "Convert selected objects to another type.";
- ot->idname= "OBJECT_OT_convert";
-
- /* api callbacks */
- ot->invoke= convert_invoke;
- ot->exec= convert_exec;
- ot->poll= convert_poll;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- RNA_def_enum(ot->srna, "target", convert_target_items, OB_MESH, "Target", "Type of object to convert to.");
- RNA_def_boolean(ot->srna, "keep_original", 0, "Keep Original", "Keep original objects instead of replacing them.");
-}
-
-/************************** Add Duplicate **********************/
-
-/*
- dupflag: a flag made from constants declared in DNA_userdef_types.h
- The flag tells adduplicate() weather to copy data linked to the object, or to reference the existing data.
- U.dupflag for default operations or you can construct a flag as python does
- if the dupflag is 0 then no data will be copied (linked duplicate) */
-
-/* used below, assumes id.new is correct */
-/* leaves selection of base/object unaltered */
-static Base *object_add_duplicate_internal(Scene *scene, Base *base, int dupflag)
-{
- Base *basen= NULL;
- Material ***matarar;
- Object *ob, *obn;
- ID *id;
- int a, didit;
-
- ob= base->object;
- if(ob->mode & OB_MODE_POSE) {
- ; /* nothing? */
- }
- else {
- obn= copy_object(ob);
- obn->recalc |= OB_RECALC;
-
- basen= MEM_mallocN(sizeof(Base), "duplibase");
- *basen= *base;
- BLI_addhead(&scene->base, basen); /* addhead: prevent eternal loop */
- basen->object= obn;
-
- if(basen->flag & OB_FROMGROUP) {
- Group *group;
- for(group= G.main->group.first; group; group= group->id.next) {
- if(object_in_group(ob, group))
- add_to_group(group, obn);
- }
- obn->flag |= OB_FROMGROUP; /* this flag is unset with copy_object() */
- }
-
- /* duplicates using userflags */
-#if 0 // XXX old animation system
- if(dupflag & USER_DUP_IPO) {
- bConstraintChannel *chan;
- id= (ID *)obn->ipo;
-
- if(id) {
- ID_NEW_US( obn->ipo)
- else obn->ipo= copy_ipo(obn->ipo);
- id->us--;
- }
- /* Handle constraint ipos */
- for (chan=obn->constraintChannels.first; chan; chan=chan->next){
- id= (ID *)chan->ipo;
- if(id) {
- ID_NEW_US( chan->ipo)
- else chan->ipo= copy_ipo(chan->ipo);
- id->us--;
- }
- }
- }
- if(dupflag & USER_DUP_ACT){ /* Not buttons in the UI to modify this, add later? */
- id= (ID *)obn->action;
- if (id){
- ID_NEW_US(obn->action)
- else{
- obn->action= copy_action(obn->action);
- }
- id->us--;
- }
- }
-#endif // XXX old animation system
- if(dupflag & USER_DUP_MAT) {
- for(a=0; a<obn->totcol; a++) {
- id= (ID *)obn->mat[a];
- if(id) {
- ID_NEW_US(obn->mat[a])
- else obn->mat[a]= copy_material(obn->mat[a]);
- id->us--;
- }
- }
- }
- if(dupflag & USER_DUP_PSYS) {
- ParticleSystem *psys;
- for(psys=obn->particlesystem.first; psys; psys=psys->next) {
- id= (ID*) psys->part;
- if(id) {
- ID_NEW_US(psys->part)
- else psys->part= psys_copy_settings(psys->part);
- id->us--;
- }
- }
- }
-
- id= obn->data;
- didit= 0;
-
- switch(obn->type) {
- case OB_MESH:
- if(dupflag & USER_DUP_MESH) {
- ID_NEW_US2( obn->data )
- else {
- obn->data= copy_mesh(obn->data);
-
- if(obn->fluidsimSettings) {
- obn->fluidsimSettings->orgMesh = (Mesh *)obn->data;
- }
-
- didit= 1;
- }
- id->us--;
- }
- break;
- case OB_CURVE:
- if(dupflag & USER_DUP_CURVE) {
- ID_NEW_US2(obn->data )
- else {
- obn->data= copy_curve(obn->data);
- didit= 1;
- }
- id->us--;
- }
- break;
- case OB_SURF:
- if(dupflag & USER_DUP_SURF) {
- ID_NEW_US2( obn->data )
- else {
- obn->data= copy_curve(obn->data);
- didit= 1;
- }
- id->us--;
- }
- break;
- case OB_FONT:
- if(dupflag & USER_DUP_FONT) {
- ID_NEW_US2( obn->data )
- else {
- obn->data= copy_curve(obn->data);
- didit= 1;
- }
- id->us--;
- }
- break;
- case OB_MBALL:
- if(dupflag & USER_DUP_MBALL) {
- ID_NEW_US2(obn->data )
- else {
- obn->data= copy_mball(obn->data);
- didit= 1;
- }
- id->us--;
- }
- break;
- case OB_LAMP:
- if(dupflag & USER_DUP_LAMP) {
- ID_NEW_US2(obn->data )
- else obn->data= copy_lamp(obn->data);
- id->us--;
- }
- break;
-
- case OB_ARMATURE:
- obn->recalc |= OB_RECALC_DATA;
- if(obn->pose) obn->pose->flag |= POSE_RECALC;
-
- if(dupflag & USER_DUP_ARM) {
- ID_NEW_US2(obn->data )
- else {
- obn->data= copy_armature(obn->data);
- armature_rebuild_pose(obn, obn->data);
- didit= 1;
- }
- id->us--;
- }
-
- break;
-
- case OB_LATTICE:
- if(dupflag!=0) {
- ID_NEW_US2(obn->data )
- else obn->data= copy_lattice(obn->data);
- id->us--;
- }
- break;
- case OB_CAMERA:
- if(dupflag!=0) {
- ID_NEW_US2(obn->data )
- else obn->data= copy_camera(obn->data);
- id->us--;
- }
- break;
- }
-
- if(dupflag & USER_DUP_MAT) {
- matarar= give_matarar(obn);
- if(didit && matarar) {
- for(a=0; a<obn->totcol; a++) {
- id= (ID *)(*matarar)[a];
- if(id) {
- ID_NEW_US( (*matarar)[a] )
- else (*matarar)[a]= copy_material((*matarar)[a]);
-
- id->us--;
- }
- }
- }
- }
- }
- return basen;
-}
-
-/* single object duplicate, if dupflag==0, fully linked, else it uses the flags given */
-/* leaves selection of base/object unaltered */
-Base *ED_object_add_duplicate(Scene *scene, Base *base, int dupflag)
-{
- Base *basen;
-
- clear_id_newpoins();
- clear_sca_new_poins(); /* sensor/contr/act */
-
- basen= object_add_duplicate_internal(scene, base, dupflag);
-
- DAG_scene_sort(scene);
-
- return basen;
-}
-
-/* contextual operator dupli */
-static int duplicate_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- int linked= RNA_boolean_get(op->ptr, "linked");
- int dupflag= (linked)? 0: U.dupflag;
-
- clear_id_newpoins();
- clear_sca_new_poins(); /* sensor/contr/act */
-
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- Base *basen= object_add_duplicate_internal(scene, base, dupflag);
-
- /* note that this is safe to do with this context iterator,
- the list is made in advance */
- ED_base_object_select(base, BA_DESELECT);
-
- /* new object becomes active */
- if(BASACT==base)
- ED_base_object_activate(C, basen);
-
- }
- CTX_DATA_END;
-
- copy_object_set_idnew(C, dupflag);
-
- DAG_scene_sort(scene);
- ED_anim_dag_flush_update(C);
-
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_duplicate(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Duplicate";
- ot->description = "Duplicate selected objects.";
- ot->idname= "OBJECT_OT_duplicate";
-
- /* api callbacks */
- ot->exec= duplicate_exec;
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* to give to transform */
- RNA_def_boolean(ot->srna, "linked", 0, "Linked", "Duplicate object but not object data, linking to the original data.");
- RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX);
-}
-
-/**************************** Join *************************/
-
-static int join_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_active_object(C);
-
- if(scene->obedit) {
- BKE_report(op->reports, RPT_ERROR, "This data does not support joining in editmode.");
- return OPERATOR_CANCELLED;
- }
- else if(!ob) {
- BKE_report(op->reports, RPT_ERROR, "Can't join unless there is an active object.");
- return OPERATOR_CANCELLED;
- }
- else if(object_data_is_libdata(ob)) {
- BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata.");
- return OPERATOR_CANCELLED;
- }
-
- if(ob->type == OB_MESH)
- return join_mesh_exec(C, op);
- else if(ELEM(ob->type, OB_CURVE, OB_SURF))
- return join_curve_exec(C, op);
- else if(ob->type == OB_ARMATURE)
- return join_armature_exec(C, op);
-
- BKE_report(op->reports, RPT_ERROR, "This object type doesn't support joining.");
-
- return OPERATOR_CANCELLED;
-}
-
-void OBJECT_OT_join(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Join";
- ot->description = "Join selected objects into active object.";
- ot->idname= "OBJECT_OT_join";
-
- /* api callbacks */
- ot->exec= join_exec;
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index daa63da03db..f8d969d2462 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -28,8 +28,6 @@
#include <string.h>
#include <math.h>
#include <time.h>
-#include <float.h>
-#include <ctype.h>
#include "MEM_guardedalloc.h"
@@ -102,7 +100,6 @@
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_particle.h"
-#include "BKE_pointcache.h"
#include "BKE_property.h"
#include "BKE_report.h"
#include "BKE_sca.h"
@@ -145,6 +142,8 @@
static void error() {}
static void waitcursor(int val) {}
static int pupmenu(const char *msg) {return 0;}
+static int pupmenu_col(const char *msg, int val) {return 0;}
+static int okee(const char *msg) {return 0;}
/* port over here */
static bContext *C;
@@ -154,6 +153,979 @@ static void error_libdata() {}
/* --------------------------------- */
+/* simple API for object selection, rather than just using the flag
+ * this takes into account the 'restrict selection in 3d view' flag.
+ * deselect works always, the restriction just prevents selection */
+
+/* Note: send a NC_SCENE|ND_OB_SELECT notifier yourself! */
+
+void ED_base_object_select(Base *base, short mode)
+{
+ if (base) {
+ if (mode==BA_SELECT) {
+ if (!(base->object->restrictflag & OB_RESTRICT_SELECT))
+ if (mode==BA_SELECT) base->flag |= SELECT;
+ }
+ else if (mode==BA_DESELECT) {
+ base->flag &= ~SELECT;
+ }
+ base->object->flag= base->flag;
+ }
+}
+
+/* also to set active NULL */
+void ED_base_object_activate(bContext *C, Base *base)
+{
+ Scene *scene= CTX_data_scene(C);
+ Base *tbase;
+
+ /* sets scene->basact */
+ BASACT= base;
+
+ if(base) {
+
+ /* XXX old signals, remember to handle notifiers now! */
+ // select_actionchannel_by_name(base->object->action, "Object", 1);
+
+ /* disable temporal locks */
+ for(tbase=FIRSTBASE; tbase; tbase= tbase->next) {
+ if(base!=tbase && (tbase->object->shapeflag & OB_SHAPE_TEMPLOCK)) {
+ tbase->object->shapeflag &= ~OB_SHAPE_TEMPLOCK;
+ DAG_object_flush_update(scene, tbase->object, OB_RECALC_DATA);
+ }
+ }
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
+ }
+ else
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, NULL);
+}
+
+
+/* exported */
+void ED_object_base_init_from_view(bContext *C, Base *base)
+{
+ View3D *v3d= CTX_wm_view3d(C);
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= base->object;
+
+ if (scene==NULL)
+ return;
+
+ if (v3d==NULL) {
+ base->lay = scene->lay;
+ VECCOPY(ob->loc, scene->cursor);
+ }
+ else {
+ if (v3d->localview) {
+ base->lay= ob->lay= v3d->layact | v3d->lay;
+ VECCOPY(ob->loc, v3d->cursor);
+ }
+ else {
+ base->lay= ob->lay= v3d->layact;
+ VECCOPY(ob->loc, scene->cursor);
+ }
+
+ if (U.flag & USER_ADD_VIEWALIGNED) {
+ ARegion *ar= CTX_wm_region(C);
+ if(ar) {
+ RegionView3D *rv3d= ar->regiondata;
+
+ rv3d->viewquat[0]= -rv3d->viewquat[0];
+ QuatToEul(rv3d->viewquat, ob->rot);
+ rv3d->viewquat[0]= -rv3d->viewquat[0];
+ }
+ }
+ }
+ where_is_object(scene, ob);
+}
+
+/* ******************* add object operator ****************** */
+
+static EnumPropertyItem prop_object_types[] = {
+ {OB_MESH, "MESH", 0, "Mesh", ""},
+ {OB_CURVE, "CURVE", 0, "Curve", ""},
+ {OB_SURF, "SURFACE", 0, "Surface", ""},
+ {OB_MBALL, "META", 0, "Meta", ""},
+ {OB_FONT, "TEXT", 0, "Text", ""},
+ {0, "", 0, NULL, NULL},
+ {OB_ARMATURE, "ARMATURE", 0, "Armature", ""},
+ {OB_LATTICE, "LATTICE", 0, "Lattice", ""},
+ {OB_EMPTY, "EMPTY", 0, "Empty", ""},
+ {0, "", 0, NULL, NULL},
+ {OB_CAMERA, "CAMERA", 0, "Camera", ""},
+ {OB_LAMP, "LAMP", 0, "Lamp", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+
+
+void add_object_draw(Scene *scene, View3D *v3d, int type) /* for toolbox or menus, only non-editmode stuff */
+{
+ /* keep here to get things compile, remove later */
+}
+
+/* for object add primitive operators */
+static Object *object_add_type(bContext *C, int type)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob;
+
+ /* for as long scene has editmode... */
+ if (CTX_data_edit_object(C))
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* freedata, and undo */
+
+ /* deselects all, sets scene->basact */
+ ob= add_object(scene, type);
+ /* editor level activate, notifiers */
+ ED_base_object_activate(C, BASACT);
+
+ /* more editor stuff */
+ ED_object_base_init_from_view(C, BASACT);
+
+ DAG_scene_sort(scene);
+
+ return ob;
+}
+
+/* for object add operator */
+static int object_add_exec(bContext *C, wmOperator *op)
+{
+ object_add_type(C, RNA_int_get(op->ptr, "type"));
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_object_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Object";
+ ot->description = "Add an object to the scene.";
+ ot->idname= "OBJECT_OT_object_add";
+
+ /* api callbacks */
+ ot->invoke= WM_menu_invoke;
+ ot->exec= object_add_exec;
+
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "type", prop_object_types, 0, "Type", "");
+}
+
+/* ***************** add primitives *************** */
+/* ****** work both in and outside editmode ****** */
+
+static EnumPropertyItem prop_mesh_types[] = {
+ {0, "PLANE", ICON_MESH_PLANE, "Plane", ""},
+ {1, "CUBE", ICON_MESH_CUBE, "Cube", ""},
+ {2, "CIRCLE", ICON_MESH_CIRCLE, "Circle", ""},
+ {3, "UVSPHERE", ICON_MESH_UVSPHERE, "UVsphere", ""},
+ {4, "ICOSPHERE", ICON_MESH_ICOSPHERE, "Icosphere", ""},
+ {5, "CYLINDER", ICON_MESH_TUBE, "Cylinder", ""},
+ {6, "CONE", ICON_MESH_CONE, "Cone", ""},
+ {0, "", 0, NULL, NULL},
+ {7, "GRID", ICON_MESH_GRID, "Grid", ""},
+ {8, "MONKEY", ICON_MESH_MONKEY, "Monkey", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+static int object_add_mesh_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit= CTX_data_edit_object(C);
+ int newob= 0;
+
+ if(obedit==NULL || obedit->type!=OB_MESH) {
+ object_add_type(C, OB_MESH);
+ ED_object_enter_editmode(C, EM_DO_UNDO);
+ newob = 1;
+ }
+ else DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+
+ switch(RNA_enum_get(op->ptr, "type")) {
+ case 0:
+ WM_operator_name_call(C, "MESH_OT_primitive_plane_add", WM_OP_INVOKE_REGION_WIN, NULL);
+ break;
+ case 1:
+ WM_operator_name_call(C, "MESH_OT_primitive_cube_add", WM_OP_INVOKE_REGION_WIN, NULL);
+ break;
+ case 2:
+ WM_operator_name_call(C, "MESH_OT_primitive_circle_add", WM_OP_INVOKE_REGION_WIN, NULL);
+ break;
+ case 3:
+ WM_operator_name_call(C, "MESH_OT_primitive_uv_sphere_add", WM_OP_INVOKE_REGION_WIN, NULL);
+ break;
+ case 4:
+ WM_operator_name_call(C, "MESH_OT_primitive_ico_sphere_add", WM_OP_INVOKE_REGION_WIN, NULL);
+ break;
+ case 5:
+ WM_operator_name_call(C, "MESH_OT_primitive_cylinder_add", WM_OP_INVOKE_REGION_WIN, NULL);
+ break;
+ case 6:
+ WM_operator_name_call(C, "MESH_OT_primitive_cone_add", WM_OP_INVOKE_REGION_WIN, NULL);
+ break;
+ case 7:
+ WM_operator_name_call(C, "MESH_OT_primitive_grid_add", WM_OP_INVOKE_REGION_WIN, NULL);
+ break;
+ case 8:
+ WM_operator_name_call(C, "MESH_OT_primitive_monkey_add", WM_OP_INVOKE_REGION_WIN, NULL);
+ break;
+ }
+ /* userdef */
+ if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
+ ED_object_exit_editmode(C, EM_FREEDATA);
+ }
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
+}
+
+
+void OBJECT_OT_mesh_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Mesh";
+ ot->description = "Add a mesh object to the scene.";
+ ot->idname= "OBJECT_OT_mesh_add";
+
+ /* api callbacks */
+ ot->invoke= WM_menu_invoke;
+ ot->exec= object_add_mesh_exec;
+
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags: no register or undo, this operator calls operators */
+ ot->flag= 0; //OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "type", prop_mesh_types, 0, "Primitive", "");
+}
+
+static EnumPropertyItem prop_curve_types[] = {
+ {CU_BEZIER|CU_2D|CU_PRIM_CURVE, "BEZIER_CURVE", ICON_CURVE_BEZCURVE, "Bezier Curve", ""},
+ {CU_BEZIER|CU_2D|CU_PRIM_CIRCLE, "BEZIER_CIRCLE", ICON_CURVE_BEZCIRCLE, "Bezier Circle", ""},
+ {CU_NURBS|CU_2D|CU_PRIM_CURVE, "NURBS_CURVE", ICON_CURVE_NCURVE, "NURBS Curve", ""},
+ {CU_NURBS|CU_2D|CU_PRIM_CIRCLE, "NURBS_CIRCLE", ICON_CURVE_NCIRCLE, "NURBS Circle", ""},
+ {CU_NURBS|CU_2D|CU_PRIM_PATH, "PATH", ICON_CURVE_PATH, "Path", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+static int object_add_curve_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit= CTX_data_edit_object(C);
+ ListBase *editnurb;
+ Nurb *nu;
+ int newob= 0;
+
+ if(obedit==NULL || obedit->type!=OB_CURVE) {
+ object_add_type(C, OB_CURVE);
+ ED_object_enter_editmode(C, 0);
+ newob = 1;
+ }
+ else DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+
+ obedit= CTX_data_edit_object(C);
+ nu= add_nurbs_primitive(C, RNA_enum_get(op->ptr, "type"), newob);
+ editnurb= curve_get_editcurve(obedit);
+ BLI_addtail(editnurb, nu);
+
+ /* userdef */
+ if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
+ ED_object_exit_editmode(C, EM_FREEDATA);
+ }
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
+}
+
+static int object_add_curve_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ Object *obedit= CTX_data_edit_object(C);
+ uiPopupMenu *pup;
+ uiLayout *layout;
+
+ pup= uiPupMenuBegin(C, op->type->name, 0);
+ layout= uiPupMenuLayout(pup);
+ if(!obedit || obedit->type == OB_CURVE)
+ uiItemsEnumO(layout, op->type->idname, "type");
+ else
+ uiItemsEnumO(layout, "OBJECT_OT_surface_add", "type");
+ uiPupMenuEnd(C, pup);
+
+ return OPERATOR_CANCELLED;
+}
+
+void OBJECT_OT_curve_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Curve";
+ ot->description = "Add a curve object to the scene.";
+ ot->idname= "OBJECT_OT_curve_add";
+
+ /* api callbacks */
+ ot->invoke= object_add_curve_invoke;
+ ot->exec= object_add_curve_exec;
+
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "type", prop_curve_types, 0, "Primitive", "");
+}
+
+static EnumPropertyItem prop_surface_types[]= {
+ {CU_PRIM_CURVE|CU_NURBS, "NURBS_CURVE", ICON_SURFACE_NCURVE, "NURBS Curve", ""},
+ {CU_PRIM_CIRCLE|CU_NURBS, "NURBS_CIRCLE", ICON_SURFACE_NCIRCLE, "NURBS Circle", ""},
+ {CU_PRIM_PATCH|CU_NURBS, "NURBS_SURFACE", ICON_SURFACE_NSURFACE, "NURBS Surface", ""},
+ {CU_PRIM_TUBE|CU_NURBS, "NURBS_TUBE", ICON_SURFACE_NTUBE, "NURBS Tube", ""},
+ {CU_PRIM_SPHERE|CU_NURBS, "NURBS_SPHERE", ICON_SURFACE_NSPHERE, "NURBS Sphere", ""},
+ {CU_PRIM_DONUT|CU_NURBS, "NURBS_DONUT", ICON_SURFACE_NDONUT, "NURBS Donut", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+static int object_add_surface_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit= CTX_data_edit_object(C);
+ ListBase *editnurb;
+ Nurb *nu;
+ int newob= 0;
+
+ if(obedit==NULL || obedit->type!=OB_SURF) {
+ object_add_type(C, OB_SURF);
+ ED_object_enter_editmode(C, 0);
+ newob = 1;
+ }
+ else DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+
+ obedit= CTX_data_edit_object(C);
+ nu= add_nurbs_primitive(C, RNA_enum_get(op->ptr, "type"), newob);
+ editnurb= curve_get_editcurve(obedit);
+ BLI_addtail(editnurb, nu);
+
+ /* userdef */
+ if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
+ ED_object_exit_editmode(C, EM_FREEDATA);
+ }
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_surface_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Surface";
+ ot->description = "Add a surface object to the scene.";
+ ot->idname= "OBJECT_OT_surface_add";
+
+ /* api callbacks */
+ ot->invoke= WM_menu_invoke;
+ ot->exec= object_add_surface_exec;
+
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "type", prop_surface_types, 0, "Primitive", "");
+}
+
+static EnumPropertyItem prop_metaball_types[]= {
+ {MB_BALL, "MBALL_BALL", ICON_META_BALL, "Meta Ball", ""},
+ {MB_TUBE, "MBALL_TUBE", ICON_META_TUBE, "Meta Tube", ""},
+ {MB_PLANE, "MBALL_PLANE", ICON_META_PLANE, "Meta Plane", ""},
+ {MB_CUBE, "MBALL_CUBE", ICON_META_CUBE, "Meta Cube", ""},
+ {MB_ELIPSOID, "MBALL_ELLIPSOID", ICON_META_ELLIPSOID, "Meta Ellipsoid", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+static int object_metaball_add_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit= CTX_data_edit_object(C);
+ MetaBall *mball;
+ MetaElem *elem;
+ int newob= 0;
+
+ if(obedit==NULL || obedit->type!=OB_MBALL) {
+ object_add_type(C, OB_MBALL);
+ ED_object_enter_editmode(C, 0);
+ newob = 1;
+ }
+ else DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+
+ obedit= CTX_data_edit_object(C);
+ elem= (MetaElem*)add_metaball_primitive(C, RNA_enum_get(op->ptr, "type"), newob);
+ mball= (MetaBall*)obedit->data;
+ BLI_addtail(mball->editelems, elem);
+
+ /* userdef */
+ if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
+ ED_object_exit_editmode(C, EM_FREEDATA);
+ }
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
+}
+
+static int object_metaball_add_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ Object *obedit= CTX_data_edit_object(C);
+ uiPopupMenu *pup;
+ uiLayout *layout;
+
+ pup= uiPupMenuBegin(C, op->type->name, 0);
+ layout= uiPupMenuLayout(pup);
+ if(!obedit || obedit->type == OB_MBALL)
+ uiItemsEnumO(layout, op->type->idname, "type");
+ else
+ uiItemsEnumO(layout, "OBJECT_OT_metaball_add", "type");
+ uiPupMenuEnd(C, pup);
+
+ return OPERATOR_CANCELLED;
+}
+
+void OBJECT_OT_metaball_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Metaball";
+ ot->description= "Add an metaball object to the scene.";
+ ot->idname= "OBJECT_OT_metaball_add";
+
+ /* api callbacks */
+ ot->invoke= object_metaball_add_invoke;
+ ot->exec= object_metaball_add_exec;
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "type", prop_metaball_types, 0, "Primitive", "");
+}
+static int object_add_text_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit= CTX_data_edit_object(C);
+
+ if(obedit && obedit->type==OB_FONT)
+ return OPERATOR_CANCELLED;
+
+ object_add_type(C, OB_FONT);
+ obedit= CTX_data_active_object(C);
+
+ if(U.flag & USER_ADD_EDITMODE)
+ ED_object_enter_editmode(C, 0);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_text_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Text";
+ ot->description = "Add a text object to the scene";
+ ot->idname= "OBJECT_OT_text_add";
+
+ /* api callbacks */
+ ot->exec= object_add_text_exec;
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int object_armature_add_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit= CTX_data_edit_object(C);
+ View3D *v3d= CTX_wm_view3d(C);
+ RegionView3D *rv3d= NULL;
+ int newob= 0;
+
+ if ((obedit==NULL) || (obedit->type != OB_ARMATURE)) {
+ object_add_type(C, OB_ARMATURE);
+ ED_object_enter_editmode(C, 0);
+ newob = 1;
+ }
+ else DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+
+ if(v3d)
+ rv3d= CTX_wm_region(C)->regiondata;
+
+ /* v3d and rv3d are allowed to be NULL */
+ add_primitive_bone(CTX_data_scene(C), v3d, rv3d);
+
+ /* userdef */
+ if (newob && (U.flag & USER_ADD_EDITMODE)==0) {
+ ED_object_exit_editmode(C, EM_FREEDATA);
+ }
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_armature_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Armature";
+ ot->description = "Add an armature object to the scene.";
+ ot->idname= "OBJECT_OT_armature_add";
+
+ /* api callbacks */
+ ot->exec= object_armature_add_exec;
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int object_primitive_add_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ uiPopupMenu *pup= uiPupMenuBegin(C, "Add Object", 0);
+ uiLayout *layout= uiPupMenuLayout(pup);
+
+ uiItemMenuEnumO(layout, "Mesh", ICON_OUTLINER_OB_MESH, "OBJECT_OT_mesh_add", "type");
+ uiItemMenuEnumO(layout, "Curve", ICON_OUTLINER_OB_CURVE, "OBJECT_OT_curve_add", "type");
+ uiItemMenuEnumO(layout, "Surface", ICON_OUTLINER_OB_SURFACE, "OBJECT_OT_surface_add", "type");
+ uiItemMenuEnumO(layout, NULL, ICON_OUTLINER_OB_META, "OBJECT_OT_metaball_add", "type");
+ uiItemO(layout, "Text", ICON_OUTLINER_OB_FONT, "OBJECT_OT_text_add");
+ uiItemS(layout);
+ uiItemO(layout, "Armature", ICON_OUTLINER_OB_ARMATURE, "OBJECT_OT_armature_add");
+ uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_LATTICE, "OBJECT_OT_object_add", "type", OB_LATTICE);
+ uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_EMPTY, "OBJECT_OT_object_add", "type", OB_EMPTY);
+ uiItemS(layout);
+ uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_CAMERA, "OBJECT_OT_object_add", "type", OB_CAMERA);
+ uiItemEnumO(layout, NULL, ICON_OUTLINER_OB_LAMP, "OBJECT_OT_object_add", "type", OB_LAMP);
+
+ uiPupMenuEnd(C, pup);
+
+ /* this operator is only for a menu, not used further */
+ return OPERATOR_CANCELLED;
+}
+
+/* only used as menu */
+void OBJECT_OT_primitive_add(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Add Primitive";
+ ot->description = "Add a primitive object.";
+ ot->idname= "OBJECT_OT_primitive_add";
+
+ /* api callbacks */
+ ot->invoke= object_primitive_add_invoke;
+
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= 0;
+}
+
+
+/* ******************************* */
+
+/* remove base from a specific scene */
+/* note: now unlinks constraints as well */
+void ED_base_object_free_and_unlink(Scene *scene, Base *base)
+{
+ BLI_remlink(&scene->base, base);
+ free_libblock_us(&G.main->object, base->object);
+ if(scene->basact==base) scene->basact= NULL;
+ MEM_freeN(base);
+}
+
+static int object_delete_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ int islamp= 0;
+
+ if(CTX_data_edit_object(C))
+ return OPERATOR_CANCELLED;
+
+ CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+
+ if(base->object->type==OB_LAMP) islamp= 1;
+
+ /* remove from current scene only */
+ ED_base_object_free_and_unlink(scene, base);
+ }
+ CTX_DATA_END;
+
+ if(islamp) reshadeall_displist(scene); /* only frees displist */
+
+ DAG_scene_sort(scene);
+ ED_anim_dag_flush_update(C);
+
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, CTX_data_scene(C));
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_delete(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name= "Delete";
+ ot->description = "Delete selected objects.";
+ ot->idname= "OBJECT_OT_delete";
+
+ /* api callbacks */
+ ot->invoke= WM_operator_confirm;
+ ot->exec= object_delete_exec;
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+}
+
+
+static void single_object_users__forwardModifierLinks(void *userData, Object *ob, Object **obpoin)
+{
+ ID_NEW(*obpoin);
+}
+
+static void copy_object__forwardModifierLinks(void *userData, Object *ob,
+ ID **idpoin)
+{
+ /* this is copied from ID_NEW; it might be better to have a macro */
+ if(*idpoin && (*idpoin)->newid) *idpoin = (*idpoin)->newid;
+}
+
+
+/* after copying objects, copied data should get new pointers */
+static void copy_object_set_idnew(Scene *scene, View3D *v3d, int dupflag)
+{
+ Base *base;
+ Object *ob;
+ Material *ma, *mao;
+ ID *id;
+#if 0 // XXX old animation system
+ Ipo *ipo;
+ bActionStrip *strip;
+#endif // XXX old animation system
+ int a;
+
+ /* XXX check object pointers */
+ for(base= FIRSTBASE; base; base= base->next) {
+ if(TESTBASELIB_BGMODE(v3d, base)) {
+ ob= base->object;
+ relink_constraints(&ob->constraints);
+ if (ob->pose){
+ bPoseChannel *chan;
+ for (chan = ob->pose->chanbase.first; chan; chan=chan->next){
+ relink_constraints(&chan->constraints);
+ }
+ }
+ modifiers_foreachIDLink(ob, copy_object__forwardModifierLinks, NULL);
+ ID_NEW(ob->parent);
+ ID_NEW(ob->track);
+ ID_NEW(ob->proxy);
+ ID_NEW(ob->proxy_group);
+
+#if 0 // XXX old animation system
+ for(strip= ob->nlastrips.first; strip; strip= strip->next) {
+ bActionModifier *amod;
+ for(amod= strip->modifiers.first; amod; amod= amod->next)
+ ID_NEW(amod->ob);
+ }
+#endif // XXX old animation system
+ }
+ }
+
+ /* materials */
+ if( dupflag & USER_DUP_MAT) {
+ mao= G.main->mat.first;
+ while(mao) {
+ if(mao->id.newid) {
+
+ ma= (Material *)mao->id.newid;
+
+ if(dupflag & USER_DUP_TEX) {
+ for(a=0; a<MAX_MTEX; a++) {
+ if(ma->mtex[a]) {
+ id= (ID *)ma->mtex[a]->tex;
+ if(id) {
+ ID_NEW_US(ma->mtex[a]->tex)
+ else ma->mtex[a]->tex= copy_texture(ma->mtex[a]->tex);
+ id->us--;
+ }
+ }
+ }
+ }
+#if 0 // XXX old animation system
+ id= (ID *)ma->ipo;
+ if(id) {
+ ID_NEW_US(ma->ipo)
+ else ma->ipo= copy_ipo(ma->ipo);
+ id->us--;
+ }
+#endif // XXX old animation system
+ }
+ mao= mao->id.next;
+ }
+ }
+
+#if 0 // XXX old animation system
+ /* lamps */
+ if( dupflag & USER_DUP_IPO) {
+ Lamp *la= G.main->lamp.first;
+ while(la) {
+ if(la->id.newid) {
+ Lamp *lan= (Lamp *)la->id.newid;
+ id= (ID *)lan->ipo;
+ if(id) {
+ ID_NEW_US(lan->ipo)
+ else lan->ipo= copy_ipo(lan->ipo);
+ id->us--;
+ }
+ }
+ la= la->id.next;
+ }
+ }
+
+ /* ipos */
+ ipo= G.main->ipo.first;
+ while(ipo) {
+ if(ipo->id.lib==NULL && ipo->id.newid) {
+ Ipo *ipon= (Ipo *)ipo->id.newid;
+ IpoCurve *icu;
+ for(icu= ipon->curve.first; icu; icu= icu->next) {
+ if(icu->driver) {
+ ID_NEW(icu->driver->ob);
+ }
+ }
+ }
+ ipo= ipo->id.next;
+ }
+#endif // XXX old animation system
+
+ set_sca_new_poins();
+
+ clear_id_newpoins();
+
+}
+
+static int return_editmesh_indexar(EditMesh *em, int *tot, int **indexar, float *cent)
+{
+ EditVert *eve;
+ int *index, nr, totvert=0;
+
+ for(eve= em->verts.first; eve; eve= eve->next) {
+ if(eve->f & SELECT) totvert++;
+ }
+ if(totvert==0) return 0;
+
+ *indexar= index= MEM_mallocN(4*totvert, "hook indexar");
+ *tot= totvert;
+ nr= 0;
+ cent[0]= cent[1]= cent[2]= 0.0;
+
+ for(eve= em->verts.first; eve; eve= eve->next) {
+ if(eve->f & SELECT) {
+ *index= nr; index++;
+ VecAddf(cent, cent, eve->co);
+ }
+ nr++;
+ }
+
+ VecMulf(cent, 1.0f/(float)totvert);
+
+ return totvert;
+}
+
+static int return_editmesh_vgroup(Object *obedit, EditMesh *em, char *name, float *cent)
+{
+ MDeformVert *dvert;
+ EditVert *eve;
+ int i, totvert=0;
+
+ cent[0]= cent[1]= cent[2]= 0.0;
+
+ if(obedit->actdef) {
+
+ /* find the vertices */
+ for(eve= em->verts.first; eve; eve= eve->next) {
+ dvert= CustomData_em_get(&em->vdata, eve->data, CD_MDEFORMVERT);
+
+ if(dvert) {
+ for(i=0; i<dvert->totweight; i++){
+ if(dvert->dw[i].def_nr == (obedit->actdef-1)) {
+ totvert++;
+ VecAddf(cent, cent, eve->co);
+ }
+ }
+ }
+ }
+ if(totvert) {
+ bDeformGroup *defGroup = BLI_findlink(&obedit->defbase, obedit->actdef-1);
+ strcpy(name, defGroup->name);
+ VecMulf(cent, 1.0f/(float)totvert);
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+static void select_editmesh_hook(Object *ob, HookModifierData *hmd)
+{
+ Mesh *me= ob->data;
+ EditMesh *em= BKE_mesh_get_editmesh(me);
+ EditVert *eve;
+ int index=0, nr=0;
+
+ for(eve= em->verts.first; eve; eve= eve->next, nr++) {
+ if(nr==hmd->indexar[index]) {
+ eve->f |= SELECT;
+ if(index < hmd->totindex-1) index++;
+ }
+ }
+ EM_select_flush(em);
+
+ BKE_mesh_end_editmesh(me, em);
+}
+
+static int return_editlattice_indexar(Lattice *editlatt, int *tot, int **indexar, float *cent)
+{
+ BPoint *bp;
+ int *index, nr, totvert=0, a;
+
+ /* count */
+ a= editlatt->pntsu*editlatt->pntsv*editlatt->pntsw;
+ bp= editlatt->def;
+ while(a--) {
+ if(bp->f1 & SELECT) {
+ if(bp->hide==0) totvert++;
+ }
+ bp++;
+ }
+
+ if(totvert==0) return 0;
+
+ *indexar= index= MEM_mallocN(4*totvert, "hook indexar");
+ *tot= totvert;
+ nr= 0;
+ cent[0]= cent[1]= cent[2]= 0.0;
+
+ a= editlatt->pntsu*editlatt->pntsv*editlatt->pntsw;
+ bp= editlatt->def;
+ while(a--) {
+ if(bp->f1 & SELECT) {
+ if(bp->hide==0) {
+ *index= nr; index++;
+ VecAddf(cent, cent, bp->vec);
+ }
+ }
+ bp++;
+ nr++;
+ }
+
+ VecMulf(cent, 1.0f/(float)totvert);
+
+ return totvert;
+}
+
+static void select_editlattice_hook(Object *obedit, HookModifierData *hmd)
+{
+ Lattice *lt= obedit->data;
+ BPoint *bp;
+ int index=0, nr=0, a;
+
+ /* count */
+ a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
+ bp= lt->editlatt->def;
+ while(a--) {
+ if(hmd->indexar[index]==nr) {
+ bp->f1 |= SELECT;
+ if(index < hmd->totindex-1) index++;
+ }
+ nr++;
+ bp++;
+ }
+}
+
+static int return_editcurve_indexar(Object *obedit, int *tot, int **indexar, float *cent)
+{
+ ListBase *editnurb= curve_get_editcurve(obedit);
+ Nurb *nu;
+ BPoint *bp;
+ BezTriple *bezt;
+ int *index, a, nr, totvert=0;
+
+ for(nu= editnurb->first; nu; nu= nu->next) {
+ if((nu->type & 7)==CU_BEZIER) {
+ bezt= nu->bezt;
+ a= nu->pntsu;
+ while(a--) {
+ if(bezt->f1 & SELECT) totvert++;
+ if(bezt->f2 & SELECT) totvert++;
+ if(bezt->f3 & SELECT) totvert++;
+ bezt++;
+ }
+ }
+ else {
+ bp= nu->bp;
+ a= nu->pntsu*nu->pntsv;
+ while(a--) {
+ if(bp->f1 & SELECT) totvert++;
+ bp++;
+ }
+ }
+ }
+ if(totvert==0) return 0;
+
+ *indexar= index= MEM_mallocN(4*totvert, "hook indexar");
+ *tot= totvert;
+ nr= 0;
+ cent[0]= cent[1]= cent[2]= 0.0;
+
+ for(nu= editnurb->first; nu; nu= nu->next) {
+ if((nu->type & 7)==CU_BEZIER) {
+ bezt= nu->bezt;
+ a= nu->pntsu;
+ while(a--) {
+ if(bezt->f1 & SELECT) {
+ *index= nr; index++;
+ VecAddf(cent, cent, bezt->vec[0]);
+ }
+ nr++;
+ if(bezt->f2 & SELECT) {
+ *index= nr; index++;
+ VecAddf(cent, cent, bezt->vec[1]);
+ }
+ nr++;
+ if(bezt->f3 & SELECT) {
+ *index= nr; index++;
+ VecAddf(cent, cent, bezt->vec[2]);
+ }
+ nr++;
+ bezt++;
+ }
+ }
+ else {
+ bp= nu->bp;
+ a= nu->pntsu*nu->pntsv;
+ while(a--) {
+ if(bp->f1 & SELECT) {
+ *index= nr; index++;
+ VecAddf(cent, cent, bp->vec);
+ }
+ nr++;
+ bp++;
+ }
+ }
+ }
+
+ VecMulf(cent, 1.0f/(float)totvert);
+
+ return totvert;
+}
+
void ED_object_apply_obmat(Object *ob)
{
float mat[3][3], imat[3][3], tmat[3][3];
@@ -178,6 +1150,1271 @@ void ED_object_apply_obmat(Object *ob)
}
+int hook_getIndexArray(Object *obedit, int *tot, int **indexar, char *name, float *cent_r)
+{
+ *indexar= NULL;
+ *tot= 0;
+ name[0]= 0;
+
+ switch(obedit->type) {
+ case OB_MESH:
+ {
+ Mesh *me= obedit->data;
+ EditMesh *em = BKE_mesh_get_editmesh(me);
+
+ /* check selected vertices first */
+ if( return_editmesh_indexar(em, tot, indexar, cent_r)) {
+ BKE_mesh_end_editmesh(me, em);
+ return 1;
+ } else {
+ int ret = return_editmesh_vgroup(obedit, em, name, cent_r);
+ BKE_mesh_end_editmesh(me, em);
+ return ret;
+ }
+ }
+ case OB_CURVE:
+ case OB_SURF:
+ return return_editcurve_indexar(obedit, tot, indexar, cent_r);
+ case OB_LATTICE:
+ {
+ Lattice *lt= obedit->data;
+ return return_editlattice_indexar(lt->editlatt, tot, indexar, cent_r);
+ }
+ default:
+ return 0;
+ }
+}
+
+static void select_editcurve_hook(Object *obedit, HookModifierData *hmd)
+{
+ ListBase *editnurb= curve_get_editcurve(obedit);
+ Nurb *nu;
+ BPoint *bp;
+ BezTriple *bezt;
+ int index=0, a, nr=0;
+
+ for(nu= editnurb->first; nu; nu= nu->next) {
+ if((nu->type & 7)==CU_BEZIER) {
+ bezt= nu->bezt;
+ a= nu->pntsu;
+ while(a--) {
+ if(nr == hmd->indexar[index]) {
+ bezt->f1 |= SELECT;
+ if(index<hmd->totindex-1) index++;
+ }
+ nr++;
+ if(nr == hmd->indexar[index]) {
+ bezt->f2 |= SELECT;
+ if(index<hmd->totindex-1) index++;
+ }
+ nr++;
+ if(nr == hmd->indexar[index]) {
+ bezt->f3 |= SELECT;
+ if(index<hmd->totindex-1) index++;
+ }
+ nr++;
+
+ bezt++;
+ }
+ }
+ else {
+ bp= nu->bp;
+ a= nu->pntsu*nu->pntsv;
+ while(a--) {
+ if(nr == hmd->indexar[index]) {
+ bp->f1 |= SELECT;
+ if(index<hmd->totindex-1) index++;
+ }
+ nr++;
+ bp++;
+ }
+ }
+ }
+}
+
+void obedit_hook_select(Object *ob, HookModifierData *hmd)
+{
+
+ if(ob->type==OB_MESH) select_editmesh_hook(ob, hmd);
+ else if(ob->type==OB_LATTICE) select_editlattice_hook(ob, hmd);
+ else if(ob->type==OB_CURVE) select_editcurve_hook(ob, hmd);
+ else if(ob->type==OB_SURF) select_editcurve_hook(ob, hmd);
+}
+
+
+void add_hook(Scene *scene, View3D *v3d, int mode)
+{
+ ModifierData *md = NULL;
+ HookModifierData *hmd = NULL;
+ Object *ob=NULL;
+ Object *obedit= scene->obedit; // XXX get from context
+
+ if(obedit==NULL) return;
+
+ /* preconditions */
+ if(mode==2) { /* selected object */
+ Base *base;
+ for(base= FIRSTBASE; base; base= base->next) {
+ if(TESTBASELIB(v3d, base)) {
+ if(base!=BASACT) {
+ ob= base->object;
+ break;
+ }
+ }
+ }
+ if(ob==NULL) {
+ error("Requires selected Object");
+ return;
+ }
+ }
+ else if(mode!=1) {
+ int maxlen=0, a, nr;
+ char *cp;
+
+ /* make pupmenu with hooks */
+ for(md=obedit->modifiers.first; md; md= md->next) {
+ if (md->type==eModifierType_Hook)
+ maxlen+=32;
+ }
+
+ if(maxlen==0) {
+ error("Object has no hooks yet");
+ return;
+ }
+
+ cp= MEM_callocN(maxlen+32, "temp string");
+ if(mode==3) strcpy(cp, "Remove %t|");
+ else if(mode==4) strcpy(cp, "Reassign %t|");
+ else if(mode==5) strcpy(cp, "Select %t|");
+ else if(mode==6) strcpy(cp, "Clear Offset %t|");
+
+ for(md=obedit->modifiers.first; md; md= md->next) {
+ if (md->type==eModifierType_Hook) {
+ strcat(cp, md->name);
+ strcat(cp, " |");
+ }
+ }
+
+ nr= pupmenu(cp);
+ MEM_freeN(cp);
+
+ if(nr<1) return;
+
+ a= 1;
+ for(md=obedit->modifiers.first; md; md=md->next) {
+ if (md->type==eModifierType_Hook) {
+ if(a==nr) break;
+ a++;
+ }
+ }
+
+ hmd = (HookModifierData*) md;
+ ob= hmd->object;
+ }
+
+ /* do it, new hooks or reassign */
+ if(mode==1 || mode==2 || mode==4) {
+ float cent[3];
+ int tot, ok, *indexar;
+ char name[32];
+
+ ok = hook_getIndexArray(obedit, &tot, &indexar, name, cent);
+
+ if(ok==0) {
+ error("Requires selected vertices or active Vertex Group");
+ }
+ else {
+
+ if(mode==1) {
+ Base *base= BASACT, *newbase;
+
+ ob= add_object(scene, OB_EMPTY);
+ /* set layers OK */
+ newbase= BASACT;
+ newbase->lay= base->lay;
+ ob->lay= newbase->lay;
+
+ /* transform cent to global coords for loc */
+ VecMat4MulVecfl(ob->loc, obedit->obmat, cent);
+
+ /* restore, add_object sets active */
+ BASACT= base;
+ }
+ /* if mode is 2 or 4, ob has been set */
+
+ /* new hook */
+ if(mode==1 || mode==2) {
+ ModifierData *md = obedit->modifiers.first;
+
+ while (md && modifierType_getInfo(md->type)->type==eModifierTypeType_OnlyDeform) {
+ md = md->next;
+ }
+
+ hmd = (HookModifierData*) modifier_new(eModifierType_Hook);
+ BLI_insertlinkbefore(&obedit->modifiers, md, hmd);
+ sprintf(hmd->modifier.name, "Hook-%s", ob->id.name+2);
+ }
+ else if (hmd->indexar) MEM_freeN(hmd->indexar); /* reassign, hook was set */
+
+ hmd->object= ob;
+ hmd->indexar= indexar;
+ VECCOPY(hmd->cent, cent);
+ hmd->totindex= tot;
+ BLI_strncpy(hmd->name, name, 32);
+
+ if(mode==1 || mode==2) {
+ /* matrix calculus */
+ /* vert x (obmat x hook->imat) x hook->obmat x ob->imat */
+ /* (parentinv ) */
+
+ where_is_object(scene, ob);
+
+ Mat4Invert(ob->imat, ob->obmat);
+ /* apparently this call goes from right to left... */
+ Mat4MulSerie(hmd->parentinv, ob->imat, obedit->obmat, NULL,
+ NULL, NULL, NULL, NULL, NULL);
+ }
+ }
+ }
+ else if(mode==3) { /* remove */
+ BLI_remlink(&obedit->modifiers, md);
+ modifier_free(md);
+ }
+ else if(mode==5) { /* select */
+ obedit_hook_select(obedit, hmd);
+ }
+ else if(mode==6) { /* clear offset */
+ where_is_object(scene, ob); /* ob is hook->parent */
+
+ Mat4Invert(ob->imat, ob->obmat);
+ /* this call goes from right to left... */
+ Mat4MulSerie(hmd->parentinv, ob->imat, obedit->obmat, NULL,
+ NULL, NULL, NULL, NULL, NULL);
+ }
+
+ DAG_scene_sort(scene);
+}
+
+
+/* use this when the loc/size/rot of the parent has changed but the children should stay in the same place
+ * apply-size-rot or object center for eg */
+static void ignore_parent_tx(Scene *scene, Object *ob )
+{
+ Object workob;
+ Object *ob_child;
+
+ /* a change was made, adjust the children to compensate */
+ for (ob_child=G.main->object.first; ob_child; ob_child=ob_child->id.next) {
+ if (ob_child->parent == ob) {
+ ED_object_apply_obmat(ob_child);
+ what_does_parent(scene, ob_child, &workob);
+ Mat4Invert(ob_child->parentinv, workob.obmat);
+ }
+ }
+}
+
+
+void add_hook_menu(Scene *scene, View3D *v3d)
+{
+ Object *obedit= scene->obedit; // XXX get from context
+ int mode;
+
+ if(obedit==NULL) return;
+
+ if(modifiers_findByType(obedit, eModifierType_Hook))
+ mode= pupmenu("Hooks %t|Add, To New Empty %x1|Add, To Selected Object %x2|Remove... %x3|Reassign... %x4|Select... %x5|Clear Offset...%x6");
+ else
+ mode= pupmenu("Hooks %t|Add, New Empty %x1|Add, To Selected Object %x2");
+
+ if(mode<1) return;
+
+ /* do operations */
+ add_hook(scene, v3d, mode);
+}
+
+/* ******************** clear parent operator ******************* */
+
+static EnumPropertyItem prop_clear_parent_types[] = {
+ {0, "CLEAR", 0, "Clear Parent", ""},
+ {1, "CLEAR_KEEP_TRANSFORM", 0, "Clear and Keep Transformation (Clear Track)", ""},
+ {2, "CLEAR_INVERSE", 0, "Clear Parent Inverse", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+/* note, poll should check for editable scene */
+static int parent_clear_exec(bContext *C, wmOperator *op)
+{
+ int type= RNA_enum_get(op->ptr, "type");
+
+ CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+
+ if(type == 0) {
+ ob->parent= NULL;
+ }
+ else if(type == 1) {
+ ob->parent= NULL;
+ ob->track= NULL;
+ ED_object_apply_obmat(ob);
+ }
+ else if(type == 2)
+ Mat4One(ob->parentinv);
+
+ ob->recalc |= OB_RECALC;
+ }
+ CTX_DATA_END;
+
+ DAG_scene_sort(CTX_data_scene(C));
+ ED_anim_dag_flush_update(C);
+ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_parent_clear(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Clear Parent";
+ ot->description = "Clear the object's parenting.";
+ ot->idname= "OBJECT_OT_parent_clear";
+
+ /* api callbacks */
+ ot->invoke= WM_menu_invoke;
+ ot->exec= parent_clear_exec;
+
+ ot->poll= ED_operator_object_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "type", prop_clear_parent_types, 0, "Type", "");
+}
+
+/* ******************** clear track operator ******************* */
+
+
+static EnumPropertyItem prop_clear_track_types[] = {
+ {0, "CLEAR", 0, "Clear Track", ""},
+ {1, "CLEAR_KEEP_TRANSFORM", 0, "Clear and Keep Transformation (Clear Track)", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+/* note, poll should check for editable scene */
+static int object_track_clear_exec(bContext *C, wmOperator *op)
+{
+ int type= RNA_enum_get(op->ptr, "type");
+
+ if(CTX_data_edit_object(C)) {
+ BKE_report(op->reports, RPT_ERROR, "Operation cannot be performed in EditMode");
+ return OPERATOR_CANCELLED;
+ }
+ CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ ob->track= NULL;
+ ob->recalc |= OB_RECALC;
+
+ if(type == 1)
+ ED_object_apply_obmat(ob);
+ }
+ CTX_DATA_END;
+
+ DAG_scene_sort(CTX_data_scene(C));
+ ED_anim_dag_flush_update(C);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_track_clear(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Clear track";
+ ot->description = "Clear tracking constraint or flag from object.";
+ ot->idname= "OBJECT_OT_track_clear";
+
+ /* api callbacks */
+ ot->invoke= WM_menu_invoke;
+ ot->exec= object_track_clear_exec;
+
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "type", prop_clear_track_types, 0, "Type", "");
+}
+
+/* *****************Selection Operators******************* */
+static EnumPropertyItem prop_select_types[] = {
+ {0, "EXCLUSIVE", 0, "Exclusive", ""},
+ {1, "EXTEND", 0, "Extend", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+/* ****** Select by Type ****** */
+
+static int object_select_by_type_exec(bContext *C, wmOperator *op)
+{
+ short obtype, seltype;
+
+ obtype = RNA_enum_get(op->ptr, "type");
+ seltype = RNA_enum_get(op->ptr, "seltype");
+
+ if (seltype == 0) {
+ CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ ED_base_object_select(base, BA_DESELECT);
+ }
+ CTX_DATA_END;
+ }
+
+ CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ if(base->object->type==obtype) {
+ ED_base_object_select(base, BA_SELECT);
+ }
+ }
+ CTX_DATA_END;
+
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_select_by_type(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Select By Type";
+ ot->description = "Select all visible objects that are of a type.";
+ ot->idname= "OBJECT_OT_select_by_type";
+
+ /* api callbacks */
+ ot->invoke= WM_menu_invoke;
+ ot->exec= object_select_by_type_exec;
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "seltype", prop_select_types, 0, "Selection", "Extend selection or clear selection then select");
+ RNA_def_enum(ot->srna, "type", prop_object_types, 1, "Type", "");
+
+}
+/* ****** selection by links *******/
+
+static EnumPropertyItem prop_select_linked_types[] = {
+ {1, "IPO", 0, "Object IPO", ""}, // XXX depreceated animation system stuff...
+ {2, "OBDATA", 0, "Ob Data", ""},
+ {3, "MATERIAL", 0, "Material", ""},
+ {4, "TEXTURE", 0, "Texture", ""},
+ {5, "DUPGROUP", 0, "Dupligroup", ""},
+ {6, "PARTICLE", 0, "Particle System", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+static int object_select_linked_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob;
+ void *obdata = NULL;
+ Material *mat = NULL, *mat1;
+ Tex *tex=0;
+ int a, b;
+ int nr = RNA_enum_get(op->ptr, "type");
+ short changed = 0, seltype;
+ /* events (nr):
+ * Object Ipo: 1
+ * ObData: 2
+ * Current Material: 3
+ * Current Texture: 4
+ * DupliGroup: 5
+ * PSys: 6
+ */
+
+ seltype = RNA_enum_get(op->ptr, "seltype");
+
+ if (seltype == 0) {
+ CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ ED_base_object_select(base, BA_DESELECT);
+ }
+ CTX_DATA_END;
+ }
+
+ ob= OBACT;
+ if(ob==0){
+ BKE_report(op->reports, RPT_ERROR, "No Active Object");
+ return OPERATOR_CANCELLED;
+ }
+
+ if(nr==1) {
+ // XXX old animation system
+ //ipo= ob->ipo;
+ //if(ipo==0) return OPERATOR_CANCELLED;
+ return OPERATOR_CANCELLED;
+ }
+ else if(nr==2) {
+ if(ob->data==0) return OPERATOR_CANCELLED;
+ obdata= ob->data;
+ }
+ else if(nr==3 || nr==4) {
+ mat= give_current_material(ob, ob->actcol);
+ if(mat==0) return OPERATOR_CANCELLED;
+ if(nr==4) {
+ if(mat->mtex[ (int)mat->texact ]) tex= mat->mtex[ (int)mat->texact ]->tex;
+ if(tex==0) return OPERATOR_CANCELLED;
+ }
+ }
+ else if(nr==5) {
+ if(ob->dup_group==NULL) return OPERATOR_CANCELLED;
+ }
+ else if(nr==6) {
+ if(ob->particlesystem.first==NULL) return OPERATOR_CANCELLED;
+ }
+ else return OPERATOR_CANCELLED;
+
+ CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ if(nr==1) {
+ // XXX old animation system
+ //if(base->object->ipo==ipo) base->flag |= SELECT;
+ //changed = 1;
+ }
+ else if(nr==2) {
+ if(base->object->data==obdata) base->flag |= SELECT;
+ changed = 1;
+ }
+ else if(nr==3 || nr==4) {
+ ob= base->object;
+
+ for(a=1; a<=ob->totcol; a++) {
+ mat1= give_current_material(ob, a);
+ if(nr==3) {
+ if(mat1==mat) base->flag |= SELECT;
+ changed = 1;
+ }
+ else if(mat1 && nr==4) {
+ for(b=0; b<MAX_MTEX; b++) {
+ if(mat1->mtex[b]) {
+ if(tex==mat1->mtex[b]->tex) {
+ base->flag |= SELECT;
+ changed = 1;
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ else if(nr==5) {
+ if(base->object->dup_group==ob->dup_group) {
+ base->flag |= SELECT;
+ changed = 1;
+ }
+ }
+ else if(nr==6) {
+ /* loop through other, then actives particles*/
+ ParticleSystem *psys;
+ ParticleSystem *psys_act;
+
+ for(psys=base->object->particlesystem.first; psys; psys=psys->next) {
+ for(psys_act=ob->particlesystem.first; psys_act; psys_act=psys_act->next) {
+ if (psys->part == psys_act->part) {
+ base->flag |= SELECT;
+ changed = 1;
+ break;
+ }
+ }
+
+ if (base->flag & SELECT) {
+ break;
+ }
+ }
+ }
+ base->object->flag= base->flag;
+ }
+ CTX_DATA_END;
+
+ if (changed) {
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+ return OPERATOR_FINISHED;
+ }
+
+ return OPERATOR_CANCELLED;
+}
+
+void OBJECT_OT_select_linked(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Select Linked";
+ ot->description = "Select all visible objects that are linked.";
+ ot->idname= "OBJECT_OT_select_linked";
+
+ /* api callbacks */
+ ot->invoke= WM_menu_invoke;
+ ot->exec= object_select_linked_exec;
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "type", prop_select_linked_types, 0, "Type", "");
+ RNA_def_enum(ot->srna, "seltype", prop_select_types, 1, "Selection", "Extend selection or clear selection then select");
+
+}
+
+/* ****** selection grouped *******/
+
+static EnumPropertyItem prop_select_grouped_types[] = {
+ {1, "CHILDREN_RECURSIVE", 0, "Children", ""}, // XXX depreceated animation system stuff...
+ {2, "CHILDREN", 0, "Immediate Children", ""},
+ {3, "PARENT", 0, "Parent", ""},
+ {4, "SIBLINGS", 0, "Siblings", "Shared Parent"},
+ {5, "TYPE", 0, "Type", "Shared object type"},
+ {6, "LAYER", 0, "Layer", "Shared layers"},
+ {7, "GROUP", 0, "Group", "Shared group"},
+ {8, "HOOK", 0, "Hook", ""},
+ {9, "PASS", 0, "Pass", "Render pass Index"},
+ {10, "COLOR", 0, "Color", "Object Color"},
+ {11, "PROPERTIES", 0, "Properties", "Game Properties"},
+ {0, NULL, 0, NULL, NULL}
+};
+
+
+static short select_grouped_children(bContext *C, Object *ob, int recursive)
+{
+ short changed = 0;
+
+ CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ if (ob == base->object->parent) {
+ if (!(base->flag & SELECT)) {
+ ED_base_object_select(base, BA_SELECT);
+ changed = 1;
+ }
+
+ if (recursive)
+ changed |= select_grouped_children(C, base->object, 1);
+ }
+ }
+ CTX_DATA_END;
+ return changed;
+}
+
+static short select_grouped_parent(bContext *C) /* Makes parent active and de-selected OBACT */
+{
+ Scene *scene= CTX_data_scene(C);
+ View3D *v3d= CTX_wm_view3d(C);
+
+ short changed = 0;
+ Base *baspar, *basact= CTX_data_active_base(C);
+
+ if (!basact || !(basact->object->parent)) return 0; /* we know OBACT is valid */
+
+ baspar= object_in_scene(basact->object->parent, scene);
+
+ /* can be NULL if parent in other scene */
+ if(baspar && BASE_SELECTABLE(v3d, baspar)) {
+ ED_base_object_select(basact, BA_DESELECT);
+ ED_base_object_select(baspar, BA_SELECT);
+ ED_base_object_activate(C, baspar);
+ changed = 1;
+ }
+ return changed;
+}
+
+
+#define GROUP_MENU_MAX 24
+static short select_grouped_group(bContext *C, Object *ob) /* Select objects in the same group as the active */
+{
+ short changed = 0;
+ Group *group, *ob_groups[GROUP_MENU_MAX];
+ //char str[10 + (24*GROUP_MENU_MAX)];
+ //char *p = str;
+ int group_count=0; //, menu, i;
+
+ for ( group=G.main->group.first;
+ group && group_count < GROUP_MENU_MAX;
+ group=group->id.next
+ ) {
+ if (object_in_group (ob, group)) {
+ ob_groups[group_count] = group;
+ group_count++;
+ }
+ }
+
+ if (!group_count)
+ return 0;
+
+ else if (group_count == 1) {
+ group = ob_groups[0];
+ CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ if (!(base->flag & SELECT) && object_in_group(base->object, group)) {
+ ED_base_object_select(base, BA_SELECT);
+ changed = 1;
+ }
+ }
+ CTX_DATA_END;
+ return changed;
+ }
+#if 0 // XXX hows this work in 2.5?
+ /* build the menu. */
+ p += sprintf(str, "Groups%%t");
+ for (i=0; i<group_count; i++) {
+ group = ob_groups[i];
+ p += sprintf (p, "|%s%%x%i", group->id.name+2, i);
+ }
+
+ menu = pupmenu (str);
+ if (menu == -1)
+ return 0;
+
+ group = ob_groups[menu];
+ for (base= FIRSTBASE; base; base= base->next) {
+ if (!(base->flag & SELECT) && object_in_group(base->object, group)) {
+ ED_base_object_select(base, BA_SELECT);
+ changed = 1;
+ }
+ }
+#endif
+ return changed;
+}
+
+static short select_grouped_object_hooks(bContext *C, Object *ob)
+{
+ Scene *scene= CTX_data_scene(C);
+ View3D *v3d= CTX_wm_view3d(C);
+
+ short changed = 0;
+ Base *base;
+ ModifierData *md;
+ HookModifierData *hmd;
+
+ for (md = ob->modifiers.first; md; md=md->next) {
+ if (md->type==eModifierType_Hook) {
+ hmd= (HookModifierData*) md;
+ if (hmd->object && !(hmd->object->flag & SELECT)) {
+ base= object_in_scene(hmd->object, scene);
+ if (base && (BASE_SELECTABLE(v3d, base))) {
+ ED_base_object_select(base, BA_SELECT);
+ changed = 1;
+ }
+ }
+ }
+ }
+ return changed;
+}
+
+/* Select objects woth the same parent as the active (siblings),
+ * parent can be NULL also */
+static short select_grouped_siblings(bContext *C, Object *ob)
+{
+ short changed = 0;
+
+ CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ if ((base->object->parent==ob->parent) && !(base->flag & SELECT)) {
+ ED_base_object_select(base, BA_SELECT);
+ changed = 1;
+ }
+ }
+ CTX_DATA_END;
+ return changed;
+}
+
+static short select_grouped_type(bContext *C, Object *ob)
+{
+ short changed = 0;
+
+ CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ if ((base->object->type == ob->type) && !(base->flag & SELECT)) {
+ ED_base_object_select(base, BA_SELECT);
+ changed = 1;
+ }
+ }
+ CTX_DATA_END;
+ return changed;
+}
+
+static short select_grouped_layer(bContext *C, Object *ob)
+{
+ char changed = 0;
+
+ CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ if ((base->lay & ob->lay) && !(base->flag & SELECT)) {
+ ED_base_object_select(base, BA_SELECT);
+ changed = 1;
+ }
+ }
+ CTX_DATA_END;
+ return changed;
+}
+
+static short select_grouped_index_object(bContext *C, Object *ob)
+{
+ char changed = 0;
+
+ CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ if ((base->object->index == ob->index) && !(base->flag & SELECT)) {
+ ED_base_object_select(base, BA_SELECT);
+ changed = 1;
+ }
+ }
+ CTX_DATA_END;
+ return changed;
+}
+
+static short select_grouped_color(bContext *C, Object *ob)
+{
+ char changed = 0;
+
+ CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ if (!(base->flag & SELECT) && (FloatCompare(base->object->col, ob->col, 0.005f))) {
+ ED_base_object_select(base, BA_SELECT);
+ changed = 1;
+ }
+ }
+ CTX_DATA_END;
+ return changed;
+}
+
+static short objects_share_gameprop(Object *a, Object *b)
+{
+ bProperty *prop;
+ /*make a copy of all its properties*/
+
+ for( prop= a->prop.first; prop; prop = prop->next ) {
+ if ( get_ob_property(b, prop->name) )
+ return 1;
+ }
+ return 0;
+}
+
+static short select_grouped_gameprops(bContext *C, Object *ob)
+{
+ char changed = 0;
+
+ CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
+ if (!(base->flag & SELECT) && (objects_share_gameprop(base->object, ob))) {
+ ED_base_object_select(base, BA_SELECT);
+ changed = 1;
+ }
+ }
+ CTX_DATA_END;
+ return changed;
+}
+
+static int object_select_grouped_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob;
+ int nr = RNA_enum_get(op->ptr, "type");
+ short changed = 0, seltype;
+
+ seltype = RNA_enum_get(op->ptr, "seltype");
+
+ if (seltype == 0) {
+ CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ ED_base_object_select(base, BA_DESELECT);
+ }
+ CTX_DATA_END;
+ }
+
+ ob= OBACT;
+ if(ob==0){
+ BKE_report(op->reports, RPT_ERROR, "No Active Object");
+ return OPERATOR_CANCELLED;
+ }
+
+ if(nr==1) changed = select_grouped_children(C, ob, 1);
+ else if(nr==2) changed = select_grouped_children(C, ob, 0);
+ else if(nr==3) changed = select_grouped_parent(C);
+ else if(nr==4) changed = select_grouped_siblings(C, ob);
+ else if(nr==5) changed = select_grouped_type(C, ob);
+ else if(nr==6) changed = select_grouped_layer(C, ob);
+ else if(nr==7) changed = select_grouped_group(C, ob);
+ else if(nr==8) changed = select_grouped_object_hooks(C, ob);
+ else if(nr==9) changed = select_grouped_index_object(C, ob);
+ else if(nr==10) changed = select_grouped_color(C, ob);
+ else if(nr==11) changed = select_grouped_gameprops(C, ob);
+
+ if (changed) {
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+ return OPERATOR_FINISHED;
+ }
+
+ return OPERATOR_CANCELLED;
+}
+
+void OBJECT_OT_select_grouped(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Select Grouped";
+ ot->description = "Select all visible objects grouped by various properties.";
+ ot->idname= "OBJECT_OT_select_grouped";
+
+ /* api callbacks */
+ ot->invoke= WM_menu_invoke;
+ ot->exec= object_select_grouped_exec;
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", "");
+ RNA_def_enum(ot->srna, "seltype", prop_select_types, 1, "Selection", "Extend selection or clear selection then select");
+
+}
+
+/* ****** selection by layer *******/
+
+static int object_select_by_layer_exec(bContext *C, wmOperator *op)
+{
+ unsigned int layernum;
+ short seltype;
+
+ seltype = RNA_enum_get(op->ptr, "seltype");
+ layernum = RNA_int_get(op->ptr, "layer");
+
+ if (seltype == 0) {
+ CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ ED_base_object_select(base, BA_DESELECT);
+ }
+ CTX_DATA_END;
+ }
+
+ CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ if(base->lay == (1<< (layernum -1)))
+ ED_base_object_select(base, BA_SELECT);
+ }
+ CTX_DATA_END;
+
+ /* undo? */
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_select_by_layer(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "select by layer";
+ ot->description = "Select all visible objects on a layer.";
+ ot->idname= "OBJECT_OT_select_by_layer";
+
+ /* api callbacks */
+ /*ot->invoke = XXX - need a int grid popup*/
+ ot->exec= object_select_by_layer_exec;
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_int(ot->srna, "layer", 1, 1, 20, "Layer", "", 1, 20);
+ RNA_def_enum(ot->srna, "seltype", prop_select_types, 1, "Selection", "Extend selection or clear selection then select");
+}
+
+/* ****** invert selection *******/
+static int object_select_inverse_exec(bContext *C, wmOperator *op)
+{
+ CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ if (base->flag & SELECT)
+ ED_base_object_select(base, BA_DESELECT);
+ else
+ ED_base_object_select(base, BA_SELECT);
+ }
+ CTX_DATA_END;
+
+ /* undo? */
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_select_inverse(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name= "Select Inverse";
+ ot->description = "Invert selection of all visible objects.";
+ ot->idname= "OBJECT_OT_select_inverse";
+
+ /* api callbacks */
+ ot->exec= object_select_inverse_exec;
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+}
+/* ****** (de)select All *******/
+
+static int object_select_de_select_all_exec(bContext *C, wmOperator *op)
+{
+
+ int a=0, ok=0;
+
+ CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ if (base->flag & SELECT) {
+ ok= a= 1;
+ break;
+ }
+ else ok=1;
+ }
+ CTX_DATA_END;
+
+ if (!ok) return OPERATOR_PASS_THROUGH;
+
+ CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ if (a) ED_base_object_select(base, BA_DESELECT);
+ else ED_base_object_select(base, BA_SELECT);
+ }
+ CTX_DATA_END;
+
+ /* undo? */
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_select_all_toggle(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name= "deselect all";
+ ot->description = "(de)select all visible objects in scene.";
+ ot->idname= "OBJECT_OT_select_all_toggle";
+
+ /* api callbacks */
+ ot->exec= object_select_de_select_all_exec;
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+}
+/* ****** random selection *******/
+
+static int object_select_random_exec(bContext *C, wmOperator *op)
+{
+ float percent;
+ short seltype;
+
+ seltype = RNA_enum_get(op->ptr, "seltype");
+
+ if (seltype == 0) {
+ CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ ED_base_object_select(base, BA_DESELECT);
+ }
+ CTX_DATA_END;
+ }
+ percent = RNA_float_get(op->ptr, "percent");
+
+ CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
+ if (BLI_frand() < percent) {
+ ED_base_object_select(base, BA_SELECT);
+ }
+ }
+ CTX_DATA_END;
+
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_select_random(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Random select";
+ ot->description = "Set select on random visible objects.";
+ ot->idname= "OBJECT_OT_select_random";
+
+ /* api callbacks */
+ /*ot->invoke= object_select_random_invoke XXX - need a number popup ;*/
+ ot->exec = object_select_random_exec;
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_float_percentage(ot->srna, "percent", 0.5f, 0.0f, 1.0f, "Percent", "percentage of objects to randomly select", 0.0001f, 1.0f);
+ RNA_def_enum(ot->srna, "seltype", prop_select_types, 1, "Selection", "Extend selection or clear selection then select");
+}
+
+/* ******** Clear object Translation *********** */
+
+static int object_location_clear_exec(bContext *C, wmOperator *op)
+{
+ int armature_clear= 0;
+
+ CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ if(!(ob->mode & OB_MODE_WEIGHT_PAINT)) {
+ if ((ob->protectflag & OB_LOCK_LOCX)==0)
+ ob->loc[0]= ob->dloc[0]= 0.0f;
+ if ((ob->protectflag & OB_LOCK_LOCY)==0)
+ ob->loc[1]= ob->dloc[1]= 0.0f;
+ if ((ob->protectflag & OB_LOCK_LOCZ)==0)
+ ob->loc[2]= ob->dloc[2]= 0.0f;
+ }
+ ob->recalc |= OB_RECALC_OB;
+ }
+ CTX_DATA_END;
+
+ if(armature_clear==0) /* in this case flush was done */
+ ED_anim_dag_flush_update(C);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+
+void OBJECT_OT_location_clear(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name= "Clear Location";
+ ot->description = "Clear the object's location.";
+ ot->idname= "OBJECT_OT_location_clear";
+
+ /* api callbacks */
+ ot->invoke= WM_operator_confirm;
+ ot->exec= object_location_clear_exec;
+ ot->poll= ED_operator_object_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int object_rotation_clear_exec(bContext *C, wmOperator *op)
+{
+ int armature_clear= 0;
+
+ CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ if(!(ob->mode & OB_MODE_WEIGHT_PAINT)) {
+ /* eulers can only get cleared if they are not protected */
+ if ((ob->protectflag & OB_LOCK_ROTX)==0)
+ ob->rot[0]= ob->drot[0]= 0.0f;
+ if ((ob->protectflag & OB_LOCK_ROTY)==0)
+ ob->rot[1]= ob->drot[1]= 0.0f;
+ if ((ob->protectflag & OB_LOCK_ROTZ)==0)
+ ob->rot[2]= ob->drot[2]= 0.0f;
+ }
+ ob->recalc |= OB_RECALC_OB;
+ }
+ CTX_DATA_END;
+
+ if(armature_clear==0) /* in this case flush was done */
+ ED_anim_dag_flush_update(C);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+
+void OBJECT_OT_rotation_clear(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name= "Clear Rotation";
+ ot->description = "Clear the object's rotation.";
+ ot->idname= "OBJECT_OT_rotation_clear";
+
+ /* api callbacks */
+ ot->invoke= WM_operator_confirm;
+ ot->exec= object_rotation_clear_exec;
+ ot->poll= ED_operator_object_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int object_scale_clear_exec(bContext *C, wmOperator *op)
+{
+ int armature_clear= 0;
+
+ CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ if(!(ob->mode & OB_MODE_WEIGHT_PAINT)) {
+ if ((ob->protectflag & OB_LOCK_SCALEX)==0) {
+ ob->dsize[0]= 0.0f;
+ ob->size[0]= 1.0f;
+ }
+ if ((ob->protectflag & OB_LOCK_SCALEY)==0) {
+ ob->dsize[1]= 0.0f;
+ ob->size[1]= 1.0f;
+ }
+ if ((ob->protectflag & OB_LOCK_SCALEZ)==0) {
+ ob->dsize[2]= 0.0f;
+ ob->size[2]= 1.0f;
+ }
+ }
+ ob->recalc |= OB_RECALC_OB;
+ }
+ CTX_DATA_END;
+
+ if(armature_clear==0) /* in this case flush was done */
+ ED_anim_dag_flush_update(C);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_scale_clear(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name= "Clear Scale";
+ ot->description = "Clear the object's scale.";
+ ot->idname= "OBJECT_OT_scale_clear";
+
+ /* api callbacks */
+ ot->invoke= WM_operator_confirm;
+ ot->exec= object_scale_clear_exec;
+ ot->poll= ED_operator_object_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int object_origin_clear_exec(bContext *C, wmOperator *op)
+{
+ float *v1, *v3, mat[3][3];
+ int armature_clear= 0;
+
+ CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ if(ob->parent) {
+ v1= ob->loc;
+ v3= ob->parentinv[3];
+
+ Mat3CpyMat4(mat, ob->parentinv);
+ VECCOPY(v3, v1);
+ v3[0]= -v3[0];
+ v3[1]= -v3[1];
+ v3[2]= -v3[2];
+ Mat3MulVecfl(mat, v3);
+ }
+ ob->recalc |= OB_RECALC_OB;
+ }
+ CTX_DATA_END;
+
+ if(armature_clear==0) /* in this case flush was done */
+ ED_anim_dag_flush_update(C);
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_origin_clear(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name= "Clear Origin";
+ ot->description = "Clear the object's origin.";
+ ot->idname= "OBJECT_OT_origin_clear";
+
+ /* api callbacks */
+ ot->invoke= WM_operator_confirm;
+ ot->exec= object_origin_clear_exec;
+ ot->poll= ED_operator_object_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
/* ********* clear/set restrict view *********/
static int object_restrictview_clear_exec(bContext *C, wmOperator *op)
{
@@ -274,8 +2511,1157 @@ void OBJECT_OT_restrictview_set(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects.");
}
+/* ************* Slow Parent ******************* */
+static int object_slowparent_set_exec(bContext *C, wmOperator *op)
+{
+
+ CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+
+ if(base->object->parent) base->object->partype |= PARSLOW;
+ base->object->recalc |= OB_RECALC_OB;
+
+ }
+ CTX_DATA_END;
+
+ ED_anim_dag_flush_update(C);
+
+ WM_event_add_notifier(C, NC_SCENE, CTX_data_scene(C));
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_slowparent_set(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name= "Set Slow Parent";
+ ot->description = "Set the object's slow parent.";
+ ot->idname= "OBJECT_OT_slow_parent_set";
+
+ /* api callbacks */
+ ot->invoke= WM_operator_confirm;
+ ot->exec= object_slowparent_set_exec;
+ ot->poll= ED_operator_view3d_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int object_slowparent_clear_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+
+ CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ if(base->object->parent) {
+ if(base->object->partype & PARSLOW) {
+ base->object->partype -= PARSLOW;
+ where_is_object(scene, base->object);
+ base->object->partype |= PARSLOW;
+ base->object->recalc |= OB_RECALC_OB;
+ }
+ }
+
+ }
+ CTX_DATA_END;
+
+ ED_anim_dag_flush_update(C);
+
+ WM_event_add_notifier(C, NC_SCENE, CTX_data_scene(C));
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_slowparent_clear(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name= "Clear Slow Parent";
+ ot->description = "Clear the object's slow parent.";
+ ot->idname= "OBJECT_OT_slow_parent_clear";
+
+ /* api callbacks */
+ ot->invoke= WM_operator_confirm;
+ ot->exec= object_slowparent_clear_exec;
+ ot->poll= ED_operator_view3d_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+/* ******************** **************** */
+// XXX
+#define BEZSELECTED_HIDDENHANDLES(bezt) ((G.f & G_HIDDENHANDLES) ? (bezt)->f2 & SELECT : BEZSELECTED(bezt))
+/* only in edit mode */
+void make_vertex_parent(Scene *scene, Object *obedit, View3D *v3d)
+{
+ EditVert *eve;
+ Base *base;
+ Nurb *nu;
+ BezTriple *bezt;
+ BPoint *bp;
+ Object *par, *ob;
+ int a, v1=0, v2=0, v3=0, v4=0, nr=1;
+
+ /* we need 1 to 3 selected vertices */
+
+ if(obedit->type==OB_MESH) {
+ Mesh *me= obedit->data;
+ EditMesh *em = BKE_mesh_get_editmesh(me);
+
+ eve= em->verts.first;
+ while(eve) {
+ if(eve->f & 1) {
+ if(v1==0) v1= nr;
+ else if(v2==0) v2= nr;
+ else if(v3==0) v3= nr;
+ else if(v4==0) v4= nr;
+ else break;
+ }
+ nr++;
+ eve= eve->next;
+ }
+ BKE_mesh_end_editmesh(me, em);
+ }
+ else if(ELEM(obedit->type, OB_SURF, OB_CURVE)) {
+ ListBase *editnurb= curve_get_editcurve(obedit);
+
+ nu= editnurb->first;
+ while(nu) {
+ if((nu->type & 7)==CU_BEZIER) {
+ bezt= nu->bezt;
+ a= nu->pntsu;
+ while(a--) {
+ if(BEZSELECTED_HIDDENHANDLES(bezt)) {
+ if(v1==0) v1= nr;
+ else if(v2==0) v2= nr;
+ else if(v3==0) v3= nr;
+ else if(v4==0) v4= nr;
+ else break;
+ }
+ nr++;
+ bezt++;
+ }
+ }
+ else {
+ bp= nu->bp;
+ a= nu->pntsu*nu->pntsv;
+ while(a--) {
+ if(bp->f1 & SELECT) {
+ if(v1==0) v1= nr;
+ else if(v2==0) v2= nr;
+ else if(v3==0) v3= nr;
+ else if(v4==0) v4= nr;
+ else break;
+ }
+ nr++;
+ bp++;
+ }
+ }
+ nu= nu->next;
+ }
+ }
+ else if(obedit->type==OB_LATTICE) {
+ Lattice *lt= obedit->data;
+
+ a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
+ bp= lt->editlatt->def;
+ while(a--) {
+ if(bp->f1 & SELECT) {
+ if(v1==0) v1= nr;
+ else if(v2==0) v2= nr;
+ else if(v3==0) v3= nr;
+ else if(v4==0) v4= nr;
+ else break;
+ }
+ nr++;
+ bp++;
+ }
+ }
+
+ if(v4 || !((v1 && v2==0 && v3==0) || (v1 && v2 && v3)) ) {
+ error("Select either 1 or 3 vertices to parent to");
+ return;
+ }
+
+ if(okee("Make vertex parent")==0) return;
+
+ for(base= FIRSTBASE; base; base= base->next) {
+ if(TESTBASELIB(v3d, base)) {
+ if(base!=BASACT) {
+
+ ob= base->object;
+ ob->recalc |= OB_RECALC;
+ par= BASACT->object->parent;
+
+ while(par) {
+ if(par==ob) break;
+ par= par->parent;
+ }
+ if(par) {
+ error("Loop in parents");
+ }
+ else {
+ Object workob;
+
+ ob->parent= BASACT->object;
+ if(v3) {
+ ob->partype= PARVERT3;
+ ob->par1= v1-1;
+ ob->par2= v2-1;
+ ob->par3= v3-1;
+
+ /* inverse parent matrix */
+ what_does_parent(scene, ob, &workob);
+ Mat4Invert(ob->parentinv, workob.obmat);
+ }
+ else {
+ ob->partype= PARVERT1;
+ ob->par1= v1-1;
+
+ /* inverse parent matrix */
+ what_does_parent(scene, ob, &workob);
+ Mat4Invert(ob->parentinv, workob.obmat);
+ }
+ }
+ }
+ }
+ }
+
+ DAG_scene_sort(scene);
+}
+
+
+/* ******************** make proxy operator *********************** */
+
+/* present menu listing the possible objects within the group to proxify */
+static void proxy_group_objects_menu (bContext *C, wmOperator *op, Object *ob, Group *group)
+{
+ uiPopupMenu *pup;
+ uiLayout *layout;
+ GroupObject *go;
+ int len=0;
+
+ /* check if there are any objects within the group to assign for */
+ for (go= group->gobject.first; go; go= go->next) {
+ if (go->ob) len++;
+ }
+ if (len==0) return;
+
+ /* now create the menu to draw */
+ pup= uiPupMenuBegin(C, "Make Proxy For:", 0);
+ layout= uiPupMenuLayout(pup);
+
+ for (go= group->gobject.first; go; go= go->next) {
+ if (go->ob) {
+ PointerRNA props_ptr;
+
+ /* create operator properties, and assign the relevant pointers to that,
+ * and add a menu entry which uses these props
+ */
+ WM_operator_properties_create(&props_ptr, op->idname);
+ RNA_string_set(&props_ptr, "object", go->ob->id.name+2);
+ RNA_string_set(&props_ptr, "group_object", go->ob->id.name+2);
+ uiItemFullO(layout, go->ob->id.name+2, 0, op->idname, props_ptr.data, WM_OP_EXEC_REGION_WIN);
+ }
+ }
+
+ /* display the menu, and be done */
+ uiPupMenuEnd(C, pup);
+}
+
+/* set the object to proxify */
+static int make_proxy_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_active_object(C);
+
+ /* sanity checks */
+ if (!scene || scene->id.lib || !ob)
+ return OPERATOR_CANCELLED;
+
+ /* Get object to work on - use a menu if we need to... */
+ if (ob->dup_group && ob->dup_group->id.lib) {
+ /* gives menu with list of objects in group */
+ proxy_group_objects_menu(C, op, ob, ob->dup_group);
+ }
+ else if (ob->id.lib) {
+ uiPopupMenu *pup= uiPupMenuBegin(C, "OK?", ICON_QUESTION);
+ uiLayout *layout= uiPupMenuLayout(pup);
+ PointerRNA props_ptr;
+
+ /* create operator properties, and assign the relevant pointers to that,
+ * and add a menu entry which uses these props
+ */
+ WM_operator_properties_create(&props_ptr, op->idname);
+ RNA_string_set(&props_ptr, "object", ob->id.name+2);
+ uiItemFullO(layout, op->type->name, 0, op->idname, props_ptr.data, WM_OP_EXEC_REGION_WIN);
+
+ /* present the menu and be done... */
+ uiPupMenuEnd(C, pup);
+ }
+ else {
+ /* error.. cannot continue */
+ BKE_report(op->reports, RPT_ERROR, "Can only make proxy for a referenced object or group");
+ }
+
+ /* this invoke just calls another instance of this operator... */
+ return OPERATOR_CANCELLED;
+}
+
+static int make_proxy_exec (bContext *C, wmOperator *op)
+{
+ Object *ob=NULL, *gob=NULL;
+ Scene *scene= CTX_data_scene(C);
+ char ob_name[21], gob_name[21];
+
+ /* get object and group object
+ * - firstly names
+ * - then pointers from context
+ */
+ RNA_string_get(op->ptr, "object", ob_name);
+ RNA_string_get(op->ptr, "group_object", gob_name);
+
+ if (gob_name[0]) {
+ Group *group;
+ GroupObject *go;
+
+ /* active object is group object... */
+ // FIXME: we should get the nominated name instead
+ gob= CTX_data_active_object(C);
+ group= gob->dup_group;
+
+ /* find the object to affect */
+ for (go= group->gobject.first; go; go= go->next) {
+ if ((go->ob) && strcmp(go->ob->id.name+2, gob_name)==0) {
+ ob= go->ob;
+ break;
+ }
+ }
+ }
+ else {
+ /* just use the active object for now */
+ // FIXME: we should get the nominated name instead
+ ob= CTX_data_active_object(C);
+ }
+
+ if (ob) {
+ Object *newob;
+ Base *newbase, *oldbase= BASACT;
+ char name[32];
+
+ /* Add new object for the proxy */
+ newob= add_object(scene, OB_EMPTY);
+ if (gob)
+ strcpy(name, gob->id.name+2);
+ else
+ strcpy(name, ob->id.name+2);
+ strcat(name, "_proxy");
+ rename_id(&newob->id, name);
+
+ /* set layers OK */
+ newbase= BASACT; /* add_object sets active... */
+ newbase->lay= oldbase->lay;
+ newob->lay= newbase->lay;
+
+ /* remove base, leave user count of object, it gets linked in object_make_proxy */
+ if (gob==NULL) {
+ BLI_remlink(&scene->base, oldbase);
+ MEM_freeN(oldbase);
+ }
+
+ object_make_proxy(newob, ob, gob);
+
+ /* depsgraph flushes are needed for the new data */
+ DAG_scene_sort(scene);
+ DAG_object_flush_update(scene, newob, OB_RECALC);
+
+ WM_event_add_notifier(C, NC_OBJECT, NULL);
+ }
+ else {
+ BKE_report(op->reports, RPT_ERROR, "No object to make proxy for");
+ return OPERATOR_CANCELLED;
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_proxy_make (wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Make Proxy";
+ ot->idname= "OBJECT_OT_proxy_make";
+ ot->description= "Add empty object to become local replacement data of a library-linked object";
+
+ /* callbacks */
+ ot->invoke= make_proxy_invoke;
+ ot->exec= make_proxy_exec;
+ ot->poll= ED_operator_object_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* properties */
+ RNA_def_string(ot->srna, "object", "", 19, "Proxy Object", "Name of lib-linked/grouped object to make a proxy for.");
+ RNA_def_string(ot->srna, "group_object", "", 19, "Group Object", "Name of group instancer (if applicable).");
+}
+
+/* ******************** make parent operator *********************** */
+
+#define PAR_OBJECT 0
+#define PAR_ARMATURE 1
+#define PAR_ARMATURE_NAME 2
+#define PAR_ARMATURE_ENVELOPE 3
+#define PAR_ARMATURE_AUTO 4
+#define PAR_BONE 5
+#define PAR_CURVE 6
+#define PAR_FOLLOW 7
+#define PAR_PATH_CONST 8
+#define PAR_LATTICE 9
+#define PAR_VERTEX 10
+#define PAR_TRIA 11
+
+static EnumPropertyItem prop_make_parent_types[] = {
+ {PAR_OBJECT, "OBJECT", 0, "Object", ""},
+ {PAR_ARMATURE, "ARMATURE", 0, "Armature Deform", ""},
+ {PAR_ARMATURE_NAME, "ARMATURE_NAME", 0, " With Empty Groups", ""},
+ {PAR_ARMATURE_AUTO, "ARMATURE_AUTO", 0, " With Automatic Weights", ""},
+ {PAR_ARMATURE_ENVELOPE, "ARMATURE_ENVELOPE", 0, " With Envelope Weights", ""},
+ {PAR_BONE, "BONE", 0, "Bone", ""},
+ {PAR_CURVE, "CURVE", 0, "Curve Deform", ""},
+ {PAR_FOLLOW, "FOLLOW", 0, "Follow Path", ""},
+ {PAR_PATH_CONST, "PATH_CONST", 0, "Path Constraint", ""},
+ {PAR_LATTICE, "LATTICE", 0, "Lattice Deform", ""},
+ {PAR_VERTEX, "VERTEX", 0, "Vertex", ""},
+ {PAR_TRIA, "TRIA", 0, "Triangle", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+static int test_parent_loop(Object *par, Object *ob)
+{
+ /* test if 'ob' is a parent somewhere in par's parents */
+
+ if(par == NULL) return 0;
+ if(ob == par) return 1;
+
+ return test_parent_loop(par->parent, ob);
+}
+
+void ED_object_parent(Object *ob, Object *par, int type, const char *substr)
+{
+ if(!par || test_parent_loop(par, ob)) {
+ ob->parent= NULL;
+ ob->partype= PAROBJECT;
+ ob->parsubstr[0]= 0;
+ return;
+ }
+
+ /* this could use some more checks */
+
+ ob->parent= par;
+ ob->partype &= ~PARTYPE;
+ ob->partype |= type;
+ BLI_strncpy(ob->parsubstr, substr, sizeof(ob->parsubstr));
+}
+
+static int parent_set_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *par= CTX_data_active_object(C);
+ bPoseChannel *pchan= NULL;
+ int partype= RNA_enum_get(op->ptr, "type");
+ int pararm= ELEM4(partype, PAR_ARMATURE, PAR_ARMATURE_NAME, PAR_ARMATURE_ENVELOPE, PAR_ARMATURE_AUTO);
+
+ par->recalc |= OB_RECALC_OB;
+
+ /* preconditions */
+ if(partype==PAR_FOLLOW || partype==PAR_PATH_CONST) {
+ if(par->type!=OB_CURVE)
+ return OPERATOR_CANCELLED;
+ else {
+ Curve *cu= par->data;
+
+ if((cu->flag & CU_PATH)==0) {
+ cu->flag |= CU_PATH|CU_FOLLOW;
+ makeDispListCurveTypes(scene, par, 0); /* force creation of path data */
+ }
+ else cu->flag |= CU_FOLLOW;
+
+ /* fall back on regular parenting now */
+ partype= PAR_OBJECT;
+ }
+ }
+ else if(partype==PAR_BONE) {
+ pchan= get_active_posechannel(par);
+
+ if(pchan==NULL) {
+ error("No active Bone");
+ return OPERATOR_CANCELLED;
+ }
+ }
+
+ /* context itterator */
+ CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+
+ if(ob!=par) {
+
+ if( test_parent_loop(par, ob) ) {
+ error("Loop in parents");
+ }
+ else {
+ Object workob;
+
+ /* apply transformation of previous parenting */
+ ED_object_apply_obmat(ob);
+
+ ob->parent= par;
+
+ /* handle types */
+ if (pchan)
+ strcpy (ob->parsubstr, pchan->name);
+ else
+ ob->parsubstr[0]= 0;
+
+ /* constraint */
+ if(partype==PAR_PATH_CONST) {
+ bConstraint *con;
+ bFollowPathConstraint *data;
+ float cmat[4][4], vec[3];
+
+ con = add_new_constraint(CONSTRAINT_TYPE_FOLLOWPATH);
+ strcpy (con->name, "AutoPath");
+
+ data = con->data;
+ data->tar = par;
+
+ add_constraint_to_object(con, ob);
+
+ get_constraint_target_matrix(con, 0, CONSTRAINT_OBTYPE_OBJECT, NULL, cmat, scene->r.cfra - give_timeoffset(ob));
+ VecSubf(vec, ob->obmat[3], cmat[3]);
+
+ ob->loc[0] = vec[0];
+ ob->loc[1] = vec[1];
+ }
+ else if(pararm && ob->type==OB_MESH && par->type == OB_ARMATURE) {
+ if(partype == PAR_ARMATURE_NAME)
+ create_vgroups_from_armature(scene, ob, par, ARM_GROUPS_NAME);
+ else if(partype == PAR_ARMATURE_ENVELOPE)
+ create_vgroups_from_armature(scene, ob, par, ARM_GROUPS_ENVELOPE);
+ else if(partype == PAR_ARMATURE_AUTO)
+ create_vgroups_from_armature(scene, ob, par, ARM_GROUPS_AUTO);
+
+ /* get corrected inverse */
+ ob->partype= PAROBJECT;
+ what_does_parent(scene, ob, &workob);
+
+ ob->partype= PARSKEL;
+
+ Mat4Invert(ob->parentinv, workob.obmat);
+ }
+ else {
+ /* calculate inverse parent matrix */
+ what_does_parent(scene, ob, &workob);
+ Mat4Invert(ob->parentinv, workob.obmat);
+ }
+
+ ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA;
+
+ if( ELEM(partype, PAR_CURVE, PAR_LATTICE) || pararm )
+ ob->partype= PARSKEL; /* note, dna define, not operator property */
+ else
+ ob->partype= PAROBJECT; /* note, dna define, not operator property */
+ }
+ }
+ }
+ CTX_DATA_END;
+
+ DAG_scene_sort(CTX_data_scene(C));
+ ED_anim_dag_flush_update(C);
+ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+static int parent_set_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ Object *ob= CTX_data_active_object(C);
+ uiPopupMenu *pup= uiPupMenuBegin(C, "Set Parent To", 0);
+ uiLayout *layout= uiPupMenuLayout(pup);
+
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
+ uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_OBJECT);
+
+ /* ob becomes parent, make the associated menus */
+ if(ob->type==OB_ARMATURE) {
+ uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_ARMATURE);
+ uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_ARMATURE_NAME);
+ uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_ARMATURE_ENVELOPE);
+ uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_ARMATURE_AUTO);
+ uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_BONE);
+ }
+ else if(ob->type==OB_CURVE) {
+ uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_CURVE);
+ uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_FOLLOW);
+ uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_PATH_CONST);
+ }
+ else if(ob->type == OB_LATTICE) {
+ uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_LATTICE);
+ }
+
+ uiPupMenuEnd(C, pup);
+
+ return OPERATOR_CANCELLED;
+}
+
+
+void OBJECT_OT_parent_set(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Make Parent";
+ ot->description = "Set the object's parenting.";
+ ot->idname= "OBJECT_OT_parent_set";
+
+ /* api callbacks */
+ ot->invoke= parent_set_invoke;
+ ot->exec= parent_set_exec;
+
+ ot->poll= ED_operator_object_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "type", prop_make_parent_types, 0, "Type", "");
+}
+
+/* *** make track ***** */
+static EnumPropertyItem prop_make_track_types[] = {
+ {1, "TRACKTO", 0, "TrackTo Constraint", ""},
+ {2, "LOCKTRACK", 0, "LockTrack Constraint", ""},
+ {3, "OLDTRACK", 0, "Old Track", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
+static int track_set_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ int type= RNA_enum_get(op->ptr, "type");
+
+ if(type == 1) {
+ bConstraint *con;
+ bTrackToConstraint *data;
+
+ CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ if(base!=BASACT) {
+ con = add_new_constraint(CONSTRAINT_TYPE_TRACKTO);
+ strcpy (con->name, "AutoTrack");
+
+ data = con->data;
+ data->tar = BASACT->object;
+ base->object->recalc |= OB_RECALC;
+
+ /* Lamp and Camera track differently by default */
+ if (base->object->type == OB_LAMP || base->object->type == OB_CAMERA) {
+ data->reserved1 = TRACK_nZ;
+ data->reserved2 = UP_Y;
+ }
+
+ add_constraint_to_object(con, base->object);
+ }
+ }
+ CTX_DATA_END;
+ }
+ else if(type == 2) {
+ bConstraint *con;
+ bLockTrackConstraint *data;
+
+ CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ if(base!=BASACT) {
+ con = add_new_constraint(CONSTRAINT_TYPE_LOCKTRACK);
+ strcpy (con->name, "AutoTrack");
+
+ data = con->data;
+ data->tar = BASACT->object;
+ base->object->recalc |= OB_RECALC;
+
+ /* Lamp and Camera track differently by default */
+ if (base->object->type == OB_LAMP || base->object->type == OB_CAMERA) {
+ data->trackflag = TRACK_nZ;
+ data->lockflag = LOCK_Y;
+ }
+
+ add_constraint_to_object(con, base->object);
+ }
+ }
+ CTX_DATA_END;
+ }
+ else {
+ CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ if(base!=BASACT) {
+ base->object->track= BASACT->object;
+ base->object->recalc |= OB_RECALC;
+ }
+ }
+ CTX_DATA_END;
+ }
+ DAG_scene_sort(CTX_data_scene(C));
+ ED_anim_dag_flush_update(C);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_track_set(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Make Track";
+ ot->description = "Make the object track another object, either by constraint or old way or locked track.";
+ ot->idname= "OBJECT_OT_track_set";
+
+ /* api callbacks */
+ ot->invoke= WM_menu_invoke;
+ ot->exec= track_set_exec;
+
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "type", prop_make_track_types, 0, "Type", "");
+}
+
+/* ************* Make Dupli Real ********* */
+static void make_object_duplilist_real(Scene *scene, View3D *v3d, Base *base)
+{
+ Base *basen;
+ Object *ob;
+ ListBase *lb;
+ DupliObject *dob;
+
+ if(!base && !(base = BASACT))
+ return;
+
+ if(!(base->object->transflag & OB_DUPLI))
+ return;
+
+ lb= object_duplilist(scene, base->object);
+
+ for(dob= lb->first; dob; dob= dob->next) {
+ ob= copy_object(dob->ob);
+ /* font duplis can have a totcol without material, we get them from parent
+ * should be implemented better...
+ */
+ if(ob->mat==NULL) ob->totcol= 0;
+
+ basen= MEM_dupallocN(base);
+ basen->flag &= ~OB_FROMDUPLI;
+ BLI_addhead(&scene->base, basen); /* addhead: othwise eternal loop */
+ basen->object= ob;
+ ob->ipo= NULL; /* make sure apply works */
+ ob->parent= ob->track= NULL;
+ ob->disp.first= ob->disp.last= NULL;
+ ob->transflag &= ~OB_DUPLI;
+
+ Mat4CpyMat4(ob->obmat, dob->mat);
+ ED_object_apply_obmat(ob);
+ }
+
+ copy_object_set_idnew(scene, v3d, 0);
+
+ free_object_duplilist(lb);
+
+ base->object->transflag &= ~OB_DUPLI;
+}
+
+
+static int object_duplicates_make_real_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ ScrArea *sa= CTX_wm_area(C);
+ View3D *v3d= sa->spacedata.first;
+
+ clear_id_newpoins();
+
+ CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ make_object_duplilist_real(scene, v3d, base);
+ }
+ CTX_DATA_END;
+
+ DAG_scene_sort(CTX_data_scene(C));
+ ED_anim_dag_flush_update(C);
+ WM_event_add_notifier(C, NC_SCENE, CTX_data_scene(C));
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_duplicates_make_real(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name= "Make Duplicates Real";
+ ot->description = "Make dupli objects attached to this object real.";
+ ot->idname= "OBJECT_OT_duplicates_make_real";
+
+ /* api callbacks */
+ ot->invoke= WM_operator_confirm;
+ ot->exec= object_duplicates_make_real_exec;
+
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+/* ******************* Set Object Center ********************** */
+
+static EnumPropertyItem prop_set_center_types[] = {
+ {0, "CENTER", 0, "ObData to Center", "Move object data around Object center"},
+ {1, "CENTERNEW", 0, "Center New", "Move Object center to center of object data"},
+ {2, "CENTERCURSOR", 0, "Center Cursor", "Move Object Center to position of the 3d cursor"},
+ {0, NULL, 0, NULL, NULL}
+};
+
+/* 0 == do center, 1 == center new, 2 == center cursor */
+static int object_center_set_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ ScrArea *sa= CTX_wm_area(C);
+ View3D *v3d= sa->spacedata.first;
+ Object *obedit= CTX_data_edit_object(C);
+ Object *ob;
+ Mesh *me, *tme;
+ Curve *cu;
+/* BezTriple *bezt;
+ BPoint *bp; */
+ Nurb *nu, *nu1;
+ EditVert *eve;
+ float cent[3], centn[3], min[3], max[3], omat[3][3];
+ int a, total= 0;
+ int centermode = RNA_enum_get(op->ptr, "type");
+
+ /* keep track of what is changed */
+ int tot_change=0, tot_lib_error=0, tot_multiuser_arm_error=0;
+ MVert *mvert;
+
+ if(scene->id.lib || v3d==NULL){
+ BKE_report(op->reports, RPT_ERROR, "Operation cannot be performed on Lib data");
+ return OPERATOR_CANCELLED;
+ }
+ if (obedit && centermode > 0) {
+ BKE_report(op->reports, RPT_ERROR, "Operation cannot be performed in EditMode");
+ return OPERATOR_CANCELLED;
+ }
+ cent[0]= cent[1]= cent[2]= 0.0;
+
+ if(obedit) {
+
+ INIT_MINMAX(min, max);
+
+ if(obedit->type==OB_MESH) {
+ Mesh *me= obedit->data;
+ EditMesh *em = BKE_mesh_get_editmesh(me);
+
+ for(eve= em->verts.first; eve; eve= eve->next) {
+ if(v3d->around==V3D_CENTROID) {
+ total++;
+ VECADD(cent, cent, eve->co);
+ }
+ else {
+ DO_MINMAX(eve->co, min, max);
+ }
+ }
+
+ if(v3d->around==V3D_CENTROID) {
+ VecMulf(cent, 1.0f/(float)total);
+ }
+ else {
+ cent[0]= (min[0]+max[0])/2.0f;
+ cent[1]= (min[1]+max[1])/2.0f;
+ cent[2]= (min[2]+max[2])/2.0f;
+ }
+
+ for(eve= em->verts.first; eve; eve= eve->next) {
+ VecSubf(eve->co, eve->co, cent);
+ }
+
+ recalc_editnormals(em);
+ tot_change++;
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ BKE_mesh_end_editmesh(me, em);
+ }
+ }
+
+ /* reset flags */
+ CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ base->object->flag &= ~OB_DONE;
+ }
+ CTX_DATA_END;
+
+ for (me= G.main->mesh.first; me; me= me->id.next) {
+ me->flag &= ~ME_ISDONE;
+ }
+
+ CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ if((base->object->flag & OB_DONE)==0) {
+ base->object->flag |= OB_DONE;
+
+ if(obedit==NULL && (me=get_mesh(base->object)) ) {
+ if (me->id.lib) {
+ tot_lib_error++;
+ } else {
+ if(centermode==2) {
+ VECCOPY(cent, give_cursor(scene, v3d));
+ Mat4Invert(base->object->imat, base->object->obmat);
+ Mat4MulVecfl(base->object->imat, cent);
+ } else {
+ INIT_MINMAX(min, max);
+ mvert= me->mvert;
+ for(a=0; a<me->totvert; a++, mvert++) {
+ DO_MINMAX(mvert->co, min, max);
+ }
+
+ cent[0]= (min[0]+max[0])/2.0f;
+ cent[1]= (min[1]+max[1])/2.0f;
+ cent[2]= (min[2]+max[2])/2.0f;
+ }
+
+ mvert= me->mvert;
+ for(a=0; a<me->totvert; a++, mvert++) {
+ VecSubf(mvert->co, mvert->co, cent);
+ }
+
+ if (me->key) {
+ KeyBlock *kb;
+ for (kb=me->key->block.first; kb; kb=kb->next) {
+ float *fp= kb->data;
+
+ for (a=0; a<kb->totelem; a++, fp+=3) {
+ VecSubf(fp, fp, cent);
+ }
+ }
+ }
+
+ me->flag |= ME_ISDONE;
+
+ if(centermode) {
+ Mat3CpyMat4(omat, base->object->obmat);
+
+ VECCOPY(centn, cent);
+ Mat3MulVecfl(omat, centn);
+ base->object->loc[0]+= centn[0];
+ base->object->loc[1]+= centn[1];
+ base->object->loc[2]+= centn[2];
+
+ where_is_object(scene, base->object);
+ ignore_parent_tx(scene, base->object);
+
+ /* other users? */
+ CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ ob = base->object;
+ if((ob->flag & OB_DONE)==0) {
+ tme= get_mesh(ob);
+
+ if(tme==me) {
+
+ ob->flag |= OB_DONE;
+ ob->recalc= OB_RECALC_OB|OB_RECALC_DATA;
+
+ Mat3CpyMat4(omat, ob->obmat);
+ VECCOPY(centn, cent);
+ Mat3MulVecfl(omat, centn);
+ ob->loc[0]+= centn[0];
+ ob->loc[1]+= centn[1];
+ ob->loc[2]+= centn[2];
+
+ where_is_object(scene, ob);
+ ignore_parent_tx(scene, ob);
+
+ if(tme && (tme->flag & ME_ISDONE)==0) {
+ mvert= tme->mvert;
+ for(a=0; a<tme->totvert; a++, mvert++) {
+ VecSubf(mvert->co, mvert->co, cent);
+ }
+
+ if (tme->key) {
+ KeyBlock *kb;
+ for (kb=tme->key->block.first; kb; kb=kb->next) {
+ float *fp= kb->data;
+
+ for (a=0; a<kb->totelem; a++, fp+=3) {
+ VecSubf(fp, fp, cent);
+ }
+ }
+ }
+
+ tme->flag |= ME_ISDONE;
+ }
+ }
+ }
+
+ ob= ob->id.next;
+ }
+ CTX_DATA_END;
+ }
+ tot_change++;
+ }
+ }
+ else if (ELEM(base->object->type, OB_CURVE, OB_SURF)) {
+
+ /* weak code here... (ton) */
+ if(obedit==base->object) {
+ ListBase *editnurb= curve_get_editcurve(obedit);
+
+ nu1= editnurb->first;
+ cu= obedit->data;
+ }
+ else {
+ cu= base->object->data;
+ nu1= cu->nurb.first;
+ }
+
+ if (cu->id.lib) {
+ tot_lib_error++;
+ } else {
+ if(centermode==2) {
+ VECCOPY(cent, give_cursor(scene, v3d));
+ Mat4Invert(base->object->imat, base->object->obmat);
+ Mat4MulVecfl(base->object->imat, cent);
+
+ /* don't allow Z change if curve is 2D */
+ if( !( cu->flag & CU_3D ) )
+ cent[2] = 0.0;
+ }
+ else {
+ INIT_MINMAX(min, max);
+
+ nu= nu1;
+ while(nu) {
+ minmaxNurb(nu, min, max);
+ nu= nu->next;
+ }
+
+ cent[0]= (min[0]+max[0])/2.0f;
+ cent[1]= (min[1]+max[1])/2.0f;
+ cent[2]= (min[2]+max[2])/2.0f;
+ }
+
+ nu= nu1;
+ while(nu) {
+ if( (nu->type & 7)==CU_BEZIER) {
+ a= nu->pntsu;
+ while (a--) {
+ VecSubf(nu->bezt[a].vec[0], nu->bezt[a].vec[0], cent);
+ VecSubf(nu->bezt[a].vec[1], nu->bezt[a].vec[1], cent);
+ VecSubf(nu->bezt[a].vec[2], nu->bezt[a].vec[2], cent);
+ }
+ }
+ else {
+ a= nu->pntsu*nu->pntsv;
+ while (a--)
+ VecSubf(nu->bp[a].vec, nu->bp[a].vec, cent);
+ }
+ nu= nu->next;
+ }
+
+ if(centermode && obedit==0) {
+ Mat3CpyMat4(omat, base->object->obmat);
+
+ Mat3MulVecfl(omat, cent);
+ base->object->loc[0]+= cent[0];
+ base->object->loc[1]+= cent[1];
+ base->object->loc[2]+= cent[2];
+
+ where_is_object(scene, base->object);
+ ignore_parent_tx(scene, base->object);
+ }
+
+ tot_change++;
+ if(obedit) {
+ if (centermode==0) {
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ }
+ break;
+ }
+ }
+ }
+ else if(base->object->type==OB_FONT) {
+ /* get from bb */
+
+ cu= base->object->data;
+
+ if(cu->bb==0) {
+ /* do nothing*/
+ } else if (cu->id.lib) {
+ tot_lib_error++;
+ } else {
+ cu->xof= -0.5f*( cu->bb->vec[4][0] - cu->bb->vec[0][0]);
+ cu->yof= -0.5f -0.5f*( cu->bb->vec[0][1] - cu->bb->vec[2][1]); /* extra 0.5 is the height o above line */
+
+ /* not really ok, do this better once! */
+ cu->xof /= cu->fsize;
+ cu->yof /= cu->fsize;
+
+ tot_change++;
+ }
+ }
+ else if(base->object->type==OB_ARMATURE) {
+ bArmature *arm = base->object->data;
+
+ if (arm->id.lib) {
+ tot_lib_error++;
+ } else if(arm->id.us>1) {
+ /*error("Can't apply to a multi user armature");
+ return;*/
+ tot_multiuser_arm_error++;
+ } else {
+ /* Function to recenter armatures in editarmature.c
+ * Bone + object locations are handled there.
+ */
+ docenter_armature(scene, v3d, base->object, centermode);
+ tot_change++;
+
+ where_is_object(scene, base->object);
+ ignore_parent_tx(scene, base->object);
+
+ if(obedit)
+ break;
+ }
+ }
+ base->object->recalc= OB_RECALC_OB|OB_RECALC_DATA;
+ }
+ }
+ CTX_DATA_END;
+
+ if (tot_change) {
+ ED_anim_dag_flush_update(C);
+ }
+
+ /* Warn if any errors occured */
+ if (tot_lib_error+tot_multiuser_arm_error) {
+ BKE_reportf(op->reports, RPT_WARNING, "%i Object(s) Not Centered, %i Changed:",tot_lib_error+tot_multiuser_arm_error, tot_change);
+ if (tot_lib_error)
+ BKE_reportf(op->reports, RPT_WARNING, "|%i linked library objects",tot_lib_error);
+ if (tot_multiuser_arm_error)
+ BKE_reportf(op->reports, RPT_WARNING, "|%i multiuser armature object(s)",tot_multiuser_arm_error);
+ }
+
+ return OPERATOR_FINISHED;
+}
+void OBJECT_OT_center_set(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Set Center";
+ ot->description = "Set the object's center, by either moving the data, or set to center of data, or use 3d cursor";
+ ot->idname= "OBJECT_OT_center_set";
+
+ /* api callbacks */
+ ot->invoke= WM_menu_invoke;
+ ot->exec= object_center_set_exec;
+
+ ot->poll= ED_operator_view3d_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "type", prop_set_center_types, 0, "Type", "");
+}
/* ******************* toggle editmode operator ***************** */
void ED_object_exit_editmode(bContext *C, int flag)
@@ -311,7 +3697,7 @@ void ED_object_exit_editmode(bContext *C, int flag)
mesh_octree_table(obedit, NULL, NULL, 'e');
}
else if (obedit->type==OB_ARMATURE) {
- ED_armature_from_edit(obedit);
+ ED_armature_from_edit(scene, obedit);
if(freedata)
ED_armature_edit_free(obedit);
}
@@ -337,10 +3723,8 @@ void ED_object_exit_editmode(bContext *C, int flag)
/* for example; displist make is different in editmode */
scene->obedit= NULL; // XXX for context
- BKE_ptcache_object_reset(scene, obedit, PTCACHE_RESET_DEPSGRAPH);
-
/* also flush ob recalc, doesn't take much overhead, but used for particles */
- DAG_id_flush_update(&obedit->id, OB_RECALC_OB|OB_RECALC_DATA);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_OB|OB_RECALC_DATA);
ED_undo_push(C, "Editmode");
@@ -419,7 +3803,7 @@ void ED_object_enter_editmode(bContext *C, int flag)
scene->obedit= ob;
ED_armature_to_edit(ob);
/* to ensure all goes in restposition and without striding */
- DAG_id_flush_update(&ob->id, OB_RECALC);
+ DAG_object_flush_update(scene, ob, OB_RECALC);
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_ARMATURE, scene);
}
@@ -453,7 +3837,7 @@ void ED_object_enter_editmode(bContext *C, int flag)
}
if(ok) {
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
else {
scene->obedit= NULL; // XXX for context
@@ -549,6 +3933,57 @@ void check_editmode(int type)
// XXX ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* freedata, and undo */
}
+void movetolayer(Scene *scene, View3D *v3d)
+{
+ Base *base;
+ unsigned int lay= 0, local;
+ int islamp= 0;
+
+ if(scene->id.lib) return;
+
+ for(base= FIRSTBASE; base; base= base->next) {
+ if (TESTBASE(v3d, base)) lay |= base->lay;
+ }
+ if(lay==0) return;
+ lay &= 0xFFFFFF;
+
+ if(lay==0) return;
+
+ if(v3d->localview) {
+ /* now we can move out of localview. */
+ if (!okee("Move from localview")) return;
+ for(base= FIRSTBASE; base; base= base->next) {
+ if (TESTBASE(v3d, base)) {
+ lay= base->lay & ~v3d->lay;
+ base->lay= lay;
+ base->object->lay= lay;
+ base->object->flag &= ~SELECT;
+ base->flag &= ~SELECT;
+ if(base->object->type==OB_LAMP) islamp= 1;
+ }
+ }
+ } else {
+// XXX if( movetolayer_buts(&lay, NULL)==0 ) return;
+
+ /* normal non localview operation */
+ for(base= FIRSTBASE; base; base= base->next) {
+ if (TESTBASE(v3d, base)) {
+ /* upper byte is used for local view */
+ local= base->lay & 0xFF000000;
+ base->lay= lay + local;
+ base->object->lay= lay;
+ if(base->object->type==OB_LAMP) islamp= 1;
+ }
+ }
+ }
+ if(islamp) reshadeall_displist(scene); /* only frees */
+
+ /* warning, active object may be hidden now */
+
+ DAG_scene_sort(scene);
+
+}
+
#if 0
// XXX should be in view3d?
@@ -732,7 +4167,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
}
}
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
else if(ob->mode & OB_MODE_VERTEX_PAINT) {
Mesh *me= get_mesh(ob);
@@ -744,7 +4179,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
// XXX do_shared_vertexcol(me);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
}
else if(ob->mode & OB_MODE_WEIGHT_PAINT) {
@@ -791,7 +4226,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
break;
}
- DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
if(nr>0) waitcursor(0);
#endif
@@ -906,6 +4341,241 @@ void special_editmenu(Scene *scene, View3D *v3d)
}
+static void curvetomesh(Scene *scene, Object *ob)
+{
+ Curve *cu;
+ DispList *dl;
+
+ ob->flag |= OB_DONE;
+ cu= ob->data;
+
+ dl= cu->disp.first;
+ if(dl==0) makeDispListCurveTypes(scene, ob, 0); /* force creation */
+
+ nurbs_to_mesh(ob); /* also does users */
+ if (ob->type != OB_MESH) {
+ error("can't convert curve to mesh");
+ } else {
+ object_free_modifiers(ob);
+ }
+}
+
+void convertmenu(Scene *scene, View3D *v3d)
+{
+ Base *base, *basen=NULL, *basact, *basedel=NULL;
+ Object *obact, *ob, *ob1;
+ Object *obedit= NULL; // XXX
+ Curve *cu;
+ Nurb *nu;
+ MetaBall *mb;
+ Mesh *me;
+ int ok=0, nr = 0, a;
+
+ if(scene->id.lib) return;
+
+ obact= OBACT;
+ if (obact == NULL) return;
+ if(!obact->flag & SELECT) return;
+ if(obedit) return;
+
+ basact= BASACT; /* will be restored */
+
+ if(obact->type==OB_FONT) {
+ nr= pupmenu("Convert Font to%t|Curve%x1|Curve (Single filling group)%x2|Mesh%x3");
+ if(nr>0) ok= 1;
+ }
+ else if(obact->type==OB_MBALL) {
+ nr= pupmenu("Convert Metaball to%t|Mesh (keep original)%x1|Mesh (Delete Original)%x2");
+ if(nr>0) ok= 1;
+ }
+ else if(obact->type==OB_CURVE) {
+ nr= pupmenu("Convert Curve to%t|Mesh");
+ if(nr>0) ok= 1;
+ }
+ else if(obact->type==OB_SURF) {
+ nr= pupmenu("Convert Nurbs Surface to%t|Mesh");
+ if(nr>0) ok= 1;
+ }
+ else if(obact->type==OB_MESH) {
+ nr= pupmenu("Convert Modifiers to%t|Mesh (Keep Original)%x1|Mesh (Delete Original)%x2");
+ if(nr>0) ok= 1;
+ }
+ if(ok==0) return;
+
+ /* don't forget multiple users! */
+
+ /* reset flags */
+ for(base= FIRSTBASE; base; base= base->next) {
+ if(TESTBASELIB(v3d, base)) {
+ base->object->flag &= ~OB_DONE;
+ }
+ }
+
+ for(base= FIRSTBASE; base; base= base->next) {
+ if(TESTBASELIB(v3d, base)) {
+
+ ob= base->object;
+
+ if(ob->flag & OB_DONE);
+ else if(ob->type==OB_MESH && ob->modifiers.first) { /* converting a mesh with no modifiers causes a segfault */
+ DerivedMesh *dm;
+
+ basedel = base;
+
+ ob->flag |= OB_DONE;
+
+ ob1= copy_object(ob);
+ ob1->recalc |= OB_RECALC;
+
+ basen= MEM_mallocN(sizeof(Base), "duplibase");
+ *basen= *base;
+ BLI_addhead(&scene->base, basen); /* addhead: otherwise eternal loop */
+ basen->object= ob1;
+ basen->flag |= SELECT;
+ base->flag &= ~SELECT;
+ ob->flag &= ~SELECT;
+
+ /* decrement original mesh's usage count */
+ me= ob1->data;
+ me->id.us--;
+
+ /* make a new copy of the mesh */
+ ob1->data= copy_mesh(me);
+
+ /* make new mesh data from the original copy */
+ dm= mesh_get_derived_final(scene, ob1, CD_MASK_MESH);
+ /* dm= mesh_create_derived_no_deform(ob1, NULL); this was called original (instead of get_derived). man o man why! (ton) */
+
+ DM_to_mesh(dm, ob1->data);
+
+ dm->release(dm);
+ object_free_modifiers(ob1); /* after derivedmesh calls! */
+
+ /* If the original object is active then make this object active */
+ if (ob == obact) {
+ // XXX ED_base_object_activate(C, basen);
+ basact = basen;
+ }
+ }
+ else if(ob->type==OB_FONT) {
+ ob->flag |= OB_DONE;
+
+ ob->type= OB_CURVE;
+ cu= ob->data;
+
+ if(cu->vfont) {
+ cu->vfont->id.us--;
+ cu->vfont= 0;
+ }
+ if(cu->vfontb) {
+ cu->vfontb->id.us--;
+ cu->vfontb= 0;
+ }
+ if(cu->vfonti) {
+ cu->vfonti->id.us--;
+ cu->vfonti= 0;
+ }
+ if(cu->vfontbi) {
+ cu->vfontbi->id.us--;
+ cu->vfontbi= 0;
+ }
+ /* other users */
+ if(cu->id.us>1) {
+ ob1= G.main->object.first;
+ while(ob1) {
+ if(ob1->data==cu) {
+ ob1->type= OB_CURVE;
+ ob1->recalc |= OB_RECALC;
+ }
+ ob1= ob1->id.next;
+ }
+ }
+ if (nr==2 || nr==3) {
+ nu= cu->nurb.first;
+ while(nu) {
+ nu->charidx= 0;
+ nu= nu->next;
+ }
+ }
+ if (nr==3) {
+ curvetomesh(scene, ob);
+ }
+ }
+ else if(ELEM(ob->type, OB_CURVE, OB_SURF)) {
+ if(nr==1) {
+ curvetomesh(scene, ob);
+ }
+ }
+ else if(ob->type==OB_MBALL) {
+
+ if(nr==1 || nr == 2) {
+ ob= find_basis_mball(scene, ob);
+
+ if(ob->disp.first && !(ob->flag&OB_DONE)) {
+ basedel = base;
+
+ ob->flag |= OB_DONE;
+
+ ob1= copy_object(ob);
+ ob1->recalc |= OB_RECALC;
+
+ basen= MEM_mallocN(sizeof(Base), "duplibase");
+ *basen= *base;
+ BLI_addhead(&scene->base, basen); /* addhead: othwise eternal loop */
+ basen->object= ob1;
+ basen->flag |= SELECT;
+ basedel->flag &= ~SELECT;
+ ob->flag &= ~SELECT;
+
+ mb= ob1->data;
+ mb->id.us--;
+
+ ob1->data= add_mesh("Mesh");
+ ob1->type= OB_MESH;
+
+ me= ob1->data;
+ me->totcol= mb->totcol;
+ if(ob1->totcol) {
+ me->mat= MEM_dupallocN(mb->mat);
+ for(a=0; a<ob1->totcol; a++) id_us_plus((ID *)me->mat[a]);
+ }
+
+ mball_to_mesh(&ob->disp, ob1->data);
+
+ /* So we can see the wireframe */
+ BASACT= basen;
+
+ /* If the original object is active then make this object active */
+ if (ob == obact) {
+ // XXX ED_base_object_activate(C, basen);
+ basact = basen;
+ }
+
+ }
+ }
+ }
+ }
+ if(basedel != NULL && nr == 2) {
+ ED_base_object_free_and_unlink(scene, basedel);
+ }
+ basedel = NULL;
+ }
+
+ /* delete object should renew depsgraph */
+ if(nr==2)
+ DAG_scene_sort(scene);
+
+ /* texspace and normals */
+ if(!basen) BASACT= base;
+
+// XXX ED_object_enter_editmode(C, 0);
+// XXX exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR); /* freedata, but no undo */
+ BASACT= basact;
+
+
+ DAG_scene_sort(scene);
+}
+
/* Change subdivision or particle properties of mesh object ob, if level==-1
* then toggle subsurf, else set to level set allows to toggle multiple
* selections */
@@ -979,7 +4649,7 @@ static void object_flip_subdivison_particles(Scene *scene, Object *ob, int *set,
}
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
if(ob->dup_group && depth<=4) {
@@ -1583,10 +5253,1373 @@ void copy_attr_menu(Scene *scene, View3D *v3d)
copy_attr(scene, v3d, event);
}
+
+void link_to_scene(unsigned short nr)
+{
+#if 0
+ Scene *sce= (Scene*) BLI_findlink(&G.main->scene, G.curscreen->scenenr-1);
+ Base *base, *nbase;
+
+ if(sce==0) return;
+ if(sce->id.lib) return;
+
+ for(base= FIRSTBASE; base; base= base->next) {
+ if(TESTBASE(v3d, base)) {
+
+ nbase= MEM_mallocN( sizeof(Base), "newbase");
+ *nbase= *base;
+ BLI_addhead( &(sce->base), nbase);
+ id_us_plus((ID *)base->object);
+ }
+ }
+#endif
+}
+
+
+void make_links(Scene *scene, View3D *v3d, short event)
+{
+ Object *ob, *obt;
+ Base *base, *nbase, *sbase;
+ Scene *sce = NULL;
+ ID *id;
+ int a;
+ short nr=0;
+ char *strp;
+
+ if(!(ob=OBACT)) return;
+
+ if(event==1) {
+ IDnames_to_pupstring(&strp, NULL, NULL, &(G.main->scene), 0, &nr);
+
+ if(nr == -2) {
+ MEM_freeN(strp);
+
+// XXX activate_databrowse((ID *)scene, ID_SCE, 0, B_INFOSCE, &(G.curscreen->scenenr), link_to_scene );
+
+ return;
+ }
+ else {
+ event= pupmenu_col(strp, 20);
+ MEM_freeN(strp);
+
+ if(event<= 0) return;
+
+ nr= 1;
+ sce= G.main->scene.first;
+ while(sce) {
+ if(nr==event) break;
+ nr++;
+ sce= sce->id.next;
+ }
+ if(sce==scene) {
+ error("This is the current scene");
+ return;
+ }
+ if(sce==0 || sce->id.lib) return;
+
+ /* remember: is needed below */
+ event= 1;
+ }
+ }
+
+ /* All non group linking */
+ for(base= FIRSTBASE; base; base= base->next) {
+ if(event==1 || base != BASACT) {
+
+ obt= base->object;
+
+ if(TESTBASE(v3d, base)) {
+
+ if(event==1) { /* to scene */
+
+ /* test if already linked */
+ sbase= sce->base.first;
+ while(sbase) {
+ if(sbase->object==base->object) break;
+ sbase= sbase->next;
+ }
+ if(sbase) { /* remove */
+ continue;
+ }
+
+ nbase= MEM_mallocN( sizeof(Base), "newbase");
+ *nbase= *base;
+ BLI_addhead( &(sce->base), nbase);
+ id_us_plus((ID *)base->object);
+ }
+ }
+ if(TESTBASELIB(v3d, base)) {
+ if(event==2 || event==5) { /* obdata */
+ if(ob->type==obt->type) {
+
+ id= obt->data;
+ id->us--;
+
+ id= ob->data;
+ id_us_plus(id);
+ obt->data= id;
+
+ /* if amount of material indices changed: */
+ test_object_materials(obt->data);
+
+ obt->recalc |= OB_RECALC_DATA;
+ }
+ }
+ else if(event==4) { /* ob ipo */
+#if 0 // XXX old animation system
+ if(obt->ipo) obt->ipo->id.us--;
+ obt->ipo= ob->ipo;
+ if(obt->ipo) {
+ id_us_plus((ID *)obt->ipo);
+ do_ob_ipo(scene, obt);
+ }
+#endif // XXX old animation system
+ }
+ else if(event==6) {
+ if(ob->dup_group) ob->dup_group->id.us--;
+ obt->dup_group= ob->dup_group;
+ if(obt->dup_group) {
+ id_us_plus((ID *)obt->dup_group);
+ obt->transflag |= OB_DUPLIGROUP;
+ }
+ }
+ else if(event==3) { /* materials */
+
+ /* new approach, using functions from kernel */
+ for(a=0; a<ob->totcol; a++) {
+ Material *ma= give_current_material(ob, a+1);
+ assign_material(obt, ma, a+1); /* also works with ma==NULL */
+ }
+ }
+ }
+ }
+ }
+
+ ED_anim_dag_flush_update(C);
+
+}
+
+void make_links_menu(Scene *scene, View3D *v3d)
+{
+ Object *ob;
+ short event=0;
+ char str[140];
+
+ if(!(ob=OBACT)) return;
+
+ strcpy(str, "Make Links %t|To Scene...%x1|%l|Object Ipo%x4");
+
+ if(ob->type==OB_MESH)
+ strcat(str, "|Mesh Data%x2|Materials%x3");
+ else if(ob->type==OB_CURVE)
+ strcat(str, "|Curve Data%x2|Materials%x3");
+ else if(ob->type==OB_FONT)
+ strcat(str, "|Text Data%x2|Materials%x3");
+ else if(ob->type==OB_SURF)
+ strcat(str, "|Surface Data%x2|Materials%x3");
+ else if(ob->type==OB_MBALL)
+ strcat(str, "|Materials%x3");
+ else if(ob->type==OB_CAMERA)
+ strcat(str, "|Camera Data%x2");
+ else if(ob->type==OB_LAMP)
+ strcat(str, "|Lamp Data%x2");
+ else if(ob->type==OB_LATTICE)
+ strcat(str, "|Lattice Data%x2");
+ else if(ob->type==OB_ARMATURE)
+ strcat(str, "|Armature Data%x2");
+
+ event= pupmenu(str);
+
+ if(event<= 0) return;
+
+ make_links(scene, v3d, event);
+}
+
+static void apply_objects_internal(Scene *scene, View3D *v3d, int apply_scale, int apply_rot )
+{
+ Base *base, *basact;
+ Object *ob;
+ bArmature *arm;
+ Mesh *me;
+ Curve *cu;
+ Nurb *nu;
+ BPoint *bp;
+ BezTriple *bezt;
+ MVert *mvert;
+ float mat[3][3];
+ int a, change = 0;
+
+ if (!apply_scale && !apply_rot) {
+ /* do nothing? */
+ error("Nothing to do!");
+ return;
+ }
+ /* first check if we can execute */
+ for (base= FIRSTBASE; base; base= base->next) {
+ if(TESTBASELIB(v3d, base)) {
+ ob= base->object;
+ if(ob->type==OB_MESH) {
+ me= ob->data;
+
+ if(me->id.us>1) {
+ error("Can't apply to a multi user mesh, doing nothing.");
+ return;
+ }
+ }
+ else if (ob->type==OB_ARMATURE) {
+ arm= ob->data;
+
+ if(arm->id.us>1) {
+ error("Can't apply to a multi user armature, doing nothing.");
+ return;
+ }
+ }
+ else if(ELEM(ob->type, OB_CURVE, OB_SURF)) {
+ cu= ob->data;
+
+ if(cu->id.us>1) {
+ error("Can't apply to a multi user curve, doing nothing.");
+ return;
+ }
+ if(cu->key) {
+ error("Can't apply to a curve with vertex keys, doing nothing.");
+ return;
+ }
+ }
+ }
+ }
+
+ /* now execute */
+ basact= BASACT;
+ for(base= FIRSTBASE; base; base= base->next) {
+ if(TESTBASELIB(v3d, base)) {
+ ob= base->object;
+
+ if(ob->type==OB_MESH) {
+ /* calculate matrix */
+ if (apply_scale && apply_rot)
+ object_to_mat3(ob, mat);
+ else if (apply_scale)
+ object_scale_to_mat3(ob, mat);
+ else
+ object_rot_to_mat3(ob, mat);
+
+ /* get object data */
+ me= ob->data;
+
+ /* adjust data */
+ mvert= me->mvert;
+ for(a=0; a<me->totvert; a++, mvert++) {
+ Mat3MulVecfl(mat, mvert->co);
+ }
+
+ if (me->key) {
+ KeyBlock *kb;
+
+ for (kb=me->key->block.first; kb; kb=kb->next) {
+ float *fp= kb->data;
+
+ for (a=0; a<kb->totelem; a++, fp+=3)
+ Mat3MulVecfl(mat, fp);
+ }
+ }
+
+ /* adjust transforms */
+ if (apply_scale)
+ ob->size[0]= ob->size[1]= ob->size[2]= 1.0f;
+ if (apply_rot)
+ ob->rot[0]= ob->rot[1]= ob->rot[2]= 0.0f;
+ /*QuatOne(ob->quat);*/ /* Quats arnt used yet */
+
+ where_is_object(scene, ob);
+
+ /* texspace and normals */
+ BASACT= base;
+// XXX ED_object_enter_editmode(C, 0);
+// XXX ED_object_exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR); /* freedata, but no undo */
+ BASACT= basact;
+
+ change = 1;
+ }
+ else if (ob->type==OB_ARMATURE) {
+ if (apply_scale && apply_rot)
+ object_to_mat3(ob, mat);
+ else if (apply_scale)
+ object_scale_to_mat3(ob, mat);
+ else
+ object_rot_to_mat3(ob, mat);
+ arm= ob->data;
+
+ /* see checks above */
+// XXX apply_rot_armature(ob, mat);
+
+ /* Reset the object's transforms */
+ if (apply_scale)
+ ob->size[0]= ob->size[1]= ob->size[2]= 1.0;
+ if (apply_rot)
+ ob->rot[0]= ob->rot[1]= ob->rot[2]= 0.0;
+ /*QuatOne(ob->quat); (not used anymore)*/
+
+ where_is_object(scene, ob);
+
+ change = 1;
+ }
+ else if(ELEM(ob->type, OB_CURVE, OB_SURF)) {
+ float scale;
+ if (apply_scale && apply_rot)
+ object_to_mat3(ob, mat);
+ else if (apply_scale)
+ object_scale_to_mat3(ob, mat);
+ else
+ object_rot_to_mat3(ob, mat);
+ scale = Mat3ToScalef(mat);
+ cu= ob->data;
+
+ /* see checks above */
+
+ nu= cu->nurb.first;
+ while(nu) {
+ if( (nu->type & 7)==CU_BEZIER) {
+ a= nu->pntsu;
+ bezt= nu->bezt;
+ while(a--) {
+ Mat3MulVecfl(mat, bezt->vec[0]);
+ Mat3MulVecfl(mat, bezt->vec[1]);
+ Mat3MulVecfl(mat, bezt->vec[2]);
+ bezt->radius *= scale;
+ bezt++;
+ }
+ }
+ else {
+ a= nu->pntsu*nu->pntsv;
+ bp= nu->bp;
+ while(a--) {
+ Mat3MulVecfl(mat, bp->vec);
+ bp++;
+ }
+ }
+ nu= nu->next;
+ }
+ if (apply_scale)
+ ob->size[0]= ob->size[1]= ob->size[2]= 1.0;
+ if (apply_rot)
+ ob->rot[0]= ob->rot[1]= ob->rot[2]= 0.0;
+ /*QuatOne(ob->quat); (quats arnt used anymore)*/
+
+ where_is_object(scene, ob);
+
+ /* texspace and normals */
+ BASACT= base;
+// XXX ED_object_enter_editmode(C, 0);
+// XXX ED_object_exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR); /* freedata, but no undo */
+ BASACT= basact;
+
+ change = 1;
+ } else {
+ continue;
+ }
+
+ ignore_parent_tx(scene, ob);
+ }
+ }
+ if (change) {
+ }
+}
+
+void apply_objects_locrot(Scene *scene, View3D *v3d)
+{
+ apply_objects_internal(scene, v3d, 1, 1);
+}
+
+void apply_objects_scale(Scene *scene, View3D *v3d)
+{
+ apply_objects_internal(scene, v3d, 1, 0);
+}
+
+void apply_objects_rot(Scene *scene, View3D *v3d)
+{
+ apply_objects_internal(scene, v3d, 0, 1);
+}
+
+void apply_objects_visual_tx( Scene *scene, View3D *v3d )
+{
+ Base *base;
+ Object *ob;
+ int change = 0;
+
+ for (base= FIRSTBASE; base; base= base->next) {
+ if(TESTBASELIB(v3d, base)) {
+ ob= base->object;
+ where_is_object(scene, ob);
+ VECCOPY(ob->loc, ob->obmat[3]);
+ Mat4ToSize(ob->obmat, ob->size);
+ Mat4ToEul(ob->obmat, ob->rot);
+
+ where_is_object(scene, ob);
+
+ change = 1;
+ }
+ }
+ if (change) {
+ }
+}
+
+/* ************************************** */
+
+
+void single_object_users(Scene *scene, View3D *v3d, int flag)
+{
+ Base *base;
+ Object *ob, *obn;
+
+ clear_sca_new_poins(); /* sensor/contr/act */
+
+ /* duplicate (must set newid) */
+ for(base= FIRSTBASE; base; base= base->next) {
+ ob= base->object;
+
+ if( (base->flag & flag)==flag ) {
+ if(ob->id.lib==NULL && ob->id.us>1) {
+ /* base gets copy of object */
+ obn= copy_object(ob);
+ base->object= obn;
+ ob->id.us--;
+ }
+ }
+ }
+
+ ID_NEW(scene->camera);
+ if(v3d) ID_NEW(v3d->camera);
+
+ /* object pointers */
+ for(base= FIRSTBASE; base; base= base->next) {
+ ob= base->object;
+ if(ob->id.lib==NULL) {
+ relink_constraints(&base->object->constraints);
+ if (base->object->pose){
+ bPoseChannel *chan;
+ for (chan = base->object->pose->chanbase.first; chan; chan=chan->next){
+ relink_constraints(&chan->constraints);
+ }
+ }
+ modifiers_foreachObjectLink(base->object, single_object_users__forwardModifierLinks, NULL);
+
+ ID_NEW(ob->parent);
+ ID_NEW(ob->track);
+ }
+ }
+
+ set_sca_new_poins();
+}
+
+void new_id_matar(Material **matar, int totcol)
+{
+ ID *id;
+ int a;
+
+ for(a=0; a<totcol; a++) {
+ id= (ID *)matar[a];
+ if(id && id->lib==0) {
+ if(id->newid) {
+ matar[a]= (Material *)id->newid;
+ id_us_plus(id->newid);
+ id->us--;
+ }
+ else if(id->us>1) {
+ matar[a]= copy_material(matar[a]);
+ id->us--;
+ id->newid= (ID *)matar[a];
+ }
+ }
+ }
+}
+
+void single_obdata_users(Scene *scene, int flag)
+{
+ Object *ob;
+ Lamp *la;
+ Curve *cu;
+ //Camera *cam;
+ Base *base;
+ Mesh *me;
+ ID *id;
+ int a;
+
+ for(base= FIRSTBASE; base; base= base->next) {
+ ob= base->object;
+ if(ob->id.lib==NULL && (base->flag & flag)==flag ) {
+ id= ob->data;
+
+ if(id && id->us>1 && id->lib==0) {
+ ob->recalc= OB_RECALC_DATA;
+
+ switch(ob->type) {
+ case OB_LAMP:
+ if(id && id->us>1 && id->lib==NULL) {
+ ob->data= la= copy_lamp(ob->data);
+ for(a=0; a<MAX_MTEX; a++) {
+ if(la->mtex[a]) {
+ ID_NEW(la->mtex[a]->object);
+ }
+ }
+ }
+ break;
+ case OB_CAMERA:
+ ob->data= copy_camera(ob->data);
+ break;
+ case OB_MESH:
+ me= ob->data= copy_mesh(ob->data);
+ //if(me && me->key)
+ // ipo_idnew(me->key->ipo); /* drivers */
+ break;
+ case OB_MBALL:
+ ob->data= copy_mball(ob->data);
+ break;
+ case OB_CURVE:
+ case OB_SURF:
+ case OB_FONT:
+ ob->data= cu= copy_curve(ob->data);
+ ID_NEW(cu->bevobj);
+ ID_NEW(cu->taperobj);
+ break;
+ case OB_LATTICE:
+ ob->data= copy_lattice(ob->data);
+ break;
+ case OB_ARMATURE:
+ ob->recalc |= OB_RECALC_DATA;
+ ob->data= copy_armature(ob->data);
+ armature_rebuild_pose(ob, ob->data);
+ break;
+ default:
+ printf("ERROR single_obdata_users: %s\n", id->name);
+ error("Read console");
+ return;
+ }
+
+ id->us--;
+ id->newid= ob->data;
+
+ }
+
+#if 0 // XXX old animation system
+ id= (ID *)ob->action;
+ if (id && id->us>1 && id->lib==NULL){
+ if(id->newid){
+ ob->action= (bAction *)id->newid;
+ id_us_plus(id->newid);
+ }
+ else {
+ ob->action= copy_action(ob->action);
+ id->us--;
+ id->newid=(ID *)ob->action;
+ }
+ }
+ id= (ID *)ob->ipo;
+ if(id && id->us>1 && id->lib==NULL) {
+ if(id->newid) {
+ ob->ipo= (Ipo *)id->newid;
+ id_us_plus(id->newid);
+ }
+ else {
+ ob->ipo= copy_ipo(ob->ipo);
+ id->us--;
+ id->newid= (ID *)ob->ipo;
+ }
+ ipo_idnew(ob->ipo); /* drivers */
+ }
+ /* other ipos */
+ switch(ob->type) {
+ case OB_LAMP:
+ la= ob->data;
+ if(la->ipo && la->ipo->id.us>1) {
+ la->ipo->id.us--;
+ la->ipo= copy_ipo(la->ipo);
+ ipo_idnew(la->ipo); /* drivers */
+ }
+ break;
+ case OB_CAMERA:
+ cam= ob->data;
+ if(cam->ipo && cam->ipo->id.us>1) {
+ cam->ipo->id.us--;
+ cam->ipo= copy_ipo(cam->ipo);
+ ipo_idnew(cam->ipo); /* drivers */
+ }
+ break;
+ }
+#endif // XXX old animation system
+ }
+ }
+
+ me= G.main->mesh.first;
+ while(me) {
+ ID_NEW(me->texcomesh);
+ me= me->id.next;
+ }
+}
+
+void single_ipo_users(Scene *scene, int flag)
+{
+#if 0 // XXX old animation system
+ Object *ob;
+ Base *base;
+ ID *id;
+
+ for(base= FIRSTBASE; base; base= base->next) {
+ ob= base->object;
+ if(ob->id.lib==NULL && (flag==0 || (base->flag & SELECT)) ) {
+ ob->recalc= OB_RECALC_DATA;
+
+ id= (ID *)ob->ipo;
+ if(id && id->us>1 && id->lib==NULL) {
+ ob->ipo= copy_ipo(ob->ipo);
+ id->us--;
+ ipo_idnew(ob->ipo); /* drivers */
+ }
+ }
+ }
+#endif // XXX old animation system
+}
+
+void single_mat_users(Scene *scene, int flag)
+{
+ Object *ob;
+ Base *base;
+ Material *ma, *man;
+ Tex *tex;
+ int a, b;
+
+
+ for(base= FIRSTBASE; base; base= base->next) {
+ ob= base->object;
+ if(ob->id.lib==NULL && (flag==0 || (base->flag & SELECT)) ) {
+
+ for(a=1; a<=ob->totcol; a++) {
+ ma= give_current_material(ob, a);
+ if(ma) {
+ /* do not test for LIB_NEW: this functions guaranteed delivers single_users! */
+
+ if(ma->id.us>1) {
+ man= copy_material(ma);
+
+ man->id.us= 0;
+ assign_material(ob, man, a);
+
+#if 0 // XXX old animation system
+ if(ma->ipo) {
+ man->ipo= copy_ipo(ma->ipo);
+ ma->ipo->id.us--;
+ ipo_idnew(ma->ipo); /* drivers */
+ }
+#endif // XXX old animation system
+
+ for(b=0; b<MAX_MTEX; b++) {
+ if(ma->mtex[b] && ma->mtex[b]->tex) {
+ tex= ma->mtex[b]->tex;
+ if(tex->id.us>1) {
+ ma->mtex[b]->tex= copy_texture(tex);
+ tex->id.us--;
+ }
+ }
+ }
+
+ }
+ }
+ }
+ }
+ }
+}
+
+void do_single_tex_user(Tex **from)
+{
+ Tex *tex, *texn;
+
+ tex= *from;
+ if(tex==0) return;
+
+ if(tex->id.newid) {
+ *from= (Tex *)tex->id.newid;
+ id_us_plus(tex->id.newid);
+ tex->id.us--;
+ }
+ else if(tex->id.us>1) {
+ texn= copy_texture(tex);
+ tex->id.newid= (ID *)texn;
+ tex->id.us--;
+ *from= texn;
+ }
+
+}
+
+void single_tex_users_expand()
+{
+ /* only when 'parent' blocks are LIB_NEW */
+ Material *ma;
+ Lamp *la;
+ World *wo;
+ int b;
+
+ ma= G.main->mat.first;
+ while(ma) {
+ if(ma->id.flag & LIB_NEW) {
+ for(b=0; b<MAX_MTEX; b++) {
+ if(ma->mtex[b] && ma->mtex[b]->tex) {
+ do_single_tex_user( &(ma->mtex[b]->tex) );
+ }
+ }
+ }
+ ma= ma->id.next;
+ }
+
+ la= G.main->lamp.first;
+ while(la) {
+ if(la->id.flag & LIB_NEW) {
+ for(b=0; b<MAX_MTEX; b++) {
+ if(la->mtex[b] && la->mtex[b]->tex) {
+ do_single_tex_user( &(la->mtex[b]->tex) );
+ }
+ }
+ }
+ la= la->id.next;
+ }
+ wo= G.main->world.first;
+ while(wo) {
+ if(wo->id.flag & LIB_NEW) {
+ for(b=0; b<MAX_MTEX; b++) {
+ if(wo->mtex[b] && wo->mtex[b]->tex) {
+ do_single_tex_user( &(wo->mtex[b]->tex) );
+ }
+ }
+ }
+ wo= wo->id.next;
+ }
+}
+
+void single_mat_users_expand(void)
+{
+ /* only when 'parent' blocks are LIB_NEW */
+
+ Object *ob;
+ Mesh *me;
+ Curve *cu;
+ MetaBall *mb;
+ Material *ma;
+ int a;
+
+ ob= G.main->object.first;
+ while(ob) {
+ if(ob->id.flag & LIB_NEW) {
+ new_id_matar(ob->mat, ob->totcol);
+ }
+ ob= ob->id.next;
+ }
+
+ me= G.main->mesh.first;
+ while(me) {
+ if(me->id.flag & LIB_NEW) {
+ new_id_matar(me->mat, me->totcol);
+ }
+ me= me->id.next;
+ }
+
+ cu= G.main->curve.first;
+ while(cu) {
+ if(cu->id.flag & LIB_NEW) {
+ new_id_matar(cu->mat, cu->totcol);
+ }
+ cu= cu->id.next;
+ }
+
+ mb= G.main->mball.first;
+ while(mb) {
+ if(mb->id.flag & LIB_NEW) {
+ new_id_matar(mb->mat, mb->totcol);
+ }
+ mb= mb->id.next;
+ }
+
+ /* material imats */
+ ma= G.main->mat.first;
+ while(ma) {
+ if(ma->id.flag & LIB_NEW) {
+ for(a=0; a<MAX_MTEX; a++) {
+ if(ma->mtex[a]) {
+ ID_NEW(ma->mtex[a]->object);
+ }
+ }
+ }
+ ma= ma->id.next;
+ }
+}
+
+void single_user(Scene *scene, View3D *v3d)
+{
+ int nr;
+
+ if(scene->id.lib) return;
+
+ clear_id_newpoins();
+
+ nr= pupmenu("Make Single User%t|Object|Object & ObData|Object & ObData & Materials+Tex|Materials+Tex|Ipos");
+ if(nr>0) {
+
+ if(nr==1) single_object_users(scene, v3d, 1);
+
+ else if(nr==2) {
+ single_object_users(scene, v3d, 1);
+ single_obdata_users(scene, 1);
+ }
+ else if(nr==3) {
+ single_object_users(scene, v3d, 1);
+ single_obdata_users(scene, 1);
+ single_mat_users(scene, 1); /* also tex */
+
+ }
+ else if(nr==4) {
+ single_mat_users(scene, 1);
+ }
+ else if(nr==5) {
+ single_ipo_users(scene, 1);
+ }
+
+
+ clear_id_newpoins();
+
+ }
+}
+
+/* used for copying scenes */
+void ED_object_single_users(Scene *scene, int full)
+{
+ single_object_users(scene, NULL, 0);
+
+ if(full) {
+ single_obdata_users(scene, 0);
+ single_mat_users_expand();
+ single_tex_users_expand();
+ }
+
+ clear_id_newpoins();
+}
+
+/* ************************************************************* */
+
+/* helper for below, ma was checked to be not NULL */
+static void make_local_makelocalmaterial(Material *ma)
+{
+ //ID *id;
+ int b;
+
+ make_local_material(ma);
+
+ for(b=0; b<MAX_MTEX; b++) {
+ if(ma->mtex[b] && ma->mtex[b]->tex) {
+ make_local_texture(ma->mtex[b]->tex);
+ }
+ }
+
+#if 0 // XXX old animation system
+ id= (ID *)ma->ipo;
+ if(id && id->lib) make_local_ipo(ma->ipo);
+#endif // XXX old animation system
+
+ /* nodetree? XXX */
+}
+
+void make_local(Scene *scene, View3D *v3d, int mode)
+{
+ Base *base;
+ Object *ob;
+ //bActionStrip *strip;
+ ParticleSystem *psys;
+ Material *ma, ***matarar;
+ Lamp *la;
+ Curve *cu;
+ ID *id;
+ int a, b;
+
+ /* WATCH: the function new_id(..) re-inserts the id block!!! */
+ if(scene->id.lib) return;
+
+ if(mode==3) {
+ all_local(NULL, 0); /* NULL is all libs */
+ return;
+ }
+ else if(mode<1) return;
+
+ clear_id_newpoins();
+
+ for(base= FIRSTBASE; base; base= base->next) {
+ if( TESTBASE(v3d, base) ) {
+ ob= base->object;
+ if(ob->id.lib) {
+ make_local_object(ob);
+ }
+ }
+ }
+
+ /* maybe object pointers */
+ for(base= FIRSTBASE; base; base= base->next) {
+ if( TESTBASE(v3d, base) ) {
+ ob= base->object;
+ if(ob->id.lib==NULL) {
+ ID_NEW(ob->parent);
+ ID_NEW(ob->track);
+ }
+ }
+ }
+
+ for(base= FIRSTBASE; base; base= base->next) {
+ if( TESTBASE(v3d, base) ) {
+ ob= base->object;
+ id= ob->data;
+
+ if(id && mode>1) {
+
+ switch(ob->type) {
+ case OB_LAMP:
+ make_local_lamp((Lamp *)id);
+
+ la= ob->data;
+#if 0 // XXX old animation system
+ id= (ID *)la->ipo;
+ if(id && id->lib) make_local_ipo(la->ipo);
+#endif // XXX old animation system
+ break;
+ case OB_CAMERA:
+ make_local_camera((Camera *)id);
+ break;
+ case OB_MESH:
+ make_local_mesh((Mesh *)id);
+ make_local_key( ((Mesh *)id)->key );
+ break;
+ case OB_MBALL:
+ make_local_mball((MetaBall *)id);
+ break;
+ case OB_CURVE:
+ case OB_SURF:
+ case OB_FONT:
+ cu= (Curve *)id;
+ make_local_curve(cu);
+#if 0 // XXX old animation system
+ id= (ID *)cu->ipo;
+ if(id && id->lib) make_local_ipo(cu->ipo);
+#endif // XXX old animation system
+ make_local_key( cu->key );
+ break;
+ case OB_LATTICE:
+ make_local_lattice((Lattice *)id);
+ make_local_key( ((Lattice *)id)->key );
+ break;
+ case OB_ARMATURE:
+ make_local_armature ((bArmature *)id);
+ break;
+ }
+
+ for(psys=ob->particlesystem.first; psys; psys=psys->next)
+ make_local_particlesettings(psys->part);
+ }
+
+#if 0 // XXX old animation system
+ id= (ID *)ob->ipo;
+ if(id && id->lib) make_local_ipo(ob->ipo);
+
+ id= (ID *)ob->action;
+ if(id && id->lib) make_local_action(ob->action);
+
+ for(strip=ob->nlastrips.first; strip; strip=strip->next) {
+ if(strip->act && strip->act->id.lib)
+ make_local_action(strip->act);
+ }
+#endif // XXX old animation system
+ }
+ }
+
+ if(mode>1) {
+ for(base= FIRSTBASE; base; base= base->next) {
+ if( TESTBASE(v3d, base) ) {
+ ob= base->object;
+ if(ob->type==OB_LAMP) {
+ la= ob->data;
+ for(b=0; b<MAX_MTEX; b++) {
+ if(la->mtex[b] && la->mtex[b]->tex) {
+ make_local_texture(la->mtex[b]->tex);
+ }
+ }
+ }
+ else {
+
+ for(a=0; a<ob->totcol; a++) {
+ ma= ob->mat[a];
+ if(ma)
+ make_local_makelocalmaterial(ma);
+ }
+
+ matarar= (Material ***)give_matarar(ob);
+ if (matarar) {
+ for(a=0; a<ob->totcol; a++) {
+ ma= (*matarar)[a];
+ if(ma)
+ make_local_makelocalmaterial(ma);
+ }
+ }
+ }
+ }
+ }
+ }
+
+}
+
+void make_local_menu(Scene *scene, View3D *v3d)
+{
+ int mode;
+
+ /* If you modify this menu, please remember to update view3d_edit_object_makelocalmenu
+ * in header_view3d.c and the menu in toolbox.c
+ */
+
+ if(scene->id.lib) return;
+
+ mode = pupmenu("Make Local%t|Selected Objects %x1|Selected Objects and Data %x2|All %x3");
+
+ if (mode <= 0) return;
+
+ make_local(scene, v3d, mode);
+}
+
+/* ************************ ADD DUPLICATE ******************** */
+
+/*
+ dupflag: a flag made from constants declared in DNA_userdef_types.h
+ The flag tells adduplicate() weather to copy data linked to the object, or to reference the existing data.
+ U.dupflag for default operations or you can construct a flag as python does
+ if the dupflag is 0 then no data will be copied (linked duplicate) */
+
+/* used below, assumes id.new is correct */
+/* leaves selection of base/object unaltered */
+static Base *object_add_duplicate_internal(Scene *scene, Base *base, int dupflag)
+{
+ Base *basen= NULL;
+ Material ***matarar;
+ Object *ob, *obn;
+ ID *id;
+ int a, didit;
+
+ ob= base->object;
+ if(ob->mode & OB_MODE_POSE) {
+ ; /* nothing? */
+ }
+ else {
+ obn= copy_object(ob);
+ obn->recalc |= OB_RECALC;
+
+ basen= MEM_mallocN(sizeof(Base), "duplibase");
+ *basen= *base;
+ BLI_addhead(&scene->base, basen); /* addhead: prevent eternal loop */
+ basen->object= obn;
+
+ if(basen->flag & OB_FROMGROUP) {
+ Group *group;
+ for(group= G.main->group.first; group; group= group->id.next) {
+ if(object_in_group(ob, group))
+ add_to_group(group, obn);
+ }
+ obn->flag |= OB_FROMGROUP; /* this flag is unset with copy_object() */
+ }
+
+ /* duplicates using userflags */
+#if 0 // XXX old animation system
+ if(dupflag & USER_DUP_IPO) {
+ bConstraintChannel *chan;
+ id= (ID *)obn->ipo;
+
+ if(id) {
+ ID_NEW_US( obn->ipo)
+ else obn->ipo= copy_ipo(obn->ipo);
+ id->us--;
+ }
+ /* Handle constraint ipos */
+ for (chan=obn->constraintChannels.first; chan; chan=chan->next){
+ id= (ID *)chan->ipo;
+ if(id) {
+ ID_NEW_US( chan->ipo)
+ else chan->ipo= copy_ipo(chan->ipo);
+ id->us--;
+ }
+ }
+ }
+ if(dupflag & USER_DUP_ACT){ /* Not buttons in the UI to modify this, add later? */
+ id= (ID *)obn->action;
+ if (id){
+ ID_NEW_US(obn->action)
+ else{
+ obn->action= copy_action(obn->action);
+ }
+ id->us--;
+ }
+ }
+#endif // XXX old animation system
+ if(dupflag & USER_DUP_MAT) {
+ for(a=0; a<obn->totcol; a++) {
+ id= (ID *)obn->mat[a];
+ if(id) {
+ ID_NEW_US(obn->mat[a])
+ else obn->mat[a]= copy_material(obn->mat[a]);
+ id->us--;
+ }
+ }
+ }
+
+ id= obn->data;
+ didit= 0;
+
+ switch(obn->type) {
+ case OB_MESH:
+ if(dupflag & USER_DUP_MESH) {
+ ID_NEW_US2( obn->data )
+ else {
+ obn->data= copy_mesh(obn->data);
+
+ if(obn->fluidsimSettings) {
+ obn->fluidsimSettings->orgMesh = (Mesh *)obn->data;
+ }
+
+ didit= 1;
+ }
+ id->us--;
+ }
+ break;
+ case OB_CURVE:
+ if(dupflag & USER_DUP_CURVE) {
+ ID_NEW_US2(obn->data )
+ else {
+ obn->data= copy_curve(obn->data);
+ didit= 1;
+ }
+ id->us--;
+ }
+ break;
+ case OB_SURF:
+ if(dupflag & USER_DUP_SURF) {
+ ID_NEW_US2( obn->data )
+ else {
+ obn->data= copy_curve(obn->data);
+ didit= 1;
+ }
+ id->us--;
+ }
+ break;
+ case OB_FONT:
+ if(dupflag & USER_DUP_FONT) {
+ ID_NEW_US2( obn->data )
+ else {
+ obn->data= copy_curve(obn->data);
+ didit= 1;
+ }
+ id->us--;
+ }
+ break;
+ case OB_MBALL:
+ if(dupflag & USER_DUP_MBALL) {
+ ID_NEW_US2(obn->data )
+ else {
+ obn->data= copy_mball(obn->data);
+ didit= 1;
+ }
+ id->us--;
+ }
+ break;
+ case OB_LAMP:
+ if(dupflag & USER_DUP_LAMP) {
+ ID_NEW_US2(obn->data )
+ else obn->data= copy_lamp(obn->data);
+ id->us--;
+ }
+ break;
+
+ case OB_ARMATURE:
+ obn->recalc |= OB_RECALC_DATA;
+ if(obn->pose) obn->pose->flag |= POSE_RECALC;
+
+ if(dupflag & USER_DUP_ARM) {
+ ID_NEW_US2(obn->data )
+ else {
+ obn->data= copy_armature(obn->data);
+ armature_rebuild_pose(obn, obn->data);
+ didit= 1;
+ }
+ id->us--;
+ }
+
+ break;
+
+ case OB_LATTICE:
+ if(dupflag!=0) {
+ ID_NEW_US2(obn->data )
+ else obn->data= copy_lattice(obn->data);
+ id->us--;
+ }
+ break;
+ case OB_CAMERA:
+ if(dupflag!=0) {
+ ID_NEW_US2(obn->data )
+ else obn->data= copy_camera(obn->data);
+ id->us--;
+ }
+ break;
+ }
+
+ if(dupflag & USER_DUP_MAT) {
+ matarar= give_matarar(obn);
+ if(didit && matarar) {
+ for(a=0; a<obn->totcol; a++) {
+ id= (ID *)(*matarar)[a];
+ if(id) {
+ ID_NEW_US( (*matarar)[a] )
+ else (*matarar)[a]= copy_material((*matarar)[a]);
+
+ id->us--;
+ }
+ }
+ }
+ }
+ }
+ return basen;
+}
+
+/* single object duplicate, if dupflag==0, fully linked, else it uses the flags given */
+/* leaves selection of base/object unaltered */
+Base *ED_object_add_duplicate(Scene *scene, Base *base, int dupflag)
+{
+ Base *basen;
+
+ clear_id_newpoins();
+ clear_sca_new_poins(); /* sensor/contr/act */
+
+ basen= object_add_duplicate_internal(scene, base, dupflag);
+
+ DAG_scene_sort(scene);
+
+ return basen;
+}
+
+/* contextual operator dupli */
+static int duplicate_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ View3D *v3d= CTX_wm_view3d(C);
+ int linked= RNA_boolean_get(op->ptr, "linked");
+ int dupflag= (linked)? 0: U.dupflag;
+
+ clear_id_newpoins();
+ clear_sca_new_poins(); /* sensor/contr/act */
+
+ CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ Base *basen= object_add_duplicate_internal(scene, base, dupflag);
+
+ /* XXX context conflict maybe, itterator could solve this? */
+ ED_base_object_select(base, BA_DESELECT);
+ /* new object becomes active */
+ if(BASACT==base)
+ ED_base_object_activate(C, basen);
+
+ }
+ CTX_DATA_END;
+
+ /* XXX fix this for context */
+ copy_object_set_idnew(scene, v3d, dupflag);
+
+ DAG_scene_sort(scene);
+ ED_anim_dag_flush_update(C);
+
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+
+ return OPERATOR_FINISHED;
+}
+
+static int duplicate_invoke(bContext *C, wmOperator *op, wmEvent *event)
+{
+ duplicate_exec(C, op);
+
+// RNA_int_set(op->ptr, "mode", TFM_TRANSLATION);
+// WM_operator_name_call(C, "TFM_OT_transform", WM_OP_INVOKE_REGION_WIN, op->ptr);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_duplicate(wmOperatorType *ot)
+{
+
+ /* identifiers */
+ ot->name= "Duplicate";
+ ot->description = "Duplicate selected objects.";
+ ot->idname= "OBJECT_OT_duplicate";
+
+ /* api callbacks */
+ ot->invoke= duplicate_invoke;
+ ot->exec= duplicate_exec;
+
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* to give to transform */
+ RNA_def_boolean(ot->srna, "linked", 0, "Linked", "Duplicate object but not object data, linking to the original data.");
+ RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX);
+}
+
+/* ************************** JOIN *********************** */
+
+static int join_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_active_object(C);
+
+ if(scene->obedit) {
+ BKE_report(op->reports, RPT_ERROR, "This data does not support joining in editmode.");
+ return OPERATOR_CANCELLED;
+ }
+ else if(!ob) {
+ BKE_report(op->reports, RPT_ERROR, "Can't join unless there is an active object.");
+ return OPERATOR_CANCELLED;
+ }
+ else if(object_data_is_libdata(ob)) {
+ BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata.");
+ return OPERATOR_CANCELLED;
+ }
+
+ if(ob->type == OB_MESH)
+ return join_mesh_exec(C, op);
+ else if(ELEM(ob->type, OB_CURVE, OB_SURF))
+ return join_curve_exec(C, op);
+ else if(ob->type == OB_ARMATURE)
+ return join_armature_exec(C, op);
+
+ BKE_report(op->reports, RPT_ERROR, "This object type doesn't support joining.");
+
+ return OPERATOR_CANCELLED;
+}
+
+void OBJECT_OT_join(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Join";
+ ot->description = "Join selected objects into active object.";
+ ot->idname= "OBJECT_OT_join";
+
+ /* api callbacks */
+ ot->exec= join_exec;
+ ot->poll= ED_operator_scene_editable;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
/********************** Smooth/Flat *********************/
static int shade_smooth_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob;
Curve *cu;
Nurb *nu;
@@ -1599,7 +6632,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
if(ob->type==OB_MESH) {
mesh_set_smooth_flag(ob, !clear);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
done= 1;
@@ -1610,9 +6643,10 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
for(nu=cu->nurb.first; nu; nu=nu->next) {
if(!clear) nu->flag |= ME_SMOOTH;
else nu->flag &= ~ME_SMOOTH;
+ nu= nu->next;
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
done= 1;
@@ -1699,7 +6733,7 @@ void image_aspect(Scene *scene, View3D *v3d)
else ob->size[1]= ob->size[0]*y/x;
done= 1;
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_object_flush_update(scene, ob, OB_RECALC_OB);
}
}
if(done) break;
@@ -1890,6 +6924,124 @@ void rand_timeoffs(Scene *scene, View3D *v3d)
}
+
+void texspace_edit(Scene *scene, View3D *v3d)
+{
+ Base *base;
+ int nr=0;
+
+ /* first test if from visible and selected objects
+ * texspacedraw is set:
+ */
+
+ if(scene->obedit) return; // XXX get from context
+
+ for(base= FIRSTBASE; base; base= base->next) {
+ if(TESTBASELIB(v3d, base)) {
+ break;
+ }
+ }
+
+ if(base==0) {
+ return;
+ }
+
+ nr= pupmenu("Texture Space %t|Grab/Move%x1|Size%x2");
+ if(nr<1) return;
+
+ for(base= FIRSTBASE; base; base= base->next) {
+ if(TESTBASELIB(v3d, base)) {
+ base->object->dtx |= OB_TEXSPACE;
+ }
+ }
+
+
+ if(nr==1) {
+// XXX initTransform(TFM_TRANSLATION, CTX_TEXTURE);
+// XXX Transform();
+ }
+ else if(nr==2) {
+// XXX initTransform(TFM_RESIZE, CTX_TEXTURE);
+// XXX Transform();
+ }
+ else if(nr==3) {
+// XXX initTransform(TFM_ROTATION, CTX_TEXTURE);
+// XXX Transform();
+ }
+}
+
+/* ******************************************************************** */
+/* Mirror function in Edit Mode */
+
+void mirrormenu(void)
+{
+// XXX initTransform(TFM_MIRROR, CTX_NO_PET);
+// XXX Transform();
+}
+
+void hookmenu(Scene *scene, View3D *v3d)
+{
+ /* only called in object mode */
+ short event, changed=0;
+ Object *ob;
+ Base *base;
+ ModifierData *md;
+ HookModifierData *hmd;
+
+ event= pupmenu("Modify Hooks for Selected...%t|Reset Offset%x1|Recenter at Cursor%x2");
+ if (event==-1) return;
+ if (event==2 && !(v3d)) {
+ error("Cannot perform this operation without a 3d view");
+ return;
+ }
+
+ for (base= FIRSTBASE; base; base= base->next) {
+ if(TESTBASELIB(v3d, base)) {
+ for (md = base->object->modifiers.first; md; md=md->next) {
+ if (md->type==eModifierType_Hook) {
+ ob = base->object;
+ hmd = (HookModifierData*) md;
+
+ /*
+ * Copied from modifiers_cursorHookCenter and
+ * modifiers_clearHookOffset, should consolidate
+ * */
+
+ if (event==1) {
+ if(hmd->object) {
+ Mat4Invert(hmd->object->imat, hmd->object->obmat);
+ Mat4MulSerie(hmd->parentinv, hmd->object->imat, ob->obmat, NULL, NULL, NULL, NULL, NULL, NULL);
+
+ changed= 1;
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ }
+ } else {
+ float *curs = give_cursor(scene, v3d);
+ float bmat[3][3], imat[3][3];
+
+ where_is_object(scene, ob);
+
+ Mat3CpyMat4(bmat, ob->obmat);
+ Mat3Inv(imat, bmat);
+
+ curs= give_cursor(scene, v3d);
+ hmd->cent[0]= curs[0]-ob->obmat[3][0];
+ hmd->cent[1]= curs[1]-ob->obmat[3][1];
+ hmd->cent[2]= curs[2]-ob->obmat[3][2];
+ Mat3MulVecfl(imat, hmd->cent);
+
+ changed= 1;
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ }
+ }
+ }
+ }
+ }
+
+ if (changed) {
+ }
+}
+
static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *ptr, int *free)
{
EnumPropertyItem *input = object_mode_items;
@@ -1921,90 +7073,28 @@ static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *ptr, in
return item;
}
-static const char *object_mode_op_string(int mode)
-{
- if(mode & OB_MODE_EDIT)
- return "OBJECT_OT_editmode_toggle";
- if(mode == OB_MODE_SCULPT)
- return "SCULPT_OT_sculptmode_toggle";
- if(mode == OB_MODE_VERTEX_PAINT)
- return "PAINT_OT_vertex_paint_toggle";
- if(mode == OB_MODE_WEIGHT_PAINT)
- return "PAINT_OT_weight_paint_toggle";
- if(mode == OB_MODE_TEXTURE_PAINT)
- return "PAINT_OT_texture_paint_toggle";
- if(mode == OB_MODE_PARTICLE_EDIT)
- return "PARTICLE_OT_particle_edit_toggle";
- if(mode == OB_MODE_POSE)
- return "OBJECT_OT_posemode_toggle";
- return NULL;
-}
-
-/* checks the mode to be set is compatible with the object
- * should be made into a generic function */
-static int object_mode_set_compat(bContext *C, wmOperator *op, Object *ob)
-{
- ObjectMode mode = RNA_enum_get(op->ptr, "mode");
-
- if(ob) {
- switch(ob->type) {
- case OB_EMPTY:
- case OB_LAMP:
- case OB_CAMERA:
- if(mode & OB_MODE_OBJECT)
- return 1;
- return 0;
- case OB_MESH:
- if(mode & ( OB_MODE_OBJECT|OB_MODE_EDIT|OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT|OB_MODE_PARTICLE_EDIT))
- return 1;
- return 0;
- case OB_CURVE:
- case OB_SURF:
- case OB_FONT:
- case OB_MBALL:
- if(mode & (OB_MODE_OBJECT|OB_MODE_EDIT))
- return 1;
- return 0;
- case OB_LATTICE:
- if(mode & (OB_MODE_OBJECT|OB_MODE_EDIT|OB_MODE_WEIGHT_PAINT))
- return 1;
- case OB_ARMATURE:
- if(mode & (OB_MODE_OBJECT|OB_MODE_EDIT|OB_MODE_POSE))
- return 1;
- }
- }
-
- return 0;
-}
-
static int object_mode_set_exec(bContext *C, wmOperator *op)
{
Object *ob= CTX_data_active_object(C);
- ObjectMode mode = RNA_enum_get(op->ptr, "mode");
- ObjectMode restore_mode = ob->mode;
- int toggle = RNA_boolean_get(op->ptr, "toggle");
+ int mode = RNA_enum_get(op->ptr, "mode");
- if(!ob || !object_mode_set_compat(C, op, ob))
+ if(!ob)
return OPERATOR_CANCELLED;
- /* Exit current mode if it's not the mode we're setting */
- if(ob->mode != OB_MODE_OBJECT && ob->mode != mode)
- WM_operator_name_call(C, object_mode_op_string(ob->mode), WM_OP_EXEC_REGION_WIN, NULL);
-
- if(mode != OB_MODE_OBJECT) {
- /* Enter new mode */
- if(ob->mode != mode || toggle)
- WM_operator_name_call(C, object_mode_op_string(mode), WM_OP_EXEC_REGION_WIN, NULL);
-
- if(toggle) {
- if(ob->mode == mode)
- /* For toggling, store old mode so we know what to go back to */
- ob->restore_mode = restore_mode;
- else if(ob->restore_mode != OB_MODE_OBJECT && ob->restore_mode != mode) {
- WM_operator_name_call(C, object_mode_op_string(ob->restore_mode), WM_OP_EXEC_REGION_WIN, NULL);
- }
- }
- }
+ if((mode == OB_MODE_EDIT) == !(ob->mode & OB_MODE_EDIT))
+ WM_operator_name_call(C, "OBJECT_OT_editmode_toggle", WM_OP_EXEC_REGION_WIN, NULL);
+ if((mode == OB_MODE_SCULPT) == !(ob->mode & OB_MODE_SCULPT))
+ WM_operator_name_call(C, "SCULPT_OT_sculptmode_toggle", WM_OP_EXEC_REGION_WIN, NULL);
+ if((mode == OB_MODE_VERTEX_PAINT) == !(ob->mode & OB_MODE_VERTEX_PAINT))
+ WM_operator_name_call(C, "PAINT_OT_vertex_paint_toggle", WM_OP_EXEC_REGION_WIN, NULL);
+ if((mode == OB_MODE_WEIGHT_PAINT) == !(ob->mode & OB_MODE_WEIGHT_PAINT))
+ WM_operator_name_call(C, "PAINT_OT_weight_paint_toggle", WM_OP_EXEC_REGION_WIN, NULL);
+ if((mode == OB_MODE_TEXTURE_PAINT) == !(ob->mode & OB_MODE_TEXTURE_PAINT))
+ WM_operator_name_call(C, "PAINT_OT_texture_paint_toggle", WM_OP_EXEC_REGION_WIN, NULL);
+ if((mode == OB_MODE_PARTICLE_EDIT) == !(ob->mode & OB_MODE_PARTICLE_EDIT))
+ WM_operator_name_call(C, "PARTICLE_OT_particle_edit_toggle", WM_OP_EXEC_REGION_WIN, NULL);
+ if((mode == OB_MODE_POSE) == !(ob->mode & OB_MODE_POSE))
+ WM_operator_name_call(C, "OBJECT_OT_posemode_toggle", WM_OP_EXEC_REGION_WIN, NULL);
return OPERATOR_FINISHED;
}
@@ -2028,8 +7118,6 @@ void OBJECT_OT_mode_set(wmOperatorType *ot)
prop= RNA_def_enum(ot->srna, "mode", object_mode_items, 0, "Mode", "");
RNA_def_enum_funcs(prop, object_mode_set_itemsf);
-
- RNA_def_boolean(ot->srna, "toggle", 0, "Toggle", "");
}
@@ -2046,76 +7134,4 @@ void ED_object_toggle_modes(bContext *C, int mode)
WM_operator_name_call(C, "PAINT_OT_texture_paint_toggle", WM_OP_EXEC_REGION_WIN, NULL);
if(mode & OB_MODE_PARTICLE_EDIT)
WM_operator_name_call(C, "PARTICLE_OT_particle_edit_toggle", WM_OP_EXEC_REGION_WIN, NULL);
- if(mode & OB_MODE_POSE)
- WM_operator_name_call(C, "OBJECT_OT_posemode_toggle", WM_OP_EXEC_REGION_WIN, NULL);
-}
-
-/************************ Game Properties ***********************/
-
-static int game_property_new(bContext *C, wmOperator *op)
-{
- Object *ob= CTX_data_active_object(C);
- bProperty *prop;
-
- if(!ob)
- return OPERATOR_CANCELLED;
-
- prop= new_property(PROP_FLOAT);
- BLI_addtail(&ob->prop, prop);
- unique_property(NULL, prop, 0); // make_unique_prop_names(prop->name);
-
- return OPERATOR_FINISHED;
}
-
-
-void OBJECT_OT_game_property_new(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "New Game Property";
- ot->idname= "OBJECT_OT_game_property_new";
-
- /* api callbacks */
- ot->exec= game_property_new;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-static int game_property_remove(bContext *C, wmOperator *op)
-{
- Object *ob= CTX_data_active_object(C);
- bProperty *prop;
- int index;
-
- if(!ob)
- return OPERATOR_CANCELLED;
-
- index = RNA_int_get(op->ptr, "index");
-
- prop= BLI_findlink(&ob->prop, index);
-
- if(prop) {
- BLI_remlink(&ob->prop, prop);
- free_property(prop);
- return OPERATOR_FINISHED;
- }
- else {
- return OPERATOR_CANCELLED;
- }
-}
-
-void OBJECT_OT_game_property_remove(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Remove Game Property";
- ot->idname= "OBJECT_OT_game_property_remove";
-
- /* api callbacks */
- ot->exec= game_property_remove;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "Property index to remove ", 0, INT_MAX);
-}
-
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
deleted file mode 100644
index ab7bcbc989d..00000000000
--- a/source/blender/editors/object/object_hook.c
+++ /dev/null
@@ -1,608 +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., 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.
- *
- * Contributor(s): Blender Foundation, 2002-2008 full recode
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_arithb.h"
-#include "BLI_editVert.h"
-#include "BLI_listbase.h"
-#include "BLI_string.h"
-
-#include "DNA_curve_types.h"
-#include "DNA_lattice_types.h"
-#include "DNA_mesh_types.h"
-#include "DNA_meshdata_types.h"
-#include "DNA_modifier_types.h"
-#include "DNA_object_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_view3d_types.h"
-
-#include "BKE_customdata.h"
-#include "BKE_depsgraph.h"
-#include "BKE_mesh.h"
-#include "BKE_modifier.h"
-#include "BKE_object.h"
-
-#include "ED_curve.h"
-#include "ED_mesh.h"
-#include "ED_object.h"
-#include "ED_view3d.h"
-
-#include "object_intern.h"
-
-/* XXX operators for this are not implemented yet */
-
-static int return_editmesh_indexar(EditMesh *em, int *tot, int **indexar, float *cent)
-{
- EditVert *eve;
- int *index, nr, totvert=0;
-
- for(eve= em->verts.first; eve; eve= eve->next) {
- if(eve->f & SELECT) totvert++;
- }
- if(totvert==0) return 0;
-
- *indexar= index= MEM_mallocN(4*totvert, "hook indexar");
- *tot= totvert;
- nr= 0;
- cent[0]= cent[1]= cent[2]= 0.0;
-
- for(eve= em->verts.first; eve; eve= eve->next) {
- if(eve->f & SELECT) {
- *index= nr; index++;
- VecAddf(cent, cent, eve->co);
- }
- nr++;
- }
-
- VecMulf(cent, 1.0f/(float)totvert);
-
- return totvert;
-}
-
-static int return_editmesh_vgroup(Object *obedit, EditMesh *em, char *name, float *cent)
-{
- MDeformVert *dvert;
- EditVert *eve;
- int i, totvert=0;
-
- cent[0]= cent[1]= cent[2]= 0.0;
-
- if(obedit->actdef) {
-
- /* find the vertices */
- for(eve= em->verts.first; eve; eve= eve->next) {
- dvert= CustomData_em_get(&em->vdata, eve->data, CD_MDEFORMVERT);
-
- if(dvert) {
- for(i=0; i<dvert->totweight; i++){
- if(dvert->dw[i].def_nr == (obedit->actdef-1)) {
- totvert++;
- VecAddf(cent, cent, eve->co);
- }
- }
- }
- }
- if(totvert) {
- bDeformGroup *defGroup = BLI_findlink(&obedit->defbase, obedit->actdef-1);
- strcpy(name, defGroup->name);
- VecMulf(cent, 1.0f/(float)totvert);
- return 1;
- }
- }
-
- return 0;
-}
-
-static void select_editmesh_hook(Object *ob, HookModifierData *hmd)
-{
- Mesh *me= ob->data;
- EditMesh *em= BKE_mesh_get_editmesh(me);
- EditVert *eve;
- int index=0, nr=0;
-
- if (hmd->indexar == NULL)
- return;
-
- for(eve= em->verts.first; eve; eve= eve->next, nr++) {
- if(nr==hmd->indexar[index]) {
- eve->f |= SELECT;
- if(index < hmd->totindex-1) index++;
- }
- }
- EM_select_flush(em);
-
- BKE_mesh_end_editmesh(me, em);
-}
-
-static int return_editlattice_indexar(Lattice *editlatt, int *tot, int **indexar, float *cent)
-{
- BPoint *bp;
- int *index, nr, totvert=0, a;
-
- /* count */
- a= editlatt->pntsu*editlatt->pntsv*editlatt->pntsw;
- bp= editlatt->def;
- while(a--) {
- if(bp->f1 & SELECT) {
- if(bp->hide==0) totvert++;
- }
- bp++;
- }
-
- if(totvert==0) return 0;
-
- *indexar= index= MEM_mallocN(4*totvert, "hook indexar");
- *tot= totvert;
- nr= 0;
- cent[0]= cent[1]= cent[2]= 0.0;
-
- a= editlatt->pntsu*editlatt->pntsv*editlatt->pntsw;
- bp= editlatt->def;
- while(a--) {
- if(bp->f1 & SELECT) {
- if(bp->hide==0) {
- *index= nr; index++;
- VecAddf(cent, cent, bp->vec);
- }
- }
- bp++;
- nr++;
- }
-
- VecMulf(cent, 1.0f/(float)totvert);
-
- return totvert;
-}
-
-static void select_editlattice_hook(Object *obedit, HookModifierData *hmd)
-{
- Lattice *lt= obedit->data;
- BPoint *bp;
- int index=0, nr=0, a;
-
- /* count */
- a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
- bp= lt->editlatt->def;
- while(a--) {
- if(hmd->indexar[index]==nr) {
- bp->f1 |= SELECT;
- if(index < hmd->totindex-1) index++;
- }
- nr++;
- bp++;
- }
-}
-
-static int return_editcurve_indexar(Object *obedit, int *tot, int **indexar, float *cent)
-{
- ListBase *editnurb= curve_get_editcurve(obedit);
- Nurb *nu;
- BPoint *bp;
- BezTriple *bezt;
- int *index, a, nr, totvert=0;
-
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
- while(a--) {
- if(bezt->f1 & SELECT) totvert++;
- if(bezt->f2 & SELECT) totvert++;
- if(bezt->f3 & SELECT) totvert++;
- bezt++;
- }
- }
- else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
- while(a--) {
- if(bp->f1 & SELECT) totvert++;
- bp++;
- }
- }
- }
- if(totvert==0) return 0;
-
- *indexar= index= MEM_mallocN(4*totvert, "hook indexar");
- *tot= totvert;
- nr= 0;
- cent[0]= cent[1]= cent[2]= 0.0;
-
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
- while(a--) {
- if(bezt->f1 & SELECT) {
- *index= nr; index++;
- VecAddf(cent, cent, bezt->vec[0]);
- }
- nr++;
- if(bezt->f2 & SELECT) {
- *index= nr; index++;
- VecAddf(cent, cent, bezt->vec[1]);
- }
- nr++;
- if(bezt->f3 & SELECT) {
- *index= nr; index++;
- VecAddf(cent, cent, bezt->vec[2]);
- }
- nr++;
- bezt++;
- }
- }
- else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
- while(a--) {
- if(bp->f1 & SELECT) {
- *index= nr; index++;
- VecAddf(cent, cent, bp->vec);
- }
- nr++;
- bp++;
- }
- }
- }
-
- VecMulf(cent, 1.0f/(float)totvert);
-
- return totvert;
-}
-
-int object_hook_index_array(Object *obedit, int *tot, int **indexar, char *name, float *cent_r)
-{
- *indexar= NULL;
- *tot= 0;
- name[0]= 0;
-
- switch(obedit->type) {
- case OB_MESH:
- {
- Mesh *me= obedit->data;
- EditMesh *em = BKE_mesh_get_editmesh(me);
-
- /* check selected vertices first */
- if( return_editmesh_indexar(em, tot, indexar, cent_r)) {
- BKE_mesh_end_editmesh(me, em);
- return 1;
- } else {
- int ret = return_editmesh_vgroup(obedit, em, name, cent_r);
- BKE_mesh_end_editmesh(me, em);
- return ret;
- }
- }
- case OB_CURVE:
- case OB_SURF:
- return return_editcurve_indexar(obedit, tot, indexar, cent_r);
- case OB_LATTICE:
- {
- Lattice *lt= obedit->data;
- return return_editlattice_indexar(lt->editlatt, tot, indexar, cent_r);
- }
- default:
- return 0;
- }
-}
-
-static void select_editcurve_hook(Object *obedit, HookModifierData *hmd)
-{
- ListBase *editnurb= curve_get_editcurve(obedit);
- Nurb *nu;
- BPoint *bp;
- BezTriple *bezt;
- int index=0, a, nr=0;
-
- for(nu= editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
- while(a--) {
- if(nr == hmd->indexar[index]) {
- bezt->f1 |= SELECT;
- if(index<hmd->totindex-1) index++;
- }
- nr++;
- if(nr == hmd->indexar[index]) {
- bezt->f2 |= SELECT;
- if(index<hmd->totindex-1) index++;
- }
- nr++;
- if(nr == hmd->indexar[index]) {
- bezt->f3 |= SELECT;
- if(index<hmd->totindex-1) index++;
- }
- nr++;
-
- bezt++;
- }
- }
- else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
- while(a--) {
- if(nr == hmd->indexar[index]) {
- bp->f1 |= SELECT;
- if(index<hmd->totindex-1) index++;
- }
- nr++;
- bp++;
- }
- }
- }
-}
-
-void object_hook_select(Object *ob, HookModifierData *hmd)
-{
- if(ob->type==OB_MESH) select_editmesh_hook(ob, hmd);
- else if(ob->type==OB_LATTICE) select_editlattice_hook(ob, hmd);
- else if(ob->type==OB_CURVE) select_editcurve_hook(ob, hmd);
- else if(ob->type==OB_SURF) select_editcurve_hook(ob, hmd);
-}
-
-
-void add_hook(Scene *scene, View3D *v3d, int mode)
-{
- ModifierData *md = NULL;
- HookModifierData *hmd = NULL;
- Object *ob=NULL;
- Object *obedit= scene->obedit; // XXX get from context
-
- if(obedit==NULL) return;
-
- /* preconditions */
- if(mode==2) { /* selected object */
- Base *base;
- for(base= FIRSTBASE; base; base= base->next) {
- if(TESTBASELIB(v3d, base)) {
- if(base!=BASACT) {
- ob= base->object;
- break;
- }
- }
- }
- if(ob==NULL) {
- // XXX error("Requires selected Object");
- return;
- }
- }
- else if(mode!=1) {
- int maxlen=0, a, nr;
- char *cp;
-
- /* make pupmenu with hooks */
- for(md=obedit->modifiers.first; md; md= md->next) {
- if (md->type==eModifierType_Hook)
- maxlen+=32;
- }
-
- if(maxlen==0) {
- // XXX error("Object has no hooks yet");
- return;
- }
-
- cp= MEM_callocN(maxlen+32, "temp string");
- if(mode==3) strcpy(cp, "Remove %t|");
- else if(mode==4) strcpy(cp, "Reassign %t|");
- else if(mode==5) strcpy(cp, "Select %t|");
- else if(mode==6) strcpy(cp, "Clear Offset %t|");
-
- for(md=obedit->modifiers.first; md; md= md->next) {
- if (md->type==eModifierType_Hook) {
- strcat(cp, md->name);
- strcat(cp, " |");
- }
- }
-
- nr= 0; // XXX pupmenu(cp);
- MEM_freeN(cp);
-
- if(nr<1) return;
-
- a= 1;
- for(md=obedit->modifiers.first; md; md=md->next) {
- if (md->type==eModifierType_Hook) {
- if(a==nr) break;
- a++;
- }
- }
-
- hmd = (HookModifierData*) md;
- ob= hmd->object;
- }
-
- /* do it, new hooks or reassign */
- if(mode==1 || mode==2 || mode==4) {
- float cent[3];
- int tot, ok, *indexar;
- char name[32];
-
- ok = object_hook_index_array(obedit, &tot, &indexar, name, cent);
-
- if(ok==0) {
- // XXX error("Requires selected vertices or active Vertex Group");
- }
- else {
-
- if(mode==1) {
- Base *base= BASACT, *newbase;
-
- ob= add_object(scene, OB_EMPTY);
- /* set layers OK */
- newbase= BASACT;
- newbase->lay= base->lay;
- ob->lay= newbase->lay;
-
- /* transform cent to global coords for loc */
- VecMat4MulVecfl(ob->loc, obedit->obmat, cent);
-
- /* restore, add_object sets active */
- BASACT= base;
- }
- /* if mode is 2 or 4, ob has been set */
-
- /* new hook */
- if(mode==1 || mode==2) {
- ModifierData *md = obedit->modifiers.first;
-
- while (md && modifierType_getInfo(md->type)->type==eModifierTypeType_OnlyDeform) {
- md = md->next;
- }
-
- hmd = (HookModifierData*) modifier_new(eModifierType_Hook);
- BLI_insertlinkbefore(&obedit->modifiers, md, hmd);
- sprintf(hmd->modifier.name, "Hook-%s", ob->id.name+2);
- }
- else if (hmd->indexar) MEM_freeN(hmd->indexar); /* reassign, hook was set */
-
- hmd->object= ob;
- hmd->indexar= indexar;
- VecCopyf(hmd->cent, cent);
- hmd->totindex= tot;
- BLI_strncpy(hmd->name, name, 32);
-
- // TODO: need to take into account bone targets here too now...
- if(mode==1 || mode==2) {
- /* matrix calculus */
- /* vert x (obmat x hook->imat) x hook->obmat x ob->imat */
- /* (parentinv ) */
-
- where_is_object(scene, ob);
-
- Mat4Invert(ob->imat, ob->obmat);
- /* apparently this call goes from right to left... */
- Mat4MulSerie(hmd->parentinv, ob->imat, obedit->obmat, NULL,
- NULL, NULL, NULL, NULL, NULL);
- }
- }
- }
- else if(mode==3) { /* remove */
- BLI_remlink(&obedit->modifiers, md);
- modifier_free(md);
- }
- else if(mode==5) { /* select */
- // FIXME: this is now OBJECT_OT_hook_select
- object_hook_select(obedit, hmd);
- }
- else if(mode==6) { /* clear offset */
- // FIXME: this is now OBJECT_OT_hook_reset operator
- where_is_object(scene, ob); /* ob is hook->parent */
-
- Mat4Invert(ob->imat, ob->obmat);
- /* this call goes from right to left... */
- Mat4MulSerie(hmd->parentinv, ob->imat, obedit->obmat, NULL,
- NULL, NULL, NULL, NULL, NULL);
- }
-
- DAG_scene_sort(scene);
-}
-
-void add_hook_menu(Scene *scene, View3D *v3d)
-{
- Object *obedit= scene->obedit; // XXX get from context
- int mode;
-
- if(obedit==NULL) return;
-
- if(modifiers_findByType(obedit, eModifierType_Hook))
- mode= 0; // XXX pupmenu("Hooks %t|Add, To New Empty %x1|Add, To Selected Object %x2|Remove... %x3|Reassign... %x4|Select... %x5|Clear Offset...%x6");
- else
- mode= 0; // XXX pupmenu("Hooks %t|Add, New Empty %x1|Add, To Selected Object %x2");
-
- if(mode<1) return;
-
- /* do operations */
- add_hook(scene, v3d, mode);
-}
-
-void hookmenu(Scene *scene, View3D *v3d)
-{
- /* only called in object mode */
- short event, changed=0;
- Object *ob;
- Base *base;
- ModifierData *md;
- HookModifierData *hmd;
-
- event= 0; // XXX pupmenu("Modify Hooks for Selected...%t|Reset Offset%x1|Recenter at Cursor%x2");
- if (event==-1) return;
- if (event==2 && !(v3d)) {
- // XXX error("Cannot perform this operation without a 3d view");
- return;
- }
-
- for (base= FIRSTBASE; base; base= base->next) {
- if(TESTBASELIB(v3d, base)) {
- for (md = base->object->modifiers.first; md; md=md->next) {
- if (md->type==eModifierType_Hook) {
- ob = base->object;
- hmd = (HookModifierData*) md;
-
- /*
- * Copied from modifiers_cursorHookCenter and
- * modifiers_clearHookOffset, should consolidate
- * */
-
- if (event==1) {
- if(hmd->object) {
- Mat4Invert(hmd->object->imat, hmd->object->obmat);
- Mat4MulSerie(hmd->parentinv, hmd->object->imat, ob->obmat, NULL, NULL, NULL, NULL, NULL, NULL);
-
- changed= 1;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- }
- } else {
- float *curs = give_cursor(scene, v3d);
- float bmat[3][3], imat[3][3];
-
- where_is_object(scene, ob);
-
- Mat3CpyMat4(bmat, ob->obmat);
- Mat3Inv(imat, bmat);
-
- curs= give_cursor(scene, v3d);
- hmd->cent[0]= curs[0]-ob->obmat[3][0];
- hmd->cent[1]= curs[1]-ob->obmat[3][1];
- hmd->cent[2]= curs[2]-ob->obmat[3][2];
- Mat3MulVecfl(imat, hmd->cent);
-
- changed= 1;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- }
- }
- }
- }
- }
-
- if (changed) {
- }
-}
-
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index 7d52e9c7c56..e47087a3c27 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -34,43 +34,18 @@ struct Lattice;
struct Curve;
struct Object;
struct Mesh;
-struct HookModifierData;
/* internal exports only */
-/* object_transform.c */
-void OBJECT_OT_location_clear(struct wmOperatorType *ot);
-void OBJECT_OT_rotation_clear(struct wmOperatorType *ot);
-void OBJECT_OT_scale_clear(struct wmOperatorType *ot);
-void OBJECT_OT_origin_clear(struct wmOperatorType *ot);
-void OBJECT_OT_visual_transform_apply(struct wmOperatorType *ot);
-void OBJECT_OT_location_apply(struct wmOperatorType *ot);
-void OBJECT_OT_scale_apply(struct wmOperatorType *ot);
-void OBJECT_OT_rotation_apply(struct wmOperatorType *ot);
-void OBJECT_OT_center_set(struct wmOperatorType *ot);
-
-/* object_relations.c */
-void OBJECT_OT_parent_set(struct wmOperatorType *ot);
-void OBJECT_OT_parent_clear(struct wmOperatorType *ot);
-void OBJECT_OT_vertex_parent_set(struct wmOperatorType *ot);
-void OBJECT_OT_track_set(struct wmOperatorType *ot);
-void OBJECT_OT_track_clear(struct wmOperatorType *ot);
-void OBJECT_OT_slow_parent_set(struct wmOperatorType *ot);
-void OBJECT_OT_slow_parent_clear(struct wmOperatorType *ot);
-void OBJECT_OT_make_local(struct wmOperatorType *ot);
-void OBJECT_OT_move_to_layer(struct wmOperatorType *ot);
/* object_edit.c */
void OBJECT_OT_mode_set(struct wmOperatorType *ot);
void OBJECT_OT_editmode_toggle(struct wmOperatorType *ot);
void OBJECT_OT_posemode_toggle(struct wmOperatorType *ot);
-void OBJECT_OT_restrictview_set(struct wmOperatorType *ot);
-void OBJECT_OT_restrictview_clear(struct wmOperatorType *ot);
-void OBJECT_OT_proxy_make(struct wmOperatorType *ot);
-void OBJECT_OT_shade_smooth(struct wmOperatorType *ot);
-void OBJECT_OT_shade_flat(struct wmOperatorType *ot);
-
-/* object_select.c */
+void OBJECT_OT_parent_set(struct wmOperatorType *ot);
+void OBJECT_OT_parent_clear(struct wmOperatorType *ot);
+void OBJECT_OT_track_set(struct wmOperatorType *ot);
+void OBJECT_OT_track_clear(struct wmOperatorType *ot);
void OBJECT_OT_select_all_toggle(struct wmOperatorType *ot);
void OBJECT_OT_select_inverse(struct wmOperatorType *ot);
void OBJECT_OT_select_random(struct wmOperatorType *ot);
@@ -78,29 +53,34 @@ void OBJECT_OT_select_by_type(struct wmOperatorType *ot);
void OBJECT_OT_select_by_layer(struct wmOperatorType *ot);
void OBJECT_OT_select_linked(struct wmOperatorType *ot);
void OBJECT_OT_select_grouped(struct wmOperatorType *ot);
-void OBJECT_OT_select_mirror(struct wmOperatorType *ot);
+void OBJECT_OT_location_clear(struct wmOperatorType *ot);
+void OBJECT_OT_rotation_clear(struct wmOperatorType *ot);
+void OBJECT_OT_scale_clear(struct wmOperatorType *ot);
+void OBJECT_OT_origin_clear(struct wmOperatorType *ot);
+void OBJECT_OT_restrictview_set(struct wmOperatorType *ot);
+void OBJECT_OT_restrictview_clear(struct wmOperatorType *ot);
+void OBJECT_OT_slowparent_set(struct wmOperatorType *ot);
+void OBJECT_OT_slowparent_clear(struct wmOperatorType *ot);
+void OBJECT_OT_center_set(struct wmOperatorType *ot);
+void OBJECT_OT_duplicates_make_real(struct wmOperatorType *ot);
+void OBJECT_OT_object_add(struct wmOperatorType *ot);
+void OBJECT_OT_duplicate(struct wmOperatorType *ot);
+void OBJECT_OT_delete(struct wmOperatorType *ot);
+void OBJECT_OT_join(struct wmOperatorType *ot);
+void OBJECT_OT_proxy_make(struct wmOperatorType *ot);
+void OBJECT_OT_shade_smooth(struct wmOperatorType *ot);
+void OBJECT_OT_shade_flat(struct wmOperatorType *ot);
-/* object_add.c */
-void OBJECT_OT_add(struct wmOperatorType *ot);
void OBJECT_OT_mesh_add(struct wmOperatorType *ot);
void OBJECT_OT_curve_add(struct wmOperatorType *ot);
void OBJECT_OT_surface_add(struct wmOperatorType *ot);
-void OBJECT_OT_metaball_add(struct wmOperatorType *ot);
+void OBJECT_OT_metaball_add(wmOperatorType *ot);
void OBJECT_OT_text_add(struct wmOperatorType *ot);
void OBJECT_OT_armature_add(struct wmOperatorType *ot);
-void OBJECT_OT_primitive_add(struct wmOperatorType *ot); /* only used as menu */
-
-void OBJECT_OT_duplicates_make_real(struct wmOperatorType *ot);
-void OBJECT_OT_duplicate(struct wmOperatorType *ot);
-void OBJECT_OT_delete(struct wmOperatorType *ot);
-void OBJECT_OT_join(struct wmOperatorType *ot);
-void OBJECT_OT_convert(struct wmOperatorType *ot);
-
-/* object_hook.c */
-int object_hook_index_array(Object *obedit, int *tot, int **indexar, char *name, float *cent_r);
-void object_hook_select(Object *obedit, struct HookModifierData *hmd);
+ /* only used as menu */
+void OBJECT_OT_primitive_add(struct wmOperatorType *ot);
-/* object_lattice.c */
+/* editlattice.c */
void free_editLatt(Object *ob);
void make_editLatt(Object *obedit);
void load_editLatt(Object *obedit);
@@ -109,7 +89,7 @@ void remake_editLatt(Object *obedit);
void LATTICE_OT_select_all_toggle(struct wmOperatorType *ot);
void LATTICE_OT_make_regular(struct wmOperatorType *ot);
-/* object_group.c */
+/* editgroup.c */
void GROUP_OT_group_create(struct wmOperatorType *ot);
void GROUP_OT_objects_remove(struct wmOperatorType *ot);
void GROUP_OT_objects_add_active(struct wmOperatorType *ot);
@@ -124,15 +104,9 @@ void OBJECT_OT_modifier_apply(struct wmOperatorType *ot);
void OBJECT_OT_modifier_convert(struct wmOperatorType *ot);
void OBJECT_OT_modifier_copy(struct wmOperatorType *ot);
void OBJECT_OT_multires_subdivide(struct wmOperatorType *ot);
-void OBJECT_OT_multires_higher_levels_delete(struct wmOperatorType *ot);
-void OBJECT_OT_meshdeform_bind(struct wmOperatorType *ot);
-void OBJECT_OT_hook_reset(struct wmOperatorType *ot);
-void OBJECT_OT_hook_recenter(struct wmOperatorType *ot);
-void OBJECT_OT_hook_select(struct wmOperatorType *ot);
-void OBJECT_OT_hook_assign(struct wmOperatorType *ot);
-void OBJECT_OT_explode_refresh(struct wmOperatorType *ot);
-
-/* object_constraint.c */
+void OBJECT_OT_modifier_mdef_bind(struct wmOperatorType *ot);
+
+/* editconstraint.c */
void OBJECT_OT_constraint_add(struct wmOperatorType *ot);
void OBJECT_OT_constraint_add_with_targets(struct wmOperatorType *ot);
void POSE_OT_constraint_add(struct wmOperatorType *ot);
@@ -163,13 +137,8 @@ void OBJECT_OT_vertex_group_select(struct wmOperatorType *ot);
void OBJECT_OT_vertex_group_deselect(struct wmOperatorType *ot);
void OBJECT_OT_vertex_group_copy_to_linked(struct wmOperatorType *ot);
void OBJECT_OT_vertex_group_copy(struct wmOperatorType *ot);
-void OBJECT_OT_vertex_group_menu(struct wmOperatorType *ot);
-void OBJECT_OT_vertex_group_set_active(struct wmOperatorType *ot);
-
-void OBJECT_OT_game_property_new(struct wmOperatorType *ot);
-void OBJECT_OT_game_property_remove(struct wmOperatorType *ot);
-/* object_shapekey.c */
+/* editkey.c */
void OBJECT_OT_shape_key_add(struct wmOperatorType *ot);
void OBJECT_OT_shape_key_remove(struct wmOperatorType *ot);
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index cc8cc420bf7..9983e24f2c9 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -31,7 +31,6 @@
#include "MEM_guardedalloc.h"
-#include "DNA_action_types.h"
#include "DNA_curve_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
@@ -40,10 +39,8 @@
#include "DNA_object_force.h"
#include "DNA_scene_types.h"
-#include "BLI_arithb.h"
#include "BLI_listbase.h"
-#include "BKE_action.h"
#include "BKE_curve.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
@@ -119,7 +116,7 @@ int ED_object_modifier_add(ReportList *reports, Scene *scene, Object *ob, int ty
DAG_scene_sort(scene);
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
return 1;
}
@@ -168,7 +165,7 @@ int ED_object_modifier_remove(ReportList *reports, Scene *scene, Object *ob, Mod
BLI_remlink(&ob->modifiers, md);
modifier_free(md);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
return 1;
}
@@ -376,7 +373,7 @@ int ED_object_modifier_apply(ReportList *reports, Scene *scene, Object *ob, Modi
MEM_freeN(vertexCos);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
else {
BKE_report(reports, RPT_ERROR, "Cannot apply modifier for this object type");
@@ -406,12 +403,6 @@ int ED_object_modifier_copy(ReportList *reports, Object *ob, ModifierData *md)
/***************************** OPERATORS ****************************/
-static int modifier_poll(bContext *C)
-{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier);
- return (ptr.data != NULL && !((ID*)ptr.id.data)->lib);
-}
-
/************************ add modifier operator *********************/
static int modifier_add_exec(bContext *C, wmOperator *op)
@@ -428,44 +419,8 @@ static int modifier_add_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *ptr, int *free)
-{
- EnumPropertyItem *item= NULL, *md_item;
- ModifierTypeInfo *mti;
- Object *ob;
- int totitem= 0, a;
-
- if(!C || !(ob= CTX_data_active_object(C))) /* needed for docs */
- return modifier_type_items;
-
- for(a=0; modifier_type_items[a].identifier; a++) {
- md_item= &modifier_type_items[a];
-
- if(md_item->identifier[0]) {
- mti= modifierType_getInfo(md_item->value);
-
- if(mti->flags & eModifierTypeFlag_NoUserAdd)
- continue;
-
- if(!((mti->flags & eModifierTypeFlag_AcceptsCVs) ||
- (ob->type==OB_MESH && (mti->flags & eModifierTypeFlag_AcceptsMesh))))
- continue;
- }
-
- RNA_enum_item_add(&item, &totitem, md_item);
- }
-
- RNA_enum_item_end(&item, &totitem);
-
- *free= 1;
-
- return item;
-}
-
void OBJECT_OT_modifier_add(wmOperatorType *ot)
{
- PropertyRNA *prop;
-
/* identifiers */
ot->name= "Add Modifier";
ot->description = "Add a modifier to the active object.";
@@ -474,14 +429,14 @@ void OBJECT_OT_modifier_add(wmOperatorType *ot)
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= modifier_add_exec;
+
ot->poll= ED_operator_object_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- /* properties */
- prop= RNA_def_enum(ot->srna, "type", modifier_type_items, eModifierType_Subsurf, "Type", "");
- RNA_def_enum_funcs(prop, modifier_add_itemf);
+ /* XXX only some types should be here */
+ RNA_def_enum(ot->srna, "type", modifier_type_items, 0, "Type", "");
}
/************************ remove modifier operator *********************/
@@ -493,7 +448,7 @@ static int modifier_remove_exec(bContext *C, wmOperator *op)
Object *ob= ptr.id.data;
ModifierData *md= ptr.data;
- if(!ED_object_modifier_remove(op->reports, scene, ob, md))
+ if(!ob || !md || !ED_object_modifier_remove(op->reports, scene, ob, md))
return OPERATOR_CANCELLED;
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
@@ -509,7 +464,6 @@ void OBJECT_OT_modifier_remove(wmOperatorType *ot)
ot->poll= ED_operator_object_active;
ot->exec= modifier_remove_exec;
- ot->poll= modifier_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -519,14 +473,15 @@ void OBJECT_OT_modifier_remove(wmOperatorType *ot)
static int modifier_move_up_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier);
Object *ob= ptr.id.data;
ModifierData *md= ptr.data;
- if(!ED_object_modifier_move_up(op->reports, ob, md))
+ if(!ob || !md || !ED_object_modifier_move_up(op->reports, ob, md))
return OPERATOR_CANCELLED;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -540,7 +495,6 @@ void OBJECT_OT_modifier_move_up(wmOperatorType *ot)
ot->poll= ED_operator_object_active;
ot->exec= modifier_move_up_exec;
- ot->poll= modifier_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -550,6 +504,7 @@ void OBJECT_OT_modifier_move_up(wmOperatorType *ot)
static int modifier_move_down_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier);
Object *ob= ptr.id.data;
ModifierData *md= ptr.data;
@@ -557,7 +512,7 @@ static int modifier_move_down_exec(bContext *C, wmOperator *op)
if(!ob || !md || !ED_object_modifier_move_down(op->reports, ob, md))
return OPERATOR_CANCELLED;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -571,7 +526,6 @@ void OBJECT_OT_modifier_move_down(wmOperatorType *ot)
ot->poll= ED_operator_object_active;
ot->exec= modifier_move_down_exec;
- ot->poll= modifier_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -589,7 +543,7 @@ static int modifier_apply_exec(bContext *C, wmOperator *op)
if(!ob || !md || !ED_object_modifier_apply(op->reports, scene, ob, md))
return OPERATOR_CANCELLED;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -603,7 +557,6 @@ void OBJECT_OT_modifier_apply(wmOperatorType *ot)
ot->poll= ED_operator_object_active;
ot->exec= modifier_apply_exec;
- ot->poll= modifier_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -621,7 +574,7 @@ static int modifier_convert_exec(bContext *C, wmOperator *op)
if(!ob || !md || !ED_object_modifier_convert(op->reports, scene, ob, md))
return OPERATOR_CANCELLED;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -635,7 +588,6 @@ void OBJECT_OT_modifier_convert(wmOperatorType *ot)
ot->poll= ED_operator_object_active;
ot->exec= modifier_convert_exec;
- ot->poll= modifier_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -645,6 +597,7 @@ void OBJECT_OT_modifier_convert(wmOperatorType *ot)
static int modifier_copy_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier);
Object *ob= ptr.id.data;
ModifierData *md= ptr.data;
@@ -652,7 +605,7 @@ static int modifier_copy_exec(bContext *C, wmOperator *op)
if(!ob || !md || !ED_object_modifier_copy(op->reports, ob, md))
return OPERATOR_CANCELLED;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -666,59 +619,30 @@ void OBJECT_OT_modifier_copy(wmOperatorType *ot)
ot->poll= ED_operator_object_active;
ot->exec= modifier_copy_exec;
- ot->poll= modifier_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-/************* multires delete higher levels operator ****************/
+/****************** multires subdivide operator *********************/
-static int multires_higher_levels_delete_exec(bContext *C, wmOperator *op)
+static int multires_subdivide_exec(bContext *C, wmOperator *op)
{
PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_MultiresModifier);
Object *ob= ptr.id.data;
MultiresModifierData *mmd= ptr.data;
if(mmd) {
- multiresModifier_del_levels(mmd, ob, 1);
+ multiresModifier_subdivide(mmd, ob, 1, 0, mmd->simple);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
}
return OPERATOR_FINISHED;
}
-void OBJECT_OT_multires_higher_levels_delete(wmOperatorType *ot)
-{
- ot->name= "Delete Higher Levels";
- ot->idname= "OBJECT_OT_multires_higher_levels_delete";
- ot->poll= ED_operator_object_active;
-
- ot->exec= multires_higher_levels_delete_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-/****************** multires subdivide operator *********************/
-
-static int multires_subdivide_exec(bContext *C, wmOperator *op)
-{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_MultiresModifier);
- Object *ob= ptr.id.data;
- MultiresModifierData *mmd= ptr.data;
-
- multiresModifier_subdivide(mmd, ob, 1, 0, mmd->simple);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
-
- return OPERATOR_FINISHED;
-}
-
static int multires_subdivide_poll(bContext *C)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_MultiresModifier);
- ID *id= ptr.id.data;
- return (ptr.data && id && !id->lib);
+ return NULL != CTX_data_active_object(C) && NULL == CTX_data_edit_object(C);
}
void OBJECT_OT_multires_subdivide(wmOperatorType *ot)
@@ -736,14 +660,12 @@ void OBJECT_OT_multires_subdivide(wmOperatorType *ot)
/************************ mdef bind operator *********************/
-static int meshdeform_poll(bContext *C)
+static int modifier_mdef_bind_poll(bContext *C)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_MeshDeformModifier);
- ID *id= ptr.id.data;
- return (ptr.data && id && !id->lib);
+ return CTX_data_pointer_get_type(C, "modifier", &RNA_MeshDeformModifier).data != NULL;
}
-static int meshdeform_bind_exec(bContext *C, wmOperator *op)
+static int modifier_mdef_bind_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
PointerRNA ptr= CTX_data_pointer_get(C, "modifier");
@@ -794,205 +716,175 @@ static int meshdeform_bind_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void OBJECT_OT_meshdeform_bind(wmOperatorType *ot)
+void OBJECT_OT_modifier_mdef_bind(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Mesh Deform Bind";
ot->description = "Bind mesh to cage in mesh deform modifier.";
- ot->idname= "OBJECT_OT_meshdeform_bind";
+ ot->idname= "OBJECT_OT_modifier_mdef_bind";
/* api callbacks */
- ot->poll= meshdeform_poll;
- ot->exec= meshdeform_bind_exec;
+ ot->poll= modifier_mdef_bind_poll;
+ ot->exec= modifier_mdef_bind_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-/******************** hook operators ************************/
-
-static int hook_poll(bContext *C)
-{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
- ID *id= ptr.id.data;
- return (ptr.data && id && !id->lib);
-}
-
-static int hook_reset_exec(bContext *C, wmOperator *op)
+#if 0
+static void modifiers_add(void *ob_v, int type)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
- Object *ob= ptr.id.data;
- HookModifierData *hmd= ptr.data;
+ Object *ob = ob_v;
+ ModifierTypeInfo *mti = modifierType_getInfo(type);
+
+ if (mti->flags&eModifierTypeFlag_RequiresOriginalData) {
+ ModifierData *md = ob->modifiers.first;
- if(hmd->object) {
- bPoseChannel *pchan= get_pose_channel(hmd->object->pose, hmd->subtarget);
-
- if(hmd->subtarget[0] && pchan) {
- float imat[4][4], mat[4][4];
-
- /* calculate the world-space matrix for the pose-channel target first, then carry on as usual */
- Mat4MulMat4(mat, pchan->pose_mat, hmd->object->obmat);
-
- Mat4Invert(imat, mat);
- Mat4MulSerie(hmd->parentinv, imat, ob->obmat, NULL, NULL, NULL, NULL, NULL, NULL);
- }
- else {
- Mat4Invert(hmd->object->imat, hmd->object->obmat);
- Mat4MulSerie(hmd->parentinv, hmd->object->imat, ob->obmat, NULL, NULL, NULL, NULL, NULL, NULL);
+ while (md && modifierType_getInfo(md->type)->type==eModifierTypeType_OnlyDeform) {
+ md = md->next;
}
- }
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
-
- return OPERATOR_FINISHED;
+ BLI_insertlinkbefore(&ob->modifiers, md, modifier_new(type));
+ } else {
+ BLI_addtail(&ob->modifiers, modifier_new(type));
+ }
+ ED_undo_push("Add modifier");
}
-void OBJECT_OT_hook_reset(wmOperatorType *ot)
-{
- ot->name= "Hook Reset";
- ot->description= "Recalculate and and clear offset transformation.";
- ot->idname= "OBJECT_OT_hook_reset";
+typedef struct MenuEntry {
+ char *name;
+ int ID;
+} MenuEntry;
- ot->exec= hook_reset_exec;
- ot->poll= hook_poll;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+static int menuEntry_compare_names(const void *entry1, const void *entry2)
+{
+ return strcmp(((MenuEntry *)entry1)->name, ((MenuEntry *)entry2)->name);
}
-static int hook_recenter_exec(bContext *C, wmOperator *op)
+static uiBlock *modifiers_add_menu(void *ob_v)
{
- Scene *scene= CTX_data_scene(C);
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
- Object *ob= ptr.id.data;
- HookModifierData *hmd= ptr.data;
- float bmat[3][3], imat[3][3];
+ Object *ob = ob_v;
+ uiBlock *block;
+ int i, yco=0;
+ int numEntries = 0;
+ MenuEntry entries[NUM_MODIFIER_TYPES];
+
+ block= uiNewBlock(&curarea->uiblocks, "modifier_add_menu",
+ UI_EMBOSSP, UI_HELV, curarea->win);
+ uiBlockSetButmFunc(block, modifiers_add, ob);
- Mat3CpyMat4(bmat, ob->obmat);
- Mat3Inv(imat, bmat);
+ for (i=eModifierType_None+1; i<NUM_MODIFIER_TYPES; i++) {
+ ModifierTypeInfo *mti = modifierType_getInfo(i);
- VECSUB(hmd->cent, scene->cursor, ob->obmat[3]);
- Mat3MulVecfl(imat, hmd->cent);
+ /* Only allow adding through appropriate other interfaces */
+ if(ELEM(i, eModifierType_ParticleSystem, eModifierType_Surface)) continue;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
-
- return OPERATOR_FINISHED;
-}
+ if((mti->flags&eModifierTypeFlag_AcceptsCVs) ||
+ (ob->type==OB_MESH && (mti->flags&eModifierTypeFlag_AcceptsMesh))) {
+ entries[numEntries].name = mti->name;
+ entries[numEntries].ID = i;
-void OBJECT_OT_hook_recenter(wmOperatorType *ot)
-{
- ot->name= "Hook Recenter";
- ot->description= "Set hook center to cursor position.";
- ot->idname= "OBJECT_OT_hook_recenter";
+ ++numEntries;
+ }
+ }
- ot->exec= hook_recenter_exec;
- ot->poll= hook_poll;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
+ qsort(entries, numEntries, sizeof(*entries), menuEntry_compare_names);
-static int hook_select_exec(bContext *C, wmOperator *op)
-{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
- Object *ob= ptr.id.data;
- HookModifierData *hmd= ptr.data;
- object_hook_select(ob, hmd);
+ for(i = 0; i < numEntries; ++i)
+ uiDefBut(block, BUTM, B_MODIFIER_RECALC, entries[i].name,
+ 0, yco -= 20, 160, 19, NULL, 0, 0, 1, entries[i].ID, "");
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data);
-
- return OPERATOR_FINISHED;
+ uiTextBoundsBlock(block, 50);
+ uiBlockSetDirection(block, UI_DOWN);
+
+ return block;
}
+#endif
-void OBJECT_OT_hook_select(wmOperatorType *ot)
+#if 0
+static void modifiers_clearHookOffset(bContext *C, void *ob_v, void *md_v)
{
- ot->name= "Hook Select";
- ot->description= "Selects effected vertices on mesh.";
- ot->idname= "OBJECT_OT_hook_select";
-
- ot->exec= hook_select_exec;
- ot->poll= hook_poll;
+ Object *ob = ob_v;
+ ModifierData *md = md_v;
+ HookModifierData *hmd = (HookModifierData*) md;
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ if (hmd->object) {
+ Mat4Invert(hmd->object->imat, hmd->object->obmat);
+ Mat4MulSerie(hmd->parentinv, hmd->object->imat, ob->obmat, NULL, NULL, NULL, NULL, NULL, NULL);
+ ED_undo_push(C, "Clear hook offset");
+ }
}
-static int hook_assign_exec(bContext *C, wmOperator *op)
+static void modifiers_cursorHookCenter(bContext *C, void *ob_v, void *md_v)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
- Object *ob= ptr.id.data;
- HookModifierData *hmd= ptr.data;
- float cent[3];
- char name[32];
- int *indexar, tot;
-
- if(!object_hook_index_array(ob, &tot, &indexar, name, cent)) {
- BKE_report(op->reports, RPT_WARNING, "Requires selected vertices or active vertex group");
- return OPERATOR_CANCELLED;
- }
+ /* XXX
+ Object *ob = ob_v;
+ ModifierData *md = md_v;
+ HookModifierData *hmd = (HookModifierData*) md;
- if(hmd->indexar)
- MEM_freeN(hmd->indexar);
+ if(G.vd) {
+ float *curs = give_cursor();
+ float bmat[3][3], imat[3][3];
- VECCOPY(hmd->cent, cent);
- hmd->indexar= indexar;
- hmd->totindex= tot;
-
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ where_is_object(ob);
- return OPERATOR_FINISHED;
+ Mat3CpyMat4(bmat, ob->obmat);
+ Mat3Inv(imat, bmat);
+
+ curs= give_cursor();
+ hmd->cent[0]= curs[0]-ob->obmat[3][0];
+ hmd->cent[1]= curs[1]-ob->obmat[3][1];
+ hmd->cent[2]= curs[2]-ob->obmat[3][2];
+ Mat3MulVecfl(imat, hmd->cent);
+
+ ED_undo_push(C, "Hook cursor center");
+ }*/
}
-void OBJECT_OT_hook_assign(wmOperatorType *ot)
+static void modifiers_selectHook(bContext *C, void *ob_v, void *md_v)
{
- ot->name= "Hook Assign";
- ot->description= "Reassigns selected vertices to hook.";
- ot->idname= "OBJECT_OT_hook_assign";
+ /* XXX ModifierData *md = md_v;
+ HookModifierData *hmd = (HookModifierData*) md;
- ot->exec= hook_assign_exec;
- ot->poll= hook_poll;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ hook_select(hmd);*/
}
-/****************** explode refresh operator *********************/
-
-static int explode_refresh_poll(bContext *C)
+static void modifiers_reassignHook(bContext *C, void *ob_v, void *md_v)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_ExplodeModifier);
- ID *id= ptr.id.data;
- return (ptr.data && id && !id->lib);
+ /* XXX ModifierData *md = md_v;
+ HookModifierData *hmd = (HookModifierData*) md;
+ float cent[3];
+ int *indexar, tot, ok;
+ char name[32];
+
+ ok= hook_getIndexArray(&tot, &indexar, name, cent);
+
+ if (!ok) {
+ uiPupMenuError(C, "Requires selected vertices or active Vertex Group");
+ } else {
+ if (hmd->indexar) {
+ MEM_freeN(hmd->indexar);
+ }
+
+ VECCOPY(hmd->cent, cent);
+ hmd->indexar = indexar;
+ hmd->totindex = tot;
+ }*/
}
-static int explode_refresh_exec(bContext *C, wmOperator *op)
+void modifiers_explodeFacepa(bContext *C, void *arg1, void *arg2)
{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_ExplodeModifier);
- Object *ob= ptr.id.data;
- ExplodeModifierData *emd= ptr.data;
+ ExplodeModifierData *emd=arg1;
emd->flag |= eExplodeFlag_CalcFaces;
-
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
-
- return OPERATOR_FINISHED;
}
-void OBJECT_OT_explode_refresh(wmOperatorType *ot)
+void modifiers_explodeDelVg(bContext *C, void *arg1, void *arg2)
{
- ot->name= "Explode Refresh";
- ot->description= "Refresh data in the Explode modifier.";
- ot->idname= "OBJECT_OT_explode_refresh";
-
- ot->exec= explode_refresh_exec;
- ot->poll= explode_refresh_poll;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+ ExplodeModifierData *emd=arg1;
+ emd->vgroup = 0;
}
+#endif
+
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index bb8c5dc292e..f2e048284f4 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -64,36 +64,14 @@
void ED_operatortypes_object(void)
{
wmOperatorType *ot;
-
- WM_operatortype_append(OBJECT_OT_location_clear);
- WM_operatortype_append(OBJECT_OT_rotation_clear);
- WM_operatortype_append(OBJECT_OT_scale_clear);
- WM_operatortype_append(OBJECT_OT_origin_clear);
- WM_operatortype_append(OBJECT_OT_visual_transform_apply);
- WM_operatortype_append(OBJECT_OT_location_apply);
- WM_operatortype_append(OBJECT_OT_scale_apply);
- WM_operatortype_append(OBJECT_OT_rotation_apply);
- WM_operatortype_append(OBJECT_OT_center_set);
WM_operatortype_append(OBJECT_OT_mode_set);
WM_operatortype_append(OBJECT_OT_editmode_toggle);
WM_operatortype_append(OBJECT_OT_posemode_toggle);
- WM_operatortype_append(OBJECT_OT_proxy_make);
- WM_operatortype_append(OBJECT_OT_restrictview_clear);
- WM_operatortype_append(OBJECT_OT_restrictview_set);
- WM_operatortype_append(OBJECT_OT_shade_smooth);
- WM_operatortype_append(OBJECT_OT_shade_flat);
-
WM_operatortype_append(OBJECT_OT_parent_set);
WM_operatortype_append(OBJECT_OT_parent_clear);
- WM_operatortype_append(OBJECT_OT_vertex_parent_set);
WM_operatortype_append(OBJECT_OT_track_set);
WM_operatortype_append(OBJECT_OT_track_clear);
- WM_operatortype_append(OBJECT_OT_slow_parent_set);
- WM_operatortype_append(OBJECT_OT_slow_parent_clear);
- WM_operatortype_append(OBJECT_OT_make_local);
- WM_operatortype_append(OBJECT_OT_move_to_layer);
-
WM_operatortype_append(OBJECT_OT_select_inverse);
WM_operatortype_append(OBJECT_OT_select_random);
WM_operatortype_append(OBJECT_OT_select_all_toggle);
@@ -101,8 +79,21 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_select_by_layer);
WM_operatortype_append(OBJECT_OT_select_linked);
WM_operatortype_append(OBJECT_OT_select_grouped);
- WM_operatortype_append(OBJECT_OT_select_mirror);
-
+ WM_operatortype_append(OBJECT_OT_location_clear);
+ WM_operatortype_append(OBJECT_OT_rotation_clear);
+ WM_operatortype_append(OBJECT_OT_scale_clear);
+ WM_operatortype_append(OBJECT_OT_origin_clear);
+ WM_operatortype_append(OBJECT_OT_restrictview_clear);
+ WM_operatortype_append(OBJECT_OT_restrictview_set);
+ WM_operatortype_append(OBJECT_OT_slowparent_set);
+ WM_operatortype_append(OBJECT_OT_slowparent_clear);
+ WM_operatortype_append(OBJECT_OT_center_set);
+ WM_operatortype_append(OBJECT_OT_duplicates_make_real);
+ WM_operatortype_append(OBJECT_OT_duplicate);
+ WM_operatortype_append(OBJECT_OT_join);
+ WM_operatortype_append(OBJECT_OT_proxy_make);
+ WM_operatortype_append(OBJECT_OT_shade_smooth);
+ WM_operatortype_append(OBJECT_OT_shade_flat);
WM_operatortype_append(GROUP_OT_group_create);
WM_operatortype_append(GROUP_OT_objects_remove);
WM_operatortype_append(GROUP_OT_objects_add_active);
@@ -114,14 +105,10 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_text_add);
WM_operatortype_append(OBJECT_OT_surface_add);
WM_operatortype_append(OBJECT_OT_armature_add);
- WM_operatortype_append(OBJECT_OT_add);
+ WM_operatortype_append(OBJECT_OT_object_add);
WM_operatortype_append(OBJECT_OT_primitive_add);
WM_operatortype_append(OBJECT_OT_mesh_add);
WM_operatortype_append(OBJECT_OT_metaball_add);
- WM_operatortype_append(OBJECT_OT_duplicates_make_real);
- WM_operatortype_append(OBJECT_OT_duplicate);
- WM_operatortype_append(OBJECT_OT_join);
- WM_operatortype_append(OBJECT_OT_convert);
WM_operatortype_append(OBJECT_OT_modifier_add);
WM_operatortype_append(OBJECT_OT_modifier_remove);
@@ -131,13 +118,7 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_modifier_convert);
WM_operatortype_append(OBJECT_OT_modifier_copy);
WM_operatortype_append(OBJECT_OT_multires_subdivide);
- WM_operatortype_append(OBJECT_OT_multires_higher_levels_delete);
- WM_operatortype_append(OBJECT_OT_meshdeform_bind);
- WM_operatortype_append(OBJECT_OT_hook_reset);
- WM_operatortype_append(OBJECT_OT_hook_recenter);
- WM_operatortype_append(OBJECT_OT_hook_select);
- WM_operatortype_append(OBJECT_OT_hook_assign);
- WM_operatortype_append(OBJECT_OT_explode_refresh);
+ WM_operatortype_append(OBJECT_OT_modifier_mdef_bind);
WM_operatortype_append(OBJECT_OT_constraint_add);
WM_operatortype_append(OBJECT_OT_constraint_add_with_targets);
@@ -163,11 +144,6 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_vertex_group_deselect);
WM_operatortype_append(OBJECT_OT_vertex_group_copy_to_linked);
WM_operatortype_append(OBJECT_OT_vertex_group_copy);
- WM_operatortype_append(OBJECT_OT_vertex_group_menu);
- WM_operatortype_append(OBJECT_OT_vertex_group_set_active);
-
- WM_operatortype_append(OBJECT_OT_game_property_new);
- WM_operatortype_append(OBJECT_OT_game_property_remove);
WM_operatortype_append(OBJECT_OT_shape_key_add);
WM_operatortype_append(OBJECT_OT_shape_key_remove);
@@ -186,19 +162,10 @@ void ED_operatortypes_object(void)
void ED_keymap_object(wmWindowManager *wm)
{
ListBase *keymap= WM_keymap_listbase(wm, "Object Non-modal", 0, 0);
- wmKeymapItem *kmi;
/* Note: this keymap works disregarding mode */
WM_keymap_add_item(keymap, "OBJECT_OT_editmode_toggle", TABKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_posemode_toggle", TABKEY, KM_PRESS, KM_CTRL, 0);
-
- kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", VKEY, KM_PRESS, 0, 0);
- RNA_enum_set(kmi->ptr, "mode", OB_MODE_VERTEX_PAINT);
- RNA_boolean_set(kmi->ptr, "toggle", 1);
- kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, KM_CTRL, 0);
- RNA_enum_set(kmi->ptr, "mode", OB_MODE_WEIGHT_PAINT);
- RNA_boolean_set(kmi->ptr, "toggle", 1);
-
WM_keymap_add_item(keymap, "OBJECT_OT_center_set", CKEY, KM_PRESS, KM_ALT|KM_SHIFT|KM_CTRL, 0);
/* Note: this keymap gets disabled in non-objectmode, */
@@ -208,7 +175,6 @@ void ED_keymap_object(wmWindowManager *wm)
WM_keymap_add_item(keymap, "OBJECT_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_select_linked", LKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "OBJECT_OT_select_mirror", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
WM_keymap_verify_item(keymap, "OBJECT_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_verify_item(keymap, "OBJECT_OT_parent_clear", PKEY, KM_PRESS, KM_ALT, 0);
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
deleted file mode 100644
index 12cb2b95e06..00000000000
--- a/source/blender/editors/object/object_relations.c
+++ /dev/null
@@ -1,1765 +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., 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.
- *
- * Contributor(s): Blender Foundation, 2002-2008 full recode
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "DNA_anim_types.h"
-#include "DNA_armature_types.h"
-#include "DNA_camera_types.h"
-#include "DNA_constraint_types.h"
-#include "DNA_curve_types.h"
-#include "DNA_group_types.h"
-#include "DNA_lamp_types.h"
-#include "DNA_lattice_types.h"
-#include "DNA_material_types.h"
-#include "DNA_mesh_types.h"
-#include "DNA_meta_types.h"
-#include "DNA_object_types.h"
-#include "DNA_particle_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_view3d_types.h"
-#include "DNA_world_types.h"
-
-#include "BLI_arithb.h"
-#include "BLI_editVert.h"
-#include "BLI_listbase.h"
-#include "BLI_string.h"
-
-#include "BKE_action.h"
-#include "BKE_animsys.h"
-#include "BKE_armature.h"
-#include "BKE_context.h"
-#include "BKE_constraint.h"
-#include "BKE_curve.h"
-#include "BKE_depsgraph.h"
-#include "BKE_displist.h"
-#include "BKE_global.h"
-#include "BKE_lattice.h"
-#include "BKE_library.h"
-#include "BKE_main.h"
-#include "BKE_material.h"
-#include "BKE_mball.h"
-#include "BKE_mesh.h"
-#include "BKE_modifier.h"
-#include "BKE_object.h"
-#include "BKE_report.h"
-#include "BKE_sca.h"
-#include "BKE_texture.h"
-#include "BKE_utildefines.h"
-
-#include "WM_api.h"
-#include "WM_types.h"
-
-#include "UI_interface.h"
-#include "UI_resources.h"
-
-#include "RNA_access.h"
-#include "RNA_define.h"
-
-#include "ED_anim_api.h"
-#include "ED_armature.h"
-#include "ED_curve.h"
-#include "ED_object.h"
-#include "ED_screen.h"
-
-#include "object_intern.h"
-
-/* ************* XXX **************** */
-static int pupmenu(const char *msg) {return 0;}
-static int pupmenu_col(const char *msg, int val) {return 0;}
-
-/*********************** Make Vertex Parent Operator ************************/
-
-static int vertex_parent_set_poll(bContext *C)
-{
- return ED_operator_editmesh(C) || ED_operator_editsurfcurve(C) || ED_operator_editlattice(C);
-}
-
-static int vertex_parent_set_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
- EditVert *eve;
- Curve *cu;
- Nurb *nu;
- BezTriple *bezt;
- BPoint *bp;
- Object *par;
- int a, v1=0, v2=0, v3=0, v4=0, nr=1;
-
- /* we need 1 to 3 selected vertices */
-
- if(obedit->type==OB_MESH) {
- Mesh *me= obedit->data;
- EditMesh *em = BKE_mesh_get_editmesh(me);
-
- eve= em->verts.first;
- while(eve) {
- if(eve->f & 1) {
- if(v1==0) v1= nr;
- else if(v2==0) v2= nr;
- else if(v3==0) v3= nr;
- else if(v4==0) v4= nr;
- else break;
- }
- nr++;
- eve= eve->next;
- }
-
- BKE_mesh_end_editmesh(me, em);
- }
- else if(ELEM(obedit->type, OB_SURF, OB_CURVE)) {
- ListBase *editnurb= curve_get_editcurve(obedit);
-
- cu= obedit->data;
-
- nu= editnurb->first;
- while(nu) {
- if(nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
- while(a--) {
- if(BEZSELECTED_HIDDENHANDLES(cu, bezt)) {
- if(v1==0) v1= nr;
- else if(v2==0) v2= nr;
- else if(v3==0) v3= nr;
- else if(v4==0) v4= nr;
- else break;
- }
- nr++;
- bezt++;
- }
- }
- else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
- while(a--) {
- if(bp->f1 & SELECT) {
- if(v1==0) v1= nr;
- else if(v2==0) v2= nr;
- else if(v3==0) v3= nr;
- else if(v4==0) v4= nr;
- else break;
- }
- nr++;
- bp++;
- }
- }
- nu= nu->next;
- }
- }
- else if(obedit->type==OB_LATTICE) {
- Lattice *lt= obedit->data;
-
- a= lt->editlatt->pntsu*lt->editlatt->pntsv*lt->editlatt->pntsw;
- bp= lt->editlatt->def;
- while(a--) {
- if(bp->f1 & SELECT) {
- if(v1==0) v1= nr;
- else if(v2==0) v2= nr;
- else if(v3==0) v3= nr;
- else if(v4==0) v4= nr;
- else break;
- }
- nr++;
- bp++;
- }
- }
-
- if(v4 || !((v1 && v2==0 && v3==0) || (v1 && v2 && v3)) ) {
- BKE_report(op->reports, RPT_ERROR, "Select either 1 or 3 vertices to parent to");
- return OPERATOR_CANCELLED;
- }
-
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(ob != obedit) {
- ob->recalc |= OB_RECALC;
- par= obedit->parent;
-
- while(par) {
- if(par==ob) break;
- par= par->parent;
- }
- if(par) {
- BKE_report(op->reports, RPT_ERROR, "Loop in parents");
- }
- else {
- Object workob;
-
- ob->parent= BASACT->object;
- if(v3) {
- ob->partype= PARVERT3;
- ob->par1= v1-1;
- ob->par2= v2-1;
- ob->par3= v3-1;
-
- /* inverse parent matrix */
- what_does_parent(scene, ob, &workob);
- Mat4Invert(ob->parentinv, workob.obmat);
- }
- else {
- ob->partype= PARVERT1;
- ob->par1= v1-1;
-
- /* inverse parent matrix */
- what_does_parent(scene, ob, &workob);
- Mat4Invert(ob->parentinv, workob.obmat);
- }
- }
- }
- }
- CTX_DATA_END;
-
- DAG_scene_sort(scene);
-
- WM_event_add_notifier(C, NC_OBJECT, NULL);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_vertex_parent_set(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Make Vertex Parent";
- ot->description = "Parent selected objects to the selected vertices.";
- ot->idname= "OBJECT_OT_vertex_parent_set";
-
- /* api callbacks */
- ot->poll= vertex_parent_set_poll;
- ot->exec= vertex_parent_set_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-/********************** Make Proxy Operator *************************/
-
-/* present menu listing the possible objects within the group to proxify */
-static void proxy_group_objects_menu (bContext *C, wmOperator *op, Object *ob, Group *group)
-{
- uiPopupMenu *pup;
- uiLayout *layout;
- GroupObject *go;
- int len=0;
-
- /* check if there are any objects within the group to assign for */
- for (go= group->gobject.first; go; go= go->next) {
- if (go->ob) len++;
- }
- if (len==0) return;
-
- /* now create the menu to draw */
- pup= uiPupMenuBegin(C, "Make Proxy For:", 0);
- layout= uiPupMenuLayout(pup);
-
- for (go= group->gobject.first; go; go= go->next) {
- if (go->ob) {
- PointerRNA props_ptr;
-
- /* create operator menu item with relevant properties filled in */
- props_ptr= uiItemFullO(layout, go->ob->id.name+2, 0, op->idname, NULL, WM_OP_EXEC_REGION_WIN, UI_ITEM_O_RETURN_PROPS);
- RNA_string_set(&props_ptr, "object", go->ob->id.name+2);
- RNA_string_set(&props_ptr, "group_object", go->ob->id.name+2);
- }
- }
-
- /* display the menu, and be done */
- uiPupMenuEnd(C, pup);
-}
-
-/* set the object to proxify */
-static int make_proxy_invoke (bContext *C, wmOperator *op, wmEvent *evt)
-{
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_active_object(C);
-
- /* sanity checks */
- if (!scene || scene->id.lib || !ob)
- return OPERATOR_CANCELLED;
-
- /* Get object to work on - use a menu if we need to... */
- if (ob->dup_group && ob->dup_group->id.lib) {
- /* gives menu with list of objects in group */
- proxy_group_objects_menu(C, op, ob, ob->dup_group);
- }
- else if (ob->id.lib) {
- uiPopupMenu *pup= uiPupMenuBegin(C, "OK?", ICON_QUESTION);
- uiLayout *layout= uiPupMenuLayout(pup);
- PointerRNA props_ptr;
-
- /* create operator menu item with relevant properties filled in */
- props_ptr= uiItemFullO(layout, op->type->name, 0, op->idname, NULL, WM_OP_EXEC_REGION_WIN, UI_ITEM_O_RETURN_PROPS);
- RNA_string_set(&props_ptr, "object", ob->id.name+2);
-
- /* present the menu and be done... */
- uiPupMenuEnd(C, pup);
- }
- else {
- /* error.. cannot continue */
- BKE_report(op->reports, RPT_ERROR, "Can only make proxy for a referenced object or group");
- }
-
- /* this invoke just calls another instance of this operator... */
- return OPERATOR_CANCELLED;
-}
-
-static int make_proxy_exec (bContext *C, wmOperator *op)
-{
- Object *ob=NULL, *gob=NULL;
- Scene *scene= CTX_data_scene(C);
- char ob_name[21], gob_name[21];
-
- /* get object and group object
- * - firstly names
- * - then pointers from context
- */
- RNA_string_get(op->ptr, "object", ob_name);
- RNA_string_get(op->ptr, "group_object", gob_name);
-
- if (gob_name[0]) {
- Group *group;
- GroupObject *go;
-
- /* active object is group object... */
- // FIXME: we should get the nominated name instead
- gob= CTX_data_active_object(C);
- group= gob->dup_group;
-
- /* find the object to affect */
- for (go= group->gobject.first; go; go= go->next) {
- if ((go->ob) && strcmp(go->ob->id.name+2, gob_name)==0) {
- ob= go->ob;
- break;
- }
- }
- }
- else {
- /* just use the active object for now */
- // FIXME: we should get the nominated name instead
- ob= CTX_data_active_object(C);
- }
-
- if (ob) {
- Object *newob;
- Base *newbase, *oldbase= BASACT;
- char name[32];
-
- /* Add new object for the proxy */
- newob= add_object(scene, OB_EMPTY);
- if (gob)
- strcpy(name, gob->id.name+2);
- else
- strcpy(name, ob->id.name+2);
- strcat(name, "_proxy");
- rename_id(&newob->id, name);
-
- /* set layers OK */
- newbase= BASACT; /* add_object sets active... */
- newbase->lay= oldbase->lay;
- newob->lay= newbase->lay;
-
- /* remove base, leave user count of object, it gets linked in object_make_proxy */
- if (gob==NULL) {
- BLI_remlink(&scene->base, oldbase);
- MEM_freeN(oldbase);
- }
-
- object_make_proxy(newob, ob, gob);
-
- /* depsgraph flushes are needed for the new data */
- DAG_scene_sort(scene);
- DAG_id_flush_update(&newob->id, OB_RECALC);
-
- WM_event_add_notifier(C, NC_OBJECT, NULL);
- }
- else {
- BKE_report(op->reports, RPT_ERROR, "No object to make proxy for");
- return OPERATOR_CANCELLED;
- }
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_proxy_make (wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Make Proxy";
- ot->idname= "OBJECT_OT_proxy_make";
- ot->description= "Add empty object to become local replacement data of a library-linked object";
-
- /* callbacks */
- ot->invoke= make_proxy_invoke;
- ot->exec= make_proxy_exec;
- ot->poll= ED_operator_object_active;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- RNA_def_string(ot->srna, "object", "", 19, "Proxy Object", "Name of lib-linked/grouped object to make a proxy for.");
- RNA_def_string(ot->srna, "group_object", "", 19, "Group Object", "Name of group instancer (if applicable).");
-}
-
-/********************** Clear Parent Operator ******************* */
-
-static EnumPropertyItem prop_clear_parent_types[] = {
- {0, "CLEAR", 0, "Clear Parent", ""},
- {1, "CLEAR_KEEP_TRANSFORM", 0, "Clear and Keep Transformation (Clear Track)", ""},
- {2, "CLEAR_INVERSE", 0, "Clear Parent Inverse", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-/* note, poll should check for editable scene */
-static int parent_clear_exec(bContext *C, wmOperator *op)
-{
- int type= RNA_enum_get(op->ptr, "type");
-
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
-
- if(type == 0) {
- ob->parent= NULL;
- }
- else if(type == 1) {
- ob->parent= NULL;
- ob->track= NULL;
- ED_object_apply_obmat(ob);
- }
- else if(type == 2)
- Mat4One(ob->parentinv);
-
- ob->recalc |= OB_RECALC;
- }
- CTX_DATA_END;
-
- DAG_scene_sort(CTX_data_scene(C));
- ED_anim_dag_flush_update(C);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_parent_clear(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Clear Parent";
- ot->description = "Clear the object's parenting.";
- ot->idname= "OBJECT_OT_parent_clear";
-
- /* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= parent_clear_exec;
-
- ot->poll= ED_operator_object_active;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_enum(ot->srna, "type", prop_clear_parent_types, 0, "Type", "");
-}
-
-/* ******************** Make Parent Operator *********************** */
-
-#define PAR_OBJECT 0
-#define PAR_ARMATURE 1
-#define PAR_ARMATURE_NAME 2
-#define PAR_ARMATURE_ENVELOPE 3
-#define PAR_ARMATURE_AUTO 4
-#define PAR_BONE 5
-#define PAR_CURVE 6
-#define PAR_FOLLOW 7
-#define PAR_PATH_CONST 8
-#define PAR_LATTICE 9
-#define PAR_VERTEX 10
-#define PAR_TRIA 11
-
-static EnumPropertyItem prop_make_parent_types[] = {
- {PAR_OBJECT, "OBJECT", 0, "Object", ""},
- {PAR_ARMATURE, "ARMATURE", 0, "Armature Deform", ""},
- {PAR_ARMATURE_NAME, "ARMATURE_NAME", 0, " With Empty Groups", ""},
- {PAR_ARMATURE_AUTO, "ARMATURE_AUTO", 0, " With Automatic Weights", ""},
- {PAR_ARMATURE_ENVELOPE, "ARMATURE_ENVELOPE", 0, " With Envelope Weights", ""},
- {PAR_BONE, "BONE", 0, "Bone", ""},
- {PAR_CURVE, "CURVE", 0, "Curve Deform", ""},
- {PAR_FOLLOW, "FOLLOW", 0, "Follow Path", ""},
- {PAR_PATH_CONST, "PATH_CONST", 0, "Path Constraint", ""},
- {PAR_LATTICE, "LATTICE", 0, "Lattice Deform", ""},
- {PAR_VERTEX, "VERTEX", 0, "Vertex", ""},
- {PAR_TRIA, "TRIA", 0, "Triangle", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-static int test_parent_loop(Object *par, Object *ob)
-{
- /* test if 'ob' is a parent somewhere in par's parents */
-
- if(par == NULL) return 0;
- if(ob == par) return 1;
-
- return test_parent_loop(par->parent, ob);
-}
-
-void ED_object_parent(Object *ob, Object *par, int type, const char *substr)
-{
- if(!par || test_parent_loop(par, ob)) {
- ob->parent= NULL;
- ob->partype= PAROBJECT;
- ob->parsubstr[0]= 0;
- return;
- }
-
- /* this could use some more checks */
-
- ob->parent= par;
- ob->partype &= ~PARTYPE;
- ob->partype |= type;
- BLI_strncpy(ob->parsubstr, substr, sizeof(ob->parsubstr));
-}
-
-static int parent_set_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- Object *par= CTX_data_active_object(C);
- bPoseChannel *pchan= NULL;
- int partype= RNA_enum_get(op->ptr, "type");
- int pararm= ELEM4(partype, PAR_ARMATURE, PAR_ARMATURE_NAME, PAR_ARMATURE_ENVELOPE, PAR_ARMATURE_AUTO);
-
- par->recalc |= OB_RECALC_OB;
-
- /* preconditions */
- if(partype==PAR_FOLLOW || partype==PAR_PATH_CONST) {
- if(par->type!=OB_CURVE)
- return OPERATOR_CANCELLED;
- else {
- Curve *cu= par->data;
-
- if((cu->flag & CU_PATH)==0) {
- cu->flag |= CU_PATH|CU_FOLLOW;
- makeDispListCurveTypes(scene, par, 0); /* force creation of path data */
- }
- else cu->flag |= CU_FOLLOW;
-
- /* fall back on regular parenting now */
- partype= PAR_OBJECT;
- }
- }
- else if(partype==PAR_BONE) {
- pchan= get_active_posechannel(par);
-
- if(pchan==NULL) {
- BKE_report(op->reports, RPT_ERROR, "No active Bone");
- return OPERATOR_CANCELLED;
- }
- }
-
- /* context itterator */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
-
- if(ob!=par) {
-
- if( test_parent_loop(par, ob) ) {
- BKE_report(op->reports, RPT_ERROR, "Loop in parents");
- }
- else {
- Object workob;
-
- /* apply transformation of previous parenting */
- ED_object_apply_obmat(ob);
-
- ob->parent= par;
-
- /* handle types */
- if (pchan)
- strcpy (ob->parsubstr, pchan->name);
- else
- ob->parsubstr[0]= 0;
-
- /* constraint */
- if(partype==PAR_PATH_CONST) {
- bConstraint *con;
- bFollowPathConstraint *data;
- float cmat[4][4], vec[3];
-
- con = add_new_constraint(CONSTRAINT_TYPE_FOLLOWPATH);
- strcpy (con->name, "AutoPath");
-
- data = con->data;
- data->tar = par;
-
- add_constraint_to_object(con, ob);
-
- get_constraint_target_matrix(con, 0, CONSTRAINT_OBTYPE_OBJECT, NULL, cmat, scene->r.cfra - give_timeoffset(ob));
- VecSubf(vec, ob->obmat[3], cmat[3]);
-
- ob->loc[0] = vec[0];
- ob->loc[1] = vec[1];
- }
- else if(pararm && ob->type==OB_MESH && par->type == OB_ARMATURE) {
- if(partype == PAR_ARMATURE_NAME)
- create_vgroups_from_armature(scene, ob, par, ARM_GROUPS_NAME);
- else if(partype == PAR_ARMATURE_ENVELOPE)
- create_vgroups_from_armature(scene, ob, par, ARM_GROUPS_ENVELOPE);
- else if(partype == PAR_ARMATURE_AUTO)
- create_vgroups_from_armature(scene, ob, par, ARM_GROUPS_AUTO);
-
- /* get corrected inverse */
- ob->partype= PAROBJECT;
- what_does_parent(scene, ob, &workob);
-
- ob->partype= PARSKEL;
-
- Mat4Invert(ob->parentinv, workob.obmat);
- }
- else {
- /* calculate inverse parent matrix */
- what_does_parent(scene, ob, &workob);
- Mat4Invert(ob->parentinv, workob.obmat);
- }
-
- ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA;
-
- if( ELEM(partype, PAR_CURVE, PAR_LATTICE) || pararm )
- ob->partype= PARSKEL; /* note, dna define, not operator property */
- else
- ob->partype= PAROBJECT; /* note, dna define, not operator property */
- }
- }
- }
- CTX_DATA_END;
-
- DAG_scene_sort(CTX_data_scene(C));
- ED_anim_dag_flush_update(C);
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
-
- return OPERATOR_FINISHED;
-}
-
-static int parent_set_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
- Object *ob= CTX_data_active_object(C);
- uiPopupMenu *pup= uiPupMenuBegin(C, "Set Parent To", 0);
- uiLayout *layout= uiPupMenuLayout(pup);
-
- uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
- uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_OBJECT);
-
- /* ob becomes parent, make the associated menus */
- if(ob->type==OB_ARMATURE) {
- uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_ARMATURE);
- uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_ARMATURE_NAME);
- uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_ARMATURE_ENVELOPE);
- uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_ARMATURE_AUTO);
- uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_BONE);
- }
- else if(ob->type==OB_CURVE) {
- uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_CURVE);
- uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_FOLLOW);
- uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_PATH_CONST);
- }
- else if(ob->type == OB_LATTICE) {
- uiItemEnumO(layout, NULL, 0, "OBJECT_OT_parent_set", "type", PAR_LATTICE);
- }
-
- uiPupMenuEnd(C, pup);
-
- return OPERATOR_CANCELLED;
-}
-
-
-void OBJECT_OT_parent_set(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Make Parent";
- ot->description = "Set the object's parenting.";
- ot->idname= "OBJECT_OT_parent_set";
-
- /* api callbacks */
- ot->invoke= parent_set_invoke;
- ot->exec= parent_set_exec;
-
- ot->poll= ED_operator_object_active;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_enum(ot->srna, "type", prop_make_parent_types, 0, "Type", "");
-}
-
-/************************ Clear Slow Parent Operator *********************/
-
-static int object_slow_parent_clear_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
-
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(ob->parent) {
- if(ob->partype & PARSLOW) {
- ob->partype -= PARSLOW;
- where_is_object(scene, ob);
- ob->partype |= PARSLOW;
- ob->recalc |= OB_RECALC_OB;
- }
- }
- }
- CTX_DATA_END;
-
- ED_anim_dag_flush_update(C);
- WM_event_add_notifier(C, NC_SCENE, scene);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_slow_parent_clear(wmOperatorType *ot)
-{
-
- /* identifiers */
- ot->name= "Clear Slow Parent";
- ot->description = "Clear the object's slow parent.";
- ot->idname= "OBJECT_OT_slow_parent_clear";
-
- /* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= object_slow_parent_clear_exec;
- ot->poll= ED_operator_view3d_active;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-/********************** Make Slow Parent Operator *********************/
-
-static int object_slow_parent_set_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
-
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(ob->parent)
- ob->partype |= PARSLOW;
-
- ob->recalc |= OB_RECALC_OB;
-
- }
- CTX_DATA_END;
-
- ED_anim_dag_flush_update(C);
- WM_event_add_notifier(C, NC_SCENE, scene);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_slow_parent_set(wmOperatorType *ot)
-{
-
- /* identifiers */
- ot->name= "Set Slow Parent";
- ot->description = "Set the object's slow parent.";
- ot->idname= "OBJECT_OT_slow_parent_set";
-
- /* api callbacks */
- ot->invoke= WM_operator_confirm;
- ot->exec= object_slow_parent_set_exec;
- ot->poll= ED_operator_view3d_active;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-/* ******************** Clear Track Operator ******************* */
-
-static EnumPropertyItem prop_clear_track_types[] = {
- {0, "CLEAR", 0, "Clear Track", ""},
- {1, "CLEAR_KEEP_TRANSFORM", 0, "Clear and Keep Transformation (Clear Track)", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-/* note, poll should check for editable scene */
-static int object_track_clear_exec(bContext *C, wmOperator *op)
-{
- int type= RNA_enum_get(op->ptr, "type");
-
- if(CTX_data_edit_object(C)) {
- BKE_report(op->reports, RPT_ERROR, "Operation cannot be performed in EditMode");
- return OPERATOR_CANCELLED;
- }
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- ob->track= NULL;
- ob->recalc |= OB_RECALC;
-
- if(type == 1)
- ED_object_apply_obmat(ob);
- }
- CTX_DATA_END;
-
- DAG_scene_sort(CTX_data_scene(C));
- ED_anim_dag_flush_update(C);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_track_clear(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Clear track";
- ot->description = "Clear tracking constraint or flag from object.";
- ot->idname= "OBJECT_OT_track_clear";
-
- /* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_track_clear_exec;
-
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_enum(ot->srna, "type", prop_clear_track_types, 0, "Type", "");
-}
-
-/************************** Make Track Operator *****************************/
-
-static EnumPropertyItem prop_make_track_types[] = {
- {1, "TRACKTO", 0, "TrackTo Constraint", ""},
- {2, "LOCKTRACK", 0, "LockTrack Constraint", ""},
- {3, "OLDTRACK", 0, "Old Track", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-static int track_set_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- int type= RNA_enum_get(op->ptr, "type");
-
- if(type == 1) {
- bConstraint *con;
- bTrackToConstraint *data;
-
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- if(base!=BASACT) {
- con = add_new_constraint(CONSTRAINT_TYPE_TRACKTO);
- strcpy (con->name, "AutoTrack");
-
- data = con->data;
- data->tar = BASACT->object;
- base->object->recalc |= OB_RECALC;
-
- /* Lamp and Camera track differently by default */
- if (base->object->type == OB_LAMP || base->object->type == OB_CAMERA) {
- data->reserved1 = TRACK_nZ;
- data->reserved2 = UP_Y;
- }
-
- add_constraint_to_object(con, base->object);
- }
- }
- CTX_DATA_END;
- }
- else if(type == 2) {
- bConstraint *con;
- bLockTrackConstraint *data;
-
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- if(base!=BASACT) {
- con = add_new_constraint(CONSTRAINT_TYPE_LOCKTRACK);
- strcpy (con->name, "AutoTrack");
-
- data = con->data;
- data->tar = BASACT->object;
- base->object->recalc |= OB_RECALC;
-
- /* Lamp and Camera track differently by default */
- if (base->object->type == OB_LAMP || base->object->type == OB_CAMERA) {
- data->trackflag = TRACK_nZ;
- data->lockflag = LOCK_Y;
- }
-
- add_constraint_to_object(con, base->object);
- }
- }
- CTX_DATA_END;
- }
- else {
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- if(base!=BASACT) {
- base->object->track= BASACT->object;
- base->object->recalc |= OB_RECALC;
- }
- }
- CTX_DATA_END;
- }
- DAG_scene_sort(CTX_data_scene(C));
- ED_anim_dag_flush_update(C);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_track_set(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Make Track";
- ot->description = "Make the object track another object, either by constraint or old way or locked track.";
- ot->idname= "OBJECT_OT_track_set";
-
- /* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= track_set_exec;
-
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- RNA_def_enum(ot->srna, "type", prop_make_track_types, 0, "Type", "");
-}
-
-/************************** Move to Layer Operator *****************************/
-
-static unsigned int move_to_layer_init(bContext *C, wmOperator *op)
-{
- int values[20], a;
- unsigned int lay= 0;
-
- if(!RNA_property_is_set(op->ptr, "layer")) {
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- lay |= base->lay;
- }
- CTX_DATA_END;
-
- for(a=0; a<20; a++)
- values[a]= (lay & (1<<a));
-
- RNA_boolean_set_array(op->ptr, "layer", values);
- }
- else {
- RNA_boolean_get_array(op->ptr, "layer", values);
-
- for(a=0; a<20; a++)
- if(values[a])
- lay |= (1 << a);
- }
-
- return lay;
-}
-
-static int move_to_layer_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
- move_to_layer_init(C, op);
- return WM_operator_props_popup(C, op, event);
-}
-
-static int move_to_layer_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- View3D *v3d= CTX_wm_view3d(C);
- unsigned int lay, local;
- int islamp= 0;
-
- lay= move_to_layer_init(C, op);
- lay &= 0xFFFFFF;
-
- if(lay==0) return OPERATOR_CANCELLED;
-
- if(v3d && v3d->localview) {
- /* now we can move out of localview. */
- // XXX if (!okee("Move from localview")) return;
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- lay= base->lay & ~v3d->lay;
- base->lay= lay;
- base->object->lay= lay;
- base->object->flag &= ~SELECT;
- base->flag &= ~SELECT;
- if(base->object->type==OB_LAMP) islamp= 1;
- }
- CTX_DATA_END;
- }
- else {
- /* normal non localview operation */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- /* upper byte is used for local view */
- local= base->lay & 0xFF000000;
- base->lay= lay + local;
- base->object->lay= lay;
- if(base->object->type==OB_LAMP) islamp= 1;
- }
- CTX_DATA_END;
- }
-
- if(islamp) reshadeall_displist(scene); /* only frees */
-
- /* warning, active object may be hidden now */
-
- WM_event_add_notifier(C, NC_SCENE, scene);
- DAG_scene_sort(scene);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_move_to_layer(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Move to Layer";
- ot->description = "Move the object to different layers.";
- ot->idname= "OBJECT_OT_move_to_layer";
-
- /* api callbacks */
- ot->invoke= move_to_layer_invoke;
- ot->exec= move_to_layer_exec;
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- RNA_def_boolean_layer_member(ot->srna, "layer", 20, NULL, "Layer", "");
-}
-
-/************************** Link to Scene Operator *****************************/
-
-void link_to_scene(unsigned short nr)
-{
-#if 0
- Scene *sce= (Scene*) BLI_findlink(&G.main->scene, G.curscreen->scenenr-1);
- Base *base, *nbase;
-
- if(sce==0) return;
- if(sce->id.lib) return;
-
- for(base= FIRSTBASE; base; base= base->next) {
- if(TESTBASE(v3d, base)) {
-
- nbase= MEM_mallocN( sizeof(Base), "newbase");
- *nbase= *base;
- BLI_addhead( &(sce->base), nbase);
- id_us_plus((ID *)base->object);
- }
- }
-#endif
-}
-
-
-void make_links(bContext *C, wmOperator *op, Scene *scene, View3D *v3d, short event)
-{
- Object *ob, *obt;
- Base *base, *nbase, *sbase;
- Scene *sce = NULL;
- ID *id;
- int a;
- short nr=0;
- char *strp;
-
- if(!(ob=OBACT)) return;
-
- if(event==1) {
- IDnames_to_pupstring(&strp, NULL, NULL, &(G.main->scene), 0, &nr);
-
- if(nr == -2) {
- MEM_freeN(strp);
-
-// XXX activate_databrowse((ID *)scene, ID_SCE, 0, B_INFOSCE, &(G.curscreen->scenenr), link_to_scene );
-
- return;
- }
- else {
- event= pupmenu_col(strp, 20);
- MEM_freeN(strp);
-
- if(event<= 0) return;
-
- nr= 1;
- sce= G.main->scene.first;
- while(sce) {
- if(nr==event) break;
- nr++;
- sce= sce->id.next;
- }
- if(sce==scene) {
- BKE_report(op->reports, RPT_ERROR, "This is the current scene");
- return;
- }
- if(sce==0 || sce->id.lib) return;
-
- /* remember: is needed below */
- event= 1;
- }
- }
-
- /* All non group linking */
- for(base= FIRSTBASE; base; base= base->next) {
- if(event==1 || base != BASACT) {
-
- obt= base->object;
-
- if(TESTBASE(v3d, base)) {
-
- if(event==1) { /* to scene */
-
- /* test if already linked */
- sbase= sce->base.first;
- while(sbase) {
- if(sbase->object==base->object) break;
- sbase= sbase->next;
- }
- if(sbase) { /* remove */
- continue;
- }
-
- nbase= MEM_mallocN( sizeof(Base), "newbase");
- *nbase= *base;
- BLI_addhead( &(sce->base), nbase);
- id_us_plus((ID *)base->object);
- }
- }
- if(TESTBASELIB(v3d, base)) {
- if(event==2 || event==5) { /* obdata */
- if(ob->type==obt->type) {
-
- id= obt->data;
- id->us--;
-
- id= ob->data;
- id_us_plus(id);
- obt->data= id;
-
- /* if amount of material indices changed: */
- test_object_materials(obt->data);
-
- obt->recalc |= OB_RECALC_DATA;
- }
- }
- else if(event==4) { /* ob ipo */
-#if 0 // XXX old animation system
- if(obt->ipo) obt->ipo->id.us--;
- obt->ipo= ob->ipo;
- if(obt->ipo) {
- id_us_plus((ID *)obt->ipo);
- do_ob_ipo(scene, obt);
- }
-#endif // XXX old animation system
- }
- else if(event==6) {
- if(ob->dup_group) ob->dup_group->id.us--;
- obt->dup_group= ob->dup_group;
- if(obt->dup_group) {
- id_us_plus((ID *)obt->dup_group);
- obt->transflag |= OB_DUPLIGROUP;
- }
- }
- else if(event==3) { /* materials */
-
- /* new approach, using functions from kernel */
- for(a=0; a<ob->totcol; a++) {
- Material *ma= give_current_material(ob, a+1);
- assign_material(obt, ma, a+1); /* also works with ma==NULL */
- }
- }
- }
- }
- }
-
- ED_anim_dag_flush_update(C);
-
-}
-
-void make_links_menu(bContext *C, Scene *scene, View3D *v3d)
-{
- Object *ob;
- short event=0;
- char str[140];
-
- if(!(ob=OBACT)) return;
-
- strcpy(str, "Make Links %t|To Scene...%x1|%l|Object Ipo%x4");
-
- if(ob->type==OB_MESH)
- strcat(str, "|Mesh Data%x2|Materials%x3");
- else if(ob->type==OB_CURVE)
- strcat(str, "|Curve Data%x2|Materials%x3");
- else if(ob->type==OB_FONT)
- strcat(str, "|Text Data%x2|Materials%x3");
- else if(ob->type==OB_SURF)
- strcat(str, "|Surface Data%x2|Materials%x3");
- else if(ob->type==OB_MBALL)
- strcat(str, "|Materials%x3");
- else if(ob->type==OB_CAMERA)
- strcat(str, "|Camera Data%x2");
- else if(ob->type==OB_LAMP)
- strcat(str, "|Lamp Data%x2");
- else if(ob->type==OB_LATTICE)
- strcat(str, "|Lattice Data%x2");
- else if(ob->type==OB_ARMATURE)
- strcat(str, "|Armature Data%x2");
-
- event= pupmenu(str);
-
- if(event<= 0) return;
-
- make_links(C, NULL, scene, v3d, event);
-}
-
-/**************************** Make Single User ********************************/
-
-static void single_object_users__forwardModifierLinks(void *userData, Object *ob, Object **obpoin)
-{
- ID_NEW(*obpoin);
-}
-
-void single_object_users(Scene *scene, View3D *v3d, int flag)
-{
- Base *base;
- Object *ob, *obn;
-
- clear_sca_new_poins(); /* sensor/contr/act */
-
- /* duplicate (must set newid) */
- for(base= FIRSTBASE; base; base= base->next) {
- ob= base->object;
-
- if( (base->flag & flag)==flag ) {
- if(ob->id.lib==NULL && ob->id.us>1) {
- /* base gets copy of object */
- obn= copy_object(ob);
- base->object= obn;
- ob->id.us--;
- }
- }
- }
-
- ID_NEW(scene->camera);
- if(v3d) ID_NEW(v3d->camera);
-
- /* object pointers */
- for(base= FIRSTBASE; base; base= base->next) {
- ob= base->object;
- if(ob->id.lib==NULL) {
- relink_constraints(&base->object->constraints);
- if (base->object->pose){
- bPoseChannel *chan;
- for (chan = base->object->pose->chanbase.first; chan; chan=chan->next){
- relink_constraints(&chan->constraints);
- }
- }
- modifiers_foreachObjectLink(base->object, single_object_users__forwardModifierLinks, NULL);
-
- ID_NEW(ob->parent);
- ID_NEW(ob->track);
- }
- }
-
- set_sca_new_poins();
-}
-
-void new_id_matar(Material **matar, int totcol)
-{
- ID *id;
- int a;
-
- for(a=0; a<totcol; a++) {
- id= (ID *)matar[a];
- if(id && id->lib==0) {
- if(id->newid) {
- matar[a]= (Material *)id->newid;
- id_us_plus(id->newid);
- id->us--;
- }
- else if(id->us>1) {
- matar[a]= copy_material(matar[a]);
- id->us--;
- id->newid= (ID *)matar[a];
- }
- }
- }
-}
-
-void single_obdata_users(Scene *scene, int flag)
-{
- Object *ob;
- Lamp *la;
- Curve *cu;
- //Camera *cam;
- Base *base;
- Mesh *me;
- ID *id;
- int a;
-
- for(base= FIRSTBASE; base; base= base->next) {
- ob= base->object;
- if(ob->id.lib==NULL && (base->flag & flag)==flag ) {
- id= ob->data;
-
- if(id && id->us>1 && id->lib==0) {
- ob->recalc= OB_RECALC_DATA;
-
- switch(ob->type) {
- case OB_LAMP:
- if(id && id->us>1 && id->lib==NULL) {
- ob->data= la= copy_lamp(ob->data);
- for(a=0; a<MAX_MTEX; a++) {
- if(la->mtex[a]) {
- ID_NEW(la->mtex[a]->object);
- }
- }
- }
- break;
- case OB_CAMERA:
- ob->data= copy_camera(ob->data);
- break;
- case OB_MESH:
- me= ob->data= copy_mesh(ob->data);
- //if(me && me->key)
- // ipo_idnew(me->key->ipo); /* drivers */
- break;
- case OB_MBALL:
- ob->data= copy_mball(ob->data);
- break;
- case OB_CURVE:
- case OB_SURF:
- case OB_FONT:
- ob->data= cu= copy_curve(ob->data);
- ID_NEW(cu->bevobj);
- ID_NEW(cu->taperobj);
- break;
- case OB_LATTICE:
- ob->data= copy_lattice(ob->data);
- break;
- case OB_ARMATURE:
- ob->recalc |= OB_RECALC_DATA;
- ob->data= copy_armature(ob->data);
- armature_rebuild_pose(ob, ob->data);
- break;
- default:
- printf("ERROR single_obdata_users: can't copy %s\n", id->name);
- return;
- }
-
- id->us--;
- id->newid= ob->data;
-
- }
-
-#if 0 // XXX old animation system
- id= (ID *)ob->action;
- if (id && id->us>1 && id->lib==NULL){
- if(id->newid){
- ob->action= (bAction *)id->newid;
- id_us_plus(id->newid);
- }
- else {
- ob->action= copy_action(ob->action);
- id->us--;
- id->newid=(ID *)ob->action;
- }
- }
- id= (ID *)ob->ipo;
- if(id && id->us>1 && id->lib==NULL) {
- if(id->newid) {
- ob->ipo= (Ipo *)id->newid;
- id_us_plus(id->newid);
- }
- else {
- ob->ipo= copy_ipo(ob->ipo);
- id->us--;
- id->newid= (ID *)ob->ipo;
- }
- ipo_idnew(ob->ipo); /* drivers */
- }
- /* other ipos */
- switch(ob->type) {
- case OB_LAMP:
- la= ob->data;
- if(la->ipo && la->ipo->id.us>1) {
- la->ipo->id.us--;
- la->ipo= copy_ipo(la->ipo);
- ipo_idnew(la->ipo); /* drivers */
- }
- break;
- case OB_CAMERA:
- cam= ob->data;
- if(cam->ipo && cam->ipo->id.us>1) {
- cam->ipo->id.us--;
- cam->ipo= copy_ipo(cam->ipo);
- ipo_idnew(cam->ipo); /* drivers */
- }
- break;
- }
-#endif // XXX old animation system
- }
- }
-
- me= G.main->mesh.first;
- while(me) {
- ID_NEW(me->texcomesh);
- me= me->id.next;
- }
-}
-
-void single_ipo_users(Scene *scene, int flag)
-{
-#if 0 // XXX old animation system
- Object *ob;
- Base *base;
- ID *id;
-
- for(base= FIRSTBASE; base; base= base->next) {
- ob= base->object;
- if(ob->id.lib==NULL && (flag==0 || (base->flag & SELECT)) ) {
- ob->recalc= OB_RECALC_DATA;
-
- id= (ID *)ob->ipo;
- if(id && id->us>1 && id->lib==NULL) {
- ob->ipo= copy_ipo(ob->ipo);
- id->us--;
- ipo_idnew(ob->ipo); /* drivers */
- }
- }
- }
-#endif // XXX old animation system
-}
-
-void single_mat_users(Scene *scene, int flag)
-{
- Object *ob;
- Base *base;
- Material *ma, *man;
- Tex *tex;
- int a, b;
-
- for(base= FIRSTBASE; base; base= base->next) {
- ob= base->object;
- if(ob->id.lib==NULL && (flag==0 || (base->flag & SELECT)) ) {
-
- for(a=1; a<=ob->totcol; a++) {
- ma= give_current_material(ob, a);
- if(ma) {
- /* do not test for LIB_NEW: this functions guaranteed delivers single_users! */
-
- if(ma->id.us>1) {
- man= copy_material(ma);
-
- man->id.us= 0;
- assign_material(ob, man, a);
-
-#if 0 // XXX old animation system
- if(ma->ipo) {
- man->ipo= copy_ipo(ma->ipo);
- ma->ipo->id.us--;
- ipo_idnew(ma->ipo); /* drivers */
- }
-#endif // XXX old animation system
-
- for(b=0; b<MAX_MTEX; b++) {
- if(ma->mtex[b] && ma->mtex[b]->tex) {
- tex= ma->mtex[b]->tex;
- if(tex->id.us>1) {
- ma->mtex[b]->tex= copy_texture(tex);
- tex->id.us--;
- }
- }
- }
-
- }
- }
- }
- }
- }
-}
-
-void do_single_tex_user(Tex **from)
-{
- Tex *tex, *texn;
-
- tex= *from;
- if(tex==0) return;
-
- if(tex->id.newid) {
- *from= (Tex *)tex->id.newid;
- id_us_plus(tex->id.newid);
- tex->id.us--;
- }
- else if(tex->id.us>1) {
- texn= copy_texture(tex);
- tex->id.newid= (ID *)texn;
- tex->id.us--;
- *from= texn;
- }
-}
-
-void single_tex_users_expand()
-{
- /* only when 'parent' blocks are LIB_NEW */
- Main *bmain= G.main;
- Material *ma;
- Lamp *la;
- World *wo;
- int b;
-
- for(ma= bmain->mat.first; ma; ma=ma->id.next) {
- if(ma->id.flag & LIB_NEW) {
- for(b=0; b<MAX_MTEX; b++) {
- if(ma->mtex[b] && ma->mtex[b]->tex) {
- do_single_tex_user( &(ma->mtex[b]->tex) );
- }
- }
- }
- }
-
- for(la= bmain->lamp.first; la; la=la->id.next) {
- if(la->id.flag & LIB_NEW) {
- for(b=0; b<MAX_MTEX; b++) {
- if(la->mtex[b] && la->mtex[b]->tex) {
- do_single_tex_user( &(la->mtex[b]->tex) );
- }
- }
- }
- }
-
- for(wo= bmain->world.first; wo; wo=wo->id.next) {
- if(wo->id.flag & LIB_NEW) {
- for(b=0; b<MAX_MTEX; b++) {
- if(wo->mtex[b] && wo->mtex[b]->tex) {
- do_single_tex_user( &(wo->mtex[b]->tex) );
- }
- }
- }
- }
-}
-
-static void single_mat_users_expand(void)
-{
- /* only when 'parent' blocks are LIB_NEW */
- Main *bmain= G.main;
- Object *ob;
- Mesh *me;
- Curve *cu;
- MetaBall *mb;
- Material *ma;
- int a;
-
- for(ob=bmain->object.first; ob; ob=ob->id.next)
- if(ob->id.flag & LIB_NEW)
- new_id_matar(ob->mat, ob->totcol);
-
- for(me=bmain->mesh.first; me; me=me->id.next)
- if(me->id.flag & LIB_NEW)
- new_id_matar(me->mat, me->totcol);
-
- for(cu=bmain->curve.first; cu; cu=cu->id.next)
- if(cu->id.flag & LIB_NEW)
- new_id_matar(cu->mat, cu->totcol);
-
- for(mb=bmain->mball.first; mb; mb=mb->id.next)
- if(mb->id.flag & LIB_NEW)
- new_id_matar(mb->mat, mb->totcol);
-
- /* material imats */
- for(ma=bmain->mat.first; ma; ma=ma->id.next)
- if(ma->id.flag & LIB_NEW)
- for(a=0; a<MAX_MTEX; a++)
- if(ma->mtex[a])
- ID_NEW(ma->mtex[a]->object);
-}
-
-void single_user(Scene *scene, View3D *v3d)
-{
- int nr;
-
- if(scene->id.lib) return;
-
- clear_id_newpoins();
-
- nr= pupmenu("Make Single User%t|Object|Object & ObData|Object & ObData & Materials+Tex|Materials+Tex|Ipos");
- if(nr>0) {
-
- if(nr==1) single_object_users(scene, v3d, 1);
-
- else if(nr==2) {
- single_object_users(scene, v3d, 1);
- single_obdata_users(scene, 1);
- }
- else if(nr==3) {
- single_object_users(scene, v3d, 1);
- single_obdata_users(scene, 1);
- single_mat_users(scene, 1); /* also tex */
-
- }
- else if(nr==4) {
- single_mat_users(scene, 1);
- }
- else if(nr==5) {
- single_ipo_users(scene, 1);
- }
-
-
- clear_id_newpoins();
-
- }
-}
-
-/* used for copying scenes */
-void ED_object_single_users(Scene *scene, int full)
-{
- single_object_users(scene, NULL, 0);
-
- if(full) {
- single_obdata_users(scene, 0);
- single_mat_users_expand();
- single_tex_users_expand();
- }
-
- clear_id_newpoins();
-}
-
-/******************************* Make Local ***********************************/
-
-/* helper for below, ma was checked to be not NULL */
-static void make_local_makelocalmaterial(Material *ma)
-{
- AnimData *adt;
- int b;
-
- id_make_local(&ma->id, 0);
-
- for(b=0; b<MAX_MTEX; b++)
- if(ma->mtex[b] && ma->mtex[b]->tex)
- id_make_local(&ma->mtex[b]->tex->id, 0);
-
- adt= BKE_animdata_from_id(&ma->id);
- if(adt) BKE_animdata_make_local(adt);
-
- /* nodetree? XXX */
-}
-
-static int make_local_exec(bContext *C, wmOperator *op)
-{
- AnimData *adt;
- ParticleSystem *psys;
- Material *ma, ***matarar;
- Lamp *la;
- ID *id;
- int a, b, mode= RNA_boolean_get(op->ptr, "type");
-
- if(mode==3) {
- all_local(NULL, 0); /* NULL is all libs */
- WM_event_add_notifier(C, NC_WINDOW, NULL);
- return OPERATOR_FINISHED;
- }
-
- clear_id_newpoins();
-
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(ob->id.lib)
- id_make_local(&ob->id, 0);
- }
- CTX_DATA_END;
-
- /* maybe object pointers */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(ob->id.lib==NULL) {
- ID_NEW(ob->parent);
- ID_NEW(ob->track);
- }
- }
- CTX_DATA_END;
-
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- id= ob->data;
-
- if(id && mode>1) {
- id_make_local(id, 0);
- adt= BKE_animdata_from_id(id);
- if(adt) BKE_animdata_make_local(adt);
- }
-
- for(psys=ob->particlesystem.first; psys; psys=psys->next)
- id_make_local(&psys->part->id, 0);
-
- adt= BKE_animdata_from_id(&ob->id);
- if(adt) BKE_animdata_make_local(adt);
- }
- CTX_DATA_END;
-
- if(mode>1) {
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(ob->type==OB_LAMP) {
- la= ob->data;
-
- for(b=0; b<MAX_MTEX; b++)
- if(la->mtex[b] && la->mtex[b]->tex)
- id_make_local(&la->mtex[b]->tex->id, 0);
- }
- else {
- for(a=0; a<ob->totcol; a++) {
- ma= ob->mat[a];
- if(ma)
- make_local_makelocalmaterial(ma);
- }
-
- matarar= (Material ***)give_matarar(ob);
- if(matarar) {
- for(a=0; a<ob->totcol; a++) {
- ma= (*matarar)[a];
- if(ma)
- make_local_makelocalmaterial(ma);
- }
- }
- }
- }
- CTX_DATA_END;
- }
-
- WM_event_add_notifier(C, NC_WINDOW, NULL);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_make_local(wmOperatorType *ot)
-{
- static EnumPropertyItem type_items[]= {
- {1, "SELECTED_OBJECTS", 0, "Selected Objects", ""},
- {2, "SELECTED_OBJECTS_DATA", 0, "Selected Objects and Data", ""},
- {3, "ALL", 0, "All", ""},
- {0, NULL, 0, NULL, NULL}};
-
- /* identifiers */
- ot->name= "Make Local";
- ot->description = "Make library linked datablocks local to this file.";
- ot->idname= "OBJECT_OT_make_local";
-
- /* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= make_local_exec;
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "");
-}
-
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
deleted file mode 100644
index 50ba4ab2934..00000000000
--- a/source/blender/editors/object/object_select.c
+++ /dev/null
@@ -1,974 +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., 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.
- *
- * Contributor(s): Blender Foundation, 2002-2008 full recode
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "DNA_group_types.h"
-#include "DNA_material_types.h"
-#include "DNA_modifier_types.h"
-#include "DNA_object_types.h"
-#include "DNA_property_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_texture_types.h"
-
-#include "BLI_arithb.h"
-#include "BLI_listbase.h"
-#include "BLI_rand.h"
-#include "BLI_string.h"
-
-#include "BKE_context.h"
-#include "BKE_depsgraph.h"
-#include "BKE_global.h"
-#include "BKE_group.h"
-#include "BKE_main.h"
-#include "BKE_material.h"
-#include "BKE_particle.h"
-#include "BKE_property.h"
-#include "BKE_report.h"
-#include "BKE_scene.h"
-
-#include "WM_api.h"
-#include "WM_types.h"
-
-#include "ED_object.h"
-#include "ED_screen.h"
-
-#include "RNA_access.h"
-#include "RNA_define.h"
-#include "RNA_enum_types.h"
-
-#include "object_intern.h"
-
-/************************ Exported **************************/
-
-/* simple API for object selection, rather than just using the flag
- * this takes into account the 'restrict selection in 3d view' flag.
- * deselect works always, the restriction just prevents selection */
-
-/* Note: send a NC_SCENE|ND_OB_SELECT notifier yourself! */
-
-void ED_base_object_select(Base *base, short mode)
-{
- if (base) {
- if (mode==BA_SELECT) {
- if (!(base->object->restrictflag & OB_RESTRICT_SELECT))
- if (mode==BA_SELECT) base->flag |= SELECT;
- }
- else if (mode==BA_DESELECT) {
- base->flag &= ~SELECT;
- }
- base->object->flag= base->flag;
- }
-}
-
-/* also to set active NULL */
-void ED_base_object_activate(bContext *C, Base *base)
-{
- Scene *scene= CTX_data_scene(C);
- Base *tbase;
-
- /* sets scene->basact */
- BASACT= base;
-
- if(base) {
-
- /* XXX old signals, remember to handle notifiers now! */
- // select_actionchannel_by_name(base->object->action, "Object", 1);
-
- /* disable temporal locks */
- for(tbase=FIRSTBASE; tbase; tbase= tbase->next) {
- if(base!=tbase && (tbase->object->shapeflag & OB_SHAPE_TEMPLOCK)) {
- tbase->object->shapeflag &= ~OB_SHAPE_TEMPLOCK;
- DAG_id_flush_update(&tbase->object->id, OB_RECALC_DATA);
- }
- }
- WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
- }
- else
- WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, NULL);
-}
-
-/********************** Selection Operators **********************/
-
-static EnumPropertyItem prop_select_types[] = {
- {0, "EXCLUSIVE", 0, "Exclusive", ""},
- {1, "EXTEND", 0, "Extend", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-/************************ Select by Type *************************/
-
-static int object_select_by_type_exec(bContext *C, wmOperator *op)
-{
- short obtype, seltype;
-
- obtype = RNA_enum_get(op->ptr, "type");
- seltype = RNA_enum_get(op->ptr, "seltype");
-
- if (seltype == 0) {
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- ED_base_object_select(base, BA_DESELECT);
- }
- CTX_DATA_END;
- }
-
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if(base->object->type==obtype) {
- ED_base_object_select(base, BA_SELECT);
- }
- }
- CTX_DATA_END;
-
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_select_by_type(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Select By Type";
- ot->description = "Select all visible objects that are of a type.";
- ot->idname= "OBJECT_OT_select_by_type";
-
- /* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_select_by_type_exec;
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_enum(ot->srna, "seltype", prop_select_types, 0, "Selection", "Extend selection or clear selection then select");
- RNA_def_enum(ot->srna, "type", object_type_items, 1, "Type", "");
-
-}
-
-/*********************** Selection by Links *********************/
-
-static EnumPropertyItem prop_select_linked_types[] = {
- {1, "IPO", 0, "Object IPO", ""}, // XXX depreceated animation system stuff...
- {2, "OBDATA", 0, "Ob Data", ""},
- {3, "MATERIAL", 0, "Material", ""},
- {4, "TEXTURE", 0, "Texture", ""},
- {5, "DUPGROUP", 0, "Dupligroup", ""},
- {6, "PARTICLE", 0, "Particle System", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-static int object_select_linked_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- Object *ob;
- void *obdata = NULL;
- Material *mat = NULL, *mat1;
- Tex *tex=0;
- int a, b;
- int nr = RNA_enum_get(op->ptr, "type");
- short changed = 0, seltype;
- /* events (nr):
- * Object Ipo: 1
- * ObData: 2
- * Current Material: 3
- * Current Texture: 4
- * DupliGroup: 5
- * PSys: 6
- */
-
- seltype = RNA_enum_get(op->ptr, "seltype");
-
- if (seltype == 0) {
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- ED_base_object_select(base, BA_DESELECT);
- }
- CTX_DATA_END;
- }
-
- ob= OBACT;
- if(ob==0){
- BKE_report(op->reports, RPT_ERROR, "No Active Object");
- return OPERATOR_CANCELLED;
- }
-
- if(nr==1) {
- // XXX old animation system
- //ipo= ob->ipo;
- //if(ipo==0) return OPERATOR_CANCELLED;
- return OPERATOR_CANCELLED;
- }
- else if(nr==2) {
- if(ob->data==0) return OPERATOR_CANCELLED;
- obdata= ob->data;
- }
- else if(nr==3 || nr==4) {
- mat= give_current_material(ob, ob->actcol);
- if(mat==0) return OPERATOR_CANCELLED;
- if(nr==4) {
- if(mat->mtex[ (int)mat->texact ]) tex= mat->mtex[ (int)mat->texact ]->tex;
- if(tex==0) return OPERATOR_CANCELLED;
- }
- }
- else if(nr==5) {
- if(ob->dup_group==NULL) return OPERATOR_CANCELLED;
- }
- else if(nr==6) {
- if(ob->particlesystem.first==NULL) return OPERATOR_CANCELLED;
- }
- else return OPERATOR_CANCELLED;
-
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if(nr==1) {
- // XXX old animation system
- //if(base->object->ipo==ipo) base->flag |= SELECT;
- //changed = 1;
- }
- else if(nr==2) {
- if(base->object->data==obdata) base->flag |= SELECT;
- changed = 1;
- }
- else if(nr==3 || nr==4) {
- ob= base->object;
-
- for(a=1; a<=ob->totcol; a++) {
- mat1= give_current_material(ob, a);
- if(nr==3) {
- if(mat1==mat) base->flag |= SELECT;
- changed = 1;
- }
- else if(mat1 && nr==4) {
- for(b=0; b<MAX_MTEX; b++) {
- if(mat1->mtex[b]) {
- if(tex==mat1->mtex[b]->tex) {
- base->flag |= SELECT;
- changed = 1;
- break;
- }
- }
- }
- }
- }
- }
- else if(nr==5) {
- if(base->object->dup_group==ob->dup_group) {
- base->flag |= SELECT;
- changed = 1;
- }
- }
- else if(nr==6) {
- /* loop through other, then actives particles*/
- ParticleSystem *psys;
- ParticleSystem *psys_act;
-
- for(psys=base->object->particlesystem.first; psys; psys=psys->next) {
- for(psys_act=ob->particlesystem.first; psys_act; psys_act=psys_act->next) {
- if (psys->part == psys_act->part) {
- base->flag |= SELECT;
- changed = 1;
- break;
- }
- }
-
- if (base->flag & SELECT) {
- break;
- }
- }
- }
- base->object->flag= base->flag;
- }
- CTX_DATA_END;
-
- if (changed) {
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
- return OPERATOR_FINISHED;
- }
-
- return OPERATOR_CANCELLED;
-}
-
-void OBJECT_OT_select_linked(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Select Linked";
- ot->description = "Select all visible objects that are linked.";
- ot->idname= "OBJECT_OT_select_linked";
-
- /* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_select_linked_exec;
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_enum(ot->srna, "type", prop_select_linked_types, 0, "Type", "");
- RNA_def_enum(ot->srna, "seltype", prop_select_types, 1, "Selection", "Extend selection or clear selection then select");
-
-}
-
-/*********************** Selected Grouped ********************/
-
-static EnumPropertyItem prop_select_grouped_types[] = {
- {1, "CHILDREN_RECURSIVE", 0, "Children", ""},
- {2, "CHILDREN", 0, "Immediate Children", ""},
- {3, "PARENT", 0, "Parent", ""},
- {4, "SIBLINGS", 0, "Siblings", "Shared Parent"},
- {5, "TYPE", 0, "Type", "Shared object type"},
- {6, "LAYER", 0, "Layer", "Shared layers"},
- {7, "GROUP", 0, "Group", "Shared group"},
- {8, "HOOK", 0, "Hook", ""},
- {9, "PASS", 0, "Pass", "Render pass Index"},
- {10, "COLOR", 0, "Color", "Object Color"},
- {11, "PROPERTIES", 0, "Properties", "Game Properties"},
- {0, NULL, 0, NULL, NULL}
-};
-
-static short select_grouped_children(bContext *C, Object *ob, int recursive)
-{
- short changed = 0;
-
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
- if (ob == base->object->parent) {
- if (!(base->flag & SELECT)) {
- ED_base_object_select(base, BA_SELECT);
- changed = 1;
- }
-
- if (recursive)
- changed |= select_grouped_children(C, base->object, 1);
- }
- }
- CTX_DATA_END;
- return changed;
-}
-
-static short select_grouped_parent(bContext *C) /* Makes parent active and de-selected OBACT */
-{
- Scene *scene= CTX_data_scene(C);
- View3D *v3d= CTX_wm_view3d(C);
-
- short changed = 0;
- Base *baspar, *basact= CTX_data_active_base(C);
-
- if (!basact || !(basact->object->parent)) return 0; /* we know OBACT is valid */
-
- baspar= object_in_scene(basact->object->parent, scene);
-
- /* can be NULL if parent in other scene */
- if(baspar && BASE_SELECTABLE(v3d, baspar)) {
- ED_base_object_select(basact, BA_DESELECT);
- ED_base_object_select(baspar, BA_SELECT);
- ED_base_object_activate(C, baspar);
- changed = 1;
- }
- return changed;
-}
-
-
-#define GROUP_MENU_MAX 24
-static short select_grouped_group(bContext *C, Object *ob) /* Select objects in the same group as the active */
-{
- short changed = 0;
- Group *group, *ob_groups[GROUP_MENU_MAX];
- //char str[10 + (24*GROUP_MENU_MAX)];
- //char *p = str;
- int group_count=0; //, menu, i;
-
- for ( group=G.main->group.first;
- group && group_count < GROUP_MENU_MAX;
- group=group->id.next
- ) {
- if (object_in_group (ob, group)) {
- ob_groups[group_count] = group;
- group_count++;
- }
- }
-
- if (!group_count)
- return 0;
-
- else if (group_count == 1) {
- group = ob_groups[0];
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if (!(base->flag & SELECT) && object_in_group(base->object, group)) {
- ED_base_object_select(base, BA_SELECT);
- changed = 1;
- }
- }
- CTX_DATA_END;
- return changed;
- }
-#if 0 // XXX hows this work in 2.5?
- /* build the menu. */
- p += sprintf(str, "Groups%%t");
- for (i=0; i<group_count; i++) {
- group = ob_groups[i];
- p += sprintf (p, "|%s%%x%i", group->id.name+2, i);
- }
-
- menu = pupmenu (str);
- if (menu == -1)
- return 0;
-
- group = ob_groups[menu];
- for (base= FIRSTBASE; base; base= base->next) {
- if (!(base->flag & SELECT) && object_in_group(base->object, group)) {
- ED_base_object_select(base, BA_SELECT);
- changed = 1;
- }
- }
-#endif
- return changed;
-}
-
-static short select_grouped_object_hooks(bContext *C, Object *ob)
-{
- Scene *scene= CTX_data_scene(C);
- View3D *v3d= CTX_wm_view3d(C);
-
- short changed = 0;
- Base *base;
- ModifierData *md;
- HookModifierData *hmd;
-
- for (md = ob->modifiers.first; md; md=md->next) {
- if (md->type==eModifierType_Hook) {
- hmd= (HookModifierData*) md;
- if (hmd->object && !(hmd->object->flag & SELECT)) {
- base= object_in_scene(hmd->object, scene);
- if (base && (BASE_SELECTABLE(v3d, base))) {
- ED_base_object_select(base, BA_SELECT);
- changed = 1;
- }
- }
- }
- }
- return changed;
-}
-
-/* Select objects woth the same parent as the active (siblings),
- * parent can be NULL also */
-static short select_grouped_siblings(bContext *C, Object *ob)
-{
- short changed = 0;
-
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
- if ((base->object->parent==ob->parent) && !(base->flag & SELECT)) {
- ED_base_object_select(base, BA_SELECT);
- changed = 1;
- }
- }
- CTX_DATA_END;
- return changed;
-}
-
-static short select_grouped_type(bContext *C, Object *ob)
-{
- short changed = 0;
-
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
- if ((base->object->type == ob->type) && !(base->flag & SELECT)) {
- ED_base_object_select(base, BA_SELECT);
- changed = 1;
- }
- }
- CTX_DATA_END;
- return changed;
-}
-
-static short select_grouped_layer(bContext *C, Object *ob)
-{
- char changed = 0;
-
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
- if ((base->lay & ob->lay) && !(base->flag & SELECT)) {
- ED_base_object_select(base, BA_SELECT);
- changed = 1;
- }
- }
- CTX_DATA_END;
- return changed;
-}
-
-static short select_grouped_index_object(bContext *C, Object *ob)
-{
- char changed = 0;
-
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
- if ((base->object->index == ob->index) && !(base->flag & SELECT)) {
- ED_base_object_select(base, BA_SELECT);
- changed = 1;
- }
- }
- CTX_DATA_END;
- return changed;
-}
-
-static short select_grouped_color(bContext *C, Object *ob)
-{
- char changed = 0;
-
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
- if (!(base->flag & SELECT) && (FloatCompare(base->object->col, ob->col, 0.005f))) {
- ED_base_object_select(base, BA_SELECT);
- changed = 1;
- }
- }
- CTX_DATA_END;
- return changed;
-}
-
-static short objects_share_gameprop(Object *a, Object *b)
-{
- bProperty *prop;
- /*make a copy of all its properties*/
-
- for( prop= a->prop.first; prop; prop = prop->next ) {
- if ( get_ob_property(b, prop->name) )
- return 1;
- }
- return 0;
-}
-
-static short select_grouped_gameprops(bContext *C, Object *ob)
-{
- char changed = 0;
-
- CTX_DATA_BEGIN(C, Base*, base, selectable_bases) {
- if (!(base->flag & SELECT) && (objects_share_gameprop(base->object, ob))) {
- ED_base_object_select(base, BA_SELECT);
- changed = 1;
- }
- }
- CTX_DATA_END;
- return changed;
-}
-
-static int object_select_grouped_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- Object *ob;
- int nr = RNA_enum_get(op->ptr, "type");
- short changed = 0, seltype;
-
- seltype = RNA_enum_get(op->ptr, "seltype");
-
- if (seltype == 0) {
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- ED_base_object_select(base, BA_DESELECT);
- }
- CTX_DATA_END;
- }
-
- ob= OBACT;
- if(ob==0){
- BKE_report(op->reports, RPT_ERROR, "No Active Object");
- return OPERATOR_CANCELLED;
- }
-
- if(nr==1) changed = select_grouped_children(C, ob, 1);
- else if(nr==2) changed = select_grouped_children(C, ob, 0);
- else if(nr==3) changed = select_grouped_parent(C);
- else if(nr==4) changed = select_grouped_siblings(C, ob);
- else if(nr==5) changed = select_grouped_type(C, ob);
- else if(nr==6) changed = select_grouped_layer(C, ob);
- else if(nr==7) changed = select_grouped_group(C, ob);
- else if(nr==8) changed = select_grouped_object_hooks(C, ob);
- else if(nr==9) changed = select_grouped_index_object(C, ob);
- else if(nr==10) changed = select_grouped_color(C, ob);
- else if(nr==11) changed = select_grouped_gameprops(C, ob);
-
- if (changed) {
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
- return OPERATOR_FINISHED;
- }
-
- return OPERATOR_CANCELLED;
-}
-
-void OBJECT_OT_select_grouped(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Select Grouped";
- ot->description = "Select all visible objects grouped by various properties.";
- ot->idname= "OBJECT_OT_select_grouped";
-
- /* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_select_grouped_exec;
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", "");
- RNA_def_enum(ot->srna, "seltype", prop_select_types, 1, "Selection", "Extend selection or clear selection then select");
-}
-
-/************************* Select by Layer **********************/
-
-static int object_select_by_layer_exec(bContext *C, wmOperator *op)
-{
- unsigned int layernum;
- short seltype;
-
- seltype = RNA_enum_get(op->ptr, "seltype");
- layernum = RNA_int_get(op->ptr, "layer");
-
- if (seltype == 0) {
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- ED_base_object_select(base, BA_DESELECT);
- }
- CTX_DATA_END;
- }
-
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if(base->lay == (1<< (layernum -1)))
- ED_base_object_select(base, BA_SELECT);
- }
- CTX_DATA_END;
-
- /* undo? */
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_select_by_layer(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "select by layer";
- ot->description = "Select all visible objects on a layer.";
- ot->idname= "OBJECT_OT_select_by_layer";
-
- /* api callbacks */
- /*ot->invoke = XXX - need a int grid popup*/
- ot->exec= object_select_by_layer_exec;
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_int(ot->srna, "layer", 1, 1, 20, "Layer", "", 1, 20);
- RNA_def_enum(ot->srna, "seltype", prop_select_types, 1, "Selection", "Extend selection or clear selection then select");
-}
-
-/************************** Select Inverse *************************/
-
-static int object_select_inverse_exec(bContext *C, wmOperator *op)
-{
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if (base->flag & SELECT)
- ED_base_object_select(base, BA_DESELECT);
- else
- ED_base_object_select(base, BA_SELECT);
- }
- CTX_DATA_END;
-
- /* undo? */
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_select_inverse(wmOperatorType *ot)
-{
-
- /* identifiers */
- ot->name= "Select Inverse";
- ot->description = "Invert selection of all visible objects.";
- ot->idname= "OBJECT_OT_select_inverse";
-
- /* api callbacks */
- ot->exec= object_select_inverse_exec;
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
-}
-
-/**************************** (De)select All ****************************/
-
-static int object_select_de_select_all_exec(bContext *C, wmOperator *op)
-{
-
- int a=0, ok=0;
-
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if (base->flag & SELECT) {
- ok= a= 1;
- break;
- }
- else ok=1;
- }
- CTX_DATA_END;
-
- if (!ok) return OPERATOR_PASS_THROUGH;
-
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if (a) ED_base_object_select(base, BA_DESELECT);
- else ED_base_object_select(base, BA_SELECT);
- }
- CTX_DATA_END;
-
- /* undo? */
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_select_all_toggle(wmOperatorType *ot)
-{
-
- /* identifiers */
- ot->name= "deselect all";
- ot->description = "(de)select all visible objects in scene.";
- ot->idname= "OBJECT_OT_select_all_toggle";
-
- /* api callbacks */
- ot->exec= object_select_de_select_all_exec;
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
-}
-
-/**************************** Select Mirror ****************************/
-
-/* finds the best possible flipped name. For renaming; check for unique names afterwards */
-/* if strip_number: removes number extensions */
-void object_flip_name (char *name)
-{
- int len;
- char prefix[128]={""}; /* The part before the facing */
- char suffix[128]={""}; /* The part after the facing */
- char replace[128]={""}; /* The replacement string */
- char number[128]={""}; /* The number extension string */
- char *index=NULL;
-
- len= strlen(name);
- if(len<3) return; // we don't do names like .R or .L
-
- /* We first check the case with a .### extension, let's find the last period */
- if(isdigit(name[len-1])) {
- index= strrchr(name, '.'); // last occurrance
- if (index && isdigit(index[1]) ) { // doesnt handle case bone.1abc2 correct..., whatever!
- strcpy(number, index);
- *index= 0;
- len= strlen(name);
- }
- }
-
- strcpy (prefix, name);
-
-#define IS_SEPARATOR(a) ((a)=='.' || (a)==' ' || (a)=='-' || (a)=='_')
-
- /* first case; separator . - _ with extensions r R l L */
- if( IS_SEPARATOR(name[len-2]) ) {
- switch(name[len-1]) {
- case 'l':
- prefix[len-1]= 0;
- strcpy(replace, "r");
- break;
- case 'r':
- prefix[len-1]= 0;
- strcpy(replace, "l");
- break;
- case 'L':
- prefix[len-1]= 0;
- strcpy(replace, "R");
- break;
- case 'R':
- prefix[len-1]= 0;
- strcpy(replace, "L");
- break;
- }
- }
- /* case; beginning with r R l L , with separator after it */
- else if( IS_SEPARATOR(name[1]) ) {
- switch(name[0]) {
- case 'l':
- strcpy(replace, "r");
- strcpy(suffix, name+1);
- prefix[0]= 0;
- break;
- case 'r':
- strcpy(replace, "l");
- strcpy(suffix, name+1);
- prefix[0]= 0;
- break;
- case 'L':
- strcpy(replace, "R");
- strcpy(suffix, name+1);
- prefix[0]= 0;
- break;
- case 'R':
- strcpy(replace, "L");
- strcpy(suffix, name+1);
- prefix[0]= 0;
- break;
- }
- }
- else if(len > 5) {
- /* hrms, why test for a separator? lets do the rule 'ultimate left or right' */
- index = BLI_strcasestr(prefix, "right");
- if (index==prefix || index==prefix+len-5) {
- if(index[0]=='r')
- strcpy (replace, "left");
- else {
- if(index[1]=='I')
- strcpy (replace, "LEFT");
- else
- strcpy (replace, "Left");
- }
- *index= 0;
- strcpy (suffix, index+5);
- }
- else {
- index = BLI_strcasestr(prefix, "left");
- if (index==prefix || index==prefix+len-4) {
- if(index[0]=='l')
- strcpy (replace, "right");
- else {
- if(index[1]=='E')
- strcpy (replace, "RIGHT");
- else
- strcpy (replace, "Right");
- }
- *index= 0;
- strcpy (suffix, index+4);
- }
- }
- }
-
-#undef IS_SEPARATOR
-
- sprintf (name, "%s%s%s%s", prefix, replace, suffix, number);
-}
-
-static int object_select_mirror_exec(bContext *C, wmOperator *op)
-{
- char tmpname[32];
- short seltype;
-
- seltype = RNA_enum_get(op->ptr, "seltype");
-
- CTX_DATA_BEGIN(C, Base*, primbase, selected_bases) {
-
- strcpy(tmpname, primbase->object->id.name+2);
- object_flip_name(tmpname);
-
- CTX_DATA_BEGIN(C, Base*, secbase, visible_bases) {
- if(!strcmp(secbase->object->id.name+2, tmpname)) {
- ED_base_object_select(secbase, BA_SELECT);
- }
- }
- CTX_DATA_END;
-
- if (seltype == 0) ED_base_object_select(primbase, BA_DESELECT);
-
- }
- CTX_DATA_END;
-
- /* undo? */
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_select_mirror(wmOperatorType *ot)
-{
-
- /* identifiers */
- ot->name= "Select Mirror";
- ot->description = "Select the Mirror objects of the selected object eg. L.sword -> R.sword";
- ot->idname= "OBJECT_OT_select_mirror";
-
- /* api callbacks */
- ot->exec= object_select_mirror_exec;
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_enum(ot->srna, "seltype", prop_select_types, 1, "Selection", "Extend selection or clear selection then select");
-}
-
-/**************************** Select Random ****************************/
-
-static int object_select_random_exec(bContext *C, wmOperator *op)
-{
- float percent;
- short seltype;
-
- seltype = RNA_enum_get(op->ptr, "seltype");
-
- if (seltype == 0) {
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- ED_base_object_select(base, BA_DESELECT);
- }
- CTX_DATA_END;
- }
- percent = RNA_float_get(op->ptr, "percent");
-
- CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if (BLI_frand() < percent) {
- ED_base_object_select(base, BA_SELECT);
- }
- }
- CTX_DATA_END;
-
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C));
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_select_random(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Random select";
- ot->description = "Set select on random visible objects.";
- ot->idname= "OBJECT_OT_select_random";
-
- /* api callbacks */
- /*ot->invoke= object_select_random_invoke XXX - need a number popup ;*/
- ot->exec = object_select_random_exec;
- ot->poll= ED_operator_scene_editable;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_float_percentage(ot->srna, "percent", 0.5f, 0.0f, 1.0f, "Percent", "percentage of objects to randomly select", 0.0001f, 1.0f);
- RNA_def_enum(ot->srna, "seltype", prop_select_types, 1, "Selection", "Extend selection or clear selection then select");
-}
-
-
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
deleted file mode 100644
index 2b207f2f27c..00000000000
--- a/source/blender/editors/object/object_transform.c
+++ /dev/null
@@ -1,926 +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., 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.
- *
- * Contributor(s): Blender Foundation, 2002-2008 full recode
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <stdlib.h>
-
-#include "DNA_armature_types.h"
-#include "DNA_curve_types.h"
-#include "DNA_key_types.h"
-#include "DNA_mesh_types.h"
-#include "DNA_meshdata_types.h"
-#include "DNA_object_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_screen_types.h"
-#include "DNA_view3d_types.h"
-
-#include "BLI_arithb.h"
-#include "BLI_editVert.h"
-#include "BLI_listbase.h"
-
-#include "BKE_context.h"
-#include "BKE_curve.h"
-#include "BKE_depsgraph.h"
-#include "BKE_global.h"
-#include "BKE_main.h"
-#include "BKE_mesh.h"
-#include "BKE_object.h"
-#include "BKE_report.h"
-#include "BKE_utildefines.h"
-
-#include "RNA_define.h"
-#include "RNA_access.h"
-
-#include "WM_api.h"
-#include "WM_types.h"
-
-#include "ED_anim_api.h"
-#include "ED_armature.h"
-#include "ED_curve.h"
-#include "ED_mesh.h"
-#include "ED_object.h"
-#include "ED_screen.h"
-#include "ED_view3d.h"
-
-#include "object_intern.h"
-
-/*************************** Clear Transformation ****************************/
-
-static int object_location_clear_exec(bContext *C, wmOperator *op)
-{
- int armature_clear= 0;
-
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(!(ob->mode & OB_MODE_WEIGHT_PAINT)) {
- if((ob->protectflag & OB_LOCK_LOCX)==0)
- ob->loc[0]= ob->dloc[0]= 0.0f;
- if((ob->protectflag & OB_LOCK_LOCY)==0)
- ob->loc[1]= ob->dloc[1]= 0.0f;
- if((ob->protectflag & OB_LOCK_LOCZ)==0)
- ob->loc[2]= ob->dloc[2]= 0.0f;
- }
- ob->recalc |= OB_RECALC_OB;
- }
- CTX_DATA_END;
-
- if(armature_clear==0) /* in this case flush was done */
- ED_anim_dag_flush_update(C);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_location_clear(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Clear Location";
- ot->description = "Clear the object's location.";
- ot->idname= "OBJECT_OT_location_clear";
-
- /* api callbacks */
- ot->exec= object_location_clear_exec;
- ot->poll= ED_operator_object_active;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-static int object_rotation_clear_exec(bContext *C, wmOperator *op)
-{
- int armature_clear= 0;
-
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(!(ob->mode & OB_MODE_WEIGHT_PAINT)) {
- /* eulers can only get cleared if they are not protected */
- if((ob->protectflag & OB_LOCK_ROTX)==0)
- ob->rot[0]= ob->drot[0]= 0.0f;
- if((ob->protectflag & OB_LOCK_ROTY)==0)
- ob->rot[1]= ob->drot[1]= 0.0f;
- if((ob->protectflag & OB_LOCK_ROTZ)==0)
- ob->rot[2]= ob->drot[2]= 0.0f;
- }
- ob->recalc |= OB_RECALC_OB;
- }
- CTX_DATA_END;
-
- if(armature_clear==0) /* in this case flush was done */
- ED_anim_dag_flush_update(C);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_rotation_clear(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Clear Rotation";
- ot->description = "Clear the object's rotation.";
- ot->idname= "OBJECT_OT_rotation_clear";
-
- /* api callbacks */
- ot->exec= object_rotation_clear_exec;
- ot->poll= ED_operator_object_active;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-static int object_scale_clear_exec(bContext *C, wmOperator *op)
-{
- int armature_clear= 0;
-
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(!(ob->mode & OB_MODE_WEIGHT_PAINT)) {
- if((ob->protectflag & OB_LOCK_SCALEX)==0) {
- ob->dsize[0]= 0.0f;
- ob->size[0]= 1.0f;
- }
- if((ob->protectflag & OB_LOCK_SCALEY)==0) {
- ob->dsize[1]= 0.0f;
- ob->size[1]= 1.0f;
- }
- if((ob->protectflag & OB_LOCK_SCALEZ)==0) {
- ob->dsize[2]= 0.0f;
- ob->size[2]= 1.0f;
- }
- }
- ob->recalc |= OB_RECALC_OB;
- }
- CTX_DATA_END;
-
- if(armature_clear==0) /* in this case flush was done */
- ED_anim_dag_flush_update(C);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_scale_clear(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Clear Scale";
- ot->description = "Clear the object's scale.";
- ot->idname= "OBJECT_OT_scale_clear";
-
- /* api callbacks */
- ot->exec= object_scale_clear_exec;
- ot->poll= ED_operator_object_active;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-static int object_origin_clear_exec(bContext *C, wmOperator *op)
-{
- float *v1, *v3, mat[3][3];
- int armature_clear= 0;
-
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- if(ob->parent) {
- v1= ob->loc;
- v3= ob->parentinv[3];
-
- Mat3CpyMat4(mat, ob->parentinv);
- VECCOPY(v3, v1);
- v3[0]= -v3[0];
- v3[1]= -v3[1];
- v3[2]= -v3[2];
- Mat3MulVecfl(mat, v3);
- }
- ob->recalc |= OB_RECALC_OB;
- }
- CTX_DATA_END;
-
- if(armature_clear==0) /* in this case flush was done */
- ED_anim_dag_flush_update(C);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_origin_clear(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Clear Origin";
- ot->description = "Clear the object's origin.";
- ot->idname= "OBJECT_OT_origin_clear";
-
- /* api callbacks */
- ot->exec= object_origin_clear_exec;
- ot->poll= ED_operator_object_active;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-/*************************** Apply Transformation ****************************/
-
-/* use this when the loc/size/rot of the parent has changed but the children
- * should stay in the same place, e.g. for apply-size-rot or object center */
-static void ignore_parent_tx(Main *bmain, Scene *scene, Object *ob )
-{
- Object workob;
- Object *ob_child;
-
- /* a change was made, adjust the children to compensate */
- for(ob_child=bmain->object.first; ob_child; ob_child=ob_child->id.next) {
- if(ob_child->parent == ob) {
- ED_object_apply_obmat(ob_child);
- what_does_parent(scene, ob_child, &workob);
- Mat4Invert(ob_child->parentinv, workob.obmat);
- }
- }
-}
-
-static int apply_objects_internal(bContext *C, ReportList *reports, int apply_loc, int apply_scale, int apply_rot)
-{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Object *ob;
- bArmature *arm;
- Mesh *me;
- Curve *cu;
- Nurb *nu;
- BPoint *bp;
- BezTriple *bezt;
- MVert *mvert;
- float rsmat[3][3], tmat[3][3], obmat[3][3], iobmat[3][3], mat[4][4], scale;
- int a, change = 0;
-
- /* first check if we can execute */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- ob= base->object;
-
- if(ob->type==OB_MESH) {
- me= ob->data;
-
- if(me->id.us>1) {
- BKE_report(reports, RPT_ERROR, "Can't apply to a multi user mesh, doing nothing.");
- return OPERATOR_CANCELLED;
- }
- }
- else if(ob->type==OB_ARMATURE) {
- arm= ob->data;
-
- if(arm->id.us>1) {
- BKE_report(reports, RPT_ERROR, "Can't apply to a multi user armature, doing nothing.");
- return OPERATOR_CANCELLED;
- }
- }
- else if(ELEM(ob->type, OB_CURVE, OB_SURF)) {
- cu= ob->data;
-
- if(cu->id.us>1) {
- BKE_report(reports, RPT_ERROR, "Can't apply to a multi user 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.");
- return OPERATOR_CANCELLED;
- }
- }
- }
- CTX_DATA_END;
-
- /* now execute */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- ob= base->object;
-
- /* calculate rotation/scale matrix */
- if(apply_scale && apply_rot)
- object_to_mat3(ob, rsmat);
- else if(apply_scale)
- object_scale_to_mat3(ob, rsmat);
- else if(apply_rot)
- object_rot_to_mat3(ob, rsmat);
- else
- Mat3One(rsmat);
-
- Mat4CpyMat3(mat, rsmat);
-
- /* calculate translation */
- if(apply_loc) {
- VecCopyf(mat[3], ob->loc);
-
- if(!(apply_scale && apply_rot)) {
- /* correct for scale and rotation that is still applied */
- object_to_mat3(ob, obmat);
- Mat3Inv(iobmat, obmat);
- Mat3MulMat3(tmat, rsmat, iobmat);
- Mat3MulVecfl(tmat, mat[3]);
- }
- }
-
- /* apply to object data */
- if(ob->type==OB_MESH) {
- me= ob->data;
-
- /* adjust data */
- mvert= me->mvert;
- for(a=0; a<me->totvert; a++, mvert++)
- Mat4MulVecfl(mat, mvert->co);
-
- if(me->key) {
- KeyBlock *kb;
-
- for(kb=me->key->block.first; kb; kb=kb->next) {
- float *fp= kb->data;
-
- for(a=0; a<kb->totelem; a++, fp+=3)
- Mat4MulVecfl(mat, fp);
- }
- }
-
- /* update normals */
- mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL);
- }
- else if (ob->type==OB_ARMATURE) {
- ED_armature_apply_transform(ob, mat);
- }
- else if(ELEM(ob->type, OB_CURVE, OB_SURF)) {
- cu= ob->data;
-
- scale = Mat3ToScalef(rsmat);
-
- for(nu=cu->nurb.first; nu; nu=nu->next) {
- if(nu->type == CU_BEZIER) {
- a= nu->pntsu;
- for(bezt= nu->bezt; a--; bezt++) {
- Mat4MulVecfl(mat, bezt->vec[0]);
- Mat4MulVecfl(mat, bezt->vec[1]);
- Mat4MulVecfl(mat, bezt->vec[2]);
- bezt->radius *= scale;
- bezt++;
- }
- }
- else {
- a= nu->pntsu*nu->pntsv;
- for(bp= nu->bp; a--; bp++)
- Mat4MulVecfl(mat, bp->vec);
- }
- }
- }
- else
- continue;
-
- if(apply_loc)
- ob->loc[0]= ob->loc[1]= ob->loc[2]= 0.0f;
- if(apply_scale)
- ob->size[0]= ob->size[1]= ob->size[2]= 1.0f;
- if(apply_rot)
- ob->rot[0]= ob->rot[1]= ob->rot[2]= 0.0f;
-
- where_is_object(scene, ob);
- ignore_parent_tx(bmain, scene, ob);
-
- DAG_id_flush_update(&ob->id, OB_RECALC_OB|OB_RECALC_DATA);
-
- change = 1;
- }
- CTX_DATA_END;
-
- if(!change)
- return OPERATOR_CANCELLED;
-
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
- return OPERATOR_FINISHED;
-}
-
-static int visual_transform_apply_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- int change = 0;
-
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
- where_is_object(scene, ob);
-
- VECCOPY(ob->loc, ob->obmat[3]);
- Mat4ToSize(ob->obmat, ob->size);
- Mat4ToEul(ob->obmat, ob->rot);
-
- where_is_object(scene, ob);
-
- change = 1;
- }
- CTX_DATA_END;
-
- if(!change)
- return OPERATOR_CANCELLED;
-
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_visual_transform_apply(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Apply Visual Transform";
- ot->description = "Apply the object's visual transformation to its data.";
- ot->idname= "OBJECT_OT_visual_transform_apply";
-
- /* api callbacks */
- ot->exec= visual_transform_apply_exec;
- ot->poll= ED_operator_object_active;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-static int location_apply_exec(bContext *C, wmOperator *op)
-{
- return apply_objects_internal(C, op->reports, 1, 0, 0);
-}
-
-void OBJECT_OT_location_apply(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Apply Location";
- ot->description = "Apply the object's location to its data.";
- ot->idname= "OBJECT_OT_location_apply";
-
- /* api callbacks */
- ot->exec= location_apply_exec;
- ot->poll= ED_operator_object_active;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-static int scale_apply_exec(bContext *C, wmOperator *op)
-{
- return apply_objects_internal(C, op->reports, 0, 1, 0);
-}
-
-void OBJECT_OT_scale_apply(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Apply Scale";
- ot->description = "Apply the object's scale to its data.";
- ot->idname= "OBJECT_OT_scale_apply";
-
- /* api callbacks */
- ot->exec= scale_apply_exec;
- ot->poll= ED_operator_object_active;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-static int rotation_apply_exec(bContext *C, wmOperator *op)
-{
- return apply_objects_internal(C, op->reports, 0, 0, 1);
-}
-
-void OBJECT_OT_rotation_apply(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Apply Rotation";
- ot->description = "Apply the object's rotation to its data.";
- ot->idname= "OBJECT_OT_rotation_apply";
-
- /* api callbacks */
- ot->exec= rotation_apply_exec;
- ot->poll= ED_operator_object_active;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-/************************ Texture Space Transform ****************************/
-
-void texspace_edit(Scene *scene, View3D *v3d)
-{
- Base *base;
- int nr=0;
-
- /* first test if from visible and selected objects
- * texspacedraw is set:
- */
-
- if(scene->obedit) return; // XXX get from context
-
- for(base= FIRSTBASE; base; base= base->next) {
- if(TESTBASELIB(v3d, base)) {
- break;
- }
- }
-
- if(base==0) {
- return;
- }
-
- nr= 0; // XXX pupmenu("Texture Space %t|Grab/Move%x1|Size%x2");
- if(nr<1) return;
-
- for(base= FIRSTBASE; base; base= base->next) {
- if(TESTBASELIB(v3d, base)) {
- base->object->dtx |= OB_TEXSPACE;
- }
- }
-
-
- if(nr==1) {
-// XXX initTransform(TFM_TRANSLATION, CTX_TEXTURE);
-// XXX Transform();
- }
- else if(nr==2) {
-// XXX initTransform(TFM_RESIZE, CTX_TEXTURE);
-// XXX Transform();
- }
- else if(nr==3) {
-// XXX initTransform(TFM_ROTATION, CTX_TEXTURE);
-// XXX Transform();
- }
-}
-
-/************************ Mirror Menu ****************************/
-
-void mirrormenu(void)
-{
-// XXX initTransform(TFM_MIRROR, CTX_NO_PET);
-// XXX Transform();
-}
-
-/********************* Set Object Center ************************/
-
-static EnumPropertyItem prop_set_center_types[] = {
- {0, "CENTER", 0, "ObData to Center", "Move object data around Object center"},
- {1, "CENTERNEW", 0, "Center New", "Move Object center to center of object data"},
- {2, "CENTERCURSOR", 0, "Center Cursor", "Move Object Center to position of the 3d cursor"},
- {0, NULL, 0, NULL, NULL}
-};
-
-/* 0 == do center, 1 == center new, 2 == center cursor */
-static int object_center_set_exec(bContext *C, wmOperator *op)
-{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- ScrArea *sa= CTX_wm_area(C);
- View3D *v3d= sa->spacedata.first;
- Object *obedit= CTX_data_edit_object(C);
- Object *ob;
- Mesh *me, *tme;
- Curve *cu;
-/* BezTriple *bezt;
- BPoint *bp; */
- Nurb *nu, *nu1;
- EditVert *eve;
- float cent[3], centn[3], min[3], max[3], omat[3][3];
- int a, total= 0;
- int centermode = RNA_enum_get(op->ptr, "type");
-
- /* keep track of what is changed */
- int tot_change=0, tot_lib_error=0, tot_multiuser_arm_error=0;
- MVert *mvert;
-
- if(scene->id.lib || v3d==NULL){
- BKE_report(op->reports, RPT_ERROR, "Operation cannot be performed on Lib data");
- return OPERATOR_CANCELLED;
- }
- if (obedit && centermode > 0) {
- BKE_report(op->reports, RPT_ERROR, "Operation cannot be performed in EditMode");
- return OPERATOR_CANCELLED;
- }
- cent[0]= cent[1]= cent[2]= 0.0;
-
- if(obedit) {
-
- INIT_MINMAX(min, max);
-
- if(obedit->type==OB_MESH) {
- Mesh *me= obedit->data;
- EditMesh *em = BKE_mesh_get_editmesh(me);
-
- for(eve= em->verts.first; eve; eve= eve->next) {
- if(v3d->around==V3D_CENTROID) {
- total++;
- VECADD(cent, cent, eve->co);
- }
- else {
- DO_MINMAX(eve->co, min, max);
- }
- }
-
- if(v3d->around==V3D_CENTROID) {
- VecMulf(cent, 1.0f/(float)total);
- }
- else {
- cent[0]= (min[0]+max[0])/2.0f;
- cent[1]= (min[1]+max[1])/2.0f;
- cent[2]= (min[2]+max[2])/2.0f;
- }
-
- for(eve= em->verts.first; eve; eve= eve->next) {
- VecSubf(eve->co, eve->co, cent);
- }
-
- recalc_editnormals(em);
- tot_change++;
- DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
- BKE_mesh_end_editmesh(me, em);
- }
- }
-
- /* reset flags */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- base->object->flag &= ~OB_DONE;
- }
- CTX_DATA_END;
-
- for (me= G.main->mesh.first; me; me= me->id.next) {
- me->flag &= ~ME_ISDONE;
- }
-
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- if((base->object->flag & OB_DONE)==0) {
- base->object->flag |= OB_DONE;
-
- if(obedit==NULL && (me=get_mesh(base->object)) ) {
- if (me->id.lib) {
- tot_lib_error++;
- } else {
- if(centermode==2) {
- VECCOPY(cent, give_cursor(scene, v3d));
- Mat4Invert(base->object->imat, base->object->obmat);
- Mat4MulVecfl(base->object->imat, cent);
- } else {
- INIT_MINMAX(min, max);
- mvert= me->mvert;
- for(a=0; a<me->totvert; a++, mvert++) {
- DO_MINMAX(mvert->co, min, max);
- }
-
- cent[0]= (min[0]+max[0])/2.0f;
- cent[1]= (min[1]+max[1])/2.0f;
- cent[2]= (min[2]+max[2])/2.0f;
- }
-
- mvert= me->mvert;
- for(a=0; a<me->totvert; a++, mvert++) {
- VecSubf(mvert->co, mvert->co, cent);
- }
-
- if (me->key) {
- KeyBlock *kb;
- for (kb=me->key->block.first; kb; kb=kb->next) {
- float *fp= kb->data;
-
- for (a=0; a<kb->totelem; a++, fp+=3) {
- VecSubf(fp, fp, cent);
- }
- }
- }
-
- me->flag |= ME_ISDONE;
-
- if(centermode) {
- Mat3CpyMat4(omat, base->object->obmat);
-
- VECCOPY(centn, cent);
- Mat3MulVecfl(omat, centn);
- base->object->loc[0]+= centn[0];
- base->object->loc[1]+= centn[1];
- base->object->loc[2]+= centn[2];
-
- where_is_object(scene, base->object);
- ignore_parent_tx(bmain, scene, base->object);
-
- /* other users? */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- ob = base->object;
- if((ob->flag & OB_DONE)==0) {
- tme= get_mesh(ob);
-
- if(tme==me) {
-
- ob->flag |= OB_DONE;
- ob->recalc= OB_RECALC_OB|OB_RECALC_DATA;
-
- Mat3CpyMat4(omat, ob->obmat);
- VECCOPY(centn, cent);
- Mat3MulVecfl(omat, centn);
- ob->loc[0]+= centn[0];
- ob->loc[1]+= centn[1];
- ob->loc[2]+= centn[2];
-
- where_is_object(scene, ob);
- ignore_parent_tx(bmain, scene, ob);
-
- if(tme && (tme->flag & ME_ISDONE)==0) {
- mvert= tme->mvert;
- for(a=0; a<tme->totvert; a++, mvert++) {
- VecSubf(mvert->co, mvert->co, cent);
- }
-
- if (tme->key) {
- KeyBlock *kb;
- for (kb=tme->key->block.first; kb; kb=kb->next) {
- float *fp= kb->data;
-
- for (a=0; a<kb->totelem; a++, fp+=3) {
- VecSubf(fp, fp, cent);
- }
- }
- }
-
- tme->flag |= ME_ISDONE;
- }
- }
- }
-
- ob= ob->id.next;
- }
- CTX_DATA_END;
- }
- tot_change++;
- }
- }
- else if (ELEM(base->object->type, OB_CURVE, OB_SURF)) {
-
- /* weak code here... (ton) */
- if(obedit==base->object) {
- ListBase *editnurb= curve_get_editcurve(obedit);
-
- nu1= editnurb->first;
- cu= obedit->data;
- }
- else {
- cu= base->object->data;
- nu1= cu->nurb.first;
- }
-
- if (cu->id.lib) {
- tot_lib_error++;
- } else {
- if(centermode==2) {
- VECCOPY(cent, give_cursor(scene, v3d));
- Mat4Invert(base->object->imat, base->object->obmat);
- Mat4MulVecfl(base->object->imat, cent);
-
- /* don't allow Z change if curve is 2D */
- if( !( cu->flag & CU_3D ) )
- cent[2] = 0.0;
- }
- else {
- INIT_MINMAX(min, max);
-
- nu= nu1;
- while(nu) {
- minmaxNurb(nu, min, max);
- nu= nu->next;
- }
-
- cent[0]= (min[0]+max[0])/2.0f;
- cent[1]= (min[1]+max[1])/2.0f;
- cent[2]= (min[2]+max[2])/2.0f;
- }
-
- nu= nu1;
- while(nu) {
- if(nu->type == CU_BEZIER) {
- a= nu->pntsu;
- while (a--) {
- VecSubf(nu->bezt[a].vec[0], nu->bezt[a].vec[0], cent);
- VecSubf(nu->bezt[a].vec[1], nu->bezt[a].vec[1], cent);
- VecSubf(nu->bezt[a].vec[2], nu->bezt[a].vec[2], cent);
- }
- }
- else {
- a= nu->pntsu*nu->pntsv;
- while (a--)
- VecSubf(nu->bp[a].vec, nu->bp[a].vec, cent);
- }
- nu= nu->next;
- }
-
- if(centermode && obedit==0) {
- Mat3CpyMat4(omat, base->object->obmat);
-
- Mat3MulVecfl(omat, cent);
- base->object->loc[0]+= cent[0];
- base->object->loc[1]+= cent[1];
- base->object->loc[2]+= cent[2];
-
- where_is_object(scene, base->object);
- ignore_parent_tx(bmain, scene, base->object);
- }
-
- tot_change++;
- if(obedit) {
- if (centermode==0) {
- DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
- }
- break;
- }
- }
- }
- else if(base->object->type==OB_FONT) {
- /* get from bb */
-
- cu= base->object->data;
-
- if(cu->bb==0) {
- /* do nothing*/
- } else if (cu->id.lib) {
- tot_lib_error++;
- } else {
- cu->xof= -0.5f*( cu->bb->vec[4][0] - cu->bb->vec[0][0]);
- cu->yof= -0.5f -0.5f*( cu->bb->vec[0][1] - cu->bb->vec[2][1]); /* extra 0.5 is the height o above line */
-
- /* not really ok, do this better once! */
- cu->xof /= cu->fsize;
- cu->yof /= cu->fsize;
-
- tot_change++;
- }
- }
- else if(base->object->type==OB_ARMATURE) {
- bArmature *arm = base->object->data;
-
- if (arm->id.lib) {
- tot_lib_error++;
- } else if(arm->id.us>1) {
- /*BKE_report(op->reports, RPT_ERROR, "Can't apply to a multi user armature");
- return;*/
- tot_multiuser_arm_error++;
- } else {
- /* Function to recenter armatures in editarmature.c
- * Bone + object locations are handled there.
- */
- docenter_armature(scene, v3d, base->object, centermode);
- tot_change++;
-
- where_is_object(scene, base->object);
- ignore_parent_tx(bmain, scene, base->object);
-
- if(obedit)
- break;
- }
- }
- base->object->recalc= OB_RECALC_OB|OB_RECALC_DATA;
- }
- }
- CTX_DATA_END;
-
- if (tot_change) {
- ED_anim_dag_flush_update(C);
- }
-
- /* Warn if any errors occured */
- if (tot_lib_error+tot_multiuser_arm_error) {
- BKE_reportf(op->reports, RPT_WARNING, "%i Object(s) Not Centered, %i Changed:",tot_lib_error+tot_multiuser_arm_error, tot_change);
- if (tot_lib_error)
- BKE_reportf(op->reports, RPT_WARNING, "|%i linked library objects",tot_lib_error);
- if (tot_multiuser_arm_error)
- BKE_reportf(op->reports, RPT_WARNING, "|%i multiuser armature object(s)",tot_multiuser_arm_error);
- }
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_center_set(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Set Center";
- ot->description = "Set the object's center, by either moving the data, or set to center of data, or use 3d cursor";
- ot->idname= "OBJECT_OT_center_set";
-
- /* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= object_center_set_exec;
-
- ot->poll= ED_operator_view3d_active;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_enum(ot->srna, "type", prop_set_center_types, 0, "Type", "");
-}
-
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 2b17a6cbe54..154ab14df60 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -25,6 +25,8 @@
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
+ * Creator-specific support for vertex deformation groups
+ * Added: apply deform function (ton)
*/
#include <string.h>
@@ -59,7 +61,6 @@
#include "BKE_utildefines.h"
#include "RNA_access.h"
-#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -67,55 +68,127 @@
#include "ED_mesh.h"
#include "ED_view3d.h"
-#include "UI_interface.h"
-
#include "object_intern.h"
-/************************ Exported Functions **********************/
+/* XXX */
+static void BIF_undo_push() {}
+static void error() {}
-static Lattice *vgroup_edit_lattice(Object *ob)
+static Lattice *def_get_lattice(Object *ob)
{
if(ob->type==OB_LATTICE) {
Lattice *lt= ob->data;
- return (lt->editlatt)? lt->editlatt: lt;
+ if(lt->editlatt)
+ return lt->editlatt;
+ return lt;
}
-
return NULL;
}
+/* only in editmode */
+void sel_verts_defgroup (Object *obedit, int select)
+{
+ EditVert *eve;
+ Object *ob;
+ int i;
+ MDeformVert *dvert;
+
+ ob= obedit;
+
+ if (!ob)
+ return;
+
+ switch (ob->type){
+ case OB_MESH:
+ {
+ Mesh *me= ob->data;
+ EditMesh *em = BKE_mesh_get_editmesh(me);
+
+ for (eve=em->verts.first; eve; eve=eve->next){
+ dvert= CustomData_em_get(&em->vdata, eve->data, CD_MDEFORMVERT);
+
+ if (dvert && dvert->totweight){
+ for (i=0; i<dvert->totweight; i++){
+ if (dvert->dw[i].def_nr == (ob->actdef-1)){
+ if (select) eve->f |= SELECT;
+ else eve->f &= ~SELECT;
+
+ break;
+ }
+ }
+ }
+ }
+ /* this has to be called, because this function operates on vertices only */
+ if(select) EM_select_flush(em); // vertices to edges/faces
+ else EM_deselect_flush(em);
+
+ BKE_mesh_end_editmesh(me, em);
+ }
+ break;
+ case OB_LATTICE:
+ {
+ Lattice *lt= def_get_lattice(ob);
+
+ if(lt->dvert) {
+ BPoint *bp;
+ int a, tot;
+
+ dvert= lt->dvert;
+
+ tot= lt->pntsu*lt->pntsv*lt->pntsw;
+ for(a=0, bp= lt->def; a<tot; a++, bp++, dvert++) {
+ for (i=0; i<dvert->totweight; i++){
+ if (dvert->dw[i].def_nr == (ob->actdef-1)) {
+ if(select) bp->f1 |= SELECT;
+ else bp->f1 &= ~SELECT;
+
+ break;
+ }
+ }
+ }
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
/* check if deform vertex has defgroup index */
-MDeformWeight *ED_vgroup_weight_get(MDeformVert *dv, int defgroup)
+MDeformWeight *get_defweight (MDeformVert *dv, int defgroup)
{
int i;
- if(!dv || defgroup<0)
+ if (!dv || defgroup<0)
return NULL;
- for(i=0; i<dv->totweight; i++)
- if(dv->dw[i].def_nr == defgroup)
+ for (i=0; i<dv->totweight; i++){
+ if (dv->dw[i].def_nr == defgroup)
return dv->dw+i;
-
+ }
return NULL;
}
-/* Ensures that mv has a deform weight entry for the specified defweight group */
+/* Ensures that mv has a deform weight entry for
+ the specified defweight group */
/* Note this function is mirrored in editmesh_tools.c, for use for editvertices */
-MDeformWeight *ED_vgroup_weight_verify(MDeformVert *dv, int defgroup)
+MDeformWeight *verify_defweight (MDeformVert *dv, int defgroup)
{
MDeformWeight *newdw;
/* do this check always, this function is used to check for it */
- if(!dv || defgroup<0)
+ if (!dv || defgroup<0)
return NULL;
- newdw = ED_vgroup_weight_get(dv, defgroup);
- if(newdw)
+ newdw = get_defweight (dv, defgroup);
+ if (newdw)
return newdw;
- newdw = MEM_callocN(sizeof(MDeformWeight)*(dv->totweight+1), "deformWeight");
- if(dv->dw) {
- memcpy(newdw, dv->dw, sizeof(MDeformWeight)*dv->totweight);
- MEM_freeN(dv->dw);
+ newdw = MEM_callocN (sizeof(MDeformWeight)*(dv->totweight+1), "deformWeight");
+ if (dv->dw){
+ memcpy (newdw, dv->dw, sizeof(MDeformWeight)*dv->totweight);
+ MEM_freeN (dv->dw);
}
dv->dw=newdw;
@@ -128,16 +201,16 @@ MDeformWeight *ED_vgroup_weight_verify(MDeformVert *dv, int defgroup)
return dv->dw+(dv->totweight-1);
}
-bDeformGroup *ED_vgroup_add_name(Object *ob, char *name)
+bDeformGroup *add_defgroup_name (Object *ob, char *name)
{
- bDeformGroup *defgroup;
+ bDeformGroup *defgroup;
- if(!ob)
+ if (!ob)
return NULL;
- defgroup = MEM_callocN(sizeof(bDeformGroup), "add deformGroup");
+ defgroup = MEM_callocN (sizeof(bDeformGroup), "add deformGroup");
- BLI_strncpy(defgroup->name, name, 32);
+ BLI_strncpy (defgroup->name, name, 32);
BLI_addtail(&ob->defbase, defgroup);
unique_vertexgroup_name(defgroup, ob);
@@ -147,20 +220,306 @@ bDeformGroup *ED_vgroup_add_name(Object *ob, char *name)
return defgroup;
}
-bDeformGroup *ED_vgroup_add(Object *ob)
+void add_defgroup (Object *ob)
+{
+ add_defgroup_name (ob, "Group");
+}
+
+
+void duplicate_defgroup ( Object *ob )
+{
+ bDeformGroup *dg, *cdg;
+ char name[32], s[32];
+ MDeformWeight *org, *cpy;
+ MDeformVert *dvert, *dvert_array=NULL;
+ int i, idg, icdg, dvert_tot=0;
+
+ if (ob->type != OB_MESH && ob->type != OB_LATTICE)
+ return;
+
+ dg = BLI_findlink (&ob->defbase, (ob->actdef-1));
+ if (!dg)
+ return;
+
+ if (strstr(dg->name, "_copy")) {
+ BLI_strncpy (name, dg->name, 32); /* will be renamed _copy.001... etc */
+ } else {
+ BLI_snprintf (name, 32, "%s_copy", dg->name);
+ while (get_named_vertexgroup (ob, name)) {
+ if ((strlen (name) + 6) > 32) {
+ error ("Error: the name for the new group is > 32 characters");
+ return;
+ }
+ strcpy (s, name);
+ BLI_snprintf (name, 32, "%s_copy", s);
+ }
+ }
+
+ cdg = copy_defgroup (dg);
+ strcpy (cdg->name, name);
+ unique_vertexgroup_name(cdg, ob);
+
+ BLI_addtail (&ob->defbase, cdg);
+
+ idg = (ob->actdef-1);
+ ob->actdef = BLI_countlist (&ob->defbase);
+ icdg = (ob->actdef-1);
+
+ if(ob->type == OB_MESH) {
+ Mesh *me = get_mesh (ob);
+ dvert_array= me->dvert;
+ dvert_tot= me->totvert;
+ }
+ else if (ob->type == OB_LATTICE) {
+ Lattice *lt= (Lattice *)ob->data;
+ dvert_array= lt->dvert;
+ dvert_tot= lt->pntsu*lt->pntsv*lt->pntsw;
+ }
+
+ if (!dvert_array)
+ return;
+
+ for (i = 0; i < dvert_tot; i++) {
+ dvert = dvert_array+i;
+ org = get_defweight (dvert, idg);
+ if (org) {
+ float weight = org->weight;
+ /* verify_defweight re-allocs org so need to store the weight first */
+ cpy = verify_defweight (dvert, icdg);
+ cpy->weight = weight;
+ }
+ }
+}
+
+static void del_defgroup_update_users(Object *ob, int id)
+{
+ ExplodeModifierData *emd;
+ ModifierData *md;
+ ParticleSystem *psys;
+ ClothModifierData *clmd;
+ ClothSimSettings *clsim;
+ int a;
+
+ /* these cases don't use names to refer to vertex groups, so when
+ * they get deleted the numbers get out of sync, this corrects that */
+
+ if(ob->soft) {
+ if(ob->soft->vertgroup == id)
+ ob->soft->vertgroup= 0;
+ else if(ob->soft->vertgroup > id)
+ ob->soft->vertgroup--;
+ }
+
+ for(md=ob->modifiers.first; md; md=md->next) {
+ if(md->type == eModifierType_Explode) {
+ emd= (ExplodeModifierData*)md;
+
+ if(emd->vgroup == id)
+ emd->vgroup= 0;
+ else if(emd->vgroup > id)
+ emd->vgroup--;
+ }
+ else if(md->type == eModifierType_Cloth) {
+ clmd= (ClothModifierData*)md;
+ clsim= clmd->sim_parms;
+
+ if(clsim) {
+ if(clsim->vgroup_mass == id)
+ clsim->vgroup_mass= 0;
+ else if(clsim->vgroup_mass > id)
+ clsim->vgroup_mass--;
+
+ if(clsim->vgroup_bend == id)
+ clsim->vgroup_bend= 0;
+ else if(clsim->vgroup_bend > id)
+ clsim->vgroup_bend--;
+
+ if(clsim->vgroup_struct == id)
+ clsim->vgroup_struct= 0;
+ else if(clsim->vgroup_struct > id)
+ clsim->vgroup_struct--;
+ }
+ }
+ }
+
+ for(psys=ob->particlesystem.first; psys; psys=psys->next) {
+ for(a=0; a<PSYS_TOT_VG; a++)
+ if(psys->vgroup[a] == id)
+ psys->vgroup[a]= 0;
+ else if(psys->vgroup[a] > id)
+ psys->vgroup[a]--;
+ }
+}
+
+void del_defgroup_in_object_mode ( Object *ob )
+{
+ bDeformGroup *dg;
+ MDeformVert *dvert, *dvert_array=NULL;
+ int i, e, dvert_tot=0;
+
+ if ((!ob) || (ob->type != OB_MESH && ob->type != OB_LATTICE))
+ return;
+
+ if(ob->type == OB_MESH) {
+ Mesh *me = get_mesh (ob);
+ dvert_array= me->dvert;
+ dvert_tot= me->totvert;
+ }
+ else if (ob->type == OB_LATTICE) {
+ Lattice *lt= (Lattice *)ob->data;
+ dvert_array= lt->dvert;
+ dvert_tot= lt->pntsu*lt->pntsv*lt->pntsw;
+ }
+
+ dg = BLI_findlink (&ob->defbase, (ob->actdef-1));
+ if (!dg)
+ return;
+
+ if (dvert_array) {
+ for (i = 0; i < dvert_tot; i++) {
+ dvert = dvert_array + i;
+ if (dvert) {
+ if (get_defweight (dvert, (ob->actdef-1)))
+ remove_vert_defgroup (ob, dg, i);
+ }
+ }
+
+ for (i = 0; i < dvert_tot; i++) {
+ dvert = dvert_array+i;
+ if (dvert) {
+ for (e = 0; e < dvert->totweight; e++) {
+ if (dvert->dw[e].def_nr > (ob->actdef-1))
+ dvert->dw[e].def_nr--;
+ }
+ }
+ }
+ }
+
+ del_defgroup_update_users(ob, ob->actdef);
+
+ /* Update the active deform index if necessary */
+ if (ob->actdef == BLI_countlist(&ob->defbase))
+ ob->actdef--;
+
+ /* Remove the group */
+ BLI_freelinkN (&ob->defbase, dg);
+}
+
+void del_defgroup (Object *ob)
+{
+ bDeformGroup *defgroup;
+ int i;
+
+ if (!ob)
+ return;
+
+ if (!ob->actdef)
+ return;
+
+ defgroup = BLI_findlink(&ob->defbase, ob->actdef-1);
+ if (!defgroup)
+ return;
+
+ /* Make sure that no verts are using this group */
+ remove_verts_defgroup(ob, 1);
+
+ /* Make sure that any verts with higher indices are adjusted accordingly */
+ if(ob->type==OB_MESH) {
+ Mesh *me= ob->data;
+ EditMesh *em = BKE_mesh_get_editmesh(me);
+ EditVert *eve;
+ MDeformVert *dvert;
+
+ for (eve=em->verts.first; eve; eve=eve->next){
+ dvert= CustomData_em_get(&em->vdata, eve->data, CD_MDEFORMVERT);
+
+ if (dvert)
+ for (i=0; i<dvert->totweight; i++)
+ if (dvert->dw[i].def_nr > (ob->actdef-1))
+ dvert->dw[i].def_nr--;
+ }
+ BKE_mesh_end_editmesh(me, em);
+ }
+ else if(ob->type==OB_LATTICE) {
+ Lattice *lt= def_get_lattice(ob);
+ BPoint *bp;
+ MDeformVert *dvert= lt->dvert;
+ int a, tot;
+
+ if (dvert) {
+ tot= lt->pntsu*lt->pntsv*lt->pntsw;
+ for(a=0, bp= lt->def; a<tot; a++, bp++, dvert++) {
+ for (i=0; i<dvert->totweight; i++){
+ if (dvert->dw[i].def_nr > (ob->actdef-1))
+ dvert->dw[i].def_nr--;
+ }
+ }
+ }
+ }
+
+ del_defgroup_update_users(ob, ob->actdef);
+
+ /* Update the active deform index if necessary */
+ if (ob->actdef==BLI_countlist(&ob->defbase))
+ ob->actdef--;
+
+ /* Remove the group */
+ BLI_freelinkN (&ob->defbase, defgroup);
+
+ /* remove all dverts */
+ if(ob->actdef==0) {
+ if(ob->type==OB_MESH) {
+ Mesh *me= ob->data;
+ CustomData_free_layer_active(&me->vdata, CD_MDEFORMVERT, me->totvert);
+ me->dvert= NULL;
+ }
+ else if(ob->type==OB_LATTICE) {
+ Lattice *lt= def_get_lattice(ob);
+ if (lt->dvert) {
+ MEM_freeN(lt->dvert);
+ lt->dvert= NULL;
+ }
+ }
+ }
+}
+
+void del_all_defgroups (Object *ob)
{
- return ED_vgroup_add_name(ob, "Group");
+ /* Sanity check */
+ if (ob == NULL)
+ return;
+
+ /* Remove all DVerts */
+ if (ob->type==OB_MESH) {
+ Mesh *me= ob->data;
+ CustomData_free_layer_active(&me->vdata, CD_MDEFORMVERT, me->totvert);
+ me->dvert= NULL;
+ }
+ else if(ob->type==OB_LATTICE) {
+ Lattice *lt= def_get_lattice(ob);
+ if (lt->dvert) {
+ MEM_freeN(lt->dvert);
+ lt->dvert= NULL;
+ }
+ }
+
+ /* Remove all DefGroups */
+ BLI_freelistN(&ob->defbase);
+
+ /* Fix counters/indices */
+ ob->actdef= 0;
}
-void ED_vgroup_data_create(ID *id)
+void create_dverts(ID *id)
{
- /* create deform verts */
+ /* create deform verts
+ */
- if(GS(id->name)==ID_ME) {
+ if( GS(id->name)==ID_ME) {
Mesh *me= (Mesh *)id;
me->dvert= CustomData_add_layer(&me->vdata, CD_MDEFORMVERT, CD_CALLOC, NULL, me->totvert);
}
- else if(GS(id->name)==ID_LT) {
+ else if( GS(id->name)==ID_LT) {
Lattice *lt= (Lattice *)id;
lt->dvert= MEM_callocN(sizeof(MDeformVert)*lt->pntsu*lt->pntsv*lt->pntsw, "lattice deformVert");
}
@@ -168,7 +527,7 @@ void ED_vgroup_data_create(ID *id)
/* for mesh in object mode
lattice can be in editmode */
-void ED_vgroup_nr_vert_remove(Object *ob, int def_nr, int vertnum)
+void remove_vert_def_nr (Object *ob, int def_nr, int vertnum)
{
/* This routine removes the vertex from the deform
* group with number def_nr.
@@ -188,11 +547,11 @@ void ED_vgroup_nr_vert_remove(Object *ob, int def_nr, int vertnum)
* vertnum
*/
if(ob->type==OB_MESH) {
- if(((Mesh*)ob->data)->dvert)
+ if( ((Mesh*)ob->data)->dvert )
dvert = ((Mesh*)ob->data)->dvert + vertnum;
}
else if(ob->type==OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
+ Lattice *lt= def_get_lattice(ob);
if(lt->dvert)
dvert = lt->dvert + vertnum;
@@ -204,27 +563,27 @@ void ED_vgroup_nr_vert_remove(Object *ob, int def_nr, int vertnum)
/* for all of the deform weights in the
* deform vert
*/
- for(i=dvert->totweight - 1 ; i>=0 ; i--){
+ for (i=dvert->totweight - 1 ; i>=0 ; i--){
/* if the def_nr is the same as the one
* for our weight group then remove it
* from this deform vert.
*/
- if(dvert->dw[i].def_nr == def_nr) {
+ if (dvert->dw[i].def_nr == def_nr) {
dvert->totweight--;
/* if there are still other deform weights
* attached to this vert then remove this
* deform weight, and reshuffle the others
*/
- if(dvert->totweight) {
- newdw = MEM_mallocN(sizeof(MDeformWeight)*(dvert->totweight),
+ if (dvert->totweight) {
+ newdw = MEM_mallocN (sizeof(MDeformWeight)*(dvert->totweight),
"deformWeight");
- if(dvert->dw){
- memcpy(newdw, dvert->dw, sizeof(MDeformWeight)*i);
- memcpy(newdw+i, dvert->dw+i+1,
+ if (dvert->dw){
+ memcpy (newdw, dvert->dw, sizeof(MDeformWeight)*i);
+ memcpy (newdw+i, dvert->dw+i+1,
sizeof(MDeformWeight)*(dvert->totweight-i));
- MEM_freeN(dvert->dw);
+ MEM_freeN (dvert->dw);
}
dvert->dw=newdw;
}
@@ -232,7 +591,7 @@ void ED_vgroup_nr_vert_remove(Object *ob, int def_nr, int vertnum)
* left then just remove the deform weight
*/
else {
- MEM_freeN(dvert->dw);
+ MEM_freeN (dvert->dw);
dvert->dw = NULL;
break;
}
@@ -243,7 +602,8 @@ void ED_vgroup_nr_vert_remove(Object *ob, int def_nr, int vertnum)
/* for Mesh in Object mode */
/* allows editmode for Lattice */
-void ED_vgroup_nr_vert_add(Object *ob, int def_nr, int vertnum, float weight, int assignmode)
+void add_vert_defnr (Object *ob, int def_nr, int vertnum,
+ float weight, int assignmode)
{
/* add the vert to the deform group with the
* specified number
@@ -258,7 +618,7 @@ void ED_vgroup_nr_vert_add(Object *ob, int def_nr, int vertnum, float weight, in
dv = ((Mesh*)ob->data)->dvert + vertnum;
}
else if(ob->type==OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
+ Lattice *lt= def_get_lattice(ob);
if(lt->dvert)
dv = lt->dvert + vertnum;
@@ -271,21 +631,21 @@ void ED_vgroup_nr_vert_add(Object *ob, int def_nr, int vertnum, float weight, in
* already in the weight group -- if so
* lets update it
*/
- for(i=0; i<dv->totweight; i++){
+ for (i=0; i<dv->totweight; i++){
/* if this weight cooresponds to the
* deform group, then add it using
* the assign mode provided
*/
- if(dv->dw[i].def_nr == def_nr){
+ if (dv->dw[i].def_nr == def_nr){
- switch(assignmode) {
+ switch (assignmode) {
case WEIGHT_REPLACE:
dv->dw[i].weight=weight;
break;
case WEIGHT_ADD:
dv->dw[i].weight+=weight;
- if(dv->dw[i].weight >= 1.0)
+ if (dv->dw[i].weight >= 1.0)
dv->dw[i].weight = 1.0;
break;
case WEIGHT_SUBTRACT:
@@ -293,8 +653,8 @@ void ED_vgroup_nr_vert_add(Object *ob, int def_nr, int vertnum, float weight, in
/* if the weight is zero or less then
* remove the vert from the deform group
*/
- if(dv->dw[i].weight <= 0.0)
- ED_vgroup_nr_vert_remove(ob, def_nr, vertnum);
+ if (dv->dw[i].weight <= 0.0)
+ remove_vert_def_nr(ob, def_nr, vertnum);
break;
}
return;
@@ -305,7 +665,7 @@ void ED_vgroup_nr_vert_add(Object *ob, int def_nr, int vertnum, float weight, in
* we must take a different form of action ...
*/
- switch(assignmode) {
+ switch (assignmode) {
case WEIGHT_SUBTRACT:
/* if we are subtracting then we don't
* need to do anything
@@ -317,11 +677,11 @@ void ED_vgroup_nr_vert_add(Object *ob, int def_nr, int vertnum, float weight, in
/* if we are doing an additive assignment, then
* we need to create the deform weight
*/
- newdw = MEM_callocN(sizeof(MDeformWeight)*(dv->totweight+1),
+ newdw = MEM_callocN (sizeof(MDeformWeight)*(dv->totweight+1),
"deformWeight");
- if(dv->dw){
- memcpy(newdw, dv->dw, sizeof(MDeformWeight)*dv->totweight);
- MEM_freeN(dv->dw);
+ if (dv->dw){
+ memcpy (newdw, dv->dw, sizeof(MDeformWeight)*dv->totweight);
+ MEM_freeN (dv->dw);
}
dv->dw=newdw;
@@ -334,7 +694,8 @@ void ED_vgroup_nr_vert_add(Object *ob, int def_nr, int vertnum, float weight, in
}
/* called while not in editmode */
-void ED_vgroup_vert_add(Object *ob, bDeformGroup *dg, int vertnum, float weight, int assignmode)
+void add_vert_to_defgroup (Object *ob, bDeformGroup *dg, int vertnum,
+ float weight, int assignmode)
{
/* add the vert to the deform group with the
* specified assign mode
@@ -345,27 +706,115 @@ void ED_vgroup_vert_add(Object *ob, bDeformGroup *dg, int vertnum, float weight,
* it can't be found
*/
def_nr = get_defgroup_num(ob, dg);
- if(def_nr < 0) return;
+ if (def_nr < 0) return;
/* if there's no deform verts then
* create some
*/
if(ob->type==OB_MESH) {
- if(!((Mesh*)ob->data)->dvert)
- ED_vgroup_data_create(ob->data);
+ if (!((Mesh*)ob->data)->dvert)
+ create_dverts(ob->data);
}
else if(ob->type==OB_LATTICE) {
- if(!((Lattice*)ob->data)->dvert)
- ED_vgroup_data_create(ob->data);
+ if (!((Lattice*)ob->data)->dvert)
+ create_dverts(ob->data);
}
/* call another function to do the work
*/
- ED_vgroup_nr_vert_add(ob, def_nr, vertnum, weight, assignmode);
+ add_vert_defnr (ob, def_nr, vertnum, weight, assignmode);
+}
+
+/* Only available in editmode */
+void assign_verts_defgroup (Object *ob, float weight)
+{
+ EditVert *eve;
+ bDeformGroup *dg, *eg;
+ MDeformWeight *newdw;
+ MDeformVert *dvert;
+ int i, done;
+
+ if (!ob)
+ return;
+
+ dg=BLI_findlink(&ob->defbase, ob->actdef-1);
+ if (!dg){
+ error ("No vertex group is active");
+ return;
+ }
+
+ switch (ob->type){
+ case OB_MESH:
+ {
+ Mesh *me= ob->data;
+ EditMesh *em = BKE_mesh_get_editmesh(me);
+
+ if (!CustomData_has_layer(&em->vdata, CD_MDEFORMVERT))
+ EM_add_data_layer(em, &em->vdata, CD_MDEFORMVERT);
+
+ /* Go through the list of editverts and assign them */
+ for (eve=em->verts.first; eve; eve=eve->next){
+ dvert= CustomData_em_get(&em->vdata, eve->data, CD_MDEFORMVERT);
+
+ if (dvert && (eve->f & 1)){
+ done=0;
+ /* See if this vert already has a reference to this group */
+ /* If so: Change its weight */
+ done=0;
+ for (i=0; i<dvert->totweight; i++){
+ eg = BLI_findlink (&ob->defbase, dvert->dw[i].def_nr);
+ /* Find the actual group */
+ if (eg==dg){
+ dvert->dw[i].weight= weight;
+ done=1;
+ break;
+ }
+ }
+ /* If not: Add the group and set its weight */
+ if (!done){
+ newdw = MEM_callocN (sizeof(MDeformWeight)*(dvert->totweight+1), "deformWeight");
+ if (dvert->dw){
+ memcpy (newdw, dvert->dw, sizeof(MDeformWeight)*dvert->totweight);
+ MEM_freeN (dvert->dw);
+ }
+ dvert->dw=newdw;
+
+ dvert->dw[dvert->totweight].weight= weight;
+ dvert->dw[dvert->totweight].def_nr= ob->actdef-1;
+
+ dvert->totweight++;
+
+ }
+ }
+ }
+ BKE_mesh_end_editmesh(me, em);
+ }
+ break;
+ case OB_LATTICE:
+ {
+ Lattice *lt= def_get_lattice(ob);
+ BPoint *bp;
+ int a, tot;
+
+ if(lt->dvert==NULL)
+ create_dverts(&lt->id);
+
+ tot= lt->pntsu*lt->pntsv*lt->pntsw;
+ for(a=0, bp= lt->def; a<tot; a++, bp++) {
+ if(bp->f1 & SELECT)
+ add_vert_defnr (ob, ob->actdef-1, a, weight, WEIGHT_REPLACE);
+ }
+ }
+ break;
+ default:
+ printf ("Assigning deformation groups to unknown object type\n");
+ break;
+ }
+
}
/* mesh object mode, lattice can be in editmode */
-void ED_vgroup_vert_remove(Object *ob, bDeformGroup *dg, int vertnum)
+void remove_vert_defgroup (Object *ob, bDeformGroup *dg, int vertnum)
{
/* This routine removes the vertex from the specified
* deform group.
@@ -375,7 +824,7 @@ void ED_vgroup_vert_remove(Object *ob, bDeformGroup *dg, int vertnum)
/* if the object is NULL abort
*/
- if(!ob)
+ if (!ob)
return;
/* get the deform number that cooresponds
@@ -383,34 +832,28 @@ void ED_vgroup_vert_remove(Object *ob, bDeformGroup *dg, int vertnum)
* can not be found.
*/
def_nr = get_defgroup_num(ob, dg);
- if(def_nr < 0) return;
+ if (def_nr < 0) return;
/* call another routine to do the work
*/
- ED_vgroup_nr_vert_remove(ob, def_nr, vertnum);
+ remove_vert_def_nr (ob, def_nr, vertnum);
}
-static float get_vert_def_nr(Object *ob, int def_nr, int vertnum)
+/* for mesh in object mode lattice can be in editmode */
+static float get_vert_def_nr (Object *ob, int def_nr, int vertnum)
{
MDeformVert *dvert= NULL;
- EditVert *eve;
- Mesh *me;
int i;
- /* get the deform vertices corresponding to the vertnum */
+ /* get the deform vertices corresponding to the
+ * vertnum
+ */
if(ob->type==OB_MESH) {
- me= ob->data;
-
- if(me->edit_mesh) {
- eve= BLI_findlink(&me->edit_mesh->verts, vertnum);
- if(!eve) return 0.0f;
- dvert= CustomData_em_get(&me->edit_mesh->vdata, eve->data, CD_MDEFORMVERT);
- }
- else
- dvert = me->dvert + vertnum;
+ if( ((Mesh*)ob->data)->dvert )
+ dvert = ((Mesh*)ob->data)->dvert + vertnum;
}
else if(ob->type==OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
+ Lattice *lt= def_get_lattice(ob);
if(lt->dvert)
dvert = lt->dvert + vertnum;
@@ -426,267 +869,23 @@ static float get_vert_def_nr(Object *ob, int def_nr, int vertnum)
return 0.0f;
}
-float ED_vgroup_vert_weight(Object *ob, bDeformGroup *dg, int vertnum)
+/* mesh object mode, lattice can be in editmode */
+float get_vert_defgroup (Object *ob, bDeformGroup *dg, int vertnum)
{
int def_nr;
- if(!ob) return 0.0f;
+ if(!ob)
+ return 0.0f;
def_nr = get_defgroup_num(ob, dg);
if(def_nr < 0) return 0.0f;
- return get_vert_def_nr(ob, def_nr, vertnum);
-}
-
-void ED_vgroup_select_by_name(Object *ob, char *name)
-{
- bDeformGroup *curdef;
- int actdef= 1;
-
- for(curdef = ob->defbase.first; curdef; curdef=curdef->next, actdef++){
- if(!strcmp(curdef->name, name)) {
- ob->actdef= actdef;
- return;
- }
- }
-
- ob->actdef=0; // this signals on painting to create a new one, if a bone in posemode is selected */
-}
-
-/********************** Operator Implementations *********************/
-
-/* only in editmode */
-static void vgroup_select_verts(Object *ob, int select)
-{
- EditVert *eve;
- MDeformVert *dvert;
- int i;
-
- if(ob->type == OB_MESH) {
- Mesh *me= ob->data;
- EditMesh *em = BKE_mesh_get_editmesh(me);
-
- for(eve=em->verts.first; eve; eve=eve->next){
- dvert= CustomData_em_get(&em->vdata, eve->data, CD_MDEFORMVERT);
-
- if(dvert && dvert->totweight){
- for(i=0; i<dvert->totweight; i++){
- if(dvert->dw[i].def_nr == (ob->actdef-1)){
- if(select) eve->f |= SELECT;
- else eve->f &= ~SELECT;
-
- break;
- }
- }
- }
- }
- /* this has to be called, because this function operates on vertices only */
- if(select) EM_select_flush(em); // vertices to edges/faces
- else EM_deselect_flush(em);
-
- BKE_mesh_end_editmesh(me, em);
- }
- else if(ob->type == OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
-
- if(lt->dvert) {
- BPoint *bp;
- int a, tot;
-
- dvert= lt->dvert;
-
- tot= lt->pntsu*lt->pntsv*lt->pntsw;
- for(a=0, bp= lt->def; a<tot; a++, bp++, dvert++) {
- for(i=0; i<dvert->totweight; i++){
- if(dvert->dw[i].def_nr == (ob->actdef-1)) {
- if(select) bp->f1 |= SELECT;
- else bp->f1 &= ~SELECT;
-
- break;
- }
- }
- }
- }
- }
-}
-
-static void vgroup_duplicate(Object *ob)
-{
- bDeformGroup *dg, *cdg;
- char name[32], s[32];
- MDeformWeight *org, *cpy;
- MDeformVert *dvert, *dvert_array=NULL;
- int i, idg, icdg, dvert_tot=0;
-
- dg = BLI_findlink(&ob->defbase, (ob->actdef-1));
- if(!dg)
- return;
-
- if(strstr(dg->name, "_copy")) {
- BLI_strncpy(name, dg->name, 32); /* will be renamed _copy.001... etc */
- }
- else {
- BLI_snprintf(name, 32, "%s_copy", dg->name);
- while(get_named_vertexgroup(ob, name)) {
- if((strlen(name) + 6) > 32) {
- printf("Internal error: the name for the new vertex group is > 32 characters");
- return;
- }
- strcpy(s, name);
- BLI_snprintf(name, 32, "%s_copy", s);
- }
- }
-
- cdg = copy_defgroup(dg);
- strcpy(cdg->name, name);
- unique_vertexgroup_name(cdg, ob);
-
- BLI_addtail(&ob->defbase, cdg);
-
- idg = (ob->actdef-1);
- ob->actdef = BLI_countlist(&ob->defbase);
- icdg = (ob->actdef-1);
-
- if(ob->type == OB_MESH) {
- Mesh *me = get_mesh(ob);
- dvert_array= me->dvert;
- dvert_tot= me->totvert;
- }
- else if(ob->type == OB_LATTICE) {
- Lattice *lt= (Lattice *)ob->data;
- dvert_array= lt->dvert;
- dvert_tot= lt->pntsu*lt->pntsv*lt->pntsw;
- }
-
- if(!dvert_array)
- return;
-
- for(i = 0; i < dvert_tot; i++) {
- dvert = dvert_array+i;
- org = ED_vgroup_weight_get(dvert, idg);
- if(org) {
- float weight = org->weight;
- /* ED_vgroup_weight_verify re-allocs org so need to store the weight first */
- cpy = ED_vgroup_weight_verify(dvert, icdg);
- cpy->weight = weight;
- }
- }
-}
-
-static void vgroup_delete_update_users(Object *ob, int id)
-{
- ExplodeModifierData *emd;
- ModifierData *md;
- ParticleSystem *psys;
- ClothModifierData *clmd;
- ClothSimSettings *clsim;
- int a;
-
- /* these cases don't use names to refer to vertex groups, so when
- * they get deleted the numbers get out of sync, this corrects that */
-
- if(ob->soft) {
- if(ob->soft->vertgroup == id)
- ob->soft->vertgroup= 0;
- else if(ob->soft->vertgroup > id)
- ob->soft->vertgroup--;
- }
-
- for(md=ob->modifiers.first; md; md=md->next) {
- if(md->type == eModifierType_Explode) {
- emd= (ExplodeModifierData*)md;
-
- if(emd->vgroup == id)
- emd->vgroup= 0;
- else if(emd->vgroup > id)
- emd->vgroup--;
- }
- else if(md->type == eModifierType_Cloth) {
- clmd= (ClothModifierData*)md;
- clsim= clmd->sim_parms;
-
- if(clsim) {
- if(clsim->vgroup_mass == id)
- clsim->vgroup_mass= 0;
- else if(clsim->vgroup_mass > id)
- clsim->vgroup_mass--;
-
- if(clsim->vgroup_bend == id)
- clsim->vgroup_bend= 0;
- else if(clsim->vgroup_bend > id)
- clsim->vgroup_bend--;
-
- if(clsim->vgroup_struct == id)
- clsim->vgroup_struct= 0;
- else if(clsim->vgroup_struct > id)
- clsim->vgroup_struct--;
- }
- }
- }
-
- for(psys=ob->particlesystem.first; psys; psys=psys->next) {
- for(a=0; a<PSYS_TOT_VG; a++)
- if(psys->vgroup[a] == id)
- psys->vgroup[a]= 0;
- else if(psys->vgroup[a] > id)
- psys->vgroup[a]--;
- }
+ return get_vert_def_nr (ob, def_nr, vertnum);
}
-static void vgroup_delete_object_mode(Object *ob)
-{
- bDeformGroup *dg;
- MDeformVert *dvert, *dvert_array=NULL;
- int i, e, dvert_tot=0;
-
- if(ob->type == OB_MESH) {
- Mesh *me = get_mesh(ob);
- dvert_array= me->dvert;
- dvert_tot= me->totvert;
- }
- else if(ob->type == OB_LATTICE) {
- Lattice *lt= (Lattice *)ob->data;
- dvert_array= lt->dvert;
- dvert_tot= lt->pntsu*lt->pntsv*lt->pntsw;
- }
-
- dg = BLI_findlink(&ob->defbase, (ob->actdef-1));
- if(!dg)
- return;
-
- if(dvert_array) {
- for(i = 0; i < dvert_tot; i++) {
- dvert = dvert_array + i;
- if(dvert) {
- if(ED_vgroup_weight_get(dvert, (ob->actdef-1)))
- ED_vgroup_vert_remove(ob, dg, i);
- }
- }
-
- for(i = 0; i < dvert_tot; i++) {
- dvert = dvert_array+i;
- if(dvert) {
- for(e = 0; e < dvert->totweight; e++) {
- if(dvert->dw[e].def_nr > (ob->actdef-1))
- dvert->dw[e].def_nr--;
- }
- }
- }
- }
-
- vgroup_delete_update_users(ob, ob->actdef);
-
- /* Update the active deform index if necessary */
- if(ob->actdef == BLI_countlist(&ob->defbase))
- ob->actdef--;
-
- /* Remove the group */
- BLI_freelinkN(&ob->defbase, dg);
-}
-
-/* only in editmode */
+/* Only available in editmode */
/* removes from active defgroup, if allverts==0 only selected vertices */
-static void vgroup_active_remove_verts(Object *ob, int allverts)
+void remove_verts_defgroup (Object *ob, int allverts)
{
EditVert *eve;
MDeformVert *dvert;
@@ -694,35 +893,42 @@ static void vgroup_active_remove_verts(Object *ob, int allverts)
bDeformGroup *dg, *eg;
int i;
+ if (!ob)
+ return;
+
dg=BLI_findlink(&ob->defbase, ob->actdef-1);
- if(!dg)
+ if (!dg){
+ error ("No vertex group is active");
return;
+ }
- if(ob->type == OB_MESH) {
+ switch (ob->type){
+ case OB_MESH:
+ {
Mesh *me= ob->data;
EditMesh *em = BKE_mesh_get_editmesh(me);
- for(eve=em->verts.first; eve; eve=eve->next){
+ for (eve=em->verts.first; eve; eve=eve->next){
dvert= CustomData_em_get(&em->vdata, eve->data, CD_MDEFORMVERT);
- if(dvert && dvert->dw && ((eve->f & 1) || allverts)){
- for(i=0; i<dvert->totweight; i++){
+ if (dvert && dvert->dw && ((eve->f & 1) || allverts)){
+ for (i=0; i<dvert->totweight; i++){
/* Find group */
- eg = BLI_findlink(&ob->defbase, dvert->dw[i].def_nr);
- if(eg == dg){
+ eg = BLI_findlink (&ob->defbase, dvert->dw[i].def_nr);
+ if (eg == dg){
dvert->totweight--;
- if(dvert->totweight){
- newdw = MEM_mallocN(sizeof(MDeformWeight)*(dvert->totweight), "deformWeight");
+ if (dvert->totweight){
+ newdw = MEM_mallocN (sizeof(MDeformWeight)*(dvert->totweight), "deformWeight");
- if(dvert->dw){
- memcpy(newdw, dvert->dw, sizeof(MDeformWeight)*i);
- memcpy(newdw+i, dvert->dw+i+1, sizeof(MDeformWeight)*(dvert->totweight-i));
- MEM_freeN(dvert->dw);
+ if (dvert->dw){
+ memcpy (newdw, dvert->dw, sizeof(MDeformWeight)*i);
+ memcpy (newdw+i, dvert->dw+i+1, sizeof(MDeformWeight)*(dvert->totweight-i));
+ MEM_freeN (dvert->dw);
}
dvert->dw=newdw;
}
else{
- MEM_freeN(dvert->dw);
+ MEM_freeN (dvert->dw);
dvert->dw=NULL;
break;
}
@@ -732,8 +938,10 @@ static void vgroup_active_remove_verts(Object *ob, int allverts)
}
BKE_mesh_end_editmesh(me, em);
}
- else if(ob->type == OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
+ break;
+ case OB_LATTICE:
+ {
+ Lattice *lt= def_get_lattice(ob);
if(lt->dvert) {
BPoint *bp;
@@ -741,249 +949,170 @@ static void vgroup_active_remove_verts(Object *ob, int allverts)
for(a=0, bp= lt->def; a<tot; a++, bp++) {
if(allverts || (bp->f1 & SELECT))
- ED_vgroup_vert_remove(ob, dg, a);
+ remove_vert_defgroup (ob, dg, a);
}
}
}
+ break;
+
+ default:
+ printf ("Removing deformation groups from unknown object type\n");
+ break;
+ }
}
-static void vgroup_delete_edit_mode(Object *ob)
+/* Only available in editmode */
+/* removes from all defgroup, if allverts==0 only selected vertices */
+void remove_verts_defgroups(Object *ob, int allverts)
{
- bDeformGroup *defgroup;
- int i;
-
- if(!ob->actdef)
- return;
+ int actdef, defCount;
- defgroup = BLI_findlink(&ob->defbase, ob->actdef-1);
- if(!defgroup)
+ if (ob == NULL) return;
+
+ actdef= ob->actdef;
+ defCount= BLI_countlist(&ob->defbase);
+
+ if (defCount == 0) {
+ error("Object has no vertex groups");
return;
-
- /* Make sure that no verts are using this group */
- vgroup_active_remove_verts(ob, 1);
-
- /* Make sure that any verts with higher indices are adjusted accordingly */
- if(ob->type==OB_MESH) {
- Mesh *me= ob->data;
- EditMesh *em = BKE_mesh_get_editmesh(me);
- EditVert *eve;
- MDeformVert *dvert;
-
- for(eve=em->verts.first; eve; eve=eve->next){
- dvert= CustomData_em_get(&em->vdata, eve->data, CD_MDEFORMVERT);
-
- if(dvert)
- for(i=0; i<dvert->totweight; i++)
- if(dvert->dw[i].def_nr > (ob->actdef-1))
- dvert->dw[i].def_nr--;
- }
- BKE_mesh_end_editmesh(me, em);
}
- else if(ob->type==OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
- BPoint *bp;
- MDeformVert *dvert= lt->dvert;
- int a, tot;
+
+ /* To prevent code redundancy, we just use remove_verts_defgroup, but that
+ * only operates on the active vgroup. So we iterate through all groups, by changing
+ * active group index
+ */
+ for (ob->actdef= 1; ob->actdef <= defCount; ob->actdef++)
+ remove_verts_defgroup(ob, allverts);
- if(dvert) {
- tot= lt->pntsu*lt->pntsv*lt->pntsw;
- for(a=0, bp= lt->def; a<tot; a++, bp++, dvert++) {
- for(i=0; i<dvert->totweight; i++){
- if(dvert->dw[i].def_nr > (ob->actdef-1))
- dvert->dw[i].def_nr--;
- }
- }
- }
- }
-
- vgroup_delete_update_users(ob, ob->actdef);
+ ob->actdef= actdef;
+}
- /* Update the active deform index if necessary */
- if(ob->actdef==BLI_countlist(&ob->defbase))
- ob->actdef--;
+void vertexgroup_select_by_name(Object *ob, char *name)
+{
+ bDeformGroup *curdef;
+ int actdef= 1;
- /* Remove the group */
- BLI_freelinkN (&ob->defbase, defgroup);
+ if(ob==NULL) return;
- /* remove all dverts */
- if(ob->actdef==0) {
- if(ob->type==OB_MESH) {
- Mesh *me= ob->data;
- CustomData_free_layer_active(&me->vdata, CD_MDEFORMVERT, me->totvert);
- me->dvert= NULL;
- }
- else if(ob->type==OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
- if(lt->dvert) {
- MEM_freeN(lt->dvert);
- lt->dvert= NULL;
- }
+ for (curdef = ob->defbase.first; curdef; curdef=curdef->next, actdef++){
+ if (!strcmp(curdef->name, name)) {
+ ob->actdef= actdef;
+ return;
}
}
+ ob->actdef=0; // this signals on painting to create a new one, if a bone in posemode is selected */
}
-static int vgroup_object_in_edit_mode(Object *ob)
+/* This function provides a shortcut for adding/removing verts from
+ * vertex groups. It is called by the Ctrl-G hotkey in EditMode for Meshes
+ * and Lattices. (currently only restricted to those two)
+ * It is only responsible for
+ */
+void vgroup_assign_with_menu(Scene *scene, Object *ob)
{
- if(ob->type == OB_MESH)
- return (((Mesh*)ob->data)->edit_mesh != NULL);
- else if(ob->type == OB_LATTICE)
- return (((Lattice*)ob->data)->editlatt != NULL);
+ VPaint *wp= scene->toolsettings->wpaint;
+ int defCount;
+ int mode= 0;
- return 0;
-}
-
-static void vgroup_delete(Object *ob)
-{
- if(vgroup_object_in_edit_mode(ob))
- vgroup_delete_edit_mode(ob);
- else
- vgroup_delete_object_mode(ob);
-}
-
-static void vgroup_delete_all(Object *ob)
-{
- /* Remove all DVerts */
- if(ob->type==OB_MESH) {
- Mesh *me= ob->data;
- CustomData_free_layer_active(&me->vdata, CD_MDEFORMVERT, me->totvert);
- me->dvert= NULL;
- }
- else if(ob->type==OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
- if(lt->dvert) {
- MEM_freeN(lt->dvert);
- lt->dvert= NULL;
- }
- }
+ /* prevent crashes */
+ if (wp==NULL || ob==NULL) return;
- /* Remove all DefGroups */
- BLI_freelistN(&ob->defbase);
+ defCount= BLI_countlist(&ob->defbase);
- /* Fix counters/indices */
- ob->actdef= 0;
-}
-
-/* only in editmode */
-static void vgroup_assign_verts(Object *ob, float weight)
-{
- EditVert *eve;
- bDeformGroup *dg, *eg;
- MDeformWeight *newdw;
- MDeformVert *dvert;
- int i, done;
-
- dg=BLI_findlink(&ob->defbase, ob->actdef-1);
-
- if(ob->type == OB_MESH) {
- Mesh *me= ob->data;
- EditMesh *em = BKE_mesh_get_editmesh(me);
-
- if(!CustomData_has_layer(&em->vdata, CD_MDEFORMVERT))
- EM_add_data_layer(em, &em->vdata, CD_MDEFORMVERT);
-
- /* Go through the list of editverts and assign them */
- for(eve=em->verts.first; eve; eve=eve->next){
- dvert= CustomData_em_get(&em->vdata, eve->data, CD_MDEFORMVERT);
-
- if(dvert && (eve->f & 1)){
- done=0;
- /* See if this vert already has a reference to this group */
- /* If so: Change its weight */
- done=0;
- for(i=0; i<dvert->totweight; i++){
- eg = BLI_findlink(&ob->defbase, dvert->dw[i].def_nr);
- /* Find the actual group */
- if(eg==dg){
- dvert->dw[i].weight= weight;
- done=1;
- break;
- }
- }
- /* If not: Add the group and set its weight */
- if(!done){
- newdw = MEM_callocN(sizeof(MDeformWeight)*(dvert->totweight+1), "deformWeight");
- if(dvert->dw){
- memcpy(newdw, dvert->dw, sizeof(MDeformWeight)*dvert->totweight);
- MEM_freeN(dvert->dw);
- }
- dvert->dw=newdw;
-
- dvert->dw[dvert->totweight].weight= weight;
- dvert->dw[dvert->totweight].def_nr= ob->actdef-1;
-
- dvert->totweight++;
-
- }
- }
- }
- BKE_mesh_end_editmesh(me, em);
- }
- else if(ob->type == OB_LATTICE) {
- Lattice *lt= vgroup_edit_lattice(ob);
- BPoint *bp;
- int a, tot;
-
- if(lt->dvert==NULL)
- ED_vgroup_data_create(&lt->id);
-
- tot= lt->pntsu*lt->pntsv*lt->pntsw;
- for(a=0, bp= lt->def; a<tot; a++, bp++) {
- if(bp->f1 & SELECT)
- ED_vgroup_nr_vert_add(ob, ob->actdef-1, a, weight, WEIGHT_REPLACE);
- }
+ /* give user choices of adding to current/new or removing from current */
+// XXX if (defCount && ob->actdef)
+// mode = pupmenu("Vertex Groups %t|Add Selected to New Group %x1|Add Selected to Active Group %x2|Remove Selected from Active Group %x3|Remove Selected from All Groups %x4");
+// else
+// mode= pupmenu("Vertex Groups %t|Add Selected to New Group %x1");
+
+ /* handle choices */
+ switch (mode) {
+ case 1: /* add to new group */
+ add_defgroup(ob);
+ assign_verts_defgroup(ob, paint_brush(&wp->paint)->alpha);
+ BIF_undo_push("Assign to vertex group");
+ break;
+ case 2: /* add to current group */
+ assign_verts_defgroup(ob, paint_brush(&wp->paint)->alpha);
+ BIF_undo_push("Assign to vertex group");
+ break;
+ case 3: /* remove from current group */
+ remove_verts_defgroup(ob, 0);
+ BIF_undo_push("Remove from vertex group");
+ break;
+ case 4: /* remove from all groups */
+ remove_verts_defgroups(ob, 0);
+ BIF_undo_push("Remove from all vertex groups");
+ break;
}
}
-/* only in editmode */
-/* removes from all defgroup, if allverts==0 only selected vertices */
-static void vgroup_remove_verts(Object *ob, int allverts)
+/* This function provides a shortcut for commonly used vertex group
+ * functions - change weight (not implemented), change active group, delete active group,
+ * when Ctrl-Shift-G is used in EditMode, for Meshes and Lattices (only for now).
+ */
+void vgroup_operation_with_menu(Object *ob)
{
- int actdef, defCount;
+ int defCount;
+ int mode= 0;
+
+ /* prevent crashes and useless cases */
+ if (ob==NULL) return;
- actdef= ob->actdef;
defCount= BLI_countlist(&ob->defbase);
+ if (defCount == 0) return;
- if(defCount == 0)
- return;
+ /* give user choices of adding to current/new or removing from current */
+// XXX if (ob->actdef)
+// mode = pupmenu("Vertex Groups %t|Change Active Group%x1|Delete Active Group%x2|Delete All Groups%x3");
+// else
+// mode= pupmenu("Vertex Groups %t|Change Active Group%x1|Delete All Groups%x3");
- /* To prevent code redundancy, we just use vgroup_active_remove_verts, but that
- * only operates on the active vgroup. So we iterate through all groups, by changing
- * active group index
- */
- for(ob->actdef= 1; ob->actdef <= defCount; ob->actdef++)
- vgroup_active_remove_verts(ob, allverts);
-
- ob->actdef= actdef;
+ /* handle choices */
+ switch (mode) {
+ case 1: /* change active group*/
+ {
+ char *menustr= NULL; // XXX get_vertexgroup_menustr(ob);
+ short nr;
+
+ if (menustr) {
+// XXX nr= pupmenu(menustr);
+
+ if ((nr >= 1) && (nr <= defCount))
+ ob->actdef= nr;
+
+ MEM_freeN(menustr);
+ }
+ }
+ break;
+ case 2: /* delete active group */
+ {
+ del_defgroup(ob);
+ BIF_undo_push("Delete vertex group");
+ }
+ break;
+ case 3: /* delete all groups */
+ {
+ del_all_defgroups(ob);
+ BIF_undo_push("Delete all vertex groups");
+ }
+ break;
+ }
}
/********************** vertex group operators *********************/
-static int vertex_group_poll(bContext *C)
-{
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- ID *data= (ob)? ob->data: NULL;
- return (ob && !ob->id.lib && ELEM(ob->type, OB_MESH, OB_LATTICE) && data && !data->lib);
-}
-
-static int vertex_group_poll_edit(bContext *C)
-{
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- ID *data= (ob)? ob->data: NULL;
-
- if(!(ob && !ob->id.lib && data && !data->lib))
- return 0;
-
- return vgroup_object_in_edit_mode(ob);
-}
-
static int vertex_group_add_exec(bContext *C, wmOperator *op)
{
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ Scene *scene= CTX_data_scene(C);
- ED_vgroup_add(ob);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ if(!ob)
+ return OPERATOR_CANCELLED;
+
+ add_defgroup(ob);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
return OPERATOR_FINISHED;
}
@@ -995,7 +1124,6 @@ void OBJECT_OT_vertex_group_add(wmOperatorType *ot)
ot->idname= "OBJECT_OT_vertex_group_add";
/* api callbacks */
- ot->poll= vertex_group_poll;
ot->exec= vertex_group_add_exec;
/* flags */
@@ -1005,15 +1133,20 @@ void OBJECT_OT_vertex_group_add(wmOperatorType *ot)
static int vertex_group_remove_exec(bContext *C, wmOperator *op)
{
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ Scene *scene= CTX_data_scene(C);
- if(RNA_boolean_get(op->ptr, "all"))
- vgroup_delete_all(ob);
- else
- vgroup_delete(ob);
+ if(!ob)
+ return OPERATOR_CANCELLED;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ if(scene->obedit == ob) {
+ del_defgroup(ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
+ else {
+ del_defgroup_in_object_mode(ob);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
return OPERATOR_FINISHED;
}
@@ -1025,27 +1158,24 @@ void OBJECT_OT_vertex_group_remove(wmOperatorType *ot)
ot->idname= "OBJECT_OT_vertex_group_remove";
/* api callbacks */
- ot->poll= vertex_group_poll;
ot->exec= vertex_group_remove_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups.");
}
static int vertex_group_assign_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
ToolSettings *ts= CTX_data_tool_settings(C);
Object *ob= CTX_data_edit_object(C);
- if(RNA_boolean_get(op->ptr, "new"))
- ED_vgroup_add(ob);
+ if(!ob)
+ return OPERATOR_CANCELLED;
- vgroup_assign_verts(ob, ts->vgroup_weight);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ assign_verts_defgroup(ob, ts->vgroup_weight);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
return OPERATOR_FINISHED;
}
@@ -1057,24 +1187,24 @@ void OBJECT_OT_vertex_group_assign(wmOperatorType *ot)
ot->idname= "OBJECT_OT_vertex_group_assign";
/* api callbacks */
- ot->poll= vertex_group_poll_edit;
ot->exec= vertex_group_assign_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- 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)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_edit_object(C);
- vgroup_remove_verts(ob, 0);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ if(!ob)
+ return OPERATOR_CANCELLED;
+ remove_verts_defgroup(ob, 0);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+
return OPERATOR_FINISHED;
}
@@ -1083,27 +1213,23 @@ void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot)
/* identifiers */
ot->name= "Remove from Vertex Group";
ot->idname= "OBJECT_OT_vertex_group_remove_from";
-
+
/* api callbacks */
- ot->poll= vertex_group_poll_edit;
ot->exec= vertex_group_remove_from_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups.");
}
static int vertex_group_select_exec(bContext *C, wmOperator *op)
{
Object *ob= CTX_data_edit_object(C);
- if(!ob || ob->id.lib)
+ if(!ob)
return OPERATOR_CANCELLED;
- vgroup_select_verts(ob, 1);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data);
+ sel_verts_defgroup(ob, 1); /* runs countall() */
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -1113,9 +1239,8 @@ void OBJECT_OT_vertex_group_select(wmOperatorType *ot)
/* identifiers */
ot->name= "Select Vertex Group";
ot->idname= "OBJECT_OT_vertex_group_select";
-
+
/* api callbacks */
- ot->poll= vertex_group_poll_edit;
ot->exec= vertex_group_select_exec;
/* flags */
@@ -1126,8 +1251,11 @@ static int vertex_group_deselect_exec(bContext *C, wmOperator *op)
{
Object *ob= CTX_data_edit_object(C);
- vgroup_select_verts(ob, 0);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data);
+ if(!ob)
+ return OPERATOR_CANCELLED;
+
+ sel_verts_defgroup(ob, 0); /* runs countall() */
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -1137,9 +1265,8 @@ void OBJECT_OT_vertex_group_deselect(wmOperatorType *ot)
/* identifiers */
ot->name= "Deselect Vertex Group";
ot->idname= "OBJECT_OT_vertex_group_deselect";
-
+
/* api callbacks */
- ot->poll= vertex_group_poll_edit;
ot->exec= vertex_group_deselect_exec;
/* flags */
@@ -1148,13 +1275,16 @@ void OBJECT_OT_vertex_group_deselect(wmOperatorType *ot)
static int vertex_group_copy_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- vgroup_duplicate(ob);
- DAG_id_flush_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);
+ if(!ob)
+ return OPERATOR_CANCELLED;
+ duplicate_defgroup(ob);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+
return OPERATOR_FINISHED;
}
@@ -1163,9 +1293,8 @@ void OBJECT_OT_vertex_group_copy(wmOperatorType *ot)
/* identifiers */
ot->name= "Copy Vertex Group";
ot->idname= "OBJECT_OT_vertex_group_copy";
-
+
/* api callbacks */
- ot->poll= vertex_group_poll;
ot->exec= vertex_group_copy_exec;
/* flags */
@@ -1176,25 +1305,27 @@ static int vertex_group_copy_to_linked_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Base *base;
+ Base *base;
int retval= OPERATOR_CANCELLED;
- for(base=scene->base.first; base; base= base->next) {
- if(base->object->type==ob->type) {
- if(base->object!=ob && base->object->data==ob->data) {
- BLI_freelistN(&base->object->defbase);
- BLI_duplicatelist(&base->object->defbase, &ob->defbase);
- base->object->actdef= ob->actdef;
+ if(!ob)
+ return retval;
- DAG_id_flush_update(&base->object->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, base->object);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, base->object->data);
+ for(base=scene->base.first; base; base= base->next) {
+ if(base->object->type==ob->type) {
+ if(base->object!=ob && base->object->data==ob->data) {
+ BLI_freelistN(&base->object->defbase);
+ BLI_duplicatelist(&base->object->defbase, &ob->defbase);
+ base->object->actdef= ob->actdef;
- retval = OPERATOR_FINISHED;
- }
- }
- }
+ DAG_object_flush_update(scene, base->object, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, base->object);
+ retval = OPERATOR_FINISHED;
+ }
+ }
+ }
+
return retval;
}
@@ -1203,119 +1334,11 @@ void OBJECT_OT_vertex_group_copy_to_linked(wmOperatorType *ot)
/* identifiers */
ot->name= "Copy Vertex Group to Linked";
ot->idname= "OBJECT_OT_vertex_group_copy_to_linked";
-
- /* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_copy_to_linked_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-static EnumPropertyItem vgroup_items[]= {
- {0, NULL, 0, NULL, NULL}};
-
-static int set_active_group_exec(bContext *C, wmOperator *op)
-{
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- int nr= RNA_enum_get(op->ptr, "group");
-
- ob->actdef= nr+1;
-
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
-
- return OPERATOR_FINISHED;
-}
-
-static EnumPropertyItem *vgroup_itemf(bContext *C, PointerRNA *ptr, int *free)
-{
- Object *ob;
- EnumPropertyItem tmp = {0, "", 0, "", ""};
- EnumPropertyItem *item= NULL;
- bDeformGroup *def;
- int a, totitem= 0;
- if(!C || !(ob = CTX_data_pointer_get_type(C, "object", &RNA_Object).data)) /* needed for docs */
- return vgroup_items;
-
- for(a=0, def=ob->defbase.first; def; def=def->next, a++) {
- tmp.value= a;
- tmp.identifier= def->name;
- tmp.name= def->name;
- RNA_enum_item_add(&item, &totitem, &tmp);
- }
-
- RNA_enum_item_end(&item, &totitem);
-
- *free= 1;
-
- return item;
-}
-
-void OBJECT_OT_vertex_group_set_active(wmOperatorType *ot)
-{
- PropertyRNA *prop;
-
- /* identifiers */
- ot->name= "Set Active Vertex Group";
- ot->idname= "OBJECT_OT_vertex_group_set_active";
-
/* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= set_active_group_exec;
- ot->invoke= WM_menu_invoke;
+ ot->exec= vertex_group_copy_to_linked_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- prop= RNA_def_enum(ot->srna, "group", vgroup_items, 0, "Group", "Vertex group to set as active.");
- RNA_def_enum_funcs(prop, vgroup_itemf);
-}
-
-static int vertex_group_menu_exec(bContext *C, wmOperator *op)
-{
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- uiPopupMenu *pup;
- uiLayout *layout;
-
- pup= uiPupMenuBegin(C, "Vertex Groups", 0);
- layout= uiPupMenuLayout(pup);
- uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_REGION_WIN);
-
- if(vgroup_object_in_edit_mode(ob)) {
- uiItemBooleanO(layout, "Assign to New Group", 0, "OBJECT_OT_vertex_group_assign", "new", 1);
-
- if(BLI_countlist(&ob->defbase) && ob->actdef) {
- uiItemO(layout, "Assign to Group", 0, "OBJECT_OT_vertex_group_assign");
- uiItemO(layout, "Remove from Group", 0, "OBJECT_OT_vertex_group_remove_from");
- uiItemBooleanO(layout, "Remove from All", 0, "OBJECT_OT_vertex_group_remove_from", "all", 1);
- }
- }
-
- if(BLI_countlist(&ob->defbase) && ob->actdef) {
- if(vgroup_object_in_edit_mode(ob))
- uiItemS(layout);
-
- uiItemO(layout, "Set Active Group", 0, "OBJECT_OT_vertex_group_set_active");
- uiItemO(layout, "Remove Group", 0, "OBJECT_OT_vertex_group_remove");
- uiItemBooleanO(layout, "Remove All Groups", 0, "OBJECT_OT_vertex_group_remove", "all", 1);
- }
-
- uiPupMenuEnd(C, pup);
-
- return OPERATOR_FINISHED;
-}
-
-void OBJECT_OT_vertex_group_menu(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Vertex Group Menu";
- ot->idname= "OBJECT_OT_vertex_group_menu";
-
- /* api callbacks */
- ot->poll= vertex_group_poll;
- ot->exec= vertex_group_menu_exec;
}
diff --git a/source/blender/editors/physics/ed_fluidsim.c b/source/blender/editors/physics/ed_fluidsim.c
index 093fa3f0a49..907d3f99f77 100644
--- a/source/blender/editors/physics/ed_fluidsim.c
+++ b/source/blender/editors/physics/ed_fluidsim.c
@@ -200,28 +200,6 @@ static void fluidsimPrintChannel(FILE *file, float *channel, int paramsize, char
static void fluidsimInitChannel(Scene *scene, float **setchannel, int size, float *time,
int *icuIds, float *defaults, Ipo* ipo, int entries)
{
-
- int i, j;
- char *cstr = NULL;
- float *channel = NULL;
-
- cstr = "fluidsiminit_channelfloat";
- if(entries>1) cstr = "fluidsiminit_channelvec";
- channel = MEM_callocN( size* (entries+1)* sizeof(float), cstr );
-
- /* defaults for now */
- for(j=0; j<entries; j++) {
- for(i=1; i<=size; i++) {
- channel[(i-1)*(entries+1) + j] = defaults[j];
- }
- }
-
- for(i=1; i<=size; i++) {
- channel[(i-1)*(entries+1) + entries] = time[i];
- }
-
- *setchannel = channel;
-
#if 0
/* goes away completely */
int i,j;
diff --git a/source/blender/editors/physics/ed_pointcache.c b/source/blender/editors/physics/ed_pointcache.c
index f2c7b64032f..917e2b40d72 100644
--- a/source/blender/editors/physics/ed_pointcache.c
+++ b/source/blender/editors/physics/ed_pointcache.c
@@ -46,7 +46,6 @@
#include "ED_screen.h"
#include "ED_physics.h"
-#include "ED_particle.h"
#include "UI_interface.h"
#include "UI_resources.h"
@@ -72,12 +71,6 @@ static int ptcache_bake_all_poll(bContext *C)
return 1;
}
-static int ptcache_poll(bContext *C)
-{
- PointerRNA ptr= CTX_data_pointer_get_type(C, "PointCache", &RNA_PointCache);
- return (ptr.data && ptr.id.data);
-}
-
static int ptcache_bake_all_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
@@ -191,16 +184,8 @@ static int ptcache_free_bake_exec(bContext *C, wmOperator *op)
{
PointerRNA ptr= CTX_data_pointer_get_type(C, "PointCache", &RNA_PointCache);
PointCache *cache= ptr.data;
-
- if(cache->edit) {
- if(!cache->edit->edited || 1) {// XXX okee("Lose changes done in particle mode?")) {
- PE_free_ptcache_edit(cache->edit);
- cache->edit = NULL;
- cache->flag &= ~PTCACHE_BAKED;
- }
- }
- else
- cache->flag &= ~PTCACHE_BAKED;
+
+ cache->flag &= ~PTCACHE_BAKED;
return OPERATOR_FINISHED;
}
@@ -221,12 +206,12 @@ void PTCACHE_OT_bake(wmOperatorType *ot)
/* api callbacks */
ot->exec= ptcache_bake_exec;
- ot->poll= ptcache_poll;
+ ot->poll= ptcache_bake_all_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_boolean(ot->srna, "bake", 0, "Bake", "");
+ RNA_def_boolean(ot->srna, "bake", 1, "Bake", "");
}
void PTCACHE_OT_free_bake(wmOperatorType *ot)
{
@@ -236,7 +221,7 @@ void PTCACHE_OT_free_bake(wmOperatorType *ot)
/* api callbacks */
ot->exec= ptcache_free_bake_exec;
- ot->poll= ptcache_poll;
+ ot->poll= ptcache_bake_all_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -249,7 +234,7 @@ void PTCACHE_OT_bake_from_cache(wmOperatorType *ot)
/* api callbacks */
ot->exec= ptcache_bake_from_cache_exec;
- ot->poll= ptcache_poll;
+ ot->poll= ptcache_bake_all_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -314,7 +299,7 @@ void PTCACHE_OT_add_new(wmOperatorType *ot)
/* api callbacks */
ot->exec= ptcache_add_new_exec;
- ot->poll= ptcache_poll; // ptcache_bake_all_poll;
+ ot->poll= ptcache_bake_all_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -327,7 +312,7 @@ void PTCACHE_OT_remove(wmOperatorType *ot)
/* api callbacks */
ot->exec= ptcache_remove_exec;
- ot->poll= ptcache_poll;
+ ot->poll= ptcache_bake_all_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
diff --git a/source/blender/editors/physics/editparticle.c b/source/blender/editors/physics/editparticle.c
index 0f5e677b912..b92632b45af 100644
--- a/source/blender/editors/physics/editparticle.c
+++ b/source/blender/editors/physics/editparticle.c
@@ -57,8 +57,7 @@
#include "BKE_particle.h"
#include "BKE_report.h"
#include "BKE_scene.h"
-#include "BKE_utildefines.h"
-#include "BKE_pointcache.h"
+#include "BKE_utildefines.h"
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
@@ -86,23 +85,11 @@
#include "physics_intern.h"
-static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache, ParticleSystem *psys);
-static void PTCacheUndo_clear(PTCacheEdit *edit);
+static void PE_create_particle_edit(Scene *scene, Object *ob, ParticleSystem *psys);
+static void ParticleUndo_clear(ParticleSystem *psys);
-#define KEY_K PTCacheEditKey *key; int k
-#define POINT_P PTCacheEditPoint *point; int p
-#define LOOP_POINTS for(p=0, point=edit->points; p<edit->totpoint; p++, point++)
-#define LOOP_VISIBLE_POINTS for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(!(point->flag & PEP_HIDE))
-#define LOOP_SELECTED_POINTS for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(point_is_selected(point))
-#define LOOP_UNSELECTED_POINTS for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(!point_is_selected(point))
-#define LOOP_EDITED_POINTS for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(point->flag & PEP_EDIT_RECALC)
-#define LOOP_TAGGED_POINTS for(p=0, point=edit->points; p<edit->totpoint; p++, point++) if(point->flag & PEP_TAG)
-#define LOOP_KEYS for(k=0, key=point->keys; k<point->totkey; k++, key++)
-#define LOOP_VISIBLE_KEYS for(k=0, key=point->keys; k<point->totkey; k++, key++) if(!(key->flag & PEK_HIDE))
-#define LOOP_SELECTED_KEYS for(k=0, key=point->keys; k<point->totkey; k++, key++) if((key->flag & PEK_SELECT) && !(key->flag & PEK_HIDE))
-#define LOOP_TAGGED_KEYS for(k=0, key=point->keys; k<point->totkey; k++, key++) if(key->flag & PEK_TAG)
-
-#define KEY_WCO (key->flag & PEK_USE_WCO ? key->world_co : key->co)
+#define LOOP_PARTICLES(i, pa) for(i=0, pa=psys->particles; i<totpart; i++, pa++)
+#define LOOP_KEYS(k, key) if(psys->edit)for(k=0, key=psys->edit->keys[i]; k<pa->totkey; k++, key++)
/**************************** utilities *******************************/
@@ -110,14 +97,14 @@ static int PE_poll(bContext *C)
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
- PTCacheEdit *edit;
+ ParticleSystem *psys;
if(!scene || !ob)
return 0;
- edit= PE_get_current(scene, ob);
+ psys= PE_get_current(scene, ob);
- return (edit && (ob->mode & OB_MODE_PARTICLE_EDIT));
+ return (psys && psys->edit && (ob && ob->mode & OB_MODE_PARTICLE_EDIT));
}
static int PE_poll_3dview(bContext *C)
@@ -126,21 +113,22 @@ static int PE_poll_3dview(bContext *C)
CTX_wm_region(C)->regiontype == RGN_TYPE_WINDOW;
}
-void PE_free_ptcache_edit(PTCacheEdit *edit)
+static void PE_free_particle_edit(ParticleSystem *psys)
{
- POINT_P;
+ ParticleEdit *edit= psys->edit;
+ int i, totpart= psys->totpart;
if(edit==0) return;
- PTCacheUndo_clear(edit);
+ ParticleUndo_clear(psys);
- if(edit->points) {
- LOOP_POINTS {
- if(point->keys)
- MEM_freeN(point->keys);
+ if(edit->keys) {
+ for(i=0; i<totpart; i++) {
+ if(edit->keys[i])
+ MEM_freeN(edit->keys[i]);
}
- MEM_freeN(edit->points);
+ MEM_freeN(edit->keys);
}
if(edit->mirror_cache)
@@ -156,23 +144,19 @@ void PE_free_ptcache_edit(PTCacheEdit *edit)
edit->emitter_field= 0;
}
- psys_free_path_cache(NULL, edit);
-
MEM_freeN(edit);
+
+ psys->edit= NULL;
+ psys->free_edit= NULL;
}
/************************************************/
/* Edit Mode Helpers */
/************************************************/
-int PE_start_edit(PTCacheEdit *edit)
+int PE_can_edit(ParticleSystem *psys)
{
- if(edit) {
- edit->edited = 1;
- return 1;
- }
-
- return 0;
+ return (psys && psys->edit);
}
ParticleEditSettings *PE_settings(Scene *scene)
@@ -181,99 +165,73 @@ ParticleEditSettings *PE_settings(Scene *scene)
}
/* always gets atleast the first particlesystem even if PSYS_CURRENT flag is not set */
-PTCacheEdit *PE_get_current(Scene *scene, Object *ob)
+ParticleSystem *PE_get_current(Scene *scene, Object *ob)
{
- ParticleEditSettings *pset= PE_settings(scene);
- PTCacheEdit *edit = NULL;
- ListBase pidlist;
- PTCacheID *pid;
-
- pset->scene = scene;
- pset->object = ob;
+ ParticleSystem *psys;
if(ob==NULL)
return NULL;
- BKE_ptcache_ids_from_object(&pidlist, ob);
-
- /* in the case of only one editable thing, set pset->edittype accordingly */
- if(pidlist.first && pidlist.first == pidlist.last) {
- pid = pidlist.first;
- switch(pid->type) {
- case PTCACHE_TYPE_PARTICLES:
- pset->edittype = PE_TYPE_PARTICLES;
- break;
- case PTCACHE_TYPE_SOFTBODY:
- pset->edittype = PE_TYPE_SOFTBODY;
- break;
- case PTCACHE_TYPE_CLOTH:
- pset->edittype = PE_TYPE_CLOTH;
- break;
- }
+ psys= ob->particlesystem.first;
+ while(psys) {
+ if(psys->flag & PSYS_CURRENT)
+ break;
+ psys=psys->next;
}
- for(pid=pidlist.first; pid; pid=pid->next) {
- if(pset->edittype == PE_TYPE_PARTICLES && pid->type == PTCACHE_TYPE_PARTICLES) {
- ParticleSystem *psys = pid->calldata;
+ if(psys==NULL && ob->particlesystem.first) {
+ psys=ob->particlesystem.first;
+ psys->flag |= PSYS_CURRENT;
+ }
- if(psys->flag & PSYS_CURRENT) {
- if(psys->part && psys->part->type == PART_HAIR) {
- if(!psys->edit && psys->flag & PSYS_HAIR_DONE)
- PE_create_particle_edit(scene, ob, NULL, psys);
- edit = psys->edit;
- }
- else {
- if(pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit)
- PE_create_particle_edit(scene, ob, pid->cache, psys);
- edit = pid->cache->edit;
- }
+ /* this happens when Blender is started with particle
+ * edit mode enabled XXX there's a draw error then? */
+ if(psys && psys_check_enabled(ob, psys) && (ob == OBACT) && (ob->mode & OB_MODE_PARTICLE_EDIT))
+ if(psys->part->type == PART_HAIR && psys->flag & PSYS_EDITED)
+ if(psys->edit == NULL)
+ PE_create_particle_edit(scene, ob, psys);
- break;
- }
- }
- else if(pset->edittype == PE_TYPE_SOFTBODY && pid->type == PTCACHE_TYPE_SOFTBODY) {
- if(pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit)
- PE_create_particle_edit(scene, ob, pid->cache, NULL);
- edit = pid->cache->edit;
- break;
- }
- else if(pset->edittype == PE_TYPE_CLOTH && pid->type == PTCACHE_TYPE_CLOTH) {
- if(pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit)
- PE_create_particle_edit(scene, ob, pid->cache, NULL);
- edit = pid->cache->edit;
- break;
- }
- }
+ return psys;
+}
- if(edit)
- edit->pid = *pid;
+/* returns -1 if no system has PSYS_CURRENT flag */
+short PE_get_current_num(Object *ob)
+{
+ short num=0;
+ ParticleSystem *psys= ob->particlesystem.first;
- BLI_freelistN(&pidlist);
+ while(psys) {
+ if(psys->flag & PSYS_CURRENT)
+ return num;
+ num++;
+ psys=psys->next;
+ }
- return edit;
+ return -1;
}
-void PE_hide_keys_time(Scene *scene, PTCacheEdit *edit, float cfra)
+void PE_hide_keys_time(Scene *scene, ParticleSystem *psys, float cfra)
{
+ ParticleData *pa;
+ ParticleEditKey *key;
ParticleEditSettings *pset=PE_settings(scene);
- POINT_P; KEY_K;
+ int i, k, totpart= psys->totpart;
-
- if(pset->flag & PE_FADE_TIME && pset->selectmode==SCE_SELECT_POINT) {
- LOOP_POINTS {
- LOOP_KEYS {
- if(fabs(cfra-*key->time) < pset->fade_frames)
+ if(pset->draw_timed && pset->selectmode==SCE_SELECT_POINT) {
+ LOOP_PARTICLES(i, pa) {
+ LOOP_KEYS(k, key) {
+ if(fabs(cfra-*key->time) < pset->draw_timed)
key->flag &= ~PEK_HIDE;
else {
key->flag |= PEK_HIDE;
- //key->flag &= ~PEK_SELECT;
+ key->flag &= ~PEK_SELECT;
}
}
}
}
else {
- LOOP_POINTS {
- LOOP_KEYS {
+ LOOP_PARTICLES(i, pa) {
+ LOOP_KEYS(k, key) {
key->flag &= ~PEK_HIDE;
}
}
@@ -289,7 +247,7 @@ typedef struct PEData {
Scene *scene;
Object *ob;
DerivedMesh *dm;
- PTCacheEdit *edit;
+ ParticleSystem *psys;
short *mval;
rcti *rect;
@@ -318,7 +276,7 @@ static void PE_set_data(bContext *C, PEData *data)
data->scene= CTX_data_scene(C);
data->ob= CTX_data_active_object(C);
- data->edit= PE_get_current(data->scene, data->ob);
+ data->psys= PE_get_current(data->scene, data->ob);
}
static void PE_set_view3d_data(bContext *C, PEData *data)
@@ -430,103 +388,121 @@ static int key_inside_test(PEData *data, float co[3])
return key_inside_rect(data, co);
}
-static int point_is_selected(PTCacheEditPoint *point)
+static int particle_is_selected(ParticleSystem *psys, ParticleData *pa)
{
- KEY_K;
- int sel;
+ ParticleEditKey *key;
+ int sel, i, k;
- if(point->flag & PEP_HIDE)
+ if(pa->flag & PARS_HIDE)
return 0;
sel= 0;
+ i= pa - psys->particles;
- LOOP_SELECTED_KEYS {
- return 1;
- }
+ LOOP_KEYS(k, key)
+ if(key->flag & PEK_SELECT)
+ return 1;
return 0;
}
/*************************** iterators *******************************/
-typedef void (*ForPointFunc)(PEData *data, int point_index);
-typedef void (*ForKeyFunc)(PEData *data, int point_index, int key_index);
-typedef void (*ForKeyMatFunc)(PEData *data, float mat[][4], float imat[][4], int point_index, int key_index, PTCacheEditKey *key);
+typedef void (*ForParticleFunc)(PEData *data, int pa_index);
+typedef void (*ForKeyFunc)(PEData *data, int pa_index, int key_index);
+typedef void (*ForKeyMatFunc)(PEData *data, float mat[][4], float imat[][4], int pa_index, int key_index);
static void for_mouse_hit_keys(PEData *data, ForKeyFunc func, int nearest)
{
+ ParticleSystem *psys= data->psys;
+ ParticleEdit *edit= psys->edit;
+ ParticleData *pa;
+ ParticleEditKey *key;
ParticleEditSettings *pset= PE_settings(data->scene);
- PTCacheEdit *edit= data->edit;
- POINT_P; KEY_K;
- int nearest_point, nearest_key;
+ int i, k, totpart, nearest_pa, nearest_key;
float dist= data->rad;
/* in path select mode we have no keys */
if(pset->selectmode==SCE_SELECT_PATH)
return;
- nearest_point= -1;
+ totpart= psys->totpart;
+ nearest_pa= -1;
nearest_key= -1;
- LOOP_VISIBLE_POINTS {
+ LOOP_PARTICLES(i, pa) {
+ if(pa->flag & PARS_HIDE) continue;
+
if(pset->selectmode == SCE_SELECT_END) {
/* only do end keys */
- key= point->keys + point->totkey-1;
+ key= edit->keys[i] + pa->totkey-1;
if(nearest) {
- if(key_inside_circle(data, dist, KEY_WCO, &dist)) {
- nearest_point= p;
- nearest_key= point->totkey-1;
+ if(key_inside_circle(data, dist, key->world_co, &dist)) {
+ nearest_pa= i;
+ nearest_key= pa->totkey-1;
}
}
- else if(key_inside_test(data, KEY_WCO))
- func(data, p, point->totkey-1);
+ else if(key_inside_test(data, key->world_co))
+ func(data, i, pa->totkey-1);
}
else {
/* do all keys */
- LOOP_VISIBLE_KEYS {
+ key= edit->keys[i];
+
+ LOOP_KEYS(k, key) {
+ if(key->flag & PEK_HIDE) continue;
+
if(nearest) {
- if(key_inside_circle(data, dist, KEY_WCO, &dist)) {
- nearest_point= p;
+ if(key_inside_circle(data, dist, key->world_co, &dist)) {
+ nearest_pa= i;
nearest_key= k;
}
}
- else if(key_inside_test(data, KEY_WCO))
- func(data, p, k);
+ else if(key_inside_test(data, key->world_co))
+ func(data, i, k);
}
}
}
/* do nearest only */
- if(nearest && nearest_point > -1)
- func(data, nearest_point, nearest_key);
+ if(nearest && nearest_pa > -1)
+ func(data, nearest_pa, nearest_key);
}
-static void foreach_mouse_hit_point(PEData *data, ForPointFunc func, int selected)
+static void foreach_mouse_hit_particle(PEData *data, ForParticleFunc func, int selected)
{
+ ParticleSystem *psys= data->psys;
+ ParticleData *pa;
+ ParticleEditKey *key;
ParticleEditSettings *pset= PE_settings(data->scene);
- PTCacheEdit *edit= data->edit;
- POINT_P; KEY_K;
+ int i, k, totpart;
+
+ totpart= psys->totpart;
/* all is selected in path mode */
if(pset->selectmode==SCE_SELECT_PATH)
selected=0;
- LOOP_VISIBLE_POINTS {
+ LOOP_PARTICLES(i, pa) {
+ if(pa->flag & PARS_HIDE) continue;
+
if(pset->selectmode==SCE_SELECT_END) {
/* only do end keys */
- key= point->keys + point->totkey - 1;
+ key= psys->edit->keys[i] + pa->totkey-1;
if(selected==0 || key->flag & PEK_SELECT)
- if(key_inside_circle(data, data->rad, KEY_WCO, &data->dist))
- func(data, p);
+ if(key_inside_circle(data, data->rad, key->world_co, &data->dist))
+ func(data, i);
}
else {
/* do all keys */
- LOOP_VISIBLE_KEYS {
+ LOOP_KEYS(k, key) {
+ if(key->flag & PEK_HIDE) continue;
+
if(selected==0 || key->flag & PEK_SELECT) {
- if(key_inside_circle(data, data->rad, KEY_WCO, &data->dist)) {
- func(data, p);
+ if(key_inside_circle(data, data->rad, key->world_co, &data->dist)) {
+ func(data, i);
break;
}
}
@@ -537,15 +513,16 @@ static void foreach_mouse_hit_point(PEData *data, ForPointFunc func, int selecte
static void foreach_mouse_hit_key(PEData *data, ForKeyMatFunc func, int selected)
{
- PTCacheEdit *edit = data->edit;
- ParticleSystem *psys = edit->psys;
- ParticleSystemModifierData *psmd = NULL;
+ ParticleSystem *psys= data->psys;
+ ParticleData *pa;
+ ParticleEditKey *key;
+ ParticleSystemModifierData *psmd=0;
ParticleEditSettings *pset= PE_settings(data->scene);
- POINT_P; KEY_K;
+ int i, k, totpart;
float mat[4][4], imat[4][4];
- if(edit->psys)
- psmd= psys_get_modifier(data->ob, edit->psys);
+ psmd= psys_get_modifier(data->ob,psys);
+ totpart= psys->totpart;
/* all is selected in path mode */
if(pset->selectmode==SCE_SELECT_PATH)
@@ -554,77 +531,99 @@ static void foreach_mouse_hit_key(PEData *data, ForKeyMatFunc func, int selected
Mat4One(imat);
Mat4One(mat);
- LOOP_VISIBLE_POINTS {
- if(edit->psys && !(edit->psys->flag & PSYS_GLOBAL_HAIR)) {
- psys_mat_hair_to_global(data->ob, psmd->dm, psys->part->from, psys->particles + p, mat);
- Mat4Invert(imat,mat);
- }
+ LOOP_PARTICLES(i, pa) {
+ if(pa->flag & PARS_HIDE) continue;
+
+ psys_mat_hair_to_global(data->ob, psmd->dm, psys->part->from, pa, mat);
+ Mat4Invert(imat,mat);
if(pset->selectmode==SCE_SELECT_END) {
/* only do end keys */
- key= point->keys + point->totkey-1;
+ key= psys->edit->keys[i] + pa->totkey-1;
if(selected==0 || key->flag & PEK_SELECT)
- if(key_inside_circle(data, data->rad, KEY_WCO, &data->dist))
- func(data, mat, imat, p, point->totkey-1, key);
+ if(key_inside_circle(data, data->rad, key->world_co, &data->dist))
+ func(data, mat, imat, i, pa->totkey-1);
}
else {
/* do all keys */
- LOOP_VISIBLE_KEYS {
+ LOOP_KEYS(k, key) {
+ if(key->flag&PEK_HIDE) continue;
+
if(selected==0 || key->flag & PEK_SELECT)
- if(key_inside_circle(data, data->rad, KEY_WCO, &data->dist))
- func(data, mat, imat, p, k, key);
+ if(key_inside_circle(data, data->rad, key->world_co, &data->dist))
+ func(data, mat, imat, i, k);
}
}
}
}
-static void foreach_selected_point(PEData *data, ForPointFunc func)
+static void foreach_selected_particle(PEData *data, ForParticleFunc func)
{
- PTCacheEdit *edit = data->edit;
- POINT_P;
+ ParticleSystem *psys= data->psys;
+ ParticleData *pa;
+ int i, totpart;
- LOOP_SELECTED_POINTS {
- func(data, p);
- }
+ totpart= psys->totpart;
+
+ LOOP_PARTICLES(i, pa)
+ if(particle_is_selected(psys, pa))
+ func(data, i);
}
static void foreach_selected_key(PEData *data, ForKeyFunc func)
{
- PTCacheEdit *edit = data->edit;
- POINT_P; KEY_K;
+ ParticleSystem *psys= data->psys;
+ ParticleData *pa;
+ ParticleEditKey *key;
+ int i, k, totpart;
- LOOP_VISIBLE_POINTS {
- LOOP_SELECTED_KEYS {
- func(data, p, k);
- }
+ totpart= psys->totpart;
+
+ LOOP_PARTICLES(i, pa) {
+ if(pa->flag & PARS_HIDE) continue;
+
+ key= psys->edit->keys[i];
+
+ LOOP_KEYS(k, key)
+ if(key->flag & PEK_SELECT)
+ func(data, i, k);
}
}
-static void foreach_point(PEData *data, ForPointFunc func)
+void PE_foreach_particle(PEData *data, ForParticleFunc func)
{
- PTCacheEdit *edit = data->edit;
- POINT_P;
+ ParticleSystem *psys= data->psys;
+ int i, totpart;
- LOOP_POINTS {
- func(data, p);
- }
+ totpart= psys->totpart;
+
+ for(i=0; i<totpart; i++)
+ func(data, i);
}
-static int count_selected_keys(Scene *scene, PTCacheEdit *edit)
+static int count_selected_keys(Scene *scene, ParticleSystem *psys)
{
+ ParticleData *pa;
+ ParticleEditKey *key;
ParticleEditSettings *pset= PE_settings(scene);
- POINT_P; KEY_K;
- int sel= 0;
+ int i, k, totpart, sel= 0;
+
+ totpart= psys->totpart;
+
+ LOOP_PARTICLES(i, pa) {
+ if(pa->flag & PARS_HIDE) continue;
+
+ key= psys->edit->keys[i];
- LOOP_VISIBLE_POINTS {
if(pset->selectmode==SCE_SELECT_POINT) {
- LOOP_SELECTED_KEYS {
- sel++;
- }
+ for(k=0; k<pa->totkey; k++,key++)
+ if(key->flag & PEK_SELECT)
+ sel++;
}
else if(pset->selectmode==SCE_SELECT_END) {
- key = point->keys + point->totkey - 1;
+ key += pa->totkey-1;
+
if(key->flag & PEK_SELECT)
sel++;
}
@@ -639,14 +638,13 @@ static int count_selected_keys(Scene *scene, PTCacheEdit *edit)
static void PE_update_mirror_cache(Object *ob, ParticleSystem *psys)
{
- PTCacheEdit *edit;
+ ParticleEdit *edit;
+ ParticleData *pa;
ParticleSystemModifierData *psmd;
KDTree *tree;
KDTreeNearest nearest;
- HairKey *key;
- PARTICLE_P;
float mat[4][4], co[3];
- int index, totpart;
+ int i, index, totpart;
edit= psys->edit;
psmd= psys_get_modifier(ob, psys);
@@ -655,12 +653,11 @@ static void PE_update_mirror_cache(Object *ob, ParticleSystem *psys)
tree= BLI_kdtree_new(totpart);
/* insert particles into kd tree */
- LOOP_PARTICLES {
- key = pa->hair;
+ LOOP_PARTICLES(i, pa) {
psys_mat_hair_to_orco(ob, psmd->dm, psys->part->from, pa, mat);
- VECCOPY(co, key->co);
+ VECCOPY(co, pa->hair[0].co);
Mat4MulVecfl(mat, co);
- BLI_kdtree_insert(tree, p, co, NULL);
+ BLI_kdtree_insert(tree, i, co, NULL);
}
BLI_kdtree_balance(tree);
@@ -669,28 +666,27 @@ static void PE_update_mirror_cache(Object *ob, ParticleSystem *psys)
if(!edit->mirror_cache)
edit->mirror_cache= MEM_callocN(sizeof(int)*totpart, "PE mirror cache");
- LOOP_PARTICLES {
- key = pa->hair;
+ LOOP_PARTICLES(i, pa) {
psys_mat_hair_to_orco(ob, psmd->dm, psys->part->from, pa, mat);
- VECCOPY(co, key->co);
+ VECCOPY(co, pa->hair[0].co);
Mat4MulVecfl(mat, co);
co[0]= -co[0];
index= BLI_kdtree_find_nearest(tree, co, NULL, &nearest);
/* this needs a custom threshold still, duplicated for editmode mirror */
- if(index != -1 && index != p && (nearest.dist <= 0.0002f))
- edit->mirror_cache[p]= index;
+ if(index != -1 && index != i && (nearest.dist <= 0.0002f))
+ edit->mirror_cache[i]= index;
else
- edit->mirror_cache[p]= -1;
+ edit->mirror_cache[i]= -1;
}
/* make sure mirrors are in two directions */
- LOOP_PARTICLES {
- if(edit->mirror_cache[p]) {
- index= edit->mirror_cache[p];
- if(edit->mirror_cache[index] != p)
- edit->mirror_cache[p]= -1;
+ LOOP_PARTICLES(i, pa) {
+ if(edit->mirror_cache[i]) {
+ index= edit->mirror_cache[i];
+ if(edit->mirror_cache[index] != i)
+ edit->mirror_cache[i]= -1;
}
}
@@ -700,9 +696,8 @@ static void PE_update_mirror_cache(Object *ob, ParticleSystem *psys)
static void PE_mirror_particle(Object *ob, DerivedMesh *dm, ParticleSystem *psys, ParticleData *pa, ParticleData *mpa)
{
HairKey *hkey, *mhkey;
- PTCacheEditPoint *point, *mpoint;
- PTCacheEditKey *key, *mkey;
- PTCacheEdit *edit;
+ ParticleEditKey *key, *mkey;
+ ParticleEdit *edit;
float mat[4][4], mmat[4][4], immat[4][4];
int i, mi, k;
@@ -722,20 +717,17 @@ static void PE_mirror_particle(Object *ob, DerivedMesh *dm, ParticleSystem *psys
else
mi= mpa - psys->particles;
- point = edit->points + i;
- mpoint = edit->points + mi;
-
/* make sure they have the same amount of keys */
if(pa->totkey != mpa->totkey) {
if(mpa->hair) MEM_freeN(mpa->hair);
- if(mpoint->keys) MEM_freeN(mpoint->keys);
+ if(edit->keys[mi]) MEM_freeN(edit->keys[mi]);
mpa->hair= MEM_dupallocN(pa->hair);
- mpoint->keys= MEM_dupallocN(point->keys);
- mpoint->totkey= point->totkey;
+ edit->keys[mi]= MEM_dupallocN(edit->keys[i]);
+ mpa->totkey= pa->totkey;
mhkey= mpa->hair;
- mkey= mpoint->keys;
+ mkey= edit->keys[mi];
for(k=0; k<mpa->totkey; k++, mkey++, mhkey++) {
mkey->co= mhkey->co;
mkey->time= &mhkey->time;
@@ -750,8 +742,8 @@ static void PE_mirror_particle(Object *ob, DerivedMesh *dm, ParticleSystem *psys
hkey=pa->hair;
mhkey=mpa->hair;
- key= point->keys;
- mkey= mpoint->keys;
+ key= edit->keys[i];
+ mkey= edit->keys[mi];
for(k=0; k<pa->totkey; k++, hkey++, mhkey++, key++, mkey++) {
VECCOPY(mhkey->co, hkey->co);
Mat4MulVecfl(mat, mhkey->co);
@@ -762,175 +754,199 @@ static void PE_mirror_particle(Object *ob, DerivedMesh *dm, ParticleSystem *psys
mkey->flag |= PEK_TAG;
}
- if(point->flag & PEP_TAG)
- mpoint->flag |= PEP_TAG;
- if(point->flag & PEP_EDIT_RECALC)
- mpoint->flag |= PEP_EDIT_RECALC;
+ if(pa->flag & PARS_TAG)
+ mpa->flag |= PARS_TAG;
+ if(pa->flag & PARS_EDIT_RECALC)
+ mpa->flag |= PARS_EDIT_RECALC;
}
static void PE_apply_mirror(Object *ob, ParticleSystem *psys)
{
- PTCacheEdit *edit;
+ ParticleEdit *edit;
+ ParticleData *pa;
ParticleSystemModifierData *psmd;
- POINT_P;
-
- if(!psys)
- return;
+ int i, totpart;
edit= psys->edit;
psmd= psys_get_modifier(ob, psys);
+ totpart= psys->totpart;
/* we delay settings the PARS_EDIT_RECALC for mirrored particles
* to avoid doing mirror twice */
- LOOP_POINTS {
- if(point->flag & PEP_EDIT_RECALC) {
- PE_mirror_particle(ob, psmd->dm, psys, psys->particles + p, NULL);
+ LOOP_PARTICLES(i, pa) {
+ if(pa->flag & PARS_EDIT_RECALC) {
+ PE_mirror_particle(ob, psmd->dm, psys, pa, NULL);
- if(edit->mirror_cache[p] != -1)
- edit->points[edit->mirror_cache[p]].flag &= ~PEP_EDIT_RECALC;
+ if(edit->mirror_cache[i] != -1)
+ psys->particles[edit->mirror_cache[i]].flag &= ~PARS_EDIT_RECALC;
}
}
- LOOP_POINTS {
- if(point->flag & PEP_EDIT_RECALC)
- if(edit->mirror_cache[p] != -1)
- edit->points[edit->mirror_cache[p]].flag |= PEP_EDIT_RECALC;
- }
+ LOOP_PARTICLES(i, pa)
+ if(pa->flag & PARS_EDIT_RECALC)
+ if(edit->mirror_cache[i] != -1)
+ psys->particles[edit->mirror_cache[i]].flag |= PARS_EDIT_RECALC;
+
+ edit->totkeys= psys_count_keys(psys);
}
/************************************************/
/* Edit Calculation */
/************************************************/
/* tries to stop edited particles from going through the emitter's surface */
-static void pe_deflect_emitter(Scene *scene, Object *ob, PTCacheEdit *edit)
+static void pe_deflect_emitter(Scene *scene, Object *ob, ParticleSystem *psys)
{
+ ParticleEdit *edit;
+ ParticleData *pa;
+ ParticleEditKey *key;
ParticleEditSettings *pset= PE_settings(scene);
- ParticleSystem *psys;
- ParticleSystemModifierData *psmd;
- POINT_P; KEY_K;
- int index;
+ ParticleSystemModifierData *psmd= psys_get_modifier(ob,psys);
+ int i, k, totpart,index;
float *vec, *nor, dvec[3], dot, dist_1st;
float hairimat[4][4], hairmat[4][4];
- if(edit==NULL || edit->psys==NULL || (pset->flag & PE_DEFLECT_EMITTER)==0 || (edit->psys->flag & PSYS_GLOBAL_HAIR))
+ if(psys==0)
return;
- psys = edit->psys;
- psmd = psys_get_modifier(ob,psys);
+ if((pset->flag & PE_DEFLECT_EMITTER)==0)
+ return;
- LOOP_EDITED_POINTS {
- psys_mat_hair_to_object(ob, psmd->dm, psys->part->from, psys->particles + p, hairmat);
-
- LOOP_KEYS {
+ edit= psys->edit;
+ totpart= psys->totpart;
+
+ LOOP_PARTICLES(i, pa) {
+ if(!(pa->flag & PARS_EDIT_RECALC))
+ continue;
+
+ psys_mat_hair_to_object(ob, psmd->dm, psys->part->from, pa, hairmat);
+
+ LOOP_KEYS(k, key) {
Mat4MulVecfl(hairmat, key->co);
}
+ //}
- LOOP_KEYS {
- if(k==0) {
- dist_1st = VecLenf((key+1)->co, key->co);
- dist_1st *= 0.75f * pset->emitterdist;
- }
- else {
- index= BLI_kdtree_find_nearest(edit->emitter_field,key->co,NULL,NULL);
-
- vec=edit->emitter_cosnos +index*6;
- nor=vec+3;
+ //LOOP_PARTICLES(i, pa) {
+ key=psys->edit->keys[i]+1;
- VecSubf(dvec, key->co, vec);
+ dist_1st=VecLenf((key-1)->co,key->co);
+ dist_1st*=0.75f*pset->emitterdist;
- dot=Inpf(dvec,nor);
- VECCOPY(dvec,nor);
+ for(k=1; k<pa->totkey; k++, key++) {
+ index= BLI_kdtree_find_nearest(edit->emitter_field,key->co,NULL,NULL);
+
+ vec=edit->emitter_cosnos +index*6;
+ nor=vec+3;
- if(dot>0.0f) {
- if(dot<dist_1st) {
- Normalize(dvec);
- VecMulf(dvec,dist_1st-dot);
- VecAddf(key->co,key->co,dvec);
- }
- }
- else {
+ VecSubf(dvec, key->co, vec);
+
+ dot=Inpf(dvec,nor);
+ VECCOPY(dvec,nor);
+
+ if(dot>0.0f) {
+ if(dot<dist_1st) {
Normalize(dvec);
VecMulf(dvec,dist_1st-dot);
VecAddf(key->co,key->co,dvec);
}
- if(k==1)
- dist_1st*=1.3333f;
}
+ else {
+ Normalize(dvec);
+ VecMulf(dvec,dist_1st-dot);
+ VecAddf(key->co,key->co,dvec);
+ }
+ if(k==1)
+ dist_1st*=1.3333f;
}
+ //}
+
+ //LOOP_PARTICLES(i, pa) {
Mat4Invert(hairimat,hairmat);
- LOOP_KEYS {
+ LOOP_KEYS(k, key) {
Mat4MulVecfl(hairimat, key->co);
}
}
}
/* force set distances between neighbouring keys */
-void PE_apply_lengths(Scene *scene, PTCacheEdit *edit)
+void PE_apply_lengths(Scene *scene, ParticleSystem *psys)
{
-
+ ParticleEdit *edit;
+ ParticleData *pa;
+ ParticleEditKey *key;
ParticleEditSettings *pset=PE_settings(scene);
- POINT_P; KEY_K;
+ int i, k, totpart;
float dv1[3];
- if(edit==0 || (pset->flag & PE_KEEP_LENGTHS)==0)
+ if(psys==0)
return;
- if(edit->psys && edit->psys->flag & PSYS_GLOBAL_HAIR)
+ if((pset->flag & PE_KEEP_LENGTHS)==0)
return;
- LOOP_EDITED_POINTS {
- LOOP_KEYS {
- if(k) {
- VecSubf(dv1, key->co, (key - 1)->co);
- Normalize(dv1);
- VecMulf(dv1, (key - 1)->length);
- VecAddf(key->co, (key - 1)->co, dv1);
- }
+ edit= psys->edit;
+ totpart= psys->totpart;
+
+ LOOP_PARTICLES(i, pa) {
+ if(!(pa->flag & PARS_EDIT_RECALC))
+ continue;
+
+ for(k=1, key=edit->keys[i] + 1; k<pa->totkey; k++, key++) {
+ VecSubf(dv1, key->co, (key - 1)->co);
+ Normalize(dv1);
+ VecMulf(dv1, (key - 1)->length);
+ VecAddf(key->co, (key - 1)->co, dv1);
}
}
}
/* try to find a nice solution to keep distances between neighbouring keys */
-static void pe_iterate_lengths(Scene *scene, PTCacheEdit *edit)
+static void pe_iterate_lengths(Scene *scene, ParticleSystem *psys)
{
+ ParticleEdit *edit;
+ ParticleData *pa;
+ ParticleEditKey *key;
ParticleEditSettings *pset=PE_settings(scene);
- POINT_P;
- PTCacheEditKey *key;
- int j, k;
+ int i, j, k, totpart;
float tlen;
float dv0[3]= {0.0f, 0.0f, 0.0f};
float dv1[3]= {0.0f, 0.0f, 0.0f};
float dv2[3]= {0.0f, 0.0f, 0.0f};
- if(edit==0 || (pset->flag & PE_KEEP_LENGTHS)==0)
+ if(psys==0)
return;
- if(edit->psys && edit->psys->flag & PSYS_GLOBAL_HAIR)
+ if((pset->flag & PE_KEEP_LENGTHS)==0)
return;
- LOOP_EDITED_POINTS {
- for(j=1; j<point->totkey; j++) {
- float mul= 1.0f / (float)point->totkey;
+ edit= psys->edit;
+ totpart= psys->totpart;
+
+ LOOP_PARTICLES(i, pa) {
+ if(!(pa->flag & PARS_EDIT_RECALC))
+ continue;
+
+ for(j=1; j<pa->totkey; j++) {
+ float mul= 1.0f / (float)pa->totkey;
if(pset->flag & PE_LOCK_FIRST) {
- key= point->keys + 1;
+ key= edit->keys[i] + 1;
k= 1;
dv1[0]= dv1[1]= dv1[2]= 0.0;
}
else {
- key= point->keys;
+ key= edit->keys[i];
k= 0;
dv0[0]= dv0[1]= dv0[2]= 0.0;
}
- for(; k<point->totkey; k++, key++) {
+ for(; k<pa->totkey; k++, key++) {
if(k) {
VecSubf(dv0, (key - 1)->co, key->co);
tlen= Normalize(dv0);
VecMulf(dv0, (mul * (tlen - (key - 1)->length)));
}
- if(k < point->totkey - 1) {
+ if(k < pa->totkey - 1) {
VecSubf(dv2, (key + 1)->co, key->co);
tlen= Normalize(dv2);
VecMulf(dv2, mul * (tlen - key->length));
@@ -946,16 +962,20 @@ static void pe_iterate_lengths(Scene *scene, PTCacheEdit *edit)
}
}
/* set current distances to be kept between neighbouting keys */
-static void recalc_lengths(PTCacheEdit *edit)
+static void recalc_lengths(ParticleSystem *psys)
{
- POINT_P; KEY_K;
+ ParticleData *pa;
+ ParticleEditKey *key;
+ int i, k, totpart;
- if(edit==0)
+ if(psys==0)
return;
- LOOP_EDITED_POINTS {
- key= point->keys;
- for(k=0; k<point->totkey-1; k++, key++) {
+ totpart= psys->totpart;
+
+ LOOP_PARTICLES(i, pa) {
+ key= psys->edit->keys[i];
+ for(k=0; k<pa->totkey-1; k++, key++) {
key->length= VecLenf(key->co, (key + 1)->co);
}
}
@@ -965,7 +985,7 @@ static void recalc_lengths(PTCacheEdit *edit)
static void recalc_emitter_field(Object *ob, ParticleSystem *psys)
{
DerivedMesh *dm=psys_get_modifier(ob,psys)->dm;
- PTCacheEdit *edit= psys->edit;
+ ParticleEdit *edit= psys->edit;
MFace *mface;
MVert *mvert;
float *vec, *nor;
@@ -1022,146 +1042,74 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys)
static void PE_update_selection(Scene *scene, Object *ob, int useflag)
{
- PTCacheEdit *edit= PE_get_current(scene, ob);
+ ParticleSystem *psys= PE_get_current(scene, ob);
+ ParticleEdit *edit= psys->edit;
+ ParticleEditSettings *pset= PE_settings(scene);
+ ParticleSettings *part= psys->part;
+ ParticleData *pa;
HairKey *hkey;
- POINT_P; KEY_K;
+ ParticleEditKey *key;
+ float cfra= CFRA;
+ int i, k, totpart;
+
+ totpart= psys->totpart;
/* flag all particles to be updated if not using flag */
if(!useflag)
- LOOP_POINTS
- point->flag |= PEP_EDIT_RECALC;
+ LOOP_PARTICLES(i, pa)
+ pa->flag |= PARS_EDIT_RECALC;
/* flush edit key flag to hair key flag to preserve selection
* on save */
- if(edit->psys) LOOP_POINTS {
- hkey = edit->psys->particles[p].hair;
- LOOP_KEYS {
+ LOOP_PARTICLES(i, pa) {
+ key= edit->keys[i];
+
+ for(k=0, hkey=pa->hair; k<pa->totkey; k++, hkey++, key++)
hkey->editflag= key->flag;
- hkey++;
- }
}
- psys_cache_edit_paths(scene, ob, edit, CFRA);
+ psys_cache_paths(scene, ob, psys, CFRA, 1);
+ if(part->childtype && (pset->flag & PE_SHOW_CHILD))
+ psys_cache_child_paths(scene, ob, psys, cfra, 1);
/* disable update flag */
- LOOP_POINTS
- point->flag &= ~PEP_EDIT_RECALC;
+ LOOP_PARTICLES(i, pa)
+ pa->flag &= ~PARS_EDIT_RECALC;
}
-static void update_world_cos(Object *ob, PTCacheEdit *edit)
-{
- ParticleSystem *psys = edit->psys;
- ParticleSystemModifierData *psmd= psys_get_modifier(ob, psys);
- POINT_P; KEY_K;
- float hairmat[4][4];
-
- if(psys==0 || psys->edit==0)
- return;
-
- LOOP_POINTS {
- if(!(psys->flag & PSYS_GLOBAL_HAIR))
- psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, psys->particles+p, hairmat);
-
- LOOP_KEYS {
- VECCOPY(key->world_co,key->co);
- if(!(psys->flag & PSYS_GLOBAL_HAIR))
- Mat4MulVecfl(hairmat, key->world_co);
- }
- }
-}
-static void update_velocities(Object *ob, PTCacheEdit *edit)
-{
- /*TODO: get frs_sec properly */
- float vec1[3], vec2[3], frs_sec, dfra;
- POINT_P; KEY_K;
-
- /* hair doesn't use velocities */
- if(edit->psys || !edit->points || !edit->points->keys->vel)
- return;
-
- frs_sec = edit->pid.flag & PTCACHE_VEL_PER_SEC ? 25.0f : 1.0f;
-
- LOOP_EDITED_POINTS {
- LOOP_KEYS {
- if(k==0) {
- dfra = *(key+1)->time - *key->time;
-
- if(dfra <= 0.0f)
- continue;
-
- VECSUB(key->vel, (key+1)->co, key->co);
-
- if(point->totkey>2) {
- VECSUB(vec1, (key+1)->co, (key+2)->co);
- Projf(vec2, vec1, key->vel);
- VECSUB(vec2, vec1, vec2);
- VECADDFAC(key->vel, key->vel, vec2, 0.5f);
- }
- }
- else if(k==point->totkey-1) {
- dfra = *key->time - *(key-1)->time;
-
- if(dfra <= 0.0f)
- continue;
-
- VECSUB(key->vel, key->co, (key-1)->co);
-
- if(point->totkey>2) {
- VECSUB(vec1, (key-2)->co, (key-1)->co);
- Projf(vec2, vec1, key->vel);
- VECSUB(vec2, vec1, vec2);
- VECADDFAC(key->vel, key->vel, vec2, 0.5f);
- }
- }
- else {
- dfra = *(key+1)->time - *(key-1)->time;
-
- if(dfra <= 0.0f)
- continue;
-
- VECSUB(key->vel, (key+1)->co, (key-1)->co);
- }
- VecMulf(key->vel, frs_sec/dfra);
- }
- }
-}
void PE_update_object(Scene *scene, Object *ob, int useflag)
{
+ ParticleSystem *psys= PE_get_current(scene, ob);
ParticleEditSettings *pset= PE_settings(scene);
- PTCacheEdit *edit = PE_get_current(scene, ob);
- POINT_P;
-
- if(!edit)
- return;
+ ParticleSettings *part= psys->part;
+ ParticleData *pa;
+ float cfra= CFRA;
+ int i, totpart= psys->totpart;
/* flag all particles to be updated if not using flag */
if(!useflag)
- LOOP_POINTS {
- point->flag |= PEP_EDIT_RECALC;
- }
+ LOOP_PARTICLES(i, pa)
+ pa->flag |= PARS_EDIT_RECALC;
/* do post process on particle edit keys */
- pe_iterate_lengths(scene, edit);
- pe_deflect_emitter(scene, ob, edit);
- PE_apply_lengths(scene, edit);
+ pe_iterate_lengths(scene, psys);
+ pe_deflect_emitter(scene, ob, psys);
+ PE_apply_lengths(scene, psys);
if(pset->flag & PE_X_MIRROR)
- PE_apply_mirror(ob,edit->psys);
- if(edit->psys)
- update_world_cos(ob, edit);
- if(pset->flag & PE_AUTO_VELOCITY)
- update_velocities(ob, edit);
- PE_hide_keys_time(scene, edit, CFRA);
+ PE_apply_mirror(ob,psys);
+ psys_update_world_cos(ob,psys);
+ PE_hide_keys_time(scene, psys, cfra);
/* regenerate path caches */
- psys_cache_edit_paths(scene, ob, edit, CFRA);
+ psys_cache_paths(scene, ob, psys, cfra, 1);
- /* disable update flag */
- LOOP_POINTS {
- point->flag &= ~PEP_EDIT_RECALC;
- }
+ if(part->childtype && (pset->flag & PE_SHOW_CHILD))
+ psys_cache_child_paths(scene, ob, psys, cfra, 1);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ /* disable update flag */
+ LOOP_PARTICLES(i, pa)
+ pa->flag &= ~PARS_EDIT_RECALC;
}
/************************************************/
@@ -1170,44 +1118,48 @@ void PE_update_object(Scene *scene, Object *ob, int useflag)
/*-----selection callbacks-----*/
-static void select_key(PEData *data, int point_index, int key_index)
+static void select_key(PEData *data, int pa_index, int key_index)
{
- PTCacheEdit *edit = data->edit;
- PTCacheEditPoint *point = edit->points + point_index;
- PTCacheEditKey *key = point->keys + key_index;
+ ParticleSystem *psys= data->psys;
+ ParticleData *pa= psys->particles + pa_index;
+ ParticleEditKey *key= psys->edit->keys[pa_index] + key_index;
if(data->select)
key->flag |= PEK_SELECT;
else
key->flag &= ~PEK_SELECT;
- point->flag |= PEP_EDIT_RECALC;
+ pa->flag |= PARS_EDIT_RECALC;
}
-static void select_keys(PEData *data, int point_index, int key_index)
+static void select_keys(PEData *data, int pa_index, int key_index)
{
- PTCacheEdit *edit = data->edit;
- PTCacheEditPoint *point = edit->points + point_index;
- KEY_K;
+ ParticleSystem *psys= data->psys;
+ ParticleData *pa= psys->particles + pa_index;
+ ParticleEditKey *key= psys->edit->keys[pa_index];
+ int k;
- LOOP_KEYS {
+ for(k=0; k<pa->totkey; k++,key++) {
if(data->select)
key->flag |= PEK_SELECT;
else
key->flag &= ~PEK_SELECT;
}
- point->flag |= PEP_EDIT_RECALC;
+ pa->flag |= PARS_EDIT_RECALC;
}
-static void toggle_key_select(PEData *data, int point_index, int key_index)
+static void toggle_key_select(PEData *data, int pa_index, int key_index)
{
- PTCacheEdit *edit = data->edit;
- PTCacheEditPoint *point = edit->points + point_index;
- PTCacheEditKey *key = point->keys + key_index;
+ ParticleSystem *psys= data->psys;
+ ParticleData *pa= psys->particles + pa_index;
- key->flag ^= PEK_SELECT;
- point->flag |= PEP_EDIT_RECALC;
+ if(psys->edit->keys[pa_index][key_index].flag&PEK_SELECT)
+ psys->edit->keys[pa_index][key_index].flag &= ~PEK_SELECT;
+ else
+ psys->edit->keys[pa_index][key_index].flag |= PEK_SELECT;
+
+ pa->flag |= PARS_EDIT_RECALC;
}
/************************ de select all operator ************************/
@@ -1216,31 +1168,40 @@ static int de_select_all_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
- PTCacheEdit *edit= PE_get_current(scene, ob);
- POINT_P; KEY_K;
- int sel= 0;
+ ParticleSystem *psys= PE_get_current(scene, ob);
+ ParticleEdit *edit= 0;
+ ParticleData *pa;
+ ParticleEditKey *key;
+ int i, k, totpart, sel= 0;
- LOOP_VISIBLE_POINTS {
- LOOP_SELECTED_KEYS {
- sel= 1;
- key->flag &= ~PEK_SELECT;
- point->flag |= PEP_EDIT_RECALC;
+ edit= psys->edit;
+ totpart= psys->totpart;
+
+ LOOP_PARTICLES(i, pa) {
+ if(pa->flag & PARS_HIDE) continue;
+ LOOP_KEYS(k, key) {
+ if(key->flag & PEK_SELECT) {
+ sel= 1;
+ key->flag &= ~PEK_SELECT;
+ pa->flag |= PARS_EDIT_RECALC;
+ }
}
}
if(sel==0) {
- LOOP_VISIBLE_POINTS {
- LOOP_KEYS {
+ LOOP_PARTICLES(i, pa) {
+ if(pa->flag & PARS_HIDE) continue;
+ LOOP_KEYS(k, key) {
if(!(key->flag & PEK_SELECT)) {
key->flag |= PEK_SELECT;
- point->flag |= PEP_EDIT_RECALC;
+ pa->flag |= PARS_EDIT_RECALC;
}
}
}
}
PE_update_selection(scene, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -1266,17 +1227,26 @@ int PE_mouse_particles(bContext *C, short *mval, int extend)
PEData data;
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
- PTCacheEdit *edit= PE_get_current(scene, ob);
- POINT_P; KEY_K;
+ ParticleSystem *psys= PE_get_current(scene, ob);
+ ParticleEdit *edit= 0;
+ ParticleData *pa;
+ ParticleEditKey *key;
+ int i, k, totpart;
- if(!PE_start_edit(edit))
+ if(!PE_can_edit(psys))
return OPERATOR_CANCELLED;
+ edit= psys->edit;
+ totpart= psys->totpart;
+
if(!extend) {
- LOOP_VISIBLE_POINTS {
- LOOP_SELECTED_KEYS {
- key->flag &= ~PEK_SELECT;
- point->flag |= PEP_EDIT_RECALC;
+ LOOP_PARTICLES(i, pa) {
+ if(pa->flag & PARS_HIDE) continue;
+ LOOP_KEYS(k, key) {
+ if(key->flag & PEK_SELECT) {
+ key->flag &= ~PEK_SELECT;
+ pa->flag |= PARS_EDIT_RECALC;
+ }
}
}
}
@@ -1288,16 +1258,18 @@ int PE_mouse_particles(bContext *C, short *mval, int extend)
for_mouse_hit_keys(&data, toggle_key_select, 1); /* nearest only */
PE_update_selection(scene, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob);
return OPERATOR_FINISHED;
}
/************************ select first operator ************************/
-static void select_root(PEData *data, int point_index)
+static void select_root(PEData *data, int pa_index)
{
- data->edit->points[point_index].keys->flag |= PEK_SELECT;
+ ParticleSystem *psys= data->psys;
+
+ psys->edit->keys[pa_index]->flag |= PEK_SELECT;
}
static int select_first_exec(bContext *C, wmOperator *op)
@@ -1305,8 +1277,8 @@ static int select_first_exec(bContext *C, wmOperator *op)
PEData data;
PE_set_data(C, &data);
- foreach_point(&data, select_root);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob);
+ PE_foreach_particle(&data, select_root);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob);
return OPERATOR_FINISHED;
}
@@ -1327,10 +1299,13 @@ void PARTICLE_OT_select_first(wmOperatorType *ot)
/************************ select last operator ************************/
-static void select_tip(PEData *data, int point_index)
+static void select_tip(PEData *data, int pa_index)
{
- PTCacheEditPoint *point = data->edit->points + point_index;
- point->keys[point->totkey - 1].flag |= PEK_SELECT;
+ ParticleSystem *psys= data->psys;
+ ParticleData *pa= psys->particles + pa_index;
+ ParticleEditKey *key= psys->edit->keys[pa_index] + pa->totkey-1;
+
+ key->flag |= PEK_SELECT;
}
static int select_last_exec(bContext *C, wmOperator *op)
@@ -1338,8 +1313,8 @@ static int select_last_exec(bContext *C, wmOperator *op)
PEData data;
PE_set_data(C, &data);
- foreach_point(&data, select_tip);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob);
+ PE_foreach_particle(&data, select_tip);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob);
return OPERATOR_FINISHED;
}
@@ -1379,7 +1354,7 @@ static int select_linked_exec(bContext *C, wmOperator *op)
for_mouse_hit_keys(&data, select_keys, 1); /* nearest only */
PE_update_selection(data.scene, data.ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob);
return OPERATOR_FINISHED;
}
@@ -1421,10 +1396,10 @@ int PE_border_select(bContext *C, rcti *rect, int select)
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
- PTCacheEdit *edit= PE_get_current(scene, ob);
+ ParticleSystem *psys= PE_get_current(scene, ob);
PEData data;
- if(!PE_start_edit(edit))
+ if(!PE_can_edit(psys))
return OPERATOR_CANCELLED;
PE_set_view3d_data(C, &data);
@@ -1434,7 +1409,7 @@ int PE_border_select(bContext *C, rcti *rect, int select)
for_mouse_hit_keys(&data, select_key, 0);
PE_update_selection(scene, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -1445,10 +1420,10 @@ int PE_circle_select(bContext *C, int selecting, short *mval, float rad)
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
- PTCacheEdit *edit= PE_get_current(scene, ob);
+ ParticleSystem *psys= PE_get_current(scene, ob);
PEData data;
- if(!PE_start_edit(edit))
+ if(!PE_can_edit(psys))
return OPERATOR_FINISHED;
PE_set_view3d_data(C, &data);
@@ -1459,7 +1434,7 @@ int PE_circle_select(bContext *C, int selecting, short *mval, float rad)
for_mouse_hit_keys(&data, select_key, 0);
PE_update_selection(scene, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -1471,42 +1446,47 @@ int PE_lasso_select(bContext *C, short mcords[][2], short moves, short select)
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
ARegion *ar= CTX_wm_region(C);
+ ParticleSystem *psys= PE_get_current(scene, ob);
+ ParticleSystemModifierData *psmd;
+ ParticleEdit *edit;
+ ParticleData *pa;
+ ParticleEditKey *key;
ParticleEditSettings *pset= PE_settings(scene);
- PTCacheEdit *edit = PE_get_current(scene, ob);
- ParticleSystem *psys = edit->psys;
- ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
- POINT_P; KEY_K;
float co[3], mat[4][4];
short vertco[2];
+ int i, k, totpart;
- if(!PE_start_edit(edit))
+ if(!PE_can_edit(psys))
return OPERATOR_CANCELLED;
- Mat4One(mat);
+ psmd= psys_get_modifier(ob, psys);
+ edit= psys->edit;
+ totpart= psys->totpart;
- LOOP_VISIBLE_POINTS {
- if(edit->psys && !(psys->flag & PSYS_GLOBAL_HAIR))
- psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, psys->particles + p, mat);
+ LOOP_PARTICLES(i, pa) {
+ if(pa->flag & PARS_HIDE) continue;
+
+ psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, mat);
if(pset->selectmode==SCE_SELECT_POINT) {
- LOOP_KEYS {
+ LOOP_KEYS(k, key) {
VECCOPY(co, key->co);
Mat4MulVecfl(mat, co);
project_short(ar, co, vertco);
if((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1])) {
if(select && !(key->flag & PEK_SELECT)) {
key->flag |= PEK_SELECT;
- point->flag |= PEP_EDIT_RECALC;
+ pa->flag |= PARS_EDIT_RECALC;
}
else if(key->flag & PEK_SELECT) {
key->flag &= ~PEK_SELECT;
- point->flag |= PEP_EDIT_RECALC;
+ pa->flag |= PARS_EDIT_RECALC;
}
}
}
}
else if(pset->selectmode==SCE_SELECT_END) {
- key= point->keys + point->totkey - 1;
+ key= edit->keys[i] + pa->totkey - 1;
VECCOPY(co, key->co);
Mat4MulVecfl(mat, co);
@@ -1514,18 +1494,18 @@ int PE_lasso_select(bContext *C, short mcords[][2], short moves, short select)
if((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1])) {
if(select && !(key->flag & PEK_SELECT)) {
key->flag |= PEK_SELECT;
- point->flag |= PEP_EDIT_RECALC;
+ pa->flag |= PARS_EDIT_RECALC;
}
else if(key->flag & PEK_SELECT) {
key->flag &= ~PEK_SELECT;
- point->flag |= PEP_EDIT_RECALC;
+ pa->flag |= PARS_EDIT_RECALC;
}
}
}
}
PE_update_selection(scene, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -1536,30 +1516,40 @@ static int hide_exec(bContext *C, wmOperator *op)
{
Object *ob= CTX_data_active_object(C);
Scene *scene= CTX_data_scene(C);
- PTCacheEdit *edit= PE_get_current(scene, ob);
- POINT_P; KEY_K;
+ ParticleSystem *psys= PE_get_current(scene, ob);
+ ParticleEdit *edit;
+ ParticleEditKey *key;
+ ParticleData *pa;
+ int i, k, totpart;
+
+ edit= psys->edit;
+ totpart= psys->totpart;
if(RNA_enum_get(op->ptr, "unselected")) {
- LOOP_UNSELECTED_POINTS {
- point->flag |= PEP_HIDE;
- point->flag |= PEP_EDIT_RECALC;
+ LOOP_PARTICLES(i, pa) {
+ if(!particle_is_selected(psys, pa)) {
+ pa->flag |= PARS_HIDE;
+ pa->flag |= PARS_EDIT_RECALC;
- LOOP_KEYS
- key->flag &= ~PEK_SELECT;
+ LOOP_KEYS(k, key)
+ key->flag &= ~PEK_SELECT;
+ }
}
}
else {
- LOOP_SELECTED_POINTS {
- point->flag |= PEP_HIDE;
- point->flag |= PEP_EDIT_RECALC;
+ LOOP_PARTICLES(i, pa) {
+ if(particle_is_selected(psys, pa)) {
+ pa->flag |= PARS_HIDE;
+ pa->flag |= PARS_EDIT_RECALC;
- LOOP_KEYS
- key->flag &= ~PEK_SELECT;
+ LOOP_KEYS(k, key)
+ key->flag &= ~PEK_SELECT;
+ }
}
}
PE_update_selection(scene, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -1587,21 +1577,27 @@ static int reveal_exec(bContext *C, wmOperator *op)
{
Object *ob= CTX_data_active_object(C);
Scene *scene= CTX_data_scene(C);
- PTCacheEdit *edit= PE_get_current(scene, ob);
- POINT_P; KEY_K;
+ ParticleSystem *psys= PE_get_current(scene, ob);
+ ParticleEdit *edit;
+ ParticleEditKey *key;
+ ParticleData *pa;
+ int i, k, totpart;
+
+ edit= psys->edit;
+ totpart= psys->totpart;
- LOOP_POINTS {
- if(point->flag & PEP_HIDE) {
- point->flag &= ~PEP_HIDE;
- point->flag |= PEP_EDIT_RECALC;
+ LOOP_PARTICLES(i, pa) {
+ if(pa->flag & PARS_HIDE) {
+ pa->flag &= ~PARS_HIDE;
+ pa->flag |= PARS_EDIT_RECALC;
- LOOP_KEYS
+ LOOP_KEYS(k, key)
key->flag |= PEK_SELECT;
}
}
PE_update_selection(scene, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -1622,30 +1618,34 @@ void PARTICLE_OT_reveal(wmOperatorType *ot)
/************************ select less operator ************************/
-static void select_less_keys(PEData *data, int point_index)
+static void select_less_keys(PEData *data, int pa_index)
{
- PTCacheEdit *edit= data->edit;
- PTCacheEditPoint *point = edit->points + point_index;
- KEY_K;
+ ParticleSystem *psys= data->psys;
+ ParticleEdit *edit= psys->edit;
+ ParticleData *pa= &psys->particles[pa_index];
+ ParticleEditKey *key;
+ int k;
+
+ for(k=0,key=edit->keys[pa_index]; k<pa->totkey; k++,key++) {
+ if((key->flag & PEK_SELECT)==0) continue;
- LOOP_SELECTED_KEYS {
if(k==0) {
if(((key+1)->flag&PEK_SELECT)==0)
- key->flag |= PEK_TAG;
+ key->flag |= PEK_TO_SELECT;
}
- else if(k==point->totkey-1) {
+ else if(k==pa->totkey-1) {
if(((key-1)->flag&PEK_SELECT)==0)
- key->flag |= PEK_TAG;
+ key->flag |= PEK_TO_SELECT;
}
else {
if((((key-1)->flag & (key+1)->flag) & PEK_SELECT)==0)
- key->flag |= PEK_TAG;
+ key->flag |= PEK_TO_SELECT;
}
}
- LOOP_KEYS {
- if(key->flag&PEK_TAG)
- key->flag &= ~(PEK_TAG|PEK_SELECT);
+ for(k=0,key=edit->keys[pa_index]; k<pa->totkey; k++,key++) {
+ if(key->flag&PEK_TO_SELECT)
+ key->flag &= ~(PEK_TO_SELECT|PEK_SELECT);
}
}
@@ -1654,8 +1654,8 @@ static int select_less_exec(bContext *C, wmOperator *op)
PEData data;
PE_set_data(C, &data);
- foreach_point(&data, select_less_keys);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob);
+ PE_foreach_particle(&data, select_less_keys);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob);
return OPERATOR_FINISHED;
}
@@ -1676,32 +1676,34 @@ void PARTICLE_OT_select_less(wmOperatorType *ot)
/************************ select more operator ************************/
-static void select_more_keys(PEData *data, int point_index)
+static void select_more_keys(PEData *data, int pa_index)
{
- PTCacheEdit *edit= data->edit;
- PTCacheEditPoint *point = edit->points + point_index;
- KEY_K;
+ ParticleSystem *psys= data->psys;
+ ParticleEdit *edit= psys->edit;
+ ParticleData *pa= &psys->particles[pa_index];
+ ParticleEditKey *key;
+ int k;
- LOOP_KEYS {
+ for(k=0,key=edit->keys[pa_index]; k<pa->totkey; k++,key++) {
if(key->flag & PEK_SELECT) continue;
if(k==0) {
if((key+1)->flag&PEK_SELECT)
- key->flag |= PEK_TAG;
+ key->flag |= PEK_TO_SELECT;
}
- else if(k==point->totkey-1) {
+ else if(k==pa->totkey-1) {
if((key-1)->flag&PEK_SELECT)
- key->flag |= PEK_TAG;
+ key->flag |= PEK_TO_SELECT;
}
else {
if(((key-1)->flag | (key+1)->flag) & PEK_SELECT)
- key->flag |= PEK_TAG;
+ key->flag |= PEK_TO_SELECT;
}
}
- LOOP_KEYS {
- if(key->flag&PEK_TAG) {
- key->flag &= ~PEK_TAG;
+ for(k=0,key=edit->keys[pa_index]; k<pa->totkey; k++,key++) {
+ if(key->flag&PEK_TO_SELECT) {
+ key->flag &= ~PEK_TO_SELECT;
key->flag |= PEK_SELECT;
}
}
@@ -1712,8 +1714,8 @@ static int select_more_exec(bContext *C, wmOperator *op)
PEData data;
PE_set_data(C, &data);
- foreach_point(&data, select_more_keys);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob);
+ PE_foreach_particle(&data, select_more_keys);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob);
return OPERATOR_FINISHED;
}
@@ -1736,13 +1738,12 @@ void PARTICLE_OT_select_more(wmOperatorType *ot)
static void rekey_particle(PEData *data, int pa_index)
{
- PTCacheEdit *edit= data->edit;
- ParticleSystem *psys= edit->psys;
- ParticleData *pa= psys->particles + pa_index;
- PTCacheEditPoint *point = edit->points + pa_index;
+ ParticleSystem *psys= data->psys;
+ ParticleData *pa= &psys->particles[pa_index];
+ ParticleEdit *edit= psys->edit;
ParticleKey state;
- HairKey *key, *new_keys, *okey;
- PTCacheEditKey *ekey;
+ HairKey *key, *new_keys;
+ ParticleEditKey *ekey;
float dval, sta, end;
int k;
@@ -1750,13 +1751,12 @@ static void rekey_particle(PEData *data, int pa_index)
key= new_keys= MEM_callocN(data->totrekey * sizeof(HairKey),"Hair re-key keys");
- okey = pa->hair;
/* root and tip stay the same */
- VECCOPY(key->co, okey->co);
- VECCOPY((key + data->totrekey - 1)->co, (okey + pa->totkey - 1)->co);
+ VECCOPY(key->co, pa->hair->co);
+ VECCOPY((key + data->totrekey - 1)->co, (pa->hair + pa->totkey - 1)->co);
- sta= key->time= okey->time;
- end= (key + data->totrekey - 1)->time= (okey + pa->totkey - 1)->time;
+ sta= key->time= pa->hair->time;
+ end= (key + data->totrekey - 1)->time= (pa->hair + pa->totkey - 1)->time;
dval= (end - sta) / (float)(data->totrekey - 1);
/* interpolate new keys from old ones */
@@ -1772,22 +1772,19 @@ static void rekey_particle(PEData *data, int pa_index)
MEM_freeN(pa->hair);
pa->hair= new_keys;
- point->totkey=pa->totkey=data->totrekey;
-
+ pa->totkey=data->totrekey;
- if(point->keys)
- MEM_freeN(point->keys);
- ekey= point->keys= MEM_callocN(pa->totkey * sizeof(PTCacheEditKey),"Hair re-key edit keys");
+ if(edit->keys[pa_index])
+ MEM_freeN(edit->keys[pa_index]);
+ ekey= edit->keys[pa_index]= MEM_callocN(pa->totkey * sizeof(ParticleEditKey),"Hair re-key edit keys");
for(k=0, key=pa->hair; k<pa->totkey; k++, key++, ekey++) {
ekey->co= key->co;
ekey->time= &key->time;
- if(!(psys->flag & PSYS_GLOBAL_HAIR))
- ekey->flag |= PEK_USE_WCO;
}
pa->flag &= ~PARS_REKEY;
- point->flag |= PEP_EDIT_RECALC;
+ pa->flag |= PARS_EDIT_RECALC;
}
static int rekey_exec(bContext *C, wmOperator *op)
@@ -1799,11 +1796,13 @@ static int rekey_exec(bContext *C, wmOperator *op)
data.dval= 1.0f / (float)(data.totrekey-1);
data.totrekey= RNA_int_get(op->ptr, "keys");
- foreach_selected_point(&data, rekey_particle);
+ foreach_selected_particle(&data, rekey_particle);
+
+ data.psys->edit->totkeys= psys_count_keys(data.psys);
+ recalc_lengths(data.psys);
- recalc_lengths(data.edit);
PE_update_object(data.scene, data.ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, data.ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, data.ob);
return OPERATOR_FINISHED;
}
@@ -1828,19 +1827,19 @@ void PARTICLE_OT_rekey(wmOperatorType *ot)
static void rekey_particle_to_time(Scene *scene, Object *ob, int pa_index, float path_time)
{
- PTCacheEdit *edit= PE_get_current(scene, ob);
- ParticleSystem *psys;
+ ParticleSystem *psys= PE_get_current(scene, ob);
+ ParticleEdit *edit=0;
ParticleData *pa;
ParticleKey state;
HairKey *new_keys, *key;
- PTCacheEditKey *ekey;
+ ParticleEditKey *ekey;
int k;
- if(!edit || !edit->psys) return;
+ if(psys==0) return;
- psys = edit->psys;
+ edit= psys->edit;
- pa= psys->particles + pa_index;
+ pa= &psys->particles[pa_index];
pa->flag |= PARS_REKEY;
@@ -1859,7 +1858,7 @@ static void rekey_particle_to_time(Scene *scene, Object *ob, int pa_index, float
pa->hair= new_keys;
/* update edit pointers */
- for(k=0, key=pa->hair, ekey=edit->points[pa_index].keys; k<pa->totkey; k++, key++, ekey++) {
+ for(k=0, key=pa->hair, ekey=edit->keys[pa_index]; k<pa->totkey; k++, key++, ekey++) {
ekey->co= key->co;
ekey->time= &key->time;
}
@@ -1871,11 +1870,10 @@ static void rekey_particle_to_time(Scene *scene, Object *ob, int pa_index, float
static int remove_tagged_particles(Scene *scene, Object *ob, ParticleSystem *psys)
{
- PTCacheEdit *edit = psys->edit;
+ ParticleEdit *edit= psys->edit;
ParticleEditSettings *pset= PE_settings(scene);
ParticleData *pa, *npa=0, *new_pars=0;
- POINT_P;
- PTCacheEditPoint *npoint=0, *new_points=0;
+ ParticleEditKey **key, **nkey=0, **new_keys=0;
ParticleSystemModifierData *psmd;
int i, totpart, new_totpart= psys->totpart, removed= 0;
@@ -1884,51 +1882,55 @@ static int remove_tagged_particles(Scene *scene, Object *ob, ParticleSystem *psy
psmd= psys_get_modifier(ob, psys);
totpart= psys->totpart;
- LOOP_TAGGED_POINTS {
- PE_mirror_particle(ob, psmd->dm, psys, psys->particles + p, NULL);
- }
+ LOOP_PARTICLES(i, pa)
+ if(pa->flag & PARS_TAG)
+ PE_mirror_particle(ob, psmd->dm, psys, pa, NULL);
}
- LOOP_TAGGED_POINTS {
- new_totpart--;
- removed++;
+ for(i=0, pa=psys->particles; i<psys->totpart; i++, pa++) {
+ if(pa->flag & PARS_TAG) {
+ new_totpart--;
+ removed++;
+ }
}
if(new_totpart != psys->totpart) {
if(new_totpart) {
npa= new_pars= MEM_callocN(new_totpart * sizeof(ParticleData), "ParticleData array");
- npoint= new_points= MEM_callocN(new_totpart * sizeof(PTCacheEditPoint), "PTCacheEditKey array");
+ nkey= new_keys= MEM_callocN(new_totpart * sizeof(ParticleEditKey *), "ParticleEditKey array");
}
pa= psys->particles;
- point= edit->points;
- for(i=0; i<psys->totpart; i++, pa++, point++) {
- if(point->flag & PEP_TAG) {
- if(point->keys)
- MEM_freeN(point->keys);
+ key= edit->keys;
+ for(i=0; i<psys->totpart; i++, pa++, key++) {
+ if(pa->flag & PARS_TAG) {
+ if(*key)
+ MEM_freeN(*key);
if(pa->hair)
MEM_freeN(pa->hair);
}
else {
memcpy(npa, pa, sizeof(ParticleData));
- memcpy(npoint, point, sizeof(PTCacheEditPoint));
+ memcpy(nkey, key, sizeof(ParticleEditKey*));
npa++;
- npoint++;
+ nkey++;
}
}
if(psys->particles) MEM_freeN(psys->particles);
psys->particles= new_pars;
- if(edit->points) MEM_freeN(edit->points);
- edit->points= new_points;
+ if(edit->keys) MEM_freeN(edit->keys);
+ edit->keys= new_keys;
if(edit->mirror_cache) {
MEM_freeN(edit->mirror_cache);
edit->mirror_cache= NULL;
}
- edit->totpoint= psys->totpart= new_totpart;
+ psys->totpart= new_totpart;
+
+ edit->totkeys= psys_count_keys(psys);
}
return removed;
@@ -1936,82 +1938,84 @@ static int remove_tagged_particles(Scene *scene, Object *ob, ParticleSystem *psy
static void remove_tagged_keys(Scene *scene, Object *ob, ParticleSystem *psys)
{
- PTCacheEdit *edit= psys->edit;
+ ParticleEdit *edit= psys->edit;
ParticleEditSettings *pset= PE_settings(scene);
ParticleData *pa;
- HairKey *hkey, *nhkey, *new_hkeys=0;
- POINT_P; KEY_K;
+ HairKey *key, *nkey, *new_keys=0;
+ ParticleEditKey *ekey;
ParticleSystemModifierData *psmd;
+ int i, k, totpart= psys->totpart;
short new_totkey;
if(pset->flag & PE_X_MIRROR) {
/* mirror key tags */
psmd= psys_get_modifier(ob, psys);
- LOOP_POINTS {
- LOOP_TAGGED_KEYS {
- PE_mirror_particle(ob, psmd->dm, psys, psys->particles + p, NULL);
- break;
+ LOOP_PARTICLES(i, pa) {
+ LOOP_KEYS(k,ekey) {
+ if(ekey->flag & PEK_TAG) {
+ PE_mirror_particle(ob, psmd->dm, psys, pa, NULL);
+ break;
+ }
}
}
}
- LOOP_POINTS {
- new_totkey= point->totkey;
- LOOP_TAGGED_KEYS {
- new_totkey--;
+ LOOP_PARTICLES(i, pa) {
+ new_totkey= pa->totkey;
+ LOOP_KEYS(k,ekey) {
+ if(ekey->flag & PEK_TAG)
+ new_totkey--;
}
/* we can't have elements with less than two keys*/
if(new_totkey < 2)
- point->flag |= PEP_TAG;
+ pa->flag |= PARS_TAG;
}
remove_tagged_particles(scene, ob, psys);
- LOOP_POINTS {
- pa = psys->particles + p;
- new_totkey= pa->totkey;
+ totpart= psys->totpart;
- LOOP_TAGGED_KEYS {
- new_totkey--;
+ LOOP_PARTICLES(i, pa) {
+ new_totkey= pa->totkey;
+ LOOP_KEYS(k,ekey) {
+ if(ekey->flag & PEK_TAG)
+ new_totkey--;
}
-
if(new_totkey != pa->totkey) {
- hkey= pa->hair;
- nhkey= new_hkeys= MEM_callocN(new_totkey*sizeof(HairKey), "HairKeys");
+ key= pa->hair;
+ nkey= new_keys= MEM_callocN(new_totkey*sizeof(HairKey), "HairKeys");
- LOOP_KEYS {
- while(key->flag & PEK_TAG && hkey < pa->hair + pa->totkey) {
+ for(k=0, ekey=edit->keys[i]; k<new_totkey; k++, key++, nkey++, ekey++) {
+ while(ekey->flag & PEK_TAG && key < pa->hair + pa->totkey) {
key++;
- hkey++;
+ ekey++;
}
- if(hkey < pa->hair + pa->totkey) {
- VECCOPY(nhkey->co, hkey->co);
- nhkey->time= hkey->time;
- nhkey->weight= hkey->weight;
+ if(key < pa->hair + pa->totkey) {
+ VECCOPY(nkey->co, key->co);
+ nkey->time= key->time;
+ nkey->weight= key->weight;
}
- hkey++;
- nhkey++;
}
if(pa->hair)
MEM_freeN(pa->hair);
- pa->hair= new_hkeys;
+ pa->hair= new_keys;
- point->totkey= pa->totkey= new_totkey;
+ pa->totkey=new_totkey;
- if(point->keys)
- MEM_freeN(point->keys);
- key= point->keys= MEM_callocN(new_totkey*sizeof(PTCacheEditKey), "particle edit keys");
+ if(edit->keys[i])
+ MEM_freeN(edit->keys[i]);
+ ekey= edit->keys[i]= MEM_callocN(new_totkey*sizeof(ParticleEditKey), "particle edit keys");
- hkey = pa->hair;
- LOOP_KEYS {
- key->co= hkey->co;
- key->time= &hkey->time;
- hkey++;
+ for(k=0, key=pa->hair; k<pa->totkey; k++, key++, ekey++) {
+ ekey->co= key->co;
+ ekey->time= &key->time;
}
}
}
+
+ edit->totkeys= psys_count_keys(psys);
}
/************************ subdivide opertor *********************/
@@ -2019,19 +2023,19 @@ static void remove_tagged_keys(Scene *scene, Object *ob, ParticleSystem *psys)
/* works like normal edit mode subdivide, inserts keys between neighbouring selected keys */
static void subdivide_particle(PEData *data, int pa_index)
{
- PTCacheEdit *edit= data->edit;
- ParticleSystem *psys= edit->psys;
- ParticleData *pa= psys->particles + pa_index;
- PTCacheEditPoint *point = edit->points + pa_index;
+ ParticleSystem *psys= data->psys;
+ ParticleEdit *edit= psys->edit;
+ ParticleData *pa= &psys->particles[pa_index];
+
ParticleKey state;
HairKey *key, *nkey, *new_keys;
- PTCacheEditKey *ekey, *nekey, *new_ekeys;
+ ParticleEditKey *ekey, *nekey, *new_ekeys;
int k;
short totnewkey=0;
float endtime;
- for(k=0, ekey=point->keys; k<pa->totkey-1; k++,ekey++) {
+ for(k=0, ekey=edit->keys[pa_index]; k<pa->totkey-1; k++,ekey++) {
if(ekey->flag&PEK_SELECT && (ekey+1)->flag&PEK_SELECT)
totnewkey++;
}
@@ -2041,15 +2045,13 @@ static void subdivide_particle(PEData *data, int pa_index)
pa->flag |= PARS_REKEY;
nkey= new_keys= MEM_callocN((pa->totkey+totnewkey)*(sizeof(HairKey)),"Hair subdivide keys");
- nekey= new_ekeys= MEM_callocN((pa->totkey+totnewkey)*(sizeof(PTCacheEditKey)),"Hair subdivide edit keys");
-
- key = pa->hair;
- endtime= key[pa->totkey-1].time;
+ nekey= new_ekeys= MEM_callocN((pa->totkey+totnewkey)*(sizeof(ParticleEditKey)),"Hair subdivide edit keys");
+ endtime= pa->hair[pa->totkey-1].time;
- for(k=0, ekey=point->keys; k<pa->totkey-1; k++, key++, ekey++) {
+ for(k=0, key=pa->hair, ekey=edit->keys[pa_index]; k<pa->totkey-1; k++, key++, ekey++) {
memcpy(nkey,key,sizeof(HairKey));
- memcpy(nekey,ekey,sizeof(PTCacheEditKey));
+ memcpy(nekey,ekey,sizeof(ParticleEditKey));
nekey->co= nkey->co;
nekey->time= &nkey->time;
@@ -2066,8 +2068,6 @@ static void subdivide_particle(PEData *data, int pa_index)
nekey->co= nkey->co;
nekey->time= &nkey->time;
nekey->flag |= PEK_SELECT;
- if(!(psys->flag & PSYS_GLOBAL_HAIR))
- nekey->flag |= PEK_USE_WCO;
nekey++;
nkey++;
@@ -2075,7 +2075,7 @@ static void subdivide_particle(PEData *data, int pa_index)
}
/*tip still not copied*/
memcpy(nkey,key,sizeof(HairKey));
- memcpy(nekey,ekey,sizeof(PTCacheEditKey));
+ memcpy(nekey,ekey,sizeof(ParticleEditKey));
nekey->co= nkey->co;
nekey->time= &nkey->time;
@@ -2084,12 +2084,13 @@ static void subdivide_particle(PEData *data, int pa_index)
MEM_freeN(pa->hair);
pa->hair= new_keys;
- if(point->keys)
- MEM_freeN(point->keys);
- point->keys= new_ekeys;
+ if(edit->keys[pa_index])
+ MEM_freeN(edit->keys[pa_index]);
- point->totkey = pa->totkey = pa->totkey + totnewkey;
- point->flag |= PEP_EDIT_RECALC;
+ edit->keys[pa_index]= new_ekeys;
+
+ pa->totkey += totnewkey;
+ pa->flag |= PARS_EDIT_RECALC;
pa->flag &= ~PARS_REKEY;
}
@@ -2098,11 +2099,15 @@ static int subdivide_exec(bContext *C, wmOperator *op)
PEData data;
PE_set_data(C, &data);
- foreach_point(&data, subdivide_particle);
+ PE_foreach_particle(&data, subdivide_particle);
+
+ data.psys->edit->totkeys= psys_count_keys(data.psys);
- recalc_lengths(data.edit);
+ recalc_lengths(data.psys);
+ psys_update_world_cos(data.ob, data.psys);
+
PE_update_object(data.scene, data.ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, data.ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, data.ob);
return OPERATOR_FINISHED;
}
@@ -2127,18 +2132,15 @@ static int remove_doubles_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
+ ParticleSystem *psys= PE_get_current(scene, ob);
ParticleEditSettings *pset=PE_settings(scene);
- PTCacheEdit *edit= PE_get_current(scene, ob);
- ParticleSystem *psys = edit->psys;
+ ParticleData *pa;
+ ParticleEdit *edit;
ParticleSystemModifierData *psmd;
KDTree *tree;
KDTreeNearest nearest[10];
- POINT_P;
float mat[4][4], co[3], threshold= RNA_float_get(op->ptr, "threshold");
- int n, totn, removed, flag, totremoved;
-
- if(psys->flag & PSYS_GLOBAL_HAIR)
- return OPERATOR_CANCELLED;
+ int i, n, totn, removed, totpart, flag, totremoved;
edit= psys->edit;
psmd= psys_get_modifier(ob, psys);
@@ -2147,32 +2149,37 @@ static int remove_doubles_exec(bContext *C, wmOperator *op)
do {
removed= 0;
- tree=BLI_kdtree_new(psys->totpart);
+ totpart= psys->totpart;
+ tree=BLI_kdtree_new(totpart);
/* insert particles into kd tree */
- LOOP_SELECTED_POINTS {
- psys_mat_hair_to_object(ob, psmd->dm, psys->part->from, psys->particles+p, mat);
- VECCOPY(co, point->keys->co);
- Mat4MulVecfl(mat, co);
- BLI_kdtree_insert(tree, p, co, NULL);
+ LOOP_PARTICLES(i, pa) {
+ if(particle_is_selected(psys, pa)) {
+ psys_mat_hair_to_object(ob, psmd->dm, psys->part->from, pa, mat);
+ VECCOPY(co, pa->hair[0].co);
+ Mat4MulVecfl(mat, co);
+ BLI_kdtree_insert(tree, i, co, NULL);
+ }
}
BLI_kdtree_balance(tree);
/* tag particles to be removed */
- LOOP_SELECTED_POINTS {
- psys_mat_hair_to_object(ob, psmd->dm, psys->part->from, psys->particles+p, mat);
- VECCOPY(co, point->keys->co);
- Mat4MulVecfl(mat, co);
+ LOOP_PARTICLES(i, pa) {
+ if(particle_is_selected(psys, pa)) {
+ psys_mat_hair_to_object(ob, psmd->dm, psys->part->from, pa, mat);
+ VECCOPY(co, pa->hair[0].co);
+ Mat4MulVecfl(mat, co);
- totn= BLI_kdtree_find_n_nearest(tree,10,co,NULL,nearest);
+ totn= BLI_kdtree_find_n_nearest(tree,10,co,NULL,nearest);
- for(n=0; n<totn; n++) {
- /* this needs a custom threshold still */
- if(nearest[n].index > p && nearest[n].dist < threshold) {
- if(!(point->flag & PEP_TAG)) {
- point->flag |= PEP_TAG;
- removed++;
+ for(n=0; n<totn; n++) {
+ /* this needs a custom threshold still */
+ if(nearest[n].index > i && nearest[n].dist < threshold) {
+ if(!(pa->flag & PARS_TAG)) {
+ pa->flag |= PARS_TAG;
+ removed++;
+ }
}
}
}
@@ -2193,9 +2200,9 @@ static int remove_doubles_exec(bContext *C, wmOperator *op)
BKE_reportf(op->reports, RPT_INFO, "Remove %d double particles.", totremoved);
- PE_update_object(scene, ob, 0);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, ob);
+ psys_update_world_cos(ob, psys);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
return OPERATOR_FINISHED;
}
@@ -2340,16 +2347,16 @@ static EnumPropertyItem delete_type_items[]= {
static void set_delete_particle(PEData *data, int pa_index)
{
- PTCacheEdit *edit= data->edit;
+ ParticleSystem *psys= data->psys;
- edit->points[pa_index].flag |= PEP_TAG;
+ psys->particles[pa_index].flag |= PARS_TAG;
}
static void set_delete_particle_key(PEData *data, int pa_index, int key_index)
{
- PTCacheEdit *edit= data->edit;
+ ParticleSystem *psys= data->psys;
- edit->points[pa_index].keys[key_index].flag |= PEK_TAG;
+ psys->edit->keys[pa_index][key_index].flag |= PEK_TAG;
}
static int delete_exec(bContext *C, wmOperator *op)
@@ -2361,19 +2368,17 @@ static int delete_exec(bContext *C, wmOperator *op)
if(type == DEL_KEY) {
foreach_selected_key(&data, set_delete_particle_key);
- remove_tagged_keys(data.scene, data.ob, data.edit->psys);
- recalc_lengths(data.edit);
+ remove_tagged_keys(data.scene, data.ob, data.psys);
+ recalc_lengths(data.psys);
}
else if(type == DEL_PARTICLE) {
- foreach_selected_point(&data, set_delete_particle);
- remove_tagged_particles(data.scene, data.ob, data.edit->psys);
- recalc_lengths(data.edit);
+ foreach_selected_particle(&data, set_delete_particle);
+ remove_tagged_particles(data.scene, data.ob, data.psys);
+ recalc_lengths(data.psys);
}
- PE_update_object(data.scene, data.ob, 0);
-
- DAG_id_flush_update(&data.ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, data.ob);
+ DAG_object_flush_update(data.scene, data.ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, data.ob);
return OPERATOR_FINISHED;
}
@@ -2402,18 +2407,15 @@ static void PE_mirror_x(Scene *scene, Object *ob, int tagged)
{
Mesh *me= (Mesh*)(ob->data);
ParticleSystemModifierData *psmd;
- PTCacheEdit *edit= PE_get_current(scene, ob);
- ParticleSystem *psys = edit->psys;
+ ParticleSystem *psys= PE_get_current(scene, ob);
+ ParticleEdit *edit;
ParticleData *pa, *newpa, *new_pars;
- PTCacheEditPoint *newpoint, *new_points;
- POINT_P; KEY_K;
+ ParticleEditKey *ekey, **newkey, **key, **new_keys;
HairKey *hkey;
int *mirrorfaces;
- int rotation, totpart, newtotpart;
-
- if(psys->flag & PSYS_GLOBAL_HAIR)
- return;
+ int i, k, rotation, totpart, newtotpart;
+ edit= psys->edit;
psmd= psys_get_modifier(ob, psys);
mirrorfaces= mesh_get_x_mirror_faces(ob, NULL);
@@ -2423,28 +2425,29 @@ static void PE_mirror_x(Scene *scene, Object *ob, int tagged)
totpart= psys->totpart;
newtotpart= psys->totpart;
- LOOP_VISIBLE_POINTS {
- pa = psys->particles + p;
+ LOOP_PARTICLES(i, pa) {
+ if(pa->flag & PARS_HIDE) continue;
+
if(!tagged) {
- if(point_is_selected(point)) {
- if(edit->mirror_cache[p] != -1) {
+ if(particle_is_selected(psys, pa)) {
+ if(edit->mirror_cache[i] != -1) {
/* already has a mirror, don't need to duplicate */
PE_mirror_particle(ob, psmd->dm, psys, pa, NULL);
continue;
}
else
- point->flag |= PEP_TAG;
+ pa->flag |= PARS_TAG;
}
}
- if((point->flag & PEP_TAG) && mirrorfaces[pa->num*2] != -1)
+ if((pa->flag & PARS_TAG) && mirrorfaces[pa->num*2] != -1)
newtotpart++;
}
if(newtotpart != psys->totpart) {
/* allocate new arrays and copy existing */
new_pars= MEM_callocN(newtotpart*sizeof(ParticleData), "ParticleData new");
- new_points= MEM_callocN(newtotpart*sizeof(PTCacheEditPoint), "PTCacheEditPoint new");
+ new_keys= MEM_callocN(newtotpart*sizeof(ParticleEditKey*), "ParticleEditKey new");
if(psys->particles) {
memcpy(new_pars, psys->particles, totpart*sizeof(ParticleData));
@@ -2452,34 +2455,36 @@ static void PE_mirror_x(Scene *scene, Object *ob, int tagged)
}
psys->particles= new_pars;
- if(edit->points) {
- memcpy(new_points, edit->points, totpart*sizeof(PTCacheEditPoint));
- MEM_freeN(edit->points);
+ if(edit->keys) {
+ memcpy(new_keys, edit->keys, totpart*sizeof(ParticleEditKey*));
+ MEM_freeN(edit->keys);
}
- edit->points= new_points;
+ edit->keys= new_keys;
if(edit->mirror_cache) {
MEM_freeN(edit->mirror_cache);
edit->mirror_cache= NULL;
}
- edit->totpoint= psys->totpart= newtotpart;
+ psys->totpart= newtotpart;
/* create new elements */
+ pa= psys->particles;
newpa= psys->particles + totpart;
- newpoint= edit->points + totpart;
+ key= edit->keys;
+ newkey= edit->keys + totpart;
- LOOP_VISIBLE_POINTS {
- pa = psys->particles + p;
+ for(i=0; i<totpart; i++, pa++, key++) {
+ if(pa->flag & PARS_HIDE) continue;
- if(!(point->flag & PEP_TAG) || mirrorfaces[pa->num*2] == -1)
+ if(!(pa->flag & PARS_TAG) || mirrorfaces[pa->num*2] == -1)
continue;
/* duplicate */
*newpa= *pa;
- *newpoint= *point;
if(pa->hair) newpa->hair= MEM_dupallocN(pa->hair);
- if(point->keys) newpoint->keys= MEM_dupallocN(point->keys);
+ if(pa->keys) newpa->keys= MEM_dupallocN(pa->keys);
+ if(*key) *newkey= MEM_dupallocN(*key);
/* rotate weights according to vertex index rotation */
rotation= mirrorfaces[pa->num*2+1];
@@ -2498,24 +2503,25 @@ static void PE_mirror_x(Scene *scene, Object *ob, int tagged)
newpa->num_dmcache= psys_particle_dm_face_lookup(ob,psmd->dm,newpa->num,newpa->fuv, NULL);
/* update edit key pointers */
- key= newpoint->keys;
- for(k=0, hkey=newpa->hair; k<newpa->totkey; k++, hkey++, key++) {
- key->co= hkey->co;
- key->time= &hkey->time;
+ ekey= *newkey;
+ for(k=0, hkey=newpa->hair; k<newpa->totkey; k++, hkey++, ekey++) {
+ ekey->co= hkey->co;
+ ekey->time= &hkey->time;
}
/* map key positions as mirror over x axis */
PE_mirror_particle(ob, psmd->dm, psys, pa, newpa);
newpa++;
- newpoint++;
+ newkey++;
}
- }
- LOOP_POINTS {
- point->flag &= ~PEP_TAG;
+ edit->totkeys= psys_count_keys(psys);
}
+ for(pa=psys->particles, i=0; i<psys->totpart; i++, pa++)
+ pa->flag &= ~PARS_TAG;
+
MEM_freeN(mirrorfaces);
}
@@ -2523,13 +2529,13 @@ static int mirror_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
- PTCacheEdit *edit= PE_get_current(scene, ob);
+ ParticleSystem *psys= PE_get_current(scene, ob);
PE_mirror_x(scene, ob, 0);
- update_world_cos(ob, edit);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, ob);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ psys_update_world_cos(ob, psys);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -2554,6 +2560,7 @@ static EnumPropertyItem brush_type_items[]= {
{PE_BRUSH_NONE, "NONE", 0, "None", ""},
{PE_BRUSH_COMB, "COMB", 0, "Comb", ""},
{PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", ""},
+ {PE_BRUSH_WEIGHT, "WEIGHT", 0, "Weight", ""},
{PE_BRUSH_ADD, "ADD", 0, "Add", ""},
{PE_BRUSH_LENGTH, "LENGTH", 0, "Length", ""},
{PE_BRUSH_PUFF, "PUFF", 0, "Puff", ""},
@@ -2586,46 +2593,14 @@ void PARTICLE_OT_brush_set(wmOperatorType *ot)
RNA_def_enum(ot->srna, "type", brush_type_items, PE_BRUSH_NONE, "Type", "Brush type to select for editing.");
}
-
-/*********************** set mode operator **********************/
-
-static EnumPropertyItem edit_type_items[]= {
- {PE_TYPE_PARTICLES, "PARTICLES", 0, "Particles", ""},
- {PE_TYPE_SOFTBODY, "SOFTBODY", 0, "Soft body", ""},
- {PE_TYPE_CLOTH, "CLOTH", 0, "Cloth", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
-static int set_edit_mode_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- ParticleEditSettings *pset= PE_settings(scene);
-
- pset->edittype= RNA_enum_get(op->ptr, "type");
-
- return OPERATOR_FINISHED;
-}
-
-void PARTICLE_OT_edit_type_set(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Set Edit Type";
- ot->idname= "PARTICLE_OT_edit_type_set";
-
- /* api callbacks */
- ot->exec= set_edit_mode_exec;
- ot->invoke= WM_menu_invoke;
- ot->poll= PE_poll;
-
- /* properties */
- RNA_def_enum(ot->srna, "type", edit_type_items, PE_TYPE_PARTICLES, "Type", "Edit type to select for editing.");
-}
-
/************************* brush edit callbacks ********************/
-static void brush_comb(PEData *data, float mat[][4], float imat[][4], int point_index, int key_index, PTCacheEditKey *key)
+static void brush_comb(PEData *data, float mat[][4], float imat[][4], int pa_index, int key_index)
{
+ ParticleSystem *psys= data->psys;
+ ParticleData *pa= &psys->particles[pa_index];
ParticleEditSettings *pset= PE_settings(data->scene);
+ HairKey *key= pa->hair + key_index;
float cvec[3], fac;
if(pset->flag & PE_LOCK_FIRST && key_index == 0) return;
@@ -2637,19 +2612,19 @@ static void brush_comb(PEData *data, float mat[][4], float imat[][4], int point_
VecMulf(cvec, fac);
VECADD(key->co, key->co, cvec);
- (data->edit->points + point_index)->flag |= PEP_EDIT_RECALC;
+ pa->flag |= PARS_EDIT_RECALC;
}
static void brush_cut(PEData *data, int pa_index)
{
- PTCacheEdit *edit = data->edit;
+ ParticleSystem *psys= data->psys;
ARegion *ar= data->vc.ar;
Object *ob= data->ob;
- ParticleEditSettings *pset= PE_settings(data->scene);
- ParticleCacheKey *key= edit->pathcache[pa_index];
+ ParticleData *pa= &psys->particles[pa_index];
+ ParticleCacheKey *key= psys->pathcache[pa_index];
float rad2, cut_time= 1.0;
float x0, x1, v0, v1, o0, o1, xo0, xo1, d, dv;
- int k, cut, keys= (int)pow(2.0, (double)pset->draw_step);
+ int k, cut, keys= (int)pow(2.0, (double)psys->part->draw_step);
short vertco[2];
/* blunt scissors */
@@ -2724,97 +2699,93 @@ static void brush_cut(PEData *data, int pa_index)
if(cut) {
if(cut_time < 0.0f) {
- edit->points[pa_index].flag |= PEP_TAG;
+ pa->flag |= PARS_TAG;
}
else {
rekey_particle_to_time(data->scene, ob, pa_index, cut_time);
- edit->points[pa_index].flag |= PEP_EDIT_RECALC;
+ pa->flag |= PARS_EDIT_RECALC;
}
}
}
-static void brush_length(PEData *data, int point_index)
+static void brush_length(PEData *data, int pa_index)
{
- PTCacheEdit *edit= data->edit;
- PTCacheEditPoint *point = edit->points + point_index;
- KEY_K;
+ ParticleSystem *psys= data->psys;
+ ParticleData *pa= &psys->particles[pa_index];
+ HairKey *key;
float dvec[3],pvec[3];
+ int k;
- LOOP_KEYS {
- if(k==0) {
- VECCOPY(pvec,key->co);
- }
- else {
- VECSUB(dvec,key->co,pvec);
- VECCOPY(pvec,key->co);
- VecMulf(dvec,data->growfac);
- VECADD(key->co,(key-1)->co,dvec);
- }
+ key= pa->hair;
+ VECCOPY(pvec,key->co);
+
+ for(k=1, key++; k<pa->totkey; k++,key++) {
+ VECSUB(dvec,key->co,pvec);
+ VECCOPY(pvec,key->co);
+ VecMulf(dvec,data->growfac);
+ VECADD(key->co,(key-1)->co,dvec);
}
- point->flag |= PEP_EDIT_RECALC;
+ pa->flag |= PARS_EDIT_RECALC;
}
-static void brush_puff(PEData *data, int point_index)
+static void brush_puff(PEData *data, int pa_index)
{
- PTCacheEdit *edit = data->edit;
- ParticleSystem *psys = edit->psys;
- PTCacheEditPoint *point = edit->points + point_index;
- KEY_K;
+ ParticleSystem *psys= data->psys;
+ ParticleData *pa= &psys->particles[pa_index];
+ ParticleEdit *edit= psys->edit;
+ HairKey *key;
float mat[4][4], imat[4][4];
float lastco[3], rootco[3], co[3], nor[3], kco[3], dco[3], fac, length;
+ int k;
- if(psys && !(psys->flag & PSYS_GLOBAL_HAIR)) {
- psys_mat_hair_to_global(data->ob, data->dm, psys->part->from, psys->particles + point_index, mat);
- Mat4Invert(imat,mat);
- }
- else {
- Mat4One(mat);
- Mat4One(imat);
- }
+ psys_mat_hair_to_global(data->ob, data->dm, psys->part->from, pa, mat);
+ Mat4Invert(imat,mat);
- LOOP_KEYS {
- if(k==0) {
- /* find root coordinate and normal on emitter */
- VECCOPY(co, key->co);
- Mat4MulVecfl(mat, co);
+ /* find root coordinate and normal on emitter */
+ key= pa->hair;
+ VECCOPY(co, key->co);
+ Mat4MulVecfl(mat, co);
- point_index= BLI_kdtree_find_nearest(edit->emitter_field, co, NULL, NULL);
- if(point_index == -1) return;
+ pa_index= BLI_kdtree_find_nearest(edit->emitter_field, co, NULL, NULL);
+ if(pa_index == -1) return;
- VECCOPY(rootco, co);
- VecCopyf(nor, &edit->emitter_cosnos[point_index*6+3]);
- Normalize(nor);
- length= 0.0f;
+ VECCOPY(rootco, co);
+ VecCopyf(nor, &psys->edit->emitter_cosnos[pa_index*6+3]);
+ Normalize(nor);
+ length= 0.0f;
- fac= (float)pow((double)(1.0f - data->dist / data->rad), (double)data->pufffac);
- fac *= 0.025f;
- if(data->invert)
- fac= -fac;
- }
- else {
- /* compute position as if hair was standing up straight */
- VECCOPY(lastco, co);
- VECCOPY(co, key->co);
- Mat4MulVecfl(mat, co);
- length += VecLenf(lastco, co);
+ fac= (float)pow((double)(1.0f - data->dist / data->rad), (double)data->pufffac);
+ fac *= 0.025f;
+ if(data->invert)
+ fac= -fac;
- VECADDFAC(kco, rootco, nor, length);
+ for(k=1, key++; k<pa->totkey; k++, key++) {
+ /* compute position as if hair was standing up straight */
+ VECCOPY(lastco, co);
+ VECCOPY(co, key->co);
+ Mat4MulVecfl(mat, co);
+ length += VecLenf(lastco, co);
- /* blend between the current and straight position */
- VECSUB(dco, kco, co);
- VECADDFAC(co, co, dco, fac);
+ VECADDFAC(kco, rootco, nor, length);
- VECCOPY(key->co, co);
- Mat4MulVecfl(imat, key->co);
- }
+ /* blend between the current and straight position */
+ VECSUB(dco, kco, co);
+ VECADDFAC(co, co, dco, fac);
+
+ VECCOPY(key->co, co);
+ Mat4MulVecfl(imat, key->co);
}
- point->flag |= PEP_EDIT_RECALC;
+ pa->flag |= PARS_EDIT_RECALC;
}
-static void brush_smooth_get(PEData *data, float mat[][4], float imat[][4], int point_index, int key_index, PTCacheEditKey *key)
-{
+static void brush_smooth_get(PEData *data, float mat[][4], float imat[][4], int pa_index, int key_index)
+{
+ ParticleSystem *psys= data->psys;
+ ParticleData *pa= &psys->particles[pa_index];
+ HairKey *key= pa->hair + key_index;
+
if(key_index) {
float dvec[3];
@@ -2825,8 +2796,11 @@ static void brush_smooth_get(PEData *data, float mat[][4], float imat[][4], int
}
}
-static void brush_smooth_do(PEData *data, float mat[][4], float imat[][4], int point_index, int key_index, PTCacheEditKey *key)
+static void brush_smooth_do(PEData *data, float mat[][4], float imat[][4], int pa_index, int key_index)
{
+ ParticleSystem *psys= data->psys;
+ ParticleData *pa= &psys->particles[pa_index];
+ HairKey *key= pa->hair + key_index;
float vec[3], dvec[3];
if(key_index) {
@@ -2841,18 +2815,18 @@ static void brush_smooth_do(PEData *data, float mat[][4], float imat[][4], int p
VECADD(key->co,key->co,dvec);
}
- (data->edit->points + point_index)->flag |= PEP_EDIT_RECALC;
+ pa->flag |= PARS_EDIT_RECALC;
}
static void brush_add(PEData *data, short number)
{
Scene *scene= data->scene;
Object *ob= data->ob;
- PTCacheEdit *edit = data->edit;
- ParticleSystem *psys= edit->psys;
+ ParticleSystem *psys= data->psys;
ParticleData *add_pars= MEM_callocN(number*sizeof(ParticleData),"ParticleData add");
ParticleSystemModifierData *psmd= psys_get_modifier(ob,psys);
ParticleEditSettings *pset= PE_settings(scene);
+ ParticleEdit *edit= psys->edit;
int i, k, n= 0, totpart= psys->totpart;
short mco[2];
short dmx= 0, dmy= 0;
@@ -2863,9 +2837,6 @@ static void brush_add(PEData *data, short number)
DerivedMesh *dm=0;
Mat4Invert(imat,ob->obmat);
- if(psys->flag & PSYS_GLOBAL_HAIR)
- return;
-
BLI_srandom(psys->seed+data->mval[0]+data->mval[1]);
/* painting onto the deformed mesh, could be an option? */
@@ -2902,20 +2873,19 @@ static void brush_add(PEData *data, short number)
float hairmat[4][4], cur_co[3];
KDTree *tree=0;
ParticleData *pa, *new_pars= MEM_callocN(newtotpart*sizeof(ParticleData),"ParticleData new");
- PTCacheEditPoint *point, *new_points= MEM_callocN(newtotpart*sizeof(PTCacheEditPoint),"PTCacheEditPoint array new");
- PTCacheEditKey *key;
+ ParticleEditKey *ekey, **key, **new_keys= MEM_callocN(newtotpart*sizeof(ParticleEditKey *),"ParticleEditKey array new");
HairKey *hkey;
/* save existing elements */
memcpy(new_pars, psys->particles, totpart * sizeof(ParticleData));
- memcpy(new_points, edit->points, totpart * sizeof(PTCacheEditPoint));
+ memcpy(new_keys, edit->keys, totpart * sizeof(ParticleEditKey*));
/* change old arrays to new ones */
if(psys->particles) MEM_freeN(psys->particles);
psys->particles= new_pars;
- if(edit->points) MEM_freeN(edit->points);
- edit->points= new_points;
+ if(edit->keys) MEM_freeN(edit->keys);
+ edit->keys= new_keys;
if(edit->mirror_cache) {
MEM_freeN(edit->mirror_cache);
@@ -2934,29 +2904,29 @@ static void brush_add(PEData *data, short number)
BLI_kdtree_balance(tree);
}
- edit->totpoint= psys->totpart= newtotpart;
+ psys->totpart= newtotpart;
/* create new elements */
pa= psys->particles + totpart;
- point= edit->points + totpart;
+ key= edit->keys + totpart;
- for(i=totpart; i<newtotpart; i++, pa++, point++) {
+ for(i=totpart; i<newtotpart; i++, pa++, key++) {
memcpy(pa, add_pars + i - totpart, sizeof(ParticleData));
pa->hair= MEM_callocN(pset->totaddkey * sizeof(HairKey), "BakeKey key add");
- key= point->keys= MEM_callocN(pset->totaddkey * sizeof(PTCacheEditKey), "PTCacheEditKey add");
- point->totkey= pa->totkey= pset->totaddkey;
+ ekey= *key= MEM_callocN(pset->totaddkey * sizeof(ParticleEditKey), "ParticleEditKey add");
+ pa->totkey= pset->totaddkey;
- for(k=0, hkey=pa->hair; k<pa->totkey; k++, hkey++, key++) {
- key->co= hkey->co;
- key->time= &hkey->time;
+ for(k=0, hkey=pa->hair; k<pa->totkey; k++, hkey++, ekey++) {
+ ekey->co= hkey->co;
+ ekey->time= &hkey->time;
}
pa->size= 1.0f;
initialize_particle(pa,i,ob,psys,psmd);
reset_particle(scene, pa,psys,psmd,ob,0.0,1.0,0,0,0);
- point->flag |= PEP_EDIT_RECALC;
+ pa->flag |= PARS_EDIT_RECALC;
if(pset->flag & PE_X_MIRROR)
- point->flag |= PEP_TAG; /* signal for duplicate */
+ pa->flag |= PARS_TAG; /* signal for duplicate */
framestep= pa->lifetime/(float)(pset->totaddkey-1);
@@ -2986,7 +2956,7 @@ static void brush_add(PEData *data, short number)
weight[w] /= totw;
for(k=0; k<pset->totaddkey; k++) {
- hkey= (HairKey*)pa->hair + k;
+ hkey= pa->hair + k;
hkey->time= pa->time + k * framestep;
key[0].time= hkey->time/ 100.0f;
@@ -3010,15 +2980,15 @@ static void brush_add(PEData *data, short number)
if(k==0)
VECSUB(co1, pa->state.co, key[0].co);
- VECADD(hkey->co, key[0].co, co1);
+ VECADD(pa->hair[k].co, key[0].co, co1);
- hkey->time= key[0].time;
+ pa->hair[k].time= key[0].time;
}
}
else {
for(k=0, hkey=pa->hair; k<pset->totaddkey; k++, hkey++) {
VECADDFAC(hkey->co, pa->state.co, pa->state.vel, k * framestep * timestep);
- hkey->time += k * framestep;
+ pa->hair[k].time += k * framestep;
}
}
for(k=0, hkey=pa->hair; k<pset->totaddkey; k++, hkey++) {
@@ -3027,6 +2997,7 @@ static void brush_add(PEData *data, short number)
Mat4MulVecfl(imat, hkey->co);
}
}
+ edit->totkeys= psys_count_keys(psys);
if(tree)
BLI_kdtree_free(tree);
@@ -3038,12 +3009,25 @@ static void brush_add(PEData *data, short number)
dm->release(dm);
}
+static void brush_weight(PEData *data, float mat[][4], float imat[][4], int pa_index, int key_index)
+{
+ ParticleSystem *psys= data->psys;
+ ParticleData *pa;
+
+ /* roots have full weight allways */
+ if(key_index) {
+ pa= &psys->particles[pa_index];
+ pa->hair[key_index].weight= data->weightfac;
+ pa->flag |= PARS_EDIT_RECALC;
+ }
+}
+
/************************* brush edit operator ********************/
typedef struct BrushEdit {
Scene *scene;
Object *ob;
- PTCacheEdit *edit;
+ ParticleSystem *psys;
int first;
int lastmouse[2];
@@ -3053,8 +3037,8 @@ static int brush_edit_init(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
+ ParticleSystem *psys= PE_get_current(scene, ob);
ParticleEditSettings *pset= PE_settings(scene);
- PTCacheEdit *edit= PE_get_current(scene, ob);
ARegion *ar= CTX_wm_region(C);
BrushEdit *bedit;
@@ -3069,7 +3053,7 @@ static int brush_edit_init(bContext *C, wmOperator *op)
bedit->scene= scene;
bedit->ob= ob;
- bedit->edit= edit;
+ bedit->psys= psys;
return 1;
}
@@ -3079,18 +3063,14 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
BrushEdit *bedit= op->customdata;
Scene *scene= bedit->scene;
Object *ob= bedit->ob;
- PTCacheEdit *edit= bedit->edit;
+ ParticleSystem *psys= bedit->psys;
ParticleEditSettings *pset= PE_settings(scene);
- ParticleSystemModifierData *psmd= edit->psys ? psys_get_modifier(ob, edit->psys) : NULL;
+ ParticleSystemModifierData *psmd= psys_get_modifier(ob, psys);
ParticleBrushData *brush= &pset->brush[pset->brushtype];
ARegion *ar= CTX_wm_region(C);
- float vec[3], mousef[2];
+ float vec1[3], vec2[3], mousef[2];
short mval[2], mvalo[2];
int flip, mouse[2], dx, dy, removed= 0, selected= 0;
- int lock_root = pset->flag & PE_LOCK_FIRST;
-
- if(!PE_start_edit(edit))
- return;
RNA_float_get_array(itemptr, "mouse", mousef);
mouse[0] = mousef[0];
@@ -3111,16 +3091,12 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
mvalo[0]= bedit->lastmouse[0];
mvalo[1]= bedit->lastmouse[1];
- /* disable locking temporatily for disconnected hair */
- if(edit->psys && edit->psys->flag & PSYS_GLOBAL_HAIR)
- pset->flag &= ~PE_LOCK_FIRST;
-
if(((pset->brushtype == PE_BRUSH_ADD) ?
(sqrt(dx * dx + dy * dy) > pset->brush[PE_BRUSH_ADD].step) : (dx != 0 || dy != 0))
|| bedit->first) {
view3d_operator_needs_opengl(C);
- selected= (short)count_selected_keys(scene, edit);
+ selected= (short)count_selected_keys(scene, psys);
switch(pset->brushtype) {
case PE_BRUSH_COMB:
@@ -3139,8 +3115,10 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
Mat4Invert(ob->imat, ob->obmat);
- window_to_3d_delta(ar, vec, dx, dy);
- data.dvec= vec;
+ window_to_3d(ar, vec1, mvalo[0], mvalo[1]);
+ window_to_3d(ar, vec2, mval[0], mval[1]);
+ VECSUB(vec1, vec2, vec1);
+ data.dvec= vec1;
foreach_mouse_hit_key(&data, brush_comb, selected);
break;
@@ -3148,22 +3126,20 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
case PE_BRUSH_CUT:
{
PEData data;
-
- if(edit->psys && edit->pathcache) {
- PE_set_view3d_data(C, &data);
- data.mval= mval;
- data.rad= (float)brush->size;
- data.cutfac= (float)(brush->strength / 100.0f);
- if(selected)
- foreach_selected_point(&data, brush_cut);
- else
- foreach_point(&data, brush_cut);
+ PE_set_view3d_data(C, &data);
+ data.mval= mval;
+ data.rad= (float)brush->size;
+ data.cutfac= (float)(brush->strength / 100.0f);
- removed= remove_tagged_particles(scene, ob, edit->psys);
- if(pset->flag & PE_KEEP_LENGTHS)
- recalc_lengths(edit);
- }
+ if(selected)
+ foreach_selected_particle(&data, brush_cut);
+ else
+ PE_foreach_particle(&data, brush_cut);
+
+ removed= remove_tagged_particles(scene, ob, psys);
+ if(pset->flag & PE_KEEP_LENGTHS)
+ recalc_lengths(psys);
break;
}
case PE_BRUSH_LENGTH:
@@ -3181,50 +3157,61 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
else
data.growfac= 1.0f + data.growfac;
- foreach_mouse_hit_point(&data, brush_length, selected);
+ foreach_mouse_hit_particle(&data, brush_length, selected);
if(pset->flag & PE_KEEP_LENGTHS)
- recalc_lengths(edit);
+ recalc_lengths(psys);
break;
}
case PE_BRUSH_PUFF:
{
PEData data;
- if(edit->psys) {
- PE_set_view3d_data(C, &data);
- data.dm= psmd->dm;
- data.mval= mval;
- data.rad= (float)brush->size;
+ PE_set_view3d_data(C, &data);
+ data.dm= psmd->dm;
+ data.mval= mval;
+ data.rad= (float)brush->size;
- data.pufffac= (float)(brush->strength - 50) / 50.0f;
- if(data.pufffac < 0.0f)
- data.pufffac= 1.0f - 9.0f * data.pufffac;
- else
- data.pufffac= 1.0f - data.pufffac;
+ data.pufffac= (float)(brush->strength - 50) / 50.0f;
+ if(data.pufffac < 0.0f)
+ data.pufffac= 1.0f - 9.0f * data.pufffac;
+ else
+ data.pufffac= 1.0f - data.pufffac;
- data.invert= (brush->invert ^ flip);
- Mat4Invert(ob->imat, ob->obmat);
+ data.invert= (brush->invert ^ flip);
+ Mat4Invert(ob->imat, ob->obmat);
- foreach_mouse_hit_point(&data, brush_puff, selected);
- }
+ foreach_mouse_hit_particle(&data, brush_puff, selected);
break;
}
case PE_BRUSH_ADD:
{
PEData data;
- if(edit->psys && edit->psys->part->from==PART_FROM_FACE) {
+ if(psys->part->from==PART_FROM_FACE) {
PE_set_view3d_data(C, &data);
data.mval= mval;
brush_add(&data, brush->strength);
if(pset->flag & PE_KEEP_LENGTHS)
- recalc_lengths(edit);
+ recalc_lengths(psys);
}
break;
}
+ case PE_BRUSH_WEIGHT:
+ {
+ PEData data;
+
+ PE_set_view3d_data(C, &data);
+ data.mval= mval;
+ data.rad= (float)brush->size;
+
+ data.weightfac= (float)(brush->strength / 100.0f);
+
+ foreach_mouse_hit_key(&data, brush_weight, selected);
+ break;
+ }
case PE_BRUSH_SMOOTH:
{
PEData data;
@@ -3251,27 +3238,25 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
}
}
if((pset->flag & PE_KEEP_LENGTHS)==0)
- recalc_lengths(edit);
+ recalc_lengths(psys);
if(pset->brushtype == PE_BRUSH_ADD || removed) {
if(pset->brushtype == PE_BRUSH_ADD && (pset->flag & PE_X_MIRROR))
PE_mirror_x(scene, ob, 1);
- update_world_cos(ob,edit);
- psys_free_path_cache(NULL, edit);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ psys_update_world_cos(ob,psys);
+ psys_free_path_cache(psys);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
else
PE_update_object(scene, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
bedit->lastmouse[0]= mouse[0];
bedit->lastmouse[1]= mouse[1];
bedit->first= 0;
}
-
- pset->flag |= lock_root;
}
static void brush_edit_exit(bContext *C, wmOperator *op)
@@ -3372,161 +3357,104 @@ void PARTICLE_OT_brush_edit(wmOperatorType *ot)
/*********************** undo ***************************/
-static void free_PTCacheUndo(PTCacheUndo *undo)
+static void free_ParticleUndo(ParticleUndo *undo)
{
- PTCacheEditPoint *point;
+ ParticleData *pa;
int i;
- for(i=0, point=undo->points; i<undo->totpoint; i++, point++) {
- if(undo->particles && (undo->particles + i)->hair)
- MEM_freeN((undo->particles + i)->hair);
- if(point->keys)
- MEM_freeN(point->keys);
+ for(i=0, pa=undo->particles; i<undo->totpart; i++, pa++) {
+ if(pa->hair)
+ MEM_freeN(pa->hair);
+ if(undo->keys[i])
+ MEM_freeN(undo->keys[i]);
}
- if(undo->points)
- MEM_freeN(undo->points);
+ if(undo->keys)
+ MEM_freeN(undo->keys);
if(undo->particles)
MEM_freeN(undo->particles);
- BKE_ptcache_free_mem(&undo->mem_cache);
+ //if(undo->emitter_cosnos)
+ // MEM_freeN(undo->emitter_cosnos);
}
-static void make_PTCacheUndo(PTCacheEdit *edit, PTCacheUndo *undo)
+static void make_ParticleUndo(ParticleSystem *psys, ParticleUndo *undo)
{
- PTCacheEditPoint *point;
+ ParticleData *pa,*upa;
int i;
- undo->totpoint= edit->totpoint;
-
- if(edit->psys) {
- ParticleData *pa;
-
- pa= undo->particles= MEM_dupallocN(edit->psys->particles);
-
- for(i=0; i<edit->totpoint; i++, pa++)
- pa->hair= MEM_dupallocN(pa->hair);
+ undo->totpart= psys->totpart;
+ undo->totkeys= psys->edit->totkeys;
- undo->psys_flag = edit->psys->flag;
- }
- else {
- PTCacheMem *pm;
-
- BLI_duplicatelist(&undo->mem_cache, &edit->pid.cache->mem_cache);
- pm = undo->mem_cache.first;
-
- for(; pm; pm=pm->next) {
- for(i=0; i<BPHYS_TOT_DATA; i++)
- pm->data[i] = MEM_dupallocN(pm->data[i]);
- }
- }
-
- point= undo->points = MEM_dupallocN(edit->points);
- undo->totpoint = edit->totpoint;
-
- for(i=0; i<edit->totpoint; i++, point++) {
- point->keys= MEM_dupallocN(point->keys);
+ upa= undo->particles= MEM_dupallocN(psys->particles);
+ undo->keys= MEM_dupallocN(psys->edit->keys);
+
+ for(i=0, pa=psys->particles; i<undo->totpart; i++, pa++, upa++) {
+ upa->hair= MEM_dupallocN(pa->hair);
+ undo->keys[i]= MEM_dupallocN(psys->edit->keys[i]);
/* no need to update edit key->co & key->time pointers here */
}
}
-static void get_PTCacheUndo(PTCacheEdit *edit, PTCacheUndo *undo)
+static void get_ParticleUndo(ParticleSystem *psys, ParticleUndo *undo)
{
- ParticleSystem *psys = edit->psys;
- ParticleData *pa;
+ ParticleData *pa, *upa;
+ ParticleEditKey *key;
HairKey *hkey;
- POINT_P; KEY_K;
+ int i, k, totpart= psys->totpart;
- LOOP_POINTS {
- if(psys && psys->particles[p].hair)
- MEM_freeN(psys->particles[p].hair);
+ LOOP_PARTICLES(i, pa) {
+ if(pa->hair)
+ MEM_freeN(pa->hair);
- if(point->keys)
- MEM_freeN(point->keys);
+ if(psys->edit->keys[i])
+ MEM_freeN(psys->edit->keys[i]);
}
- if(psys && psys->particles)
+ if(psys->particles)
MEM_freeN(psys->particles);
- if(edit->points)
- MEM_freeN(edit->points);
- if(edit->mirror_cache) {
- MEM_freeN(edit->mirror_cache);
- edit->mirror_cache= NULL;
+ if(psys->edit->keys)
+ MEM_freeN(psys->edit->keys);
+ if(psys->edit->mirror_cache) {
+ MEM_freeN(psys->edit->mirror_cache);
+ psys->edit->mirror_cache= NULL;
}
- edit->points= MEM_dupallocN(undo->points);
- edit->totpoint = undo->totpoint;
-
- LOOP_POINTS {
- point->keys= MEM_dupallocN(point->keys);
- }
-
- if(psys) {
- psys->particles= MEM_dupallocN(undo->particles);
-
- psys->totpart= undo->totpoint;
+ pa= psys->particles= MEM_dupallocN(undo->particles);
+ psys->edit->keys= MEM_dupallocN(undo->keys);
- LOOP_POINTS {
- pa = psys->particles + p;
- hkey= pa->hair = MEM_dupallocN(pa->hair);
-
- LOOP_KEYS {
- key->co= hkey->co;
- key->time= &hkey->time;
- hkey++;
- }
+ for(i=0,upa=undo->particles; i<undo->totpart; i++, upa++, pa++) {
+ hkey= pa->hair= MEM_dupallocN(upa->hair);
+ key= psys->edit->keys[i]= MEM_dupallocN(undo->keys[i]);
+ for(k=0; k<pa->totkey; k++, hkey++, key++) {
+ key->co= hkey->co;
+ key->time= &hkey->time;
}
-
- psys->flag = undo->psys_flag;
}
- else {
- PTCacheMem *pm;
- int i;
-
- BKE_ptcache_free_mem(&edit->pid.cache->mem_cache);
-
- BLI_duplicatelist(&edit->pid.cache->mem_cache, &undo->mem_cache);
- pm = edit->pid.cache->mem_cache.first;
-
- for(; pm; pm=pm->next) {
- for(i=0; i<BPHYS_TOT_DATA; i++)
- pm->data[i] = MEM_dupallocN(pm->data[i]);
-
- BKE_ptcache_mem_init_pointers(pm);
-
- LOOP_POINTS {
- LOOP_KEYS {
- if((int)key->ftime == pm->frame) {
- key->co = pm->cur[BPHYS_DATA_LOCATION];
- key->vel = pm->cur[BPHYS_DATA_VELOCITY];
- key->rot = pm->cur[BPHYS_DATA_ROTATION];
- key->time = &key->ftime;
- }
- }
- BKE_ptcache_mem_incr_pointers(pm);
- }
- }
- }
+ psys->totpart= undo->totpart;
+ psys->edit->totkeys= undo->totkeys;
}
void PE_undo_push(Scene *scene, char *str)
{
- PTCacheEdit *edit= PE_get_current(scene, OBACT);
- PTCacheUndo *undo;
+ ParticleSystem *psys= PE_get_current(scene, OBACT);
+ ParticleEdit *edit= 0;
+ ParticleUndo *undo;
int nr;
- if(!edit) return;
+ if(!PE_can_edit(psys)) return;
+ edit= psys->edit;
/* remove all undos after (also when curundo==NULL) */
while(edit->undo.last != edit->curundo) {
undo= edit->undo.last;
BLI_remlink(&edit->undo, undo);
- free_PTCacheUndo(undo);
+ free_ParticleUndo(undo);
MEM_freeN(undo);
}
/* make new */
- edit->curundo= undo= MEM_callocN(sizeof(PTCacheUndo), "particle undo file");
+ edit->curundo= undo= MEM_callocN(sizeof(ParticleUndo), "particle undo file");
strncpy(undo->name, str, 64-1);
BLI_addtail(&edit->undo, undo);
@@ -3540,25 +3468,27 @@ void PE_undo_push(Scene *scene, char *str)
}
if(undo) {
while(edit->undo.first!=undo) {
- PTCacheUndo *first= edit->undo.first;
+ ParticleUndo *first= edit->undo.first;
BLI_remlink(&edit->undo, first);
- free_PTCacheUndo(first);
+ free_ParticleUndo(first);
MEM_freeN(first);
}
}
/* copy */
- make_PTCacheUndo(edit,edit->curundo);
+ make_ParticleUndo(psys,edit->curundo);
}
void PE_undo_step(Scene *scene, int step)
{
- PTCacheEdit *edit= PE_get_current(scene, OBACT);
+ ParticleSystem *psys= PE_get_current(scene, OBACT);
+ ParticleEdit *edit= 0;
- if(!edit) return;
+ if(!PE_can_edit(psys)) return;
+ edit= psys->edit;
if(step==0) {
- get_PTCacheUndo(edit,edit->curundo);
+ get_ParticleUndo(psys,edit->curundo);
}
else if(step==1) {
@@ -3566,7 +3496,7 @@ void PE_undo_step(Scene *scene, int step)
else {
if(G.f & G_DEBUG) printf("undo %s\n", edit->curundo->name);
edit->curundo= edit->curundo->prev;
- get_PTCacheUndo(edit, edit->curundo);
+ get_ParticleUndo(psys, edit->curundo);
}
}
else {
@@ -3574,19 +3504,18 @@ void PE_undo_step(Scene *scene, int step)
if(edit->curundo==NULL || edit->curundo->next==NULL);
else {
- get_PTCacheUndo(edit, edit->curundo->next);
+ get_ParticleUndo(psys, edit->curundo->next);
edit->curundo= edit->curundo->next;
if(G.f & G_DEBUG) printf("redo %s\n", edit->curundo->name);
}
}
- PE_update_object(scene, OBACT, 0);
- DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, OBACT, OB_RECALC_DATA);
}
-static void PTCacheUndo_number(Scene *scene, PTCacheEdit *edit, int nr)
+static void ParticleUndo_number(Scene *scene, ParticleEdit *edit, int nr)
{
- PTCacheUndo *undo;
+ ParticleUndo *undo;
int a=1;
for(undo= edit->undo.first; undo; undo= undo->next, a++) {
@@ -3596,15 +3525,20 @@ static void PTCacheUndo_number(Scene *scene, PTCacheEdit *edit, int nr)
PE_undo_step(scene, 0);
}
-static void PTCacheUndo_clear(PTCacheEdit *edit)
+static void ParticleUndo_clear(ParticleSystem *psys)
{
- PTCacheUndo *undo;
+ ParticleUndo *undo;
+ ParticleEdit *edit;
+
+ if(psys==0) return;
+
+ edit= psys->edit;
if(edit==0) return;
undo= edit->undo.first;
while(undo) {
- free_PTCacheUndo(undo);
+ free_ParticleUndo(undo);
undo= undo->next;
}
BLI_freelistN(&edit->undo);
@@ -3623,13 +3557,15 @@ void PE_redo(Scene *scene)
void PE_undo_menu(Scene *scene, Object *ob)
{
- PTCacheEdit *edit= PE_get_current(scene, ob);
- PTCacheUndo *undo;
+ ParticleSystem *psys= PE_get_current(scene, ob);
+ ParticleEdit *edit= 0;
+ ParticleUndo *undo;
DynStr *ds;
short event=0;
char *menu;
- if(!edit) return;
+ if(!PE_can_edit(psys)) return;
+ edit= psys->edit;
ds= BLI_dynstr_new();
@@ -3646,7 +3582,7 @@ void PE_undo_menu(Scene *scene, Object *ob)
// XXX event= pupmenu_col(menu, 20);
MEM_freeN(menu);
- if(event>0) PTCacheUndo_number(scene, edit, event);
+ if(event>0) ParticleUndo_number(scene, edit,event);
}
/************************ utilities ******************************/
@@ -3654,29 +3590,30 @@ void PE_undo_menu(Scene *scene, Object *ob)
int PE_minmax(Scene *scene, float *min, float *max)
{
Object *ob= OBACT;
- PTCacheEdit *edit= PE_get_current(scene, ob);
- ParticleSystem *psys = edit->psys;
- ParticleSystemModifierData *psmd = NULL;
- POINT_P; KEY_K;
+ ParticleSystem *psys= PE_get_current(scene, ob);
+ ParticleSystemModifierData *psmd;
+ ParticleData *pa;
+ ParticleEditKey *key;
float co[3], mat[4][4];
- int ok= 0;
+ int i, k, totpart, ok= 0;
- if(!edit) return ok;
+ if(!PE_can_edit(psys)) return ok;
- if(psys)
- psmd= psys_get_modifier(ob, psys);
- else
- Mat4One(mat);
+ psmd= psys_get_modifier(ob, psys);
+ totpart= psys->totpart;
- LOOP_VISIBLE_POINTS {
- if(psys)
- psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, psys->particles+p, mat);
+ LOOP_PARTICLES(i, pa) {
+ if(pa->flag & PARS_HIDE) continue;
- LOOP_SELECTED_KEYS {
- VECCOPY(co, key->co);
- Mat4MulVecfl(mat, co);
- DO_MINMAX(co, min, max);
- ok= 1;
+ psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, mat);
+
+ LOOP_KEYS(k, key) {
+ if(key->flag & PEK_SELECT) {
+ VECCOPY(co, key->co);
+ Mat4MulVecfl(mat, co);
+ DO_MINMAX(co, min, max);
+ ok= 1;
+ }
}
}
@@ -3691,107 +3628,56 @@ int PE_minmax(Scene *scene, float *min, float *max)
/************************ particle edit toggle operator ************************/
/* initialize needed data for bake edit */
-static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache, ParticleSystem *psys)
+static void PE_create_particle_edit(Scene *scene, Object *ob, ParticleSystem *psys)
{
- PTCacheEdit *edit= psys ? psys->edit : cache->edit;
- POINT_P; KEY_K;
- ParticleData *pa = NULL;
+ ParticleEdit *edit= psys->edit;
+ ParticleData *pa;
+ ParticleEditKey *key;
HairKey *hkey;
- int totpoint;
-
- if(!psys && !cache)
- return;
+ int i, k, totpart= psys->totpart, alloc=1;
- if(cache && cache->flag & PTCACHE_DISK_CACHE)
+ if((psys->flag & PSYS_EDITED)==0)
return;
- if(!edit) {
- totpoint = psys ? psys->totpart : ((PTCacheMem*)cache->mem_cache.first)->totpoint;
-
- edit= MEM_callocN(sizeof(PTCacheEdit), "PE_create_particle_edit");
- edit->points=MEM_callocN(totpoint*sizeof(PTCacheEditPoint),"PTCacheEditPoints");
- edit->totpoint = totpoint;
-
- if(psys && !cache) {
- psys->edit= edit;
- edit->psys = psys;
-
- psys->free_edit= PE_free_ptcache_edit;
-
- edit->pathcache = NULL;
- edit->pathcachebufs.first = edit->pathcachebufs.last = NULL;
+ if(edit) {
+ int newtotkeys= psys_count_keys(psys);
- pa = psys->particles;
- LOOP_POINTS {
- point->totkey = pa->totkey;
- point->keys= MEM_callocN(point->totkey*sizeof(PTCacheEditKey),"ParticleEditKeys");
- point->flag |= PEP_EDIT_RECALC;
+ if(newtotkeys == edit->totkeys)
+ alloc=0;
+ }
- hkey = pa->hair;
- LOOP_KEYS {
- key->co= hkey->co;
- key->time= &hkey->time;
- key->flag= hkey->editflag;
- if(!(psys->flag & PSYS_GLOBAL_HAIR))
- key->flag |= PEK_USE_WCO;
- hkey++;
- }
- pa++;
- }
+ if(alloc) {
+ if(edit) {
+ printf("ParticleEdit exists already! Poke jahka!");
+ PE_free_particle_edit(psys);
}
- else {
- PTCacheMem *pm;
- int totframe=0;
-
- cache->edit= edit;
- cache->free_edit= PE_free_ptcache_edit;
- edit->psys = NULL;
-
- for(pm=cache->mem_cache.first; pm; pm=pm->next)
- totframe++;
-
- for(pm=cache->mem_cache.first; pm; pm=pm->next) {
- BKE_ptcache_mem_init_pointers(pm);
-
- LOOP_POINTS {
- if(psys) {
- pa = psys->particles + p;
- if((pm->next && pm->next->frame < pa->time)
- || (pm->prev && pm->prev->frame >= pa->dietime)) {
- BKE_ptcache_mem_incr_pointers(pm);
- continue;
- }
- }
- if(!point->totkey) {
- key = point->keys = MEM_callocN(totframe*sizeof(PTCacheEditKey),"ParticleEditKeys");
- point->flag |= PEP_EDIT_RECALC;
- }
- else
- key = point->keys + point->totkey;
+ edit= psys->edit=MEM_callocN(sizeof(ParticleEdit), "PE_create_particle_edit");
+ psys->free_edit= PE_free_particle_edit;
- key->co = pm->cur[BPHYS_DATA_LOCATION];
- key->vel = pm->cur[BPHYS_DATA_VELOCITY];
- key->rot = pm->cur[BPHYS_DATA_ROTATION];
- key->ftime = (float)pm->frame;
- key->time = &key->ftime;
- BKE_ptcache_mem_incr_pointers(pm);
+ edit->keys=MEM_callocN(totpart*sizeof(ParticleEditKey*),"ParticleEditKey array");
- point->totkey++;
- }
+ LOOP_PARTICLES(i, pa) {
+ key= edit->keys[i]= MEM_callocN(pa->totkey*sizeof(ParticleEditKey),"ParticleEditKeys");
+ for(k=0, hkey=pa->hair; k<pa->totkey; k++, hkey++, key++) {
+ key->co= hkey->co;
+ key->time= &hkey->time;
+ key->flag= hkey->editflag;
}
- psys = NULL;
}
+ edit->totkeys= psys_count_keys(psys);
+
UI_GetThemeColor3ubv(TH_EDGE_SELECT, edit->sel_col);
UI_GetThemeColor3ubv(TH_WIRE, edit->nosel_col);
+ }
- recalc_lengths(edit);
- if(psys && !cache)
- recalc_emitter_field(ob, psys);
- PE_update_object(scene, ob, 1);
+ recalc_lengths(psys);
+ recalc_emitter_field(ob, psys);
+ psys_update_world_cos(ob, psys);
- PTCacheUndo_clear(edit);
+ if(alloc) {
+ ParticleUndo_clear(psys);
PE_undo_push(scene, "Original");
}
}
@@ -3804,14 +3690,30 @@ static int particle_edit_toggle_poll(bContext *C)
if(!scene || !ob || ob->id.lib)
return 0;
- return (ob->particlesystem.first || modifiers_findByType(ob, eModifierType_Cloth) || modifiers_findByType(ob, eModifierType_Softbody));
+ return (ob->particlesystem.first != NULL);
}
static int particle_edit_toggle_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
+ ParticleSystem *psys= PE_get_current(scene, ob);
+
+ if(psys==NULL) {
+ psys= ob->particlesystem.first;
+ psys->flag |= PSYS_CURRENT;
+ }
if(!(ob->mode & OB_MODE_PARTICLE_EDIT)) {
+ if(psys && psys->part->type == PART_HAIR && psys->flag & PSYS_EDITED) {
+ if(psys_check_enabled(ob, psys)) {
+ if(psys->edit==NULL)
+ PE_create_particle_edit(scene, ob, psys);
+
+ psys_update_world_cos(ob, psys);
+ }
+ }
+
ob->mode |= OB_MODE_PARTICLE_EDIT;
toggle_particle_cursor(C, 1);
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_PARTICLE, NULL);
@@ -3822,7 +3724,7 @@ static int particle_edit_toggle_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL);
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -3844,65 +3746,112 @@ void PARTICLE_OT_particle_edit_toggle(wmOperatorType *ot)
/************************ set editable operator ************************/
-static int clear_edited_exec(bContext *C, wmOperator *op)
+static int set_editable_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
- ParticleSystem *psys = psys_get_current(ob);
+ ParticleSystem *psys= PE_get_current(scene, ob);
- if(psys->edit) {
- if(psys->edit->edited || 1) { // XXX okee("Lose changes done in particle mode?"))
- PE_free_ptcache_edit(psys->edit);
-
- psys->edit = NULL;
- psys->free_edit = NULL;
+ if(psys->flag & PSYS_EDITED) {
+ if(1) { // XXX okee("Lose changes done in particle mode?")) {
+ if(psys->edit)
+ PE_free_particle_edit(psys);
+ psys->flag &= ~PSYS_EDITED;
psys->recalc |= PSYS_RECALC_RESET;
- psys->flag &= ~PSYS_GLOBAL_HAIR;
- psys_reset(psys, PSYS_RESET_DEPSGRAPH);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
}
+ else {
+ if(psys_check_enabled(ob, psys)) {
+ psys->flag |= PSYS_EDITED;
+
+ if(ob->mode & OB_MODE_PARTICLE_EDIT)
+ PE_create_particle_edit(scene, ob, psys);
+ }
+ else
+ BKE_report(op->reports, RPT_ERROR, "Particle system not enabled, skipping set editable");
+ }
return OPERATOR_FINISHED;
}
-void PARTICLE_OT_edited_clear(wmOperatorType *ot)
+void PARTICLE_OT_editable_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Edited";
- ot->idname= "PARTICLE_OT_edited_clear";
+ ot->name= "Set Editable";
+ ot->idname= "PARTICLE_OT_editable_set";
/* api callbacks */
- ot->exec= clear_edited_exec;
+ ot->exec= set_editable_exec;
ot->poll= particle_edit_toggle_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
+/*********************** change active **************************/
+
+void PE_change_act(void *ob_v, void *act_v)
+{
+ Scene *scene= NULL; // XXX
+ Object *ob= ob_v;
+ ParticleSystem *psys;
+ short act= *((short*)act_v) - 1;
+
+ if((psys=psys_get_current(ob)))
+ psys->flag &= ~PSYS_CURRENT;
+
+ if(act>=0) {
+ if((psys=BLI_findlink(&ob->particlesystem,act))) {
+ psys->flag |= PSYS_CURRENT;
+
+ if(psys_check_enabled(ob, psys)) {
+ if(ob->mode & OB_MODE_PARTICLE_EDIT && !psys->edit)
+ PE_create_particle_edit(scene, ob, psys);
+ psys_update_world_cos(ob, psys);
+ }
+ }
+ }
+}
+
+void PE_change_act_psys(Scene *scene, Object *ob, ParticleSystem *psys)
+{
+ ParticleSystem *p;
+
+ if((p=psys_get_current(ob)))
+ p->flag &= ~PSYS_CURRENT;
+
+ psys->flag |= PSYS_CURRENT;
+
+ if(psys_check_enabled(ob, psys)) {
+ if(ob->mode & OB_MODE_PARTICLE_EDIT && !psys->edit)
+ PE_create_particle_edit(scene, ob, psys);
+
+ psys_update_world_cos(ob, psys);
+ }
+}
+
/*********************** specials menu **************************/
static int specials_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
Scene *scene= CTX_data_scene(C);
ParticleEditSettings *pset=PE_settings(scene);
- PTCacheEdit *edit = PE_get_current(scene, CTX_data_active_object(C));
uiPopupMenu *pup;
uiLayout *layout;
pup= uiPupMenuBegin(C, "Specials", 0);
layout= uiPupMenuLayout(pup);
- if(edit->psys) {
- uiItemO(layout, NULL, 0, "PARTICLE_OT_rekey");
- if(pset->selectmode & SCE_SELECT_POINT) {
- uiItemO(layout, NULL, 0, "PARTICLE_OT_subdivide");
- uiItemO(layout, NULL, 0, "PARTICLE_OT_select_first");
- uiItemO(layout, NULL, 0, "PARTICLE_OT_select_last");
- }
- uiItemO(layout, NULL, 0, "PARTICLE_OT_remove_doubles");
+ uiItemO(layout, NULL, 0, "PARTICLE_OT_rekey");
+ if(pset->selectmode & SCE_SELECT_POINT) {
+ uiItemO(layout, NULL, 0, "PARTICLE_OT_subdivide");
+ uiItemO(layout, NULL, 0, "PARTICLE_OT_select_first");
+ uiItemO(layout, NULL, 0, "PARTICLE_OT_select_last");
}
+ uiItemO(layout, NULL, 0, "PARTICLE_OT_remove_doubles");
uiPupMenuEnd(C, pup);
@@ -3947,7 +3896,7 @@ void ED_operatortypes_particle(void)
WM_operatortype_append(PARTICLE_OT_specials_menu);
WM_operatortype_append(PARTICLE_OT_particle_edit_toggle);
- WM_operatortype_append(PARTICLE_OT_edited_clear);
+ WM_operatortype_append(PARTICLE_OT_editable_set);
}
void ED_keymap_particle(wmWindowManager *wm)
diff --git a/source/blender/editors/preview/previewrender.c b/source/blender/editors/preview/previewrender.c
index 714ebcef0fb..8fcf65202ee 100644
--- a/source/blender/editors/preview/previewrender.c
+++ b/source/blender/editors/preview/previewrender.c
@@ -307,8 +307,6 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
/* turn on raytracing if needed */
if(mat->mode_l & MA_RAYMIRROR)
sce->r.mode |= R_RAYTRACE;
- if(mat->material_type == MA_TYPE_VOLUME)
- sce->r.mode |= R_RAYTRACE;
if((mat->mode_l & MA_RAYTRANSP) && (mat->mode_l & MA_TRANSP))
sce->r.mode |= R_RAYTRACE;
if(mat->sss_flag & MA_DIFF_SSS)
@@ -349,14 +347,8 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
for(base= sce->base.first; base; base= base->next) {
if(base->object->id.name[2]=='p') {
- if(ELEM4(base->object->type, OB_MESH, OB_CURVE, OB_SURF, OB_MBALL)) {
- /* don't use assign_material, it changed mat->id.us, which shows in the UI */
- Material ***matar= give_matarar(base->object);
- int actcol= MAX2(base->object->actcol > 0, 1) - 1;
-
- if(matar && actcol < base->object->totcol)
- (*matar)[actcol]= mat;
- }
+ if(ELEM4(base->object->type, OB_MESH, OB_CURVE, OB_SURF, OB_MBALL))
+ assign_material(base->object, mat, base->object->actcol);
}
}
}
@@ -954,11 +946,7 @@ void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, M
/* XXX ugly global still, but we can't do preview while rendering */
if(G.rendering)
return;
-
- if(GS(id->name) == ID_TE) {
- ntreeTexSetPreviewFlag(1);
- }
-
+
steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), owner);
sp= MEM_callocN(sizeof(ShaderPreview), "shader preview");
diff --git a/source/blender/editors/screen/CMakeLists.txt b/source/blender/editors/screen/CMakeLists.txt
index ad7770e12fa..6861f82ac3f 100644
--- a/source/blender/editors/screen/CMakeLists.txt
+++ b/source/blender/editors/screen/CMakeLists.txt
@@ -30,49 +30,50 @@
FILE(GLOB SRC */*.c)
SET(INC ../../windowmanager
- ../../editors/include
- ../../../../intern/guardedalloc ../../../../intern/memutil
- ../../blenlib ../../makesdna ../../makesrna ../../blenkernel
- ../../include ../../imbuf
- ../../render/extern/include ../../../../intern/bsp/extern
- ../../../intern/decimation/extern ../../blenloader
- ../../../kernel/gen_system ../../readstreamglue
- ../../../../intern/elbeem/extern
- ../../../../intern/ghost ../../../../intern/opennl/extern
- ../../nodes
+ ../../editors/include
+ ../../../../intern/guardedalloc ../../../../intern/memutil
+ ../../blenlib ../../makesdna ../../makesrna ../../blenkernel
+ ../../include ../../imbuf
+ ../../render/extern/include ../../../../intern/bsp/extern
+ ../../radiosity/extern/include
+ ../../../intern/decimation/extern ../../blenloader
+ ../../../kernel/gen_system ../../readstreamglue
+ ../../quicktime ../../../../intern/elbeem/extern
+ ../../../../intern/ghost ../../../../intern/opennl/extern
+ ../../nodes
)
IF(WITH_INTERNATIONAL)
- ADD_DEFINITIONS(-DINTERNATIONAL)
+ ADD_DEFINITIONS(-DINTERNATIONAL)
ENDIF(WITH_INTERNATIONAL)
IF(WITH_OPENEXR)
- ADD_DEFINITIONS(-DWITH_OPENEXR)
+ ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
IF(WITH_QUICKTIME)
- SET(INC ${INC} ../../quicktime ${QUICKTIME_INC})
- ADD_DEFINITIONS(-DWITH_QUICKTIME)
+ SET(INC ${INC} ${QUICKTIME_INC})
+ ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
IF(WITH_FFMPEG)
- SET(INC ${INC} ${FFMPEG_INC})
- ADD_DEFINITIONS(-DWITH_FFMPEG)
+ SET(INC ${INC} ${FFMPEG_INC})
+ ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
IF(WITH_PYTHON)
- SET(INC ${INC} ../../python ${PYTHON_INC})
+ SET(INC ${INC} ../../python ${PYTHON_INC})
ELSE(WITH_PYTHON)
- ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ ADD_DEFINITIONS(-DDISABLE_PYTHON)
ENDIF(WITH_PYTHON)
IF(WIN32)
- SET(INC ${INC} ${PTHREADS_INC})
+ SET(INC ${INC} ${PTHREADS_INC})
ENDIF(WIN32)
# TODO buildinfo
IF(BF_BUILDINFO)
- ADD_DEFINITIONS(-DNAN_BUILDINFO)
+ ADD_DEFINITIONS(-DNAN_BUILDINFO)
ENDIF(BF_BUILDINFO)
BLENDERLIB_NOLIST(bf_editors "${SRC}" "${INC}")
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 9a116bf95c0..ea1541a4e02 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -249,7 +249,7 @@ void ED_area_overdraw(bContext *C)
}
/* get scissor rect, checking overlapping regions */
-void region_scissor_winrct(ARegion *ar, rcti *winrct)
+static void region_scissor_winrct(ARegion *ar, rcti *winrct)
{
*winrct= ar->winrct;
@@ -797,10 +797,6 @@ static void ed_default_handlers(wmWindowManager *wm, ListBase *handlers, int fla
ListBase *keymap= WM_keymap_listbase(wm, "Frames", 0, 0);
WM_event_add_keymap_handler(handlers, keymap);
}
- if(flag & ED_KEYMAP_GPENCIL) {
- ListBase *keymap= WM_keymap_listbase(wm, "Grease Pencil", 0, 0);
- WM_event_add_keymap_handler(handlers, keymap);
- }
}
@@ -1049,6 +1045,7 @@ static char *windowtype_pup(void)
"|3D View %x1"
"|%l"
+ "|%l"
"|Timeline %x15"
"|Graph Editor %x2"
@@ -1056,6 +1053,7 @@ static char *windowtype_pup(void)
"|NLA Editor %x13"
"|%l"
+ "|%l"
"|UV/Image Editor %x6"
@@ -1065,6 +1063,7 @@ static char *windowtype_pup(void)
"|Logic Editor %x17"
"|%l"
+ "|%l"
"|Properties %x4"
"|Outliner %x3"
@@ -1072,10 +1071,12 @@ static char *windowtype_pup(void)
"|Info%x7"
"|%l"
+ "|%l"
"|File Browser %x5"
"|%l"
+ "|%l"
"|Console %x18"
);
@@ -1248,7 +1249,6 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
/* before setting the view */
if(vertical) {
- /* only allow scrolling in vertical direction */
v2d->keepofs |= V2D_LOCKOFS_X|V2D_KEEPOFS_Y;
v2d->keepofs &= ~(V2D_LOCKOFS_Y|V2D_KEEPOFS_X);
@@ -1259,12 +1259,8 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex
y= -y;
}
else {
- /* for now, allow scrolling in both directions (since layouts are optimised for vertical,
- * they often don't fit in horizontal layout)
- */
- v2d->keepofs &= ~(V2D_LOCKOFS_X|V2D_LOCKOFS_Y|V2D_KEEPOFS_X|V2D_KEEPOFS_Y);
- //v2d->keepofs |= V2D_LOCKOFS_Y|V2D_KEEPOFS_X;
- //v2d->keepofs &= ~(V2D_LOCKOFS_X|V2D_KEEPOFS_Y);
+ v2d->keepofs |= V2D_LOCKOFS_Y|V2D_KEEPOFS_X;
+ v2d->keepofs &= ~(V2D_LOCKOFS_X|V2D_KEEPOFS_Y);
// don't jump back when panels close or hide
if(!newcontext)
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index 17c51a7b7d3..1e36a32b9e1 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -108,12 +108,6 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
- else if(CTX_data_equals(member, "object")) {
- if(scene->basact)
- CTX_data_id_pointer_set(result, &scene->basact->object->id);
-
- return 1;
- }
else if(CTX_data_equals(member, "edit_object")) {
/* convenience for now, 1 object per scene in editmode */
if(scene->obedit)
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 75da8f5fe06..fab4de50568 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -3298,7 +3298,6 @@ void ED_keymap_screen(wmWindowManager *wm)
/* Screen General ------------------------------------------------ */
keymap= WM_keymap_listbase(wm, "Screen", 0, 0);
-
/* standard timers */
WM_keymap_add_item(keymap, "SCREEN_OT_animation_step", TIMER0, KM_ANY, KM_ANY, 0);
@@ -3327,11 +3326,7 @@ void ED_keymap_screen(wmWindowManager *wm)
WM_keymap_add_item(keymap, "SCREEN_OT_region_foursplit", SKEY, KM_PRESS, KM_CTRL|KM_ALT|KM_SHIFT, 0);
WM_keymap_verify_item(keymap, "SCREEN_OT_repeat_history", F3KEY, KM_PRESS, 0, 0);
- #ifdef __APPLE__
- WM_keymap_add_item(keymap, "SCREEN_OT_repeat_last", RKEY, KM_PRESS, KM_OSKEY, 0);
- #endif
- WM_keymap_add_item(keymap, "SCREEN_OT_repeat_last", RKEY, KM_PRESS, KM_CTRL, 0);
-
+ WM_keymap_verify_item(keymap, "SCREEN_OT_repeat_last", F4KEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SCREEN_OT_region_flip", F5KEY, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "SCREEN_OT_redo_last", F6KEY, KM_PRESS, 0, 0);
@@ -3339,17 +3334,14 @@ void ED_keymap_screen(wmWindowManager *wm)
WM_keymap_verify_item(keymap, "SCRIPT_OT_python_run_ui_scripts", F8KEY, KM_PRESS, 0, 0);
/* files */
- WM_keymap_add_item(keymap, "FILE_OT_execute", RETKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "FILE_OT_exec", RETKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "FILE_OT_cancel", ESCKEY, KM_PRESS, 0, 0);
/* undo */
- #ifdef __APPLE__
- WM_keymap_add_item(keymap, "ED_OT_undo", ZKEY, KM_PRESS, KM_OSKEY, 0);
- WM_keymap_add_item(keymap, "ED_OT_redo", ZKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0);
- #endif
WM_keymap_add_item(keymap, "ED_OT_undo", ZKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "ED_OT_undo", ZKEY, KM_PRESS, KM_OSKEY, 0);
WM_keymap_add_item(keymap, "ED_OT_redo", ZKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
-
+ WM_keymap_add_item(keymap, "ED_OT_redo", ZKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0);
/* render */
WM_keymap_add_item(keymap, "SCREEN_OT_render", F12KEY, KM_PRESS, 0, 0);
@@ -3358,11 +3350,7 @@ void ED_keymap_screen(wmWindowManager *wm)
WM_keymap_add_item(keymap, "SCREEN_OT_render_view_show", F11KEY, KM_PRESS, 0, 0);
/* user prefs */
- #ifdef __APPLE__
- WM_keymap_add_item(keymap, "SCREEN_OT_userpref_show", COMMAKEY, KM_PRESS, KM_OSKEY, 0);
- #endif
- WM_keymap_add_item(keymap, "SCREEN_OT_userpref_show", COMMAKEY, KM_PRESS, KM_CTRL, 0);
-
+ WM_keymap_add_item(keymap, "SCREEN_OT_userpref_show", UKEY, KM_PRESS, KM_ALT, 0);
/* Anim Playback ------------------------------------------------ */
keymap= WM_keymap_listbase(wm, "Frames", 0, 0);
@@ -3374,8 +3362,7 @@ void ED_keymap_screen(wmWindowManager *wm)
RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", RIGHTARROWKEY, KM_PRESS, 0, 0)->ptr, "delta", 1);
WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", DOWNARROWKEY, KM_PRESS, KM_SHIFT, 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);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", UPARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", 1);
WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", PAGEUPKEY, KM_PRESS, KM_CTRL, 0);
RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", PAGEDOWNKEY, KM_PRESS, KM_CTRL, 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 870b66cdbbd..465aa281e25 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -3707,7 +3707,7 @@ static void *do_projectpaint_thread(void *ph_v)
ProjPaintImage *last_projIma= NULL;
ImagePaintPartialRedraw *last_partial_redraw_cell;
- float rgba[4], alpha, dist_nosqrt, dist;
+ float rgba[4], alpha, dist_nosqrt;
float brush_size_sqared;
float falloff;
@@ -3721,7 +3721,6 @@ static void *do_projectpaint_thread(void *ph_v)
float co[2];
float mask = 1.0f; /* airbrush wont use mask */
unsigned short mask_short;
- float size_half = ((float)ps->brush->size) * 0.5f;
LinkNode *smearPixels = NULL;
LinkNode *smearPixels_f = NULL;
@@ -3756,8 +3755,8 @@ static void *do_projectpaint_thread(void *ph_v)
dist_nosqrt = Vec2Lenf_nosqrt(projPixel->projCoSS, pos);
/*if (dist < s->brush->size) {*/ /* correct but uses a sqrtf */
- if (dist_nosqrt < brush_size_sqared && (dist=sqrtf(dist_nosqrt)) < size_half) {
- falloff = brush_curve_strength(ps->brush, dist, size_half);
+ if (dist_nosqrt < brush_size_sqared) {
+ falloff = brush_sample_falloff_noalpha(ps->brush, sqrtf(dist_nosqrt));
if (falloff > 0.0f) {
if (ps->is_texbrush) {
brush_sample_tex(ps->brush, projPixel->projCoSS, rgba);
@@ -4720,7 +4719,7 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event)
tablet= (wmtab->Active != EVT_TABLET_NONE);
pressure= wmtab->Pressure;
if(wmtab->Active == EVT_TABLET_ERASER)
- pop->s.blend= IMB_BLEND_ERASE_ALPHA;
+ pop->s.blend= BRUSH_BLEND_ERASE_ALPHA;
}
else
pressure= 1.0f;
@@ -5175,7 +5174,7 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
me->mtface= CustomData_add_layer(&me->fdata, CD_MTFACE, CD_DEFAULT,
NULL, me->totface);
- paint_init(&scene->toolsettings->imapaint.paint, PAINT_CURSOR_TEXTURE_PAINT);
+ paint_init(&scene->toolsettings->imapaint.paint, "Brush");
if(U.glreslimit != 0)
GPU_free_images();
@@ -5184,7 +5183,7 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
toggle_paint_cursor(C, 1);
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_SCENE|ND_MODE, scene);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h
index ba1b57a1bef..40423e17fe4 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -29,37 +29,14 @@
#ifndef ED_PAINT_INTERN_H
#define ED_PAINT_INTERN_H
-struct bContext;
struct Scene;
struct Object;
struct Mesh;
-struct PaintStroke;
-struct PointerRNA;
struct ViewContext;
-struct wmEvent;
-struct wmOperator;
struct wmOperatorType;
struct ARegion;
-/* paint_stroke.c */
-typedef int (*StrokeTestStart)(struct bContext *C, struct wmOperator *op, struct wmEvent *event);
-typedef void (*StrokeUpdateStep)(struct bContext *C, struct PaintStroke *stroke, struct PointerRNA *itemptr);
-typedef void (*StrokeDone)(struct bContext *C, struct PaintStroke *stroke);
-
-struct PaintStroke *paint_stroke_new(bContext *C, StrokeTestStart test_start,
- StrokeUpdateStep update_step, StrokeDone done);
-int paint_stroke_modal(struct bContext *C, struct wmOperator *op, struct wmEvent *event);
-int paint_stroke_exec(struct bContext *C, struct wmOperator *op);
-struct ViewContext *paint_stroke_view_context(struct PaintStroke *stroke);
-void *paint_stroke_mode_data(struct PaintStroke *stroke);
-void paint_stroke_set_mode_data(struct PaintStroke *stroke, void *mode_data);
-int paint_poll(bContext *C);
-void paint_cursor_start(struct bContext *C, int (*poll)(struct bContext *C));
-
/* paint_vertex.c */
-int vertex_paint_mode_poll(bContext *C);
-void clear_vpaint(Scene *scene, int selected);
-
void PAINT_OT_weight_paint_toggle(struct wmOperatorType *ot);
void PAINT_OT_weight_paint_radial_control(struct wmOperatorType *ot);
void PAINT_OT_weight_paint(struct wmOperatorType *ot);
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index c38b36007e9..63a6591d057 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -77,30 +77,10 @@ void BRUSH_OT_add(wmOperatorType *ot)
RNA_def_enum(ot->srna, "type", brush_type_items, OB_MODE_VERTEX_PAINT, "Type", "Which paint mode to create the brush for.");
}
-static int vertex_color_set_exec(bContext *C, wmOperator *op)
+/* Paint operators */
+static int paint_poll(bContext *C)
{
- int selected = RNA_boolean_get(op->ptr, "selected");
- Scene *scene = CTX_data_scene(C);
-
- clear_vpaint(scene, selected);
-
- return OPERATOR_FINISHED;
-}
-
-void PAINT_OT_vertex_color_set(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Set Vertex Colors";
- ot->idname= "PAINT_OT_vertex_color_set";
-
- /* api callbacks */
- ot->exec= vertex_color_set_exec;
- ot->poll= vertex_paint_mode_poll;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_boolean(ot->srna, "selected", 0, "Type", "Only color selected faces.");
+ return !!paint_get_active(CTX_data_scene(C));
}
/**************************** registration **********************************/
@@ -129,6 +109,5 @@ void ED_operatortypes_paint(void)
WM_operatortype_append(PAINT_OT_vertex_paint_radial_control);
WM_operatortype_append(PAINT_OT_vertex_paint_toggle);
WM_operatortype_append(PAINT_OT_vertex_paint);
- WM_operatortype_append(PAINT_OT_vertex_color_set);
}
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
deleted file mode 100644
index bd9ea50e0f8..00000000000
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ /dev/null
@@ -1,330 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2009 by Nicholas Bishop
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- *
- */
-
-#include "MEM_guardedalloc.h"
-
-#include "DNA_brush_types.h"
-#include "DNA_object_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_screen_types.h"
-
-#include "RNA_access.h"
-
-#include "BKE_context.h"
-#include "BKE_paint.h"
-
-#include "WM_api.h"
-#include "WM_types.h"
-
-#include "BLI_arithb.h"
-
-#include "PIL_time.h"
-
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
-
-#include "ED_screen.h"
-#include "ED_view3d.h"
-
-#include "paint_intern.h"
-
-#include <float.h>
-#include <math.h>
-
-typedef struct PaintStroke {
- void *mode_data;
- void *smooth_stroke_cursor;
- wmTimer *timer;
-
- /* Cached values */
- ViewContext vc;
- bglMats mats;
- Brush *brush;
-
- float last_mouse_position[2];
-
- /* Set whether any stroke step has yet occured
- e.g. in sculpt mode, stroke doesn't start until cursor
- passes over the mesh */
- int stroke_started;
-
- StrokeTestStart test_start;
- StrokeUpdateStep update_step;
- StrokeDone done;
-} PaintStroke;
-
-/*** Cursor ***/
-static void paint_draw_smooth_stroke(bContext *C, int x, int y, void *customdata)
-{
- Brush *brush = paint_brush(paint_get_active(CTX_data_scene(C)));
- PaintStroke *stroke = customdata;
-
- glColor4ubv(paint_get_active(CTX_data_scene(C))->paint_cursor_col);
- glEnable(GL_LINE_SMOOTH);
- glEnable(GL_BLEND);
-
- if(stroke && brush && (brush->flag & BRUSH_SMOOTH_STROKE)) {
- ARegion *ar = CTX_wm_region(C);
- sdrawline(x, y, (int)stroke->last_mouse_position[0] - ar->winrct.xmin,
- (int)stroke->last_mouse_position[1] - ar->winrct.ymin);
- }
-
- glDisable(GL_BLEND);
- glDisable(GL_LINE_SMOOTH);
-}
-
-static void paint_draw_cursor(bContext *C, int x, int y, void *customdata)
-{
- Brush *brush = paint_brush(paint_get_active(CTX_data_scene(C)));
-
- glColor4ubv(paint_get_active(CTX_data_scene(C))->paint_cursor_col);
- glEnable(GL_LINE_SMOOTH);
- glEnable(GL_BLEND);
-
- glTranslatef((float)x, (float)y, 0.0f);
- glutil_draw_lined_arc(0.0, M_PI*2.0, brush->size, 40);
- glTranslatef((float)-x, (float)-y, 0.0f);
-
- glDisable(GL_BLEND);
- glDisable(GL_LINE_SMOOTH);
-}
-
-/* Put the location of the next stroke dot into the stroke RNA and apply it to the mesh */
-static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, wmEvent *event, float mouse[2])
-{
- PointerRNA itemptr;
- float cur_depth, pressure = 1;
- float center[3];
- PaintStroke *stroke = op->customdata;
-
- cur_depth = read_cached_depth(&stroke->vc, mouse[0], mouse[1]);
- view3d_unproject(&stroke->mats, center, mouse[0], mouse[1], cur_depth);
-
- /* Tablet */
- if(event->custom == EVT_DATA_TABLET) {
- wmTabletData *wmtab= event->customdata;
- if(wmtab->Active != EVT_TABLET_NONE)
- pressure= wmtab->Pressure;
- }
-
- /* Add to stroke */
- RNA_collection_add(op->ptr, "stroke", &itemptr);
- RNA_float_set_array(&itemptr, "location", center);
- RNA_float_set_array(&itemptr, "mouse", mouse);
- RNA_boolean_set(&itemptr, "flip", event->shift);
- RNA_float_set(&itemptr, "pressure", pressure);
-
- stroke->last_mouse_position[0] = mouse[0];
- stroke->last_mouse_position[1] = mouse[1];
-
- stroke->update_step(C, stroke, &itemptr);
-}
-
-/* Returns zero if no sculpt changes should be made, non-zero otherwise */
-static int paint_smooth_stroke(PaintStroke *stroke, float output[2], wmEvent *event)
-{
- output[0] = event->x;
- output[1] = event->y;
-
- if(stroke->brush->flag & BRUSH_SMOOTH_STROKE && stroke->brush->sculpt_tool != SCULPT_TOOL_GRAB) {
- float u = stroke->brush->smooth_stroke_factor, v = 1.0 - u;
- float dx = stroke->last_mouse_position[0] - event->x, dy = stroke->last_mouse_position[1] - event->y;
-
- /* If the mouse is moving within the radius of the last move,
- don't update the mouse position. This allows sharp turns. */
- if(dx*dx + dy*dy < stroke->brush->smooth_stroke_radius * stroke->brush->smooth_stroke_radius)
- return 0;
-
- output[0] = event->x * v + stroke->last_mouse_position[0] * u;
- output[1] = event->y * v + stroke->last_mouse_position[1] * u;
- }
-
- return 1;
-}
-
-/* Returns zero if the stroke dots should not be spaced, non-zero otherwise */
-static int paint_space_stroke_enabled(Brush *br)
-{
- return (br->flag & BRUSH_SPACE) && !(br->flag & BRUSH_ANCHORED) && (br->sculpt_tool != SCULPT_TOOL_GRAB);
-}
-
-/* For brushes with stroke spacing enabled, moves mouse in steps
- towards the final mouse location. */
-static int paint_space_stroke(bContext *C, wmOperator *op, wmEvent *event, const float final_mouse[2])
-{
- PaintStroke *stroke = op->customdata;
- int cnt = 0;
-
- if(paint_space_stroke_enabled(stroke->brush)) {
- float mouse[2] = {stroke->last_mouse_position[0], stroke->last_mouse_position[1]};
- float vec[2] = {final_mouse[0] - mouse[0], final_mouse[1] - mouse[1]};
- float length, scale;
- int steps = 0, i;
-
- /* Normalize the vector between the last stroke dot and the goal */
- length = sqrt(vec[0]*vec[0] + vec[1]*vec[1]);
-
- if(length > FLT_EPSILON) {
- scale = stroke->brush->spacing / length;
- vec[0] *= scale;
- vec[1] *= scale;
-
- steps = (int)(length / stroke->brush->spacing);
- for(i = 0; i < steps; ++i, ++cnt) {
- mouse[0] += vec[0];
- mouse[1] += vec[1];
- paint_brush_stroke_add_step(C, op, event, mouse);
- }
- }
- }
-
- return cnt;
-}
-
-/**** Public API ****/
-
-PaintStroke *paint_stroke_new(bContext *C, StrokeTestStart test_start,
- StrokeUpdateStep update_step, StrokeDone done)
-{
- PaintStroke *stroke = MEM_callocN(sizeof(PaintStroke), "PaintStroke");
-
- stroke->brush = paint_brush(paint_get_active(CTX_data_scene(C)));
- view3d_set_viewcontext(C, &stroke->vc);
- view3d_get_transformation(&stroke->vc, stroke->vc.obact, &stroke->mats);
-
- stroke->test_start = test_start;
- stroke->update_step = update_step;
- stroke->done = done;
-
- return stroke;
-}
-
-int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event)
-{
- ARegion *ar = CTX_wm_region(C);
- PaintStroke *stroke = op->customdata;
- float mouse[2];
-
- if(event->type == TIMER && (event->customdata != stroke->timer))
- return OPERATOR_RUNNING_MODAL;
-
- if(!stroke->stroke_started) {
- stroke->last_mouse_position[0] = event->x;
- stroke->last_mouse_position[1] = event->y;
- stroke->stroke_started = stroke->test_start(C, op, event);
-
- if(stroke->stroke_started) {
- stroke->smooth_stroke_cursor =
- WM_paint_cursor_activate(CTX_wm_manager(C), paint_poll, paint_draw_smooth_stroke, stroke);
-
- if(stroke->brush->flag & BRUSH_AIRBRUSH)
- stroke->timer = WM_event_add_window_timer(CTX_wm_window(C), TIMER, stroke->brush->rate);
- }
-
- ED_region_tag_redraw(ar);
- }
-
- if(stroke->stroke_started) {
- if(paint_smooth_stroke(stroke, mouse, event)) {
- if(paint_space_stroke_enabled(stroke->brush)) {
- if(!paint_space_stroke(C, op, event, mouse))
- ED_region_tag_redraw(ar);
- }
- else
- paint_brush_stroke_add_step(C, op, event, mouse);
- }
- else
- ED_region_tag_redraw(ar);
- }
-
- /* TODO: fix hardcoded event here */
- if(event->type == LEFTMOUSE && event->val == 0) {
- /* Exit stroke, free data */
-
- if(stroke->smooth_stroke_cursor)
- WM_paint_cursor_end(CTX_wm_manager(C), stroke->smooth_stroke_cursor);
-
- if(stroke->timer)
- WM_event_remove_window_timer(CTX_wm_window(C), stroke->timer);
-
- stroke->done(C, stroke);
- MEM_freeN(stroke);
- return OPERATOR_FINISHED;
- }
- else
- return OPERATOR_RUNNING_MODAL;
-}
-
-int paint_stroke_exec(bContext *C, wmOperator *op)
-{
- PaintStroke *stroke = op->customdata;
-
- RNA_BEGIN(op->ptr, itemptr, "stroke") {
- stroke->update_step(C, stroke, &itemptr);
- }
- RNA_END;
-
- MEM_freeN(stroke);
- op->customdata = NULL;
-
- return OPERATOR_FINISHED;
-}
-
-ViewContext *paint_stroke_view_context(PaintStroke *stroke)
-{
- return &stroke->vc;
-}
-
-void *paint_stroke_mode_data(struct PaintStroke *stroke)
-{
- return stroke->mode_data;
-}
-
-void paint_stroke_set_mode_data(PaintStroke *stroke, void *mode_data)
-{
- stroke->mode_data = mode_data;
-}
-
-int paint_poll(bContext *C)
-{
- Paint *p = paint_get_active(CTX_data_scene(C));
- Object *ob = CTX_data_active_object(C);
-
- return p && ob && paint_brush(p) &&
- CTX_wm_area(C)->spacetype == SPACE_VIEW3D &&
- CTX_wm_region(C)->regiontype == RGN_TYPE_WINDOW;
-}
-
-void paint_cursor_start(bContext *C, int (*poll)(bContext *C))
-{
- Paint *p = paint_get_active(CTX_data_scene(C));
-
- if(p && !p->paint_cursor)
- p->paint_cursor = WM_paint_cursor_activate(CTX_wm_manager(C), poll, paint_draw_cursor, NULL);
-}
-
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 25ff57ca87f..1a548708ec8 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -43,7 +43,7 @@
#include "BLI_blenlib.h"
#include "BLI_arithb.h"
-
+#include "MTC_matrixops.h"
#include "DNA_action_types.h"
#include "DNA_armature_types.h"
@@ -62,7 +62,6 @@
#include "DNA_userdef_types.h"
#include "RNA_access.h"
-#include "RNA_define.h"
#include "BKE_armature.h"
#include "BKE_brush.h"
@@ -92,8 +91,6 @@
#include "ED_util.h"
#include "ED_view3d.h"
-#include "paint_intern.h"
-
/* vp->mode */
#define VP_MIX 0
#define VP_ADD 1
@@ -110,18 +107,11 @@ static void error() {}
/* polling - retrieve whether cursor should be set or operator should be done */
-
-/* Returns true if vertex paint mode is active */
-int vertex_paint_mode_poll(bContext *C)
+static int vp_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
- return ob && ob->mode == OB_MODE_VERTEX_PAINT;
-}
-
-static int vp_poll(bContext *C)
-{
- if(vertex_paint_mode_poll(C) &&
+ if(ob && ob->mode & OB_MODE_VERTEX_PAINT &&
paint_brush(&CTX_data_tool_settings(C)->vpaint->paint)) {
ScrArea *sa= CTX_wm_area(C);
if(sa->spacetype==SPACE_VIEW3D) {
@@ -149,6 +139,56 @@ static int wp_poll(bContext *C)
return 0;
}
+
+/* Cursors */
+static void vp_drawcursor(bContext *C, int x, int y, void *customdata)
+{
+ Brush *brush = paint_brush(&CTX_data_tool_settings(C)->vpaint->paint);
+
+ glTranslatef((float)x, (float)y, 0.0f);
+
+ glColor4ub(255, 255, 255, 128);
+ glEnable( GL_LINE_SMOOTH );
+ glEnable(GL_BLEND);
+ glutil_draw_lined_arc(0.0, M_PI*2.0, brush->size, 40);
+ glDisable(GL_BLEND);
+ glDisable( GL_LINE_SMOOTH );
+
+ glTranslatef((float)-x, (float)-y, 0.0f);
+}
+
+static void wp_drawcursor(bContext *C, int x, int y, void *customdata)
+{
+ Brush *brush = paint_brush(&CTX_data_tool_settings(C)->wpaint->paint);
+
+ glTranslatef((float)x, (float)y, 0.0f);
+
+ glColor4ub(200, 200, 255, 128);
+ glEnable( GL_LINE_SMOOTH );
+ glEnable(GL_BLEND);
+ glutil_draw_lined_arc(0.0, M_PI*2.0, brush->size, 40);
+ glDisable(GL_BLEND);
+ glDisable( GL_LINE_SMOOTH );
+
+ glTranslatef((float)-x, (float)-y, 0.0f);
+}
+
+static void toggle_paint_cursor(bContext *C, int wpaint)
+{
+ ToolSettings *ts = CTX_data_scene(C)->toolsettings;
+ VPaint *vp = wpaint ? ts->wpaint : ts->vpaint;
+
+ if(vp->paintcursor) {
+ WM_paint_cursor_end(CTX_wm_manager(C), vp->paintcursor);
+ vp->paintcursor = NULL;
+ }
+ else {
+ vp->paintcursor = wpaint ?
+ WM_paint_cursor_activate(CTX_wm_manager(C), wp_poll, wp_drawcursor, NULL) :
+ WM_paint_cursor_activate(CTX_wm_manager(C), vp_poll, vp_drawcursor, NULL);
+ }
+}
+
static VPaint *new_vpaint(int wpaint)
{
VPaint *vp= MEM_callocN(sizeof(VPaint), "VPaint");
@@ -295,7 +335,7 @@ void make_vertexcol(Scene *scene, int shade) /* single ob */
else
memset(me->mcol, 255, 4*sizeof(MCol)*me->totface);
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
@@ -330,7 +370,34 @@ static void copy_wpaint_prev (VPaint *wp, MDeformVert *dverts, int dcount)
}
-void clear_vpaint(Scene *scene, int selected)
+void clear_vpaint(Scene *scene)
+{
+ Mesh *me;
+ Object *ob;
+ unsigned int *to, paintcol;
+ int a;
+
+ ob= OBACT;
+ me= get_mesh(ob);
+ if(!ob || ob->id.lib) return;
+
+ if(!(ob->mode & OB_MODE_VERTEX_PAINT)) return;
+
+ if(me==0 || me->mcol==0 || me->totface==0) return;
+
+ paintcol= vpaint_get_current_col(scene->toolsettings->vpaint);
+
+ to= (unsigned int *)me->mcol;
+ a= 4*me->totface;
+ while(a--) {
+ *to= paintcol;
+ to++;
+ }
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+
+}
+
+void clear_vpaint_selectedfaces(Scene *scene)
{
Mesh *me;
MFace *mf;
@@ -350,7 +417,7 @@ void clear_vpaint(Scene *scene, int selected)
mf = me->mface;
mcol = (unsigned int*)me->mcol;
for (i = 0; i < me->totface; i++, mf++, mcol+=4) {
- if (!selected || mf->flag & ME_FACE_SEL) {
+ if (mf->flag & ME_FACE_SEL) {
mcol[0] = paintcol;
mcol[1] = paintcol;
mcol[2] = paintcol;
@@ -358,7 +425,7 @@ void clear_vpaint(Scene *scene, int selected)
}
}
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
@@ -408,8 +475,8 @@ void clear_wpaint_selectedfaces(Scene *scene)
if (!strcmp(curdef->name, name))
break;
if(curdef==NULL) {
- int olddef= ob->actdef; /* tsk, ED_vgroup_add sets the active defgroup */
- curdef= ED_vgroup_add_name (ob, name);
+ int olddef= ob->actdef; /* tsk, add_defgroup sets the active defgroup */
+ curdef= add_defgroup_name (ob, name);
ob->actdef= olddef;
}
@@ -431,9 +498,9 @@ void clear_wpaint_selectedfaces(Scene *scene)
faceverts[3]= mface->v4;
for (i=0; i<3 || faceverts[i]; i++) {
if(!((me->dvert+faceverts[i])->flag)) {
- dw= ED_vgroup_weight_verify(me->dvert+faceverts[i], vgroup);
+ dw= verify_defweight(me->dvert+faceverts[i], vgroup);
if(dw) {
- uw= ED_vgroup_weight_verify(wp->wpaint_prev+faceverts[i], vgroup);
+ uw= verify_defweight(wp->wpaint_prev+faceverts[i], vgroup);
uw->weight= dw->weight; /* set the undo weight */
dw->weight= paintweight;
@@ -442,11 +509,11 @@ void clear_wpaint_selectedfaces(Scene *scene)
if(j>=0) {
/* copy, not paint again */
if(vgroup_mirror != -1) {
- dw= ED_vgroup_weight_verify(me->dvert+j, vgroup_mirror);
- uw= ED_vgroup_weight_verify(wp->wpaint_prev+j, vgroup_mirror);
+ dw= verify_defweight(me->dvert+j, vgroup_mirror);
+ uw= verify_defweight(wp->wpaint_prev+j, vgroup_mirror);
} else {
- dw= ED_vgroup_weight_verify(me->dvert+j, vgroup);
- uw= ED_vgroup_weight_verify(wp->wpaint_prev+j, vgroup);
+ dw= verify_defweight(me->dvert+j, vgroup);
+ uw= verify_defweight(wp->wpaint_prev+j, vgroup);
}
uw->weight= dw->weight; /* set the undo weight */
dw->weight= paintweight;
@@ -468,7 +535,7 @@ void clear_wpaint_selectedfaces(Scene *scene)
MEM_freeN(indexar);
copy_wpaint_prev(wp, NULL, 0);
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
@@ -740,7 +807,7 @@ static int sample_backbuf_area(ViewContext *vc, int *indexar, int totface, int x
return tot;
}
-static int calc_vp_alpha_dl(VPaint *vp, ViewContext *vc, float vpimat[][3], float *vert_nor, float *mval)
+static int calc_vp_alpha_dl(VPaint *vp, ViewContext *vc, float vpimat[][3], float *vert_nor, short *mval)
{
Brush *brush = paint_brush(&vp->paint);
float fac, dx, dy;
@@ -923,7 +990,7 @@ void sample_wpaint(Scene *scene, ARegion *ar, View3D *v3d, int mode)
val= 0; // XXX pupmenu(str);
if(val>=0) {
ob->actdef= val+1;
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
MEM_freeN(str);
}
@@ -963,20 +1030,20 @@ void sample_wpaint(Scene *scene, ARegion *ar, View3D *v3d, int mode)
fac= MIN4(w1, w2, w3, w4);
if(w1==fac) {
- dw= ED_vgroup_weight_get(me->dvert+mface->v1, ob->actdef-1);
+ dw= get_defweight(me->dvert+mface->v1, ob->actdef-1);
if(dw) ts->vgroup_weight= dw->weight; else ts->vgroup_weight= 0.0f;
}
else if(w2==fac) {
- dw= ED_vgroup_weight_get(me->dvert+mface->v2, ob->actdef-1);
+ dw= get_defweight(me->dvert+mface->v2, ob->actdef-1);
if(dw) ts->vgroup_weight= dw->weight; else ts->vgroup_weight= 0.0f;
}
else if(w3==fac) {
- dw= ED_vgroup_weight_get(me->dvert+mface->v3, ob->actdef-1);
+ dw= get_defweight(me->dvert+mface->v3, ob->actdef-1);
if(dw) ts->vgroup_weight= dw->weight; else ts->vgroup_weight= 0.0f;
}
else if(w4==fac) {
if(mface->v4) {
- dw= ED_vgroup_weight_get(me->dvert+mface->v4, ob->actdef-1);
+ dw= get_defweight(me->dvert+mface->v4, ob->actdef-1);
if(dw) ts->vgroup_weight= dw->weight; else ts->vgroup_weight= 0.0f;
}
}
@@ -995,12 +1062,12 @@ static void do_weight_paint_vertex(VPaint *wp, Object *ob, int index, int alpha,
int vgroup= ob->actdef-1;
if(wp->flag & VP_ONLYVGROUP) {
- dw= ED_vgroup_weight_get(me->dvert+index, vgroup);
- uw= ED_vgroup_weight_get(wp->wpaint_prev+index, vgroup);
+ dw= get_defweight(me->dvert+index, vgroup);
+ uw= get_defweight(wp->wpaint_prev+index, vgroup);
}
else {
- dw= ED_vgroup_weight_verify(me->dvert+index, vgroup);
- uw= ED_vgroup_weight_verify(wp->wpaint_prev+index, vgroup);
+ dw= verify_defweight(me->dvert+index, vgroup);
+ uw= verify_defweight(wp->wpaint_prev+index, vgroup);
}
if(dw==NULL || uw==NULL)
return;
@@ -1012,9 +1079,9 @@ static void do_weight_paint_vertex(VPaint *wp, Object *ob, int index, int alpha,
if(j>=0) {
/* copy, not paint again */
if(vgroup_mirror != -1)
- uw= ED_vgroup_weight_verify(me->dvert+j, vgroup_mirror);
+ uw= verify_defweight(me->dvert+j, vgroup_mirror);
else
- uw= ED_vgroup_weight_verify(me->dvert+j, vgroup);
+ uw= verify_defweight(me->dvert+j, vgroup);
uw->weight= dw->weight;
}
@@ -1049,7 +1116,7 @@ static int set_wpaint(bContext *C, wmOperator *op) /* toggle */
* exit (exit needs doing regardless because we
* should redeform).
*/
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
if(ob->mode & OB_MODE_WEIGHT_PAINT) {
Object *par;
@@ -1057,8 +1124,9 @@ static int set_wpaint(bContext *C, wmOperator *op) /* toggle */
if(wp==NULL)
wp= scene->toolsettings->wpaint= new_vpaint(1);
- paint_init(&wp->paint, PAINT_CURSOR_WEIGHT_PAINT);
- paint_cursor_start(C, wp_poll);
+ paint_init(&wp->paint, "Brush");
+
+ toggle_paint_cursor(C, 1);
mesh_octree_table(ob, NULL, NULL, 's');
@@ -1070,10 +1138,13 @@ static int set_wpaint(bContext *C, wmOperator *op) /* toggle */
if(pchan->bone->flag & BONE_ACTIVE)
break;
if(pchan)
- ED_vgroup_select_by_name(ob, pchan->name);
+ vertexgroup_select_by_name(ob, pchan->name);
}
}
else {
+ if(wp)
+ toggle_paint_cursor(C, 1);
+
mesh_octree_table(ob, NULL, NULL, 'e');
}
@@ -1114,11 +1185,9 @@ void PAINT_OT_weight_paint_toggle(wmOperatorType *ot)
static int vpaint_radial_control_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- Paint *p = paint_get_active(CTX_data_scene(C));
- Brush *brush = paint_brush(p);
-
- WM_paint_cursor_end(CTX_wm_manager(C), p->paint_cursor);
- p->paint_cursor = NULL;
+ Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->vpaint->paint);
+
+ toggle_paint_cursor(C, 0);
brush_radial_control_invoke(op, brush, 1);
return WM_radial_control_invoke(C, op, event);
}
@@ -1127,7 +1196,7 @@ static int vpaint_radial_control_modal(bContext *C, wmOperator *op, wmEvent *eve
{
int ret = WM_radial_control_modal(C, op, event);
if(ret != OPERATOR_RUNNING_MODAL)
- paint_cursor_start(C, vp_poll);
+ toggle_paint_cursor(C, 0);
return ret;
}
@@ -1139,11 +1208,8 @@ static int vpaint_radial_control_exec(bContext *C, wmOperator *op)
static int wpaint_radial_control_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- Paint *p = paint_get_active(CTX_data_scene(C));
- Brush *brush = paint_brush(p);
-
- WM_paint_cursor_end(CTX_wm_manager(C), p->paint_cursor);
- p->paint_cursor = NULL;
+ Brush *brush = paint_brush(&CTX_data_scene(C)->toolsettings->wpaint->paint);
+ toggle_paint_cursor(C, 1);
brush_radial_control_invoke(op, brush, 1);
return WM_radial_control_invoke(C, op, event);
}
@@ -1152,7 +1218,7 @@ static int wpaint_radial_control_modal(bContext *C, wmOperator *op, wmEvent *eve
{
int ret = WM_radial_control_modal(C, op, event);
if(ret != OPERATOR_RUNNING_MODAL)
- paint_cursor_start(C, wp_poll);
+ toggle_paint_cursor(C, 1);
return ret;
}
@@ -1204,10 +1270,207 @@ struct WPaintData {
float wpimat[3][3];
};
-static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *event)
+static void wpaint_exit(bContext *C, wmOperator *op)
+{
+ ToolSettings *ts= CTX_data_tool_settings(C);
+ Object *ob= CTX_data_active_object(C);
+ struct WPaintData *wpd= op->customdata;
+
+ if(wpd->vertexcosnos)
+ MEM_freeN(wpd->vertexcosnos);
+ MEM_freeN(wpd->indexar);
+
+ /* frees prev buffer */
+ copy_wpaint_prev(ts->wpaint, NULL, 0);
+
+ /* and particles too */
+ if(ob->particlesystem.first) {
+ ParticleSystem *psys;
+ int i;
+
+ for(psys= ob->particlesystem.first; psys; psys= psys->next) {
+ for(i=0; i<PSYS_TOT_VG; i++) {
+ if(psys->vgroup[i]==ob->actdef) {
+ psys->recalc |= PSYS_RECALC_RESET;
+ break;
+ }
+ }
+ }
+ }
+
+ DAG_object_flush_update(CTX_data_scene(C), ob, OB_RECALC_DATA);
+
+ MEM_freeN(wpd);
+ op->customdata= NULL;
+}
+
+
+static int wpaint_modal(bContext *C, wmOperator *op, wmEvent *event)
+{
+ ToolSettings *ts= CTX_data_tool_settings(C);
+ VPaint *wp= ts->wpaint;
+ Brush *brush = paint_brush(&wp->paint);
+
+ switch(event->type) {
+ case LEFTMOUSE:
+ if(event->val==0) { /* release */
+ wpaint_exit(C, op);
+ return OPERATOR_FINISHED;
+ }
+ /* pass on, first press gets painted too */
+
+ case MOUSEMOVE:
+ {
+ struct WPaintData *wpd= op->customdata;
+ ViewContext *vc= &wpd->vc;
+ Object *ob= vc->obact;
+ Mesh *me= ob->data;
+ float mat[4][4];
+ float paintweight= ts->vgroup_weight;
+ int *indexar= wpd->indexar;
+ int totindex, index, alpha, totw;
+ short mval[2];
+
+ view3d_operator_needs_opengl(C);
+
+ /* load projection matrix */
+ wmMultMatrix(ob->obmat);
+ wmGetSingleMatrix(mat);
+ wmLoadMatrix(wpd->vc.rv3d->viewmat);
+
+ MTC_Mat4SwapMat4(wpd->vc.rv3d->persmat, mat);
+
+ mval[0]= event->x - vc->ar->winrct.xmin;
+ mval[1]= event->y - vc->ar->winrct.ymin;
+
+ /* which faces are involved */
+ if(wp->flag & VP_AREA) {
+ totindex= sample_backbuf_area(vc, indexar, me->totface, mval[0], mval[1], brush->size);
+ }
+ else {
+ indexar[0]= view3d_sample_backbuf(vc, mval[0], mval[1]);
+ if(indexar[0]) totindex= 1;
+ else totindex= 0;
+ }
+
+ if(wp->flag & VP_COLINDEX) {
+ for(index=0; index<totindex; index++) {
+ if(indexar[index] && indexar[index]<=me->totface) {
+ MFace *mface= ((MFace *)me->mface) + (indexar[index]-1);
+
+ if(mface->mat_nr!=ob->actcol-1) {
+ indexar[index]= 0;
+ }
+ }
+ }
+ }
+
+ if((G.f & G_FACESELECT) && me->mface) {
+ for(index=0; index<totindex; index++) {
+ if(indexar[index] && indexar[index]<=me->totface) {
+ MFace *mface= ((MFace *)me->mface) + (indexar[index]-1);
+
+ if((mface->flag & ME_FACE_SEL)==0) {
+ indexar[index]= 0;
+ }
+ }
+ }
+ }
+
+ /* make sure each vertex gets treated only once */
+ /* and calculate filter weight */
+ totw= 0;
+ if(wp->mode==VP_BLUR)
+ paintweight= 0.0f;
+ else
+ paintweight= ts->vgroup_weight;
+
+ 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(wp->mode==VP_BLUR) {
+ MDeformWeight *dw, *(*dw_func)(MDeformVert *, int) = verify_defweight;
+
+ if(wp->flag & VP_ONLYVGROUP)
+ dw_func= get_defweight;
+
+ 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++;}
+ }
+ }
+ }
+ }
+
+ if(wp->mode==VP_BLUR)
+ paintweight/= (float)totw;
+
+ 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);
+ if(alpha) {
+ do_weight_paint_vertex(wp, ob, mface->v1, alpha, paintweight, wpd->vgroup_mirror);
+ }
+ (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);
+ if(alpha) {
+ do_weight_paint_vertex(wp, ob, mface->v2, alpha, paintweight, wpd->vgroup_mirror);
+ }
+ (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);
+ if(alpha) {
+ do_weight_paint_vertex(wp, ob, mface->v3, alpha, paintweight, wpd->vgroup_mirror);
+ }
+ (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);
+ if(alpha) {
+ do_weight_paint_vertex(wp, ob, mface->v4, alpha, paintweight, wpd->vgroup_mirror);
+ }
+ (me->dvert+mface->v4)->flag= 0;
+ }
+ }
+ }
+ }
+
+ MTC_Mat4SwapMat4(vc->rv3d->persmat, mat);
+
+ DAG_object_flush_update(vc->scene, ob, OB_RECALC_DATA);
+ ED_region_tag_redraw(vc->ar);
+ }
+ }
+
+ return OPERATOR_RUNNING_MODAL;
+}
+
+static int wpaint_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
Scene *scene= CTX_data_scene(C);
- struct PaintStroke *stroke = op->customdata;
ToolSettings *ts= CTX_data_tool_settings(C);
VPaint *wp= ts->wpaint;
Object *ob= CTX_data_active_object(C);
@@ -1216,17 +1479,17 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *event)
float mat[4][4], imat[4][4];
if(scene->obedit) return OPERATOR_CANCELLED;
+ // XXX if(multires_level1_test()) return;
me= get_mesh(ob);
if(me==NULL || me->totface==0) return OPERATOR_PASS_THROUGH;
/* if nothing was added yet, we make dverts and a vertex deform group */
if (!me->dvert)
- ED_vgroup_data_create(&me->id);
+ create_dverts(&me->id);
- /* make mode data storage */
- wpd= MEM_callocN(sizeof(struct WPaintData), "WPaintData");
- paint_stroke_set_mode_data(stroke, wpd);
+ /* make customdata storage */
+ op->customdata= wpd= MEM_callocN(sizeof(struct WPaintData), "WPaintData");
view3d_set_viewcontext(C, &wpd->vc);
wpd->vgroup_mirror= -1;
@@ -1256,14 +1519,14 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *event)
if(pchan) {
bDeformGroup *dg= get_named_vertexgroup(ob, pchan->name);
if(dg==NULL)
- dg= ED_vgroup_add_name(ob, pchan->name); /* sets actdef */
+ dg= add_defgroup_name(ob, pchan->name); /* sets actdef */
else
ob->actdef= get_defgroup_num(ob, dg);
}
}
}
if(ob->defbase.first==NULL) {
- ED_vgroup_add(ob);
+ add_defgroup(ob);
}
// if(ob->lay & v3d->lay); else error("Active object is not in this layer");
@@ -1288,8 +1551,8 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *event)
if (!strcmp(curdef->name, name))
break;
if(curdef==NULL) {
- int olddef= ob->actdef; /* tsk, ED_vgroup_add sets the active defgroup */
- curdef= ED_vgroup_add_name (ob, name);
+ int olddef= ob->actdef; /* tsk, add_defgroup sets the active defgroup */
+ curdef= add_defgroup_name (ob, name);
ob->actdef= olddef;
}
@@ -1298,203 +1561,11 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *event)
}
}
- return 1;
-}
-
-static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, PointerRNA *itemptr)
-{
- ToolSettings *ts= CTX_data_tool_settings(C);
- VPaint *wp= ts->wpaint;
- Brush *brush = paint_brush(&wp->paint);
- struct WPaintData *wpd= paint_stroke_mode_data(stroke);
- ViewContext *vc= &wpd->vc;
- Object *ob= vc->obact;
- Mesh *me= ob->data;
- float mat[4][4];
- float paintweight= ts->vgroup_weight;
- int *indexar= wpd->indexar;
- int totindex, index, alpha, totw;
- float mval[2];
-
- view3d_operator_needs_opengl(C);
-
- /* load projection matrix */
- wmMultMatrix(ob->obmat);
- wmGetSingleMatrix(mat);
- wmLoadMatrix(wpd->vc.rv3d->viewmat);
-
- RNA_float_get_array(itemptr, "mouse", mval);
- mval[0]-= vc->ar->winrct.xmin;
- mval[1]-= vc->ar->winrct.ymin;
-
- Mat4SwapMat4(wpd->vc.rv3d->persmat, mat);
-
- /* which faces are involved */
- if(wp->flag & VP_AREA) {
- totindex= sample_backbuf_area(vc, indexar, me->totface, mval[0], mval[1], brush->size);
- }
- else {
- indexar[0]= view3d_sample_backbuf(vc, mval[0], mval[1]);
- if(indexar[0]) totindex= 1;
- else totindex= 0;
- }
-
- if(wp->flag & VP_COLINDEX) {
- for(index=0; index<totindex; index++) {
- if(indexar[index] && indexar[index]<=me->totface) {
- MFace *mface= ((MFace *)me->mface) + (indexar[index]-1);
-
- if(mface->mat_nr!=ob->actcol-1) {
- indexar[index]= 0;
- }
- }
- }
- }
-
- if((G.f & G_FACESELECT) && me->mface) {
- for(index=0; index<totindex; index++) {
- if(indexar[index] && indexar[index]<=me->totface) {
- MFace *mface= ((MFace *)me->mface) + (indexar[index]-1);
-
- if((mface->flag & ME_FACE_SEL)==0) {
- indexar[index]= 0;
- }
- }
- }
- }
-
- /* make sure each vertex gets treated only once */
- /* and calculate filter weight */
- totw= 0;
- if(wp->mode==VP_BLUR)
- paintweight= 0.0f;
- else
- paintweight= ts->vgroup_weight;
-
- 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(wp->mode==VP_BLUR) {
- MDeformWeight *dw, *(*dw_func)(MDeformVert *, int) = ED_vgroup_weight_verify;
-
- if(wp->flag & VP_ONLYVGROUP)
- dw_func= ED_vgroup_weight_get;
-
- 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++;}
- }
- }
- }
- }
-
- if(wp->mode==VP_BLUR)
- paintweight/= (float)totw;
-
- 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);
- if(alpha) {
- do_weight_paint_vertex(wp, ob, mface->v1, alpha, paintweight, wpd->vgroup_mirror);
- }
- (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);
- if(alpha) {
- do_weight_paint_vertex(wp, ob, mface->v2, alpha, paintweight, wpd->vgroup_mirror);
- }
- (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);
- if(alpha) {
- do_weight_paint_vertex(wp, ob, mface->v3, alpha, paintweight, wpd->vgroup_mirror);
- }
- (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);
- if(alpha) {
- do_weight_paint_vertex(wp, ob, mface->v4, alpha, paintweight, wpd->vgroup_mirror);
- }
- (me->dvert+mface->v4)->flag= 0;
- }
- }
- }
- }
-
- Mat4SwapMat4(vc->rv3d->persmat, mat);
-
- DAG_id_flush_update(ob->data, OB_RECALC_DATA);
- ED_region_tag_redraw(vc->ar);
-}
-
-static void wpaint_stroke_done(bContext *C, struct PaintStroke *stroke)
-{
- ToolSettings *ts= CTX_data_tool_settings(C);
- Object *ob= CTX_data_active_object(C);
- struct WPaintData *wpd= paint_stroke_mode_data(stroke);
-
- if(wpd->vertexcosnos)
- MEM_freeN(wpd->vertexcosnos);
- MEM_freeN(wpd->indexar);
-
- /* frees prev buffer */
- copy_wpaint_prev(ts->wpaint, NULL, 0);
-
- /* and particles too */
- if(ob->particlesystem.first) {
- ParticleSystem *psys;
- int i;
-
- for(psys= ob->particlesystem.first; psys; psys= psys->next) {
- for(i=0; i<PSYS_TOT_VG; i++) {
- if(psys->vgroup[i]==ob->actdef) {
- psys->recalc |= PSYS_RECALC_RESET;
- break;
- }
- }
- }
- }
-
- DAG_id_flush_update(ob->data, OB_RECALC_DATA);
-
- MEM_freeN(wpd);
-}
-
-
-static int wpaint_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
-
- op->customdata = paint_stroke_new(C, wpaint_stroke_test_start,
- wpaint_stroke_update_step,
- wpaint_stroke_done);
+ /* do paint once for click only paint */
+ wpaint_modal(C, op, event);
/* add modal handler */
WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
-
- op->type->modal(C, op, event);
return OPERATOR_RUNNING_MODAL;
}
@@ -1508,14 +1579,13 @@ void PAINT_OT_weight_paint(wmOperatorType *ot)
/* api callbacks */
ot->invoke= wpaint_invoke;
- ot->modal= paint_stroke_modal;
+ ot->modal= wpaint_modal;
/* ot->exec= vpaint_exec; <-- needs stroke property */
ot->poll= wp_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
-
- RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");
+
}
/* ************ set / clear vertex paint mode ********** */
@@ -1547,6 +1617,11 @@ static int set_vpaint(bContext *C, wmOperator *op) /* toggle */
if(ob->mode & OB_MODE_VERTEX_PAINT) {
ob->mode &= ~OB_MODE_VERTEX_PAINT;
+
+ if(vp) {
+ toggle_paint_cursor(C, 0);
+ vp->paintcursor= NULL;
+ }
}
else {
ob->mode |= OB_MODE_VERTEX_PAINT;
@@ -1557,14 +1632,14 @@ static int set_vpaint(bContext *C, wmOperator *op) /* toggle */
if(vp==NULL)
vp= scene->toolsettings->vpaint= new_vpaint(0);
- paint_cursor_start(C, vp_poll);
+ toggle_paint_cursor(C, 0);
- paint_init(&vp->paint, PAINT_CURSOR_VERTEX_PAINT);
+ paint_init(&vp->paint, "Brush");
}
if (me)
/* update modifier stack for mapping requirements */
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_SCENE|ND_MODE, scene);
@@ -1610,24 +1685,158 @@ For future:
*/
-typedef struct VPaintData {
+struct VPaintData {
ViewContext vc;
unsigned int paintcol;
int *indexar;
float *vertexcosnos;
float vpimat[3][3];
-} VPaintData;
+};
+
+static void vpaint_exit(bContext *C, wmOperator *op)
+{
+ ToolSettings *ts= CTX_data_tool_settings(C);
+ struct VPaintData *vpd= op->customdata;
+
+ if(vpd->vertexcosnos)
+ MEM_freeN(vpd->vertexcosnos);
+ MEM_freeN(vpd->indexar);
+
+ /* frees prev buffer */
+ copy_vpaint_prev(ts->vpaint, NULL, 0);
+
+ MEM_freeN(vpd);
+ op->customdata= NULL;
+}
+
+static int vpaint_modal(bContext *C, wmOperator *op, wmEvent *event)
+{
+ ToolSettings *ts= CTX_data_tool_settings(C);
+ VPaint *vp= ts->vpaint;
+ Brush *brush = paint_brush(&vp->paint);
+
+ switch(event->type) {
+ case LEFTMOUSE:
+ if(event->val==0) { /* release */
+ vpaint_exit(C, op);
+ return OPERATOR_FINISHED;
+ }
+ /* pass on, first press gets painted too */
+
+ case MOUSEMOVE:
+ {
+ struct VPaintData *vpd= op->customdata;
+ ViewContext *vc= &vpd->vc;
+ Object *ob= vc->obact;
+ Mesh *me= ob->data;
+ float mat[4][4];
+ int *indexar= vpd->indexar;
+ int totindex, index;
+ short mval[2];
+
+ view3d_operator_needs_opengl(C);
+
+ /* load projection matrix */
+ wmMultMatrix(ob->obmat);
+ wmGetSingleMatrix(mat);
+ wmLoadMatrix(vc->rv3d->viewmat);
+
+ mval[0]= event->x - vc->ar->winrct.xmin;
+ mval[1]= event->y - vc->ar->winrct.ymin;
+
+ /* which faces are involved */
+ if(vp->flag & VP_AREA) {
+ totindex= sample_backbuf_area(vc, indexar, me->totface, mval[0], mval[1], brush->size);
+ }
+ else {
+ indexar[0]= view3d_sample_backbuf(vc, mval[0], mval[1]);
+ if(indexar[0]) totindex= 1;
+ else totindex= 0;
+ }
+
+ MTC_Mat4SwapMat4(vc->rv3d->persmat, mat);
+
+ if(vp->flag & VP_COLINDEX) {
+ for(index=0; index<totindex; index++) {
+ if(indexar[index] && indexar[index]<=me->totface) {
+ MFace *mface= ((MFace *)me->mface) + (indexar[index]-1);
+
+ if(mface->mat_nr!=ob->actcol-1) {
+ indexar[index]= 0;
+ }
+ }
+ }
+ }
+ if((G.f & G_FACESELECT) && me->mface) {
+ for(index=0; index<totindex; index++) {
+ if(indexar[index] && indexar[index]<=me->totface) {
+ MFace *mface= ((MFace *)me->mface) + (indexar[index]-1);
+
+ if((mface->flag & ME_FACE_SEL)==0)
+ indexar[index]= 0;
+ }
+ }
+ }
+
+ for(index=0; index<totindex; index++) {
+
+ if(indexar[index] && indexar[index]<=me->totface) {
+ MFace *mface= ((MFace *)me->mface) + (indexar[index]-1);
+ unsigned int *mcol= ( (unsigned int *)me->mcol) + 4*(indexar[index]-1);
+ unsigned int *mcolorig= ( (unsigned int *)vp->vpaint_prev) + 4*(indexar[index]-1);
+ int alpha;
+
+ if(vp->mode==VP_BLUR) {
+ unsigned int fcol1= mcol_blend( mcol[0], mcol[1], 128);
+ if(mface->v4) {
+ unsigned int fcol2= mcol_blend( mcol[2], mcol[3], 128);
+ vpd->paintcol= mcol_blend( fcol1, fcol2, 128);
+ }
+ else {
+ vpd->paintcol= mcol_blend( mcol[2], fcol1, 170);
+ }
+
+ }
+
+ alpha= calc_vp_alpha_dl(vp, vc, vpd->vpimat, vpd->vertexcosnos+6*mface->v1, mval);
+ if(alpha) vpaint_blend(vp, mcol, mcolorig, vpd->paintcol, alpha);
+
+ alpha= calc_vp_alpha_dl(vp, vc, vpd->vpimat, vpd->vertexcosnos+6*mface->v2, mval);
+ if(alpha) vpaint_blend(vp, mcol+1, mcolorig+1, vpd->paintcol, alpha);
+
+ alpha= calc_vp_alpha_dl(vp, vc, vpd->vpimat, vpd->vertexcosnos+6*mface->v3, mval);
+ if(alpha) vpaint_blend(vp, mcol+2, mcolorig+2, vpd->paintcol, alpha);
+
+ if(mface->v4) {
+ alpha= calc_vp_alpha_dl(vp, vc, vpd->vpimat, vpd->vertexcosnos+6*mface->v4, mval);
+ if(alpha) vpaint_blend(vp, mcol+3, mcolorig+3, vpd->paintcol, alpha);
+ }
+ }
+ }
+
+ MTC_Mat4SwapMat4(vc->rv3d->persmat, mat);
+
+ do_shared_vertexcol(me);
+
+ ED_region_tag_redraw(vc->ar);
+
+ DAG_object_flush_update(vc->scene, ob, OB_RECALC_DATA);
+ }
+ break;
+ }
+
+ return OPERATOR_RUNNING_MODAL;
+}
-static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, wmEvent *event)
+static int vpaint_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
ToolSettings *ts= CTX_data_tool_settings(C);
- struct PaintStroke *stroke = op->customdata;
VPaint *vp= ts->vpaint;
struct VPaintData *vpd;
Object *ob= CTX_data_active_object(C);
Mesh *me;
float mat[4][4], imat[4][4];
-
+
/* context checks could be a poll() */
me= get_mesh(ob);
if(me==NULL || me->totface==0) return OPERATOR_PASS_THROUGH;
@@ -1635,9 +1844,8 @@ static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, wmEvent
if(me->mcol==NULL) make_vertexcol(CTX_data_scene(C), 0);
if(me->mcol==NULL) return OPERATOR_CANCELLED;
- /* make mode data storage */
- vpd= MEM_callocN(sizeof(struct VPaintData), "VPaintData");
- paint_stroke_set_mode_data(stroke, vpd);
+ /* make customdata storage */
+ op->customdata= vpd= MEM_callocN(sizeof(struct VPaintData), "VPaintData");
view3d_set_viewcontext(C, &vpd->vc);
vpd->vertexcosnos= mesh_get_mapped_verts_nors(vpd->vc.scene, ob);
@@ -1651,119 +1859,12 @@ static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, wmEvent
Mat4MulMat4(mat, ob->obmat, vpd->vc.rv3d->viewmat);
Mat4Invert(imat, mat);
Mat3CpyMat4(vpd->vpimat, imat);
-
- return 1;
-}
-
-static void vpaint_paint_face(VPaint *vp, VPaintData *vpd, Object *ob, int index, float mval[2])
-{
- ViewContext *vc = &vpd->vc;
- Mesh *me = get_mesh(ob);
- MFace *mface= ((MFace*)me->mface) + index;
- unsigned int *mcol= ((unsigned int*)me->mcol) + 4*index;
- unsigned int *mcolorig= ((unsigned int*)vp->vpaint_prev) + 4*index;
- int alpha, i;
-
- if((vp->flag & VP_COLINDEX && mface->mat_nr!=ob->actcol-1) ||
- (G.f & G_FACESELECT && !(mface->flag & ME_FACE_SEL)))
- return;
-
- if(vp->mode==VP_BLUR) {
- unsigned int fcol1= mcol_blend( mcol[0], mcol[1], 128);
- if(mface->v4) {
- unsigned int fcol2= mcol_blend( mcol[2], mcol[3], 128);
- vpd->paintcol= mcol_blend( fcol1, fcol2, 128);
- }
- else {
- vpd->paintcol= mcol_blend( mcol[2], fcol1, 170);
- }
-
- }
-
- for(i = 0; i < (mface->v4 ? 4 : 3); ++i) {
- alpha= calc_vp_alpha_dl(vp, vc, vpd->vpimat, vpd->vertexcosnos+6*(&mface->v1)[i], mval);
- if(alpha)
- vpaint_blend(vp, mcol+i, mcolorig+i, vpd->paintcol, alpha);
- }
-}
-
-static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, PointerRNA *itemptr)
-{
- ToolSettings *ts= CTX_data_tool_settings(C);
- struct VPaintData *vpd = paint_stroke_mode_data(stroke);
- VPaint *vp= ts->vpaint;
- Brush *brush = paint_brush(&vp->paint);
- ViewContext *vc= &vpd->vc;
- Object *ob= vc->obact;
- Mesh *me= ob->data;
- float mat[4][4];
- int *indexar= vpd->indexar;
- int totindex, index;
- float mval[2];
-
- RNA_float_get_array(itemptr, "mouse", mval);
-
- view3d_operator_needs_opengl(C);
-
- /* load projection matrix */
- wmMultMatrix(ob->obmat);
- wmGetSingleMatrix(mat);
- wmLoadMatrix(vc->rv3d->viewmat);
-
- mval[0]-= vc->ar->winrct.xmin;
- mval[1]-= vc->ar->winrct.ymin;
-
-
- /* which faces are involved */
- if(vp->flag & VP_AREA) {
- totindex= sample_backbuf_area(vc, indexar, me->totface, mval[0], mval[1], brush->size);
- }
- else {
- indexar[0]= view3d_sample_backbuf(vc, mval[0], mval[1]);
- if(indexar[0]) totindex= 1;
- else totindex= 0;
- }
-
- Mat4SwapMat4(vc->rv3d->persmat, mat);
-
- for(index=0; index<totindex; index++) {
- if(indexar[index] && indexar[index]<=me->totface)
- vpaint_paint_face(vp, vpd, ob, indexar[index]-1, mval);
- }
-
- Mat4SwapMat4(vc->rv3d->persmat, mat);
-
- ED_region_tag_redraw(vc->ar);
-
- DAG_id_flush_update(ob->data, OB_RECALC_DATA);
-}
-
-static void vpaint_stroke_done(bContext *C, struct PaintStroke *stroke)
-{
- ToolSettings *ts= CTX_data_tool_settings(C);
- struct VPaintData *vpd= paint_stroke_mode_data(stroke);
- if(vpd->vertexcosnos)
- MEM_freeN(vpd->vertexcosnos);
- MEM_freeN(vpd->indexar);
-
- /* frees prev buffer */
- copy_vpaint_prev(ts->vpaint, NULL, 0);
-
- MEM_freeN(vpd);
-}
-
-static int vpaint_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
-
- op->customdata = paint_stroke_new(C, vpaint_stroke_test_start,
- vpaint_stroke_update_step,
- vpaint_stroke_done);
+ /* do paint once for click only paint */
+ vpaint_modal(C, op, event);
/* add modal handler */
WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
-
- op->type->modal(C, op, event);
return OPERATOR_RUNNING_MODAL;
}
@@ -1776,13 +1877,11 @@ void PAINT_OT_vertex_paint(wmOperatorType *ot)
/* api callbacks */
ot->invoke= vpaint_invoke;
- ot->modal= paint_stroke_modal;
+ ot->modal= vpaint_modal;
/* ot->exec= vpaint_exec; <-- needs stroke property */
ot->poll= vp_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
-
- RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index b08e8ab5c2b..f7f72d611dc 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -65,6 +65,7 @@
#include "BKE_modifier.h"
#include "BKE_multires.h"
#include "BKE_paint.h"
+#include "BKE_sculpt.h"
#include "BKE_texture.h"
#include "BKE_utildefines.h"
#include "BKE_colortools.h"
@@ -79,7 +80,6 @@
#include "ED_space_api.h"
#include "ED_util.h"
#include "ED_view3d.h"
-#include "paint_intern.h"
#include "sculpt_intern.h"
#include "RNA_access.h"
@@ -144,6 +144,7 @@ typedef struct StrokeCache {
int first_time; /* Beginning of stroke may do some things special */
+ ViewContext vc;
bglMats *mats;
short (*orig_norms)[3]; /* Copy of the mesh vertices' normals */
@@ -177,6 +178,19 @@ typedef struct ProjVert {
* Simple functions to get data from the GL
*/
+/* Uses window coordinates (x,y) and depth component z to find a point in
+ modelspace */
+static void unproject(bglMats *mats, float out[3], const short x, const short y, const float z)
+{
+ double ux, uy, uz;
+
+ gluUnProject(x,y,z, mats->modelview, mats->projection,
+ (GLint *)mats->viewport, &ux, &uy, &uz );
+ out[0] = ux;
+ out[1] = uy;
+ out[2] = uz;
+}
+
/* Convert a point in model coordinates to 2D screen coordinates. */
static void projectf(bglMats *mats, const float v[3], float p[2])
{
@@ -533,7 +547,7 @@ static void do_flatten_clay_brush(Sculpt *sd, SculptSession *ss, const ListBase
ActiveData *node= active_verts->first;
/* area_normal and cntr define the plane towards which vertices are squashed */
float area_normal[3];
- float cntr[3], cntr2[3], bstr = 0;
+ float cntr[3], cntr2[3], bstr;
int flip = 0;
calc_area_normal(sd, ss, area_normal, active_verts);
@@ -1041,7 +1055,47 @@ static int sculpt_mode_poll(bContext *C)
static int sculpt_poll(bContext *C)
{
- return sculpt_mode_poll(C) && paint_poll(C);
+ return sculpt_mode_poll(C) && paint_brush(&CTX_data_tool_settings(C)->sculpt->paint) &&
+ CTX_wm_area(C)->spacetype == SPACE_VIEW3D &&
+ CTX_wm_region(C)->regiontype == RGN_TYPE_WINDOW;
+}
+
+/*** Sculpt Cursor ***/
+static void draw_paint_cursor(bContext *C, int x, int y, void *customdata)
+{
+ Sculpt *sd= CTX_data_tool_settings(C)->sculpt;
+ SculptSession *ss= CTX_data_active_object(C)->sculpt;
+ Brush *brush = paint_brush(&sd->paint);
+
+ glColor4ub(255, 100, 100, 128);
+ glEnable( GL_LINE_SMOOTH );
+ glEnable(GL_BLEND);
+
+ glTranslatef((float)x, (float)y, 0.0f);
+ glutil_draw_lined_arc(0.0, M_PI*2.0, brush->size, 40);
+ glTranslatef((float)-x, (float)-y, 0.0f);
+
+ if(ss && ss->cache && brush && (brush->flag & BRUSH_SMOOTH_STROKE)) {
+ ARegion *ar = CTX_wm_region(C);
+ sdrawline(x, y, (int)ss->cache->mouse[0] - ar->winrct.xmin, (int)ss->cache->mouse[1] - ar->winrct.ymin);
+ }
+
+ glDisable(GL_BLEND);
+ glDisable( GL_LINE_SMOOTH );
+}
+
+static void toggle_paint_cursor(bContext *C)
+{
+ Sculpt *s = CTX_data_scene(C)->toolsettings->sculpt;
+
+ if(s->cursor) {
+ WM_paint_cursor_end(CTX_wm_manager(C), s->cursor);
+ s->cursor = NULL;
+ }
+ else {
+ s->cursor =
+ WM_paint_cursor_activate(CTX_wm_manager(C), sculpt_poll, draw_paint_cursor, NULL);
+ }
}
static void sculpt_undo_push(bContext *C, Sculpt *sd)
@@ -1071,11 +1125,8 @@ static void sculpt_undo_push(bContext *C, Sculpt *sd)
/**** Radial control ****/
static int sculpt_radial_control_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- Paint *p = paint_get_active(CTX_data_scene(C));
- Brush *brush = paint_brush(p);
-
- WM_paint_cursor_end(CTX_wm_manager(C), p->paint_cursor);
- p->paint_cursor = NULL;
+ Brush *brush = paint_brush(&CTX_data_tool_settings(C)->sculpt->paint);
+ toggle_paint_cursor(C);
brush_radial_control_invoke(op, brush, 1);
return WM_radial_control_invoke(C, op, event);
}
@@ -1084,7 +1135,7 @@ static int sculpt_radial_control_modal(bContext *C, wmOperator *op, wmEvent *eve
{
int ret = WM_radial_control_modal(C, op, event);
if(ret != OPERATOR_RUNNING_MODAL)
- paint_cursor_start(C, sculpt_poll);
+ toggle_paint_cursor(C);
return ret;
}
@@ -1118,7 +1169,7 @@ static float unproject_brush_radius(SculptSession *ss, float offset)
float brush_edge[3];
/* In anchored mode, brush size changes with mouse loc, otherwise it's fixed using the brush radius */
- view3d_unproject(ss->cache->mats, brush_edge, ss->cache->initial_mouse[0] + offset,
+ unproject(ss->cache->mats, brush_edge, ss->cache->initial_mouse[0] + offset,
ss->cache->initial_mouse[1], ss->cache->depth);
return VecLenf(ss->cache->true_location, brush_edge);
@@ -1143,7 +1194,6 @@ static void sculpt_update_cache_invariants(Sculpt *sd, SculptSession *ss, bConte
{
StrokeCache *cache = MEM_callocN(sizeof(StrokeCache), "stroke cache");
Brush *brush = paint_brush(&sd->paint);
- ViewContext *vc = paint_stroke_view_context(op->customdata);
int i;
ss->cache = cache;
@@ -1159,8 +1209,10 @@ static void sculpt_update_cache_invariants(Sculpt *sd, SculptSession *ss, bConte
/* Truly temporary data that isn't stored in properties */
+ view3d_set_viewcontext(C, &cache->vc);
+
cache->mats = MEM_callocN(sizeof(bglMats), "sculpt bglMats");
- view3d_get_transformation(vc, vc->obact, cache->mats);
+ view3d_get_transformation(&cache->vc, cache->vc.obact, cache->mats);
sculpt_update_mesh_elements(C);
@@ -1200,7 +1252,7 @@ static void sculpt_update_cache_invariants(Sculpt *sd, SculptSession *ss, bConte
}
}
- view3d_unproject(cache->mats, cache->true_location, cache->initial_mouse[0], cache->initial_mouse[1], cache->depth);
+ unproject(cache->mats, cache->true_location, cache->initial_mouse[0], cache->initial_mouse[1], cache->depth);
cache->initial_radius = unproject_brush_radius(ss, brush->size);
cache->rotation = 0;
cache->first_time = 1;
@@ -1260,7 +1312,7 @@ static void sculpt_update_cache_variants(Sculpt *sd, SculptSession *ss, PointerR
/* Find the grab delta */
if(brush->sculpt_tool == SCULPT_TOOL_GRAB) {
- view3d_unproject(cache->mats, grab_location, cache->mouse[0], cache->mouse[1], cache->depth);
+ unproject(cache->mats, grab_location, cache->mouse[0], cache->mouse[1], cache->depth);
if(!cache->first_time)
VecSubf(cache->grab_delta, grab_location, cache->old_grab_location);
VecCopyf(cache->old_grab_location, grab_location);
@@ -1273,6 +1325,7 @@ static void sculpt_brush_stroke_init_properties(bContext *C, wmOperator *op, wmE
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
Object *ob= CTX_data_active_object(C);
ModifierData *md;
+ ViewContext vc;
float scale[3], clip_tolerance[3] = {0,0,0};
float mouse[2];
int flag = 0;
@@ -1305,12 +1358,13 @@ static void sculpt_brush_stroke_init_properties(bContext *C, wmOperator *op, wmE
RNA_float_set_array(op->ptr, "initial_mouse", mouse);
/* Initial screen depth under the mouse */
- RNA_float_set(op->ptr, "depth", read_cached_depth(paint_stroke_view_context(op->customdata), event->x, event->y));
+ view3d_set_viewcontext(C, &vc);
+ RNA_float_set(op->ptr, "depth", read_cached_depth(&vc, event->x, event->y));
sculpt_update_cache_invariants(sd, ss, C, op);
}
-static void sculpt_brush_stroke_init(bContext *C)
+static int sculpt_brush_stroke_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
SculptSession *ss = CTX_data_active_object(C)->sculpt;
@@ -1322,7 +1376,10 @@ static void sculpt_brush_stroke_init(bContext *C)
changes are made to the texture. */
sculpt_update_tex(sd, ss);
- sculpt_update_mesh_elements(C);
+ /* add modal handler */
+ WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+
+ return OPERATOR_RUNNING_MODAL;
}
static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss)
@@ -1378,69 +1435,157 @@ static void sculpt_flush_update(bContext *C)
ED_region_tag_redraw(ar);
}
-static int sculpt_stroke_test_start(bContext *C, struct wmOperator *op, wmEvent *event)
+/* Returns zero if no sculpt changes should be made, non-zero otherwise */
+static int sculpt_smooth_stroke(Sculpt *s, SculptSession *ss, float output[2], wmEvent *event)
{
- ViewContext vc;
- float cur_depth;
+ Brush *brush = paint_brush(&s->paint);
- view3d_set_viewcontext(C, &vc);
- cur_depth = read_cached_depth(&vc, event->x, event->y);
-
- /* Don't start the stroke until a valid depth is found */
- if(cur_depth < 1.0 - FLT_EPSILON) {
- SculptSession *ss = CTX_data_active_object(C)->sculpt;
+ output[0] = event->x;
+ output[1] = event->y;
- sculpt_brush_stroke_init_properties(C, op, event, ss);
- sculptmode_update_all_projverts(ss);
+ if(brush->flag & BRUSH_SMOOTH_STROKE && brush->sculpt_tool != SCULPT_TOOL_GRAB) {
+ StrokeCache *cache = ss->cache;
+ float u = brush->smooth_stroke_factor, v = 1.0 - u;
+ float dx = cache->mouse[0] - event->x, dy = cache->mouse[1] - event->y;
- return 1;
+ /* If the mouse is moving within the radius of the last move,
+ don't update the mouse position. This allows sharp turns. */
+ if(dx*dx + dy*dy < brush->smooth_stroke_radius * brush->smooth_stroke_radius)
+ return 0;
+
+ output[0] = event->x * v + cache->mouse[0] * u;
+ output[1] = event->y * v + cache->mouse[1] * u;
}
- else
- return 0;
+
+ return 1;
}
-static void sculpt_stroke_update_step(bContext *C, struct PaintStroke *stroke, PointerRNA *itemptr)
+/* Returns zero if the stroke dots should not be spaced, non-zero otherwise */
+int sculpt_space_stroke_enabled(Sculpt *s)
+{
+ Brush *br = paint_brush(&s->paint);
+ return (br->flag & BRUSH_SPACE) && !(br->flag & BRUSH_ANCHORED) && (br->sculpt_tool != SCULPT_TOOL_GRAB);
+}
+
+/* Put the location of the next sculpt stroke dot into the stroke RNA and apply it to the mesh */
+static void sculpt_brush_stroke_add_step(bContext *C, wmOperator *op, wmEvent *event, float mouse[2])
{
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
SculptSession *ss = CTX_data_active_object(C)->sculpt;
-
- sculpt_update_cache_variants(sd, ss, itemptr);
+ StrokeCache *cache = ss->cache;
+ PointerRNA itemptr;
+ float cur_depth, pressure = 1;
+ float center[3];
+
+ cur_depth = read_cached_depth(&cache->vc, mouse[0], mouse[1]);
+ unproject(ss->cache->mats, center, mouse[0], mouse[1], cur_depth);
+
+ /* Tablet */
+ if(event->custom == EVT_DATA_TABLET) {
+ wmTabletData *wmtab= event->customdata;
+ if(wmtab->Active != EVT_TABLET_NONE)
+ pressure= wmtab->Pressure;
+ }
+
+ /* Add to stroke */
+ RNA_collection_add(op->ptr, "stroke", &itemptr);
+ RNA_float_set_array(&itemptr, "location", center);
+ RNA_float_set_array(&itemptr, "mouse", mouse);
+ RNA_boolean_set(&itemptr, "flip", event->shift);
+ RNA_float_set(&itemptr, "pressure", pressure);
+ sculpt_update_cache_variants(sd, ss, &itemptr);
+
sculpt_restore_mesh(sd, ss);
do_symmetrical_brush_actions(sd, ss);
+}
- /* Cleanup */
- sculpt_flush_update(C);
- sculpt_post_stroke_free(ss);
+/* For brushes with stroke spacing enabled, moves mouse in steps
+ towards the final mouse location. */
+static int sculpt_space_stroke(bContext *C, wmOperator *op, wmEvent *event, Sculpt *s, SculptSession *ss, const float final_mouse[2])
+{
+ StrokeCache *cache = ss->cache;
+ Brush *brush = paint_brush(&s->paint);
+ int cnt = 0;
+
+ if(sculpt_space_stroke_enabled(s)) {
+ float vec[2] = {final_mouse[0] - cache->mouse[0], final_mouse[1] - cache->mouse[1]};
+ float mouse[2] = {cache->mouse[0], cache->mouse[1]};
+ float length, scale;
+ int steps = 0, i;
+
+ /* Normalize the vector between the last stroke dot and the goal */
+ length = sqrt(vec[0]*vec[0] + vec[1]*vec[1]);
+
+ if(length > FLT_EPSILON) {
+ scale = brush->spacing / length;
+ vec[0] *= scale;
+ vec[1] *= scale;
+
+ steps = (int)(length / brush->spacing);
+ for(i = 0; i < steps; ++i, ++cnt) {
+ mouse[0] += vec[0];
+ mouse[1] += vec[1];
+ sculpt_brush_stroke_add_step(C, op, event, mouse);
+ }
+ }
+ }
+
+ return cnt;
}
-static void sculpt_stroke_done(bContext *C, struct PaintStroke *stroke)
+static int sculpt_brush_stroke_modal(bContext *C, wmOperator *op, wmEvent *event)
{
+ Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
SculptSession *ss = CTX_data_active_object(C)->sculpt;
+ ARegion *ar = CTX_wm_region(C);
+ float cur_depth;
- /* Finished */
- if(ss->cache) {
- Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
+ sculpt_update_mesh_elements(C);
+
+ if(!ss->cache) {
+ ViewContext vc;
+ view3d_set_viewcontext(C, &vc);
+ cur_depth = read_cached_depth(&vc, event->x, event->y);
- request_depth_update(paint_stroke_view_context(stroke)->rv3d);
- sculpt_cache_free(ss->cache);
- ss->cache = NULL;
- sculpt_undo_push(C, sd);
+ /* Don't start the stroke until a valid depth is found */
+ if(cur_depth < 1.0 - FLT_EPSILON) {
+ sculpt_brush_stroke_init_properties(C, op, event, ss);
+ sculptmode_update_all_projverts(ss);
+ }
+
+ ED_region_tag_redraw(ar);
}
-}
-static int sculpt_brush_stroke_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
- sculpt_brush_stroke_init(C);
+ if(ss->cache) {
+ float mouse[2];
- op->customdata = paint_stroke_new(C, sculpt_stroke_test_start,
- sculpt_stroke_update_step,
- sculpt_stroke_done);
+ if(sculpt_smooth_stroke(sd, ss, mouse, event)) {
+ if(sculpt_space_stroke_enabled(sd)) {
+ if(!sculpt_space_stroke(C, op, event, sd, ss, mouse))
+ ED_region_tag_redraw(ar);
+ }
+ else
+ sculpt_brush_stroke_add_step(C, op, event, mouse);
- /* add modal handler */
- WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+ sculpt_flush_update(C);
+ sculpt_post_stroke_free(ss);
+ }
+ else
+ ED_region_tag_redraw(ar);
+ }
+
+ /* Finished */
+ if(event->type == LEFTMOUSE && event->val == 0) {
+ if(ss->cache) {
+ request_depth_update(ss->cache->vc.rv3d);
+ sculpt_cache_free(ss->cache);
+ ss->cache = NULL;
+ sculpt_undo_push(C, sd);
+ }
+
+ return OPERATOR_FINISHED;
+ }
- op->type->modal(C, op, event);
-
return OPERATOR_RUNNING_MODAL;
}
@@ -1449,14 +1594,20 @@ static int sculpt_brush_stroke_exec(bContext *C, wmOperator *op)
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
SculptSession *ss = CTX_data_active_object(C)->sculpt;
- op->customdata = paint_stroke_new(C, sculpt_stroke_test_start, sculpt_stroke_update_step, sculpt_stroke_done);
-
- sculpt_brush_stroke_init(C);
-
+ view3d_operator_needs_opengl(C);
sculpt_update_cache_invariants(sd, ss, C, op);
sculptmode_update_all_projverts(ss);
+ sculpt_update_tex(sd, ss);
- paint_stroke_exec(C, op);
+ RNA_BEGIN(op->ptr, itemptr, "stroke") {
+ sculpt_update_cache_variants(sd, ss, &itemptr);
+
+ sculpt_restore_mesh(sd, ss);
+ do_symmetrical_brush_actions(sd, ss);
+
+ sculpt_post_stroke_free(ss);
+ }
+ RNA_END;
sculpt_flush_update(C);
sculpt_cache_free(ss->cache);
@@ -1476,7 +1627,7 @@ static void SCULPT_OT_brush_stroke(wmOperatorType *ot)
/* api callbacks */
ot->invoke= sculpt_brush_stroke_invoke;
- ot->modal= paint_stroke_modal;
+ ot->modal= sculpt_brush_stroke_modal;
ot->exec= sculpt_brush_stroke_exec;
ot->poll= sculpt_poll;
@@ -1563,9 +1714,10 @@ static int sculpt_toggle_mode(bContext *C, wmOperator *op)
free_sculptsession(&ob->sculpt);
ob->sculpt = MEM_callocN(sizeof(SculptSession), "sculpt session");
- paint_init(&ts->sculpt->paint, PAINT_CURSOR_SCULPT);
-
- paint_cursor_start(C, sculpt_poll);
+ if(!ts->sculpt->cursor)
+ toggle_paint_cursor(C);
+
+ paint_init(&ts->sculpt->paint, "Brush");
WM_event_add_notifier(C, NC_SCENE|ND_MODE, CTX_data_scene(C));
}
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index 25f97b862e6..febca301939 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -32,6 +32,7 @@
#include "DNA_listBase.h"
#include "DNA_vec_types.h"
+#include "BKE_sculpt.h"
struct Brush;
struct Mesh;
diff --git a/source/blender/editors/sculpt_paint/sculpt_stroke.c b/source/blender/editors/sculpt_paint/sculpt_stroke.c
new file mode 100644
index 00000000000..554ff580358
--- /dev/null
+++ b/source/blender/editors/sculpt_paint/sculpt_stroke.c
@@ -0,0 +1,274 @@
+/*
+ * $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) 2007 by Nicholas Bishop
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ * Storage and manipulation of sculptmode brush strokes.
+ *
+ */
+
+#include "MEM_guardedalloc.h"
+
+#include "DNA_listBase.h"
+#include "DNA_scene_types.h"
+
+#include "BKE_sculpt.h"
+#include "BLI_blenlib.h"
+#include "BIF_gl.h"
+
+#include "sculpt_intern.h"
+
+#include <math.h>
+
+/* Temporary storage of input stroke control points */
+typedef struct StrokePoint {
+ struct StrokePoint *next, *prev;
+ short x, y;
+} StrokePoint;
+typedef struct SculptStroke {
+ short (*loc)[2];
+ int max;
+ int index;
+ float length;
+ ListBase final;
+ StrokePoint *final_mem;
+ float offset;
+} SculptStroke;
+
+SculptStroke *sculpt_stroke_new(const int max)
+{
+ SculptStroke *stroke = MEM_callocN(sizeof(SculptStroke), "SculptStroke");
+ stroke->loc = MEM_callocN(sizeof(short) * 4 * max, "SculptStroke.loc");
+ stroke->max = max;
+ stroke->index = -1;
+ return stroke;
+}
+
+void sculpt_stroke_free(SculptStroke *stroke)
+{
+ if(stroke) {
+ if(stroke->loc) MEM_freeN(stroke->loc);
+ if(stroke->final_mem) MEM_freeN(stroke->final_mem);
+
+ MEM_freeN(stroke);
+ }
+}
+
+void sculpt_stroke_add_point(SculptStroke *stroke, const short x, const short y)
+{
+ const int next = stroke->index + 1;
+
+ if(stroke->index == -1) {
+ stroke->loc[0][0] = x;
+ stroke->loc[0][1] = y;
+ stroke->index = 0;
+ }
+ else if(next < stroke->max) {
+ const int dx = x - stroke->loc[stroke->index][0];
+ const int dy = y - stroke->loc[stroke->index][1];
+ stroke->loc[next][0] = x;
+ stroke->loc[next][1] = y;
+ stroke->length += sqrt(dx*dx + dy*dy);
+ stroke->index = next;
+ }
+}
+
+static void sculpt_stroke_smooth(SculptStroke *stroke)
+{
+ /* Apply smoothing (exclude the first and last points)*/
+ StrokePoint *p = stroke->final.first;
+ if(p && p->next && p->next->next) {
+ for(p = p->next->next; p && p->next && p->next->next; p = p->next) {
+ p->x = p->prev->prev->x*0.1 + p->prev->x*0.2 + p->x*0.4 + p->next->x*0.2 + p->next->next->x*0.1;
+ p->y = p->prev->prev->y*0.1 + p->prev->y*0.2 + p->y*0.4 + p->next->y*0.2 + p->next->next->y*0.1;
+ }
+ }
+}
+
+static void sculpt_stroke_create_final(SculptStroke *stroke)
+{
+ if(stroke) {
+ StrokePoint *p, *pnext;
+ int i;
+
+ /* Copy loc into final */
+ if(stroke->final_mem)
+ MEM_freeN(stroke->final_mem);
+ stroke->final_mem = MEM_callocN(sizeof(StrokePoint) * (stroke->index + 1) * 2, "SculptStroke.final");
+ stroke->final.first = stroke->final.last = NULL;
+ for(i = 0; i <= stroke->index; ++i) {
+ p = &stroke->final_mem[i];
+ p->x = stroke->loc[i][0];
+ p->y = stroke->loc[i][1];
+ BLI_addtail(&stroke->final, p);
+ }
+
+ /* Remove shortest edges */
+ if(stroke->final.first) {
+ for(p = ((StrokePoint*)stroke->final.first)->next; p && p->next; p = pnext) {
+ const int dx = p->x - p->prev->x;
+ const int dy = p->y - p->prev->y;
+ const float len = sqrt(dx*dx + dy*dy);
+ pnext = p->next;
+ if(len < 10) {
+ BLI_remlink(&stroke->final, p);
+ }
+ }
+ }
+
+ sculpt_stroke_smooth(stroke);
+
+ /* Subdivide edges */
+ for(p = stroke->final.first; p && p->next; p = pnext) {
+ StrokePoint *np = &stroke->final_mem[i++];
+
+ pnext = p->next;
+ np->x = (p->x + p->next->x) / 2;
+ np->y = (p->y + p->next->y) / 2;
+ BLI_insertlink(&stroke->final, p, np);
+ }
+
+ sculpt_stroke_smooth(stroke);
+ }
+}
+
+static float sculpt_stroke_seglen(StrokePoint *p1, StrokePoint *p2)
+{
+ int dx = p2->x - p1->x;
+ int dy = p2->y - p1->y;
+ return sqrt(dx*dx + dy*dy);
+}
+
+static float sculpt_stroke_final_length(SculptStroke *stroke)
+{
+ StrokePoint *p;
+ float len = 0;
+ for(p = stroke->final.first; p && p->next; ++p)
+ len += sculpt_stroke_seglen(p, p->next);
+ return len;
+}
+
+/* If partial is nonzero, cuts off apply after that length has been processed */
+static StrokePoint *sculpt_stroke_apply_generic(Sculpt *sd, SculptStroke *stroke, const int partial)
+{
+ const int sdspace = 0; //XXX: sd->spacing;
+ const short spacing = sdspace > 0 ? sdspace : 2;
+ const int dots = sculpt_stroke_final_length(stroke) / spacing;
+ int i;
+ StrokePoint *p = stroke->final.first;
+ float startloc = stroke->offset;
+
+ for(i = 0; i < dots && p && p->next; ++i) {
+ const float dotloc = spacing * i;
+ short co[2];
+ float len = sculpt_stroke_seglen(p, p->next);
+ float u, v;
+
+ /* Find edge containing dot */
+ while(dotloc > startloc + len && p && p->next && p->next->next) {
+ p = p->next;
+ startloc += len;
+ len = sculpt_stroke_seglen(p, p->next);
+ }
+
+ if(!p || !p->next || dotloc > startloc + len)
+ break;
+
+ if(partial && startloc > partial) {
+ /* Calculate offset for next stroke segment */
+ stroke->offset = startloc + len - dotloc;
+ break;
+ }
+
+ u = (dotloc - startloc) / len;
+ v = 1 - u;
+
+ co[0] = p->x*v + p->next->x*u;
+ co[1] = p->y*v + p->next->y*u;
+
+ //do_symmetrical_brush_actions(sd, a, co, NULL);
+ }
+
+ return p ? p->next : NULL;
+}
+
+void sculpt_stroke_apply(Sculpt *sd, SculptStroke *stroke)
+{
+ /* TODO: make these values user-modifiable? */
+ const int partial_len = 100;
+ const int min_len = 200;
+
+ if(stroke) {
+ sculpt_stroke_create_final(stroke);
+
+ if(sculpt_stroke_final_length(stroke) > min_len) {
+ StrokePoint *p = sculpt_stroke_apply_generic(sd, stroke, partial_len);
+
+ /* Replace remaining values in stroke->loc with remaining stroke->final values */
+ stroke->index = -1;
+ stroke->length = 0;
+ for(; p; p = p->next) {
+ ++stroke->index;
+ stroke->loc[stroke->index][0] = p->x;
+ stroke->loc[stroke->index][1] = p->y;
+ if(p->next) {
+ stroke->length += sculpt_stroke_seglen(p, p->next);
+ }
+ }
+ }
+ }
+}
+
+void sculpt_stroke_apply_all(Sculpt *sd, SculptStroke *stroke)
+{
+ sculpt_stroke_create_final(stroke);
+
+ if(stroke) {
+ sculpt_stroke_apply_generic(sd, stroke, 0);
+ }
+}
+
+/* XXX: drawing goes elsewhere */
+void sculpt_stroke_draw(SculptStroke *stroke)
+{
+ if(stroke) {
+ StrokePoint *p;
+
+ /* Draws the original stroke */
+ /*glColor3f(1, 0, 0);
+ glBegin(GL_LINE_STRIP);
+ for(i = 0; i <= stroke->index; ++i)
+ glVertex2s(stroke->loc[i][0], stroke->loc[i][1]);
+ glEnd();*/
+
+ /* Draws the smoothed stroke */
+ glColor3f(0, 1, 0);
+ glBegin(GL_LINE_STRIP);
+ for(p = stroke->final.first; p; p = p->next)
+ glVertex2s(p->x, p->y);
+ glEnd();
+ }
+}
diff --git a/source/blender/editors/sound/Makefile b/source/blender/editors/sound/Makefile
deleted file mode 100644
index 10145035eb4..00000000000
--- a/source/blender/editors/sound/Makefile
+++ /dev/null
@@ -1,51 +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# The Original Code is Copyright (C) 2007 Blender Foundation
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-# Makes module object directory and bounces make to subdirectories.
-
-LIBNAME = ed_opsound
-DIR = $(OCGDIR)/blender/$(LIBNAME)
-
-include nan_compile.mk
-
-CFLAGS += $(LEVEL_1_C_WARNINGS)
-
-CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
-
-CPPFLAGS += -I../../windowmanager
-CPPFLAGS += -I../../blenkernel
-CPPFLAGS += -I../../blenloader
-CPPFLAGS += -I../../blenlib
-CPPFLAGS += -I../../makesdna
-CPPFLAGS += -I../../makesrna
-CPPFLAGS += -I../../imbuf
-CPPFLAGS += -I$(NAN_AUDASPACE)/include
-
-# own include
-
-CPPFLAGS += -I../include
diff --git a/source/blender/editors/sound/SConscript b/source/blender/editors/sound/SConscript
deleted file mode 100644
index 7968f4c53a9..00000000000
--- a/source/blender/editors/sound/SConscript
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/python
-Import ('env')
-
-sources = env.Glob('*.c')
-
-incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
-incs += ' ../../windowmanager #/intern/guardedalloc'
-incs += ' #/intern/guardedalloc'
-incs += ' ../../makesrna ../../python'
-incs += ' #/intern/audaspace/intern'
-
-defs = []
-
-env.BlenderLib ( 'bf_editors_sound', sources, Split(incs), defs, libtype=['core'], priority=[35] )
diff --git a/source/blender/editors/sound/sound_intern.h b/source/blender/editors/sound/sound_intern.h
deleted file mode 100644
index ec8b0688305..00000000000
--- a/source/blender/editors/sound/sound_intern.h
+++ /dev/null
@@ -1,37 +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2008 Blender Foundation.
- * All rights reserved.
- *
- *
- * Contributor(s): Blender Foundation
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef ED_SOUND_INTERN_H
-#define ED_SOUND_INTERN_H
-
-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
deleted file mode 100644
index 303ca0eaefd..00000000000
--- a/source/blender/editors/sound/sound_ops.c
+++ /dev/null
@@ -1,293 +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2007 Blender Foundation.
- * All rights reserved.
- *
- *
- * Contributor(s): Blender Foundation
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "DNA_packedFile_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_space_types.h"
-#include "DNA_sound_types.h"
-#include "DNA_sequence_types.h"
-#include "DNA_windowmanager_types.h"
-
-#include "BKE_context.h"
-#include "BKE_global.h"
-#include "BKE_main.h"
-#include "BKE_report.h"
-#include "BKE_packedFile.h"
-#include "BKE_sound.h"
-#include "BKE_utildefines.h"
-
-#include "BLI_blenlib.h"
-
-#include "ED_sound.h"
-
-#include "RNA_access.h"
-#include "RNA_define.h"
-#include "RNA_enum_types.h"
-
-#include "UI_interface.h"
-
-#include "WM_api.h"
-#include "WM_types.h"
-
-#include "AUD_C-API.h"
-
-#include "sound_intern.h"
-
-/******************** open sound operator ********************/
-
-static int open_exec(bContext *C, wmOperator *op)
-{
- char filename[FILE_MAX];
- bSound *sound;
- AUD_SoundInfo info;
-
- RNA_string_get(op->ptr, "filename", filename);
-
- sound = sound_new_file(CTX_data_main(C), filename);
-
- if (sound==NULL || sound->handle == NULL) {
- BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");
- return OPERATOR_CANCELLED;
- }
-
- info = AUD_getInfo(sound->handle);
-
- if (info.specs.format == AUD_FORMAT_INVALID) {
- sound_delete(C, sound);
- BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");
- return OPERATOR_CANCELLED;
- }
-
- if (RNA_boolean_get(op->ptr, "cache")) {
- sound_cache(sound, 0);
- }
-
- return OPERATOR_FINISHED;
-}
-
-static int open_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
- return WM_operator_filesel(C, op, event);
-}
-
-void SOUND_OT_open(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Open Sound";
- ot->idname= "SOUND_OT_open";
- ot->description= "Load a sound file into blender";
-
- /* api callbacks */
- ot->exec= open_exec;
- ot->invoke= open_invoke;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE);
- RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory.");
-}
-
-/* ******************************************************* */
-
-static int sound_poll(bContext *C)
-{
- Editing* ed = CTX_data_scene(C)->ed;
-
- if(!ed || !ed->act_seq || ed->act_seq->type != SEQ_SOUND)
- return 0;
-
- return 1;
-}
-/********************* pack operator *********************/
-
-static int pack_exec(bContext *C, wmOperator *op)
-{
- Editing* ed = CTX_data_scene(C)->ed;
- bSound* sound;
-
- if(!ed || !ed->act_seq || ed->act_seq->type != SEQ_SOUND)
- return OPERATOR_CANCELLED;
-
- sound = ed->act_seq->sound;
-
- if(!sound || sound->packedfile)
- return OPERATOR_CANCELLED;
-
- sound->packedfile= newPackedFile(op->reports, sound->name);
- sound_load(CTX_data_main(C), sound);
-
- return OPERATOR_FINISHED;
-}
-
-void SOUND_OT_pack(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Pack Sound";
- ot->idname= "SOUND_OT_pack";
-
- /* api callbacks */
- ot->exec= pack_exec;
- ot->poll= sound_poll;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
-/********************* unpack operator *********************/
-
-// XXX this function is in image_ops.c too, exactly the same, should be moved to a generally accessible position
-static void unpack_menu(bContext *C, char *opname, char *abs_name, char *folder, PackedFile *pf)
-{
- uiPopupMenu *pup;
- uiLayout *layout;
- char line[FILE_MAX + 100];
- char local_name[FILE_MAXDIR + FILE_MAX], fi[FILE_MAX];
-
- strcpy(local_name, abs_name);
- BLI_splitdirstring(local_name, fi);
- sprintf(local_name, "//%s/%s", folder, fi);
-
- pup= uiPupMenuBegin(C, "Unpack file", 0);
- layout= uiPupMenuLayout(pup);
-
- uiItemEnumO(layout, "Remove Pack", 0, opname, "method", PF_REMOVE);
-
- if(strcmp(abs_name, local_name)) {
- switch(checkPackedFile(local_name, pf)) {
- case PF_NOFILE:
- sprintf(line, "Create %s", local_name);
- uiItemEnumO(layout, line, 0, opname, "method", PF_WRITE_LOCAL);
- break;
- case PF_EQUAL:
- sprintf(line, "Use %s (identical)", local_name);
- uiItemEnumO(layout, line, 0, opname, "method", PF_USE_LOCAL);
- break;
- case PF_DIFFERS:
- sprintf(line, "Use %s (differs)", local_name);
- uiItemEnumO(layout, line, 0, opname, "method", PF_USE_LOCAL);
- sprintf(line, "Overwrite %s", local_name);
- uiItemEnumO(layout, line, 0, opname, "method", PF_WRITE_LOCAL);
- break;
- }
- }
-
- switch(checkPackedFile(abs_name, pf)) {
- case PF_NOFILE:
- sprintf(line, "Create %s", abs_name);
- uiItemEnumO(layout, line, 0, opname, "method", PF_WRITE_ORIGINAL);
- break;
- case PF_EQUAL:
- sprintf(line, "Use %s (identical)", abs_name);
- uiItemEnumO(layout, line, 0, opname, "method", PF_USE_ORIGINAL);
- break;
- case PF_DIFFERS:
- sprintf(line, "Use %s (differs)", local_name);
- uiItemEnumO(layout, line, 0, opname, "method", PF_USE_ORIGINAL);
- sprintf(line, "Overwrite %s", local_name);
- uiItemEnumO(layout, line, 0, opname, "method", PF_WRITE_ORIGINAL);
- break;
- }
-
- uiPupMenuEnd(C, pup);
-}
-
-static int unpack_exec(bContext *C, wmOperator *op)
-{
- int method= RNA_enum_get(op->ptr, "method");
- Editing* ed = CTX_data_scene(C)->ed;
- bSound* sound;
-
- if(!ed || !ed->act_seq || ed->act_seq->type != SEQ_SOUND)
- return OPERATOR_CANCELLED;
-
- sound = ed->act_seq->sound;
-
- if(!sound || !sound->packedfile)
- 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.");
-
- unpackSound(op->reports, sound, method);
-
- return OPERATOR_FINISHED;
-}
-
-static int unpack_invoke(bContext *C, wmOperator *op, wmEvent *event)
-{
- Editing* ed = CTX_data_scene(C)->ed;
- bSound* sound;
-
- if(!ed || !ed->act_seq || ed->act_seq->type != SEQ_SOUND)
- return OPERATOR_CANCELLED;
-
- sound = ed->act_seq->sound;
-
- if(!sound || !sound->packedfile)
- 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.");
-
- unpack_menu(C, "SOUND_OT_unpack", sound->name, "audio", sound->packedfile);
-
- return OPERATOR_FINISHED;
-}
-
-void SOUND_OT_unpack(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Unpack Sound";
- ot->idname= "SOUND_OT_unpack";
-
- /* api callbacks */
- ot->exec= unpack_exec;
- ot->invoke= unpack_invoke;
- ot->poll= sound_poll;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* properties */
- RNA_def_enum(ot->srna, "method", unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack.");
-}
-
-/* ******************************************************* */
-
-void ED_operatortypes_sound(void)
-{
- WM_operatortype_append(SOUND_OT_open);
- WM_operatortype_append(SOUND_OT_pack);
- WM_operatortype_append(SOUND_OT_unpack);
-}
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index 4288cc10a26..4fb22064c17 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -92,6 +92,306 @@
#include "ED_screen.h"
#include "ED_space_api.h"
+#if 0 // XXX old includes for reference only
+ #include "BIF_editaction.h"
+ #include "BIF_editkey.h"
+ #include "BIF_editnla.h"
+ #include "BIF_drawgpencil.h"
+ #include "BIF_keyframing.h"
+ #include "BIF_language.h"
+ #include "BIF_space.h"
+
+ #include "BDR_editcurve.h"
+ #include "BDR_gpencil.h"
+
+ #include "BSE_drawnla.h"
+ #include "BSE_drawipo.h"
+ #include "BSE_drawview.h"
+ #include "BSE_editaction_types.h"
+ #include "BSE_editipo.h"
+ #include "BSE_headerbuttons.h"
+ #include "BSE_time.h"
+ #include "BSE_view.h"
+#endif // XXX old defines for reference only
+
+/* XXX */
+extern void gl_round_box(int mode, float minx, float miny, float maxx, float maxy, float rad);
+
+/********************************** Slider Stuff **************************** */
+
+#if 0 // XXX all of this slider stuff will need a rethink!
+/* sliders for shapekeys */
+static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key)
+{
+ int i;
+ char str[64];
+ float x, y;
+ uiBlock *block;
+ uiBut *but;
+
+ /* lets make the shapekey sliders */
+
+ /* reset the damn myortho2 or the sliders won't draw/redraw
+ * correctly *grumble*
+ */
+ mywinset(curarea->win);
+ myortho2(-0.375f, curarea->winx-0.375f, G.v2d->cur.ymin, G.v2d->cur.ymax);
+
+ sprintf(str, "actionbuttonswin %d", curarea->win);
+ block= uiNewBlock (&curarea->uiblocks, str, UI_EMBOSS);
+
+ x = ACHANNEL_NAMEWIDTH + 1;
+ y = 0.0f;
+
+ uiBlockSetEmboss(block, UI_EMBOSSN);
+
+ if (!(G.saction->flag & SACTION_SLIDERS)) {
+ ACTWIDTH = ACHANNEL_NAMEWIDTH;
+ but=uiDefIconButBitS(block, TOG, SACTION_SLIDERS, B_REDR,
+ ICON_DISCLOSURE_TRI_RIGHT,
+ ACHANNEL_NAMEWIDTH - XIC - 5, (short)y + CHANNELHEIGHT,
+ XIC,YIC-2,
+ &(G.saction->flag), 0, 0, 0, 0,
+ "Show action window sliders");
+ /* no hilite, the winmatrix is not correct later on... */
+ uiButSetFlag(but, UI_NO_HILITE);
+ }
+ else {
+ but= uiDefIconButBitS(block, TOG, SACTION_SLIDERS, B_REDR,
+ ICON_DISCLOSURE_TRI_DOWN,
+ ACHANNEL_NAMEWIDTH - XIC - 5, (short)y + CHANNELHEIGHT,
+ XIC,YIC-2,
+ &(G.saction->flag), 0, 0, 0, 0,
+ "Hide action window sliders");
+ /* no hilite, the winmatrix is not correct later on... */
+ uiButSetFlag(but, UI_NO_HILITE);
+
+ ACTWIDTH = ACHANNEL_NAMEWIDTH + SLIDERWIDTH;
+
+ /* sliders are open so draw them */
+ BIF_ThemeColor(TH_FACE);
+
+ glRects(ACHANNEL_NAMEWIDTH, 0, ACHANNEL_NAMEWIDTH+SLIDERWIDTH, curarea->winy);
+ uiBlockSetEmboss(block, UI_EMBOSS);
+ for (i=1; i < key->totkey; i++) {
+ make_rvk_slider(block, ob, i,
+ (int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-1, "Slider to control Shape Keys");
+
+ y-=CHANNELHEIGHT+CHANNELSKIP;
+
+ /* see sliderval array in editkey.c */
+ if (i >= 255) break;
+ }
+ }
+ uiDrawBlock(C, block);
+}
+
+static void icu_slider_func(void *voidicu, void *voidignore)
+{
+ /* the callback for the icu sliders ... copies the
+ * value from the icu->curval into a bezier at the
+ * right frame on the right ipo curve (creating both the
+ * ipo curve and the bezier if needed).
+ */
+ IpoCurve *icu= voidicu;
+ BezTriple *bezt=NULL;
+ float cfra, icuval;
+
+ cfra = frame_to_float(CFRA);
+ if (G.saction->pin==0 && OBACT)
+ cfra= get_action_frame(OBACT, cfra);
+
+ /* if the ipocurve exists, try to get a bezier
+ * for this frame
+ */
+ bezt = get_bezt_icu_time(icu, &cfra, &icuval);
+
+ /* create the bezier triple if one doesn't exist,
+ * otherwise modify it's value
+ */
+ if (bezt == NULL) {
+ insert_vert_icu(icu, cfra, icu->curval, 0);
+ }
+ else {
+ bezt->vec[1][1] = icu->curval;
+ }
+
+ /* make sure the Ipo's are properly processed and
+ * redraw as necessary
+ */
+ sort_time_ipocurve(icu);
+ testhandles_ipocurve(icu);
+
+ /* nla-update (in case this affects anything) */
+ synchronize_action_strips();
+
+ /* do redraw pushes, and also the depsgraph flushes */
+ if (OBACT->pose || ob_get_key(OBACT))
+ DAG_object_flush_update(G.scene, OBACT, OB_RECALC);
+ else
+ DAG_object_flush_update(G.scene, OBACT, OB_RECALC_OB);
+
+ allqueue(REDRAWVIEW3D, 0);
+ allqueue(REDRAWACTION, 0);
+ allqueue(REDRAWNLA, 0);
+ allqueue(REDRAWIPO, 0);
+ allspace(REMAKEIPO, 0);
+ allqueue(REDRAWBUTSALL, 0);
+}
+
+static void make_icu_slider(uiBlock *block, IpoCurve *icu,
+ int x, int y, int w, int h, char *tip)
+{
+ /* create a slider for the ipo-curve*/
+ uiBut *but;
+
+ if(icu == NULL) return;
+
+ if (IS_EQ(icu->slide_max, icu->slide_min)) {
+ if (IS_EQ(icu->ymax, icu->ymin)) {
+ if (ELEM(icu->blocktype, ID_CO, ID_KE)) {
+ /* hack for constraints and shapekeys (and maybe a few others) */
+ icu->slide_min= 0.0;
+ icu->slide_max= 1.0;
+ }
+ else {
+ icu->slide_min= -100;
+ icu->slide_max= 100;
+ }
+ }
+ else {
+ icu->slide_min= icu->ymin;
+ icu->slide_max= icu->ymax;
+ }
+ }
+ if (icu->slide_min >= icu->slide_max) {
+ SWAP(float, icu->slide_min, icu->slide_max);
+ }
+
+ but=uiDefButF(block, NUMSLI, REDRAWVIEW3D, "",
+ x, y , w, h,
+ &(icu->curval), icu->slide_min, icu->slide_max,
+ 10, 2, tip);
+
+ uiButSetFunc(but, icu_slider_func, icu, NULL);
+
+ // no hilite, the winmatrix is not correct later on...
+ uiButSetFlag(but, UI_NO_HILITE);
+}
+
+/* sliders for ipo-curves of active action-channel */
+static void action_icu_buts(SpaceAction *saction)
+{
+ ListBase act_data = {NULL, NULL};
+ bActListElem *ale;
+ int filter;
+ void *data;
+ short datatype;
+
+ char str[64];
+ float x, y;
+ uiBlock *block;
+
+ /* lets make the action sliders */
+
+ /* reset the damn myortho2 or the sliders won't draw/redraw
+ * correctly *grumble*
+ */
+ mywinset(curarea->win);
+ myortho2(-0.375f, curarea->winx-0.375f, G.v2d->cur.ymin, G.v2d->cur.ymax);
+
+ sprintf(str, "actionbuttonswin %d", curarea->win);
+ block= uiNewBlock (&curarea->uiblocks, str, UI_EMBOSS);
+
+ x = (float)ACHANNEL_NAMEWIDTH + 1;
+ y = 0.0f;
+
+ uiBlockSetEmboss(block, UI_EMBOSSN);
+
+ if (G.saction->flag & SACTION_SLIDERS) {
+ /* sliders are open so draw them */
+
+ /* get editor data */
+ data= get_action_context(&datatype);
+ if (data == NULL) return;
+
+ /* build list of channels to draw */
+ filter= (ACTFILTER_FORDRAWING|ACTFILTER_VISIBLE|ACTFILTER_CHANNELS);
+ actdata_filter(&act_data, filter, data, datatype);
+
+ /* draw backdrop first */
+ BIF_ThemeColor(TH_FACE); // change this color... it's ugly
+ glRects(ACHANNEL_NAMEWIDTH, (short)G.v2d->cur.ymin, ACHANNEL_NAMEWIDTH+SLIDERWIDTH, (short)G.v2d->cur.ymax);
+
+ uiBlockSetEmboss(block, UI_EMBOSS);
+ for (ale= act_data.first; ale; ale= ale->next) {
+ const float yminc= y-CHANNELHEIGHT/2;
+ const float ymaxc= y+CHANNELHEIGHT/2;
+
+ /* check if visible */
+ if ( IN_RANGE(yminc, G.v2d->cur.ymin, G.v2d->cur.ymax) ||
+ IN_RANGE(ymaxc, G.v2d->cur.ymin, G.v2d->cur.ymax) )
+ {
+ /* determine what needs to be drawn */
+ switch (ale->type) {
+ case ACTTYPE_CONCHAN: /* constraint channel */
+ {
+ bActionChannel *achan = (bActionChannel *)ale->owner;
+ IpoCurve *icu = (IpoCurve *)ale->key_data;
+
+ /* only show if owner is selected */
+ if ((ale->ownertype == ACTTYPE_OBJECT) || SEL_ACHAN(achan)) {
+ make_icu_slider(block, icu,
+ (int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-2,
+ "Slider to control current value of Constraint Influence");
+ }
+ }
+ break;
+ case ACTTYPE_ICU: /* ipo-curve channel */
+ {
+ bActionChannel *achan = (bActionChannel *)ale->owner;
+ IpoCurve *icu = (IpoCurve *)ale->key_data;
+
+ /* only show if owner is selected */
+ if ((ale->ownertype == ACTTYPE_OBJECT) || SEL_ACHAN(achan)) {
+ make_icu_slider(block, icu,
+ (int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-2,
+ "Slider to control current value of IPO-Curve");
+ }
+ }
+ break;
+ case ACTTYPE_SHAPEKEY: /* shapekey channel */
+ {
+ Object *ob= (Object *)ale->id;
+ IpoCurve *icu= (IpoCurve *)ale->key_data;
+
+ // TODO: only show if object is active
+ if (icu) {
+ make_icu_slider(block, icu,
+ (int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-2,
+ "Slider to control ShapeKey");
+ }
+ else if (ob && ale->index) {
+ make_rvk_slider(block, ob, ale->index,
+ (int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-1, "Slider to control Shape Keys");
+ }
+ }
+ break;
+ }
+ }
+
+ /* adjust y-position for next one */
+ y-=CHANNELHEIGHT+CHANNELSKIP;
+ }
+
+ /* free tempolary channels */
+ BLI_freelistN(&act_data);
+ }
+ uiDrawBlock(C, block);
+}
+
+#endif // XXX all of this slider stuff will need a rethink
+
/* ************************************************************************* */
/* Channel List */
@@ -218,6 +518,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
adt= ANIM_nla_mapping_get(ac, NULL);
/* start and end of action itself */
+ // TODO: this has not had scaling applied
calc_action_range(ac->data, &act_start, &act_end, 0);
}
@@ -249,14 +550,43 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
if ( IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) )
{
- bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
int sel=0;
/* determine if any need to draw channel */
if (ale->datatype != ALE_NONE) {
/* determine if channel is selected */
- if (acf->has_setting(ac, ale, ACHANNEL_SETTING_SELECT))
- sel= ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_SELECT);
+ switch (ale->type) {
+ case ANIMTYPE_SCENE:
+ {
+ Scene *sce= (Scene *)ale->data;
+ sel = SEL_SCEC(sce);
+ }
+ break;
+ case ANIMTYPE_OBJECT:
+ {
+ Base *base= (Base *)ale->data;
+ sel = SEL_OBJC(base);
+ }
+ break;
+ case ANIMTYPE_GROUP:
+ {
+ bActionGroup *agrp = (bActionGroup *)ale->data;
+ sel = SEL_AGRP(agrp);
+ }
+ break;
+ case ANIMTYPE_FCURVE:
+ {
+ FCurve *fcu = (FCurve *)ale->data;
+ sel = SEL_FCU(fcu);
+ }
+ break;
+ case ANIMTYPE_GPLAYER:
+ {
+ bGPDlayer *gpl = (bGPDlayer *)ale->data;
+ sel = SEL_GPL(gpl);
+ }
+ break;
+ }
if (ELEM(ac->datatype, ANIMCONT_ACTION, ANIMCONT_DOPESHEET)) {
switch (ale->type) {
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index 89633d0cdfe..d4709e94e5e 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -397,7 +397,7 @@ static void insert_action_keys(bAnimContext *ac, short mode)
/* init keyframing flag */
if (IS_AUTOKEY_FLAG(AUTOMATKEY)) flag |= INSERTKEY_MATRIX;
if (IS_AUTOKEY_FLAG(INSERTNEEDED)) flag |= INSERTKEY_NEEDED;
- if (IS_AUTOKEY_MODE(scene, EDITKEYS)) flag |= INSERTKEY_REPLACE;
+ // if (IS_AUTOKEY_MODE(EDITKEYS)) flag |= INSERTKEY_REPLACE;
/* insert keyframes */
for (ale= anim_data.first; ale; ale= ale->next) {
@@ -679,6 +679,11 @@ void ACT_OT_clean (wmOperatorType *ot)
/* ******************** Sample Keyframes Operator *********************** */
+/* little cache for values... */
+typedef struct tempFrameValCache {
+ float frame, val;
+} tempFrameValCache;
+
/* Evaluates the curves between each selected keyframe on each frame, and keys the value */
static void sample_action_keys (bAnimContext *ac)
{
@@ -691,8 +696,64 @@ static void sample_action_keys (bAnimContext *ac)
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and add keys between selected keyframes on every frame */
- for (ale= anim_data.first; ale; ale= ale->next)
- sample_fcurve((FCurve *)ale->key_data);
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ FCurve *fcu= (FCurve *)ale->key_data;
+ BezTriple *bezt, *start=NULL, *end=NULL;
+ tempFrameValCache *value_cache, *fp;
+ int sfra, range;
+ int i, n;
+
+ /* find selected keyframes... once pair has been found, add keyframes */
+ for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) {
+ /* check if selected, and which end this is */
+ if (BEZSELECTED(bezt)) {
+ if (start) {
+ /* set end */
+ end= bezt;
+
+ /* cache values then add keyframes using these values, as adding
+ * keyframes while sampling will affect the outcome...
+ */
+ range= (int)( ceil(end->vec[1][0] - start->vec[1][0]) );
+ sfra= (int)( floor(start->vec[1][0]) );
+
+ if (range) {
+ value_cache= MEM_callocN(sizeof(tempFrameValCache)*range, "IcuFrameValCache");
+
+ /* sample values */
+ for (n=0, fp=value_cache; n<range && fp; n++, fp++) {
+ fp->frame= (float)(sfra + n);
+ fp->val= evaluate_fcurve(fcu, fp->frame);
+ }
+
+ /* add keyframes with these */
+ for (n=0, fp=value_cache; n<range && fp; n++, fp++) {
+ insert_vert_fcurve(fcu, fp->frame, fp->val, 1);
+ }
+
+ /* free temp cache */
+ MEM_freeN(value_cache);
+
+ /* as we added keyframes, we need to compensate so that bezt is at the right place */
+ bezt = fcu->bezt + i + range - 1;
+ i += (range - 1);
+ }
+
+ /* bezt was selected, so it now marks the start of a whole new chain to search */
+ start= bezt;
+ end= NULL;
+ }
+ else {
+ /* just set start keyframe */
+ start= bezt;
+ end= NULL;
+ }
+ }
+ }
+
+ /* recalculate channel's handles? */
+ calchandles_fcurve(fcu);
+ }
/* admin and redraws */
BLI_freelistN(&anim_data);
@@ -977,77 +1038,6 @@ void ACT_OT_handle_type (wmOperatorType *ot)
RNA_def_enum(ot->srna, "type", beztriple_handle_type_items, 0, "Type", "");
}
-/* ******************** Set Keyframe-Type Operator *********************** */
-
-/* this function is responsible for setting interpolation mode for keyframes */
-static void setkeytype_action_keys(bAnimContext *ac, short mode)
-{
- ListBase anim_data = {NULL, NULL};
- bAnimListElem *ale;
- int filter;
- BeztEditFunc set_cb= ANIM_editkeyframes_keytype(mode);
-
- /* filter data */
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVESONLY);
- ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
-
- /* loop through setting BezTriple interpolation
- * Note: we do not supply BeztEditData to the looper yet. Currently that's not necessary here...
- */
- for (ale= anim_data.first; ale; ale= ale->next)
- ANIM_fcurve_keys_bezier_loop(NULL, ale->key_data, NULL, set_cb, NULL);
-
- /* cleanup */
- BLI_freelistN(&anim_data);
-}
-
-/* ------------------- */
-
-static int actkeys_keytype_exec(bContext *C, wmOperator *op)
-{
- bAnimContext ac;
- short mode;
-
- /* get editor data */
- if (ANIM_animdata_get_context(C, &ac) == 0)
- return OPERATOR_CANCELLED;
- if (ac.datatype == ANIMCONT_GPENCIL)
- return OPERATOR_PASS_THROUGH;
-
- /* get handle setting mode */
- mode= RNA_enum_get(op->ptr, "type");
-
- /* set handle type */
- setkeytype_action_keys(&ac, mode);
-
- /* validate keyframes after editing */
- ANIM_editkeyframes_refresh(&ac);
-
- /* set notifier that keyframe properties have changed */
- WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
-
- return OPERATOR_FINISHED;
-}
-
-void ACT_OT_keyframe_type (wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Set Keyframe Type";
- ot->idname= "ACT_OT_keyframe_type";
- ot->description= "Set type of keyframe for the seleced keyframes.";
-
- /* api callbacks */
- ot->invoke= WM_menu_invoke;
- ot->exec= actkeys_keytype_exec;
- ot->poll= ED_operator_action_active;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* id-props */
- RNA_def_enum(ot->srna, "type", beztriple_keyframe_type_items, 0, "Type", "");
-}
-
/* ************************************************************************** */
/* TRANSFORM STUFF */
diff --git a/source/blender/editors/space_action/action_header.c b/source/blender/editors/space_action/action_header.c
index 8674f481a18..e4750bd0a37 100644
--- a/source/blender/editors/space_action/action_header.c
+++ b/source/blender/editors/space_action/action_header.c
@@ -43,7 +43,6 @@
#include "BLI_blenlib.h"
#include "BKE_animsys.h"
-#include "BKE_action.h"
#include "BKE_context.h"
#include "BKE_screen.h"
@@ -89,9 +88,9 @@ static void act_viewmenu(bContext *C, uiLayout *layout, void *arg_unused)
//uiItemS(layout);
- uiItemR(layout, NULL, 0, &spaceptr, "show_cframe_indicator", 0);
- uiItemR(layout, NULL, 0, &spaceptr, "show_sliders", 0);
- uiItemR(layout, NULL, 0, &spaceptr, "automerge_keyframes", 0);
+ uiItemR(layout, NULL, 0, &spaceptr, "show_cframe_indicator", 0, 0, 0);
+ uiItemR(layout, NULL, 0, &spaceptr, "show_sliders", 0, 0, 0);
+ uiItemR(layout, NULL, 0, &spaceptr, "automerge_keyframes", 0, 0, 0);
if (sact->flag & SACTION_DRAWTIME)
uiItemO(layout, "Show Frames", 0, "ANIM_OT_time_toggle");
@@ -168,7 +167,7 @@ static void act_edit_transformmenu(bContext *C, uiLayout *layout, void *arg_unus
static void act_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "ACT_OT_snap", "type", ACTKEYS_SNAP_CFRA);
uiItemEnumO(layout, NULL, 0, "ACT_OT_snap", "type", ACTKEYS_SNAP_NEAREST_FRAME);
uiItemEnumO(layout, NULL, 0, "ACT_OT_snap", "type", ACTKEYS_SNAP_NEAREST_SECOND);
@@ -177,23 +176,16 @@ static void act_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
static void act_edit_mirrormenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "ACT_OT_mirror", "type", ACTKEYS_MIRROR_CFRA);
uiItemEnumO(layout, NULL, 0, "ACT_OT_mirror", "type", ACTKEYS_MIRROR_YAXIS);
uiItemEnumO(layout, NULL, 0, "ACT_OT_mirror", "type", ACTKEYS_MIRROR_XAXIS);
uiItemEnumO(layout, NULL, 0, "ACT_OT_mirror", "type", ACTKEYS_MIRROR_MARKER);
}
-static void act_edit_keytypesmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
- uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
- uiItemEnumO(layout, NULL, 0, "ACT_OT_keyframe_type", "type", BEZT_KEYTYPE_KEYFRAME);
- uiItemEnumO(layout, NULL, 0, "ACT_OT_keyframe_type", "type", BEZT_KEYTYPE_BREAKDOWN);
-}
-
static void act_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_FREE);
uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_AUTO);
uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_VECT);
@@ -203,7 +195,7 @@ static void act_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unused
static void act_edit_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type", "type", BEZT_IPO_CONST);
uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type", "type", BEZT_IPO_LIN);
uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type", "type", BEZT_IPO_BEZ);
@@ -211,7 +203,7 @@ static void act_edit_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
static void act_edit_expomenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "ACT_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_CONSTANT);
uiItemEnumO(layout, NULL, 0, "ACT_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_LINEAR);
}
@@ -233,7 +225,6 @@ static void act_editmenu(bContext *C, uiLayout *layout, void *arg_unused)
uiItemS(layout);
- uiItemMenuF(layout, "Keyframe Type", 0, act_edit_keytypesmenu, NULL);
uiItemMenuF(layout, "Handle Type", 0, act_edit_handlesmenu, NULL);
uiItemMenuF(layout, "Interpolation Mode", 0, act_edit_ipomenu, NULL);
uiItemMenuF(layout, "Extrapolation Mode", 0, act_edit_expomenu, NULL);
@@ -281,7 +272,6 @@ static void saction_idpoin_handle(bContext *C, ID *id, int event)
/* set action */
printf("\tset action \n");
adt->action= saction->action;
- adt->action->id.us++;
}
ED_area_tag_redraw(CTX_wm_area(C));
@@ -292,14 +282,7 @@ static void saction_idpoin_handle(bContext *C, ID *id, int event)
break;
case UI_ID_ADD_NEW:
printf("actedit addnew \n");
- if (saction->pin == 0) {
- AnimData *adt= BKE_id_add_animdata(&obact->id); /* this only adds if non-existant */
-
- /* set new action */
- // XXX need to restore behaviour to copy old actions...
- printf("\tset new action \n");
- adt->action= saction->action= add_empty_action("Action");
- }
+ /* XXX not implemented */
break;
case UI_ID_OPEN:
printf("actedit open \n");
@@ -421,17 +404,17 @@ void action_header_buttons(const bContext *C, ARegion *ar)
if (saction->flag & SACTION_DRAWTIME) {
uiDefButC(block, MENU, B_REDR,
"Auto-Snap Keyframes %t|No Snap %x0|Second Step %x1|Nearest Second %x2|Nearest Marker %x3",
- xco,yco,90,YIC, &(saction->autosnap), 0, 1, 0, 0,
+ xco,yco,70,YIC, &(saction->autosnap), 0, 1, 0, 0,
"Auto-snapping mode for keyframes when transforming");
}
else {
uiDefButC(block, MENU, B_REDR,
"Auto-Snap Keyframes %t|No Snap %x0|Frame Step %x1|Nearest Frame %x2|Nearest Marker %x3",
- xco,yco,90,YIC, &(saction->autosnap), 0, 1, 0, 0,
+ xco,yco,70,YIC, &(saction->autosnap), 0, 1, 0, 0,
"Auto-snapping mode for keyframes when transforming");
}
- xco += (90 + 8);
+ xco += (70 + 8);
}
/* COPY PASTE */
diff --git a/source/blender/editors/space_action/action_intern.h b/source/blender/editors/space_action/action_intern.h
index e5f0ab8994e..1aeeeff0c80 100644
--- a/source/blender/editors/space_action/action_intern.h
+++ b/source/blender/editors/space_action/action_intern.h
@@ -89,7 +89,6 @@ void ACT_OT_delete(struct wmOperatorType *ot);
void ACT_OT_clean(struct wmOperatorType *ot);
void ACT_OT_sample(struct wmOperatorType *ot);
-void ACT_OT_keyframe_type(struct wmOperatorType *ot);
void ACT_OT_handle_type(struct wmOperatorType *ot);
void ACT_OT_interpolation_type(struct wmOperatorType *ot);
void ACT_OT_extrapolation_type(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c
index 42b033040b1..f18b6197eb3 100644
--- a/source/blender/editors/space_action/action_ops.c
+++ b/source/blender/editors/space_action/action_ops.c
@@ -75,7 +75,6 @@ void action_operatortypes(void)
WM_operatortype_append(ACT_OT_handle_type);
WM_operatortype_append(ACT_OT_interpolation_type);
WM_operatortype_append(ACT_OT_extrapolation_type);
- WM_operatortype_append(ACT_OT_keyframe_type);
WM_operatortype_append(ACT_OT_sample);
WM_operatortype_append(ACT_OT_clean);
WM_operatortype_append(ACT_OT_delete);
@@ -134,7 +133,6 @@ static void action_keymap_keyframes (wmWindowManager *wm, ListBase *keymap)
WM_keymap_add_item(keymap, "ACT_OT_handle_type", HKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "ACT_OT_interpolation_type", TKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "ACT_OT_extrapolation_type", EKEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "ACT_OT_keyframe_type", RKEY, KM_PRESS, 0, 0);
/* destructive */
WM_keymap_add_item(keymap, "ACT_OT_clean", OKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index b7a3df563ea..275ac4ea4c1 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -243,7 +243,7 @@ static void action_channel_area_draw(const bContext *C, ARegion *ar)
/* data */
if (ANIM_animdata_get_context(C, &ac)) {
- draw_channel_names((bContext *)C, &ac, saction, ar);
+ draw_channel_names(C, &ac, saction, ar);
}
/* reset view matrix */
@@ -294,7 +294,6 @@ static void action_channel_area_listener(ARegion *ar, wmNotifier *wmn)
case NC_SCENE:
switch(wmn->data) {
case ND_OB_ACTIVE:
- case ND_FRAME:
ED_region_tag_redraw(ar);
break;
}
@@ -372,10 +371,6 @@ static void action_listener(ScrArea *sa, wmNotifier *wmn)
}*/
ED_area_tag_refresh(sa);
break;
- case NC_SPACE:
- if(wmn->data == ND_SPACE_DOPESHEET)
- ED_area_tag_redraw(sa);
- break;
}
}
diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c
index edd5da44526..041e6a09323 100644
--- a/source/blender/editors/space_api/spacetypes.c
+++ b/source/blender/editors/space_api/spacetypes.c
@@ -42,7 +42,6 @@
#include "ED_anim_api.h"
#include "ED_armature.h"
#include "ED_curve.h"
-#include "ED_gpencil.h"
#include "ED_markers.h"
#include "ED_mesh.h"
#include "ED_object.h"
@@ -51,7 +50,6 @@
#include "ED_screen.h"
#include "ED_sculpt.h"
#include "ED_space_api.h"
-#include "ED_sound.h"
#include "ED_uvedit.h"
#include "ED_mball.h"
@@ -85,8 +83,7 @@ void ED_spacetypes_init(void)
/* register operator types for screen and all spaces */
ED_operatortypes_screen();
ED_operatortypes_anim();
- ED_operatortypes_animchannels();
- ED_operatortypes_gpencil();
+ ED_operatortypes_animchannels(); // XXX have this as part of anim() ones instead?
ED_operatortypes_object();
ED_operatortypes_mesh();
ED_operatortypes_sculpt();
@@ -100,7 +97,6 @@ void ED_spacetypes_init(void)
ED_operatortypes_fluid();
ED_operatortypes_metaball();
ED_operatortypes_boids();
- ED_operatortypes_sound();
ui_view2d_operatortypes();
@@ -121,7 +117,6 @@ void ED_spacetypes_keymap(wmWindowManager *wm)
ED_keymap_screen(wm);
ED_keymap_anim(wm);
ED_keymap_animchannels(wm);
- ED_keymap_gpencil(wm);
ED_keymap_object(wm);
ED_keymap_mesh(wm);
ED_keymap_uvedit(wm);
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 635abd429f6..530500cfafa 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -200,7 +200,7 @@ static int buttons_context_path_modifier(ButsContextPath *path)
if(buttons_context_path_object(path)) {
ob= path->ptr[path->len-1].data;
- if(ob && ELEM5(ob->type, OB_MESH, OB_CURVE, OB_FONT, OB_SURF, OB_LATTICE))
+ if(ob && ELEM4(ob->type, OB_MESH, OB_CURVE, OB_FONT, OB_SURF))
return 1;
}
@@ -553,7 +553,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
"world", "object", "mesh", "armature", "lattice", "curve",
"meta_ball", "lamp", "camera", "material", "material_slot",
"texture", "texture_slot", "bone", "edit_bone", "particle_system",
- "cloth", "soft_body", "fluid", "smoke", "smoke_hr", "collision", "brush", NULL};
+ "cloth", "soft_body", "fluid", "smoke", "collision", "brush", NULL};
CTX_data_dir_set(result, dir);
return 1;
diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h
index 0a5a5714a06..8ed17ab1fa8 100644
--- a/source/blender/editors/space_buttons/buttons_intern.h
+++ b/source/blender/editors/space_buttons/buttons_intern.h
@@ -85,8 +85,6 @@ void PARTICLE_OT_new_target(struct wmOperatorType *ot);
void PARTICLE_OT_remove_target(struct wmOperatorType *ot);
void PARTICLE_OT_target_move_up(struct wmOperatorType *ot);
void PARTICLE_OT_target_move_down(struct wmOperatorType *ot);
-void PARTICLE_OT_connect_hair(struct wmOperatorType *ot);
-void PARTICLE_OT_disconnect_hair(struct wmOperatorType *ot);
void SCENE_OT_render_layer_add(struct wmOperatorType *ot);
void SCENE_OT_render_layer_remove(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index 0df6f6250ff..057f35a2487 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -35,8 +35,6 @@
#include "DNA_group_types.h"
#include "DNA_object_types.h"
#include "DNA_material_types.h"
-#include "DNA_meshdata_types.h"
-#include "DNA_modifier_types.h"
#include "DNA_node_types.h"
#include "DNA_texture_types.h"
#include "DNA_scene_types.h"
@@ -44,11 +42,8 @@
#include "DNA_space_types.h"
#include "DNA_world_types.h"
-#include "BKE_bvhutils.h"
-#include "BKE_cdderivedmesh.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
-#include "BKE_DerivedMesh.h"
#include "BKE_group.h"
#include "BKE_font.h"
#include "BKE_library.h"
@@ -56,13 +51,11 @@
#include "BKE_material.h"
#include "BKE_node.h"
#include "BKE_particle.h"
-#include "BKE_pointcache.h"
#include "BKE_scene.h"
#include "BKE_texture.h"
#include "BKE_utildefines.h"
#include "BKE_world.h"
-#include "BLI_arithb.h"
#include "BLI_editVert.h"
#include "BLI_listbase.h"
@@ -74,7 +67,6 @@
#include "ED_curve.h"
#include "ED_mesh.h"
-#include "ED_particle.h"
#include "RNA_access.h"
#include "RNA_define.h"
@@ -85,6 +77,133 @@
#include "buttons_intern.h" // own include
+/********************** group operators *********************/
+
+static int group_add_exec(bContext *C, wmOperator *op)
+{
+ Main *bmain= CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ Base *base;
+ Group *group;
+ int value= RNA_enum_get(op->ptr, "group");
+
+ if(!ob)
+ return OPERATOR_CANCELLED;
+
+ base= object_in_scene(ob, scene);
+ if(!base)
+ return OPERATOR_CANCELLED;
+
+ if(value == -1)
+ group= add_group( "Group" );
+ else
+ group= BLI_findlink(&bmain->group, value);
+
+ if(group) {
+ add_to_group(group, ob);
+ ob->flag |= OB_FROMGROUP;
+ base->flag |= OB_FROMGROUP;
+ }
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+static EnumPropertyItem group_items[]= {
+ {-1, "ADD_NEW", 0, "Add New Group", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+static EnumPropertyItem *group_itemf(bContext *C, PointerRNA *ptr, int *free)
+{
+ EnumPropertyItem tmp = {0, "", 0, "", ""};
+ EnumPropertyItem *item= NULL;
+ Main *bmain;
+ Group *group;
+ int a, totitem= 0;
+
+ if(!C) /* needed for docs */
+ return group_items;
+
+ RNA_enum_items_add_value(&item, &totitem, group_items, -1);
+
+ bmain= CTX_data_main(C);
+ if(bmain->group.first)
+ RNA_enum_item_add_separator(&item, &totitem);
+
+ for(a=0, group=bmain->group.first; group; group=group->id.next, a++) {
+ tmp.value= a;
+ tmp.identifier= group->id.name+2;
+ tmp.name= group->id.name+2;
+ RNA_enum_item_add(&item, &totitem, &tmp);
+ }
+
+ RNA_enum_item_end(&item, &totitem);
+
+ *free= 1;
+
+ return item;
+}
+
+void OBJECT_OT_group_add(wmOperatorType *ot)
+{
+ PropertyRNA *prop;
+
+ /* identifiers */
+ ot->name= "Add Group";
+ ot->idname= "OBJECT_OT_group_add";
+
+ /* api callbacks */
+ ot->exec= group_add_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* properties */
+ prop= RNA_def_enum(ot->srna, "group", group_items, -1, "Group", "Group to add object to.");
+ RNA_def_enum_funcs(prop, group_itemf);
+}
+
+static int group_remove_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ Group *group= CTX_data_pointer_get_type(C, "group", &RNA_Group).data;
+ Base *base;
+
+ if(!ob || !group)
+ return OPERATOR_CANCELLED;
+
+ base= object_in_scene(ob, scene);
+ if(!base)
+ return OPERATOR_CANCELLED;
+
+ rem_from_group(group, ob);
+
+ if(find_group(ob, NULL) == NULL) {
+ ob->flag &= ~OB_FROMGROUP;
+ base->flag &= ~OB_FROMGROUP;
+ }
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_group_remove(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Remove Group";
+ ot->idname= "OBJECT_OT_group_remove";
+
+ /* api callbacks */
+ ot->exec= group_remove_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
/********************** material slot operators *********************/
static int material_slot_add_exec(bContext *C, wmOperator *op)
@@ -141,6 +260,7 @@ void OBJECT_OT_material_slot_remove(wmOperatorType *ot)
static int material_slot_assign_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
if(!ob)
@@ -178,8 +298,8 @@ static int material_slot_assign_exec(bContext *C, wmOperator *op)
}
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
return OPERATOR_FINISHED;
}
@@ -257,7 +377,7 @@ static int material_slot_de_select(bContext *C, int select)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -493,12 +613,6 @@ void OBJECT_OT_particle_system_remove(wmOperatorType *ot)
/********************** new particle settings operator *********************/
-static int psys_poll(bContext *C)
-{
- PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- return (ptr.data != NULL);
-}
-
static int new_particle_settings_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
@@ -528,7 +642,7 @@ static int new_particle_settings_exec(bContext *C, wmOperator *op)
psys_check_boid_data(psys);
DAG_scene_sort(scene);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
@@ -543,7 +657,6 @@ void PARTICLE_OT_new(wmOperatorType *ot)
/* api callbacks */
ot->exec= new_particle_settings_exec;
- ot->poll= psys_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -575,7 +688,7 @@ static int new_particle_target_exec(bContext *C, wmOperator *op)
BLI_addtail(&psys->targets, pt);
DAG_scene_sort(scene);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
@@ -622,7 +735,7 @@ static int remove_particle_target_exec(bContext *C, wmOperator *op)
pt->flag |= PTARGET_CURRENT;
DAG_scene_sort(scene);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
@@ -646,6 +759,7 @@ void PARTICLE_OT_remove_target(wmOperatorType *ot)
static int target_move_up_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
ParticleSystem *psys= ptr.data;
Object *ob = ptr.id.data;
@@ -660,7 +774,7 @@ static int target_move_up_exec(bContext *C, wmOperator *op)
BLI_remlink(&psys->targets, pt);
BLI_insertlink(&psys->targets, pt->prev->prev, pt);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
break;
}
@@ -685,6 +799,7 @@ void PARTICLE_OT_target_move_up(wmOperatorType *ot)
static int target_move_down_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
ParticleSystem *psys= ptr.data;
Object *ob = ptr.id.data;
@@ -698,7 +813,7 @@ static int target_move_down_exec(bContext *C, wmOperator *op)
BLI_remlink(&psys->targets, pt);
BLI_insertlink(&psys->targets, pt->next, pt);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
break;
}
@@ -719,217 +834,6 @@ void PARTICLE_OT_target_move_down(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-/************************ connect/disconnect hair operators *********************/
-
-static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
-{
- ParticleSystemModifierData *psmd = psys_get_modifier(ob,psys);
- ParticleData *pa = psys->particles;
- PTCacheEdit *edit = psys->edit;
- PTCacheEditPoint *point = edit ? edit->points : NULL;
- PTCacheEditKey *ekey = NULL;
- HairKey *key;
- int i, k;
- float hairmat[4][4];
-
- if(!ob || !psys || psys->flag & PSYS_GLOBAL_HAIR)
- return;
-
- if(!psys->part || psys->part->type != PART_HAIR)
- return;
-
- for(i=0; i<psys->totpart; i++,pa++) {
- if(point) {
- ekey = point->keys;
- point++;
- }
-
- psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
-
- for(k=0,key=pa->hair; k<pa->totkey; k++,key++) {
- Mat4MulVecfl(hairmat,key->co);
-
- if(ekey) {
- ekey->flag &= ~PEK_USE_WCO;
- ekey++;
- }
- }
- }
-
- psys_free_path_cache(psys, psys->edit);
-
- psys->flag |= PSYS_GLOBAL_HAIR;
-
- PE_update_object(scene, ob, 0);
-}
-
-static int disconnect_hair_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- ParticleSystem *psys= NULL;
- int all = RNA_boolean_get(op->ptr, "all");
-
- if(!ob)
- return OPERATOR_CANCELLED;
-
- if(all) {
- for(psys=ob->particlesystem.first; psys; psys=psys->next) {
- disconnect_hair(scene, ob, psys);
- }
- }
- else {
- psys = ptr.data;
- disconnect_hair(scene, ob, psys);
- }
-
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
-
- return OPERATOR_FINISHED;
-}
-
-void PARTICLE_OT_disconnect_hair(wmOperatorType *ot)
-{
- ot->name= "Disconnect Hair";
- ot->description= "Disconnect hair from the emitter mesh.";
- ot->idname= "PARTICLE_OT_disconnect_hair";
-
- ot->exec= disconnect_hair_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_boolean(ot->srna, "all", 0, "All hair", "Disconnect all hair systems from the emitter mesh");
-}
-
-static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
-{
- ParticleSystemModifierData *psmd = psys_get_modifier(ob,psys);
- ParticleData *pa = psys->particles;
- PTCacheEdit *edit = psys->edit;
- PTCacheEditPoint *point = edit ? edit->points : NULL;
- PTCacheEditKey *ekey;
- HairKey *key;
- BVHTreeFromMesh bvhtree;
- BVHTreeNearest nearest;
- MFace *mface;
- DerivedMesh *dm = CDDM_copy(psmd->dm);
- int numverts = dm->getNumVerts (dm);
- int i, k;
- float hairmat[4][4], imat[4][4];
- float v[4][3], vec[3];
-
- if(!psys || !psys->part || psys->part->type != PART_HAIR)
- return;
-
- memset( &bvhtree, 0, sizeof(bvhtree) );
-
- /* convert to global coordinates */
- for (i=0; i<numverts; i++)
- Mat4MulVecfl (ob->obmat, CDDM_get_vert(dm, i)->co);
-
- bvhtree_from_mesh_faces(&bvhtree, dm, 0.0, 2, 6);
-
- for(i=0; i<psys->totpart; i++,pa++) {
- key = pa->hair;
-
- nearest.index = -1;
- nearest.dist = FLT_MAX;
-
- BLI_bvhtree_find_nearest(bvhtree.tree, key->co, &nearest, bvhtree.nearest_callback, &bvhtree);
-
- if(nearest.index == -1) {
- printf("No nearest point found for hair root!");
- continue;
- }
-
- mface = CDDM_get_face(dm,nearest.index);
-
- VecCopyf(v[0], CDDM_get_vert(dm,mface->v1)->co);
- VecCopyf(v[1], CDDM_get_vert(dm,mface->v2)->co);
- VecCopyf(v[2], CDDM_get_vert(dm,mface->v3)->co);
- if(mface->v4) {
- VecCopyf(v[3], CDDM_get_vert(dm,mface->v4)->co);
- MeanValueWeights(v, 4, nearest.co, pa->fuv);
- }
- else
- MeanValueWeights(v, 3, nearest.co, pa->fuv);
-
- pa->num = nearest.index;
- pa->num_dmcache = psys_particle_dm_face_lookup(ob,psmd->dm,pa->num,pa->fuv,NULL);
-
- psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, hairmat);
- Mat4Invert(imat,hairmat);
-
- VECSUB(vec, nearest.co, key->co);
-
- if(point) {
- ekey = point->keys;
- point++;
- }
-
- for(k=0,key=pa->hair; k<pa->totkey; k++,key++) {
- VECADD(key->co, key->co, vec);
- Mat4MulVecfl(imat,key->co);
-
- if(ekey) {
- ekey->flag |= PEK_USE_WCO;
- ekey++;
- }
- }
- }
-
- free_bvhtree_from_mesh(&bvhtree);
- dm->release(dm);
-
- psys_free_path_cache(psys, psys->edit);
-
- psys->flag &= ~PSYS_GLOBAL_HAIR;
-
- PE_update_object(scene, ob, 0);
-}
-
-static int connect_hair_exec(bContext *C, wmOperator *op)
-{
- Scene *scene= CTX_data_scene(C);
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
- ParticleSystem *psys= NULL;
- int all = RNA_boolean_get(op->ptr, "all");
-
- if(!ob)
- return OPERATOR_CANCELLED;
-
- if(all) {
- for(psys=ob->particlesystem.first; psys; psys=psys->next) {
- connect_hair(scene, ob, psys);
- }
- }
- else {
- psys = ptr.data;
- connect_hair(scene, ob, psys);
- }
-
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
-
- return OPERATOR_FINISHED;
-}
-
-void PARTICLE_OT_connect_hair(wmOperatorType *ot)
-{
- ot->name= "Connect Hair";
- ot->description= "Connect hair to the emitter mesh.";
- ot->idname= "PARTICLE_OT_connect_hair";
-
- ot->exec= connect_hair_exec;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- RNA_def_boolean(ot->srna, "all", 0, "All hair", "Connect all hair systems to the emitter mesh");
-}
-
/********************** render layer operators *********************/
static int render_layer_add_exec(bContext *C, wmOperator *op)
@@ -1044,9 +948,6 @@ static int file_browse_exec(bContext *C, wmOperator *op)
FileBrowseOp *fbo= op->customdata;
char *str;
- if (RNA_property_is_set(op->ptr, "filename")==0 || fbo==NULL)
- return OPERATOR_CANCELLED;
-
str= RNA_string_get_alloc(op->ptr, "filename", 0, 0);
RNA_property_string_set(&fbo->ptr, fbo->prop, str);
RNA_property_update(C, &fbo->ptr, fbo->prop);
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 385f55b71c1..71f8642afd4 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -204,8 +204,6 @@ void buttons_operatortypes(void)
WM_operatortype_append(PARTICLE_OT_remove_target);
WM_operatortype_append(PARTICLE_OT_target_move_up);
WM_operatortype_append(PARTICLE_OT_target_move_down);
- WM_operatortype_append(PARTICLE_OT_connect_hair);
- WM_operatortype_append(PARTICLE_OT_disconnect_hair);
WM_operatortype_append(SCENE_OT_render_layer_add);
WM_operatortype_append(SCENE_OT_render_layer_remove);
@@ -337,6 +335,7 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
case ND_TRANSFORM:
case ND_BONE_ACTIVE:
case ND_BONE_SELECT:
+ case ND_GEOM_SELECT:
case ND_CONSTRAINT:
ED_area_tag_redraw(sa);
break;
@@ -347,13 +346,6 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
break;
}
break;
- case NC_GEOM:
- switch(wmn->data) {
- case ND_SELECT:
- ED_area_tag_redraw(sa);
- break;
- }
- break;
case NC_MATERIAL:
ED_area_tag_redraw(sa);
@@ -366,15 +358,14 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
}
break;
case NC_WORLD:
+ ED_area_tag_redraw(sa);
+ sbuts->preview= 1;
case NC_LAMP:
+ ED_area_tag_redraw(sa);
+ sbuts->preview= 1;
case NC_TEXTURE:
ED_area_tag_redraw(sa);
sbuts->preview= 1;
- break;
- case NC_SPACE:
- if(wmn->data == ND_SPACE_PROPERTIES)
- ED_area_tag_redraw(sa);
- break;
}
if(wmn->data == ND_KEYS)
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index 2120b97becf..fa9055f2d8d 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -190,7 +190,7 @@ ConsoleLine *console_history_verify(const bContext *C)
static void console_line_verify_length(ConsoleLine *ci, int len)
{
/* resize the buffer if needed */
- if(len >= ci->len_alloc) {
+ if(len > ci->len_alloc) {
int new_len= len * 2; /* new length */
char *new_line= MEM_callocN(new_len, "console line");
memcpy(new_line, ci->line, ci->len);
@@ -234,11 +234,6 @@ static int console_edit_poll(bContext *C)
return 1;
}
-static int console_poll(bContext *C)
-{
- return (CTX_wm_space_console(C) != NULL);
-}
-
/* static funcs for text editing */
@@ -285,7 +280,6 @@ void CONSOLE_OT_move(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Move Cursor";
- ot->description= "Move cursor position.";
ot->idname= "CONSOLE_OT_move";
/* api callbacks */
@@ -330,7 +324,6 @@ void CONSOLE_OT_insert(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Insert";
- ot->description= "Insert text at cursor position.";
ot->idname= "CONSOLE_OT_insert";
/* api callbacks */
@@ -398,7 +391,6 @@ void CONSOLE_OT_delete(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Delete";
- ot->description= "Delete text by cursor position.";
ot->idname= "CONSOLE_OT_delete";
/* api callbacks */
@@ -442,7 +434,6 @@ void CONSOLE_OT_clear(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Clear";
- ot->description= "Clear text by type.";
ot->idname= "CONSOLE_OT_clear";
/* api callbacks */
@@ -487,7 +478,6 @@ void CONSOLE_OT_history_cycle(wmOperatorType *ot)
{
/* identifiers */
ot->name= "History Cycle";
- ot->description= "Cycle through history.";
ot->idname= "CONSOLE_OT_history_cycle";
/* api callbacks */
@@ -535,7 +525,6 @@ void CONSOLE_OT_history_append(wmOperatorType *ot)
{
/* identifiers */
ot->name= "History Append";
- ot->description= "Append history at cursor position.";
ot->idname= "CONSOLE_OT_history_append";
/* api callbacks */
@@ -583,7 +572,6 @@ void CONSOLE_OT_scrollback_append(wmOperatorType *ot)
/* identifiers */
ot->name= "Scrollback Append";
- ot->description= "Append scrollback text by type.";
ot->idname= "CONSOLE_OT_scrollback_append";
/* api callbacks */
@@ -626,7 +614,6 @@ void CONSOLE_OT_copy(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Copy to Clipboard";
- ot->description= "Copy selected text to clipboard.";
ot->idname= "CONSOLE_OT_copy";
/* api callbacks */
@@ -661,7 +648,6 @@ void CONSOLE_OT_paste(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Paste from Clipboard";
- ot->description= "Paste text from clipboard.";
ot->idname= "CONSOLE_OT_paste";
/* api callbacks */
@@ -693,14 +679,10 @@ void CONSOLE_OT_zoom(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Console Zoom";
- /*optionals -
- "Zoom view font." */
- ot->description= "Zoom screen area.";
ot->idname= "CONSOLE_OT_zoom";
/* api callbacks */
ot->exec= zoom_exec;
- ot->poll= console_poll;
/* flags */
/* ot->flag= OPTYPE_REGISTER; */ /* super annoying */
diff --git a/source/blender/editors/space_console/console_report.c b/source/blender/editors/space_console/console_report.c
index b6920d148fd..2e23c4039f1 100644
--- a/source/blender/editors/space_console/console_report.c
+++ b/source/blender/editors/space_console/console_report.c
@@ -97,7 +97,7 @@ static int report_replay_exec(bContext *C, wmOperator *op)
for(report=reports->list.last; report; report=report->prev) {
if((report->type & report_mask) && (report->type & RPT_OPERATOR_ALL) && (report->flag & SELECT)) {
console_history_add_str(C, report->message, 0);
- WM_operator_name_call(C, "CONSOLE_OT_execute", WM_OP_EXEC_DEFAULT, NULL);
+ WM_operator_name_call(C, "CONSOLE_OT_exec", WM_OP_EXEC_DEFAULT, NULL);
ED_area_tag_redraw(CTX_wm_area(C));
}
@@ -114,7 +114,6 @@ void CONSOLE_OT_report_replay(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Replay Operators";
- ot->description= "Replay selected reports.";
ot->idname= "CONSOLE_OT_report_replay";
/* api callbacks */
@@ -161,7 +160,6 @@ void CONSOLE_OT_select_pick(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select report";
- ot->description= "Select reports by index.";
ot->idname= "CONSOLE_OT_select_pick";
/* api callbacks */
@@ -215,7 +213,6 @@ void CONSOLE_OT_select_all_toggle(wmOperatorType *ot)
{
/* identifiers */
ot->name= "(De)Select All";
- ot->description= "(de)select all reports.";
ot->idname= "CONSOLE_OT_select_all_toggle";
/* api callbacks */
@@ -307,7 +304,6 @@ void CONSOLE_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Border Select";
- ot->description= "Toggle border selection.";
ot->idname= "CONSOLE_OT_select_border";
/* api callbacks */
@@ -361,7 +357,6 @@ void CONSOLE_OT_report_delete(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Delete Reports";
- ot->description= "Delete selected reports.";
ot->idname= "CONSOLE_OT_report_delete";
/* api callbacks */
@@ -406,7 +401,6 @@ void CONSOLE_OT_report_copy(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Copy Reports to Clipboard";
- ot->description= "Copy selected reports to Clipboard.";
ot->idname= "CONSOLE_OT_report_copy";
/* api callbacks */
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index dfaaa269970..a763e7ce153 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -233,13 +233,14 @@ void console_keymap(struct wmWindowManager *wm)
{
ListBase *keymap= WM_keymap_listbase(wm, "Console", SPACE_CONSOLE, 0);
- #ifdef __APPLE__
+ /*
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", LINE_BEGIN);
- RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", RIGHTARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", LINE_END);
- #endif
-
- RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", LINE_BEGIN);
- RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", RIGHTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", LINE_END);
+ RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", ENDKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_END);
+ RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", RIGHTARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", LINE_BEGIN);
+
+ RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", EKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", LINE_END);
+ RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", EKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "type", LINE_END);
+ */
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", HOMEKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_BEGIN);
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", ENDKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_END);
@@ -277,8 +278,8 @@ void console_keymap(struct wmWindowManager *wm)
RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_delete", BACKSPACEKEY, KM_PRESS, 0, 0)->ptr, "type", DEL_PREV_CHAR);
#ifndef DISABLE_PYTHON
- WM_keymap_add_item(keymap, "CONSOLE_OT_execute", RETKEY, KM_PRESS, 0, 0); /* python operator - space_text.py */
- WM_keymap_add_item(keymap, "CONSOLE_OT_execute", PADENTER, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "CONSOLE_OT_exec", RETKEY, KM_PRESS, 0, 0); /* python operator - space_text.py */
+ WM_keymap_add_item(keymap, "CONSOLE_OT_exec", PADENTER, KM_PRESS, 0, 0);
//WM_keymap_add_item(keymap, "CONSOLE_OT_autocomplete", TABKEY, KM_PRESS, 0, 0); /* python operator - space_text.py */
WM_keymap_add_item(keymap, "CONSOLE_OT_autocomplete", SPACEKEY, KM_PRESS, KM_CTRL, 0); /* python operator - space_text.py */
@@ -320,11 +321,11 @@ static void console_main_area_listener(ScrArea *sa, wmNotifier *wmn)
/* context changes */
switch(wmn->category) {
- case NC_SPACE:
- if(wmn->data == ND_SPACE_CONSOLE) { /* generic redraw request */
+ case NC_CONSOLE:
+ if(wmn->data == ND_CONSOLE) { /* generic redraw request */
ED_area_tag_redraw(sa);
}
- else if(wmn->data == ND_SPACE_CONSOLE_REPORT && sc->type==CONSOLE_TYPE_REPORT) {
+ else if(wmn->data == ND_CONSOLE_REPORT && sc->type==CONSOLE_TYPE_REPORT) {
/* redraw also but only for report view, could do less redraws by checking the type */
ED_area_tag_redraw(sa);
}
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 00024ffa961..5a07c6a7550 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -353,9 +353,59 @@ void file_calc_previews(const bContext *C, ARegion *ar)
UI_view2d_totRect_set(v2d, sfile->layout->width, sfile->layout->height);
}
-static void file_draw_preview(short sx, short sy, ImBuf *imb, FileLayout *layout, short dropshadow)
+void file_draw_previews(const bContext *C, ARegion *ar)
{
- if (imb) {
+ SpaceFile *sfile= CTX_wm_space_file(C);
+ FileSelectParams* params= ED_fileselect_get_params(sfile);
+ FileLayout* layout= ED_fileselect_get_layout(sfile, ar);
+ View2D *v2d= &ar->v2d;
+ struct FileList* files = sfile->files;
+ int numfiles;
+ struct direntry *file;
+ short sx, sy;
+ ImBuf* imb=0;
+ int i;
+ int colorid = 0;
+ int offset;
+ int is_icon;
+
+ if (!files) return;
+
+ filelist_imgsize(files,sfile->layout->prv_w,sfile->layout->prv_h);
+ numfiles = filelist_numfiles(files);
+
+ sx = v2d->cur.xmin + layout->tile_border_x;
+ sy = v2d->cur.ymax - layout->tile_border_y;
+
+ offset = ED_fileselect_layout_offset(layout, 0, 0);
+ if (offset<0) offset=0;
+ for (i=offset; (i < numfiles) && (i < (offset+(layout->rows+2)*layout->columns)); ++i)
+ {
+ ED_fileselect_layout_tilepos(layout, i, &sx, &sy);
+ sx += v2d->tot.xmin+2;
+ sy = v2d->tot.ymax - sy;
+ file = filelist_file(files, i);
+
+ if (file->flags & ACTIVE) {
+ colorid = TH_HILITE;
+ draw_tile(sx - 1, sy, sfile->layout->tile_w + 1, sfile->layout->tile_h, colorid,0);
+ } else if (params->active_file == i) {
+ colorid = TH_ACTIVE;
+ draw_tile(sx - 1, sy, sfile->layout->tile_w + 1, sfile->layout->tile_h, colorid,0);
+ }
+
+ if ( (file->flags & IMAGEFILE) /* || (file->flags & MOVIEFILE) */)
+ {
+ filelist_loadimage(files, i);
+ }
+ is_icon = 0;
+ imb = filelist_getimage(files, i);
+ if (!imb) {
+ imb = filelist_geticon(files,i);
+ is_icon = 1;
+ }
+
+ if (imb) {
float fx, fy;
float dx, dy;
short xco, yco;
@@ -383,15 +433,15 @@ static void file_draw_preview(short sx, short sy, ImBuf *imb, FileLayout *layout
ey = (short)scaledy;
fx = ((float)layout->prv_w - (float)ex)/2.0f;
fy = ((float)layout->prv_h - (float)ey)/2.0f;
- dx = (fx + 0.5f + layout->prv_border_x);
- dy = (fy + 0.5f - layout->prv_border_y);
+ dx = (fx + 0.5f + sfile->layout->prv_border_x);
+ dy = (fy + 0.5f - sfile->layout->prv_border_y);
xco = (float)sx + dx;
- yco = (float)sy - layout->prv_h + dy;
+ yco = (float)sy - sfile->layout->prv_h + dy;
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
/* shadow */
- if (dropshadow)
+ if (!is_icon && (file->flags & IMAGEFILE))
uiDrawBoxShadow(220, xco, yco, xco + ex, yco + ey);
glEnable(GL_BLEND);
@@ -401,7 +451,7 @@ static void file_draw_preview(short sx, short sy, ImBuf *imb, FileLayout *layout
glaDrawPixelsTexScaled(xco, yco, imb->x, imb->y, GL_UNSIGNED_BYTE, imb->rect, scale, scale);
/* border */
- if (dropshadow) {
+ if (!is_icon && (file->flags & IMAGEFILE)) {
glColor4f(0.0f, 0.0f, 0.0f, 0.4f);
fdrawbox(xco, yco, xco + ex, yco + ey);
}
@@ -409,6 +459,41 @@ static void file_draw_preview(short sx, short sy, ImBuf *imb, FileLayout *layout
glDisable(GL_BLEND);
imb = 0;
}
+
+ /* shadow */
+ UI_ThemeColorShade(TH_BACK, -20);
+
+
+ if (S_ISDIR(file->type)) {
+ glColor4f(1.0f, 1.0f, 0.9f, 1.0f);
+ }
+ else if (file->flags & IMAGEFILE) {
+ UI_ThemeColor(TH_SEQ_IMAGE);
+ }
+ else if (file->flags & MOVIEFILE) {
+ UI_ThemeColor(TH_SEQ_MOVIE);
+ }
+ else if (file->flags & BLENDERFILE) {
+ UI_ThemeColor(TH_SEQ_SCENE);
+ }
+ else {
+ if (params->active_file == i) {
+ UI_ThemeColor(TH_GRID); /* grid used for active text */
+ } else if (file->flags & ACTIVE) {
+ UI_ThemeColor(TH_TEXT_HI);
+ } else {
+ UI_ThemeColor(TH_TEXT);
+ }
+ }
+
+ file_draw_string(sx + layout->prv_border_x, sy+4, file->relname, layout->tile_w, layout->tile_h, FILE_SHORTEN_END);
+
+ if (!sfile->loadimage_timer)
+ sfile->loadimage_timer= WM_event_add_window_timer(CTX_wm_window(C), TIMER1, 1.0/30.0); /* max 30 frames/sec. */
+
+ }
+
+ uiSetRoundBox(0);
}
static void renamebutton_cb(bContext *C, void *arg1, char *oldname)
@@ -438,39 +523,6 @@ static void renamebutton_cb(bContext *C, void *arg1, char *oldname)
}
}
-
-static void draw_background(FileLayout *layout, View2D *v2d)
-{
- int i;
- short sy;
-
- /* alternating flat shade background */
- for (i=0; (i <= layout->rows); i+=2)
- {
- sy = v2d->cur.ymax - i*(layout->tile_h+2*layout->tile_border_y) - layout->tile_border_y;
-
- UI_ThemeColorShade(TH_BACK, -7);
- glRectf(v2d->cur.xmin, sy, v2d->cur.xmax, sy+layout->tile_h+2*layout->tile_border_y);
-
- }
-}
-
-static void draw_dividers(FileLayout *layout, View2D *v2d)
-{
- short sx;
-
- /* vertical column dividers */
- sx = v2d->tot.xmin;
- while (sx < v2d->cur.xmax) {
- sx += (layout->tile_w+2*layout->tile_border_x);
-
- UI_ThemeColorShade(TH_BACK, 30);
- sdrawline(sx+1, v2d->cur.ymax - layout->tile_border_y , sx+1, v2d->cur.ymin);
- UI_ThemeColorShade(TH_BACK, -30);
- sdrawline(sx, v2d->cur.ymax - layout->tile_border_y , sx, v2d->cur.ymin);
- }
-}
-
void file_draw_list(const bContext *C, ARegion *ar)
{
SpaceFile *sfile= CTX_wm_space_file(C);
@@ -479,7 +531,6 @@ void file_draw_list(const bContext *C, ARegion *ar)
View2D *v2d= &ar->v2d;
struct FileList* files = sfile->files;
struct direntry *file;
- ImBuf *imb;
int numfiles;
int numfiles_layout;
int colorid = 0;
@@ -487,7 +538,6 @@ void file_draw_list(const bContext *C, ARegion *ar)
int offset;
int i;
float sw, spos;
- short is_icon;
numfiles = filelist_numfiles(files);
@@ -497,11 +547,26 @@ void file_draw_list(const bContext *C, ARegion *ar)
offset = ED_fileselect_layout_offset(layout, 0, 0);
if (offset<0) offset=0;
- if (params->display != FILE_IMGDISPLAY) {
+ /* alternating flat shade background */
+ for (i=0; (i <= layout->rows); i+=2)
+ {
+ sx = v2d->cur.xmin;
+ sy = v2d->cur.ymax - i*(layout->tile_h+2*layout->tile_border_y) - layout->tile_border_y;
- draw_background(layout, v2d);
+ UI_ThemeColorShade(TH_BACK, -7);
+ glRectf(v2d->cur.xmin, sy, v2d->cur.xmax, sy+layout->tile_h+2*layout->tile_border_y);
+
+ }
- draw_dividers(layout, v2d);
+ /* vertical column dividers */
+ sx = v2d->tot.xmin;
+ while (sx < ar->v2d.cur.xmax) {
+ sx += (sfile->layout->tile_w+2*sfile->layout->tile_border_x);
+
+ UI_ThemeColorShade(TH_BACK, 30);
+ sdrawline(sx+1, ar->v2d.cur.ymax - layout->tile_border_y , sx+1, ar->v2d.cur.ymin);
+ UI_ThemeColorShade(TH_BACK, -30);
+ sdrawline(sx, ar->v2d.cur.ymax - layout->tile_border_y , sx, ar->v2d.cur.ymin);
}
sx = ar->v2d.cur.xmin + layout->tile_border_x;
@@ -529,33 +594,16 @@ void file_draw_list(const bContext *C, ARegion *ar)
}
spos = sx;
-
- if ( FILE_IMGDISPLAY == params->display ) {
- if ( (file->flags & IMAGEFILE) /* || (file->flags & MOVIEFILE) */) {
- filelist_loadimage(files, i);
- }
- is_icon = 0;
- imb = filelist_getimage(files, i);
- if (!imb) {
- imb = filelist_geticon(files,i);
- is_icon = 1;
- }
-
- file_draw_preview(sx, sy, imb, layout, !is_icon && (file->flags & IMAGEFILE));
-
- } else {
- file_draw_icon(spos, sy-3, get_file_icon(file), ICON_DEFAULT_WIDTH, ICON_DEFAULT_WIDTH);
- spos += ICON_DEFAULT_WIDTH + 4;
- }
-
+ file_draw_icon(spos, sy-3, get_file_icon(file), ICON_DEFAULT_WIDTH, ICON_DEFAULT_WIDTH);
+ spos += ICON_DEFAULT_WIDTH + 4;
+
UI_ThemeColor4(TH_TEXT);
-
+
sw = file_string_width(file->relname);
if (file->flags & EDITING) {
- short but_width = (FILE_IMGDISPLAY == params->display) ? layout->tile_w : layout->column_widths[COLUMN_NAME];
uiBlock *block = uiBeginBlock(C, ar, "FileName", UI_EMBOSS);
uiBut *but = uiDefBut(block, TEX, 1, "", spos, sy-layout->tile_h-3,
- but_width, layout->textheight*2, file->relname, 1.0f, (float)FILE_MAX,0,0,"");
+ layout->column_widths[COLUMN_NAME], layout->tile_h, file->relname, 1.0f, (float)FILE_MAX,0,0,"");
uiButSetRenameFunc(but, renamebutton_cb, file);
if ( 0 == uiButActiveOnly(C, block, but)) {
file->flags &= ~EDITING;
@@ -563,42 +611,36 @@ void file_draw_list(const bContext *C, ARegion *ar)
uiEndBlock(C, block);
uiDrawBlock(C, block);
} else {
- float name_width = (FILE_IMGDISPLAY == params->display) ? layout->tile_w : sw;
- file_draw_string(spos, sy, file->relname, name_width, layout->tile_h, FILE_SHORTEN_END);
+ file_draw_string(spos, sy, file->relname, sw, layout->tile_h, FILE_SHORTEN_END);
}
-
- uiSetRoundBox(0);
-
- if (params->display == FILE_SHORTDISPLAY) {
- spos += layout->column_widths[COLUMN_NAME] + 12;
+ spos += layout->column_widths[COLUMN_NAME] + 12;
+ if (params->display == FILE_SHOWSHORT) {
if (!(file->type & S_IFDIR)) {
sw = file_string_width(file->size);
spos += layout->column_widths[COLUMN_SIZE] + 12 - sw;
file_draw_string(spos, sy, file->size, sw+1, layout->tile_h, FILE_SHORTEN_END);
}
- } else if (params->display == FILE_LONGDISPLAY) {
- spos += layout->column_widths[COLUMN_NAME] + 12;
-
-#ifndef WIN32
+ } else {
+#if 0 // XXX TODO: add this for non-windows systems
/* rwx rwx rwx */
spos += 20;
- sw = file_string_width(file->mode1);
- file_draw_string(spos, sy, file->mode1, sw, layout->tile_h, FILE_SHORTEN_END);
- spos += layout->column_widths[COLUMN_MODE1] + 12;
-
- sw = file_string_width(file->mode2);
- file_draw_string(spos, sy, file->mode2, sw, layout->tile_h, FILE_SHORTEN_END);
- spos += layout->column_widths[COLUMN_MODE2] + 12;
-
- sw = file_string_width(file->mode3);
- file_draw_string(spos, sy, file->mode3, sw, layout->tile_h, FILE_SHORTEN_END);
- spos += layout->column_widths[COLUMN_MODE3] + 12;
+ sw = UI_GetStringWidth(file->mode1);
+ file_draw_string(spos, sy, file->mode1, sw, layout->tile_h);
+
+ spos += 30;
+ sw = UI_GetStringWidth(file->mode2);
+ file_draw_string(spos, sy, file->mode2, sw, layout->tile_h);
- sw = file_string_width(file->owner);
- file_draw_string(spos, sy, file->owner, sw, layout->tile_h, FILE_SHORTEN_END);
- spos += layout->column_widths[COLUMN_OWNER] + 12;
+ spos += 30;
+ sw = UI_GetStringWidth(file->mode3);
+ file_draw_string(spos, sy, file->mode3, sw, layout->tile_h);
+
+ spos += 30;
+ sw = UI_GetStringWidth(file->owner);
+ file_draw_string(spos, sy, file->owner, sw, layout->tile_h);
#endif
+
sw = file_string_width(file->date);
file_draw_string(spos, sy, file->date, sw, layout->tile_h, FILE_SHORTEN_END);
spos += layout->column_widths[COLUMN_DATE] + 12;
@@ -614,9 +656,6 @@ void file_draw_list(const bContext *C, ARegion *ar)
}
}
}
-
- if (!sfile->loadimage_timer)
- sfile->loadimage_timer= WM_event_add_window_timer(CTX_wm_window(C), TIMER1, 1.0/30.0); /* max 30 frames/sec. */
}
diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h
index a99594e9575..9f1e4ad0e25 100644
--- a/source/blender/editors/space_file/file_intern.h
+++ b/source/blender/editors/space_file/file_intern.h
@@ -59,7 +59,7 @@ void FILE_OT_add_bookmark(struct wmOperatorType *ot);
void FILE_OT_delete_bookmark(struct wmOperatorType *ot);
void FILE_OT_hidedot(struct wmOperatorType *ot);
void FILE_OT_loadimages(struct wmOperatorType *ot);
-void FILE_OT_execute(struct wmOperatorType *ot);
+void FILE_OT_exec(struct wmOperatorType *ot);
void FILE_OT_cancel(struct wmOperatorType *ot);
void FILE_OT_parent(struct wmOperatorType *ot);
void FILE_OT_directory_new(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index e1a6e346ce2..9c73956d375 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -190,9 +190,9 @@ static int file_border_select_exec(bContext *C, wmOperator *op)
BLI_isect_rcti(&(ar->v2d.mask), &rect, &rect);
if (FILE_SELECT_DIR == file_select(sfile, ar, &rect, val )) {
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
} else {
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+ WM_event_add_notifier(C, NC_FILE|ND_PARAMS, NULL);
}
return OPERATOR_FINISHED;
}
@@ -239,12 +239,12 @@ static int file_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
file_deselect_all(sfile);
if (FILE_SELECT_DIR == file_select(sfile, ar, &rect, val ))
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
else
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+ WM_event_add_notifier(C, NC_FILE|ND_PARAMS, NULL);
WM_event_add_mousemove(C); /* for directory changes */
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+ WM_event_add_notifier(C, NC_FILE|ND_PARAMS, NULL);
return OPERATOR_FINISHED;
}
@@ -322,7 +322,7 @@ static int bookmark_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
BLI_cleanup_dir(G.sce, params->dir);
file_change_dir(sfile);
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
}
return OPERATOR_FINISHED;
@@ -566,11 +566,11 @@ int file_exec(bContext *C, wmOperator *unused)
return OPERATOR_FINISHED;
}
-void FILE_OT_execute(struct wmOperatorType *ot)
+void FILE_OT_exec(struct wmOperatorType *ot)
{
/* identifiers */
ot->name= "Execute File Window";
- ot->idname= "FILE_OT_execute";
+ ot->idname= "FILE_OT_exec";
/* api callbacks */
ot->exec= file_exec;
@@ -587,7 +587,7 @@ int file_parent_exec(bContext *C, wmOperator *unused)
BLI_parent_dir(sfile->params->dir);
BLI_cleanup_dir(G.sce, sfile->params->dir);
file_change_dir(sfile);
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
}
}
@@ -614,7 +614,7 @@ int file_refresh_exec(bContext *C, wmOperator *unused)
file_change_dir(sfile);
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
return OPERATOR_FINISHED;
@@ -645,7 +645,7 @@ int file_previous_exec(bContext *C, wmOperator *unused)
file_change_dir(sfile);
}
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
return OPERATOR_FINISHED;
}
@@ -676,7 +676,7 @@ int file_next_exec(bContext *C, wmOperator *unused)
file_change_dir(sfile);
}
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
return OPERATOR_FINISHED;
}
@@ -705,7 +705,7 @@ int file_directory_new_exec(bContext *C, wmOperator *unused)
BLI_strncpy(sfile->params->dir, filelist_dir(sfile->files), FILE_MAX);
}
}
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
return OPERATOR_FINISHED;
}
@@ -754,7 +754,7 @@ int file_directory_exec(bContext *C, wmOperator *unused)
BLI_cleanup_dir(G.sce, sfile->params->dir);
BLI_add_slash(sfile->params->dir);
file_change_dir(sfile);
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
}
@@ -769,7 +769,7 @@ int file_filename_exec(bContext *C, wmOperator *unused)
if (file_select_match(sfile, sfile->params->file))
{
sfile->params->file[0] = '\0';
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+ WM_event_add_notifier(C, NC_FILE|ND_PARAMS, NULL);
}
}
@@ -796,7 +796,7 @@ int file_hidedot_exec(bContext *C, wmOperator *unused)
sfile->params->flag ^= FILE_HIDE_DOT;
filelist_free(sfile->files);
sfile->params->active_file = -1;
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
}
return OPERATOR_FINISHED;
@@ -958,7 +958,7 @@ int file_delete_exec(bContext *C, wmOperator *op)
file = filelist_file(sfile->files, sfile->params->active_file);
BLI_make_file_string(G.sce, str, sfile->params->dir, file->relname);
BLI_delete(str, 0, 0);
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ WM_event_add_notifier(C, NC_FILE | ND_FILELIST, NULL);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index 24c3f9b4ca1..30598d39d58 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -63,7 +63,7 @@ static void file_panel_cb(bContext *C, void *arg_entry, void *arg_unused)
WM_operator_properties_free(&ptr);
}
-static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory category, short *nr, int icon, int allow_delete, int reverse)
+static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory category, short *nr, int icon, int allow_delete)
{
SpaceFile *sfile= CTX_wm_space_file(C);
uiBlock *block;
@@ -71,7 +71,7 @@ static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory cat
uiLayout *box, *col;
struct FSMenu* fsmenu = fsmenu_get();
char *curdir= (sfile->params)? sfile->params->dir: "";
- int i, i_iter, nentries = fsmenu_get_nentries(fsmenu, category);
+ int i, nentries = fsmenu_get_nentries(fsmenu, category);
/* reset each time */
*nr= -1;
@@ -86,16 +86,12 @@ static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory cat
box= uiLayoutBox(pa->layout);
col= uiLayoutColumn(box, 1);
- for (i_iter=0; i_iter< nentries;++i_iter) {
+ for (i=0; i< nentries;++i) {
char dir[FILE_MAX];
char temp[FILE_MAX];
uiLayout* layout = uiLayoutRow(col, 0);
- char *entry;
+ char *entry = fsmenu_get_entry(fsmenu, category, i);
- i= reverse ? nentries-(i_iter+1) : i_iter;
-
- entry = fsmenu_get_entry(fsmenu, category, i);
-
/* set this list item as active if we have a match */
if(strcmp(curdir, entry) == 0)
*nr= i;
@@ -128,7 +124,7 @@ static void file_panel_system(const bContext *C, Panel *pa)
SpaceFile *sfile= CTX_wm_space_file(C);
if(sfile)
- file_panel_category(C, pa, FS_CATEGORY_SYSTEM, &sfile->systemnr, ICON_DISK_DRIVE, 0, 0);
+ file_panel_category(C, pa, FS_CATEGORY_SYSTEM, &sfile->systemnr, ICON_DISK_DRIVE, 0);
}
static void file_panel_bookmarks(const bContext *C, Panel *pa)
@@ -141,7 +137,7 @@ static void file_panel_bookmarks(const bContext *C, Panel *pa)
uiItemO(row, "Add", ICON_ZOOMIN, "file.add_bookmark");
uiItemL(row, NULL, 0);
- file_panel_category(C, pa, FS_CATEGORY_BOOKMARKS, &sfile->bookmarknr, ICON_BOOKMARKS, 1, 0);
+ file_panel_category(C, pa, FS_CATEGORY_BOOKMARKS, &sfile->bookmarknr, ICON_BOOKMARKS, 1);
}
}
@@ -150,7 +146,7 @@ static void file_panel_recent(const bContext *C, Panel *pa)
SpaceFile *sfile= CTX_wm_space_file(C);
if(sfile)
- file_panel_category(C, pa, FS_CATEGORY_RECENT, &sfile->recentnr, ICON_FILE_FOLDER, 0, 1);
+ file_panel_category(C, pa, FS_CATEGORY_RECENT, &sfile->recentnr, ICON_FILE_FOLDER, 0);
}
@@ -188,7 +184,7 @@ static void file_panel_operator(const bContext *C, Panel *pa)
if(strncmp(RNA_property_identifier(prop), "filter", 6) == 0)
continue;
- uiItemFullR(pa->layout, NULL, 0, op->ptr, prop, -1, 0, 0);
+ uiItemFullR(pa->layout, NULL, 0, op->ptr, prop, -1, 0, 0, 0, 0);
empty= 0;
}
RNA_STRUCT_END;
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index f300505933f..8ee7d3515b5 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -287,7 +287,6 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar)
numfiles = filelist_numfiles(sfile->files);
textheight = file_font_pointsize();
layout = sfile->layout;
- layout->textheight = textheight;
if (params->display == FILE_IMGDISPLAY) {
layout->prv_w = 96;
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 722fa475727..ea640eab090 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -212,14 +212,14 @@ static void file_listener(ScrArea *sa, wmNotifier *wmn)
/* context changes */
switch(wmn->category) {
- case NC_SPACE:
+ case NC_FILE:
switch (wmn->data) {
- case ND_SPACE_FILE_LIST:
+ case ND_FILELIST:
if (sfile->files) filelist_free(sfile->files);
ED_area_tag_refresh(sa);
ED_area_tag_redraw(sa);
break;
- case ND_SPACE_FILE_PARAMS:
+ case ND_PARAMS:
ED_area_tag_refresh(sa);
ED_area_tag_redraw(sa);
break;
@@ -249,12 +249,12 @@ static void file_main_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch(wmn->category) {
- case NC_SPACE:
+ case NC_FILE:
switch (wmn->data) {
- case ND_SPACE_FILE_LIST:
+ case ND_FILELIST:
ED_region_tag_redraw(ar);
break;
- case ND_SPACE_FILE_PARAMS:
+ case ND_PARAMS:
ED_region_tag_redraw(ar);
break;
}
@@ -310,7 +310,12 @@ static void file_main_area_draw(const bContext *C, ARegion *ar)
file_hilight_set(sfile, ar, event->x, event->y);
}
- file_draw_list(C, ar);
+ if (params->display == FILE_IMGDISPLAY) {
+ file_draw_previews(C, ar);
+ } else {
+ file_draw_list(C, ar);
+ }
+
/* reset view matrix */
UI_view2d_view_restore(C);
@@ -330,7 +335,7 @@ void file_operatortypes(void)
WM_operatortype_append(FILE_OT_select_bookmark);
WM_operatortype_append(FILE_OT_loadimages);
WM_operatortype_append(FILE_OT_highlight);
- WM_operatortype_append(FILE_OT_execute);
+ WM_operatortype_append(FILE_OT_exec);
WM_operatortype_append(FILE_OT_cancel);
WM_operatortype_append(FILE_OT_parent);
WM_operatortype_append(FILE_OT_previous);
@@ -470,9 +475,9 @@ static void file_ui_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch(wmn->category) {
- case NC_SPACE:
+ case NC_FILE:
switch (wmn->data) {
- case ND_SPACE_FILE_LIST:
+ case ND_FILELIST:
ED_region_tag_redraw(ar);
break;
}
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index d718ef28e99..37389b32b3a 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -430,7 +430,7 @@ static void insert_graph_keys(bAnimContext *ac, short mode)
/* init keyframing flag */
if (IS_AUTOKEY_FLAG(AUTOMATKEY)) flag |= INSERTKEY_MATRIX;
if (IS_AUTOKEY_FLAG(INSERTNEEDED)) flag |= INSERTKEY_NEEDED;
- if (IS_AUTOKEY_MODE(scene, EDITKEYS)) flag |= INSERTKEY_REPLACE;
+ // if (IS_AUTOKEY_MODE(EDITKEYS)) flag |= INSERTKEY_REPLACE;
/* insert keyframes */
for (ale= anim_data.first; ale; ale= ale->next) {
@@ -989,6 +989,13 @@ void GRAPH_OT_bake (wmOperatorType *ot)
* of selected keyframes. It is useful for creating keyframes for tweaking overlap.
*/
+// XXX some of the common parts (with DopeSheet) should be unified in animation module...
+
+/* little cache for values... */
+typedef struct tempFrameValCache {
+ float frame, val;
+} tempFrameValCache;
+
/* Evaluates the curves between each selected keyframe on each frame, and keys the value */
static void sample_graph_keys (bAnimContext *ac)
{
@@ -1001,8 +1008,64 @@ static void sample_graph_keys (bAnimContext *ac)
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
/* loop through filtered data and add keys between selected keyframes on every frame */
- for (ale= anim_data.first; ale; ale= ale->next)
- sample_fcurve((FCurve *)ale->key_data);
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ FCurve *fcu= (FCurve *)ale->key_data;
+ BezTriple *bezt, *start=NULL, *end=NULL;
+ tempFrameValCache *value_cache, *fp;
+ int sfra, range;
+ int i, n;
+
+ /* find selected keyframes... once pair has been found, add keyframes */
+ for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) {
+ /* check if selected, and which end this is */
+ if (BEZSELECTED(bezt)) {
+ if (start) {
+ /* set end */
+ end= bezt;
+
+ /* cache values then add keyframes using these values, as adding
+ * keyframes while sampling will affect the outcome...
+ */
+ range= (int)( ceil(end->vec[1][0] - start->vec[1][0]) );
+ sfra= (int)( floor(start->vec[1][0]) );
+
+ if (range) {
+ value_cache= MEM_callocN(sizeof(tempFrameValCache)*range, "IcuFrameValCache");
+
+ /* sample values */
+ for (n=0, fp=value_cache; n<range && fp; n++, fp++) {
+ fp->frame= (float)(sfra + n);
+ fp->val= evaluate_fcurve(fcu, fp->frame);
+ }
+
+ /* add keyframes with these */
+ for (n=0, fp=value_cache; n<range && fp; n++, fp++) {
+ insert_vert_fcurve(fcu, fp->frame, fp->val, 1);
+ }
+
+ /* free temp cache */
+ MEM_freeN(value_cache);
+
+ /* as we added keyframes, we need to compensate so that bezt is at the right place */
+ bezt = fcu->bezt + i + range - 1;
+ i += (range - 1);
+ }
+
+ /* bezt was selected, so it now marks the start of a whole new chain to search */
+ start= bezt;
+ end= NULL;
+ }
+ else {
+ /* just set start keyframe */
+ start= bezt;
+ end= NULL;
+ }
+ }
+ }
+
+ /* recalculate channel's handles? */
+ calchandles_fcurve(fcu);
+ }
/* admin and redraws */
BLI_freelistN(&anim_data);
diff --git a/source/blender/editors/space_graph/graph_header.c b/source/blender/editors/space_graph/graph_header.c
index dd304cd8cf3..c4654972dcd 100644
--- a/source/blender/editors/space_graph/graph_header.c
+++ b/source/blender/editors/space_graph/graph_header.c
@@ -80,17 +80,15 @@ static void graph_viewmenu(bContext *C, uiLayout *layout, void *arg_unused)
uiItemS(layout);
- uiItemR(layout, NULL, 0, &spaceptr, "show_cframe_indicator", 0);
- uiItemR(layout, NULL, 0, &spaceptr, "show_sliders", 0);
- uiItemR(layout, NULL, 0, &spaceptr, "automerge_keyframes", 0);
+ uiItemR(layout, NULL, 0, &spaceptr, "show_cframe_indicator", 0, 0, 0);
if (sipo->flag & SIPO_NOHANDLES)
uiItemO(layout, "Show Handles", ICON_CHECKBOX_DEHLT, "GRAPH_OT_handles_view_toggle");
else
uiItemO(layout, "Show Handles", ICON_CHECKBOX_HLT, "GRAPH_OT_handles_view_toggle");
- uiItemR(layout, NULL, 0, &spaceptr, "only_selected_curves_handles", 0);
-
+ uiItemR(layout, NULL, 0, &spaceptr, "only_selected_curves_handles", 0, 0, 0);
+ uiItemR(layout, NULL, 0, &spaceptr, "automerge_keyframes", 0, 0, 0);
if (sipo->flag & SIPO_DRAWTIME)
uiItemO(layout, "Show Frames", 0, "ANIM_OT_time_toggle");
@@ -160,7 +158,7 @@ static void graph_edit_transformmenu(bContext *C, uiLayout *layout, void *arg_un
static void graph_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_CFRA);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_NEAREST_FRAME);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_NEAREST_SECOND);
@@ -169,7 +167,7 @@ static void graph_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
static void graph_edit_mirrormenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_mirror", "type", GRAPHKEYS_MIRROR_CFRA);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_mirror", "type", GRAPHKEYS_MIRROR_YAXIS);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_mirror", "type", GRAPHKEYS_MIRROR_XAXIS);
@@ -178,7 +176,7 @@ static void graph_edit_mirrormenu(bContext *C, uiLayout *layout, void *arg_unuse
static void graph_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_handle_type", "type", HD_FREE);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_handle_type", "type", HD_AUTO);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_handle_type", "type", HD_VECT);
@@ -188,7 +186,7 @@ static void graph_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unus
static void graph_edit_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_interpolation_type", "type", BEZT_IPO_CONST);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_interpolation_type", "type", BEZT_IPO_LIN);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_interpolation_type", "type", BEZT_IPO_BEZ);
@@ -196,7 +194,7 @@ static void graph_edit_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
static void graph_edit_expomenu(bContext *C, uiLayout *layout, void *arg_unused)
{
- uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_CONSTANT);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_LINEAR);
}
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 8887d464f30..3717ccc8244 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -423,10 +423,6 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn)
}*/
ED_area_tag_refresh(sa);
break;
- case NC_SPACE:
- if(wmn->data == ND_SPACE_GRAPH)
- ED_area_tag_redraw(sa);
- break;
default:
if(wmn->data==ND_KEYS)
ED_area_tag_refresh(sa);
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 21fccdc65f8..ac0a5c7f53a 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -67,7 +67,6 @@
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
-#include "ED_gpencil.h"
#include "ED_image.h"
#include "ED_mesh.h"
#include "ED_space_api.h"
@@ -521,13 +520,13 @@ void brush_buttons(const bContext *C, uiBlock *block, short fromsima,
uiBlockBeginAlign(block);
uiDefButF(block, COL, B_VPCOLSLI, "", 0,yco,200,19, brush->rgb, 0, 0, 0, 0, "");
uiDefButF(block, NUMSLI, evt_nop, "Opacity ", 0,yco-20,180,19, &brush->alpha, 0.0, 1.0, 0, 0, "The amount of pressure on the brush");
- uiDefIconButBitS(block, TOG|BIT, BRUSH_ALPHA_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE, 180,yco-20,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
+ uiDefButBitS(block, TOG|BIT, BRUSH_ALPHA_PRESSURE, evt_nop, "P", 180,yco-20,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
uiDefButI(block, NUMSLI, evt_nop, "Size ", 0,yco-40,180,19, &brush->size, 1, 200, 0, 0, "The size of the brush");
- uiDefIconButBitS(block, TOG|BIT, BRUSH_SIZE_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE, 180,yco-40,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
+ uiDefButBitS(block, TOG|BIT, BRUSH_SIZE_PRESSURE, evt_nop, "P", 180,yco-40,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
uiDefButF(block, NUMSLI, evt_nop, "Falloff ", 0,yco-60,180,19, &brush->innerradius, 0.0, 1.0, 0, 0, "The fall off radius of the brush");
- uiDefIconButBitS(block, TOG|BIT, BRUSH_RAD_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE, 180,yco-60,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
+ uiDefButBitS(block, TOG|BIT, BRUSH_RAD_PRESSURE, evt_nop, "P", 180,yco-60,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
uiDefButF(block, NUMSLI, evt_nop, "Spacing ",0,yco-80,180,19, &brush->spacing, 1.0, 100.0, 0, 0, "Repeating paint on %% of brush diameter");
- uiDefIconButBitS(block, TOG|BIT, BRUSH_SPACING_PRESSURE, evt_nop, ICON_STYLUS_PRESSURE, 180,yco-80,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
+ uiDefButBitS(block, TOG|BIT, BRUSH_SPACING_PRESSURE, evt_nop, "P", 180,yco-80,20,19, &brush->flag, 0, 0, 0, 0, "Enables pressure sensitivity for tablets");
uiBlockEndAlign(block);
yco -= 110;
@@ -1439,12 +1438,6 @@ void image_buttons_register(ARegionType *art)
strcpy(pt->label, "Curves");
pt->draw= image_panel_curves;
BLI_addtail(&art->paneltypes, pt);
-
- pt= MEM_callocN(sizeof(PanelType), "spacetype image panel gpencil");
- strcpy(pt->idname, "IMAGE_PT_gpencil");
- strcpy(pt->label, "Grease Pencil");
- pt->draw= gpencil_panel_standard;
- BLI_addtail(&art->paneltypes, pt);
}
static int image_properties(bContext *C, wmOperator *op)
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index cf9bac1ebee..2f5fc805367 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -44,7 +44,6 @@
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
-#include "BKE_context.h"
#include "BKE_colortools.h"
#include "BKE_global.h"
#include "BKE_image.h"
@@ -54,7 +53,6 @@
#include "BIF_gl.h"
#include "BIF_glutil.h"
-#include "ED_gpencil.h"
#include "ED_image.h"
#include "ED_screen.h"
@@ -527,26 +525,22 @@ static void draw_image_buffer_repeated(SpaceImage *sima, ARegion *ar, Scene *sce
/* draw uv edit */
/* draw grease pencil */
-void draw_image_grease_pencil(bContext *C, short onlyv2d)
+
+static void draw_image_grease_pencil(SpaceImage *sima, ImBuf *ibuf)
{
- /* draw in View2D space? */
- if (onlyv2d) {
- /* assume that UI_view2d_ortho(C) has been called... */
- SpaceImage *sima= (SpaceImage *)CTX_wm_space_data(C);
- ImBuf *ibuf= ED_space_image_buffer(sima);
-
- /* draw grease-pencil ('image' strokes) */
- //if (sima->flag & SI_DISPGP)
- draw_gpencil_2dimage(C, ibuf);
- }
- else {
- /* assume that UI_view2d_restore(C) has been called... */
- SpaceImage *sima= (SpaceImage *)CTX_wm_space_data(C);
-
- /* draw grease-pencil ('screen' strokes) */
- //if (sima->flag & SI_DISPGP)
- draw_gpencil_2dview(C, 0);
- }
+ /* XXX bring back */
+ /* draw grease-pencil ('image' strokes) */
+ if (sima->flag & SI_DISPGP)
+ ; // XXX draw_gpencil_2dimage(sa, ibuf);
+
+#if 0
+ mywinset(sa->win); /* restore scissor after gla call... */
+ wmOrtho2(-0.375, sa->winx-0.375, -0.375, sa->winy-0.375);
+#endif
+
+ /* draw grease-pencil (screen strokes) */
+ if (sima->flag & SI_DISPGP)
+ ; // XXX draw_gpencil_2dview(sa, NULL);
}
/* XXX becomes WM paint cursor */
@@ -695,6 +689,9 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene)
else
draw_image_buffer(sima, ar, scene, ima, ibuf, 0.0f, 0.0f, zoomx, zoomy);
+ /* grease pencil */
+ draw_image_grease_pencil(sima, ibuf);
+
/* paint helpers */
draw_image_paint_helpers(sima, ar, scene, zoomx, zoomy);
diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h
index a33475c1213..aa97e339c68 100644
--- a/source/blender/editors/space_image/image_intern.h
+++ b/source/blender/editors/space_image/image_intern.h
@@ -53,7 +53,6 @@ void IMAGE_OT_toolbox(struct wmOperatorType *ot);
/* image_draw.c */
void draw_image_main(struct SpaceImage *sima, struct ARegion *ar, struct Scene *scene);
void draw_image_info(struct ARegion *ar, int channels, int x, int y, char *cp, float *fp, int *zp, float *zpf);
-void draw_image_grease_pencil(struct bContext *C, short onlyv2d);
/* image_ops.c */
int space_image_main_area_poll(struct bContext *C);
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index bee06e6892f..d9f02a35142 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -61,7 +61,6 @@
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_types.h"
-#include "RNA_enum_types.h"
#include "ED_image.h"
#include "ED_screen.h"
@@ -651,7 +650,7 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *event)
void IMAGE_OT_open(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Open Image";
+ ot->name= "Open";
ot->idname= "IMAGE_OT_open";
/* api callbacks */
@@ -1167,6 +1166,15 @@ void IMAGE_OT_pack(wmOperatorType *ot)
/********************* unpack operator *********************/
+/* XXX move this to some place where it can be reused */
+
+const EnumPropertyItem unpack_method_items[] = {
+ {PF_USE_LOCAL, "USE_LOCAL", 0, "Use Local File", ""},
+ {PF_WRITE_LOCAL, "WRITE_LOCAL", 0, "Write Local File (overwrite existing)", ""},
+ {PF_USE_ORIGINAL, "USE_ORIGINAL", 0, "Use Original File", ""},
+ {PF_WRITE_ORIGINAL, "WRITE_ORIGINAL", 0, "Write Original File (overwrite existing)", ""},
+ {0, NULL, 0, NULL, NULL}};
+
void unpack_menu(bContext *C, char *opname, char *abs_name, char *folder, PackedFile *pf)
{
uiPopupMenu *pup;
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index c57bc5773b0..1506df89c45 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -54,7 +54,6 @@
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
-#include "ED_gpencil.h"
#include "ED_image.h"
#include "ED_mesh.h"
#include "ED_space_api.h"
@@ -295,14 +294,10 @@ static void image_listener(ScrArea *sa, wmNotifier *wmn)
case NC_IMAGE:
ED_area_tag_redraw(sa);
break;
- case NC_SPACE:
- if(wmn->data == ND_SPACE_IMAGE)
- ED_area_tag_redraw(sa);
- break;
- case NC_GEOM:
+ case NC_OBJECT:
switch(wmn->data) {
- case ND_DATA:
- case ND_SELECT:
+ case ND_GEOM_SELECT:
+ case ND_GEOM_DATA:
ED_area_tag_redraw(sa);
break;
}
@@ -435,22 +430,16 @@ static void image_main_area_draw(const bContext *C, ARegion *ar)
/* we set view2d from own zoom and offset each time */
image_main_area_set_view2d(sima, ar, scene);
-
+
/* we draw image in pixelspace */
draw_image_main(sima, ar, scene);
/* and uvs in 0.0-1.0 space */
UI_view2d_view_ortho(C, v2d);
- draw_uvedit_main(sima, ar, scene, obedit);
- ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST);
-
- /* Grease Pencil too (in addition to UV's) */
- draw_image_grease_pencil((bContext *)C, 1);
+ draw_uvedit_main(sima, ar, scene, obedit);
+ ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST);
UI_view2d_view_restore(C);
- /* draw Grease Pencil - screen space only */
- draw_image_grease_pencil((bContext *)C, 0);
-
/* scrollers? */
/*scrollers= UI_view2d_scrollers_calc(C, v2d, V2D_UNIT_VALUES, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
UI_view2d_scrollers_draw(C, v2d, scrollers);
@@ -569,10 +558,11 @@ void ED_spacetype_image(void)
/* regions: main window */
art= MEM_callocN(sizeof(ARegionType), "spacetype image region");
art->regionid = RGN_TYPE_WINDOW;
- art->keymapflag= ED_KEYMAP_FRAMES|ED_KEYMAP_GPENCIL;
+ art->keymapflag= ED_KEYMAP_FRAMES;
art->init= image_main_area_init;
art->draw= image_main_area_draw;
art->listener= image_main_area_listener;
+ art->keymapflag= 0;
BLI_addhead(&st->regiontypes, art);
@@ -629,7 +619,7 @@ void ED_space_image_set(bContext *C, SpaceImage *sima, Scene *scene, Object *obe
if(C) {
if(obedit)
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
ED_area_tag_redraw(CTX_wm_area(C));
}
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
deleted file mode 100644
index 60cac0a00fa..00000000000
--- a/source/blender/editors/space_info/info_stats.c
+++ /dev/null
@@ -1,434 +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * Contributor(s): Blender Foundation
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <stdio.h>
-#include <string.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "DNA_action_types.h"
-#include "DNA_armature_types.h"
-#include "DNA_curve_types.h"
-#include "DNA_group_types.h"
-#include "DNA_lattice_types.h"
-#include "DNA_mesh_types.h"
-#include "DNA_meta_types.h"
-#include "DNA_object_types.h"
-#include "DNA_particle_types.h"
-#include "DNA_scene_types.h"
-
-#include "BKE_anim.h"
-#include "BKE_context.h"
-#include "BKE_displist.h"
-#include "BKE_DerivedMesh.h"
-#include "BKE_key.h"
-#include "BKE_mesh.h"
-#include "BKE_particle.h"
-#include "BKE_utildefines.h"
-
-#include "ED_armature.h"
-#include "ED_mesh.h"
-
-#include "BLI_editVert.h"
-
-typedef struct SceneStats {
- int totvert, totvertsel;
- int totedge, totedgesel;
- int totface, totfacesel;
- int totbone, totbonesel;
- int totobj, totobjsel;
- int totmesh, totlamp, totcurve;
-
- char infostr[512];
-} SceneStats;
-
-static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
-{
- switch(ob->type) {
- case OB_MESH: {
- /* we assume derivedmesh is already built, this strictly does stats now. */
- DerivedMesh *dm= ob->derivedFinal;
- int totvert, totedge, totface;
-
- stats->totmesh +=totob;
-
- if(dm) {
- totvert = dm->getNumVerts(dm);
- totedge = dm->getNumEdges(dm);
- totface = dm->getNumFaces(dm);
-
- stats->totvert += totvert*totob;
- stats->totedge += totedge*totob;
- stats->totface += totface*totob;
-
- if(sel) {
- stats->totvertsel += totvert;
- stats->totfacesel += totface;
- }
- }
- break;
- }
- case OB_LAMP:
- stats->totlamp += totob;
- break;
- case OB_SURF:
- case OB_CURVE:
- case OB_FONT: {
- Curve *cu= ob->data;
- int tot= 0, totf= 0;
-
- stats->totcurve += totob;
-
- if(cu->disp.first)
- count_displist(&cu->disp, &tot, &totf);
-
- tot *= totob;
- totf *= totob;
-
- stats->totvert+= tot;
- stats->totface+= totf;
-
- if(sel) {
- stats->totvertsel += tot;
- stats->totfacesel += totf;
- }
- break;
- }
- case OB_MBALL: {
- int tot= 0, totf= 0;
-
- count_displist(&ob->disp, &tot, &totf);
-
- tot *= totob;
- totf *= totob;
-
- stats->totvert += tot;
- stats->totface += totf;
-
- if(sel) {
- stats->totvertsel += tot;
- stats->totfacesel += totf;
- }
- break;
- }
- }
-}
-
-static void stats_object_edit(Object *obedit, SceneStats *stats)
-{
- if(obedit->type==OB_MESH) {
- /* Mesh Edit */
- EditMesh *em= BKE_mesh_get_editmesh(obedit->data);
- EditVert *eve;
- EditEdge *eed;
- EditFace *efa;
-
- for(eve= em->verts.first; eve; eve=eve->next) {
- stats->totvert++;
- if(eve->f & SELECT) stats->totvertsel++;
- }
- for(eed= em->edges.first; eed; eed=eed->next) {
- stats->totedge++;
- if(eed->f & SELECT) stats->totedgesel++;
- }
- for(efa= em->faces.first; efa; efa=efa->next) {
- stats->totface++;
- if(efa->f & SELECT) stats->totfacesel++;
- }
-
- EM_validate_selections(em);
- }
- else if(obedit->type==OB_ARMATURE){
- /* Armature Edit */
- bArmature *arm= obedit->data;
- EditBone *ebo;
-
- for(ebo=arm->edbo->first; ebo; ebo=ebo->next){
- stats->totbone++;
-
- if((ebo->flag & BONE_CONNECTED) && ebo->parent)
- stats->totvert--;
-
- if(ebo->flag & BONE_TIPSEL)
- stats->totvertsel++;
- if(ebo->flag & BONE_ROOTSEL)
- stats->totvertsel++;
-
- if(ebo->flag & BONE_SELECTED) stats->totbonesel++;
-
- /* if this is a connected child and it's parent is being moved, remove our root */
- if((ebo->flag & BONE_CONNECTED)&& (ebo->flag & BONE_ROOTSEL) && ebo->parent && (ebo->parent->flag & BONE_TIPSEL))
- stats->totvertsel--;
-
- stats->totvert+=2;
- }
- }
- else if ELEM(obedit->type, OB_CURVE, OB_SURF) { /* OB_FONT has no cu->editnurb */
- /* Curve Edit */
- Curve *cu= obedit->data;
- Nurb *nu;
- BezTriple *bezt;
- BPoint *bp;
- int a;
-
- for(nu=cu->editnurb->first; nu; nu=nu->next) {
- if(nu->type == CU_BEZIER) {
- bezt= nu->bezt;
- a= nu->pntsu;
- while(a--) {
- stats->totvert+=3;
- if(bezt->f1) stats->totvertsel++;
- if(bezt->f2) stats->totvertsel++;
- if(bezt->f3) stats->totvertsel++;
- bezt++;
- }
- }
- else {
- bp= nu->bp;
- a= nu->pntsu*nu->pntsv;
- while(a--) {
- stats->totvert++;
- if(bp->f1 & SELECT) stats->totvertsel++;
- bp++;
- }
- }
- }
- }
- else if(obedit->type==OB_MBALL) {
- /* MetaBall Edit */
- MetaBall *mball= obedit->data;
- MetaElem *ml;
-
- for(ml= mball->editelems->first; ml; ml=ml->next) {
- stats->totvert++;
- if(ml->flag & SELECT) stats->totvertsel++;
- }
- }
- else if(obedit->type==OB_LATTICE) {
- /* Lattice Edit */
- Lattice *lt= obedit->data;
- Lattice *editlatt= lt->editlatt;
- BPoint *bp;
- int a;
-
- bp= editlatt->def;
-
- a= editlatt->pntsu*editlatt->pntsv*editlatt->pntsw;
- while(a--) {
- stats->totvert++;
- if(bp->f1 & SELECT) stats->totvertsel++;
- bp++;
- }
- }
-}
-
-static void stats_object_pose(Object *ob, SceneStats *stats)
-{
- if(ob->pose) {
- bArmature *arm= ob->data;
- bPoseChannel *pchan;
-
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- stats->totbone++;
- if(pchan->bone && (pchan->bone->flag & BONE_SELECTED))
- if(pchan->bone->layer & arm->layer)
- stats->totbonesel++;
- }
- }
-}
-
-static void stats_object_paint(Object *ob, SceneStats *stats)
-{
- if(ob->type == OB_MESH) {
- Mesh *me= ob->data;
-
- stats->totface= me->totface;
- stats->totvert= me->totvert;
- }
-}
-
-static void stats_dupli_object(Base *base, Object *ob, SceneStats *stats)
-{
- if(base->flag & SELECT) stats->totobjsel++;
-
- if(ob->transflag & OB_DUPLIPARTS) {
- /* Dupli Particles */
- ParticleSystem *psys;
- ParticleSettings *part;
-
- for(psys=ob->particlesystem.first; psys; psys=psys->next){
- part=psys->part;
-
- if(part->draw_as==PART_DRAW_OB && part->dup_ob){
- int tot=count_particles(psys);
- stats_object(part->dup_ob, 0, tot, stats);
- }
- else if(part->draw_as==PART_DRAW_GR && part->dup_group){
- GroupObject *go;
- int tot, totgroup=0, cur=0;
-
- for(go= part->dup_group->gobject.first; go; go=go->next)
- totgroup++;
-
- for(go= part->dup_group->gobject.first; go; go=go->next) {
- tot=count_particles_mod(psys,totgroup,cur);
- stats_object(go->ob, 0, tot, stats);
- cur++;
- }
- }
- }
-
- stats_object(ob, base->flag & SELECT, 1, stats);
- stats->totobj++;
- }
- else if(ob->parent && (ob->parent->transflag & (OB_DUPLIVERTS|OB_DUPLIFACES))) {
- /* Dupli Verts/Faces */
- int tot= count_duplilist(ob->parent);
- stats->totobj+=tot;
- stats_object(ob, base->flag & SELECT, tot, stats);
- }
- else if(ob->transflag & OB_DUPLIFRAMES) {
- /* Dupli Frames */
- int tot= count_duplilist(ob);
- stats->totobj+=tot;
- stats_object(ob, base->flag & SELECT, tot, stats);
- }
- else if((ob->transflag & OB_DUPLIGROUP) && ob->dup_group) {
- /* Dupli Group */
- int tot= count_duplilist(ob);
- stats->totobj+=tot;
- stats_object(ob, base->flag & SELECT, tot, stats);
- }
- else {
- /* No Dupli */
- stats_object(ob, base->flag & SELECT, 1, stats);
- stats->totobj++;
- }
-}
-
-/* Statistics displayed in info header. Called regularly on scene changes. */
-static void stats_update(Scene *scene)
-{
- SceneStats stats;
- Object *ob= (scene->basact)? scene->basact->object: NULL;
- Base *base;
-
- memset(&stats, 0, sizeof(stats));
-
- if(scene->obedit) {
- /* Edit Mode */
- stats_object_edit(scene->obedit, &stats);
- }
- else if(ob && (ob->mode & OB_MODE_POSE)) {
- /* Pose Mode */
- stats_object_pose(ob, &stats);
- }
- else if(ob && (ob->flag & (OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT))) {
- /* Sculpt and Paint Mode */
- stats_object_paint(ob, &stats);
- }
- else {
- /* Objects */
- for(base= scene->base.first; base; base=base->next)
- if(scene->lay & base->lay)
- stats_dupli_object(base, base->object, &stats);
- }
-
- if(!scene->stats)
- scene->stats= MEM_mallocN(sizeof(SceneStats), "SceneStats");
-
- *(scene->stats)= stats;
-}
-
-static void stats_string(Scene *scene)
-{
- SceneStats *stats= scene->stats;
- Object *ob= (scene->basact)? scene->basact->object: NULL;
- uintptr_t mem_in_use, mmap_in_use;
- char memstr[64];
- char *s;
-
- mem_in_use= MEM_get_memory_in_use();
- mmap_in_use= MEM_get_mapped_memory_in_use();
-
- /* get memory statistics */
- s= memstr + sprintf(memstr, " | Mem:%.2fM", ((mem_in_use-mmap_in_use)>>10)/1024.0);
- if(mmap_in_use)
- sprintf(s, " (%.2fM)", ((mmap_in_use)>>10)/1024.0);
-
- s= stats->infostr;
-
- if(scene->obedit) {
- if(ob_get_keyblock(scene->obedit))
- s+= sprintf(s, "(Key) ");
-
- if(scene->obedit->type==OB_MESH) {
- if(scene->toolsettings->selectmode & SCE_SELECT_VERTEX)
- s+= sprintf(s, "Ve:%d-%d | Ed:%d-%d | Fa:%d-%d",
- stats->totvertsel, stats->totvert, stats->totedgesel, stats->totedge, stats->totfacesel, stats->totface);
- else if(scene->toolsettings->selectmode & SCE_SELECT_EDGE)
- s+= sprintf(s, "Ed:%d-%d | Fa:%d-%d",
- stats->totedgesel, stats->totedge, stats->totfacesel, stats->totface);
- else
- s+= sprintf(s, "Fa:%d-%d", stats->totfacesel, stats->totface);
- }
- else if(scene->obedit->type==OB_ARMATURE) {
- s+= sprintf(s, "Ve:%d-%d | Bo:%d-%d", stats->totvertsel, stats->totvert, stats->totbonesel, stats->totbone);
- }
- else {
- s+= sprintf(s, "Ve:%d-%d", stats->totvertsel, stats->totvert);
- }
-
- strcat(s, memstr);
- }
- else if(ob && (ob->mode & OB_MODE_POSE)) {
- s += sprintf(s, "Bo:%d-%d %s",
- stats->totbonesel, stats->totbone, memstr);
- }
- else {
- s += sprintf(s, "Ve:%d | Fa:%d | Ob:%d-%d | La:%d%s",
- stats->totvert, stats->totface, stats->totobj, stats->totobjsel, stats->totlamp, memstr);
- }
-
- if(ob)
- sprintf(s, " | %s", ob->id.name+2);
-}
-
-void ED_info_stats_clear(Scene *scene)
-{
- if(scene->stats) {
- MEM_freeN(scene->stats);
- scene->stats= NULL;
- }
-}
-
-char *ED_info_stats_string(Scene *scene)
-{
- if(!scene->stats)
- stats_update(scene);
- stats_string(scene);
-
- return scene->stats->infostr;
-}
-
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index d3f9c97205c..fe5bbf04af1 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -1,5 +1,5 @@
/**
- * $Id$
+ * $Id:
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -58,7 +58,6 @@
#include "UI_view2d.h"
#include "ED_markers.h"
-#include "ED_object.h"
#include "info_intern.h" // own include
@@ -167,10 +166,6 @@ static void info_header_listener(ARegion *ar, wmNotifier *wmn)
if(wmn->data==ND_RENDER_RESULT)
ED_region_tag_redraw(ar);
break;
- case NC_SPACE:
- if(wmn->data == ND_SPACE_INFO)
- ED_region_tag_redraw(ar);
- break;
}
}
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index 3040d73bda9..cda79ea0764 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -28,7 +28,6 @@
#include <string.h>
#include <stdio.h>
-#include <float.h>
#include "DNA_actuator_types.h"
#include "DNA_controller_types.h"
@@ -74,10 +73,18 @@
#include "logic_intern.h"
+
+/* XXX */
+static int pupmenu() {return 1;}
+/* XXX */
+
#define MAX_RENDER_PASS 100
#define B_REDR 1
#define B_IDNAME 2
+#define B_ADD_PROP 2701
+#define B_CHANGE_PROP 2702
+
#define B_ADD_SENS 2703
#define B_CHANGE_SENS 2704
#define B_DEL_SENS 2705
@@ -197,7 +204,7 @@ static void make_unique_prop_names_cb(bContext *C, void *strv, void *redraw_view
}
-static void sca_move_sensor(bContext *C, void *datav, void *move_up)
+static void sca_move_sensor(bContext *C, void *datav, void *data2_unused)
{
Scene *scene= CTX_data_scene(C);
bSensor *sens_to_delete= datav;
@@ -205,8 +212,7 @@ static void sca_move_sensor(bContext *C, void *datav, void *move_up)
Base *base;
bSensor *sens, *tmp;
- // val= pupmenu("Move up%x1|Move down %x2");
- val = move_up ? 1:2;
+ val= pupmenu("Move up%x1|Move down %x2");
if(val>0) {
/* now find out which object has this ... */
@@ -249,7 +255,7 @@ static void sca_move_sensor(bContext *C, void *datav, void *move_up)
}
}
-static void sca_move_controller(bContext *C, void *datav, void *move_up)
+static void sca_move_controller(bContext *C, void *datav, void *data2_unused)
{
Scene *scene= CTX_data_scene(C);
bController *controller_to_del= datav;
@@ -257,8 +263,7 @@ static void sca_move_controller(bContext *C, void *datav, void *move_up)
Base *base;
bController *cont, *tmp;
- //val= pupmenu("Move up%x1|Move down %x2");
- val = move_up ? 1:2;
+ val= pupmenu("Move up%x1|Move down %x2");
if(val>0) {
/* now find out which object has this ... */
@@ -304,7 +309,7 @@ static void sca_move_controller(bContext *C, void *datav, void *move_up)
}
}
-static void sca_move_actuator(bContext *C, void *datav, void *move_up)
+static void sca_move_actuator(bContext *C, void *datav, void *data2_unused)
{
Scene *scene= CTX_data_scene(C);
bActuator *actuator_to_move= datav;
@@ -312,8 +317,7 @@ static void sca_move_actuator(bContext *C, void *datav, void *move_up)
Base *base;
bActuator *act, *tmp;
- //val= pupmenu("Move up%x1|Move down %x2");
- val = move_up ? 1:2;
+ val= pupmenu("Move up%x1|Move down %x2");
if(val>0) {
/* now find out which object has this ... */
@@ -359,6 +363,7 @@ static void sca_move_actuator(bContext *C, void *datav, void *move_up)
void do_logic_buts(bContext *C, void *arg, int event)
{
+ bProperty *prop;
bSensor *sens;
bController *cont;
bActuator *act;
@@ -380,7 +385,25 @@ void do_logic_buts(bContext *C, void *arg, int event)
case B_SETMAINACTOR:
ob->gameflag &= ~(OB_SECTOR|OB_PROP);
break;
-
+
+
+ case B_ADD_PROP:
+ prop= new_property(PROP_FLOAT);
+ make_unique_prop_names(C, prop->name);
+ BLI_addtail(&ob->prop, prop);
+ ED_undo_push(C, "Add property");
+ break;
+#if 0 // XXX Now done in python
+ case B_CHANGE_PROP:
+ prop= ob->prop.first;
+ while(prop) {
+ if(prop->type!=prop->otype) {
+ init_property(prop);
+ }
+ prop= prop->next;
+ }
+ break;
+#endif
case B_ADD_SENS:
for(ob=G.main->object.first; ob; ob=ob->id.next) {
if(ob->scaflag & OB_ADDSENS) {
@@ -979,7 +1002,6 @@ static void draw_default_sensor_header(bSensor *sens,
uiBut *but;
/* Pulsing and frequency */
- uiBlockBeginAlign(block);
uiDefIconButBitS(block, TOG, SENS_PULSE_REPEAT, 1, ICON_DOTSUP,
(short)(x + 10 + 0. * (w-20)), (short)(y - 21), (short)(0.1 * (w-20)), 19,
&sens->pulse, 0.0, 0.0, 0, 0,
@@ -993,10 +1015,8 @@ static void draw_default_sensor_header(bSensor *sens,
(short)(x + 10 + 0.2 * (w-20)), (short)(y - 21), (short)(0.275 * (w-20)), 19,
&sens->freq, 0.0, 10000.0, 0, 0,
"Delay between repeated pulses (in logic tics, 0 = no delay)");
- uiBlockEndAlign(block);
/* value or shift? */
- uiBlockBeginAlign(block);
but= uiDefButS(block, TOG, 1, "Level",
(short)(x + 10 + 0.5 * (w-20)), (short)(y - 21), (short)(0.20 * (w-20)), 19,
&sens->level, 0.0, 0.0, 0, 0,
@@ -1007,7 +1027,6 @@ static void draw_default_sensor_header(bSensor *sens,
&sens->tap, 0.0, 0.0, 0, 0,
"Trigger controllers only for an instant, even while the sensor remains true");
uiButSetFunc(but, verify_logicbutton_func, sens, &(sens->tap));
- uiBlockEndAlign(block);
uiDefButS(block, TOG, 1, "Inv",
(short)(x + 10 + 0.85 * (w-20)), (short)(y - 21), (short)(0.15 * (w-20)), 19,
@@ -1295,16 +1314,10 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short
* proper compatibility with older .blend files. */
str= "Type %t|Left button %x1|Middle button %x2|"
"Right button %x4|Wheel Up %x5|Wheel Down %x6|Movement %x8|Mouse over %x16|Mouse over any%x32";
- uiDefButS(block, MENU, B_REDR, str, xco+10, yco-44, (width*0.8f)-20, 19,
+ uiDefButS(block, MENU, B_REDR, str, xco+10, yco-44, width-20, 19,
&ms->type, 0, 31, 0, 0,
"Specify the type of event this mouse sensor should trigger on");
- if(ms->type==32) {
- uiDefButBitS(block, TOG, SENS_MOUSE_FOCUS_PULSE, B_REDR, "Pulse",(short)(xco + 10) + (width*0.8f)-20,(short)(yco - 44),
- (short)(0.20 * (width-20)), 19, &ms->flag, 0.0, 0.0, 0, 0,
- "Moving the mouse over a different object generates a pulse");
- }
-
yco-= ysize;
break;
}
@@ -1646,8 +1659,7 @@ char *get_state_name(Object *ob, short bit)
static void check_state_mask(bContext *C, void *arg1_but, void *arg2_mask)
{
- wmWindow *win= CTX_wm_window(C);
- int shift= win->eventstate->shift;
+ int shift= 0; // XXX
unsigned int *cont_mask = arg2_mask;
uiBut *but = arg1_but;
@@ -1972,7 +1984,7 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh
sa->sndnr = 0;
if(sa->flag & ACT_SND_3D_SOUND)
- ysize = 180;
+ ysize = 114;
else
ysize = 92;
@@ -1985,31 +1997,24 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh
/* 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.");
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, sa->sound->id.name+2, 0.0, 21.0, 0, 0, "");
+ uiDefBut(block, TEX, B_IDNAME, "SO:",xco+30,yco-22,width-40,19, sa->sound->id.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 und 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, "Rolloff: ", xco+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, "Reference distance: ", xco+wval+10, yco-110, wval, 19, &sa->sound3D.reference_distance, 0.0, 1000.0, 0.0, 0.0, "The reference distance is the distance where the sound has a gain of 1.0.");
}
}
MEM_freeN(str);
}
else {
- uiDefButO(block, BUT, "sound.open", 0, "Load Sound", xco+10, yco-22, width-20, 19, "Load a sound file.");
+ uiDefBut(block, LABEL, 0, "Use Sound window (F10) to load samples", xco, yco-24, width, 19, NULL, 0, 0, 0, 0, "");
}
yco-= ysize;
@@ -3022,7 +3027,7 @@ void logic_buttons(bContext *C, ARegion *ar)
/* start with the controller because we need to know which one is visible */
/* ******************************* */
- xco= 400; yco= 170; width= 300;
+ xco= 500; yco= 170; width= 300;
uiDefBlockBut(block, controller_menu, NULL, "Controllers", xco-10, yco+35, 100, UI_UNIT_Y, "");
@@ -3131,17 +3136,9 @@ void logic_buttons(bContext *C, ARegion *ar)
cpack(0x999999);
glRecti(xco+22, yco, xco+width-22,yco+19);
but= uiDefBut(block, LABEL, 0, controller_name(cont->type), (short)(xco+22), yco, 70, UI_UNIT_Y, cont, 0, 0, 0, 0, "Controller type");
- //uiButSetFunc(but, sca_move_controller, cont, NULL);
+ uiButSetFunc(but, sca_move_controller, cont, NULL);
but= uiDefBut(block, LABEL, 0, cont->name,(short)(xco+92), yco,(short)(width-158), UI_UNIT_Y, cont, 0, 0, 0, 0, "Controller name");
- //uiButSetFunc(but, sca_move_controller, cont, NULL);
-
- uiBlockBeginAlign(block);
- but= uiDefIconBut(block, BUT, B_REDR, VICON_MOVE_UP, (short)(xco+width-(110+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick up");
- uiButSetFunc(but, sca_move_controller, cont, (void *)TRUE);
- but= uiDefIconBut(block, BUT, B_REDR, VICON_MOVE_DOWN, (short)(xco+width-(88+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick down");
- uiButSetFunc(but, sca_move_controller, cont, (void *)FALSE);
- uiBlockEndAlign(block);
-
+ uiButSetFunc(but, sca_move_controller, cont, NULL);
ycoo= yco;
}
@@ -3162,7 +3159,7 @@ void logic_buttons(bContext *C, ARegion *ar)
}
/* ******************************* */
- xco= 10; yco= 170; width= 300;
+ xco= 10; yco= 170; width= 400;
uiDefBlockBut(block, sensor_menu, NULL, "Sensors", xco-10, yco+35, 70, UI_UNIT_Y, "");
@@ -3223,16 +3220,9 @@ void logic_buttons(bContext *C, ARegion *ar)
set_col_sensor(sens->type, 1);
glRecti(xco+22, yco, xco+width-22,yco+19);
but= uiDefBut(block, LABEL, 0, sensor_name(sens->type), (short)(xco+22), yco, 80, UI_UNIT_Y, sens, 0, 0, 0, 0, "");
- //uiButSetFunc(but, sca_move_sensor, sens, NULL);
+ uiButSetFunc(but, sca_move_sensor, sens, NULL);
but= uiDefBut(block, LABEL, 0, sens->name, (short)(xco+102), yco, (short)(width-(pin?146:124)), UI_UNIT_Y, sens, 0, 31, 0, 0, "");
- //uiButSetFunc(but, sca_move_sensor, sens, NULL);
-
- uiBlockBeginAlign(block);
- but= uiDefIconBut(block, BUT, B_REDR, VICON_MOVE_UP, (short)(xco+width-(66+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick up");
- uiButSetFunc(but, sca_move_sensor, sens, (void *)TRUE);
- but= uiDefIconBut(block, BUT, B_REDR, VICON_MOVE_DOWN, (short)(xco+width-(44+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick down");
- uiButSetFunc(but, sca_move_sensor, sens, (void *)FALSE);
- uiBlockEndAlign(block);
+ uiButSetFunc(but, sca_move_sensor, sens, NULL);
}
but= uiDefIconBut(block, LINK, 0, ICON_LINK, (short)(xco+width), ycoo, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
@@ -3247,7 +3237,7 @@ void logic_buttons(bContext *C, ARegion *ar)
}
/* ******************************* */
- xco= 800; yco= 170; width= 300;
+ xco= 900; yco= 170; width= 400;
uiDefBlockBut(block, actuator_menu, NULL, "Actuators", xco-10, yco+35, 90, UI_UNIT_Y, "");
@@ -3303,17 +3293,9 @@ void logic_buttons(bContext *C, ARegion *ar)
set_col_actuator(act->type, 1);
glRecti((short)(xco+22), yco, (short)(xco+width-22),(short)(yco+19));
but= uiDefBut(block, LABEL, 0, actuator_name(act->type), (short)(xco+22), yco, 90, UI_UNIT_Y, act, 0, 0, 0, 0, "Actuator type");
- // uiButSetFunc(but, sca_move_actuator, act, NULL);
+ uiButSetFunc(but, sca_move_actuator, act, NULL);
but= uiDefBut(block, LABEL, 0, act->name, (short)(xco+112), yco, (short)(width-(pin?156:134)), UI_UNIT_Y, act, 0, 0, 0, 0, "Actuator name");
- // uiButSetFunc(but, sca_move_actuator, act, NULL);
-
- uiBlockBeginAlign(block);
- but= uiDefIconBut(block, BUT, B_REDR, VICON_MOVE_UP, (short)(xco+width-(66+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick up");
- uiButSetFunc(but, sca_move_actuator, act, (void *)TRUE);
- but= uiDefIconBut(block, BUT, B_REDR, VICON_MOVE_DOWN, (short)(xco+width-(44+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick down");
- uiButSetFunc(but, sca_move_actuator, act, (void *)FALSE);
- uiBlockEndAlign(block);
-
+ uiButSetFunc(but, sca_move_actuator, act, NULL);
ycoo= yco;
}
diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c
index 3c46522bba2..703b408aae6 100644
--- a/source/blender/editors/space_logic/space_logic.c
+++ b/source/blender/editors/space_logic/space_logic.c
@@ -102,13 +102,6 @@ static SpaceLink *logic_new(const bContext *C)
slogic= MEM_callocN(sizeof(SpaceLogic), "initlogic");
slogic->spacetype= SPACE_LOGIC;
- /* default options */
- slogic->scaflag = (BUTS_SENS_SEL|BUTS_SENS_ACT|BUTS_SENS_LINK) |
- (BUTS_CONT_SEL|BUTS_CONT_ACT|BUTS_CONT_LINK) |
- (BUTS_ACT_SEL|BUTS_ACT_ACT|BUTS_ACT_LINK) |
- (BUTS_SENS_STATE|BUTS_ACT_STATE);
-
-
/* header */
ar= MEM_callocN(sizeof(ARegion), "header for logic");
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index 8532d78aa06..7184737e0ba 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -119,7 +119,6 @@ static int nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
for (ale= anim_data.first; ale; ale= ale->next) {
- // TODO: need some way to select active animdata too...
if (ale->type == ANIMTYPE_NLATRACK) {
NlaTrack *nlt= (NlaTrack *)ale->data;
AnimData *adt= ale->adt;
@@ -211,19 +210,19 @@ static void nla_panel_animdata (const bContext *C, Panel *pa)
/* Active Action Properties ------------------------------------- */
/* action */
row= uiLayoutRow(layout, 1);
- uiTemplateID(row, (bContext *)C, &adt_ptr, "action", NULL /*"ACT_OT_new"*/, NULL, NULL /*"ACT_OT_unlink"*/); // XXX: need to make these operators
+ uiItemR(row, NULL, 0, &adt_ptr, "action", 0, 0, 0);
/* extrapolation */
row= uiLayoutRow(layout, 1);
- uiItemR(row, NULL, 0, &adt_ptr, "action_extrapolation", 0);
+ uiItemR(row, NULL, 0, &adt_ptr, "action_extrapolation", 0, 0, 0);
/* blending */
row= uiLayoutRow(layout, 1);
- uiItemR(row, NULL, 0, &adt_ptr, "action_blending", 0);
+ uiItemR(row, NULL, 0, &adt_ptr, "action_blending", 0, 0, 0);
/* influence */
row= uiLayoutRow(layout, 1);
- uiItemR(row, NULL, 0, &adt_ptr, "action_influence", 0);
+ uiItemR(row, NULL, 0, &adt_ptr, "action_influence", 0, 0, 0);
}
/* active NLA-Track */
@@ -243,7 +242,7 @@ static void nla_panel_track (const bContext *C, Panel *pa)
/* Info - Active NLA-Context:Track ---------------------- */
row= uiLayoutRow(layout, 1);
- uiItemR(row, NULL, ICON_NLA, &nlt_ptr, "name", 0);
+ uiItemR(row, NULL, ICON_NLA, &nlt_ptr, "name", 0, 0, 0);
}
/* generic settings for active NLA-Strip */
@@ -263,41 +262,41 @@ static void nla_panel_properties(const bContext *C, Panel *pa)
/* Strip Properties ------------------------------------- */
/* strip type */
row= uiLayoutColumn(layout, 1);
- uiItemR(row, NULL, ICON_NLA, &strip_ptr, "name", 0); // XXX icon?
- uiItemR(row, NULL, 0, &strip_ptr, "type", 0);
+ uiItemR(row, NULL, ICON_NLA, &strip_ptr, "name", 0, 0, 0); // XXX icon?
+ uiItemR(row, NULL, 0, &strip_ptr, "type", 0, 0, 0);
/* strip extents */
column= uiLayoutColumn(layout, 1);
uiItemL(column, "Strip Extents:", 0);
- uiItemR(column, NULL, 0, &strip_ptr, "start_frame", 0);
- uiItemR(column, NULL, 0, &strip_ptr, "end_frame", 0);
+ uiItemR(column, NULL, 0, &strip_ptr, "start_frame", 0, 0, 0);
+ uiItemR(column, NULL, 0, &strip_ptr, "end_frame", 0, 0, 0);
/* extrapolation */
row= uiLayoutRow(layout, 1);
- uiItemR(row, NULL, 0, &strip_ptr, "extrapolation", 0);
+ uiItemR(row, NULL, 0, &strip_ptr, "extrapolation", 0, 0, 0);
/* blending */
row= uiLayoutRow(layout, 1);
- uiItemR(row, NULL, 0, &strip_ptr, "blending", 0);
+ uiItemR(row, NULL, 0, &strip_ptr, "blending", 0, 0, 0);
/* blend in/out + autoblending
* - blend in/out can only be set when autoblending is off
*/
column= uiLayoutColumn(layout, 1);
uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "animated_influence")==0);
- uiItemR(column, NULL, 0, &strip_ptr, "auto_blending", 0); // XXX as toggle?
+ uiItemR(column, NULL, 0, &strip_ptr, "auto_blending", 0, 0, 0); // XXX as toggle?
subcol= uiLayoutColumn(column, 1);
uiLayoutSetActive(subcol, RNA_boolean_get(&strip_ptr, "auto_blending")==0);
- uiItemR(subcol, NULL, 0, &strip_ptr, "blend_in", 0);
- uiItemR(subcol, NULL, 0, &strip_ptr, "blend_out", 0);
+ uiItemR(subcol, NULL, 0, &strip_ptr, "blend_in", 0, 0, 0);
+ uiItemR(subcol, NULL, 0, &strip_ptr, "blend_out", 0, 0, 0);
/* settings */
column= uiLayoutColumn(layout, 1);
uiLayoutSetActive(column, !(RNA_boolean_get(&strip_ptr, "animated_influence") || RNA_boolean_get(&strip_ptr, "animated_time")));
uiItemL(column, "Playback Settings:", 0);
- uiItemR(column, NULL, 0, &strip_ptr, "muted", 0);
- uiItemR(column, NULL, 0, &strip_ptr, "reversed", 0);
+ uiItemR(column, NULL, 0, &strip_ptr, "muted", 0, 0, 0);
+ uiItemR(column, NULL, 0, &strip_ptr, "reversed", 0, 0, 0);
}
@@ -319,21 +318,21 @@ static void nla_panel_actclip(const bContext *C, Panel *pa)
/* Strip Properties ------------------------------------- */
/* action pointer */
row= uiLayoutRow(layout, 1);
- uiItemR(row, NULL, ICON_ACTION, &strip_ptr, "action", 0);
+ uiItemR(row, NULL, ICON_ACTION, &strip_ptr, "action", 0, 0, 0);
/* action extents */
// XXX custom names were used here (to avoid the prefixes)... probably not necessary in future?
column= uiLayoutColumn(layout, 1);
uiItemL(column, "Action Extents:", 0);
- uiItemR(column, "Start Frame", 0, &strip_ptr, "action_start_frame", 0);
- uiItemR(column, "End Frame", 0, &strip_ptr, "action_end_frame", 0);
+ uiItemR(column, "Start Frame", 0, &strip_ptr, "action_start_frame", 0, 0, 0);
+ uiItemR(column, "End Frame", 0, &strip_ptr, "action_end_frame", 0, 0, 0);
/* action usage */
column= uiLayoutColumn(layout, 1);
uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "animated_time")==0);
uiItemL(column, "Playback Settings:", 0);
- uiItemR(column, NULL, 0, &strip_ptr, "scale", 0);
- uiItemR(column, NULL, 0, &strip_ptr, "repeat", 0);
+ uiItemR(column, NULL, 0, &strip_ptr, "scale", 0, 0, 0);
+ uiItemR(column, NULL, 0, &strip_ptr, "repeat", 0, 0, 0);
}
/* evaluation settings for active NLA-Strip */
@@ -352,19 +351,19 @@ static void nla_panel_evaluation(const bContext *C, Panel *pa)
uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL);
column= uiLayoutColumn(layout, 1);
- uiItemR(column, NULL, 0, &strip_ptr, "animated_influence", 0);
+ uiItemR(column, NULL, 0, &strip_ptr, "animated_influence", 0, 0, 0);
subcolumn= uiLayoutColumn(column, 1);
uiLayoutSetEnabled(subcolumn, RNA_boolean_get(&strip_ptr, "animated_influence"));
- uiItemR(subcolumn, NULL, 0, &strip_ptr, "influence", 0);
+ uiItemR(subcolumn, NULL, 0, &strip_ptr, "influence", 0, 0, 0);
column= uiLayoutColumn(layout, 1);
- uiItemR(column, NULL, 0, &strip_ptr, "animated_time", 0);
+ uiItemR(column, NULL, 0, &strip_ptr, "animated_time", 0, 0, 0);
subcolumn= uiLayoutColumn(column, 1);
uiLayoutSetEnabled(subcolumn, RNA_boolean_get(&strip_ptr, "animated_time"));
- uiItemR(subcolumn, NULL, 0, &strip_ptr, "strip_time", 0);
+ uiItemR(subcolumn, NULL, 0, &strip_ptr, "strip_time", 0, 0, 0);
}
/* F-Modifiers for active NLA-Strip */
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index ccf23266427..063b329b7a1 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -97,7 +97,6 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
- View2D *v2d= &ac->ar->v2d;
int notifierFlags = 0;
/* get the channel that was clicked on */
@@ -187,14 +186,14 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
else
offset= 0;
- if (x >= (v2d->cur.xmax-NLACHANNEL_BUTTON_WIDTH)) {
+ if (x >= (NLACHANNEL_NAMEWIDTH-NLACHANNEL_BUTTON_WIDTH)) {
/* toggle protection (only if there's a toggle there) */
nlt->flag ^= NLATRACK_PROTECTED;
/* notifier flags - channel was edited */
notifierFlags |= ND_ANIMCHAN_EDIT;
}
- else if (x >= (v2d->cur.xmax-2*NLACHANNEL_BUTTON_WIDTH)) {
+ else if (x >= (NLACHANNEL_NAMEWIDTH-2*NLACHANNEL_BUTTON_WIDTH)) {
/* toggle mute */
nlt->flag ^= NLATRACK_MUTED;
@@ -233,7 +232,7 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
{
AnimData *adt= BKE_animdata_from_id(ale->owner); /* this won't crash, right? */
- if (x >= (v2d->cur.xmax-NLACHANNEL_BUTTON_WIDTH)) {
+ if (x >= (NLACHANNEL_NAMEWIDTH-NLACHANNEL_BUTTON_WIDTH)) {
if (nlaedit_is_tweakmode_on(ac) == 0) {
/* 'push-down' action - only usable when not in TweakMode */
// TODO: make this use the operator instead of calling the function directly
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index b21f37ab678..f30954292b4 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -167,7 +167,7 @@ static void nla_action_draw_keyframes (AnimData *adt, bAction *act, View2D *v2d,
* - size is 3.0f which is smaller than the editable keyframes, so that there is a distinction
*/
for (ak= keys.first; ak; ak= ak->next)
- draw_keyframe_shape(ak->cfra, y, xscale, 3.0f, 0, ak->key_type, KEYFRAME_SHAPE_FRAME);
+ draw_keyframe_shape(ak->cfra, y, xscale, 3.0f, 0, KEYFRAME_SHAPE_FRAME);
/* free icons */
BLI_dlrbTree_free(&keys);
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index e53ccd004db..763f4116416 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -1249,7 +1249,7 @@ static int nlaedit_apply_scale_exec (bContext *C, wmOperator *op)
* but leave everything else alone
*/
strip->scale= 1.0f;
- calc_action_range(strip->act, &strip->actstart, &strip->actend, 0);
+ calc_action_range(strip->act, &strip->actstart, &strip->actend, 1);
}
}
}
diff --git a/source/blender/editors/space_nla/nla_header.c b/source/blender/editors/space_nla/nla_header.c
index 0d3bf2cb6b1..e507efb0a30 100644
--- a/source/blender/editors/space_nla/nla_header.c
+++ b/source/blender/editors/space_nla/nla_header.c
@@ -94,14 +94,14 @@ static void nla_viewmenu(bContext *C, uiLayout *layout, void *arg_unused)
uiItemS(layout);
- uiItemR(layout, NULL, 0, &spaceptr, "show_cframe_indicator", 0);
+ uiItemR(layout, NULL, 0, &spaceptr, "show_cframe_indicator", 0, 0, 0);
if (snla->flag & SNLA_DRAWTIME)
uiItemO(layout, "Show Frames", 0, "ANIM_OT_time_toggle");
else
uiItemO(layout, "Show Seconds", 0, "ANIM_OT_time_toggle");
- uiItemR(layout, NULL, 0, &spaceptr, "show_strip_curves", 0);
+ uiItemR(layout, NULL, 0, &spaceptr, "show_strip_curves", 0, 0, 0);
uiItemS(layout);
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 89d4e7cddf2..c4f929274c7 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -488,10 +488,6 @@ static void nla_listener(ScrArea *sa, wmNotifier *wmn)
}*/
ED_area_tag_refresh(sa);
break;
- case NC_SPACE:
- if(wmn->data == ND_SPACE_NLA)
- ED_area_tag_redraw(sa);
- break;
}
}
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 98de32a105a..50cf193f37b 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -22,7 +22,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): David Millan Escriva, Juho Vepsäläinen, Bob Holcomb
+ * Contributor(s): David Millan Escriva, Juho Vepsäläinen
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -247,13 +247,13 @@ static int node_buts_mix_rgb(uiBlock *block, bNodeTree *ntree, bNode *node, rctf
/* blend type */
uiBlockBeginAlign(block);
- bt=uiDefButS(block, MENU, B_NODE_EXEC, "Mix %x0|Add %x1|Subtract %x3|Multiply %x2|Screen %x4|Overlay %x9|Divide %x5|Difference %x6|Darken %x7|Lighten %x8|Dodge %x10|Burn %x11|Color %x15|Value %x14|Saturation %x13|Hue %x12|Soft Light %x16|Linear Light %x17",
+ bt=uiDefButS(block, MENU, B_NODE_EXEC, "Mix %x0|Add %x1|Subtract %x3|Multiply %x2|Screen %x4|Overlay %x9|Divide %x5|Difference %x6|Darken %x7|Lighten %x8|Dodge %x10|Burn %x11|Color %x15|Value %x14|Saturation %x13|Hue %x12",
(short)butr->xmin, (short)butr->ymin, butr->xmax-butr->xmin -(a_but?20:0), 20,
&node->custom1, 0, 0, 0, 0, "");
uiButSetFunc(bt, node_but_title_cb, node, bt);
/* Alpha option, composite */
if(a_but)
- uiDefIconButS(block, TOG, B_NODE_EXEC, ICON_IMAGE_RGB_ALPHA,
+ uiDefButS(block, TOG, B_NODE_EXEC, "A",
(short)butr->xmax-20, (short)butr->ymin, 20, 20,
&node->custom2, 0, 0, 0, 0, "Include Alpha of 2nd input in this operation");
}
@@ -1077,7 +1077,7 @@ static int node_composit_buts_renderlayers(uiBlock *block, bNodeTree *ntree, bNo
/* browse button layer */
strp= scene_layer_menu(node->id?(Scene *)node->id:scene);
if(node->id)
- bt= uiDefIconTextButS(block, MENU, B_NODE_EXEC, ICON_RENDERLAYERS, strp,
+ bt= uiDefIconTextButS(block, MENU, B_NODE_EXEC, ICON_SCENE_DATA, strp,
butr->xmin+20, butr->ymin, (butr->xmax-butr->xmin)-40, 19,
&node->custom1, 0, 0, 0, 0, "Choose Render Layer");
else
@@ -1459,28 +1459,26 @@ static int node_composit_buts_lensdist(uiBlock *block, bNodeTree *ntree, bNode *
static int node_composit_buts_vecblur(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
{
if(block) {
- PointerRNA ptr;
+ NodeBlurData *nbd= node->storage;
short dy= butr->ymin;
short dx= (butr->xmax-butr->xmin);
- RNA_pointer_create((ID *)ntree, &RNA_Node, node, &ptr);
-
- uiBlockBeginAlign(block);
- uiDefButR(block, NUM, B_NODE_EXEC, NULL,
- butr->xmin, dy+76, dx, 19,
- &ptr, "samples", 0, 1, 256, 0, 0, NULL);
- uiDefButR(block, NUM, B_NODE_EXEC, NULL,
- butr->xmin, dy+57, dx, 19,
- &ptr, "min_speed", 0, 0, 1024, 0, 0, NULL);
- uiDefButR(block, NUM, B_NODE_EXEC, NULL,
- butr->xmin, dy+38, dx, 19,
- &ptr, "max_speed", 0, 0, 1024, 0, 0, NULL);
- uiDefButR(block, NUM, B_NODE_EXEC, "Blur",
- butr->xmin, dy+19, dx, 19,
- &ptr, "factor", 0, 0, 2, 10, 2, NULL);
- uiDefButR(block, TOG, B_NODE_EXEC, NULL,
- butr->xmin, dy, dx, 19,
- &ptr, "curved", 0, 0, 2, 10, 2, NULL);
+ uiBlockBeginAlign(block);
+ uiDefButS(block, NUM, B_NODE_EXEC, "Samples:",
+ butr->xmin, dy+76, dx, 19,
+ &nbd->samples, 1, 256, 0, 0, "Amount of samples");
+ uiDefButS(block, NUM, B_NODE_EXEC, "MinSpeed:",
+ butr->xmin, dy+57, dx, 19,
+ &nbd->minspeed, 0, 1024, 0, 0, "Minimum speed for a pixel to be blurred, used to separate background from foreground");
+ uiDefButS(block, NUM, B_NODE_EXEC, "MaxSpeed:",
+ butr->xmin, dy+38, dx, 19,
+ &nbd->maxspeed, 0, 1024, 0, 0, "If not zero, maximum speed in pixels");
+ uiDefButF(block, NUM, B_NODE_EXEC, "BlurFac:",
+ butr->xmin, dy+19, dx, 19,
+ &nbd->fac, 0.0f, 2.0f, 10, 2, "Scaling factor for motion vectors, actually 'shutter speed' in frames");
+ uiDefButS(block, TOG, B_NODE_EXEC, "Curved",
+ butr->xmin, dy, dx, 19,
+ &nbd->curved, 0.0f, 2.0f, 10, 2, "Interpolate between frames in a bezier curve, rather than linearly");
uiBlockEndAlign(block);
}
return 95;
@@ -1647,35 +1645,45 @@ static int node_composit_buts_dilateerode(uiBlock *block, bNodeTree *ntree, bNod
static int node_composit_buts_diff_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
{
if(block) {
+ short sx= (butr->xmax-butr->xmin)/4;
+ short dx= (butr->xmax-butr->xmin)/3;
NodeChroma *c= node->storage;
uiBlockBeginAlign(block);
- uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "Tolerance: ",
+ /*color space selectors*/
+ uiDefButS(block, ROW,B_NODE_EXEC,"RGB",
+ butr->xmin,butr->ymin+60,sx,20,
+ &node->custom1,1,1, 0, 0, "RGB Color Space");
+ uiDefButS(block, ROW,B_NODE_EXEC,"HSV",
+ butr->xmin+sx,butr->ymin+60,sx,20,
+ &node->custom1,1,2, 0, 0, "HSV Color Space");
+ uiDefButS(block, ROW,B_NODE_EXEC,"YUV",
+ butr->xmin+2*sx,butr->ymin+60,sx,20,
+ &node->custom1,1,3, 0, 0, "YUV Color Space");
+ uiDefButS(block, ROW,B_NODE_EXEC,"YCC",
+ butr->xmin+3*sx,butr->ymin+60,sx,20,
+ &node->custom1,1,4, 0, 0, "YCbCr Color Space");
+ /*channel tolorences*/
+ uiDefButF(block, NUM, B_NODE_EXEC, " ",
+ butr->xmin, butr->ymin+40, dx, 20,
+ &c->t1, 0.0f, 1.0f, 100, 0, "Channel 1 Tolerance");
+ uiDefButF(block, NUM, B_NODE_EXEC, " ",
+ butr->xmin+dx, butr->ymin+40, dx, 20,
+ &c->t2, 0.0f, 1.0f, 100, 0, "Channel 2 Tolorence");
+ uiDefButF(block, NUM, B_NODE_EXEC, " ",
+ butr->xmin+2*dx, butr->ymin+40, dx, 20,
+ &c->t3, 0.0f, 1.0f, 100, 0, "Channel 3 Tolorence");
+ /*falloff parameters*/
+ /*
+ uiDefButF(block, NUMSLI, B_NODE_EXEC, "Falloff Size ",
butr->xmin, butr->ymin+20, butr->xmax-butr->xmin, 20,
- &c->t1, 0.0f, 1.0f, 100, 0, "Color differences below this threshold are keyed.");
- uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "Falloff: ",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &c->t2, 0.0f, 1.0f, 100, 0, "Color differences below this additional threshold are partially keyed.");
- uiBlockEndAlign(block);
- }
- return 40;
-}
-
-static int node_composit_buts_distance_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
-{
- if(block) {
- NodeChroma *c= node->storage;
-
- uiBlockBeginAlign(block);
- uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "Tolerance: ",
+ &c->fsize, 0.0f, 1.0f, 100, 0, "");
+ */
+ uiDefButF(block, NUMSLI, B_NODE_EXEC, "Falloff: ",
butr->xmin, butr->ymin+20, butr->xmax-butr->xmin, 20,
- &c->t1, 0.0f, 1.0f, 100, 0, "Color distances below this threshold are keyed.");
- uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "Falloff: ",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &c->t2, 0.0f, 1.0f, 100, 0, "Color distances below this additional threshold are partially keyed.");
- uiBlockEndAlign(block);
+ &c->fstrength, 0.0f, 1.0f, 100, 0, "");
}
- return 40;
+ return 80;
}
static int node_composit_buts_color_spill(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
@@ -1707,7 +1715,6 @@ static int node_composit_buts_chroma_matte(uiBlock *block, bNodeTree *ntree, bNo
if(block) {
short dx=(butr->xmax-butr->xmin)/2;
NodeChroma *c= node->storage;
-
uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_NODE_EXEC, "Acceptance ",
@@ -1727,7 +1734,6 @@ static int node_composit_buts_chroma_matte(uiBlock *block, bNodeTree *ntree, bNo
uiDefButF(block, NUMSLI, B_NODE_EXEC, "Shadow Adjust ",
butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
&c->t3, 0.0f, 1.0f, 100, 0, "Adjusts the brightness of any shadows captured");
- uiBlockEndAlign(block);
if(c->t2 > c->t1)
c->t2=c->t1;
@@ -1735,28 +1741,6 @@ static int node_composit_buts_chroma_matte(uiBlock *block, bNodeTree *ntree, bNo
return 80;
}
-static int node_composit_buts_color_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
-{
- if(block) {
- NodeChroma *c= node->storage;
- uiBlockBeginAlign(block);
-
- uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "H: ",
- butr->xmin, butr->ymin+40, butr->xmax-butr->xmin, 20,
- &c->t1, 0.0f, 0.25f, 100, 0, "Hue tolerance for colors to be considered a keying color");
- uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "S: ",
- butr->xmin, butr->ymin+20, butr->xmax-butr->xmin, 20,
- &c->t2, 0.0f, 1.0f, 100, 0, "Saturation Tolerance for the color");
- uiDefButF(block, NUMSLI, B_NODE_EXEC+node->nr, "V: ",
- butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
- &c->t3, 0.0f, 1.0f, 100, 0, "Value Tolerance for the color");
-
- uiBlockEndAlign(block);
- }
- return 60;
-}
-
-
static int node_composit_buts_channel_matte(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
{
if(block) {
@@ -1991,29 +1975,6 @@ static int node_composit_buts_premulkey(uiBlock *block, bNodeTree *ntree, bNode
return 20;
}
-static int node_composit_buts_view_levels(uiBlock *block, bNodeTree *ntree, bNode *node, rctf *butr)
-{
- if(block) {
- short sx= (butr->xmax-butr->xmin)/5;
-
- /*color space selectors*/
- uiBlockBeginAlign(block);
- uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"C",
- butr->xmin,butr->ymin,sx,20,&node->custom1,1,1, 0, 0, "Combined RGB");
- uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"R",
- butr->xmin+sx,butr->ymin,sx,20,&node->custom1,1,2, 0, 0, "Red Channel");
- uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"G",
- butr->xmin+2*sx,butr->ymin,sx,20,&node->custom1,1,3, 0, 0, "Green Channel");
- uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"B",
- butr->xmin+3*sx,butr->ymin,sx,20,&node->custom1,1,4, 0, 0, "Blue Channel");
- uiDefButS(block, ROW,B_NODE_EXEC+node->nr,"L",
- butr->xmin+4*sx,butr->ymin,sx,20,&node->custom1,1,5, 0, 0, "Luminenc Channel");
- uiBlockEndAlign(block);
- }
- return 20;
-}
-
-
/* only once called */
static void node_composit_set_butfunc(bNodeType *ntype)
{
@@ -2107,22 +2068,17 @@ static void node_composit_set_butfunc(bNodeType *ntype)
break;
case CMP_NODE_OUTPUT_FILE:
ntype->butfunc= node_composit_buts_file_output;
- break;
+ break;
+
case CMP_NODE_DIFF_MATTE:
ntype->butfunc=node_composit_buts_diff_matte;
break;
- case CMP_NODE_DIST_MATTE:
- ntype->butfunc=node_composit_buts_distance_matte;
- break;
case CMP_NODE_COLOR_SPILL:
ntype->butfunc=node_composit_buts_color_spill;
break;
- case CMP_NODE_CHROMA_MATTE:
+ case CMP_NODE_CHROMA:
ntype->butfunc=node_composit_buts_chroma_matte;
break;
- case CMP_NODE_COLOR_MATTE:
- ntype->butfunc=node_composit_buts_color_matte;
- break;
case CMP_NODE_SCALE:
ntype->butfunc= node_composit_buts_scale;
break;
@@ -2147,9 +2103,6 @@ static void node_composit_set_butfunc(bNodeType *ntype)
case CMP_NODE_PREMULKEY:
ntype->butfunc= node_composit_buts_premulkey;
break;
- case CMP_NODE_VIEW_LEVELS:
- ntype->butfunc=node_composit_buts_view_levels;
- break;
default:
ntype->butfunc= NULL;
}
@@ -2672,4 +2625,66 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
node_draw_link_bezier(v2d, snode, link, th_col1, th_col2, do_shaded);
}
+#if 0
+
+static void nodes_panel_gpencil(short cntrl) // NODES_HANDLER_GREASEPENCIL
+{
+ uiBlock *block;
+ SpaceNode *snode;
+
+ snode= curarea->spacedata.first;
+
+ block= uiNewBlock(&curarea->uiblocks, "nodes_panel_gpencil", UI_EMBOSS, UI_HELV, curarea->win);
+ uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | cntrl);
+ uiSetPanelHandler(NODES_HANDLER_GREASEPENCIL); // for close and esc
+ if (uiNewPanel(curarea, block, "Grease Pencil", "SpaceNode", 100, 30, 318, 204)==0) return;
+
+ /* we can only really draw stuff if there are nodes (otherwise no events are handled */
+ if (snode->nodetree == NULL)
+ return;
+
+ /* allocate memory for gpd if drawing enabled (this must be done first or else we crash) */
+ if (snode->flag & SNODE_DISPGP) {
+ if (snode->gpd == NULL)
+ gpencil_data_setactive(curarea, gpencil_data_addnew());
+ }
+
+ if (snode->flag & SNODE_DISPGP) {
+ bGPdata *gpd= snode->gpd;
+ short newheight;
+
+ /* this is a variable height panel, newpanel doesnt force new size on existing panels */
+ /* so first we make it default height */
+ uiNewPanelHeight(block, 204);
+
+ /* draw button for showing gpencil settings and drawings */
+ uiDefButBitS(block, TOG, SNODE_DISPGP, B_REDR, "Use Grease Pencil", 10, 225, 150, 20, &snode->flag, 0, 0, 0, 0, "Display freehand annotations overlay over this Node Editor (draw using Shift-LMB)");
+
+ /* extend the panel if the contents won't fit */
+ newheight= draw_gpencil_panel(block, gpd, curarea);
+ uiNewPanelHeight(block, newheight);
+ }
+ else {
+ uiDefButBitS(block, TOG, SNODE_DISPGP, B_REDR, "Use Grease Pencil", 10, 225, 150, 20, &snode->flag, 0, 0, 0, 0, "Display freehand annotations overlay over this Node Editor");
+ uiDefBut(block, LABEL, 1, " ", 160, 180, 150, 20, NULL, 0.0, 0.0, 0, 0, "");
+ }
+}
+static void nodes_blockhandlers(ScrArea *sa)
+{
+ SpaceNode *snode= sa->spacedata.first;
+ short a;
+
+ for(a=0; a<SPACE_MAXHANDLER; a+=2) {
+ switch(snode->blockhandler[a]) {
+ case NODES_HANDLER_GREASEPENCIL:
+ nodes_panel_gpencil(snode->blockhandler[a+1]);
+ break;
+ }
+
+ /* clear action value for event */
+ snode->blockhandler[a+1]= 0;
+ }
+ uiDrawBlocksPanels(sa, 0);
+}
+#endif
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index bc81c25d106..e1b612d74e1 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -574,6 +574,7 @@ void ED_node_texture_default(Tex *tx)
nodeAddLink(tx->nodetree, in, fromsock, out, tosock);
ntreeSolveOrder(tx->nodetree); /* needed for pointers */
+ ntreeTexUpdatePreviews(tx->nodetree); /* XXX texture nodes should follow shader node methods (ton) */
}
/* Here we set the active tree(s), even called for each redraw now, so keep it fast :) */
@@ -1110,6 +1111,9 @@ static int node_resize_modal(bContext *C, wmOperator *op, wmEvent *event)
node->width= nsw->oldwidth + mx - nsw->mxstart;
CLAMP(node->width, node->typeinfo->minwidth, node->typeinfo->maxwidth);
}
+ // XXX
+ if(snode->nodetree->type == NTREE_TEXTURE)
+ ntreeTexUpdatePreviews(snode->nodetree); /* XXX texture nodes should follow shader node methods (ton) */
ED_region_tag_redraw(ar);
@@ -1655,6 +1659,7 @@ bNode *node_add_node(SpaceNode *snode, Scene *scene, int type, float locx, float
if(snode->nodetree->type==NTREE_TEXTURE) {
ntreeTexCheckCyclics(snode->edittree);
+ ntreeTexUpdatePreviews(snode->edittree); /* XXX texture nodes should follow shader node methods (ton) */
}
return node;
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index d3a445b18c0..cb25d29fd27 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -163,15 +163,6 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
if(wmn->data==ND_NODES)
ED_area_tag_refresh(sa);
break;
- case NC_TEXT:
- /* pynodes */
- if(wmn->data==ND_SHADING)
- ED_area_tag_refresh(sa);
- break;
- case NC_SPACE:
- if(wmn->data==ND_SPACE_NODE)
- ED_area_tag_refresh(sa);
- break;
}
}
@@ -193,9 +184,8 @@ static void node_area_refresh(const struct bContext *C, struct ScrArea *sa)
}
else if(snode->treetype==NTREE_TEXTURE) {
Tex *tex= (Tex *)snode->id;
- if(tex->use_nodes) {
- ED_preview_shader_job(C, sa, snode->id, NULL, NULL, 100, 100);
- }
+ if(tex->use_nodes)
+ ntreeTexUpdatePreviews(tex->nodetree);
}
}
}
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index a3b47d505fd..762ad82344b 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -1084,7 +1084,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
te->flag |= TE_LAZY_CLOSED;
}
else if(ELEM3(proptype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) {
- tot= RNA_property_array_length(ptr, prop);
+ tot= RNA_property_array_length(prop);
if(!(tselem->flag & TSE_CLOSED)) {
for(a=0; a<tot; a++)
@@ -1994,7 +1994,7 @@ static int tree_element_active_defgroup(bContext *C, Scene *scene, TreeElement *
ob= (Object *)tselem->id;
if(set) {
ob->actdef= te->index+1;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
}
else {
@@ -2120,8 +2120,10 @@ static int tree_element_active_psys(bContext *C, Scene *scene, TreeElement *te,
{
if(set) {
Object *ob= (Object *)tselem->id;
+ ParticleSystem *psys= te->directdata;
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, ob);
+ PE_change_act_psys(scene, ob, psys);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
// XXX extern_set_butspace(F7KEY, 0);
}
@@ -3719,7 +3721,7 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
/* item is part of an array, so must set the array_index */
*array_index= te->index;
}
- else if (RNA_property_array_length(ptr, prop)) {
+ else if (RNA_property_array_length(prop)) {
/* entire array was selected, so keyframe all */
*flag |= KSP_FLAG_WHOLE_ARRAY;
}
@@ -4682,7 +4684,7 @@ static void restrictbutton_modifier_cb(bContext *C, void *poin, void *poin2)
Scene *scene = (Scene *)poin;
Object *ob = (Object *)poin2;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
object_handle_update(scene, ob);
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
@@ -5272,10 +5274,7 @@ void draw_outliner(const bContext *C)
sizex_rna= MAX2(OL_RNA_COLX, sizex_rna+OL_RNA_COL_SPACEX);
/* get width of data (for setting 'tot' rect, this is column 1 + column 2 + a bit extra) */
- if (soops->outlinevis == SO_KEYMAP)
- sizex= sizex_rna + OL_RNA_COL_SIZEX*3 + 50; // XXX this is only really a quick hack to make this wide enough...
- else
- sizex= sizex_rna + OL_RNA_COL_SIZEX + 50;
+ sizex= sizex_rna + OL_RNA_COL_SIZEX + 50;
}
else {
/* width must take into account restriction columns (if visible) so that entries will still be visible */
@@ -5288,9 +5287,6 @@ void draw_outliner(const bContext *C)
sizex += OL_TOGW*3;
}
- /* tweak to display last line (when list bigger than window) */
- sizey += V2D_SCROLL_HEIGHT;
-
/* update size of tot-rect (extents of data/viewable area) */
UI_view2d_totRect_set(v2d, sizex, sizey);
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index 5058a167a29..f57445a32f1 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -137,10 +137,6 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
/* all actions now, todo: check outliner view mode? */
ED_region_tag_redraw(ar);
break;
- case NC_SPACE:
- if(wmn->data == ND_SPACE_OUTLINER)
- ED_region_tag_redraw(ar);
- break;
}
}
@@ -194,10 +190,6 @@ static void outliner_header_area_listener(ARegion *ar, wmNotifier *wmn)
if(wmn->data == ND_KEYINGSET)
ED_region_tag_redraw(ar);
break;
- case NC_SPACE:
- if(wmn->data == ND_SPACE_OUTLINER)
- ED_region_tag_redraw(ar);
- break;
}
}
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index e6d50976957..5d58ea431a9 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -242,13 +242,13 @@ static Sequence* sequencer_add_sound_strip(bContext *C, wmOperator *op, int star
sound = sound_new_file(CTX_data_main(C), filename);
- if (sound==NULL || sound->handle == NULL) {
+ if (sound==NULL || sound->snd_sound == NULL) {
if(op)
BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");
return NULL;
}
- info = AUD_getInfo(sound->handle);
+ info = AUD_getInfo(sound->snd_sound);
if (info.specs.format == AUD_FORMAT_INVALID) {
sound_delete(C, sound);
@@ -291,7 +291,7 @@ static int sequencer_add_movie_strip_exec(bContext *C, wmOperator *op)
struct anim *an;
char filename[FILE_MAX];
- Sequence *seq, *soundseq=NULL; /* generic strip vars */
+ Sequence *seq, *soundseq; /* generic strip vars */
Strip *strip;
StripElem *se;
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 76bed3772b1..367bfb68208 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -225,6 +225,108 @@ static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1,
}
}
+static void drawseqwave(Scene *scene, View2D *v2d, Sequence *seq, float x1, float y1, float x2, float y2, int winx)
+{
+ /*
+ x1 is the starting x value to draw the wave,
+ x2 the end x value, same for y1 and y2
+ winx is the zoom level.
+ */
+
+ float
+ f, /* floating point value used to store the X draw location for the wave lines when openGL drawing*/
+ midy, /* fast access to the middle location (y1+y2)/2 */
+ clipxmin, /* the minimum X value, clip this with the window */
+ clipxmax, /* the maximum X value, clip this with the window */
+ sample_step, /* steps to move per sample, floating value must later translate into an int */
+ fsofs, /* steps to move per sample, floating value must later translate into an int */
+ feofs_sofs, /* */
+ sound_width, /* convenience: x2-x1 */
+ wavemulti; /* scale the samples by this value when GL_LINE drawing so it renders the right height */
+
+ int
+ offset, /* initial offset value for the wave drawing */
+ offset_next, /* when in the wave drawing loop this value is the samples intil the next vert */
+ sofs, /* Constrained offset value (~3) for the wave, start */
+ eofs, /* ditto, end */
+ wavesample, /* inner loop storage if the current wave sample value, used to make the 2 values below */
+ wavesamplemin, /* used for finding the min and max wave peaks */
+ wavesamplemax, /* ditto */
+ subsample_step=4; /* when the sample step is 4 every sample of
+ the wave is evaluated for min and max values used to draw the wave,
+ however this is slow ehrn zoomed out so when the sample step is above
+ 1 (the larger the further out the zoom is) so not evaluate all samples, only some. */
+
+ signed short* s;
+ bSound *sound;
+ uint8_t *stream;
+
+// XXX audio_makestream(seq->sound);
+ if(seq->sound==NULL || seq->sound->stream==NULL) return;
+
+ if (seq->flag & SEQ_MUTE) glColor3ub(0x70, 0x80, 0x80); else glColor3ub(0x70, 0xc0, 0xc0);
+
+ sofs = ((int)( FRA2TIME(seq->startdisp-seq->start+seq->anim_startofs)*(float)scene->r.audio.mixrate*4.0 )) & (~3);
+ eofs = ((int)( FRA2TIME(seq->enddisp-seq->start+seq->anim_startofs)*(float)scene->r.audio.mixrate*4.0 )) & (~3);
+
+ /* clip the drawing area to the screen bounds to save time */
+ sample_step= (v2d->cur.xmax - v2d->cur.xmin)/winx;
+ clipxmin= MAX2(x1, v2d->cur.xmin);
+ clipxmax= MIN2(x2, v2d->cur.xmax);
+
+ if (sample_step > 1)
+ subsample_step= ((int)(subsample_step*sample_step*8)) & (~3);
+
+ /* for speedy access */
+ midy = (y1+y2)/2;
+ fsofs= (float)sofs;
+ feofs_sofs= (float)(eofs-sofs);
+ sound_width= x2-x1;
+ sound = seq->sound;
+ stream = sound->stream;
+ wavemulti = (y2-y1)/196605; /*y2-y1 is the height*/
+ wavesample=0;
+
+ /* we need to get the starting offset value, excuse the duplicate code */
+ f=clipxmin;
+ offset= (int) (fsofs + ((f-x1)/sound_width) * feofs_sofs) & (~3);
+
+ /* start the loop, draw a line per sample_step -sample_step is about 1 line drawn per pixel */
+ glBegin(GL_LINES);
+ for (f=x1+sample_step; f<=clipxmax; f+=sample_step) {
+
+ offset_next = (int) (fsofs + ((f-x1)/sound_width) * feofs_sofs) & (~3);
+ if (f > v2d->cur.xmin) {
+ /* if this is close to the last sample just exit */
+ if (offset_next >= sound->streamlen) break;
+
+ wavesamplemin = 131070;
+ wavesamplemax = -131070;
+
+ /*find with high and low of the waveform for this draw,
+ evaluate small samples to find this range */
+ while (offset < offset_next) {
+ s = (signed short*)(stream+offset);
+
+ wavesample = s[0]*2 + s[1];
+ if (wavesamplemin>wavesample)
+ wavesamplemin=wavesample;
+ if (wavesamplemax<wavesample)
+ wavesamplemax=wavesample;
+ offset+=subsample_step;
+ }
+ /* draw the wave line, looks good up close and zoomed out */
+ glVertex2f(f, midy-(wavemulti*wavesamplemin) );
+ glVertex2f(f, midy-(wavemulti*wavesamplemax) );
+ } else {
+ while (offset < offset_next) offset+=subsample_step;
+ }
+
+ offset=offset_next;
+ }
+ glEnd();
+}
+
/* draw a handle, for each end of a sequence strip */
static void draw_seq_handle(View2D *v2d, Sequence *seq, float pixelx, short direction)
{
@@ -558,6 +660,10 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, SpaceSeq *sseq, Sequence *
draw_shadedstrip(seq, background_col, x1, y1, x2, y2);
/* draw additional info and controls */
+ // XXX
+ if(0) // (seq->type == SEQ_SOUND)
+ drawseqwave(scene, v2d, seq, x1, y1, x2, y2, ar->winx);
+
if (!is_single_image)
draw_seq_extensions(scene, sseq, seq);
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 26ffd88ae67..084416f3a60 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -219,10 +219,6 @@ static void sequencer_main_area_listener(ARegion *ar, wmNotifier *wmn)
break;
}
break;
- case NC_SPACE:
- if(wmn->data == ND_SPACE_SEQUENCER)
- ED_region_tag_redraw(ar);
- break;
}
}
@@ -245,10 +241,6 @@ static void sequencer_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch(wmn->category) {
- case NC_SPACE:
- if(wmn->data == ND_SPACE_SEQUENCER)
- ED_region_tag_redraw(ar);
- break;
}
}
@@ -301,7 +293,6 @@ void ED_spacetype_sequencer(void)
art->init= sequencer_header_area_init;
art->draw= sequencer_header_area_draw;
- art->listener= sequencer_main_area_listener;
BLI_addhead(&st->regiontypes, art);
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index 1f919fc9cd7..a9c0d3ff76b 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -143,10 +143,6 @@ static void text_listener(ScrArea *sa, wmNotifier *wmn)
ED_area_tag_redraw(sa);
break;
- case NC_SPACE:
- if(wmn->data == ND_SPACE_TEXT)
- ED_area_tag_redraw(sa);
- break;
}
}
@@ -210,57 +206,42 @@ static void text_keymap(struct wmWindowManager *wm)
{
ListBase *keymap= WM_keymap_listbase(wm, "Text", SPACE_TEXT, 0);
- #ifdef __APPLE__
- RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", LEFTARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", LINE_BEGIN);
- RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", RIGHTARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", LINE_BEGIN);
- RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", LEFTARROWKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0)->ptr, "type", LINE_BEGIN);
- RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", RIGHTARROWKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0)->ptr, "type", LINE_BEGIN);
- WM_keymap_add_item(keymap, "TEXT_OT_save", SKEY, KM_PRESS, KM_ALT|KM_OSKEY, 0);
- WM_keymap_add_item(keymap, "TEXT_OT_save_as", SKEY, KM_PRESS, KM_ALT|KM_SHIFT|KM_OSKEY, 0);
- WM_keymap_add_item(keymap, "TEXT_OT_cut", XKEY, KM_PRESS, KM_OSKEY, 0);
- WM_keymap_add_item(keymap, "TEXT_OT_copy", CKEY, KM_PRESS, KM_OSKEY, 0);
- WM_keymap_add_item(keymap, "TEXT_OT_paste", VKEY, KM_PRESS, KM_OSKEY, 0);
- WM_keymap_add_item(keymap, "TEXT_OT_find", FKEY, KM_PRESS, KM_OSKEY, 0);
- WM_keymap_add_item(keymap, "TEXT_OT_select_all", AKEY, KM_PRESS, KM_OSKEY, 0);
- #endif
-
WM_keymap_add_item(keymap, "TEXT_OT_new", NKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "TEXT_OT_open", OKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "TEXT_OT_reload", RKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "TEXT_OT_save", SKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "TEXT_OT_save_as", SKEY, KM_PRESS, KM_ALT|KM_SHIFT|KM_CTRL, 0);
WM_keymap_add_item(keymap, "TEXT_OT_run_script", PKEY, KM_PRESS, KM_ALT, 0);
-
+
+ WM_keymap_add_item(keymap, "TEXT_OT_cut", XKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "TEXT_OT_cut", XKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "TEXT_OT_copy", CKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "TEXT_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "TEXT_OT_paste", VKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "TEXT_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
if(U.uiflag & USER_MMB_PASTE) // XXX not dynamic
RNA_boolean_set(WM_keymap_add_item(keymap, "TEXT_OT_paste", MIDDLEMOUSE, KM_PRESS, 0, 0)->ptr, "selection", 1);
WM_keymap_add_item(keymap, "TEXT_OT_jump", JKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "TEXT_OT_find", FKEY, KM_PRESS, KM_CTRL, 0);
-
- WM_keymap_add_item(keymap, "TEXT_OT_properties", FKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "TEXT_OT_find", FKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "TEXT_OT_properties", FKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "TEXT_OT_replace", HKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "TEXT_OT_properties", FKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "TEXT_OT_replace", HKEY, KM_PRESS, KM_ALT, 0);
+ WM_keymap_add_item(keymap, "TEXT_OT_replace", HKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "TEXT_OT_to_3d_object", MKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "TEXT_OT_select_all", AKEY, KM_PRESS, KM_CTRL, 0);
-
WM_keymap_add_item(keymap, "TEXT_OT_indent", TABKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "TEXT_OT_unindent", TABKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "TEXT_OT_uncomment", DKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", HOMEKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_BEGIN);
-
- RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", LEFTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", LINE_BEGIN);
+ RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", LEFTARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", LINE_BEGIN);
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", ENDKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_END);
- RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", RIGHTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", LINE_BEGIN);
+ RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", RIGHTARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", LINE_BEGIN);
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", EKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", LINE_END);
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", EKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "type", LINE_END);
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", ENDKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_END);
@@ -275,6 +256,8 @@ static void text_keymap(struct wmWindowManager *wm)
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", HOMEKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", LINE_BEGIN);
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", ENDKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", LINE_END);
+ RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", LEFTARROWKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0)->ptr, "type", LINE_BEGIN);
+ RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", RIGHTARROWKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0)->ptr, "type", LINE_BEGIN);
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", LEFTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", PREV_CHAR);
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", RIGHTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", NEXT_CHAR);
RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", LEFTARROWKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "type", PREV_WORD);
diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c
index 089436cfcf9..0e2d2ce1698 100644
--- a/source/blender/editors/space_text/text_header.c
+++ b/source/blender/editors/space_text/text_header.c
@@ -215,7 +215,6 @@ void TEXT_OT_properties(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Properties";
- ot->description= "Toggle text properties panel.";
ot->idname= "TEXT_OT_properties";
/* api callbacks */
diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h
index 4847f2f0741..cb425274fc0 100644
--- a/source/blender/editors/space_text/text_intern.h
+++ b/source/blender/editors/space_text/text_intern.h
@@ -83,6 +83,8 @@ typedef struct FlattenString {
int flatten_string(struct SpaceText *st, FlattenString *fs, char *in);
void flatten_string_free(FlattenString *fs);
+void unlink_text(struct Text *text);
+
int wrap_width(struct SpaceText *st, struct ARegion *ar);
void wrap_offset(struct SpaceText *st, struct ARegion *ar, struct TextLine *linein, int cursin, int *offl, int *offc);
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 7751355a14d..4c9f47ed170 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -176,7 +176,6 @@ void TEXT_OT_new(wmOperatorType *ot)
{
/* identifiers */
ot->name= "New";
- ot->description= "Create a new text data block.";
ot->idname= "TEXT_OT_new";
/* api callbacks */
@@ -224,7 +223,6 @@ void TEXT_OT_open(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Open";
- ot->description= "Open a new text data block.";
ot->idname= "TEXT_OT_open";
/* api callbacks */
@@ -262,7 +260,6 @@ void TEXT_OT_reload(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Reload";
- ot->description= "Reload active text data block from its file.";
ot->idname= "TEXT_OT_reload";
/* api callbacks */
@@ -273,9 +270,48 @@ void TEXT_OT_reload(wmOperatorType *ot)
/******************* delete operator *********************/
+static void text_unlink(Main *bmain, Text *text)
+{
+ bScreen *scr;
+ ScrArea *area;
+ SpaceLink *sl;
+
+ /* XXX this ifdef is in fact dangerous, if python is
+ * disabled it will leave invalid pointers in files! */
+
+#ifndef DISABLE_PYTHON
+ // XXX BPY_free_pyconstraint_links(text);
+ // XXX free_text_controllers(text);
+ // XXX free_dome_warp_text(text);
+
+ /* equivalently for pynodes: */
+ if(0) // XXX nodeDynamicUnlinkText ((ID*)text))
+ ; // XXX notifier: allqueue(REDRAWNODE, 0);
+#endif
+
+ for(scr= bmain->screen.first; scr; scr= scr->id.next) {
+ for(area= scr->areabase.first; area; area= area->next) {
+ for(sl= area->spacedata.first; sl; sl= sl->next) {
+ if(sl->spacetype==SPACE_TEXT) {
+ SpaceText *st= (SpaceText*) sl;
+
+ if(st->text==text) {
+ st->text= NULL;
+ st->top= 0;
+
+ if(st==area->spacedata.first)
+ ED_area_tag_redraw(area);
+ }
+ }
+ }
+ }
+ }
+
+ free_libblock(&bmain->text, text);
+}
+
static int unlink_exec(bContext *C, wmOperator *op)
{
- Main *bmain= CTX_data_main(C);
SpaceText *st= CTX_wm_space_text(C);
Text *text= CTX_data_edit_text(C);
@@ -291,8 +327,7 @@ static int unlink_exec(bContext *C, wmOperator *op)
}
}
- unlink_text(bmain, text);
- free_libblock(&bmain->text, text);
+ text_unlink(CTX_data_main(C), text);
WM_event_add_notifier(C, NC_TEXT|NA_REMOVED, text);
return OPERATOR_FINISHED;
@@ -302,7 +337,6 @@ void TEXT_OT_unlink(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Unlink";
- ot->description= "Unlink active text data block.";
ot->idname= "TEXT_OT_unlink";
/* api callbacks */
@@ -333,7 +367,6 @@ void TEXT_OT_make_internal(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Make Internal";
- ot->description= "Make active text file internal.";
ot->idname= "TEXT_OT_make_internal";
/* api callbacks */
@@ -402,7 +435,6 @@ void TEXT_OT_save(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Save";
- ot->description= "Save active text data block.";
ot->idname= "TEXT_OT_save";
/* api callbacks */
@@ -458,7 +490,6 @@ void TEXT_OT_save_as(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Save As";
- ot->description= "Save active text file with options.";
ot->idname= "TEXT_OT_save_as";
/* api callbacks */
@@ -496,7 +527,6 @@ void TEXT_OT_run_script(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Run Script";
- ot->description= "Run active script.";
ot->idname= "TEXT_OT_run_script";
/* api callbacks */
@@ -511,6 +541,7 @@ static int refresh_pyconstraints_exec(bContext *C, wmOperator *op)
{
#ifndef DISABLE_PYTHON
Text *text= CTX_data_edit_text(C);
+ Scene *scene= CTX_data_scene(C);
Object *ob;
bConstraint *con;
short update;
@@ -540,7 +571,7 @@ static int refresh_pyconstraints_exec(bContext *C, wmOperator *op)
}
if(update) {
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
}
#endif
@@ -552,7 +583,6 @@ void TEXT_OT_refresh_pyconstraints(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Refresh PyConstraints";
- ot->description= "Refresh all pyconstraints.";
ot->idname= "TEXT_OT_refresh_pyconstraints";
/* api callbacks */
@@ -674,7 +704,6 @@ void TEXT_OT_paste(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Paste";
- ot->description= "Paste text from clipboard.";
ot->idname= "TEXT_OT_paste";
/* api callbacks */
@@ -715,7 +744,6 @@ void TEXT_OT_copy(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Copy";
- ot->description= "Copy selected text to clipboard.";
ot->idname= "TEXT_OT_copy";
/* api callbacks */
@@ -746,7 +774,6 @@ void TEXT_OT_cut(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Cut";
- ot->description= "Cut selected text to clipboard.";
ot->idname= "TEXT_OT_cut";
/* api callbacks */
@@ -782,7 +809,6 @@ void TEXT_OT_indent(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Indent";
- ot->description= "Indent selected text.";
ot->idname= "TEXT_OT_indent";
/* api callbacks */
@@ -818,7 +844,6 @@ void TEXT_OT_unindent(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Unindent";
- ot->description= "Unindent selected text.";
ot->idname= "TEXT_OT_unindent";
/* api callbacks */
@@ -859,7 +884,6 @@ void TEXT_OT_line_break(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Line Break";
- ot->description= "Insert line break at cursor position.";
ot->idname= "TEXT_OT_line_break";
/* api callbacks */
@@ -892,7 +916,6 @@ void TEXT_OT_comment(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Comment";
- ot->description= "Convert selected text to comment.";
ot->idname= "TEXT_OT_comment";
/* api callbacks */
@@ -926,7 +949,6 @@ void TEXT_OT_uncomment(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Uncomment";
- ot->description= "Convert selected comment to text.";
ot->idname= "TEXT_OT_uncomment";
/* api callbacks */
@@ -1068,7 +1090,6 @@ void TEXT_OT_convert_whitespace(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Convert Whitespace";
- ot->description= "Convert whitespaces by type.";
ot->idname= "TEXT_OT_convert_whitespace";
/* api callbacks */
@@ -1099,7 +1120,6 @@ void TEXT_OT_select_all(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select All";
- ot->description= "Select all text.";
ot->idname= "TEXT_OT_select_all";
/* api callbacks */
@@ -1127,7 +1147,6 @@ void TEXT_OT_select_line(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select Line";
- ot->description= "Select text by line.";
ot->idname= "TEXT_OT_select_line";
/* api clinebacks */
@@ -1165,7 +1184,6 @@ void TEXT_OT_previous_marker(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Previous Marker";
- ot->description= "Move to previous marker.";
ot->idname= "TEXT_OT_previous_marker";
/* api callbacks */
@@ -1203,7 +1221,6 @@ void TEXT_OT_next_marker(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Next Marker";
- ot->description= "Move to next marker";
ot->idname= "TEXT_OT_next_marker";
/* api callbacks */
@@ -1231,7 +1248,6 @@ void TEXT_OT_markers_clear(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Clear All Markers";
- ot->description= "Clear all markers.";
ot->idname= "TEXT_OT_markers_clear";
/* api callbacks */
@@ -1439,7 +1455,7 @@ static int move_cursor(bContext *C, int type, int select)
ARegion *ar= CTX_wm_region(C);
/* ensure we have the right region, it's optional */
- if(ar && ar->regiontype != RGN_TYPE_WINDOW)
+ if(ar->regiontype != RGN_TYPE_WINDOW)
ar= NULL;
switch(type) {
@@ -1515,7 +1531,6 @@ void TEXT_OT_move(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Move Cursor";
- ot->description= "Move cursor to position type.";
ot->idname= "TEXT_OT_move";
/* api callbacks */
@@ -1542,7 +1557,6 @@ void TEXT_OT_move_select(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Move Select";
- ot->description= "Make selection from current cursor position to new cursor position type.";
ot->idname= "TEXT_OT_move_select";
/* api callbacks */
@@ -1582,7 +1596,6 @@ void TEXT_OT_jump(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Jump";
- ot->description= "Jump cursor to line.";
ot->idname= "TEXT_OT_jump";
/* api callbacks */
@@ -1635,7 +1648,6 @@ void TEXT_OT_delete(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Delete";
- ot->description= "Delete text by cursor position.";
ot->idname= "TEXT_OT_delete";
/* api callbacks */
@@ -1816,10 +1828,6 @@ void TEXT_OT_scroll(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scroll";
- /*don't really see the difference between this and
- scroll_bar. Both do basically the same thing (aside
- from keymaps).*/
- ot->description= "Scroll text screen.";
ot->idname= "TEXT_OT_scroll";
/* api callbacks */
@@ -1868,10 +1876,6 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scrollbar";
- /*don't really see the difference between this and
- scroll. Both do basically the same thing (aside
- from keymaps).*/
- ot->description= "Scroll text screen.";
ot->idname= "TEXT_OT_scroll_bar";
/* api callbacks */
@@ -2147,7 +2151,6 @@ void TEXT_OT_cursor_set(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Cursor";
- ot->description= "Set cursor selection.";
ot->idname= "TEXT_OT_cursor_set";
/* api callbacks */
@@ -2271,7 +2274,6 @@ void TEXT_OT_insert(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Insert";
- ot->description= "Insert text at cursor position.";
ot->idname= "TEXT_OT_insert";
/* api callbacks */
@@ -2376,7 +2378,6 @@ void TEXT_OT_find(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Find";
- ot->description= "Find specified text.";
ot->idname= "TEXT_OT_find";
/* api callbacks */
@@ -2395,7 +2396,6 @@ void TEXT_OT_replace(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Replace";
- ot->description= "Replace text with specified text.";
ot->idname= "TEXT_OT_replace";
/* api callbacks */
@@ -2414,7 +2414,6 @@ void TEXT_OT_mark_all(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Mark All";
- ot->description= "Mark all specified text.";
ot->idname= "TEXT_OT_mark_all";
/* api callbacks */
@@ -2444,7 +2443,6 @@ void TEXT_OT_find_set_selected(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Find Set Selected";
- ot->description= "Find specified text and set as selected.";
ot->idname= "TEXT_OT_find_set_selected";
/* api callbacks */
@@ -2471,7 +2469,6 @@ void TEXT_OT_replace_set_selected(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Replace Set Selected";
- ot->description= "Replace text with specified text and set as selected.";
ot->idname= "TEXT_OT_replace_set_selected";
/* api callbacks */
@@ -2634,7 +2631,6 @@ void TEXT_OT_to_3d_object(wmOperatorType *ot)
{
/* identifiers */
ot->name= "To 3D Object";
- ot->description= "Create 3d text object from active text data block.";
ot->idname= "TEXT_OT_to_3d_object";
/* api callbacks */
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index 8f7486f81d9..784b151f909 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -260,34 +260,52 @@ static void time_main_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch(wmn->category) {
- case NC_SPACE:
- if(wmn->data == ND_SPACE_TIME)
- ED_region_tag_redraw(ar);
- break;
-
- case NC_ANIMATION:
- ED_region_tag_redraw(ar);
- break;
case NC_SCENE:
/* any scene change for now */
ED_region_tag_redraw(ar);
break;
-
}
}
/* ************************ header time area region *********************** */
+#define PY_HEADER
/* add handlers, stuff you only do once or on area/region changes */
static void time_header_area_init(wmWindowManager *wm, ARegion *ar)
{
+#ifdef PY_HEADER
ED_region_header_init(ar);
+#else
+ UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
+#endif
}
static void time_header_area_draw(const bContext *C, ARegion *ar)
{
+#ifdef PY_HEADER
ED_region_header(C, ar);
+#else
+
+ float col[3];
+
+ /* clear */
+ if(ED_screen_area_active(C))
+ UI_GetThemeColor3fv(TH_HEADER, col);
+ else
+ UI_GetThemeColor3fv(TH_HEADERDESEL, col);
+
+ glClearColor(col[0], col[1], col[2], 0.0);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ /* set view2d view matrix for scrolling (without scrollers) */
+ UI_view2d_view_ortho(C, &ar->v2d);
+
+ time_header_buttons(C, ar);
+#endif
+
+ /* restore view matrix? */
+ UI_view2d_view_restore(C);
}
static void time_header_area_listener(ARegion *ar, wmNotifier *wmn)
@@ -298,7 +316,6 @@ static void time_header_area_listener(ARegion *ar, wmNotifier *wmn)
if(wmn->data==ND_ANIMPLAY)
ED_region_tag_redraw(ar);
break;
-
case NC_SCENE:
switch (wmn->data) {
case ND_FRAME:
@@ -306,11 +323,6 @@ static void time_header_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
}
-
- case NC_SPACE:
- if(wmn->data == ND_SPACE_TIME)
- ED_region_tag_redraw(ar);
- break;
}
}
@@ -370,6 +382,8 @@ static SpaceLink *time_new(const bContext *C)
static void time_free(SpaceLink *sl)
{
}
+
+
/* spacetype; init callback in ED_area_initialize() */
/* init is called to (re)initialize an existing editor (file read, screen changes) */
/* validate spacedata, add own area level handlers */
diff --git a/source/blender/editors/space_time/time_header.c b/source/blender/editors/space_time/time_header.c
new file mode 100644
index 00000000000..13265166d98
--- /dev/null
+++ b/source/blender/editors/space_time/time_header.c
@@ -0,0 +1,476 @@
+/**
+ * $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) 2008 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <string.h>
+#include <stdio.h>
+
+#include "DNA_space_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_windowmanager_types.h"
+#include "DNA_userdef_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_blenlib.h"
+
+#include "BKE_context.h"
+#include "BKE_global.h"
+#include "BKE_screen.h"
+
+#include "ED_keyframing.h"
+#include "ED_screen.h"
+#include "ED_screen_types.h"
+#include "ED_types.h"
+#include "ED_util.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "RNA_access.h"
+
+#include "BIF_gl.h"
+#include "BIF_glutil.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+#include "UI_view2d.h"
+
+#include "ED_markers.h"
+
+#include "time_intern.h"
+
+
+/* ************************ header time area region *********************** */
+
+static void do_time_viewmenu(bContext *C, void *arg, int event)
+{
+ ScrArea *curarea= CTX_wm_area(C);
+ SpaceTime *stime= CTX_wm_space_time(C);
+ View2D *v2d= UI_view2d_fromcontext_rwin(C);
+ Scene *scene= CTX_data_scene(C);
+ int first;
+
+ switch(event) {
+ case 2: /* Play Back Animation */
+ //if(!has_screenhandler(G.curscreen, SCREEN_HANDLER_ANIM))
+ // start_animated_screen(stime);
+ break;
+ case 3: /* View All */
+ if(v2d) {
+ first= scene->r.sfra;
+ if(first >= scene->r.efra) first= scene->r.efra;
+ v2d->cur.xmin=v2d->tot.xmin= (float)first-2;
+ v2d->cur.xmax=v2d->tot.xmax= (float)scene->r.efra+2;
+
+ ED_area_tag_redraw(curarea);
+ }
+ break;
+ case 4: /* Maximize Window */
+ /* using event B_FULL */
+ break;
+ case 5: /* show time or frames */
+ stime->flag ^= TIME_DRAWFRAMES;
+ ED_area_tag_redraw(curarea);
+ break;
+ case 6:
+ //nextprev_marker(1);
+ break;
+ case 7:
+ //nextprev_marker(-1);
+ break;
+ case 10:
+ //timeline_frame_to_center();
+ break;
+ case 11:
+ if(v2d) {
+ v2d->flag ^= V2D_VIEWSYNC_SCREEN_TIME;
+ UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_SET);
+ }
+ break;
+ case 12: /* only show keyframes from selected data */
+ stime->flag ^= TIME_ONLYACTSEL;
+ ED_area_tag_redraw(curarea);
+ break;
+ }
+}
+
+static uiBlock *time_viewmenu(bContext *C, ARegion *ar, void *arg_unused)
+{
+ ScrArea *curarea= CTX_wm_area(C);
+ SpaceTime *stime= CTX_wm_space_time(C);
+ View2D *v2d= UI_view2d_fromcontext_rwin(C);
+ uiBlock *block;
+ short yco= 0, menuwidth=120;
+
+ block= uiBeginBlock(C, ar, "time_viewmenu", UI_EMBOSSP);
+ uiBlockSetButmFunc(block, do_time_viewmenu, NULL);
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Play Back Animation", 0, yco-=20,
+ menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ if(stime->flag & TIME_DRAWFRAMES)
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Seconds|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
+ else
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Frames|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
+
+ uiDefIconTextBut(block, BUTM, 1, (stime->flag & TIME_ONLYACTSEL)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
+ "Only Selected Data Keys|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Jump To Next Marker|PageUp", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 6, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Jump To Prev Marker|PageDown", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 7, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Jump To Next Key|Ctrl PageUp", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 8, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Jump To Prev Key|Ctrl PageDown", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 9, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Center View|C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 10, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "View All|Home", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
+ uiDefIconTextBut(block, BUTM, 1, (v2d->flag & V2D_VIEWSYNC_SCREEN_TIME)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
+ "Lock Time to Other Windows|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 11, "");
+
+// if (!curarea->full)
+// uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Maximize Window|Ctrl UpArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
+// else
+// uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Tile Window|Ctrl DownArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
+
+ if(curarea->headertype==HEADERTOP) {
+ uiBlockSetDirection(block, UI_DOWN);
+ }
+ else {
+ uiBlockSetDirection(block, UI_TOP);
+ uiBlockFlipOrder(block);
+ }
+
+ uiTextBoundsBlock(block, 50);
+ uiEndBlock(C, block);
+
+ return block;
+}
+
+static void do_time_framemenu(bContext *C, void *arg, int event)
+{
+ Scene *scene= CTX_data_scene(C);
+
+ switch(event) {
+ case 1: /*Set as Start */
+ if (scene->r.psfra) {
+ if (scene->r.pefra < scene->r.cfra)
+ scene->r.pefra= scene->r.cfra;
+ scene->r.psfra= scene->r.cfra;
+ }
+ else
+ scene->r.sfra = scene->r.cfra;
+ WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
+ break;
+ case 2: /* Set as End */
+ if (scene->r.psfra) {
+ if (scene->r.cfra < scene->r.psfra)
+ scene->r.psfra= scene->r.cfra;
+ scene->r.pefra= scene->r.cfra;
+ }
+ else
+ scene->r.efra = scene->r.cfra;
+ WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
+ break;
+ case 3: /* Rename Marker */
+ //rename_marker();
+ break;
+ }
+}
+
+static uiBlock *time_framemenu(bContext *C, ARegion *ar, void *arg_unused)
+{
+ ScrArea *curarea= CTX_wm_area(C);
+ uiBlock *block;
+ short yco= 0, menuwidth=120;
+
+ block= uiBeginBlock(C, ar, "time_framemenu", UI_EMBOSSP);
+ uiBlockSetButmFunc(block, do_time_framemenu, NULL);
+
+ uiDefIconTextButO(block, BUTM, "MARKER_OT_add", WM_OP_EXEC_REGION_WIN, ICON_BLANK1, "Add Marker",
+ 0, yco-=2, menuwidth, 19, "");
+ uiDefIconTextButO(block, BUTM, "MARKER_OT_duplicate", WM_OP_EXEC_REGION_WIN, ICON_BLANK1, "Duplicate Marker",
+ 0, yco-=20, menuwidth, 19, "");
+ uiDefIconTextButO(block, BUTM, "MARKER_OT_delete", WM_OP_EXEC_REGION_WIN, ICON_BLANK1, "Delete Marker",
+ 0, yco-=20, menuwidth, 19, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Name Marker|Ctrl M",
+ 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
+ uiDefIconTextButO(block, BUTM, "MARKER_OT_move", WM_OP_INVOKE_REGION_WIN, ICON_BLANK1, "Grab/Move Marker",
+ 0, yco-=20, menuwidth, 19, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set as Start|S",
+ 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set as End|E",
+ 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
+
+ if(curarea->headertype==HEADERTOP) {
+ uiBlockSetDirection(block, UI_DOWN);
+ }
+ else {
+ uiBlockSetDirection(block, UI_TOP);
+ uiBlockFlipOrder(block);
+ }
+
+ uiTextBoundsBlock(block, 50);
+ uiEndBlock(C, block);
+
+ return block;
+}
+
+
+#define B_REDRAWALL 750
+#define B_TL_PLAY 752
+#define B_TL_RPLAY 760
+#define B_TL_STOP 756
+#define B_TL_PREVIEWON 757
+
+#define B_FLIPINFOMENU 0
+#define B_NEWFRAME 0
+#define B_DIFF 0
+
+
+void do_time_buttons(bContext *C, void *arg, int event)
+{
+ Scene *scene= CTX_data_scene(C);
+
+ switch(event) {
+ case B_REDRAWALL:
+ WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
+ break;
+ case B_NEWFRAME:
+ WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+ break;
+ case B_TL_PREVIEWON:
+ if (scene->r.psfra) {
+ /* turn on preview range */
+ scene->r.psfra= scene->r.sfra;
+ scene->r.pefra= scene->r.efra;
+ }
+ else {
+ /* turn off preview range */
+ scene->r.psfra= 0;
+ scene->r.pefra= 0;
+ }
+ //BIF_undo_push("Set anim-preview range");
+ WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
+ break;
+ }
+}
+
+
+void time_header_buttons(const bContext *C, ARegion *ar)
+{
+ ScrArea *sa= CTX_wm_area(C);
+ Scene *scene= CTX_data_scene(C);
+ wmTimer *animtimer= CTX_wm_screen(C)->animtimer;
+ uiBlock *block;
+ uiBut *but;
+ int xco, yco= 3;
+ char *menustr= NULL;
+
+ block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS);
+ uiBlockSetHandleFunc(block, do_time_buttons, NULL);
+
+ xco= ED_area_header_standardbuttons(C, block, yco);
+
+ if((sa->flag & HEADER_NO_PULLDOWN)==0) {
+ int xmax;
+
+ xmax= GetButStringLength("View");
+ uiDefPulldownBut(block, time_viewmenu, sa,
+ "View", xco, yco, xmax-3, 20, "");
+ xco+= xmax;
+ xmax= GetButStringLength("Frame");
+ uiDefPulldownBut(block, time_framemenu, sa,
+ "Frame", xco, yco, xmax-3, 20, "");
+ xco+= xmax;
+ }
+
+ uiBlockSetEmboss(block, UI_EMBOSS);
+
+
+
+ uiDefButI(block, TOG, B_TL_PREVIEWON,"PR",
+ xco,yco, XIC*2, YIC,
+ &scene->r.psfra,0, 1, 0, 0,
+ "Show settings for frame range of animation preview");
+
+ xco += XIC*2;
+
+ uiBlockBeginAlign(block);
+
+ if (scene->r.psfra) {
+ uiDefButI(block, NUM, B_REDRAWALL,"Start:",
+ xco,yco, (int)4.5*XIC, YIC,
+ &scene->r.psfra,MINFRAMEF, MAXFRAMEF, 0, 0,
+ "The start frame of the animation preview (inclusive)");
+
+ xco += (int)(4.5*XIC);
+
+ uiDefButI(block, NUM, B_REDRAWALL,"End:",
+ xco,yco, (int)4.5*XIC,YIC,
+ &scene->r.pefra,(float)PSFRA, MAXFRAMEF, 0, 0,
+ "The end frame of the animation preview (inclusive)");
+ }
+ else {
+ uiDefButI(block, NUM, B_REDRAWALL,"Start:",
+ xco,yco, (int)4.5*XIC, YIC,
+ &scene->r.sfra,MINFRAMEF, MAXFRAMEF, 0, 0,
+ "The start frame of the animation (inclusive)");
+
+ xco += (short)(4.5*XIC);
+
+ uiDefButI(block, NUM, B_REDRAWALL,"End:",
+ xco,yco, (int)4.5*XIC,YIC,
+ &scene->r.efra,(float)SFRA, MAXFRAMEF, 0, 0,
+ "The end frame of the animation (inclusive)");
+ }
+ uiBlockEndAlign(block);
+
+ xco += (short)(4.5 * XIC);
+
+ /* MINAFRAMEF not MINFRAMEF, since MINAFRAMEF allows to set current frame negative
+ * to facilitate easier keyframing in some situations
+ */
+ uiDefButI(block, NUM, B_NEWFRAME, "",
+ xco,yco, (int)4.5*XIC,YIC,
+ &(scene->r.cfra), MINAFRAMEF, MAXFRAMEF, 0, 0,
+ "Displays Current Frame of animation");
+
+ xco += (short)(4.5 * XIC);
+
+ uiBlockBeginAlign(block);
+
+ but= uiDefIconButO(block, BUT, "SCREEN_OT_frame_jump", WM_OP_INVOKE_REGION_WIN, ICON_REW, xco,yco,XIC,YIC, "Skip to Start frame (Shift DownArrow)");
+ RNA_boolean_set(uiButGetOperatorPtrRNA(but), "end", 0);
+ xco+= XIC;
+
+ but= uiDefIconButO(block, BUT, "SCREEN_OT_keyframe_jump", WM_OP_INVOKE_REGION_WIN, ICON_PREV_KEYFRAME, xco,yco,XIC,YIC, "Skip to previous keyframe (Ctrl PageDown)");
+ RNA_boolean_set(uiButGetOperatorPtrRNA(but), "next", 0);
+ xco+= XIC;
+
+ if (animtimer) {
+ /* pause button 2*size to keep buttons in place */
+ but=uiDefIconButO(block, BUT, "SCREEN_OT_animation_play", WM_OP_INVOKE_REGION_WIN, ICON_PAUSE, xco,yco,XIC*2,YIC, "Stop Playing Timeline");
+
+ xco+= XIC;
+ }
+ else {
+ but=uiDefIconButO(block, BUT, "SCREEN_OT_animation_play", WM_OP_INVOKE_REGION_WIN, ICON_PLAY_REVERSE, xco,yco,XIC,YIC, "Play Timeline in Reverse");
+ RNA_boolean_set(uiButGetOperatorPtrRNA(but), "reverse", 1);
+ xco+= XIC;
+
+ but=uiDefIconButO(block, BUT, "SCREEN_OT_animation_play", WM_OP_INVOKE_REGION_WIN, ICON_PLAY, xco,yco,XIC,YIC, "Play Timeline");
+ RNA_boolean_set(uiButGetOperatorPtrRNA(but), "reverse", 0);
+ }
+ xco+= XIC;
+
+ but= uiDefIconButO(block, BUT, "SCREEN_OT_keyframe_jump", WM_OP_INVOKE_REGION_WIN, ICON_NEXT_KEYFRAME, xco,yco,XIC,YIC, "Skip to next keyframe (Ctrl PageUp)");
+ RNA_boolean_set(uiButGetOperatorPtrRNA(but), "next", 1);
+ xco+= XIC;
+
+ but= uiDefIconButO(block, BUT, "SCREEN_OT_frame_jump", WM_OP_INVOKE_REGION_WIN, ICON_FF, xco,yco,XIC,YIC, "Skip to End frame (Shift UpArrow)");
+ RNA_boolean_set(uiButGetOperatorPtrRNA(but), "end", 1);
+ xco+= XIC;
+ uiBlockEndAlign(block);
+
+ xco+= (short)(0.5*XIC);
+
+ uiBlockBeginAlign(block);
+ uiDefIconButBitS(block, TOG, AUTOKEY_ON, B_REDRAWALL, ICON_REC,
+ xco, yco, XIC, YIC, &(scene->toolsettings->autokey_mode), 0, 0, 0, 0, "Automatic keyframe insertion for Objects and Bones");
+ xco+= 1*XIC;
+ if (IS_AUTOKEY_ON(scene)) {
+ uiDefButS(block, MENU, B_REDRAWALL,
+ "Auto-Keying Mode %t|Add/Replace%x3|Replace%x5",
+ xco, yco, (int)(4.25*XIC), YIC, &(scene->toolsettings->autokey_mode), 0, 1, 0, 0,
+ "Mode of automatic keyframe insertion for Objects and Bones");
+ xco+= (short)(4.25*XIC);
+
+ if (animtimer) {
+ uiDefButBitS(block, TOG, ANIMRECORD_FLAG_WITHNLA, B_REDRAWALL, "Layered",
+ xco,yco, (int)(3.5*XIC), YIC,
+ &(scene->toolsettings->autokey_flag),0, 1, 0, 0,
+ "Add a new NLA Track + Strip for every loop/pass made over the animation to allow non-destructive tweaking.");
+ uiBlockEndAlign(block);
+
+ xco+= (short)(3.5*XIC);
+ }
+
+ xco += XIC;
+
+ uiBlockEndAlign(block);
+ }
+ else {
+ xco+= (short)(5.25*XIC);
+ uiBlockEndAlign(block);
+ }
+
+ menustr= ANIM_build_keyingsets_menu(&scene->keyingsets, 0);
+ uiDefButI(block, MENU, B_DIFF,
+ menustr,
+ xco, yco, (int)5.5*XIC, YIC, &(scene->active_keyingset), 0, 1, 0, 0,
+ "Active Keying Set (i.e. set of channels to Insert Keyframes for)");
+ MEM_freeN(menustr);
+ xco+= (5.5*XIC);
+
+ /* NOTE: order of these buttons needs to be kept in sync with other occurances
+ * (see Outliner header for instance, also +/- stuff for filebrowser)
+ */
+ uiBlockBeginAlign(block);
+ uiDefIconButO(block, BUT, "ANIM_OT_delete_keyframe", WM_OP_INVOKE_REGION_WIN, ICON_KEY_DEHLT, xco,yco,XIC,YIC, "Delete Keyframes for the Active Keying Set (Alt-I)");
+ xco += XIC;
+ uiDefIconButO(block, BUT, "ANIM_OT_insert_keyframe", WM_OP_INVOKE_REGION_WIN, ICON_KEY_HLT, xco,yco,XIC,YIC, "Insert Keyframes for the Active Keying Set (I)");
+ xco += XIC;
+ uiBlockEndAlign(block);
+
+ xco+= XIC;
+
+ uiDefIconButBitS(block, TOG, AUDIO_SYNC, B_DIFF, ICON_SPEAKER,
+ xco, yco, XIC, YIC, &(scene->r.audio.flag), 0, 0, 0, 0, "Play back and sync with audio from Sequence Editor");
+
+
+ /* always as last */
+ UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, (int)(ar->v2d.tot.ymax-ar->v2d.tot.ymin));
+
+ uiEndBlock(C, block);
+ uiDrawBlock(C, block);
+}
+
+
diff --git a/source/blender/editors/space_view3d/SConscript b/source/blender/editors/space_view3d/SConscript
index 057c98a1d49..4eb9f3f5ecb 100644
--- a/source/blender/editors/space_view3d/SConscript
+++ b/source/blender/editors/space_view3d/SConscript
@@ -9,7 +9,6 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' ../../render/extern/include #/intern/guardedalloc'
incs += ' ../../gpu ../../makesrna ../../blenfont'
incs += ' #/intern/smoke/extern'
-incs += ' #source/kernel/gen_system'
if env['WITH_BF_GAMEENGINE']:
defs.append('GAMEBLENDER=1')
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index fa810677fe8..a5718386554 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -1816,7 +1816,7 @@ static void draw_pose_channels(Scene *scene, View3D *v3d, RegionView3D *rv3d, Ba
if ( (arm->flag & ARM_DRAWAXES) && (arm->flag & ARM_POSEMODE) ) {
glPushMatrix();
glMultMatrixf(pchan->pose_mat);
- glTranslatef(0.0f, pchan->bone->length, 0.0f);
+ //glTranslatef(0.0f, pchan->bone->length, 0.0f);
drawaxes(0.25f*pchan->bone->length, 0, OB_ARROWS);
glPopMatrix();
}
@@ -2000,7 +2000,7 @@ static void draw_ebones(View3D *v3d, RegionView3D *rv3d, Object *ob, int dt)
if (arm->flag & ARM_DRAWAXES) {
glPushMatrix();
set_matrix_editbone(eBone);
- glTranslatef(0.0f, eBone->length, 0.0f);
+ //glTranslatef(0.0f, eBone->length, 0.0f);
drawaxes(eBone->length*0.25f, 0, OB_ARROWS);
glPopMatrix();
}
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 7ed029f3eaf..466b55ba862 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -37,7 +37,7 @@
#include "IMB_imbuf.h"
-
+#include "MTC_matrixops.h"
#include "DNA_armature_types.h"
#include "DNA_boid_types.h"
@@ -89,7 +89,6 @@
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_particle.h"
-#include "BKE_pointcache.h"
#include "BKE_property.h"
#include "BKE_smoke.h"
#include "BKE_unit.h"
@@ -1124,7 +1123,7 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob
Mat4Ortho(vec);
wmMultMatrix(vec);
- Mat4SwapMat4(rv3d->persmat, tmat);
+ MTC_Mat4SwapMat4(rv3d->persmat, tmat);
wmGetSingleMatrix(rv3d->persmat);
if(cam->flag & CAM_SHOWLIMITS) {
@@ -1137,7 +1136,7 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob
if(cam->flag & CAM_SHOWMIST)
if(wrld) draw_limit_line(wrld->miststa, wrld->miststa+wrld->mistdist, 0xFFFFFF);
- Mat4SwapMat4(rv3d->persmat, tmat);
+ MTC_Mat4SwapMat4(rv3d->persmat, tmat);
}
}
}
@@ -1198,7 +1197,7 @@ static void drawlattice__point(Lattice *lt, DispList *dl, int u, int v, int w, i
if(use_wcol) {
float col[3];
- MDeformWeight *mdw= ED_vgroup_weight_get (lt->dvert+index, use_wcol-1);
+ MDeformWeight *mdw= get_defweight (lt->dvert+index, use_wcol-1);
weight_to_rgb(mdw?mdw->weight:0.0f, col, col+1, col+2);
glColor3fv(col);
@@ -1392,13 +1391,12 @@ void nurbs_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, Nurb
int i;
for (nu= cu->editnurb->first; nu; nu=nu->next) {
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
for (i=0; i<nu->pntsu; i++) {
BezTriple *bezt = &nu->bezt[i];
if(bezt->hide==0) {
-
- if(cu->drawflag & CU_HIDE_HANDLES) {
+ if (G.f & G_HIDDENHANDLES) {
view3d_project_short_clip(vc->ar, bezt->vec[1], s);
if (s[0] != IS_CLIPPED)
func(userData, nu, NULL, bezt, 1, s[0], s[1]);
@@ -2798,7 +2796,7 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
if(solid) {
dl= lb->first;
if(dl==NULL) return 1;
-
+
if(dl->nors==0) addnormalsDispList(ob, lb);
index3_nors_incr= 0;
@@ -2839,7 +2837,7 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
}
break;
case OB_SURF:
-
+
lb= &((Curve *)ob->data)->disp;
if(solid) {
@@ -3140,7 +3138,6 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
{
Object *ob=base->object;
ParticleSystemModifierData *psmd;
- ParticleEditSettings *pset = PE_settings(scene);
ParticleSettings *part;
ParticleData *pars, *pa;
ParticleKey state, *states=0;
@@ -3169,8 +3166,9 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
if(pars==0) return;
- /* don't draw normal paths in edit mode */
- if(psys_in_edit_mode(scene, psys) && (pset->flag & PE_DRAW_PART)==0)
+ // XXX what logic is this?
+ if(!scene->obedit && psys_in_edit_mode(scene, psys)
+ && psys->flag & PSYS_HAIR_DONE && part->draw_as==PART_DRAW_PATH)
return;
if(part->draw_as==PART_DRAW_NOT) return;
@@ -3374,9 +3372,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
pa_birthtime=pa->time;
pa_dietime = pa->dietime;
pa_size=pa->size;
- if(part->phystype==PART_PHYS_BOIDS) {
- pa_health = pa->boid->data.health;
- }
+ if(part->phystype==PART_PHYS_BOIDS)
+ pa_health = pa->boid->health;
else
pa_health = -1.0;
@@ -3411,10 +3408,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
}
#endif // XXX old animation system
- BLI_srandom(psys->seed+a);
-
- r_tilt = 2.0f*(BLI_frand() - 0.5f);
- r_length = BLI_frand();
+ r_tilt = 1.0f + pa->r_ave[0];
+ r_length = 0.5f * (1.0f + pa->r_ave[1]);
}
else{
ChildParticle *cpa= &psys->child[a-totpart];
@@ -3714,27 +3709,33 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
wmLoadMatrix(rv3d->viewmat);
}
-static void draw_ptcache_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, PTCacheEdit *edit, int dt)
+static void draw_particle_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, ParticleSystem *psys, int dt)
{
- ParticleCacheKey **cache, *path, *pkey;
- PTCacheEditPoint *point;
- PTCacheEditKey *key;
+ ParticleEdit *edit = psys->edit;
+ ParticleData *pa;
+ ParticleCacheKey **path;
+ ParticleEditKey *key;
ParticleEditSettings *pset = PE_settings(scene);
- int i, k, totpoint = edit->totpoint, timed = pset->flag & PE_FADE_TIME ? pset->fade_frames : 0;
- int steps;
+ int i, k, totpart = psys->totpart, totchild=0, timed = pset->draw_timed;
char nosel[4], sel[4];
float sel_col[3];
float nosel_col[3];
- float *pathcol = NULL, *pcol;
+ char val[32];
/* create path and child path cache if it doesn't exist already */
- if(edit->pathcache==0)
- psys_cache_edit_paths(scene, ob, edit, CFRA);
-
- if(edit->pathcache==0)
+ if(psys->pathcache==0){
+ PE_hide_keys_time(scene, psys,CFRA);
+ psys_cache_paths(scene, ob, psys, CFRA,0);
+ }
+ if(psys->pathcache==0)
return;
- PE_hide_keys_time(scene, edit, CFRA);
+ if(pset->flag & PE_SHOW_CHILD && psys->part->draw_as == PART_DRAW_PATH) {
+ if(psys->childcache==0)
+ psys_cache_child_paths(scene, ob, psys, CFRA, 0);
+ }
+ else if(!(pset->flag & PE_SHOW_CHILD) && psys->childcache)
+ free_child_path_cache(psys);
/* opengl setup */
if((v3d->flag & V3D_ZBUF_SELECT)==0)
@@ -3750,115 +3751,129 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Obj
nosel_col[1]=(float)nosel[1]/255.0f;
nosel_col[2]=(float)nosel[2]/255.0f;
+ if(psys->childcache)
+ totchild = psys->totchildcache;
+
/* draw paths */
- if(timed) {
+ if(timed)
glEnable(GL_BLEND);
- steps = (*edit->pathcache)->steps + 1;
- pathcol = MEM_callocN(steps*4*sizeof(float), "particle path color data");
- }
glEnableClientState(GL_VERTEX_ARRAY);
- glDisableClientState(GL_NORMAL_ARRAY);
- glEnableClientState(GL_COLOR_ARRAY);
- glEnable(GL_COLOR_MATERIAL);
- glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
+ if(dt > OB_WIRE) {
+ /* solid shaded with lighting */
+ glEnableClientState(GL_NORMAL_ARRAY);
+ glEnableClientState(GL_COLOR_ARRAY);
- cache=edit->pathcache;
- for(i=0; i<totpoint; i++){
- path = cache[i];
- glVertexPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->co);
+ glEnable(GL_COLOR_MATERIAL);
+ glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
+ }
+ else {
+ /* flat wire color */
+ glDisableClientState(GL_NORMAL_ARRAY);
+ glDisable(GL_LIGHTING);
+ UI_ThemeColor(TH_WIRE);
+ }
- if(timed) {
- for(k=0, pcol=pathcol, pkey=path; k<steps; k++, pkey++, pcol+=4){
- VECCOPY(pcol, pkey->col);
- pcol[3] = 1.0f - fabs((float)CFRA - pkey->time)/(float)pset->fade_frames;
+ /* only draw child paths with lighting */
+ if(dt > OB_WIRE)
+ glEnable(GL_LIGHTING);
+
+ if(psys->part->draw_as == PART_DRAW_PATH) {
+ for(i=0, path=psys->childcache; i<totchild; i++,path++){
+ glVertexPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), (*path)->co);
+ if(dt > OB_WIRE) {
+ glNormalPointer(GL_FLOAT, sizeof(ParticleCacheKey), (*path)->vel);
+ glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), (*path)->col);
}
- glColorPointer(4, GL_FLOAT, 4*sizeof(float), pathcol);
+ glDrawArrays(GL_LINE_STRIP, 0, (int)(*path)->steps + 1);
}
- else
- glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->col);
+ }
+
+ if(dt > OB_WIRE)
+ glDisable(GL_LIGHTING);
- glDrawArrays(GL_LINE_STRIP, 0, path->steps + 1);
+ if(pset->brushtype == PE_BRUSH_WEIGHT) {
+ glLineWidth(2.0f);
+ glEnableClientState(GL_COLOR_ARRAY);
+ glDisable(GL_LIGHTING);
}
- if(pathcol) { MEM_freeN(pathcol); pathcol = pcol = NULL; }
+ /* draw parents last without lighting */
+ for(i=0, pa=psys->particles, path = psys->pathcache; i<totpart; i++, pa++, path++){
+ glVertexPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), (*path)->co);
+ if(dt > OB_WIRE)
+ glNormalPointer(GL_FLOAT, sizeof(ParticleCacheKey), (*path)->vel);
+ if(dt > OB_WIRE || pset->brushtype == PE_BRUSH_WEIGHT)
+ glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), (*path)->col);
+ glDrawArrays(GL_LINE_STRIP, 0, (int)(*path)->steps + 1);
+ }
/* draw edit vertices */
if(pset->selectmode!=SCE_SELECT_PATH){
+ glDisableClientState(GL_NORMAL_ARRAY);
+ glEnableClientState(GL_COLOR_ARRAY);
+ glDisable(GL_LIGHTING);
glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE));
if(pset->selectmode==SCE_SELECT_POINT){
- float *pd=0,*pdata=0;
float *cd=0,*cdata=0;
- int totkeys = 0;
-
- for (i=0, point=edit->points; i<totpoint; i++, point++)
- if(!(point->flag & PEP_HIDE))
- totkeys += point->totkey;
-
- if(!(edit->points->keys->flag & PEK_USE_WCO))
- pd=pdata=MEM_callocN(totkeys*3*sizeof(float), "particle edit point data");
- cd=cdata=MEM_callocN(totkeys*(timed?4:3)*sizeof(float), "particle edit color data");
-
- for(i=0, point=edit->points; i<totpoint; i++, point++){
- if(point->flag & PEP_HIDE)
- continue;
-
- for(k=0, key=point->keys; k<point->totkey; k++, key++){
- if(pd) {
- VECCOPY(pd, key->co);
- pd += 3;
- }
+ cd=cdata=MEM_callocN(edit->totkeys*(timed?4:3)*sizeof(float), "particle edit color data");
+ for(i=0, pa=psys->particles; i<totpart; i++, pa++){
+ for(k=0, key=edit->keys[i]; k<pa->totkey; k++, key++){
if(key->flag&PEK_SELECT){
VECCOPY(cd,sel_col);
}
else{
VECCOPY(cd,nosel_col);
}
-
if(timed)
- *(cd+3) = 1.0f - fabs((float)CFRA - *key->time)/(float)pset->fade_frames;
-
+ *(cd+3) = (key->flag&PEK_HIDE)?0.0f:1.0f;
cd += (timed?4:3);
}
}
cd=cdata;
- pd=pdata;
- for(i=0, point=edit->points; i<totpoint; i++, point++){
- if(point->flag & PEP_HIDE)
- continue;
-
- if(point->keys->flag & PEK_USE_WCO)
- glVertexPointer(3, GL_FLOAT, sizeof(PTCacheEditKey), point->keys->world_co);
- else
- glVertexPointer(3, GL_FLOAT, 3*sizeof(float), pd);
-
- glColorPointer((timed?4:3), GL_FLOAT, (timed?4:3)*sizeof(float), cd);
+ for(i=0, pa=psys->particles; i<totpart; i++, pa++){
+ if((pa->flag & PARS_HIDE)==0){
+ glVertexPointer(3, GL_FLOAT, sizeof(ParticleEditKey), edit->keys[i]->world_co);
+ glColorPointer((timed?4:3), GL_FLOAT, (timed?4:3)*sizeof(float), cd);
+ glDrawArrays(GL_POINTS, 0, pa->totkey);
+ }
+ cd += (timed?4:3) * pa->totkey;
- glDrawArrays(GL_POINTS, 0, point->totkey);
+ if((pset->flag&PE_SHOW_TIME) && (pa->flag&PARS_HIDE)==0 && !(G.f & G_RENDER_SHADOW)){
+ for(k=0, key=edit->keys[i]+k; k<pa->totkey; k++, key++){
+ if(key->flag & PEK_HIDE) continue;
- pd += pd ? 3 * point->totkey : 0;
- cd += (timed?4:3) * point->totkey;
+ sprintf(val," %.1f",*key->time);
+ view3d_particle_text_draw_add(key->world_co[0], key->world_co[1], key->world_co[2], val, 0);
+ }
+ }
}
- if(pdata) { MEM_freeN(pdata); pd=pdata=0; }
- if(cdata) { MEM_freeN(cdata); cd=cdata=0; }
+ if(cdata)
+ MEM_freeN(cdata);
+ cd=cdata=0;
}
else if(pset->selectmode == SCE_SELECT_END){
- for(i=0, point=edit->points; i<totpoint; i++, point++){
- if((point->flag & PEP_HIDE)==0){
- key = point->keys + point->totkey - 1;
+ for(i=0, pa=psys->particles; i<totpart; i++, pa++){
+ if((pa->flag & PARS_HIDE)==0){
+ key = edit->keys[i] + pa->totkey - 1;
if(key->flag & PEK_SELECT)
glColor3fv(sel_col);
else
glColor3fv(nosel_col);
/* has to be like this.. otherwise selection won't work, have try glArrayElement later..*/
glBegin(GL_POINTS);
- glVertex3fv(key->flag & PEK_USE_WCO ? key->world_co : key->co);
+ glVertex3fv(key->world_co);
glEnd();
+
+ if((pset->flag & PE_SHOW_TIME) && !(G.f & G_RENDER_SHADOW)){
+ sprintf(val," %.1f",*key->time);
+ view3d_particle_text_draw_add(key->world_co[0], key->world_co[1], key->world_co[2], val, 0);
+ }
}
}
}
@@ -3878,18 +3893,18 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Obj
unsigned int nurbcol[8]= {
0, 0x9090, 0x409030, 0x603080, 0, 0x40fff0, 0x40c033, 0xA090F0 };
-static void tekenhandlesN(Nurb *nu, short sel, short hide_handles)
+static void tekenhandlesN(Nurb *nu, short sel)
{
BezTriple *bezt;
float *fp;
unsigned int *col;
int a;
- if(nu->hide || hide_handles) return;
+ if(nu->hide || (G.f & G_HIDDENHANDLES)) return;
glBegin(GL_LINES);
- if(nu->type == CU_BEZIER) {
+ if( (nu->type & 7)==CU_BEZIER) {
if(sel) col= nurbcol+4;
else col= nurbcol;
@@ -3929,7 +3944,7 @@ static void tekenhandlesN(Nurb *nu, short sel, short hide_handles)
glEnd();
}
-static void tekenvertsN(Nurb *nu, short sel, short hide_handles)
+static void tekenvertsN(Nurb *nu, short sel)
{
BezTriple *bezt;
BPoint *bp;
@@ -3946,13 +3961,13 @@ static void tekenvertsN(Nurb *nu, short sel, short hide_handles)
bglBegin(GL_POINTS);
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
if(bezt->hide==0) {
- if (hide_handles) {
+ if (G.f & G_HIDDENHANDLES) {
if((bezt->f2 & SELECT)==sel) bglVertex3fv(bezt->vec[1]);
} else {
if((bezt->f1 & SELECT)==sel) bglVertex3fv(bezt->vec[0]);
@@ -3987,7 +4002,7 @@ static void draw_editnurb(Object *ob, Nurb *nurb, int sel)
nu= nurb;
while(nu) {
if(nu->hide==0) {
- switch(nu->type) {
+ switch(nu->type & 7) {
case CU_POLY:
cpack(nurbcol[3]);
bp= nu->bp;
@@ -4084,7 +4099,6 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
Curve *cu = ob->data;
Nurb *nu;
BevList *bl;
- short hide_handles = (cu->drawflag & CU_HIDE_HANDLES);
// XXX retopo_matrix_update(v3d);
@@ -4096,25 +4110,23 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
/* first non-selected handles */
for(nu=nurb; nu; nu=nu->next) {
- if(nu->type == CU_BEZIER) {
- tekenhandlesN(nu, 0, hide_handles);
+ if((nu->type & 7)==CU_BEZIER) {
+ tekenhandlesN(nu, 0);
}
}
draw_editnurb(ob, nurb, 0);
draw_editnurb(ob, nurb, 1);
/* selected handles */
for(nu=nurb; nu; nu=nu->next) {
- if(nu->type == CU_BEZIER && (cu->drawflag & CU_HIDE_HANDLES)==0)
- tekenhandlesN(nu, 1, hide_handles);
- tekenvertsN(nu, 0, hide_handles);
+ if((nu->type & 7)==1) tekenhandlesN(nu, 1);
+ tekenvertsN(nu, 0);
}
if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
/* direction vectors for 3d curve paths
when at its lowest, dont render normals */
- if(cu->flag & CU_3D && ts->normalsize > 0.0015 && (cu->drawflag & CU_HIDE_NORMALS)==0) {
-
+ if(cu->flag & CU_3D && ts->normalsize > 0.0015) {
UI_ThemeColor(TH_WIRE);
for (bl=cu->bev.first,nu=nurb; nu && bl; bl=bl->next,nu=nu->next) {
BevPoint *bevp= (BevPoint *)(bl+1);
@@ -4149,7 +4161,7 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
if(v3d->zbuf) glDisable(GL_DEPTH_TEST);
for(nu=nurb; nu; nu=nu->next) {
- tekenvertsN(nu, 1, hide_handles);
+ tekenvertsN(nu, 1);
}
if(v3d->zbuf) glEnable(GL_DEPTH_TEST);
@@ -5011,9 +5023,6 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
/* patch? children objects with a timeoffs change the parents. How to solve! */
/* if( ((int)ob->ctime) != F_(scene->r.cfra)) where_is_object(scene, ob); */
-
- /* draw paths... */
- // TODO...
/* multiply view with object matrix */
wmMultMatrix(ob->obmat);
@@ -5286,6 +5295,11 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
for(psys=ob->particlesystem.first; psys; psys=psys->next)
draw_new_particle_system(scene, v3d, rv3d, base, psys, dt);
+ if(ob->mode & OB_MODE_PARTICLE_EDIT && ob==OBACT) {
+ psys= PE_get_current(scene, ob);
+ if(psys && !scene->obedit && psys_in_edit_mode(scene, psys))
+ draw_particle_edit(scene, v3d, rv3d, ob, psys, dt);
+ }
view3d_particle_text_draw(v3d, ar);
wmMultMatrix(ob->obmat);
@@ -5293,21 +5307,6 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
//glDepthMask(GL_TRUE);
if(col) cpack(col);
}
-
- if( (warning_recursive==0) &&
- (flag & DRAW_PICKING)==0 &&
- (!scene->obedit)
- ) {
-
- if(ob->mode & OB_MODE_PARTICLE_EDIT && ob==OBACT) {
- PTCacheEdit *edit = PE_get_current(scene, ob);
- if(edit) {
- wmLoadMatrix(rv3d->viewmat);
- draw_ptcache_edit(scene, v3d, rv3d, ob, edit, dt);
- wmMultMatrix(ob->obmat);
- }
- }
- }
/* draw code for smoke */
if((md = modifiers_findByType(ob, eModifierType_Smoke)))
@@ -5352,20 +5351,314 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
// only draw domains
if(smd->domain && smd->domain->fluid)
{
- if(!smd->domain->wt || !(smd->domain->viewsettings & MOD_SMOKE_VIEW_SHOWBIG))
+ int x, y, z, i;
+ float viewnormal[3];
+ int mainaxis[3] = {0,0,0};
+ float align = 0, signed_align = 0;
+ int max_textures = 0, counter_textures = 0;
+ float *buffer = NULL;
+ int res[3];
+ float bigfactor = 1.0;
+ int big = (smd->domain->flags & MOD_SMOKE_HIGHRES) && (smd->domain->viewsettings & MOD_SMOKE_VIEW_USEBIG);
+ int new = 0;
+ int have_lamp = 0;
+
+ // GUI sent redraw event
+ if(smd->domain->flags & MOD_SMOKE_VIEW_REDRAWNICE)
+ {
+ new = 1;
+ smd->domain->flags &= ~MOD_SMOKE_VIEW_REDRAWNICE;
+ }
+
+ if(!big)
+ {
+ res[0] = smd->domain->res[0];
+ res[1] = smd->domain->res[1];
+ res[2] = smd->domain->res[2];
+ }
+ else
+ {
+ smoke_turbulence_get_res(smd->domain->wt, res);
+ bigfactor = 1.0 / (smd->domain->amplify + 1);
+ }
+
+ wmLoadMatrix(rv3d->viewmat);
+
+ if(col || (ob->flag & SELECT)) cpack(0xFFFFFF); /* for visibility, also while wpaint */
+ glDepthMask(GL_FALSE);
+ glEnable(GL_BLEND);
+
+ // get view vector
+ VECCOPY(viewnormal, rv3d->viewinv[2]);
+ Normalize(viewnormal);
+ for(i = 0; i < 3; i++)
+ {
+ if(ABS(viewnormal[i]) > align)
+ {
+ mainaxis[0] = i;
+ align = ABS(viewnormal[i]);
+ signed_align = viewnormal[i];
+ }
+ }
+ mainaxis[1] = (mainaxis[0] + 1) % 3;
+ mainaxis[2] = (mainaxis[0] + 2) % 3;
+
+ if(!smd->domain->bind)
+ {
+ smd->domain->bind = MEM_callocN(sizeof(GLuint)*256, "Smoke_bind");
+ if(big)
+ smd->domain->viewsettings |= MOD_SMOKE_VIEW_CHANGETOBIG;
+ new = 3;
+ }
+
+ // check if view axis / mode has been changed
+ if(smd->domain->viewsettings)
+ {
+ if(big)
+ {
+ if(!(smd->domain->viewsettings & MOD_SMOKE_VIEW_BIG))
+ new = 2;
+ else if(!(smd->domain->viewsettings & MOD_SMOKE_VIEW_CHANGETOBIG))
+ new = 1;
+
+ smd->domain->viewsettings |= MOD_SMOKE_VIEW_CHANGETOBIG;
+ }
+ else
+ {
+ if(!(smd->domain->viewsettings & MOD_SMOKE_VIEW_SMALL))
+ new = 2;
+ else if(smd->domain->viewsettings & MOD_SMOKE_VIEW_CHANGETOBIG)
+ new = 1;
+
+ smd->domain->viewsettings &= ~MOD_SMOKE_VIEW_CHANGETOBIG;
+ }
+
+ if(!new)
+ {
+ if((mainaxis[0] == 0) && !(smd->domain->viewsettings & MOD_SMOKE_VIEW_X))
+ new = 1;
+ else if((mainaxis[0] == 1) && !(smd->domain->viewsettings & MOD_SMOKE_VIEW_Y))
+ new = 1;
+ else if((mainaxis[0] == 2) && !(smd->domain->viewsettings & MOD_SMOKE_VIEW_Z))
+ new = 1;
+
+ // printf("check axis\n");
+ }
+ }
+ else
+ new = 3;
+
+ if(new > 1)
+ {
+ float light[3] = {0.0,0.0,0.0}; // TODO: take real LAMP coordinates - dg
+ Base *base_tmp = NULL;
+
+ for(base_tmp = scene->base.first; base_tmp; base_tmp= base_tmp->next)
+ {
+ if(base_tmp->object->type == OB_LAMP)
+ {
+ Lamp *la = (Lamp *)base_tmp->object->data;
+
+ if(la->type == LA_LOCAL)
+ {
+ VECCOPY(light, base_tmp->object->obmat[3]);
+ have_lamp = 1;
+ break;
+ }
+ }
+ }
+
+ if(!big && !(smd->domain->viewsettings & MOD_SMOKE_VIEW_SMALL))
+ {
+ smoke_prepare_View(smd, light);
+ // printf("prepared View!\n");
+ }
+ else if(big && !(smd->domain->viewsettings & MOD_SMOKE_VIEW_BIG))
+ {
+ smoke_prepare_bigView(smd, light);
+ // printf("prepared bigView!\n");
+ }
+ }
+
+ // printf("big: %d, new: %d\n", big, new);
+
+ // only create buffer if we need to create new textures
+ if(new)
+ buffer = MEM_mallocN(sizeof(float)*res[mainaxis[1]]*res[mainaxis[2]]*4, "SmokeDrawBuffer");
+
+ if(buffer || smd->domain->viewsettings)
+ {
+ int mod_texture = 0;
+
+ // printf("if(buffer || smd->domain->viewsettings)\n");
+
+ max_textures = (res[mainaxis[0]] > 256) ? 256 : res[mainaxis[0]];
+
+ if(!smd->domain->viewsettings) // new frame or new start
+ {
+ smd->domain->max_textures = max_textures;
+ glGenTextures(smd->domain->max_textures, (GLuint *)smd->domain->bind);
+ new = 1;
+ // printf("glGenTextures\n");
+ }
+ else
+ {
+ if(new)
+ {
+ // printf("glDeleteTextures\n");
+ glDeleteTextures(smd->domain->max_textures, (GLuint *)smd->domain->bind);
+ smd->domain->max_textures = max_textures;
+ glGenTextures(smd->domain->max_textures, (GLuint *)smd->domain->bind);
+ }
+ }
+
+ mod_texture = MAX3(1, smd->domain->visibility, (int)(res[mainaxis[0]] / smd->domain->max_textures ));
+
+ // align order of billboards to be front or backview (e.g. +x or -x axis)
+ if(signed_align < 0)
+ {
+ z = res[mainaxis[0]] - 1;
+ }
+ else
+ {
+ z = 0;
+ }
+
+ for (; signed_align > 0 ? (z < res[mainaxis[0]]) : (z >= 0); signed_align > 0 ? z++ : z--) // 2
+ {
+ float quad[4][3];
+
+ if(new)
+ {
+ for (y = 0; y < res[mainaxis[1]]; y++) // 1
+ {
+ for (x = 0; x < res[mainaxis[2]]; x++) // 0
+ {
+ size_t index;
+ size_t image_index;
+ float tray, tvox;
+
+ image_index = smoke_get_index2d(y, res[mainaxis[1]], x);
+
+ if(mainaxis[0] == 0)
+ {
+ // mainaxis[1] == 1, mainaxis[2] == 2
+ index = smoke_get_index(z, res[mainaxis[0]], y, res[mainaxis[1]], x);
+ }
+ else if(mainaxis[0] == 1)
+ {
+ // mainaxis[1] == 2, mainaxis[2] == 0
+ index = smoke_get_index(x, res[mainaxis[2]], z, res[mainaxis[0]], y);
+ }
+ else // mainaxis[0] == 2
+ {
+ // mainaxis[1] == 0, mainaxis[2] == 1
+ index = smoke_get_index(y, res[mainaxis[1]], x, res[mainaxis[2]], z);
+ }
+
+ if(!big)
+ {
+ tvox = smoke_get_tvox(smd, index);
+ tray = smoke_get_tray(smd, index);
+ }
+ else
+ {
+ tvox = smoke_get_bigtvox(smd, index);
+ tray = smoke_get_bigtray(smd, index);
+ }
+
+ if(!have_lamp)
+ tray = 1.0;
+
+ // fill buffer with luminance and alpha
+ // 1 - T_vox
+ buffer[image_index*4 + 3] = 1.0 - tvox; // 0 = transparent => d.h. tvox = 1
+
+ // L_vox = Omega * L_light * (1 - T_vox) * T_ray
+ buffer[image_index*4] = buffer[image_index*4 + 1] = buffer[image_index*4 + 2] = smd->domain->omega * 1.0 * tvox * tray;
+ }
+ }
+ }
+ glBindTexture(GL_TEXTURE_2D, smd->domain->bind[counter_textures]);
+ glEnable(GL_TEXTURE_2D);
+
+ if(new)
+ {
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, res[mainaxis[1]], res[mainaxis[2]], 0, GL_RGBA, GL_FLOAT, buffer);
+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); // Linear Filtering
+ glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); // Linear Filtering
+ }
+
+ if((z % mod_texture) == 0 )
+ {
+ // botttom left
+ quad[3][mainaxis[0]] = smd->domain->p0[mainaxis[0]] + z * smd->domain->dx * bigfactor + smd->domain->dx * bigfactor * 0.5;
+ quad[3][mainaxis[1]] = smd->domain->p0[mainaxis[1]] + smd->domain->dx * bigfactor * 0.5;
+ quad[3][mainaxis[2]] = smd->domain->p0[mainaxis[2]] + smd->domain->dx * bigfactor * 0.5;
+
+ // top right
+ quad[1][mainaxis[0]] = smd->domain->p0[mainaxis[0]] + z * smd->domain->dx * bigfactor + smd->domain->dx * bigfactor * 0.5;
+ quad[1][mainaxis[1]] = smd->domain->p0[mainaxis[1]] + (res[mainaxis[1]] - 1) * smd->domain->dx * bigfactor + smd->domain->dx * bigfactor * 0.5;
+ quad[1][mainaxis[2]] = smd->domain->p0[mainaxis[2]] + (res[mainaxis[2]] - 1) * smd->domain->dx * bigfactor + smd->domain->dx * bigfactor * 0.5;
+
+ // top left
+ quad[2][mainaxis[0]] = smd->domain->p0[mainaxis[0]] + z * smd->domain->dx * bigfactor + smd->domain->dx * bigfactor * 0.5;
+ quad[2][mainaxis[1]] = smd->domain->p0[mainaxis[1]] + smd->domain->dx * bigfactor * 0.5;
+ quad[2][mainaxis[2]] = smd->domain->p0[mainaxis[2]] + (res[mainaxis[2]] - 1) * smd->domain->dx * bigfactor + smd->domain->dx * bigfactor * 0.5;
+
+ // bottom right
+ quad[0][mainaxis[0]] = smd->domain->p0[mainaxis[0]] + z * smd->domain->dx * bigfactor + smd->domain->dx * bigfactor * 0.5;
+ quad[0][mainaxis[1]] = smd->domain->p0[mainaxis[1]] + (res[mainaxis[1]] - 1) * smd->domain->dx * bigfactor + smd->domain->dx * bigfactor * 0.5;
+ quad[0][mainaxis[2]] = smd->domain->p0[mainaxis[2]] + smd->domain->dx * bigfactor * 0.5;
+
+ glBegin(GL_QUADS); // Start Drawing Quads
+
+ glTexCoord2f(1.0f, 0.0f);
+ glVertex3fv(quad[0]); // Left And Up 1 Unit (Top Left)
+ glTexCoord2f(1.0f, 1.0f);
+ glVertex3fv(quad[1]); // Right And Up 1 Unit (Top Right)
+ glTexCoord2f(0.0f, 1.0f);
+ glVertex3fv(quad[2]); // Right And Down One Unit (Bottom Right)
+ glTexCoord2f(0.0f, 0.0f);
+ glVertex3fv(quad[3]); // Left And Down One Unit (Bottom Left)
+
+ glEnd();
+ }
+ counter_textures++;
+ }
+ }
+ if(buffer)
{
- smd->domain->tex = NULL;
- GPU_create_smoke(smd, 0);
- draw_volume(scene, ar, v3d, base, smd->domain->tex, smd->domain->res, smd->domain->dx, smd->domain->tex_shadow);
- GPU_free_smoke(smd);
+ MEM_freeN(buffer);
+ buffer = NULL;
}
- else if(smd->domain->wt || (smd->domain->viewsettings & MOD_SMOKE_VIEW_SHOWBIG))
+
+ // set correct flag for viewsettings
+ if(1)
{
- smd->domain->tex = NULL;
- GPU_create_smoke(smd, 1);
- draw_volume(scene, ar, v3d, base, smd->domain->tex, smd->domain->res_wt, smd->domain->dx_wt, smd->domain->tex_shadow);
- GPU_free_smoke(smd);
+ // do not clear BIG/SMALL flag
+ smd->domain->viewsettings &= ~MOD_SMOKE_VIEW_X;
+ smd->domain->viewsettings &= ~MOD_SMOKE_VIEW_Y;
+ smd->domain->viewsettings &= ~MOD_SMOKE_VIEW_Z;
+
+ // set what caches we have
+ if(big)
+ smd->domain->viewsettings |= MOD_SMOKE_VIEW_BIG;
+ else
+ smd->domain->viewsettings |= MOD_SMOKE_VIEW_SMALL;
+
+ if(mainaxis[0] == 0)
+ smd->domain->viewsettings |= MOD_SMOKE_VIEW_X;
+ else if(mainaxis[0] == 1)
+ smd->domain->viewsettings |= MOD_SMOKE_VIEW_Y;
+ else if(mainaxis[0] == 2)
+ smd->domain->viewsettings |= MOD_SMOKE_VIEW_Z;
}
+
+ wmMultMatrix(ob->obmat);
+ glDisable(GL_BLEND);
+ glDepthMask(GL_TRUE);
+ if(col) cpack(col);
}
}
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
deleted file mode 100644
index c8eda10566c..00000000000
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ /dev/null
@@ -1,350 +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., 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.
- *
- * Contributor(s): Daniel Genrich
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-
-#include <string.h>
-#include <math.h>
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "MEM_guardedalloc.h"
-
-#include "IMB_imbuf.h"
-
-
-
-
-#include "DNA_armature_types.h"
-#include "DNA_boid_types.h"
-#include "DNA_camera_types.h"
-#include "DNA_curve_types.h"
-#include "DNA_constraint_types.h" // for drawing constraint
-#include "DNA_effect_types.h"
-#include "DNA_lamp_types.h"
-#include "DNA_lattice_types.h"
-#include "DNA_material_types.h"
-#include "DNA_mesh_types.h"
-#include "DNA_meshdata_types.h"
-#include "DNA_meta_types.h"
-#include "DNA_modifier_types.h"
-#include "DNA_object_types.h"
-#include "DNA_object_force.h"
-#include "DNA_object_fluidsim.h"
-#include "DNA_particle_types.h"
-#include "DNA_space_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_screen_types.h"
-#include "DNA_smoke_types.h"
-#include "DNA_userdef_types.h"
-#include "DNA_view3d_types.h"
-#include "DNA_world_types.h"
-
-#include "BLI_blenlib.h"
-#include "BLI_arithb.h"
-#include "BLI_editVert.h"
-#include "BLI_edgehash.h"
-#include "BLI_rand.h"
-
-#include "BKE_anim.h" //for the where_on_path function
-#include "BKE_curve.h"
-#include "BKE_constraint.h" // for the get_constraint_target function
-#include "BKE_DerivedMesh.h"
-#include "BKE_deform.h"
-#include "BKE_displist.h"
-#include "BKE_effect.h"
-#include "BKE_font.h"
-#include "BKE_global.h"
-#include "BKE_image.h"
-#include "BKE_key.h"
-#include "BKE_lattice.h"
-#include "BKE_mesh.h"
-#include "BKE_material.h"
-#include "BKE_mball.h"
-#include "BKE_modifier.h"
-#include "BKE_object.h"
-#include "BKE_paint.h"
-#include "BKE_particle.h"
-#include "BKE_property.h"
-#include "BKE_smoke.h"
-#include "BKE_unit.h"
-#include "BKE_utildefines.h"
-#include "smoke_API.h"
-
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
-
-#include "GPU_draw.h"
-#include "GPU_material.h"
-#include "GPU_extensions.h"
-
-#include "ED_mesh.h"
-#include "ED_particle.h"
-#include "ED_screen.h"
-#include "ED_types.h"
-#include "ED_util.h"
-
-#include "UI_resources.h"
-#include "UI_interface_icons.h"
-
-#include "WM_api.h"
-#include "BLF_api.h"
-
-#include "GPU_extensions.h"
-
-#include "view3d_intern.h" // own include
-
-struct GPUTexture;
-
-/* draw slices of smoke is adapted from c++ code authored by: Johannes Schmid and Ingemar Rask, 2006, johnny@grob.org */
-static float cv[][3] = {
- {1.0f, 1.0f, 1.0f}, {-1.0f, 1.0f, 1.0f}, {-1.0f, -1.0f, 1.0f}, {1.0f, -1.0f, 1.0f},
- {1.0f, 1.0f, -1.0f}, {-1.0f, 1.0f, -1.0f}, {-1.0f, -1.0f, -1.0f}, {1.0f, -1.0f, -1.0f}
-};
-
-// edges have the form edges[n][0][xyz] + t*edges[n][1][xyz]
-static float edges[12][2][3] = {
- {{1.0f, 1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}},
- {{-1.0f, 1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}},
- {{-1.0f, -1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}},
- {{1.0f, -1.0f, -1.0f}, {0.0f, 0.0f, 1.0f}},
-
- {{1.0f, -1.0f, 1.0f}, {0.0f, 1.0f, 0.0f}},
- {{-1.0f, -1.0f, 1.0f}, {0.0f, 1.0f, 0.0f}},
- {{-1.0f, -1.0f, -1.0f}, {0.0f, 1.0f, 0.0f}},
- {{1.0f, -1.0f, -1.0f}, {0.0f, 1.0f, 0.0f}},
-
- {{-1.0f, 1.0f, 1.0f}, {1.0f, 0.0f, 0.0f}},
- {{-1.0f, -1.0f, 1.0f}, {1.0f, 0.0f, 0.0f}},
- {{-1.0f, -1.0f, -1.0f}, {1.0f, 0.0f, 0.0f}},
- {{-1.0f, 1.0f, -1.0f}, {1.0f, 0.0f, 0.0f}}
-};
-
-int intersect_edges(float *points, float a, float b, float c, float d)
-{
- int i;
- float t;
- int numpoints = 0;
-
- for (i=0; i<12; i++) {
- t = -(a*edges[i][0][0] + b*edges[i][0][1] + c*edges[i][0][2] + d)
- / (a*edges[i][1][0] + b*edges[i][1][1] + c*edges[i][1][2]);
- if ((t>0)&&(t<2)) {
- points[numpoints * 3 + 0] = edges[i][0][0] + edges[i][1][0]*t;
- points[numpoints * 3 + 1] = edges[i][0][1] + edges[i][1][1]*t;
- points[numpoints * 3 + 2] = edges[i][0][2] + edges[i][1][2]*t;
- numpoints++;
- }
- }
- return numpoints;
-}
-
-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);
- Crossf(tmp, va, vb);
- return INPR(up, tmp) >= 0;
-}
-
-// copied from gpu_extension.c
-static int is_pow2(int n)
-{
- return ((n)&(n-1))==0;
-}
-
-static int larger_pow2(int n)
-{
- if (is_pow2(n))
- return n;
-
- while(!is_pow2(n))
- n= n&(n-1);
-
- return n*2;
-}
-
-void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture *tex, int res[3], float dx, GPUTexture *tex_shadow)
-{
- Object *ob = base->object;
- RegionView3D *rv3d= ar->regiondata;
-
- float viewnormal[3];
- int i, j, n;
- float d, d0, dd;
- float *points = NULL;
- int numpoints = 0;
- float cor[3] = {1.,1.,1.};
- int gl_depth = 0, gl_blend = 0;
-
- /* Fragment program to calculate the 3dview of smoke */
- /* using 2 textures, density and shadow */
- const char *text = "!!ARBfp1.0\n"
- "PARAM dx = program.local[0];\n"
- "PARAM darkness = program.local[1];\n"
- "PARAM f = {1.442695041, 1.442695041, 1.442695041, 0.01};\n"
- "TEMP temp, shadow, value;\n"
- "TEX temp, fragment.texcoord[0], texture[0], 3D;\n"
- "TEX shadow, fragment.texcoord[0], texture[1], 3D;\n"
- "MUL value, temp, darkness;\n"
- "MUL value, value, dx;\n"
- "MUL value, value, f;\n"
- "EX2 temp, -value.r;\n"
- "SUB temp.a, 1.0, temp.r;\n"
- "MUL temp.r, temp.r, shadow.r;\n"
- "MUL temp.g, temp.g, shadow.r;\n"
- "MUL temp.b, temp.b, shadow.r;\n"
- "MOV result.color, temp;\n"
- "END\n";
- unsigned int prog;
-
- glGetBooleanv(GL_BLEND, (GLboolean *)&gl_blend);
- glGetBooleanv(GL_DEPTH_TEST, (GLboolean *)&gl_depth);
-
- wmLoadMatrix(rv3d->viewmat);
- wmMultMatrix(ob->obmat);
-
- glDepthMask(GL_FALSE);
- glDisable(GL_DEPTH_TEST);
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-
- // get view vector
- VECCOPY(viewnormal, rv3d->viewinv[2]);
- Normalize(viewnormal);
-
- // find cube vertex that is closest to the viewer
- for (i=0; i<8; i++) {
- float x,y,z;
-
- x = cv[i][0] + viewnormal[0];
- y = cv[i][1] + viewnormal[1];
- z = cv[i][2] + viewnormal[2];
-
- if ((x>=-1.0f)&&(x<=1.0f)
- &&(y>=-1.0f)&&(y<=1.0f)
- &&(z>=-1.0f)&&(z<=1.0f)) {
- break;
- }
- }
-
- if(GLEW_ARB_fragment_program)
- {
- glGenProgramsARB(1, &prog);
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
-
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, prog);
- glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, (GLsizei)strlen(text), text);
-
- // cell spacing
- glProgramLocalParameter4fARB (GL_FRAGMENT_PROGRAM_ARB, 0, dx, dx, dx, 1.0);
- // custom parameter for smoke style (higher = thicker)
- glProgramLocalParameter4fARB (GL_FRAGMENT_PROGRAM_ARB, 1, 7.0, 7.0, 7.0, 1.0);
- }
-
- GPU_texture_bind(tex, 0);
- if(tex_shadow)
- GPU_texture_bind(tex_shadow, 1);
-
- if (!GLEW_ARB_texture_non_power_of_two) {
- cor[0] = (float)res[0]/(float)larger_pow2(res[0]);
- cor[1] = (float)res[1]/(float)larger_pow2(res[1]);
- cor[2] = (float)res[2]/(float)larger_pow2(res[2]);
- }
-
- // our slices are defined by the plane equation a*x + b*y +c*z + d = 0
- // (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]);
- dd = 2.0*d0/64.0f;
- n = 0;
-
- // printf("d0: %f, dd: %f\n", d0, dd);
-
- points = MEM_callocN(sizeof(float)*12*3, "smoke_points_preview");
-
- for (d = d0; d > -d0; d -= dd) {
- float p0[3];
- // intersect_edges returns the intersection points of all cube edges with
- // the given plane that lie within the cube
- numpoints = intersect_edges(points, viewnormal[0], viewnormal[1], viewnormal[2], d);
-
- if (numpoints > 2) {
- VECCOPY(p0, points);
-
- // sort points to get a convex polygon
- for(i = 1; i < numpoints - 1; i++)
- {
- for(j = i + 1; j < numpoints; j++)
- {
- if(convex(p0, viewnormal, &points[j * 3], &points[i * 3]))
- {
- float tmp2[3];
- VECCOPY(tmp2, &points[i * 3]);
- VECCOPY(&points[i * 3], &points[j * 3]);
- VECCOPY(&points[j * 3], tmp2);
- }
- }
- }
-
- glBegin(GL_POLYGON);
- for (i = 0; i < numpoints; i++) {
- glColor3f(1.0, 1.0, 1.0);
- glTexCoord3d((points[i * 3 + 0] + 1.0)*cor[0]/2.0, (points[i * 3 + 1] + 1)*cor[1]/2.0, (points[i * 3 + 2] + 1.0)*cor[2]/2.0);
- glVertex3f(points[i * 3 + 0], points[i * 3 + 1], points[i * 3 + 2]);
- }
- glEnd();
- }
- n++;
- }
-
- if(tex_shadow)
- GPU_texture_unbind(tex_shadow);
- GPU_texture_unbind(tex);
-
- if(GLEW_ARB_fragment_program)
- {
- glDisable(GL_FRAGMENT_PROGRAM_ARB);
- glDeleteProgramsARB(1, &prog);
- }
-
-
- MEM_freeN(points);
-
- if(!gl_blend)
- glDisable(GL_BLEND);
- if(gl_depth)
- {
- glEnable(GL_DEPTH_TEST);
- glDepthMask(GL_TRUE);
- }
-}
-
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 2250c2e7718..8b719dd2d80 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -280,7 +280,7 @@ static void view3d_modal_keymaps(wmWindowManager *wm, ARegion *ar, int stype)
/* copy last mode, then we can re-init the region maps */
rv3d->lastmode= stype;
-
+
keymap= WM_keymap_listbase(wm, "Object Mode", 0, 0);
if(ELEM(stype, 0, NS_MODE_OBJECT))
WM_event_add_keymap_handler(&ar->handlers, keymap);
@@ -304,12 +304,6 @@ static void view3d_modal_keymaps(wmWindowManager *wm, ARegion *ar, int stype)
WM_event_add_keymap_handler(&ar->handlers, keymap);
else
WM_event_remove_keymap_handler(&ar->handlers, keymap);
-
- keymap= WM_keymap_listbase(wm, "Pose", 0, 0);
- if(stype==NS_MODE_POSE)
- WM_event_add_keymap_handler(&ar->handlers, keymap);
- else
- WM_event_remove_keymap_handler(&ar->handlers, keymap);
keymap= WM_keymap_listbase(wm, "Metaball", 0, 0);
if(stype==NS_EDITMODE_MBALL)
@@ -325,7 +319,7 @@ static void view3d_modal_keymaps(wmWindowManager *wm, ARegion *ar, int stype)
/* armature sketching needs to take over mouse */
keymap= WM_keymap_listbase(wm, "Armature_Sketch", 0, 0);
- if(stype==NS_EDITMODE_ARMATURE)
+ if(stype==NS_EDITMODE_TEXT)
WM_event_add_keymap_handler_priority(&ar->handlers, keymap, 10);
else
WM_event_remove_keymap_handler(&ar->handlers, keymap);
@@ -452,24 +446,16 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
case ND_BONE_ACTIVE:
case ND_BONE_SELECT:
case ND_TRANSFORM:
+ case ND_GEOM_SELECT:
+ case ND_GEOM_DATA:
case ND_DRAW:
case ND_MODIFIER:
case ND_CONSTRAINT:
case ND_KEYS:
- case ND_PARTICLE_SELECT:
- case ND_PARTICLE_DATA:
- ED_region_tag_redraw(ar);
- break;
- }
- break;
- case NC_GEOM:
- switch(wmn->data) {
- case ND_DATA:
- case ND_SELECT:
+ case ND_PARTICLE:
ED_region_tag_redraw(ar);
break;
}
- break;
case NC_GROUP:
/* all group ops for now */
ED_region_tag_redraw(ar);
@@ -491,10 +477,6 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
* more context than just the region */
ED_region_tag_redraw(ar);
break;
- case NC_SPACE:
- if(wmn->data == ND_SPACE_VIEW3D)
- ED_region_tag_redraw(ar);
- break;
}
}
@@ -540,10 +522,6 @@ static void view3d_header_area_listener(ARegion *ar, wmNotifier *wmn)
break;
}
break;
- case NC_SPACE:
- if(wmn->data == ND_SPACE_VIEW3D)
- ED_region_tag_redraw(ar);
- break;
}
}
@@ -592,24 +570,13 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
case ND_BONE_ACTIVE:
case ND_BONE_SELECT:
case ND_TRANSFORM:
+ case ND_GEOM_SELECT:
+ case ND_GEOM_DATA:
case ND_DRAW:
case ND_KEYS:
ED_region_tag_redraw(ar);
break;
}
- break;
- case NC_GEOM:
- switch(wmn->data) {
- case ND_DATA:
- case ND_SELECT:
- ED_region_tag_redraw(ar);
- break;
- }
- break;
- case NC_SPACE:
- if(wmn->data == ND_SPACE_VIEW3D)
- ED_region_tag_redraw(ar);
- break;
}
}
@@ -898,7 +865,7 @@ void ED_spacetype_view3d(void)
/* regions: main window */
art= MEM_callocN(sizeof(ARegionType), "spacetype view3d region");
art->regionid = RGN_TYPE_WINDOW;
- art->keymapflag= ED_KEYMAP_FRAMES|ED_KEYMAP_GPENCIL;
+ art->keymapflag= ED_KEYMAP_FRAMES;
art->draw= view3d_main_area_draw;
art->init= view3d_main_area_init;
art->free= view3d_main_area_free;
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 06320f871da..9b05f5b25b2 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -36,7 +36,6 @@
#include "DNA_armature_types.h"
#include "DNA_curve_types.h"
#include "DNA_camera_types.h"
-#include "DNA_gpencil_types.h"
#include "DNA_lamp_types.h"
#include "DNA_lattice_types.h"
#include "DNA_meta_types.h"
@@ -82,7 +81,6 @@
#include "ED_armature.h"
#include "ED_curve.h"
#include "ED_image.h"
-#include "ED_gpencil.h"
#include "ED_keyframing.h"
#include "ED_mesh.h"
#include "ED_object.h"
@@ -226,7 +224,7 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d,
nu= cu->editnurb->first;
while(nu) {
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
@@ -409,7 +407,7 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d,
nu= cu->editnurb->first;
while(nu) {
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
@@ -512,7 +510,7 @@ static void v3d_posearmature_buts(uiBlock *block, View3D *v3d, Object *ob, float
uiButSetFunc(but, validate_bonebutton_cb, bone, NULL);
uiButSetCompleteFunc(but, autocomplete_bone, (void *)ob);
- QuatToEulO(pchan->quat, tfp->ob_eul, pchan->rotmode); // XXX?
+ QuatToEul(pchan->quat, tfp->ob_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;
@@ -660,7 +658,7 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
return; /* no notifier! */
case B_OBJECTPANEL:
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_object_flush_update(scene, ob, OB_RECALC_OB);
break;
case B_OBJECTPANELROT:
@@ -668,7 +666,7 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
ob->rot[0]= M_PI*tfp->ob_eul[0]/180.0;
ob->rot[1]= M_PI*tfp->ob_eul[1]/180.0;
ob->rot[2]= M_PI*tfp->ob_eul[2]/180.0;
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_object_flush_update(scene, ob, OB_RECALC_OB);
}
break;
@@ -706,7 +704,7 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
VECCOPY(ob->size, tfp->ob_scale);
}
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_object_flush_update(scene, ob, OB_RECALC_OB);
}
break;
@@ -752,14 +750,14 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
/* prevent multiple B_OBJECTPANELDIMS events to keep scaling, cycling with TAB on buttons can cause that */
VECCOPY(tfp->ob_dims, old_dims);
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_object_flush_update(scene, ob, OB_RECALC_OB);
}
break;
case B_OBJECTPANELMEDIAN:
if(ob) {
v3d_editvertex_buts(C, NULL, v3d, ob, 1.0);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
break;
@@ -770,7 +768,7 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
ob->parent= NULL;
else {
DAG_scene_sort(scene);
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_object_flush_update(scene, ob, OB_RECALC_OB);
}
}
break;
@@ -841,13 +839,13 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
eul[0]= M_PI*tfp->ob_eul[0]/180.0;
eul[1]= M_PI*tfp->ob_eul[1]/180.0;
eul[2]= M_PI*tfp->ob_eul[2]/180.0;
- EulOToQuat(eul, pchan->rotmode, pchan->quat); // xxx?
+ EulToQuat(eul, pchan->quat);
}
/* no break, pass on */
case B_ARMATUREPANEL2:
{
ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
break;
case B_TRANSFORMSPACEADD:
@@ -899,8 +897,8 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
Mesh *me= ob->data;
int a;
for(a=0; a<me->totvert; a++)
- ED_vgroup_vert_remove (ob, defGroup, a);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ remove_vert_defgroup (ob, defGroup, a);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
}
break;
@@ -1201,6 +1199,33 @@ static void view3d_panel_preview(bContext *C, ARegion *ar, short cntrl) // VIEW3
}
#endif
+#if 0
+static void view3d_panel_gpencil(const bContext *C, Panel *pa)
+{
+ View3D *v3d= CTX_wm_view3d(C);
+ uiBlock *block;
+
+ block= uiLayoutFreeBlock(pa->layout);
+
+ /* allocate memory for gpd if drawing enabled (this must be done first or else we crash) */
+ if (v3d->flag2 & V3D_DISPGP) {
+// if (v3d->gpd == NULL)
+// XXX gpencil_data_setactive(ar, gpencil_data_addnew());
+ }
+
+ if (v3d->flag2 & V3D_DISPGP) {
+// XXX bGPdata *gpd= v3d->gpd;
+
+ /* draw button for showing gpencil settings and drawings */
+ uiDefButBitS(block, TOG, V3D_DISPGP, B_REDR, "Use Grease Pencil", 10, 225, 150, 20, &v3d->flag2, 0, 0, 0, 0, "Display freehand annotations overlay over this 3D View (draw using Shift-LMB)");
+ }
+ else {
+ uiDefButBitS(block, TOG, V3D_DISPGP, B_REDR, "Use Grease Pencil", 10, 225, 150, 20, &v3d->flag2, 0, 0, 0, 0, "Display freehand annotations overlay over this 3D View");
+ uiDefBut(block, LABEL, 1, " ", 160, 180, 150, 20, NULL, 0.0, 0.0, 0, 0, "");
+ }
+}
+#endif
+
static void delete_sketch_armature(bContext *C, void *arg1, void *arg2)
{
BIF_deleteSketch(C);
@@ -1391,12 +1416,6 @@ void view3d_buttons_register(ARegionType *art)
strcpy(pt->label, "Transform");
pt->draw= view3d_panel_object;
BLI_addtail(&art->paneltypes, pt);
-
- pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel gpencil");
- strcpy(pt->idname, "VIEW3D_PT_gpencil");
- strcpy(pt->label, "Grease Pencil");
- pt->draw= gpencil_panel_standard;
- BLI_addtail(&art->paneltypes, pt);
/*
pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel properties");
strcpy(pt->idname, "VIEW3D_PT_properties");
@@ -1451,7 +1470,6 @@ static int view3d_properties(bContext *C, wmOperator *op)
void VIEW3D_OT_properties(wmOperatorType *ot)
{
ot->name= "Properties";
- ot->description= "Display the properties panel.";
ot->idname= "VIEW3D_OT_properties";
ot->exec= view3d_properties;
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 66113ec4941..3140ae76d4b 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -78,7 +78,6 @@
#include "ED_armature.h"
#include "ED_keyframing.h"
-#include "ED_gpencil.h"
#include "ED_mesh.h"
#include "ED_screen.h"
#include "ED_space_api.h"
@@ -1093,7 +1092,6 @@ void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d)
{
RegionView3D *rv3d= ar->regiondata;
struct Base *base = scene->basact;
- rcti winrct;
/*for 2.43 release, don't use glext and just define the constant.
this to avoid possibly breaking platforms before release.*/
@@ -1139,9 +1137,6 @@ void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d)
glDisable(GL_DITHER);
- region_scissor_winrct(ar, &winrct);
- glScissor(winrct.xmin, winrct.ymin, winrct.xmax - winrct.xmin, winrct.ymax - winrct.ymin);
-
glClearColor(0.0, 0.0, 0.0, 0.0);
if(v3d->zbuf) {
glEnable(GL_DEPTH_TEST);
@@ -1421,8 +1416,7 @@ static void draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d)
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
-// glaDefine2DArea(&ar->winrct);
- ED_region_pixelspace(ar);
+ glaDefine2DArea(&ar->winrct);
glEnable(GL_BLEND);
@@ -2084,8 +2078,8 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
}
/* draw grease-pencil stuff */
- //if (v3d->flag2 & V3D_DISPGP)
- draw_gpencil_3dview((bContext *)C, 1);
+// if (v3d->flag2 & V3D_DISPGP)
+// draw_gpencil_3dview(ar, 1);
BDR_drawSketch(C);
@@ -2101,9 +2095,9 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
if(rv3d->persp>1) drawviewborder(scene, ar, v3d);
if(rv3d->rflag & RV3D_FLYMODE) drawviewborder_flymode(ar);
- /* draw grease-pencil stuff - needed to get paint-buffer shown too (since it's 2D) */
+ /* draw grease-pencil stuff */
// if (v3d->flag2 & V3D_DISPGP)
- draw_gpencil_3dview((bContext *)C, 0);
+// draw_gpencil_3dview(ar, 0);
drawcursor(scene, ar, v3d);
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index bbcee0415f8..5ef64274e72 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -857,7 +857,6 @@ static int viewhome_exec(bContext *C, wmOperator *op) /* was view3d_home() in 2.
RegionView3D *rv3d= CTX_wm_region_view3d(C);
Scene *scene= CTX_data_scene(C);
Base *base;
- float *curs;
int center= RNA_boolean_get(op->ptr, "center");
@@ -867,10 +866,6 @@ static int viewhome_exec(bContext *C, wmOperator *op) /* was view3d_home() in 2.
if(center) {
min[0]= min[1]= min[2]= 0.0f;
max[0]= max[1]= max[2]= 0.0f;
-
- /* in 2.4x this also move the cursor to (0, 0, 0) (with shift+c). */
- curs= give_cursor(scene, v3d);
- curs[0]= curs[1]= curs[2]= 0.0;
}
else {
INIT_MINMAX(min, max);
@@ -1895,7 +1890,7 @@ void VIEW3D_OT_manipulator(wmOperatorType *ot)
/* identifiers */
ot->name= "3D Manipulator";
- ot->description = "Manipulate selected item by axis.";
+ ot->description = "";
ot->idname= "VIEW3D_OT_manipulator";
/* api callbacks */
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index a633969d557..6c86c87302c 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -188,6 +188,55 @@ static void handle_view3d_lock(bContext *C)
}
}
+/* XXX; all this context stuff... should become operator */
+void do_layer_buttons(bContext *C, short event)
+{
+ wmWindow *win= CTX_wm_window(C);
+ Scene *scene= CTX_data_scene(C);
+ ScrArea *sa= CTX_wm_area(C);
+ View3D *v3d= sa->spacedata.first;
+ static int oldlay= 1;
+ short shift, alt, ctrl;
+
+ shift= win->eventstate->shift;
+ alt= win->eventstate->alt;
+ ctrl= win->eventstate->ctrl;
+
+ if(v3d==0) return;
+ if(v3d->localview) return;
+
+ if(event==-1 && ctrl) {
+ v3d->scenelock= !v3d->scenelock;
+ do_view3d_header_buttons(C, NULL, B_SCENELOCK);
+ } else if (event<0) {
+ if(v3d->lay== (1<<20)-1) {
+ if(event==-2 || shift) v3d->lay= oldlay;
+ }
+ else {
+ oldlay= v3d->lay;
+ v3d->lay= (1<<20)-1;
+ }
+
+ if(v3d->scenelock) handle_view3d_lock(C);
+
+ /* new layers might need unflushed events events */
+ DAG_scene_update_flags(scene, v3d->lay); /* tags all that moves and flushes */
+ }
+ else {
+ if(alt) {
+ if(event<11) event+= 10;
+ }
+ if(shift) {
+ if(v3d->lay & (1<<event)) v3d->lay -= (1<<event);
+ else v3d->lay += (1<<event);
+ }
+ do_view3d_header_buttons(C, NULL, event+B_LAY);
+ }
+ ED_area_tag_redraw(sa);
+
+ if(v3d->drawtype == OB_SHADED) reshadeall_displist(scene);
+}
+
static int layers_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
@@ -252,7 +301,6 @@ void VIEW3D_OT_layers(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Layers";
- ot->description= "Toggle layer(s) visibility.";
ot->idname= "VIEW3D_OT_layers";
/* api callbacks */
@@ -267,6 +315,403 @@ void VIEW3D_OT_layers(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "");
}
+
+#if 0
+static void do_view3d_view_camerasmenu(bContext *C, void *arg, int event)
+{
+ Scene *scene= CTX_data_scene(C);
+ Base *base;
+ int i=1;
+
+ if (event == 1) {
+ /* Set Active Object as Active Camera */
+ /* XXX ugly hack alert */
+// G.qual |= LR_CTRLKEY;
+// persptoetsen(PAD0);
+// G.qual &= ~LR_CTRLKEY;
+ } else {
+
+ for( base = FIRSTBASE; base; base = base->next ) {
+ if (base->object->type == OB_CAMERA) {
+ i++;
+
+ if (event==i) {
+ /* XXX use api call! */
+
+ break;
+ }
+ }
+ }
+ }
+
+}
+
+
+static uiBlock *view3d_view_camerasmenu(bContext *C, ARegion *ar, void *arg_unused)
+{
+ Scene *scene= CTX_data_scene(C);
+ Base *base;
+ uiBlock *block;
+ short yco= 0, menuwidth=120;
+ int i=1;
+ char camname[48];
+
+ block= uiBeginBlock(C, ar, "view3d_view_camerasmenu", UI_EMBOSSP);
+ uiBlockSetButmFunc(block, do_view3d_view_camerasmenu, NULL);
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Active Object as Active Camera|Ctrl NumPad 0", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, 140, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ for( base = FIRSTBASE; base; base = base->next ) {
+ if (base->object->type == OB_CAMERA) {
+ i++;
+
+ strcpy(camname, base->object->id.name+2);
+ if (base->object == scene->camera) strcat(camname, " (Active)");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, camname, 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, i, "");
+ }
+ }
+
+ uiBlockSetDirection(block, UI_RIGHT);
+ uiTextBoundsBlock(block, 50);
+ return block;
+}
+#endif
+
+#if 0
+static void do_view3d_view_cameracontrolsmenu(bContext *C, void *arg, int event)
+{
+ switch(event) {
+ case 0: /* Orbit Left */
+ persptoetsen(PAD4);
+ break;
+ case 1: /* Orbit Right */
+ persptoetsen(PAD6);
+ break;
+ case 2: /* Orbit Up */
+ persptoetsen(PAD8);
+ break;
+ case 3: /* Orbit Down */
+ persptoetsen(PAD2);
+ break;
+ case 4: /* Pan left */
+ /* XXX ugly hack alert */
+// G.qual |= LR_CTRLKEY;
+ persptoetsen(PAD4);
+// G.qual &= ~LR_CTRLKEY;
+ break;
+ case 5: /* Pan right */
+ /* XXX ugly hack alert */
+// G.qual |= LR_CTRLKEY;
+ persptoetsen(PAD6);
+// G.qual &= ~LR_CTRLKEY;
+ break;
+ case 6: /* Pan up */
+ /* ugly hack alert */
+// G.qual |= LR_CTRLKEY;
+ persptoetsen(PAD8);
+// G.qual &= ~LR_CTRLKEY;
+ break;
+ case 7: /* Pan down */
+ /* ugly hack alert */
+// G.qual |= LR_CTRLKEY;
+ persptoetsen(PAD2);
+// G.qual &= ~LR_CTRLKEY;
+ break;
+ case 8: /* Zoom In */
+ persptoetsen(PADPLUSKEY);
+ break;
+ case 9: /* Zoom Out */
+ persptoetsen(PADMINUS);
+ break;
+ case 10: /* Reset Zoom */
+ persptoetsen(PADENTER);
+ break;
+ case 11: /* Camera Fly mode */
+ fly();
+ break;
+ }
+}
+
+
+static uiBlock *view3d_view_cameracontrolsmenu(bContext *C, ARegion *ar, void *arg_unused)
+{
+/* static short tog=0; */
+ uiBlock *block;
+ short yco= 0, menuwidth=120;
+
+ block= uiBeginBlock(C, ar, "view3d_view_cameracontrolsmenu", UI_EMBOSSP);
+ uiBlockSetButmFunc(block, do_view3d_view_cameracontrolsmenu, NULL);
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Camera Fly Mode|Shift F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 11, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, 140, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Orbit Left|NumPad 4", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Orbit Right|NumPad 6", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Orbit Up|NumPad 8", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Orbit Down|NumPad 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, 140, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Pan Left|Ctrl NumPad 4", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Pan Right|Ctrl NumPad 6", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Pan Up|Ctrl NumPad 8", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 6, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Pan Down|Ctrl NumPad 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 7, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, 140, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Zoom In|NumPad +", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 8, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Zoom Out|NumPad -", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 9, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset Zoom|NumPad Enter", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 10, "");
+
+ uiBlockSetDirection(block, UI_RIGHT);
+ uiTextBoundsBlock(block, 50);
+ return block;
+}
+
+static void do_view3d_view_alignviewmenu(bContext *C, void *arg, int event)
+{
+ Scene *scene= CTX_data_scene(C);
+ ScrArea *sa= CTX_wm_area(C);
+ View3D *v3d= sa->spacedata.first;
+ Object *obedit = CTX_data_edit_object(C);
+ float *curs;
+
+ switch(event) {
+
+ case 0: /* Align View to Selected (edit/faceselect mode) */
+ case 1:
+ case 2:
+ if ((obedit) && (obedit->type == OB_MESH)) {
+ editmesh_align_view_to_selected(v3d, event + 1);
+ }
+ else if (paint_facesel_test(CTX_data_active_object(C))) {
+ Object *obact= OBACT;
+ if (obact && obact->type==OB_MESH) {
+ Mesh *me= obact->data;
+
+ if (me->mtface) {
+// XXX faceselect_align_view_to_selected(v3d, me, event + 1);
+ ED_area_tag_redraw(sa);
+ }
+ }
+ }
+ break;
+ case 3: /* Center View to Cursor */
+ curs= give_cursor(scene, v3d);
+ v3d->ofs[0]= -curs[0];
+ v3d->ofs[1]= -curs[1];
+ v3d->ofs[2]= -curs[2];
+ ED_area_tag_redraw(sa);
+ break;
+ case 4: /* Align Active Camera to View */
+ /* XXX This ugly hack is a symptom of the nasty persptoetsen function,
+ * but at least it works for now.
+ */
+// G.qual |= LR_CTRLKEY|LR_ALTKEY;
+ persptoetsen(PAD0);
+// G.qual &= ~(LR_CTRLKEY|LR_ALTKEY);
+ break;
+ case 5: /* Align View to Selected (object mode) */
+// XXX mainqenter(PADASTERKEY, 1);
+ break;
+ case 6: /* Center View and Cursor to Origin */
+ WM_operator_name_call(C, "VIEW3D_OT_view_center", WM_OP_EXEC_REGION_WIN, NULL);
+ curs= give_cursor(scene, v3d);
+ curs[0]=curs[1]=curs[2]= 0.0;
+ break;
+ }
+}
+
+static uiBlock *view3d_view_alignviewmenu(bContext *C, ARegion *ar, void *arg_unused)
+{
+/* static short tog=0; */
+ uiBlock *block;
+ Object *obedit = CTX_data_edit_object(C);
+ short yco= 0, menuwidth=120;
+
+ block= uiBeginBlock(C, ar, "view3d_view_alignviewmenu", UI_EMBOSSP);
+ uiBlockSetButmFunc(block, do_view3d_view_alignviewmenu, NULL);
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Center View to Cursor|C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Center Cursor and View All|Shift C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 6, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Align Active Camera to View|Ctrl Alt NumPad 0", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
+
+ if (((obedit) && (obedit->type == OB_MESH)) || (paint_facesel_test(CTX_data_active_object(C)))) {
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Align View to Selected (Top)|Shift V", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Align View to Selected (Front)|Shift V", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Align View to Selected (Side)|Shift V", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
+ } else {
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Align View to Selected|NumPad *", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
+ }
+
+ uiBlockSetDirection(block, UI_RIGHT);
+ uiTextBoundsBlock(block, 50);
+ return block;
+}
+#endif
+
+#if 0
+static uiBlock *view3d_view_spacehandlers(bContext *C, ARegion *ar, void *arg_unused)
+{
+ /* XXX */
+ return NULL;
+}
+
+
+static void do_view3d_viewmenu(bContext *C, void *arg, int event)
+{
+
+ switch(event) {
+ case 0: /* User */
+ break;
+ case 1: /* Camera */
+ break;
+ case 2: /* Top */
+ break;
+ case 3: /* Front */
+ break;
+ case 4: /* Side */
+ break;
+ case 5: /* Perspective */
+ break;
+ case 6: /* Orthographic */
+ break;
+ case 7: /* Local View */
+ break;
+ case 8: /* Global View */
+ break;
+ case 9: /* View All (Home) */
+ WM_operator_name_call(C, "VIEW3D_OT_view_all", WM_OP_EXEC_REGION_WIN, NULL);
+ break;
+ case 11: /* View Selected */
+ WM_operator_name_call(C, "VIEW3D_OT_view_center", WM_OP_EXEC_REGION_WIN, NULL);
+ break;
+ case 13: /* Play Back Animation */
+ break;
+ case 15: /* Background Image... */
+// add_blockhandler(sa, VIEW3D_HANDLER_BACKGROUND, UI_PNL_UNSTOW);
+ break;
+ case 16: /* View Panel */
+// add_blockhandler(sa, VIEW3D_HANDLER_PROPERTIES, UI_PNL_UNSTOW);
+ break;
+ case 17: /* Set Clipping Border */
+ WM_operator_name_call(C, "VIEW3D_OT_clip_border", WM_OP_INVOKE_REGION_WIN, NULL);
+ break;
+ case 18: /* render preview */
+// toggle_blockhandler(sa, VIEW3D_HANDLER_PREVIEW, 0);
+ break;
+ case 19: /* zoom within border */
+// view3d_border_zoom();
+ break;
+ case 20: /* Transform Space Panel */
+// add_blockhandler(sa, VIEW3D_HANDLER_TRANSFORM, UI_PNL_UNSTOW);
+ break;
+ case 21: /* Grease Pencil */
+// add_blockhandler(sa, VIEW3D_HANDLER_GREASEPENCIL, UI_PNL_UNSTOW);
+ break;
+ case 22: /* View all layers */
+ do_layer_buttons(C, -2);
+ break;
+ }
+}
+#endif
+
+#if 0
+static uiBlock *view3d_viewmenu(bContext *C, ARegion *ar, void *arg_unused)
+{
+ ScrArea *sa= CTX_wm_area(C);
+ View3D *v3d= sa->spacedata.first;
+ RegionView3D *rv3d= wm_region_view3d(C);
+ uiBlock *block;
+ short yco= 0, menuwidth=120;
+
+ block= uiBeginBlock(C, ar, "view3d_viewmenu", UI_EMBOSSP);
+ uiBlockSetButmFunc(block, do_view3d_viewmenu, NULL);
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Transform Orientations...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 20, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Render Preview...|Shift P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 18, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "View Properties...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 16, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Background Image...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 15, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Grease Pencil...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 21, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ if ((rv3d->viewbut == 0) && !(rv3d->persp == V3D_CAMOB)) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "User", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
+ else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "User", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
+ if (rv3d->persp == V3D_CAMOB) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Camera|NumPad 0", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
+ else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Camera|NumPad 0", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
+ if (rv3d->viewbut == 1) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Top|NumPad 7", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
+ else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Top|NumPad 7", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
+ if (rv3d->viewbut == 2) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Front|NumPad 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
+ else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Front|NumPad 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
+ if (rv3d->viewbut == 3) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Side|NumPad 3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
+ else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Side|NumPad 3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
+
+ uiDefIconTextBlockBut(block, view3d_view_camerasmenu, NULL, ICON_RIGHTARROW_THIN, "Cameras", 0, yco-=20, 120, 19, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ if(rv3d->persp==V3D_PERSP) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Perspective|NumPad 5", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
+ else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Perspective|NumPad 5", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
+ if(rv3d->persp==V3D_ORTHO) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Orthographic|NumPad 5", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 6, "");
+ else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Orthographic|NumPad 5", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 6, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ if(v3d->lay== (1<<20)-1) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Previous Layers|Shift ~", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 22, "");
+ else uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show All Layers| ~", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 22, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ if(v3d->localview) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Local View|NumPad /", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 7, "");
+ else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Local View|NumPad /", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 7, "");
+ if(!v3d->localview) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Global View|NumPad /", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 8, "");
+ else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Global View|NumPad /", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 8, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBlockBut(block, view3d_view_cameracontrolsmenu, NULL, ICON_RIGHTARROW_THIN, "View Navigation", 0, yco-=20, 120, 19, "");
+ uiDefIconTextBlockBut(block, view3d_view_alignviewmenu, NULL, ICON_RIGHTARROW_THIN, "Align View", 0, yco-=20, 120, 19, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ if(rv3d->rflag & RV3D_CLIPPING)
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Clipping Border|Alt B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 17, "");
+ else
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Clipping Border|Alt B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 17, "");
+ if (rv3d->persp==V3D_ORTHO) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Zoom Within Border...|Shift B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 19, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "View Selected|NumPad .", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 11, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "View All|Home", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 9, "");
+ if(!sa->full) uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Maximize Window|Ctrl UpArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 99, "");
+ else uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Tile Window|Ctrl DownArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 99, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Play Back Animation|Alt A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 13, "");
+
+#ifndef DISABLE_PYTHON
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefIconTextBlockBut(block, view3d_view_spacehandlers, NULL, ICON_RIGHTARROW_THIN, "Space Handler Scripts", 0, yco-=20, 120, 19, "");
+#endif
+
+ if(ar->alignment==RGN_ALIGN_TOP) {
+ uiBlockSetDirection(block, UI_DOWN);
+ }
+ else {
+ uiBlockSetDirection(block, UI_TOP);
+ uiBlockFlipOrder(block);
+ }
+
+ uiTextBoundsBlock(block, 50);
+
+ return block;
+}
+#endif
+
#if 0
void do_view3d_select_object_typemenu(bContext *C, void *arg, int event)
{
@@ -487,6 +932,82 @@ static uiBlock *view3d_select_object_groupedmenu(bContext *C, ARegion *ar, void
#endif
+static void view3d_select_metaballmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemO(layout, NULL, 0, "VIEW3D_OT_select_border");
+ uiItemS(layout);
+ uiItemO(layout, NULL, 0, "MBALL_OT_select_deselect_all_metaelems");
+ uiItemO(layout, NULL, 0, "MBALL_OT_select_inverse_metaelems");
+ uiItemS(layout);
+ uiItemO(layout, NULL, 0, "MBALL_OT_select_random_metaelems");
+}
+
+/* wrapper for python layouts */
+void uiTemplate_view3d_select_metaballmenu(uiLayout *layout, bContext *C)
+{
+ void *arg_unused = NULL;
+ view3d_select_metaballmenu(C, layout, arg_unused);
+}
+
+static void view3d_select_armaturemenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ PointerRNA ptr;
+
+ /* this part of the menu has been moved to python */
+ /*uiItemO(layout, NULL, 0, "VIEW3D_OT_select_border");
+
+ uiItemS(layout);
+
+ uiItemO(layout, "Select/Deselect All", 0, "ARMATURE_OT_select_all_toggle");
+ uiItemO(layout, "Inverse", 0, "ARMATURE_OT_select_inverse");
+
+ uiItemS(layout);
+
+ uiItemEnumO(layout, "Parent", 0, "ARMATURE_OT_select_hierarchy", "direction", BONE_SELECT_PARENT);
+ uiItemEnumO(layout, "Child", 0, "ARMATURE_OT_select_hierarchy", "direction", BONE_SELECT_CHILD);
+
+ uiItemS(layout);*/
+
+ WM_operator_properties_create(&ptr, "ARMATURE_OT_select_hierarchy");
+ RNA_boolean_set(&ptr, "extend", 1);
+ RNA_enum_set(&ptr, "direction", BONE_SELECT_PARENT);
+ uiItemFullO(layout, "Extend Parent", 0, "ARMATURE_OT_select_hierarchy", ptr.data, WM_OP_EXEC_REGION_WIN);
+
+ WM_operator_properties_create(&ptr, "ARMATURE_OT_select_hierarchy");
+ RNA_boolean_set(&ptr, "extend", 1);
+ RNA_enum_set(&ptr, "direction", BONE_SELECT_CHILD);
+ uiItemFullO(layout, "Extend Child", 0, "ARMATURE_OT_select_hierarchy", ptr.data, WM_OP_EXEC_REGION_WIN);
+}
+
+/* wrapper for python layouts */
+void uiTemplate_view3d_select_armaturemenu(uiLayout *layout, bContext *C)
+{
+ void *arg_unused = NULL;
+ view3d_select_armaturemenu(C, layout, arg_unused);
+}
+
+static void view3d_select_posemenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ PointerRNA ptr;
+
+ WM_operator_properties_create(&ptr, "POSE_OT_select_hierarchy");
+ RNA_boolean_set(&ptr, "extend", 1);
+ RNA_enum_set(&ptr, "direction", BONE_SELECT_PARENT);
+ uiItemFullO(layout, "Extend Parent", 0, "POSE_OT_select_hierarchy", ptr.data, WM_OP_EXEC_REGION_WIN);
+
+ WM_operator_properties_create(&ptr, "POSE_OT_select_hierarchy");
+ RNA_boolean_set(&ptr, "extend", 1);
+ RNA_enum_set(&ptr, "direction", BONE_SELECT_CHILD);
+ uiItemFullO(layout, "Extend Child", 0, "POSE_OT_select_hierarchy", ptr.data, WM_OP_EXEC_REGION_WIN);
+}
+
+/* wrapper for python layouts */
+void uiTemplate_view3d_select_posemenu(uiLayout *layout, bContext *C)
+{
+ void *arg_unused = NULL;
+ view3d_select_posemenu(C, layout, arg_unused);
+}
+
void do_view3d_select_faceselmenu(bContext *C, void *arg, int event)
{
#if 0
@@ -565,6 +1086,19 @@ void uiTemplate_view3d_select_faceselmenu(uiLayout *layout, bContext *C)
view3d_select_faceselmenu(C, ar, arg_unused);
}
+static void view3d_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_selected_to_grid");
+ uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_selected_to_cursor");
+ uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_selected_to_center");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_cursor_to_selected");
+ uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_cursor_to_grid");
+ uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_cursor_to_active");
+}
+
#if 0
void do_view3d_transform_moveaxismenu(bContext *C, void *arg, int event)
{
@@ -1006,10 +1540,9 @@ static uiBlock *view3d_object_mirrormenu(bContext *C, ARegion *ar, void *arg_unu
#endif
#endif
-#if 0
static void view3d_edit_object_transformmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
-#if 0 // XXX not used anymore
+#if 0
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Scale/Rotation to ObData|Ctrl A, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
apply_objects_locrot();
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Visual Transform|Ctrl A, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
@@ -1026,7 +1559,6 @@ static void view3d_edit_object_transformmenu(bContext *C, uiLayout *layout, void
uiItemO(layout, NULL, 0, "OBJECT_OT_scale_clear");
uiItemO(layout, NULL, 0, "OBJECT_OT_origin_clear");
}
-#endif
#if 0
static void do_view3d_edit_object_makelocalmenu(bContext *C, void *arg, int event)
@@ -1340,6 +1872,683 @@ static void do_view3d_edit_objectmenu(bContext *C, void *arg, int event)
}
#endif
+#if 0
+/* visible buttons ported to python, check ifedout buttons */
+static void view3d_edit_mesh_verticesmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemO(layout, "Merge...", 0, "MESH_OT_merge");
+ uiItemO(layout, "Rip", 0, "MESH_OT_rip");
+ uiItemO(layout, "Split", 0, "MESH_OT_split");
+ uiItemO(layout, "Separate", 0, "MESH_OT_separate");
+
+ uiItemS(layout);
+
+ uiItemO(layout, "Smooth", 0, "MESH_OT_vertices_smooth");
+ uiItemO(layout, "Remove Doubles", 0, "MESH_OT_remove_doubles");
+
+#if 0
+ uiItemS(layout);
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Vertex Parent|Ctrl P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); // add_hook_menu();
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add Hook|Ctrl H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); // make_parent();
+#endif
+}
+#endif
+
+#if 0
+/* visible buttons ported to python, check ifedout buttons */
+static void view3d_edit_mesh_edgesmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemO(layout, NULL, 0, "MESH_OT_edge_face_add");
+
+#if 0
+ uiItemO(layout, "Bevel", 0, "MESH_OT_bevel"); // bevelmenu(em)
+ uiItemO(layout, "Loop Subdivide...", 0, "MESH_OT_loop_subdivide"); // Ctr R, CutEdgeloop(1);
+ uiItemO(layout, "Knife Subdivide...", 0, "MESH_OT_loop_subdivide"); // Shift K, KnifeSubdivide(KNIFE_PROMPT);
+
+ uiItemS(layout);
+#endif
+
+ uiItemO(layout, "Subdivide", 0, "MESH_OT_subdivide");
+ uiItemFloatO(layout, "Subdivide Smooth", 0, "MESH_OT_subdivide", "smoothness", 1.0f);
+
+ uiItemS(layout);
+
+ uiItemO(layout, "Mark Seam", 0, "MESH_OT_mark_seam");
+ uiItemBooleanO(layout, "Clear Seam", 0, "MESH_OT_mark_seam", "clear", 1);
+
+ uiItemS(layout);
+
+ uiItemO(layout, "Mark Sharp", 0, "MESH_OT_mark_sharp");
+ uiItemBooleanO(layout, "Clear Sharp", 0, "MESH_OT_mark_sharp", "clear", 1);
+
+#if 0
+ uiItemS(layout);
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Adjust Bevel Weight|Ctrl Shift E", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 17, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Crease SubSurf|Shift E", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 9, "");
+#endif
+
+ uiItemS(layout);
+
+ uiItemEnumO(layout, "Rotate Edge CW", 0, "MESH_OT_edge_rotate", "direction", 1);
+ uiItemEnumO(layout, "Rotate Edge CCW", 0, "MESH_OT_edge_rotate", "direction", 2);
+
+#if 0
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Slide Edge |Ctrl E", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete Edge Loop|X", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Collapse", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 14, "");
+#endif
+}
+#endif
+
+#if 0
+void do_view3d_edit_mirrormenu(bContext *C, void *arg, int event)
+{
+ float mat[3][3];
+
+ Mat3One(mat);
+
+ switch(event) {
+ case 0:
+ initTransform(TFM_MIRROR, CTX_NO_PET);
+ Transform();
+ break;
+ case 1:
+ initTransform(TFM_MIRROR, CTX_NO_PET|CTX_AUTOCONFIRM);
+ BIF_setSingleAxisConstraint(mat[0], " on global X axis");
+ Transform();
+ break;
+ case 2:
+ initTransform(TFM_MIRROR, CTX_NO_PET|CTX_AUTOCONFIRM);
+ BIF_setSingleAxisConstraint(mat[1], " on global Y axis");
+ Transform();
+ break;
+ case 3:
+ initTransform(TFM_MIRROR, CTX_NO_PET|CTX_AUTOCONFIRM);
+ BIF_setSingleAxisConstraint(mat[2], "on global Z axis");
+ Transform();
+ break;
+ case 4:
+ initTransform(TFM_MIRROR, CTX_NO_PET|CTX_AUTOCONFIRM);
+ BIF_setLocalAxisConstraint('X', " on local X axis");
+ Transform();
+ break;
+ case 5:
+ initTransform(TFM_MIRROR, CTX_NO_PET|CTX_AUTOCONFIRM);
+ BIF_setLocalAxisConstraint('Y', " on local Y axis");
+ Transform();
+ break;
+ case 6:
+ initTransform(TFM_MIRROR, CTX_NO_PET|CTX_AUTOCONFIRM);
+ BIF_setLocalAxisConstraint('Z', " on local Z axis");
+ Transform();
+ break;
+ }
+}
+
+static uiBlock *view3d_edit_mirrormenu(bContext *C, ARegion *ar, void *arg_unused)
+{
+ uiBlock *block;
+ short yco = 20, menuwidth = 120;
+
+ block= uiBeginBlock(C, ar, "view3d_edit_mirrormenu", UI_EMBOSSP);
+ uiBlockSetButmFunc(block, do_view3d_edit_mirrormenu, NULL);
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Interactive Mirror|Ctrl M", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "X Global|Ctrl M, X", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Y Global|Ctrl M, Y", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Z Global|Ctrl M, Z", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "X Local|Ctrl M, X X", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Y Local|Ctrl M, Y Y", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Z Local|Ctrl M, Z Z", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
+
+ uiBlockSetDirection(block, UI_RIGHT);
+ uiTextBoundsBlock(block, 60);
+ return block;
+}
+#endif
+
+#ifndef DISABLE_PYTHON
+#if 0
+static void do_view3d_edit_mesh_scriptsmenu(bContext *C, void *arg, int event)
+{
+ BPY_menu_do_python(PYMENU_MESH, event);
+}
+
+static uiBlock *view3d_edit_mesh_scriptsmenu(bContext *C, ARegion *ar, void *arg_unused)
+{
+ uiBlock *block;
+// short yco = 20, menuwidth = 120;
+// XXX BPyMenu *pym;
+// int i = 0;
+
+ block= uiBeginBlock(C, ar, "v3d_emesh_pymenu", UI_EMBOSSP);
+ uiBlockSetButmFunc(block, do_view3d_edit_mesh_scriptsmenu, NULL);
+
+// for (pym = BPyMenuTable[PYMENU_MESH]; pym; pym = pym->next, i++) {
+// uiDefIconTextBut(block, BUTM, 1, ICON_PYTHON, pym->name, 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, i, pym->tooltip?pym->tooltip:pym->filename);
+// }
+
+ uiBlockSetDirection(block, UI_RIGHT);
+ uiTextBoundsBlock(block, 60);
+
+ return block;
+}
+#endif
+#endif /* DISABLE_PYTHON */
+
+#if 0
+static void do_view3d_edit_meshmenu(bContext *C, void *arg, int event)
+{
+ ScrArea *sa= CTX_wm_area(C);
+
+ switch(event) {
+
+ case 2: /* transform properties */
+ add_blockhandler(sa, VIEW3D_HANDLER_OBJECT, 0);
+ break;
+ case 4: /* insert keyframe */
+ common_insertkey();
+ break;
+ case 16: /* delete keyframe */
+ common_deletekey();
+ break;
+ }
+}
+#endif
+
+#if 0
+/* visible buttons ported to python, check ifedout buttons */
+static void view3d_edit_meshmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
+ PointerRNA tsptr;
+
+ RNA_pointer_create(&scene->id, &RNA_ToolSettings, ts, &tsptr);
+
+ uiItemO(layout, "Undo Editing", 0, "ED_OT_undo");
+ uiItemO(layout, "Redo Editing", 0, "ED_OT_redo");
+
+#if 0
+ uiDefIconTextBlockBut(block, editmode_undohistorymenu, NULL, ICON_RIGHTARROW_THIN, "Undo History", 0, yco-=20, 120, 19, "");
+#endif
+
+ uiItemS(layout);
+
+#if 0
+ uiDefIconTextBlockBut(block, view3d_transformmenu, NULL, ICON_RIGHTARROW_THIN, "Transform", 0, yco-=20, 120, 19, "");
+ uiDefIconTextBlockBut(block, view3d_edit_mirrormenu, NULL, ICON_RIGHTARROW_THIN, "Mirror", 0, yco-=20, 120, 19, "");
+ uiDefIconTextBlockBut(block, view3d_edit_snapmenu, NULL, ICON_RIGHTARROW_THIN, "Snap", 0, yco-=20, 120, 19, "");
+#endif
+
+ uiItemMenuF(layout, "Snap", 0, view3d_edit_snapmenu, NULL);
+
+ uiItemS(layout);
+
+#if 0
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Insert Keyframe|I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete Keyframe|Alt I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 16, "");
+
+ uiItemS(layout);
+#endif
+
+ uiItemO(layout, NULL, 0, "UV_OT_mapping_menu");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "MESH_OT_extrude");
+ uiItemO(layout, NULL, 0, "MESH_OT_duplicate");
+ uiItemO(layout, "Delete...", 0, "MESH_OT_delete");
+
+ uiItemS(layout);
+
+ uiItemMenuF(layout, "Vertices", 0, view3d_edit_mesh_verticesmenu, NULL);
+ uiItemMenuF(layout, "Edges", 0, view3d_edit_mesh_edgesmenu, NULL);
+ uiItemMenuF(layout, "Faces", 0, view3d_edit_mesh_facesmenu, NULL);
+ uiItemMenuF(layout, "Normals", 0, view3d_edit_mesh_normalsmenu, NULL);
+
+ uiItemS(layout);
+
+ uiItemR(layout, NULL, 0, &tsptr, "automerge_editing", 0, 0, 0);
+ uiItemR(layout, NULL, 0, &tsptr, "proportional_editing", 0, 0, 0); // |O
+ uiItemMenuEnumR(layout, NULL, 0, &tsptr, "proportional_editing_falloff"); // |Shift O
+
+ uiItemS(layout);
+
+ uiItemMenuF(layout, "Show/Hide", 0, view3d_edit_mesh_showhidemenu, NULL);
+
+#if 0
+#ifndef DISABLE_PYTHON
+ uiItemS(layout);
+ uiDefIconTextBlockBut(block, view3d_edit_mesh_scriptsmenu, NULL, ICON_RIGHTARROW_THIN, "Scripts", 0, yco-=20, 120, 19, "");
+#endif
+#endif
+}
+#endif
+
+#if 0
+/* visible buttons ported to python, check ifedout buttons */
+static void view3d_edit_curve_controlpointsmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ Object *obedit= CTX_data_edit_object(C);
+
+ if(obedit->type == OB_CURVE) {
+ uiItemEnumO(layout, NULL, 0, "TFM_OT_transform", "mode", TFM_TILT);
+ uiItemO(layout, NULL, 0, "CURVE_OT_tilt_clear");
+ uiItemO(layout, NULL, 0, "CURVE_OT_separate");
+
+ uiItemS(layout);
+
+ uiItemEnumO(layout, NULL, 0, "CURVE_OT_handle_type_set", "type", 1);
+ uiItemEnumO(layout, NULL, 0, "CURVE_OT_handle_type_set", "type", 3);
+ uiItemEnumO(layout, NULL, 0, "CURVE_OT_handle_type_set", "type", 2);
+
+ uiItemS(layout);
+ }
+
+ // XXX uiItemO(layout, NULL, 0, "OBJECT_OT_make_vertex_parent"); Make VertexParent|Ctrl P
+ // make_parent()
+ // XXX uiItemO(layout, NULL, 0, "OBJECT_OT_add_hook"); Add Hook| Ctrl H
+ // add_hook_menu()
+}
+#endif
+
+#if 0
+/* visible buttons ported to python, check ifedout buttons */
+static void view3d_edit_curvemenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
+ PointerRNA tsptr;
+
+ RNA_pointer_create(&scene->id, &RNA_ToolSettings, ts, &tsptr);
+
+#if 0
+ uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Transform Properties...|N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
+ uiDefIconTextBlockBut(block, view3d_transformmenu, NULL, ICON_RIGHTARROW_THIN, "Transform", 0, yco-=20, 120, 19, "");
+ uiDefIconTextBlockBut(block, view3d_edit_mirrormenu, NULL, ICON_RIGHTARROW_THIN, "Mirror", 0, yco-=20, menuwidth, 19, "");
+#endif
+
+ uiItemMenuF(layout, "Snap", 0, view3d_edit_snapmenu, NULL);
+
+ uiItemS(layout);
+
+ // XXX uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Insert Keyframe|I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
+ // common_insertkey();
+ // XXX uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete Keyframe|Alt I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 16, "");
+ // common_deletekey();
+
+
+ uiItemO(layout, NULL, 0, "CURVE_OT_extrude");
+ uiItemO(layout, NULL, 0, "CURVE_OT_duplicate");
+ uiItemO(layout, NULL, 0, "CURVE_OT_separate");
+ uiItemO(layout, NULL, 0, "CURVE_OT_make_segment");
+ uiItemO(layout, NULL, 0, "CURVE_OT_cyclic_toggle");
+ uiItemO(layout, NULL, 0, "CURVE_OT_delete"); // Delete...
+
+ uiItemS(layout);
+
+ uiItemMenuF(layout, "Control Points", 0, view3d_edit_curve_controlpointsmenu, NULL);
+ uiItemMenuF(layout, "Segments", 0, view3d_edit_curve_segmentsmenu, NULL);
+
+ uiItemS(layout);
+
+ uiItemR(layout, NULL, 0, &tsptr, "proportional_editing", 0, 0, 0); // |O
+ uiItemMenuEnumR(layout, NULL, 0, &tsptr, "proportional_editing_falloff"); // |Shift O
+
+ uiItemS(layout);
+
+ uiItemMenuF(layout, "Show/Hide Control Points", 0, view3d_edit_curve_showhidemenu, NULL);
+}
+#endif
+
+#if 0
+/* visible buttons ported to python, check ifedout buttons */
+static void view3d_edit_latticemenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
+ PointerRNA tsptr;
+
+ RNA_pointer_create(&scene->id, &RNA_ToolSettings, ts, &tsptr);
+
+#if 0
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiDefIconTextBlockBut(block, view3d_transformmenu, NULL, ICON_RIGHTARROW_THIN, "Transform", 0, yco-=20, 120, 19, "");
+ uiDefIconTextBlockBut(block, view3d_edit_mirrormenu, NULL, ICON_RIGHTARROW_THIN, "Mirror", 0, yco-=20, menuwidth, 19, "");
+#endif
+
+ uiItemMenuF(layout, "Snap", 0, view3d_edit_snapmenu, NULL);
+
+ uiItemS(layout);
+
+ // XXX uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Insert Keyframe|I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
+ // common_insertkey();
+ // XXX uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete Keyframe|Alt I", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 16, "");
+ // common_deletekey();
+
+ uiItemO(layout, NULL, 0, "LATTICE_OT_make_regular");
+
+ uiItemS(layout);
+
+ uiItemR(layout, NULL, 0, &tsptr, "proportional_editing", 0, 0, 0); // |O
+ uiItemMenuEnumR(layout, NULL, 0, &tsptr, "proportional_editing_falloff"); // |Shift O
+}
+#endif
+
+#if 0
+static void do_view3d_edit_armaturemenu(bContext *C, void *arg, int event)
+{
+ static short numcuts= 2;
+
+ switch(event) {
+ case 0: /* Undo Editing */
+ remake_editArmature();
+ break;
+
+ case 6: /* Shear */
+ initTransform(TFM_SHEAR, CTX_NONE);
+ Transform();
+ break;
+ case 7: /* Warp */
+ initTransform(TFM_WARP, CTX_NONE);
+ Transform();
+ case 23: /* bone sketching panel */
+ add_blockhandler(curarea, VIEW3D_HANDLER_BONESKETCH, UI_PNL_UNSTOW);
+ break;
+ }
+}
+#endif
+
+#if 0
+/* visible buttons ported to python, check ifedout buttons */
+static void view3d_edit_armaturemenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ Object *obedit = CTX_data_edit_object(C);
+ bArmature *arm= obedit->data;
+
+#if 0
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Bone Sketching|P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 23, "");
+ uiDefIconTextBlockBut(block, view3d_transformmenu, NULL, ICON_RIGHTARROW_THIN, "Transform", 0, yco-=20, 120, 19, "");
+ uiDefIconTextBlockBut(block, view3d_edit_mirrormenu, NULL, ICON_RIGHTARROW_THIN, "Mirror", 0, yco-=20, menuwidth, 19, "");
+#endif
+ uiItemMenuF(layout, "Snap", 0, view3d_edit_snapmenu, NULL);
+ uiItemMenuF(layout, "Bone Roll", 0, view3d_edit_armature_rollmenu, NULL);
+
+ if (arm->drawtype == ARM_ENVELOPE)
+ uiItemEnumO(layout, "Scale Envelope Distance", 0, "TFM_OT_transform", "mode", TFM_BONESIZE);
+ else
+ uiItemEnumO(layout, "Scale B-Bone Width", 0, "TFM_OT_transform", "mode", TFM_BONESIZE);
+
+ uiItemS(layout);
+
+ uiItemO(layout, "Extrude", 0, "ARMATURE_OT_extrude");
+ if (arm->flag & ARM_MIRROR_EDIT)
+ uiItemBooleanO(layout, "Extrude Forked", 0, "ARMATURE_OT_extrude", "forked", 1);
+
+ uiItemO(layout, NULL, 0, "ARMATURE_OT_duplicate");
+ uiItemO(layout, NULL, 0, "ARMATURE_OT_merge");
+ uiItemO(layout, NULL, 0, "ARMATURE_OT_fill");
+ uiItemO(layout, NULL, 0, "ARMATURE_OT_delete");
+ uiItemO(layout, NULL, 0, "ARMATURE_OT_separate");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "ARMATURE_OT_subdivide_simple");
+ uiItemO(layout, NULL, 0, "ARMATURE_OT_subdivide_multi");
+
+ uiItemEnumO(layout, "AutoName Left/Right", 0, "ARMATURE_OT_autoside_names", "axis", 0);
+ uiItemEnumO(layout, "AutoName Front/Back", 0, "ARMATURE_OT_autoside_names", "axis", 1);
+ uiItemEnumO(layout, "AutoName Top/Bottom", 0, "ARMATURE_OT_autoside_names", "axis", 2);
+
+ uiItemO(layout, "Flip Left/Right Names", 0, "ARMATURE_OT_flip_names");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "ARMATURE_OT_armature_layers");
+ uiItemO(layout, NULL, 0, "ARMATURE_OT_bone_layers");
+
+ uiItemS(layout);
+
+ uiItemMenuF(layout, "Parent", 0, view3d_edit_armature_parentmenu, NULL);
+
+ uiItemS(layout);
+
+ uiItemMenuF(layout, "Bone Settings ", 0, view3d_edit_armature_settingsmenu, NULL);
+}
+#endif
+
+static void view3d_pose_armature_transformmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ //uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear User Transform|W", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
+ //used: clear_user_transform(scene, ob);
+ //uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
+ uiItemO(layout, NULL, 0, "POSE_OT_loc_clear");
+ uiItemO(layout, NULL, 0, "POSE_OT_rot_clear");
+ uiItemO(layout, NULL, 0, "POSE_OT_scale_clear");
+
+ // ???
+ //uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Origin|Alt O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
+ //used:clear_object('o');
+}
+
+static void view3d_pose_armature_showhidemenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemO(layout, "Show Hidden", 0, "POSE_OT_reveal");
+
+ uiItemO(layout, "Hide Selected", 0, "POSE_OT_hide");
+ uiItemBooleanO(layout, "Hide Unselected", 0, "POSE_OT_hide", "unselected", 1);
+}
+
+static void view3d_pose_armature_ikmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemO(layout, NULL, 0, "POSE_OT_ik_add");
+ uiItemO(layout, NULL, 0, "POSE_OT_ik_clear");
+}
+
+static void view3d_pose_armature_constraintsmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemO(layout, NULL, 0, "POSE_OT_constraint_add_with_targets");
+ uiItemO(layout, NULL, 0, "POSE_OT_constraints_clear");
+}
+
+static void view3d_pose_armature_groupmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemO(layout, "Add Selected to Active Group", 0, "POSE_OT_group_assign");
+ //uiItemO(layout, "Add Selected to Group", 0, "POSE_OT_group_assign");
+
+ uiItemO(layout, "Add New Group", 0, "POSE_OT_group_add");
+
+ uiItemO(layout, "Remove from All Groups", 0, "POSE_OT_group_unassign");
+ uiItemO(layout, "Remove Active Group", 0, "POSE_OT_group_remove");
+}
+
+static void view3d_pose_armature_motionpathsmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemO(layout, NULL, 0, "POSE_OT_paths_calculate");
+ uiItemO(layout, NULL, 0, "POSE_OT_paths_clear");
+}
+
+static void view3d_pose_armature_poselibmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemO(layout, NULL, 0, "POSELIB_OT_browse_interactive");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "POSELIB_OT_pose_add");
+ uiItemO(layout, NULL, 0, "POSELIB_OT_pose_rename");
+ uiItemO(layout, NULL, 0, "POSELIB_OT_pose_remove");
+}
+
+static void view3d_pose_armature_settingsmenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemEnumO(layout, "Toggle a Setting", 0, "POSE_OT_flags_set", "mode", 2);
+ uiItemEnumO(layout, "Enable a Setting", 0, "POSE_OT_flags_set", "mode", 1);
+ uiItemEnumO(layout, "Disable a Setting", 0, "POSE_OT_flags_set", "mode", 0);
+}
+
+#if 0
+static void do_view3d_pose_armaturemenu(bContext *C, void *arg, int event)
+{
+ Object *ob;
+ ob=OBACT;
+
+ switch(event) {
+ case 5:
+ pose_copy_menu();
+ break;
+ case 15:
+ pose_relax();
+ break;
+ }
+}
+#endif
+
+static void view3d_pose_armaturemenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ Object *ob = CTX_data_active_object(C);
+ bArmature *arm= ob->data;
+
+#if 0 // XXX to be ported, using uiItemMenuF(layout, "<Name>", 0, view3d_pose_armature_<category>menu);
+ uiDefIconTextBlockBut(block, view3d_transformmenu, NULL, ICON_RIGHTARROW_THIN, "Transform", 0, yco-=20, 120, 19, "");
+#endif
+ if ( (arm) && ((arm->drawtype == ARM_B_BONE) || (arm->drawtype == ARM_ENVELOPE)) )
+ uiItemEnumO(layout, "Scale Envelope Distance", 0, "TFM_OT_transform", "mode", TFM_BONESIZE);
+ uiItemMenuF(layout, "Clear Transform", 0, view3d_pose_armature_transformmenu, NULL);
+
+ uiItemS(layout);
+
+ // TODO: these operators may get renamed
+ uiItemO(layout, NULL, 0, "ANIM_OT_insert_keyframe_menu");
+ uiItemO(layout, NULL, 0, "ANIM_OT_delete_keyframe_v3d");
+
+ uiItemS(layout);
+
+#if 0
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Relax Pose|W", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 15, "");
+#endif
+ uiItemO(layout, NULL, 0, "POSE_OT_apply");
+
+ uiItemS(layout);
+
+ uiItemO(layout, "Copy Current Pose", 0, "POSE_OT_copy");
+ uiItemO(layout, "Paste Pose", 0, "POSE_OT_paste");
+ uiItemBooleanO(layout, "Paste X-Flipped Pose", 0, "POSE_OT_paste", "flipped", 1);
+
+ uiItemS(layout);
+
+ uiItemMenuF(layout, "Pose Library", 0, view3d_pose_armature_poselibmenu, NULL);
+ uiItemMenuF(layout, "Motion Paths", 0, view3d_pose_armature_motionpathsmenu, NULL);
+ uiItemMenuF(layout, "Bone Groups", 0, view3d_pose_armature_groupmenu, NULL);
+
+ uiItemS(layout);
+
+ uiItemMenuF(layout, "Inverse Kinematics", 0, view3d_pose_armature_ikmenu, NULL);
+ uiItemMenuF(layout, "Constraints", 0, view3d_pose_armature_constraintsmenu, NULL);
+
+ uiItemS(layout);
+
+ uiItemEnumO(layout, "AutoName Left/Right", 0, "POSE_OT_autoside_names", "axis", 0);
+ uiItemEnumO(layout, "AutoName Front/Back", 0, "POSE_OT_autoside_names", "axis", 1);
+ uiItemEnumO(layout, "AutoName Top/Bottom", 0, "POSE_OT_autoside_names", "axis", 2);
+
+ uiItemO(layout, "Flip Left/Right Names", 0, "POSE_OT_flip_names");
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "POSE_OT_armature_layers");
+ uiItemO(layout, NULL, 0, "POSE_OT_bone_layers");
+
+ uiItemS(layout);
+
+ uiItemMenuF(layout, "Show/Hide Bones", 0, view3d_pose_armature_showhidemenu, NULL);
+ uiItemMenuF(layout, "Bone Settings", 0, view3d_pose_armature_settingsmenu, NULL);
+
+#if 0
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Copy Attributes...|Ctrl C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
+#endif
+}
+
+
+/* vertex paint menu */
+static void do_view3d_vpaintmenu(bContext *C, void *arg, int event)
+{
+#if 0
+ /* events >= 3 are registered bpython scripts */
+#ifndef DISABLE_PYTHON
+ if (event >= 3) BPY_menu_do_python(PYMENU_VERTEXPAINT, event - 3);
+#endif
+ switch(event) {
+ case 0: /* undo vertex painting */
+ BIF_undo();
+ break;
+ case 1: /* set vertex colors/weight */
+ if(paint_facesel_test(CTX_data_active_object(C)))
+ clear_vpaint_selectedfaces();
+ else /* we know were in vertex paint mode */
+ clear_vpaint();
+ break;
+ case 2:
+ make_vertexcol(1);
+ break;
+ }
+#endif
+}
+
+static uiBlock *view3d_vpaintmenu(bContext *C, ARegion *ar, void *arg_unused)
+{
+ uiBlock *block;
+ short yco= 0, menuwidth=120;
+#ifndef DISABLE_PYTHON
+// XXX BPyMenu *pym;
+// int i=0;
+#endif
+
+ block= uiBeginBlock(C, ar, "view3d_paintmenu", UI_EMBOSSP);
+ uiBlockSetButmFunc(block, do_view3d_vpaintmenu, NULL);
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Vertex Painting|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Vertex Colors|Shift K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Shaded Vertex Colors", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
+
+#ifndef DISABLE_PYTHON
+ /* note that we account for the 3 previous entries with i+3:
+ even if the last item isnt displayed, it dosent matter */
+// for (pym = BPyMenuTable[PYMENU_VERTEXPAINT]; pym; pym = pym->next, i++) {
+// uiDefIconTextBut(block, BUTM, 1, ICON_PYTHON, pym->name, 0, yco-=20,
+// menuwidth, 19, NULL, 0.0, 0.0, 1, i+3,
+// pym->tooltip?pym->tooltip:pym->filename);
+// }
+#endif
+
+ if(ar->alignment==RGN_ALIGN_TOP) {
+ uiBlockSetDirection(block, UI_DOWN);
+ }
+ else {
+ uiBlockSetDirection(block, UI_TOP);
+ uiBlockFlipOrder(block);
+ }
+
+ uiTextBoundsBlock(block, 50);
+ return block;
+}
+
/* texture paint menu (placeholder, no items yet??) */
static void do_view3d_tpaintmenu(bContext *C, void *arg, int event)
@@ -1537,6 +2746,39 @@ static uiBlock *view3d_faceselmenu(bContext *C, ARegion *ar, void *arg_unused)
return block;
}
+static void view3d_particle_showhidemenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ uiItemO(layout, NULL, 0, "PARTICLE_OT_reveal");
+ uiItemO(layout, NULL, 0, "PARTICLE_OT_hide");
+ uiItemBooleanO(layout, "Hide Unselected", 0, "PARTICLE_OT_hide", "unselected", 1);
+}
+
+static void view3d_particlemenu(bContext *C, uiLayout *layout, void *arg_unused)
+{
+ ToolSettings *ts= CTX_data_tool_settings(C);
+
+ // XXX uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Particle Edit Properties|N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
+ // add_blockhandler(sa, VIEW3D_HANDLER_OBJECT, UI_PNL_UNSTOW);
+ // XXX uiItemS(layout);
+ //
+ // XXX uiDefIconTextBut(block, BUTM, 1, (pset->flag & PE_X_MIRROR)? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT, "X-Axis Mirror Editing", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
+ // pset->flag ^= PE_X_MIRROR;
+
+ uiItemO(layout, NULL, 0, "PARTICLE_OT_mirror"); // |Ctrl M
+
+ uiItemS(layout);
+
+ uiItemO(layout, NULL, 0, "PARTICLE_OT_remove_doubles"); // |W, 5
+ uiItemO(layout, NULL, 0, "PARTICLE_OT_delete");
+ if(ts->particle.selectmode & SCE_SELECT_POINT)
+ uiItemO(layout, NULL, 0, "PARTICLE_OT_subdivide"); // |W, 2
+ uiItemO(layout, NULL, 0, "PARTICLE_OT_rekey"); // |W, 1
+
+ uiItemS(layout);
+
+ uiItemMenuF(layout, "Show/Hide Particles", 0, view3d_particle_showhidemenu, NULL);
+}
+
static char *view3d_modeselect_pup(Scene *scene)
{
Object *ob= OBACT;
@@ -1551,18 +2793,12 @@ static char *view3d_modeselect_pup(Scene *scene)
if(ob==NULL) return string;
/* if active object is editable */
- if ( ((ob->type == OB_MESH)
+ if ( ((ob->type == OB_MESH) || (ob->type == OB_ARMATURE)
|| (ob->type == OB_CURVE) || (ob->type == OB_SURF) || (ob->type == OB_FONT)
|| (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) {
str += sprintf(str, formatstr, "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);
- else
- str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT, ICON_EDITMODE_HLT);
- }
if (ob->type == OB_MESH) {
@@ -1578,7 +2814,7 @@ static char *view3d_modeselect_pup(Scene *scene)
str += sprintf(str, formatstr, "Pose Mode", OB_MODE_POSE, ICON_POSE_HLT);
}
- if (ob->particlesystem.first || modifiers_findByType(ob, eModifierType_Cloth) || modifiers_findByType(ob, eModifierType_Softbody)) {
+ if (ob->particlesystem.first) {
str += sprintf(str, formatstr, "Particle Mode", OB_MODE_PARTICLE_EDIT, ICON_PARTICLEMODE);
}
@@ -1668,7 +2904,6 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
ScrArea *sa= CTX_wm_area(C);
View3D *v3d= sa->spacedata.first;
Object *obedit = CTX_data_edit_object(C);
- Object *ob = CTX_data_active_object(C);
EditMesh *em= NULL;
int bit, ctrl= win->eventstate->ctrl, shift= win->eventstate->shift;
PointerRNA props_ptr;
@@ -1721,7 +2956,6 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
WM_operator_properties_create(&props_ptr, "OBJECT_OT_mode_set");
RNA_enum_set(&props_ptr, "mode", v3d->modeselect);
WM_operator_name_call(C, "OBJECT_OT_mode_set", WM_OP_EXEC_REGION_WIN, &props_ptr);
- WM_operator_properties_free(&props_ptr);
break;
case B_AROUND:
// XXX handle_view3d_around(); /* copies to other 3d windows */
@@ -1733,7 +2967,7 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
em->selectmode= SCE_SELECT_VERTEX;
ts->selectmode= em->selectmode;
EM_selectmode_set(em);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
ED_undo_push(C, "Selectmode Set: Vertex");
}
break;
@@ -1747,7 +2981,7 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
}
ts->selectmode= em->selectmode;
EM_selectmode_set(em);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
ED_undo_push(C, "Selectmode Set: Edge");
}
break;
@@ -1761,24 +2995,21 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
}
ts->selectmode= em->selectmode;
EM_selectmode_set(em);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
ED_undo_push(C, "Selectmode Set: Face");
}
break;
case B_SEL_PATH:
ts->particle.selectmode= SCE_SELECT_PATH;
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
ED_undo_push(C, "Selectmode Set: Path");
break;
case B_SEL_POINT:
ts->particle.selectmode = SCE_SELECT_POINT;
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
ED_undo_push(C, "Selectmode Set: Point");
break;
case B_SEL_END:
ts->particle.selectmode = SCE_SELECT_END;
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
ED_undo_push(C, "Selectmode Set: End point");
break;
@@ -1878,6 +3109,11 @@ static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *o
uiDefPulldownBut(block, view3d_wpaintmenu, NULL, "Paint", xco,yco, xmax-3, 20, "");
xco+= xmax;
}
+ else if (ob && ob->mode & OB_MODE_VERTEX_PAINT) {
+ xmax= GetButStringLength("Paint");
+ uiDefPulldownBut(block, view3d_vpaintmenu, NULL, "Paint", xco,yco, xmax-3, 20, "");
+ xco+= xmax;
+ }
else if (ob && ob->mode & OB_MODE_TEXTURE_PAINT) {
xmax= GetButStringLength("Paint");
uiDefPulldownBut(block, view3d_tpaintmenu, NULL, "Paint", xco,yco, xmax-3, 20, "");
@@ -1891,11 +3127,15 @@ static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *o
}
}
else if(ob && ob->mode & OB_MODE_PARTICLE_EDIT) {
- /* ported to python */
+ xmax= GetButStringLength("Particle");
+ uiDefMenuBut(block, view3d_particlemenu, NULL, "Particle", xco,yco, xmax-3, 20, "");
+ xco+= xmax;
}
else {
if (ob && (ob->mode & OB_MODE_POSE)) {
- /* ported to python */
+ xmax= GetButStringLength("Pose");
+ uiDefMenuBut(block, view3d_pose_armaturemenu, NULL, "Pose", xco,yco, xmax-3, 20, "");
+ xco+= xmax;
}
}
@@ -2186,7 +3426,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
uiDefIconBut(block, BUT, B_VIEWRENDER, ICON_SCENE, xco,yco,XIC,YIC, NULL, 0, 1.0, 0, 0, "Render this window (Ctrl Click for anim)");
if (ob && (ob->mode & OB_MODE_POSE)) {
- xco+= XIC*2;
+ xco+= XIC;
uiBlockBeginAlign(block);
uiDefIconButO(block, BUT, "POSE_OT_copy", WM_OP_INVOKE_REGION_WIN, ICON_COPYDOWN, xco,yco,XIC,YIC, NULL);
@@ -2202,5 +3442,10 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
}
}
+
+ /* do not do view2d totrect set here, it's now a template */
+
+ uiEndBlock(C, block);
+ uiDrawBlock(C, block);
}
diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h
index 00b0b5c4fd1..acd1c62bc17 100644
--- a/source/blender/editors/space_view3d/view3d_intern.h
+++ b/source/blender/editors/space_view3d/view3d_intern.h
@@ -156,9 +156,6 @@ void VIEW3D_OT_snap_menu(struct wmOperatorType *ot);
ARegion *view3d_has_buttons_region(ScrArea *sa);
ARegion *view3d_has_tools_region(ScrArea *sa);
-/* draw_volume.c */
-void draw_volume(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, struct Base *base, struct GPUTexture *tex, int res[3], float dx, struct GPUTexture *tex_shadow);
-
#endif /* ED_VIEW3D_INTERN_H */
diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c
index 7da2e591b10..112847272e5 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -106,6 +106,9 @@ void view3d_keymap(wmWindowManager *wm)
ListBase *keymap= WM_keymap_listbase(wm, "View3D Generic", SPACE_VIEW3D, 0);
wmKeymapItem *km;
+ WM_keymap_add_item(keymap, "PAINT_OT_vertex_paint_toggle", VKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "PAINT_OT_weight_paint_toggle", TABKEY, KM_PRESS, KM_CTRL, 0);
+
WM_keymap_add_item(keymap, "VIEW3D_OT_properties", NKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "VIEW3D_OT_toolbar", TKEY, KM_PRESS, 0, 0);
@@ -131,9 +134,8 @@ void view3d_keymap(wmWindowManager *wm)
WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, 0, 0);
km = WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, KM_CTRL, 0);
RNA_boolean_set(km->ptr, "snap", 1);
-
- WM_keymap_verify_item(keymap, "VIEW3D_OT_manipulator", LEFTMOUSE, KM_PRESS, 0, 0); /* manipulator always on left mouse, not on action mouse*/
-
+
+ WM_keymap_verify_item(keymap, "VIEW3D_OT_manipulator", ACTIONMOUSE, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "VIEW3D_OT_cursor3d", ACTIONMOUSE, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "VIEW3D_OT_viewrotate", MIDDLEMOUSE, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index a7696d9fe31..7743ede399b 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -549,15 +549,13 @@ static void do_lasso_select_mesh_uv(short mcords[][2], short moves, short select
static void do_lasso_select_curve__doSelect(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, int x, int y)
{
- struct { ViewContext vc; short (*mcords)[2]; short moves; short select; } *data = userData;
-
+ struct { short (*mcords)[2]; short moves; short select; } *data = userData;
+
if (lasso_inside(data->mcords, data->moves, x, y)) {
if (bp) {
bp->f1 = data->select?(bp->f1|SELECT):(bp->f1&~SELECT);
} else {
- Curve *cu= data->vc.obedit->data;
-
- if (cu->drawflag & CU_HIDE_HANDLES) {
+ if (G.f & G_HIDDENHANDLES) {
/* can only be beztindex==0 here since handles are hidden */
bezt->f1 = bezt->f2 = bezt->f3 = data->select?(bezt->f2|SELECT):(bezt->f2&~SELECT);
} else {
@@ -575,10 +573,9 @@ static void do_lasso_select_curve__doSelect(void *userData, Nurb *nu, BPoint *bp
static void do_lasso_select_curve(ViewContext *vc, short mcords[][2], short moves, short select)
{
- struct { ViewContext vc; short (*mcords)[2]; short moves; short select; } data;
+ struct { short (*mcords)[2]; short moves; short select; } data;
/* set vc->editnurb */
- data.vc = *vc;
data.mcords = mcords;
data.moves = moves;
data.select = select;
@@ -759,7 +756,6 @@ static int view3d_lasso_select_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_select_lasso(wmOperatorType *ot)
{
ot->name= "Lasso Select";
- ot->description= "Select items using lasso selection.";
ot->idname= "VIEW3D_OT_select_lasso";
ot->invoke= WM_gesture_lasso_invoke;
@@ -1199,9 +1195,7 @@ static void do_nurbs_box_select__doSelect(void *userData, Nurb *nu, BPoint *bp,
if (bp) {
bp->f1 = data->select?(bp->f1|SELECT):(bp->f1&~SELECT);
} else {
- Curve *cu= data->vc.obedit->data;
-
- if (cu->drawflag & CU_HIDE_HANDLES) {
+ if (G.f & G_HIDDENHANDLES) {
/* can only be beztindex==0 here since handles are hidden */
bezt->f1 = bezt->f2 = bezt->f3 = data->select?(bezt->f2|SELECT):(bezt->f2&~SELECT);
} else {
@@ -1220,7 +1214,7 @@ static void do_nurbs_box_select(ViewContext *vc, rcti *rect, int select)
{
struct { ViewContext vc; rcti *rect; int select; } data;
- data.vc = *vc;
+ data.vc= *vc;
data.rect = rect;
data.select = select;
@@ -1365,7 +1359,7 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op)
vc.em= me->edit_mesh;
do_mesh_box_select(&vc, &rect, (val==LEFTMOUSE));
// if (EM_texFaceCheck())
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
}
else if(ELEM(obedit->type, OB_CURVE, OB_SURF)) {
@@ -1540,7 +1534,6 @@ void VIEW3D_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Border Select";
- ot->description= "Select items using border selection.";
ot->idname= "VIEW3D_OT_select_border";
/* api callbacks */
@@ -1600,7 +1593,6 @@ void VIEW3D_OT_select(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Activate/Select";
- ot->description= "Activate/select item(s).";
ot->idname= "VIEW3D_OT_select";
/* api callbacks */
@@ -1810,7 +1802,7 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op)
if(CTX_data_edit_object(C)) {
obedit_circle_select(&vc, selecting, mval, (float)radius);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obact->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obact);
}
else
return PE_circle_select(C, selecting, mval, (float)radius);
@@ -1839,7 +1831,6 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_select_circle(wmOperatorType *ot)
{
ot->name= "Circle Select";
- ot->description= "Select items using circle selection.";
ot->idname= "VIEW3D_OT_select_circle";
ot->invoke= WM_gesture_circle_invoke;
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index b4b54cd1d88..335bc2c9e56 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -106,7 +106,7 @@ static void special_transvert_update(Scene *scene, Object *obedit)
if(obedit) {
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
if(obedit->type==OB_MESH) {
Mesh *me= obedit->data;
@@ -302,7 +302,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
int totmalloc= 0;
for(nu= cu->editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER)
+ if((nu->type & 7)==CU_BEZIER)
totmalloc += 3*nu->pntsu;
else
totmalloc += nu->pntsu*nu->pntsv;
@@ -311,7 +311,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
nu= cu->editnurb->first;
while(nu) {
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
a= nu->pntsu;
bezt= nu->bezt;
while(a--) {
@@ -514,7 +514,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *op)
/* auto-keyframing */
// XXX autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
else {
ob->recalc |= OB_RECALC_OB;
@@ -555,7 +555,6 @@ void VIEW3D_OT_snap_selected_to_grid(wmOperatorType *ot)
/* identifiers */
ot->name= "Snap Selection to Grid";
- ot->description= "Snap selected item(s) to nearest grid node.";
ot->idname= "VIEW3D_OT_snap_selected_to_grid";
/* api callbacks */
@@ -641,7 +640,7 @@ static int snap_sel_to_curs(bContext *C, wmOperator *op)
/* auto-keyframing */
// XXX autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
else {
ob->recalc |= OB_RECALC_OB;
@@ -681,7 +680,6 @@ void VIEW3D_OT_snap_selected_to_cursor(wmOperatorType *ot)
/* identifiers */
ot->name= "Snap Selection to Cursor";
- ot->description= "Snap selected item(s) to cursor.";
ot->idname= "VIEW3D_OT_snap_selected_to_cursor";
/* api callbacks */
@@ -717,7 +715,6 @@ void VIEW3D_OT_snap_cursor_to_grid(wmOperatorType *ot)
/* identifiers */
ot->name= "Snap Cursor to Grid";
- ot->description= "Snap cursor to nearest grid node.";
ot->idname= "VIEW3D_OT_snap_cursor_to_grid";
/* api callbacks */
@@ -824,7 +821,6 @@ void VIEW3D_OT_snap_cursor_to_selected(wmOperatorType *ot)
/* identifiers */
ot->name= "Snap Cursor to Selected";
- ot->description= "Snap cursor to center of selected item(s).";
ot->idname= "VIEW3D_OT_snap_cursor_to_selected";
/* api callbacks */
@@ -874,7 +870,6 @@ void VIEW3D_OT_snap_cursor_to_active(wmOperatorType *ot)
/* identifiers */
ot->name= "Snap Cursor to Active";
- ot->description= "Snap cursor to active item.";
ot->idname= "VIEW3D_OT_snap_cursor_to_active";
/* api callbacks */
@@ -1033,7 +1028,7 @@ static int snap_selected_to_center(bContext *C, wmOperator *op)
/* auto-keyframing */
ob->pose->flag |= POSE_DO_UNLOCK;
// XXX autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
else {
ob->recalc |= OB_RECALC_OB;
@@ -1074,7 +1069,6 @@ void VIEW3D_OT_snap_selected_to_center(wmOperatorType *ot)
/* identifiers */
ot->name= "Snap Selection to Center";
- ot->description= "Snap selected items to selections geometric center.";
ot->idname= "VIEW3D_OT_snap_selected_to_center";
/* api callbacks */
@@ -1141,7 +1135,6 @@ void VIEW3D_OT_snap_menu(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Snap Menu";
- ot->description= "Display snap menu.";
ot->idname= "VIEW3D_OT_snap_menu";
/* api callbacks */
diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c
index 58248f675da..32378a915bd 100644
--- a/source/blender/editors/space_view3d/view3d_toolbar.c
+++ b/source/blender/editors/space_view3d/view3d_toolbar.c
@@ -270,7 +270,7 @@ static void view3d_panel_tool_shelf(const bContext *C, Panel *pa)
for(ct= st->toolshelf.first; ct; ct= ct->next) {
if(0==strncmp(context, ct->context, OP_MAX_TYPENAME)) {
col= uiLayoutColumn(pa->layout, 1);
- uiItemFullO(col, NULL, 0, ct->opname, NULL, WM_OP_INVOKE_REGION_WIN, 0);
+ uiItemFullO(col, NULL, 0, ct->opname, NULL, WM_OP_INVOKE_REGION_WIN);
}
}
}
@@ -322,7 +322,6 @@ static int view3d_toolbar(bContext *C, wmOperator *op)
void VIEW3D_OT_toolbar(wmOperatorType *ot)
{
ot->name= "Toolbar";
- ot->description= "Toggles toolbar display.";
ot->idname= "VIEW3D_OT_toolbar";
ot->exec= view3d_toolbar;
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index 808d1635b37..58b7a70a128 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -63,7 +63,6 @@
#include "RE_pipeline.h" // make_stars
#include "BIF_gl.h"
-#include "BIF_glutil.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -81,10 +80,6 @@
#include "PIL_time.h" /* smoothview */
-#if GAMEBLENDER == 1
-#include "SYS_System.h"
-#endif
-
#include "view3d_intern.h" // own include
/* use this call when executing an operator,
@@ -415,7 +410,6 @@ void VIEW3D_OT_setcameratoview(wmOperatorType *ot)
/* identifiers */
ot->name= "Align Camera To View";
- ot->description= "Set camera view to active view.";
ot->idname= "VIEW3D_OT_camera_to_view";
/* api callbacks */
@@ -487,10 +481,7 @@ void initgrabz(RegionView3D *rv3d, float x, float y, float z)
/* Negative zfac means x, y, z was behind the camera (in perspective).
* This gives flipped directions, so revert back to ok default case.
*/
- // NOTE: I've changed this to flip zfac to be positive again for now so that GPencil draws ok
- // -- Aligorith, 2009Aug31
- //if (rv3d->zfac < 0.0f) rv3d->zfac = 1.0f;
- if (rv3d->zfac < 0.0f) rv3d->zfac= -rv3d->zfac;
+ if (rv3d->zfac < 0.0f) rv3d->zfac = 1.0f;
}
/* always call initgrabz */
@@ -552,18 +543,6 @@ void view3d_get_object_project_mat(RegionView3D *rv3d, Object *ob, float pmat[4]
Mat4MulMat4(pmat, vmat, rv3d->winmat);
}
-/* Uses window coordinates (x,y) and depth component z to find a point in
- modelspace */
-void view3d_unproject(bglMats *mats, float out[3], const short x, const short y, const float z)
-{
- double ux, uy, uz;
-
- gluUnProject(x,y,z, mats->modelview, mats->projection,
- (GLint *)mats->viewport, &ux, &uy, &uz );
- out[0] = ux;
- out[1] = uy;
- out[2] = uz;
-}
/* use above call to get projecting mat */
void view3d_project_float(ARegion *ar, float *vec, float *adr, float mat[4][4])
@@ -1396,7 +1375,6 @@ void VIEW3D_OT_localview(wmOperatorType *ot)
/* identifiers */
ot->name= "Local View";
- ot->description= "Toggle display of selected object(s) seperately and centered in view.";
ot->idname= "VIEW3D_OT_localview";
/* api callbacks */
@@ -1448,66 +1426,11 @@ static void RestoreState(bContext *C)
glPopAttrib();
}
-/* was space_set_commmandline_options in 2.4x */
-void game_set_commmandline_options(GameData *gm)
-{
- SYS_SystemHandle syshandle;
- int test;
-
- if ( (syshandle = SYS_GetSystem()) ) {
- /* User defined settings */
- test= (U.gameflags & USER_DISABLE_SOUND);
- /* if user already disabled audio at the command-line, don't re-enable it */
- if (test)
- SYS_WriteCommandLineInt(syshandle, "noaudio", test);
-
- test= (U.gameflags & USER_DISABLE_MIPMAP);
- GPU_set_mipmap(!test);
- SYS_WriteCommandLineInt(syshandle, "nomipmap", test);
-
- /* File specific settings: */
- /* Only test the first one. These two are switched
- * simultaneously. */
- test= (gm->flag & GAME_SHOW_FRAMERATE);
- SYS_WriteCommandLineInt(syshandle, "show_framerate", test);
- SYS_WriteCommandLineInt(syshandle, "show_profile", test);
-
- test = (gm->flag & GAME_SHOW_FRAMERATE);
- SYS_WriteCommandLineInt(syshandle, "show_properties", test);
-
- test= (gm->flag & GAME_SHOW_PHYSICS);
- SYS_WriteCommandLineInt(syshandle, "show_physics", test);
-
- test= (gm->flag & GAME_ENABLE_ALL_FRAMES);
- SYS_WriteCommandLineInt(syshandle, "fixedtime", test);
-
-// a= (G.fileflags & G_FILE_GAME_TO_IPO);
-// SYS_WriteCommandLineInt(syshandle, "game2ipo", a);
-
- test= (gm->flag & GAME_IGNORE_DEPRECATION_WARNINGS);
- SYS_WriteCommandLineInt(syshandle, "ignore_deprecation_warnings", test);
-
- test= (gm->matmode == GAME_MAT_MULTITEX);
- SYS_WriteCommandLineInt(syshandle, "blender_material", test);
- test= (gm->matmode == GAME_MAT_GLSL);
- SYS_WriteCommandLineInt(syshandle, "blender_glsl_material", test);
- test= (gm->flag & GAME_DISPLAY_LISTS);
- SYS_WriteCommandLineInt(syshandle, "displaylists", test);
-
-
- }
-}
-
/* maybe we need this defined somewhere else */
extern void StartKetsjiShell(struct bContext *C, struct ARegion *ar, int always_use_expand_framing);
#endif // GAMEBLENDER == 1
-int game_engine_poll(bContext *C)
-{
- return CTX_data_mode_enum(C)==CTX_MODE_OBJECT ? 1:0;
-}
-
static int game_engine_exec(bContext *C, wmOperator *unused)
{
#if GAMEBLENDER == 1
@@ -1539,8 +1462,6 @@ static int game_engine_exec(bContext *C, wmOperator *unused)
view3d_operator_needs_opengl(C);
- game_set_commmandline_options(&startscene->gm);
-
SaveState(C);
StartKetsjiShell(C, ar, 1);
RestoreState(C);
@@ -1564,13 +1485,12 @@ void VIEW3D_OT_game_start(wmOperatorType *ot)
/* identifiers */
ot->name= "Start Game Engine";
- ot->description= "Start game engine.";
ot->idname= "VIEW3D_OT_game_start";
/* api callbacks */
ot->exec= game_engine_exec;
- ot->poll= game_engine_poll;
+ //ot->poll= ED_operator_view3d_active;
}
/* ************************************** */
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index f049566d640..dd7cebdfe3f 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -333,7 +333,7 @@ static void viewRedrawForce(bContext *C, TransInfo *t)
else force_draw(0);
#endif
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, t->obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, t->obedit);
}
}
@@ -1257,16 +1257,13 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
int constraint_axis[3] = {0, 0, 0};
int proportional = 0;
- if (RNA_struct_find_property(op->ptr, "value"))
+ if (t->flag & T_AUTOVALUES)
{
- if (t->flag & T_AUTOVALUES)
- {
- RNA_float_set_array(op->ptr, "value", t->auto_values);
- }
- else
- {
- RNA_float_set_array(op->ptr, "value", t->values);
- }
+ RNA_float_set_array(op->ptr, "value", t->auto_values);
+ }
+ else
+ {
+ RNA_float_set_array(op->ptr, "value", t->values);
}
/* XXX convert stupid flag to enum */
@@ -1741,12 +1738,12 @@ static void constraintRotLim(TransInfo *t, TransData *td)
eul[1]= tdi->roty[0];
eul[2]= tdi->rotz[0];
- EulOToMat4(eul, td->rotOrder, cob.matrix);
+ EulToMat4(eul, cob.matrix);
}
else {
/* eulers */
if (td->ext)
- EulOToMat4(td->ext->rot, td->rotOrder, cob.matrix);
+ EulToMat4(td->ext->rot, cob.matrix);
else
return;
}
@@ -1799,7 +1796,7 @@ static void constraintRotLim(TransInfo *t, TransData *td)
TransDataIpokey *tdi= td->tdi;
float eul[3];
- Mat4ToEulO(cob.matrix, eul, td->rotOrder);
+ Mat4ToEul(cob.matrix, eul);
tdi->rotx[0]= eul[0];
tdi->roty[0]= eul[1];
@@ -1807,7 +1804,7 @@ static void constraintRotLim(TransInfo *t, TransData *td)
}
else {
/* eulers */
- Mat4ToEulO(cob.matrix, td->ext->rot, td->rotOrder);
+ Mat4ToEul(cob.matrix, td->ext->rot);
}
}
}
@@ -2673,21 +2670,21 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
/* this function works on end result */
protectedQuaternionBits(td->protectflag, td->ext->quat, td->ext->iquat);
}
- else {
+ else {
float eulmat[3][3];
-
+
Mat3MulMat3(totmat, mat, td->mtx);
Mat3MulMat3(smat, td->smtx, totmat);
-
+
/* calculate the total rotatation in eulers */
VECCOPY(eul, td->ext->irot);
- EulOToMat3(eul, td->rotOrder, eulmat);
-
+ EulToMat3(eul, eulmat);
+
/* mat = transform, obmat = bone rotation */
Mat3MulMat3(fmat, smat, eulmat);
-
- Mat3ToCompatibleEulO(fmat, eul, td->ext->rot, td->rotOrder);
-
+
+ Mat3ToCompatibleEul(fmat, eul, td->ext->rot);
+
/* and apply (to end result only) */
protectedRotateBits(td->protectflag, eul, td->ext->irot);
VECCOPY(td->ext->rot, eul);
@@ -4148,10 +4145,7 @@ int Mirror(TransInfo *t, short mval[2])
recalcData(t);
- if(t->flag & T_2D_EDIT)
- ED_area_headerprint(t->sa, "Select a mirror axis (X, Y)");
- else
- ED_area_headerprint(t->sa, "Select a mirror axis (X, Y, Z)");
+ ED_area_headerprint(t->sa, "Select a mirror axis (X, Y, Z)");
}
return 1;
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index e5bd405c0cd..efa60b15293 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -199,7 +199,6 @@ typedef struct TransData {
void *extra; /* extra data (mirrored element pointer, in editmode mesh to EditVert) (editbone for roll fixing) (...) */
short flag; /* Various flags */
short protectflag; /* If set, copy of Object or PoseChannel protection */
- int rotOrder; /* rotation order (for eulers), as defined in BLI_arithb.h */
} TransData;
typedef struct MouseInput {
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 504563b797b..57a77ae75b8 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -502,29 +502,22 @@ static short apply_targetless_ik(Object *ob)
/* apply and decompose, doesn't work for constraints or non-uniform scale well */
{
- float rmat3[3][3], qrmat[3][3], imat[3][3], smat[3][3];
+ float rmat3[3][3], qmat[3][3], imat[3][3], smat[3][3];
Mat3CpyMat4(rmat3, rmat);
-
- /* rotation */
- if (parchan->rotmode > 0)
- Mat3ToEulO(rmat3, parchan->eul, parchan->rotmode);
- else
- Mat3ToQuat(rmat3, parchan->quat);
-
+
+ /* quaternion */
+ Mat3ToQuat(rmat3, parchan->quat);
+
/* for size, remove rotation */
/* causes problems with some constraints (so apply only if needed) */
if (data->flag & CONSTRAINT_IK_STRETCH) {
- if (parchan->rotmode > 0)
- EulOToMat3(parchan->eul, parchan->rotmode, qrmat);
- else
- QuatToMat3(parchan->quat, qrmat);
-
- Mat3Inv(imat, qrmat);
+ QuatToMat3(parchan->quat, qmat);
+ Mat3Inv(imat, qmat);
Mat3MulMat3(smat, rmat3, imat);
Mat3ToSize(smat, parchan->size);
}
-
+
/* 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]); */
@@ -575,20 +568,18 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
td->ext->size= pchan->size;
VECCOPY(td->ext->isize, pchan->size);
- if (pchan->rotmode > 0) {
+ if (pchan->rotmode) {
td->ext->rot= pchan->eul;
td->ext->quat= NULL;
-
+
VECCOPY(td->ext->irot, pchan->eul);
- td->rotOrder= pchan->rotmode;
}
else {
td->ext->rot= NULL;
td->ext->quat= pchan->quat;
-
+
QUATCOPY(td->ext->iquat, pchan->quat);
}
-
/* proper way to get parent transform + own transform + constraints transform */
Mat3CpyMat4(omat, ob->obmat);
@@ -707,8 +698,6 @@ int count_set_pose_transflags(int *out_mode, short around, Object *ob)
bone->flag &= ~BONE_HINGE_CHILD_TRANSFORM;
bone->flag &= ~BONE_TRANSFORM_CHILD;
}
- else
- bone->flag &= ~BONE_TRANSFORM;
}
/* make sure no bone can be transformed when a parent is transformed */
@@ -1367,17 +1356,16 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
int a;
int count=0, countsel=0;
int propmode = t->flag & T_PROP_EDIT;
- short hide_handles = (cu->drawflag & CU_HIDE_HANDLES);
-
+
/* to be sure */
if(cu->editnurb==NULL) return;
/* count total of vertices, check identical as in 2nd loop for making transdata! */
for(nu= cu->editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
for(a=0, bezt= nu->bezt; a<nu->pntsu; a++, bezt++) {
if(bezt->hide==0) {
- if (hide_handles) {
+ if (G.f & G_HIDDENHANDLES) {
if(bezt->f2 & SELECT) countsel+=3;
if(propmode) count+= 3;
} else {
@@ -1410,7 +1398,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
td = t->data;
for(nu= cu->editnurb->first; nu; nu= nu->next) {
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
TransData *head, *tail;
head = tail = td;
for(a=0, bezt= nu->bezt; a<nu->pntsu; a++, bezt++) {
@@ -1418,13 +1406,13 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
TransDataCurveHandleFlags *hdata = NULL;
if( propmode ||
- ((bezt->f2 & SELECT) && hide_handles) ||
- ((bezt->f1 & SELECT) && hide_handles == 0)
+ ((bezt->f2 & SELECT) && (G.f & G_HIDDENHANDLES)) ||
+ ((bezt->f1 & SELECT) && (G.f & G_HIDDENHANDLES)==0)
) {
VECCOPY(td->iloc, bezt->vec[0]);
td->loc= bezt->vec[0];
VECCOPY(td->center, bezt->vec[1]);
- if (hide_handles) {
+ if (G.f & G_HIDDENHANDLES) {
if(bezt->f2 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
} else {
@@ -1479,13 +1467,13 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
tail++;
}
if( propmode ||
- ((bezt->f2 & SELECT) && hide_handles) ||
- ((bezt->f3 & SELECT) && hide_handles == 0)
+ ((bezt->f2 & SELECT) && (G.f & G_HIDDENHANDLES)) ||
+ ((bezt->f3 & SELECT) && (G.f & G_HIDDENHANDLES)==0)
) {
VECCOPY(td->iloc, bezt->vec[2]);
td->loc= bezt->vec[2];
VECCOPY(td->center, bezt->vec[1]);
- if (hide_handles) {
+ if (G.f & G_HIDDENHANDLES) {
if(bezt->f2 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
} else {
@@ -1627,32 +1615,31 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
TransDataExtension *tx;
Base *base = CTX_data_active_base(C);
Object *ob = CTX_data_active_object(C);
- ParticleEditSettings *pset = PE_settings(t->scene);
- PTCacheEdit *edit = PE_get_current(t->scene, ob);
- ParticleSystem *psys = NULL;
+ ParticleSystem *psys = PE_get_current(t->scene, ob);
ParticleSystemModifierData *psmd = NULL;
- PTCacheEditPoint *point;
- PTCacheEditKey *key;
+ ParticleEditSettings *pset = PE_settings(t->scene);
+ ParticleData *pa = NULL;
+ ParticleEdit *edit;
+ ParticleEditKey *key;
float mat[4][4];
- int i,k, transformparticle;
+ int i,k, totpart, transformparticle;
int count = 0, hasselected = 0;
int propmode = t->flag & T_PROP_EDIT;
- if(edit==NULL || t->settings->particle.selectmode==SCE_SELECT_PATH) return;
+ if(psys==NULL || t->settings->particle.selectmode==SCE_SELECT_PATH) return;
- psys = edit->psys;
-
- if(psys)
- psmd = psys_get_modifier(ob,psys);
+ psmd = psys_get_modifier(ob,psys);
+ edit = psys->edit;
+ totpart = psys->totpart;
base->flag |= BA_HAS_RECALC_DATA;
- for(i=0, point=edit->points; i<edit->totpoint; i++, point++) {
- point->flag &= ~PEP_TRANSFORM;
+ for(i=0, pa=psys->particles; i<totpart; i++, pa++) {
+ pa->flag &= ~PARS_TRANSFORM;
transformparticle= 0;
- if((point->flag & PEP_HIDE)==0) {
- for(k=0, key=point->keys; k<point->totkey; k++, key++) {
+ if((pa->flag & PARS_HIDE)==0) {
+ for(k=0, key=edit->keys[i]; k<pa->totkey; k++, key++) {
if((key->flag&PEK_HIDE)==0) {
if(key->flag&PEK_SELECT) {
hasselected= 1;
@@ -1665,8 +1652,8 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
}
if(transformparticle) {
- count += point->totkey;
- point->flag |= PEP_TRANSFORM;
+ count += pa->totkey;
+ pa->flag |= PARS_TRANSFORM;
}
}
@@ -1685,23 +1672,18 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
Mat4Invert(ob->imat,ob->obmat);
- for(i=0, point=edit->points; i<edit->totpoint; i++, point++) {
+ for(i=0, pa=psys->particles; i<totpart; i++, pa++) {
TransData *head, *tail;
head = tail = td;
- if(!(point->flag & PEP_TRANSFORM)) continue;
+ if(!(pa->flag & PARS_TRANSFORM)) continue;
- if(psys && !(psys->flag & PSYS_GLOBAL_HAIR))
- psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, psys->particles + i, mat);
+ psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, mat);
- for(k=0, key=point->keys; k<point->totkey; k++, key++) {
- if(key->flag & PEK_USE_WCO) {
- VECCOPY(key->world_co, key->co);
- Mat4MulVecfl(mat, key->world_co);
- td->loc = key->world_co;
- }
- else
- td->loc = key->co;
+ for(k=0, key=edit->keys[i]; k<pa->totkey; k++, key++) {
+ VECCOPY(key->world_co, key->co);
+ Mat4MulVecfl(mat, key->world_co);
+ td->loc = key->world_co;
VECCOPY(td->iloc, td->loc);
VECCOPY(td->center, td->loc);
@@ -1715,7 +1697,7 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
Mat3One(td->smtx);
/* don't allow moving roots */
- if(k==0 && pset->flag & PE_LOCK_FIRST && (!psys || !(psys->flag & PSYS_GLOBAL_HAIR)))
+ if(k==0 && pset->flag & PE_LOCK_FIRST)
td->protectflag |= OB_LOCK_LOC;
td->ob = ob;
@@ -1729,7 +1711,7 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
if(k==0) tx->size = 0;
else tx->size = (key - 1)->time;
- if(k == point->totkey - 1) tx->quat = 0;
+ if(k == pa->totkey - 1) tx->quat = 0;
else tx->quat = (key + 1)->time;
}
@@ -1747,42 +1729,35 @@ void flushTransParticles(TransInfo *t)
{
Scene *scene = t->scene;
Object *ob = OBACT;
- PTCacheEdit *edit = PE_get_current(scene, ob);
- ParticleSystem *psys = edit->psys;
- ParticleSystemModifierData *psmd = NULL;
- PTCacheEditPoint *point;
- PTCacheEditKey *key;
+ ParticleSystem *psys = PE_get_current(scene, ob);
+ ParticleSystemModifierData *psmd;
+ ParticleData *pa;
+ ParticleEditKey *key;
TransData *td;
float mat[4][4], imat[4][4], co[3];
int i, k, propmode = t->flag & T_PROP_EDIT;
- if(psys)
- psmd = psys_get_modifier(ob, psys);
+ psmd = psys_get_modifier(ob, psys);
/* we do transform in world space, so flush world space position
- * back to particle local space (only for hair particles) */
+ * back to particle local space */
td= t->data;
- for(i=0, point=edit->points; i<edit->totpoint; i++, point++, td++) {
- if(!(point->flag & PEP_TRANSFORM)) continue;
+ for(i=0, pa=psys->particles; i<psys->totpart; i++, pa++, td++) {
+ if(!(pa->flag & PARS_TRANSFORM)) continue;
- if(psys && !(psys->flag & PSYS_GLOBAL_HAIR)) {
- psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, psys->particles + i, mat);
- Mat4Invert(imat,mat);
+ psys_mat_hair_to_global(ob, psmd->dm, psys->part->from, pa, mat);
+ Mat4Invert(imat,mat);
- for(k=0, key=point->keys; k<point->totkey; k++, key++) {
- VECCOPY(co, key->world_co);
- Mat4MulVecfl(imat, co);
+ for(k=0, key=psys->edit->keys[i]; k<pa->totkey; k++, key++) {
+ VECCOPY(co, key->world_co);
+ Mat4MulVecfl(imat, co);
-
- /* optimization for proportional edit */
- if(!propmode || !FloatCompare(key->co, co, 0.0001f)) {
- VECCOPY(key->co, co);
- point->flag |= PEP_EDIT_RECALC;
- }
+ /* optimization for proportional edit */
+ if(!propmode || !FloatCompare(key->co, co, 0.0001f)) {
+ VECCOPY(key->co, co);
+ pa->flag |= PARS_EDIT_RECALC;
}
}
- else
- point->flag |= PEP_EDIT_RECALC;
}
PE_update_object(scene, OBACT, 1);
@@ -4349,14 +4324,12 @@ void autokeyframe_ob_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode)
AnimData *adt= ob->adt;
float cfra= (float)CFRA; // xxx this will do for now
short flag = 0;
-
+
if (IS_AUTOKEY_FLAG(INSERTNEEDED))
flag |= INSERTKEY_NEEDED;
if (IS_AUTOKEY_FLAG(AUTOMATKEY))
flag |= INSERTKEY_MATRIX;
- if (IS_AUTOKEY_MODE(scene, EDITKEYS))
- flag |= INSERTKEY_REPLACE;
-
+
if (IS_AUTOKEY_FLAG(INSERTAVAIL)) {
/* only key on available channels */
if (adt && adt->action) {
@@ -4368,7 +4341,7 @@ void autokeyframe_ob_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode)
}
else if (IS_AUTOKEY_FLAG(INSERTNEEDED)) {
short doLoc=0, doRot=0, doScale=0;
-
+
/* filter the conditions when this happens (assume that curarea->spacetype==SPACE_VIE3D) */
if (tmode == TFM_TRANSLATION) {
doLoc = 1;
@@ -4380,7 +4353,7 @@ void autokeyframe_ob_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode)
}
else if (v3d->around == V3D_CURSOR)
doLoc = 1;
-
+
if ((v3d->flag & V3D_ALIGN)==0)
doRot = 1;
}
@@ -4391,11 +4364,11 @@ void autokeyframe_ob_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode)
}
else if (v3d->around == V3D_CURSOR)
doLoc = 1;
-
+
if ((v3d->flag & V3D_ALIGN)==0)
doScale = 1;
}
-
+
// TODO: the group names here are temporary...
// TODO: should this be made to use the builtin KeyingSets instead?
if (doLoc) {
@@ -4420,16 +4393,16 @@ void autokeyframe_ob_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode)
insert_keyframe(id, NULL, "Object Transform", "location", 0, cfra, flag);
insert_keyframe(id, NULL, "Object Transform", "location", 1, cfra, flag);
insert_keyframe(id, NULL, "Object Transform", "location", 2, cfra, flag);
-
+
insert_keyframe(id, NULL, "Object Transform", "rotation", 0, cfra, flag);
insert_keyframe(id, NULL, "Object Transform", "rotation", 1, cfra, flag);
insert_keyframe(id, NULL, "Object Transform", "rotation", 2, cfra, flag);
-
+
insert_keyframe(id, NULL, "Object Transform", "scale", 0, cfra, flag);
insert_keyframe(id, NULL, "Object Transform", "scale", 1, cfra, flag);
insert_keyframe(id, NULL, "Object Transform", "scale", 2, cfra, flag);
}
-
+
// XXX todo... find a way to send notifiers from here...
}
}
@@ -4453,7 +4426,7 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode,
float cfra= (float)CFRA;
short flag= 0;
char buf[512];
-
+
/* flag is initialised from UserPref keyframing settings
* - special exception for targetless IK - INSERTKEY_MATRIX keyframes should get
* visual keyframes even if flag not set, as it's not that useful otherwise
@@ -4463,14 +4436,12 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode,
flag |= INSERTKEY_MATRIX;
if (IS_AUTOKEY_FLAG(INSERTNEEDED))
flag |= INSERTKEY_NEEDED;
- if (IS_AUTOKEY_MODE(scene, EDITKEYS))
- flag |= INSERTKEY_REPLACE;
-
+
for (pchan=pose->chanbase.first; pchan; pchan=pchan->next) {
if (pchan->bone->flag & BONE_TRANSFORM) {
/* clear any 'unkeyed' flag it may have */
pchan->bone->flag &= ~BONE_UNKEYED;
-
+
/* only insert into available channels? */
if (IS_AUTOKEY_FLAG(INSERTAVAIL)) {
if (act) {
@@ -4481,7 +4452,7 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode,
/* only insert keyframe if needed? */
else if (IS_AUTOKEY_FLAG(INSERTNEEDED)) {
short doLoc=0, doRot=0, doScale=0;
-
+
/* filter the conditions when this happens (assume that curarea->spacetype==SPACE_VIE3D) */
if (tmode == TFM_TRANSLATION) {
if (targetless_ik)
@@ -4492,18 +4463,18 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode,
else if (tmode == TFM_ROTATION) {
if (ELEM(v3d->around, V3D_CURSOR, V3D_ACTIVE))
doLoc = 1;
-
+
if ((v3d->flag & V3D_ALIGN)==0)
doRot = 1;
}
else if (tmode == TFM_RESIZE) {
if (ELEM(v3d->around, V3D_CURSOR, V3D_ACTIVE))
doLoc = 1;
-
+
if ((v3d->flag & V3D_ALIGN)==0)
doScale = 1;
}
-
+
if (doLoc) {
sprintf(buf, "pose.pose_channels[\"%s\"].location", pchan->name);
insert_keyframe(id, NULL, pchan->name, buf, 0, cfra, flag);
@@ -4538,7 +4509,7 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode,
insert_keyframe(id, NULL, pchan->name, buf, 0, cfra, flag);
insert_keyframe(id, NULL, pchan->name, buf, 1, cfra, flag);
insert_keyframe(id, NULL, pchan->name, buf, 2, cfra, flag);
-
+
if (pchan->rotmode == PCHAN_ROT_QUAT) {
sprintf(buf, "pose.pose_channels[\"%s\"].rotation", pchan->name);
insert_keyframe(id, NULL, pchan->name, buf, 0, cfra, flag);
@@ -4552,7 +4523,7 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode,
insert_keyframe(id, NULL, pchan->name, buf, 1, cfra, flag);
insert_keyframe(id, NULL, pchan->name, buf, 2, cfra, flag);
}
-
+
sprintf(buf, "pose.pose_channels[\"%s\"].scale", pchan->name);
insert_keyframe(id, NULL, pchan->name, buf, 0, cfra, flag);
insert_keyframe(id, NULL, pchan->name, buf, 1, cfra, flag);
@@ -4560,14 +4531,14 @@ void autokeyframe_pose_cb_func(Scene *scene, View3D *v3d, Object *ob, int tmode,
}
}
}
-
+
// XXX todo... figure out way to get appropriate notifiers sent
-
+
/* do the bone paths */
-#if 0 // XXX TRANSFORM FIX ME
+#if 0 // TRANSFORM_FIX_ME
if (arm->pathflag & ARM_PATH_ACFRA) {
- //pose_clear_paths(ob); // XXX for now, don't need to clear
- ED_pose_recalculate_paths(C, scene, ob);
+ pose_clear_paths(ob);
+ pose_recalculate_paths(ob);
}
#endif
}
@@ -4723,9 +4694,9 @@ void special_aftertrans_update(TransInfo *t)
ob->ctime= -1234567.0f;
if (ob->pose || ob_get_key(ob))
- DAG_id_flush_update(&ob->id, OB_RECALC);
+ DAG_object_flush_update(scene, ob, OB_RECALC);
else
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_object_flush_update(scene, ob, OB_RECALC_OB);
}
/* Do curve cleanups? */
@@ -4749,7 +4720,7 @@ void special_aftertrans_update(TransInfo *t)
}
#endif // XXX old animation system
- DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, OBACT, OB_RECALC_DATA);
}
#if 0 // XXX future of this is still not clear
else if (ac.datatype == ANIMCONT_GPENCIL) {
@@ -4763,7 +4734,7 @@ void special_aftertrans_update(TransInfo *t)
* - sync this with actdata_filter_gpencil() in editaction.c
*/
for (sa= sc->areabase.first; sa; sa= sa->next) {
- bGPdata *gpd= gpencil_data_get_active(sa);
+ bGPdata *gpd= gpencil_data_getactive(sa);
if (gpd)
posttrans_gpd_clean(gpd);
@@ -4913,15 +4884,15 @@ void special_aftertrans_update(TransInfo *t)
/* automatic inserting of keys and unkeyed tagging - only if transform wasn't cancelled (or TFM_DUMMY) */
if (!cancelled && (t->mode != TFM_DUMMY)) {
autokeyframe_pose_cb_func(t->scene, (View3D *)t->view, ob, t->mode, targetless_ik);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(t->scene, ob, OB_RECALC_DATA);
}
else if (arm->flag & ARM_DELAYDEFORM) {
/* old optimize trick... this enforces to bypass the depgraph */
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(t->scene, ob, OB_RECALC_DATA);
ob->recalc= 0; // is set on OK position already by recalcData()
}
else
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(t->scene, ob, OB_RECALC_DATA);
//if (t->mode==TFM_BONESIZE || t->mode==TFM_BONE_ENVELOPE)
// allqueue(REDRAWBUTSEDIT, 0);
@@ -4949,7 +4920,7 @@ void special_aftertrans_update(TransInfo *t)
/* Creates troubles for moving animated objects without */
/* autokey though, probably needed is an anim sys override? */
/* Please remove if some other solution is found. -jahka */
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_object_flush_update(scene, ob, OB_RECALC_OB);
/* Set autokey if necessary */
if (!cancelled)
@@ -5283,8 +5254,7 @@ void createTransData(bContext *C, TransInfo *t)
}
CTX_DATA_END;
}
- else if (ob && (ob->mode & OB_MODE_PARTICLE_EDIT)
- && PE_start_edit(PE_get_current(scene, ob))) {
+ else if (ob && (ob->mode & OB_MODE_PARTICLE_EDIT) && PE_can_edit(PE_get_current(scene, ob))) {
createTransParticleVerts(C, t);
if(t->data && t->flag & T_PROP_EDIT) {
@@ -5303,7 +5273,7 @@ void createTransData(bContext *C, TransInfo *t)
if (t->ar->regiontype == RGN_TYPE_WINDOW)
{
View3D *v3d = t->view;
- RegionView3D *rv3d = CTX_wm_region_view3d(C);
+ RegionView3D *rv3d = t->ar->regiondata;
if((t->flag & T_OBJECT) && v3d->camera == OBACT && rv3d->persp==V3D_CAMOB)
{
t->flag |= T_CAMERA;
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 0b7029adde0..168a65a2e75 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -269,7 +269,7 @@ static void editmesh_apply_to_mirror(TransInfo *t)
/* tags the given ID block for refreshes (if applicable) due to
* Animation Editor editing
*/
-static void animedit_refresh_id_tags (Scene *scene, ID *id)
+static void animedit_refresh_id_tags (ID *id)
{
if (id) {
AnimData *adt= BKE_animdata_from_id(id);
@@ -279,11 +279,12 @@ static void animedit_refresh_id_tags (Scene *scene, ID *id)
adt->recalc |= ADT_RECALC_ANIM;
/* if ID-block is Object, set recalc flags */
+ // TODO: this should probably go through the depsgraph instead... but for now, let's be lazy
switch (GS(id->name)) {
case ID_OB:
{
Object *ob= (Object *)id;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
+ ob->recalc |= OB_RECALC;
}
break;
}
@@ -383,7 +384,7 @@ void recalcData(TransInfo *t)
/* just tag these animdata-blocks to recalc, assuming that some data there changed */
for (ale= anim_data.first; ale; ale= ale->next) {
/* set refresh tags for objects using this animation */
- animedit_refresh_id_tags(t->scene, ale->id);
+ animedit_refresh_id_tags(ale->id);
}
/* now free temp channels */
@@ -431,7 +432,7 @@ void recalcData(TransInfo *t)
calchandles_fcurve(fcu);
/* set refresh tags for objects using this animation */
- animedit_refresh_id_tags(t->scene, ale->id);
+ animedit_refresh_id_tags(ale->id);
}
/* do resort and other updates? */
@@ -462,7 +463,7 @@ void recalcData(TransInfo *t)
continue;
/* set refresh tags for objects using this animation */
- animedit_refresh_id_tags(t->scene, tdn->id);
+ animedit_refresh_id_tags(tdn->id);
/* if cancelling transform, just write the values without validating, then move on */
if (t->state == TRANS_CANCEL) {
@@ -621,7 +622,7 @@ void recalcData(TransInfo *t)
Curve *cu= t->obedit->data;
Nurb *nu= cu->editnurb->first;
- DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_object_flush_update(scene, t->obedit, OB_RECALC_DATA); /* sets recalc flags */
if (t->state == TRANS_CANCEL) {
while(nu) {
@@ -641,7 +642,7 @@ void recalcData(TransInfo *t)
}
else if(t->obedit->type==OB_LATTICE) {
Lattice *la= t->obedit->data;
- DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_object_flush_update(scene, t->obedit, OB_RECALC_DATA); /* sets recalc flags */
if(la->editlatt->flag & LT_OUTSIDE) outside_lattice(la->editlatt);
}
@@ -653,7 +654,7 @@ void recalcData(TransInfo *t)
if(sima->flag & SI_LIVE_UNWRAP)
ED_uvedit_live_unwrap_re_solve();
- DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, t->obedit, OB_RECALC_DATA);
} else {
EditMesh *em = ((Mesh*)t->obedit->data)->edit_mesh;
/* mirror modifier clipping? */
@@ -668,7 +669,7 @@ void recalcData(TransInfo *t)
if((t->options & CTX_NO_MIRROR) == 0 && (t->flag & T_MIRROR))
editmesh_apply_to_mirror(t);
- DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_object_flush_update(scene, t->obedit, OB_RECALC_DATA); /* sets recalc flags */
recalc_editnormals(em);
}
@@ -752,7 +753,7 @@ void recalcData(TransInfo *t)
}
else
- DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_object_flush_update(scene, t->obedit, OB_RECALC_DATA); /* sets recalc flags */
}
else if( (t->flag & T_POSE) && t->poseobj) {
Object *ob= t->poseobj;
@@ -772,7 +773,7 @@ void recalcData(TransInfo *t)
/* old optimize trick... this enforces to bypass the depgraph */
if (!(arm->flag & ARM_DELAYDEFORM)) {
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA); /* sets recalc flags */
}
else
where_is_pose(scene, ob);
@@ -1323,7 +1324,7 @@ void calculateCenter(TransInfo *t)
/* voor panning from cameraview */
if(t->flag & T_OBJECT)
{
- if(t->spacetype==SPACE_VIEW3D && t->ar->regiontype == RGN_TYPE_WINDOW)
+ if(t->spacetype==SPACE_VIEW3D)
{
View3D *v3d = t->view;
Scene *scene = t->scene;
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 93bc02d7180..37fd79e38e1 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -62,7 +62,6 @@
#include "BKE_mesh.h"
#include "BKE_object.h"
#include "BKE_particle.h"
-#include "BKE_pointcache.h"
#include "BKE_utildefines.h"
#include "BLI_arithb.h"
@@ -252,7 +251,7 @@ int calc_manipulator_stats(const bContext *C)
nu= cu->editnurb->first;
while(nu) {
- if(nu->type == CU_BEZIER) {
+ if((nu->type & 7)==CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
@@ -260,7 +259,7 @@ int calc_manipulator_stats(const bContext *C)
* if handles are hidden then only check the center points.
* If 2 or more are selected then only use the center point too.
*/
- if (cu->drawflag & CU_HIDE_HANDLES) {
+ if (G.f & G_HIDDENHANDLES) {
if (bezt->f2 & SELECT) {
calc_tw_center(scene, bezt->vec[1]);
totsel++;
@@ -363,19 +362,18 @@ int calc_manipulator_stats(const bContext *C)
;
}
else if(ob && ob->mode & OB_MODE_PARTICLE_EDIT) {
- PTCacheEdit *edit= PE_get_current(scene, ob);
- PTCacheEditPoint *point;
- PTCacheEditKey *ek;
+ ParticleSystem *psys= PE_get_current(scene, ob);
+ ParticleData *pa = psys->particles;
+ ParticleEditKey *ek;
int k;
- if(edit) {
- point = edit->points;
- for(a=0; a<edit->totpoint; a++,point++) {
- if(point->flag & PEP_HIDE) continue;
+ if(psys->edit) {
+ for(a=0; a<psys->totpart; a++,pa++) {
+ if(pa->flag & PARS_HIDE) continue;
- for(k=0, ek=point->keys; k<point->totkey; k++, ek++) {
+ for(k=0, ek=psys->edit->keys[a]; k<pa->totkey; k++, ek++) {
if(ek->flag & PEK_SELECT) {
- calc_tw_center(scene, ek->flag & PEK_USE_WCO ? ek->world_co : ek->co);
+ calc_tw_center(scene, ek->world_co);
totsel++;
}
}
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 4ae0bca3284..081e9589fb8 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -98,7 +98,6 @@ char OP_WARP[] = "TFM_OT_warp";
char OP_SHRINK_FATTEN[] = "TFM_OT_shrink_fatten";
char OP_TILT[] = "TFM_OT_tilt";
char OP_TRACKBALL[] = "TFM_OT_trackball";
-char OP_MIRROR[] = "TFM_OT_mirror";
TransformModeItem transform_modes[] =
@@ -112,7 +111,6 @@ TransformModeItem transform_modes[] =
{OP_SHRINK_FATTEN, TFM_SHRINKFATTEN},
{OP_TILT, TFM_TILT},
{OP_TRACKBALL, TFM_TRACKBALL},
- {OP_MIRROR, TFM_MIRROR},
{NULL, 0}
};
@@ -150,7 +148,6 @@ void TFM_OT_select_orientation(struct wmOperatorType *ot)
/* identifiers */
ot->name = "Select Orientation";
- ot->description= "Select orientation type.";
ot->idname = "TFM_OT_select_orientation";
/* api callbacks */
@@ -311,7 +308,6 @@ void TFM_OT_translate(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Translate";
- ot->description= "Translate selected items.";
ot->idname = OP_TRANSLATION;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -337,7 +333,6 @@ void TFM_OT_resize(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Resize";
- ot->description= "Resize selected items.";
ot->idname = OP_RESIZE;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -364,7 +359,6 @@ void TFM_OT_trackball(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Trackball";
- ot->description= "Trackball style rotation of selected items.";
ot->idname = OP_TRACKBALL;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -386,7 +380,6 @@ void TFM_OT_rotate(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Rotate";
- ot->description= "Rotate selected items.";
ot->idname = OP_ROTATION;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -412,10 +405,6 @@ void TFM_OT_tilt(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Tilt";
- /*optionals -
- "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;
@@ -439,7 +428,6 @@ void TFM_OT_warp(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Warp";
- ot->description= "Warp selected items around the cursor.";
ot->idname = OP_WARP;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -464,7 +452,6 @@ void TFM_OT_shear(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Shear";
- ot->description= "Shear selected items along the horizontal screen axis.";
ot->idname = OP_SHEAR;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -489,7 +476,6 @@ void TFM_OT_shrink_fatten(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "Shrink/Fatten";
- ot->description= "Shrink/fatten selected vertices along normals.";
ot->idname = OP_SHRINK_FATTEN;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -511,8 +497,6 @@ void TFM_OT_tosphere(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "To Sphere";
- //added "around mesh center" to differentiate between "MESH_OT_vertices_to_sphere()"
- ot->description= "Move selected vertices outward in a spherical shape around mesh center.";
ot->idname = OP_TOSPHERE;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -530,25 +514,6 @@ void TFM_OT_tosphere(struct wmOperatorType *ot)
RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
}
-void TFM_OT_mirror(struct wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Mirror";
- ot->description= "Mirror selected vertices around one or more axes.";
- ot->idname = OP_MIRROR;
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
-
- /* api callbacks */
- ot->invoke = transform_invoke;
- ot->exec = transform_exec;
- ot->modal = transform_modal;
- ot->cancel = transform_cancel;
- ot->poll = ED_operator_areaactive;
-
- Properties_Proportional(ot);
- Properties_Constraints(ot);
-}
-
void TFM_OT_transform(struct wmOperatorType *ot)
{
static EnumPropertyItem transform_mode_types[] = {
@@ -583,7 +548,6 @@ void TFM_OT_transform(struct wmOperatorType *ot)
/* identifiers */
ot->name = "Transform";
- ot->description= "Transform selected items by mode type.";
ot->idname = "TFM_OT_transform";
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -616,7 +580,6 @@ void transform_operatortypes(void)
WM_operatortype_append(TFM_OT_shrink_fatten);
WM_operatortype_append(TFM_OT_tilt);
WM_operatortype_append(TFM_OT_trackball);
- WM_operatortype_append(TFM_OT_mirror);
WM_operatortype_append(TFM_OT_select_orientation);
}
@@ -721,7 +684,8 @@ void transform_keymap_for_space(struct wmWindowManager *wm, struct ListBase *key
km = WM_keymap_add_item(keymap, "TFM_OT_resize", SKEY, KM_PRESS, 0, 0);
- km = WM_keymap_add_item(keymap, "TFM_OT_mirror", MKEY, KM_PRESS, 0, 0);
+ km = WM_keymap_add_item(keymap, "TFM_OT_transform", MKEY, KM_PRESS, 0, 0);
+ RNA_int_set(km->ptr, "mode", TFM_MIRROR);
break;
default:
break;
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 9416425704f..8f9d6108e37 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -744,7 +744,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
for (nu = cu->editnurb->first; nu; nu = nu->next)
{
/* only bezier has a normal */
- if(nu->type == CU_BEZIER)
+ if((nu->type & 7) == CU_BEZIER)
{
bezt= nu->bezt;
a= nu->pntsu;
diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c
index 2d73a9f1d25..17a1e0b6cdb 100644
--- a/source/blender/editors/util/editmode_undo.c
+++ b/source/blender/editors/util/editmode_undo.c
@@ -267,7 +267,7 @@ void undo_editmode_step(bContext *C, int step)
}
}
-// DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
+// DAG_object_flush_update(G.scene, obedit, OB_RECALC_DATA);
/* XXX notifiers */
}
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index d26f7a7a484..18159414cf6 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -58,7 +58,6 @@
#include "ED_armature.h"
#include "ED_particle.h"
#include "ED_curve.h"
-#include "ED_mball.h"
#include "ED_mesh.h"
#include "ED_object.h"
#include "ED_screen.h"
@@ -240,7 +239,6 @@ void ED_OT_undo(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Undo";
- ot->description= "Undo previous action.";
ot->idname= "ED_OT_undo";
/* api callbacks */
@@ -252,7 +250,6 @@ void ED_OT_redo(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Redo";
- ot->description= "Redo previous action.";
ot->idname= "ED_OT_redo";
/* api callbacks */
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 9051300e117..bb5a8b1dd40 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -139,7 +139,7 @@ void ED_uvedit_assign_image(Scene *scene, Object *obedit, Image *ima, Image *pre
/* and update depdency graph */
if(update)
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
BKE_mesh_end_editmesh(obedit->data, em);
}
@@ -169,8 +169,8 @@ void ED_uvedit_set_tile(bContext *C, Scene *scene, Object *obedit, Image *ima, i
tf->tile= curtile; /* set tile index */
}
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
}
@@ -942,6 +942,50 @@ static void select_linked(Scene *scene, Image *ima, EditMesh *em, float limit[2]
EM_free_uv_vert_map(vmap);
}
+/* ******************** mirror operator **************** */
+
+static int mirror_exec(bContext *C, wmOperator *op)
+{
+ float mat[3][3];
+ int axis;
+
+ Mat3One(mat);
+ axis= RNA_enum_get(op->ptr, "axis");
+
+ if(axis == 'x') {
+ /* XXX initTransform(TFM_MIRROR, CTX_NO_PET|CTX_AUTOCONFIRM);
+ BIF_setSingleAxisConstraint(mat[0], " on X axis");
+ Transform(); */
+ }
+ else {
+ /* XXX initTransform(TFM_MIRROR, CTX_NO_PET|CTX_AUTOCONFIRM);
+ BIF_setSingleAxisConstraint(mat[1], " on Y axis");
+ Transform(); */
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void UV_OT_mirror(wmOperatorType *ot)
+{
+ static EnumPropertyItem axis_items[] = {
+ {'x', "MIRROR_X", 0, "Mirror X", "Mirror UVs over X axis."},
+ {'y', "MIRROR_Y", 0, "Mirror Y", "Mirror UVs over Y axis."},
+ {0, NULL, 0, NULL, NULL}};
+
+ /* identifiers */
+ ot->name= "Mirror";
+ ot->idname= "UV_OT_mirror";
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ /* api callbacks */
+ ot->exec= mirror_exec;
+ ot->poll= ED_operator_uvedit;
+
+ /* properties */
+ RNA_def_enum(ot->srna, "axis", axis_items, 'x', "Axis", "Axis to mirror UV locations over.");
+}
+
/* ******************** align operator **************** */
static void weld_align_uv(bContext *C, int tool)
@@ -1014,8 +1058,8 @@ static void weld_align_uv(bContext *C, int tool)
}
}
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
}
@@ -1235,8 +1279,8 @@ static int stitch_exec(bContext *C, wmOperator *op)
MEM_freeN(uv_average);
}
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1292,7 +1336,7 @@ static int select_inverse_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1362,7 +1406,7 @@ static int de_select_all_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1666,8 +1710,8 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
}
}
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_PASS_THROUGH|OPERATOR_FINISHED;
@@ -1790,8 +1834,8 @@ static int select_linked_exec(bContext *C, wmOperator *op)
uvedit_pixel_to_float(sima, limit, 0.05f);
select_linked(scene, ima, em, limit, NULL, extend);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1846,8 +1890,8 @@ static int unlink_selection_exec(bContext *C, wmOperator *op)
}
}
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2123,7 +2167,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2218,7 +2262,7 @@ int circle_select_exec(bContext *C, wmOperator *op)
if(select) EM_select_flush(em);
else EM_deselect_flush(em);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2523,8 +2567,8 @@ static int snap_selection_exec(bContext *C, wmOperator *op)
if(!change)
return OPERATOR_CANCELLED;
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
return OPERATOR_FINISHED;
}
@@ -2583,7 +2627,7 @@ static int pin_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2628,7 +2672,7 @@ static int select_pinned_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2660,7 +2704,7 @@ static int hide_exec(bContext *C, wmOperator *op)
if(ts->uv_flag & UV_SYNC_SELECTION) {
EM_hide_mesh(em, swap);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2768,7 +2812,7 @@ static int hide_exec(bContext *C, wmOperator *op)
}
EM_validate_selections(em);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2803,7 +2847,7 @@ static int reveal_exec(bContext *C, wmOperator *op)
/* call the mesh function if we are in mesh sync sel */
if(ts->uv_flag & UV_SYNC_SELECTION) {
EM_reveal_mesh(em);
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2899,7 +2943,7 @@ static int reveal_exec(bContext *C, wmOperator *op)
EM_select_face(efa, 1);
}
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3048,6 +3092,7 @@ void ED_operatortypes_uvedit(void)
WM_operatortype_append(UV_OT_snap_selection);
WM_operatortype_append(UV_OT_align);
+ WM_operatortype_append(UV_OT_mirror);
WM_operatortype_append(UV_OT_stitch);
WM_operatortype_append(UV_OT_weld);
WM_operatortype_append(UV_OT_pin);
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index b20d390fb4d..c4f4704e47e 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -44,7 +44,6 @@
#include "BKE_customdata.h"
#include "BKE_depsgraph.h"
#include "BKE_global.h"
-#include "BKE_image.h"
#include "BKE_mesh.h"
#include "BKE_utildefines.h"
@@ -76,11 +75,6 @@ static int ED_uvedit_ensure_uvs(bContext *C, Scene *scene, Object *obedit)
EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data);
EditFace *efa;
MTFace *tf;
- Image *ima;
- bScreen *sc;
- ScrArea *sa;
- SpaceLink *slink;
- SpaceImage *sima;
if(ED_uvedit_test(obedit)) {
BKE_mesh_end_editmesh(obedit->data, em);
@@ -94,31 +88,10 @@ static int ED_uvedit_ensure_uvs(bContext *C, Scene *scene, Object *obedit)
BKE_mesh_end_editmesh(obedit->data, em);
return 0;
}
-
- ima= CTX_data_edit_image(C);
-
- if(!ima) {
- /* no image in context in the 3d view, we find first image window .. */
- sc= CTX_wm_screen(C);
-
- for(sa=sc->areabase.first; sa; sa=sa->next) {
- slink= sa->spacedata.first;
- if(slink->spacetype == SPACE_IMAGE) {
- sima= (SpaceImage*)slink;
-
- ima= sima->image;
- if(ima) {
- if(ima->type==IMA_TYPE_R_RESULT || ima->type==IMA_TYPE_COMPOSITE)
- ima= NULL;
- else
- break;
- }
- }
- }
- }
- if(ima)
- ED_uvedit_assign_image(scene, obedit, ima, NULL);
+ // XXX this image is not in context in 3d view .. only
+ // way to get would be to find the first image window?
+ ED_uvedit_assign_image(scene, obedit, CTX_data_edit_image(C), NULL);
/* select new UV's */
for(efa=em->faces.first; efa; efa=efa->next) {
@@ -290,8 +263,8 @@ static void minimize_stretch_iteration(bContext *C, wmOperator *op, int interact
ms->lasttime = PIL_check_seconds_timer();
- DAG_id_flush_update(ms->obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ms->obedit->data);
+ DAG_object_flush_update(ms->scene, ms->obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ms->obedit);
}
}
@@ -313,8 +286,8 @@ static void minimize_stretch_exit(bContext *C, wmOperator *op, int cancel)
param_stretch_end(ms->handle);
param_delete(ms->handle);
- DAG_id_flush_update(ms->obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, ms->obedit->data);
+ DAG_object_flush_update(ms->scene, ms->obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ms->obedit);
MEM_freeN(ms);
op->customdata= NULL;
@@ -440,8 +413,8 @@ static int pack_islands_exec(bContext *C, wmOperator *op)
param_flush(handle);
param_delete(handle);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -473,8 +446,8 @@ static int average_islands_scale_exec(bContext *C, wmOperator *op)
param_flush(handle);
param_delete(handle);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -837,8 +810,8 @@ static int unwrap_exec(bContext *C, wmOperator *op)
param_delete(handle);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -970,8 +943,8 @@ static int from_view_exec(bContext *C, wmOperator *op)
uv_map_clip_correct(em, op);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1037,8 +1010,8 @@ static int reset_exec(bContext *C, wmOperator *op)
}
}
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1125,8 +1098,8 @@ static int sphere_project_exec(bContext *C, wmOperator *op)
uv_map_clip_correct(em, op);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1197,8 +1170,8 @@ static int cylinder_project_exec(bContext *C, wmOperator *op)
uv_map_clip_correct(em, op);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1284,8 +1257,8 @@ static int cube_project_exec(bContext *C, wmOperator *op)
uv_map_clip_correct(em, op);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 279596e5ad7..4d376f47d91 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -27,8 +27,8 @@
FILE(GLOB SRC intern/*.c)
SET(INC
- . ../blenlib ../blenkernel ../makesdna ../include
- ../../../extern/glew/include ../../../intern/guardedalloc ../../../intern/smoke/extern ../imbuf)
+ . ../blenlib ../blenkernel ../makesdna ../include
+ ../../../extern/glew/include ../../../intern/guardedalloc ../imbuf)
BLENDERLIB(bf_gpu "${SRC}" "${INC}")
diff --git a/source/blender/gpu/GPU_draw.h b/source/blender/gpu/GPU_draw.h
index fabe1420e83..82ff51dc5ce 100644
--- a/source/blender/gpu/GPU_draw.h
+++ b/source/blender/gpu/GPU_draw.h
@@ -43,7 +43,6 @@ struct Object;
struct Scene;
struct View3D;
struct RegionView3D;
-struct SmokeModifierData;
/* OpenGL drawing functions related to shading. These are also
* shared with the game engine, where there were previously
@@ -113,10 +112,6 @@ int GPU_verify_image(struct Image *ima, int tftile, int tfmode, int compare, int
void GPU_free_image(struct Image *ima);
void GPU_free_images(void);
-/* smoke drawing functions */
-void GPU_free_smoke(struct SmokeModifierData *smd);
-void GPU_create_smoke(struct SmokeModifierData *smd, int highres);
-
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h
index e00cab79ce0..eba585e8838 100644
--- a/source/blender/gpu/GPU_extensions.h
+++ b/source/blender/gpu/GPU_extensions.h
@@ -73,7 +73,6 @@ int GPU_print_error(char *str);
GPUTexture *GPU_texture_create_1D(int w, float *pixels);
GPUTexture *GPU_texture_create_2D(int w, int h, float *pixels);
-GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels);
GPUTexture *GPU_texture_create_depth(int w, int h);
GPUTexture *GPU_texture_from_blender(struct Image *ima,
struct ImageUser *iuser, double time, int mipmap);
diff --git a/source/blender/gpu/SConscript b/source/blender/gpu/SConscript
index 7e700c177e4..63f5fe53238 100644
--- a/source/blender/gpu/SConscript
+++ b/source/blender/gpu/SConscript
@@ -4,8 +4,8 @@ Import ('env')
sources = env.Glob('intern/*.c')
incs = '../blenlib ../blenkernel ../makesdna ../include'
-incs += ' #/extern/glew/include #intern/guardedalloc #intern/smoke/extern ../imbuf .'
+incs += ' #/extern/glew/include #intern/guardedalloc ../imbuf .'
incs += ' ' + env['BF_OPENGL_INC']
-env.BlenderLib ( 'bf_gpu', sources, Split(incs), [], libtype=['core','player'], priority=[160,110] )
+env.BlenderLib ( 'bf_gpu', sources, Split(incs), [], libtype=['core', 'player'], priority=[160, 20] )
diff --git a/source/blender/gpu/intern/Makefile b/source/blender/gpu/intern/Makefile
index 2637bff44ac..3a3ac20ff6c 100644
--- a/source/blender/gpu/intern/Makefile
+++ b/source/blender/gpu/intern/Makefile
@@ -47,7 +47,6 @@ CPPFLAGS += -I../../blenlib
CPPFLAGS += -I../../makesdna
CPPFLAGS += -I../../imbuf
CPPFLAGS += -I../../blenkernel
-CPPFLAGS += -I$(NAN_SMOKE)/include
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I../
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 75e8073aafd..e7846a23905 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -38,11 +38,9 @@
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
#include "DNA_meshdata_types.h"
-#include "DNA_modifier_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
-#include "DNA_smoke_types.h"
#include "DNA_userdef_types.h"
#include "DNA_view3d_types.h"
@@ -64,8 +62,6 @@
#include "GPU_material.h"
#include "GPU_draw.h"
-#include "smoke_API.h"
-
/* These are some obscure rendering functions shared between the
* game engine and the blender, in this module to avoid duplicaten
* and abstract them away from the rest a bit */
@@ -748,31 +744,6 @@ int GPU_update_image_time(Image *ima, double time)
return inc;
}
-
-void GPU_free_smoke(SmokeModifierData *smd)
-{
- if(smd->type & MOD_SMOKE_TYPE_DOMAIN && smd->domain)
- {
- if(smd->domain->tex)
- GPU_texture_free(smd->domain->tex);
- smd->domain->tex = NULL;
-
- if(smd->domain->tex_shadow)
- GPU_texture_free(smd->domain->tex_shadow);
- smd->domain->tex_shadow = NULL;
- }
-}
-
-void GPU_create_smoke(SmokeModifierData *smd, int highres)
-{
- if(smd->type & MOD_SMOKE_TYPE_DOMAIN && smd->domain && !smd->domain->tex && !highres)
- smd->domain->tex = GPU_texture_create_3D(smd->domain->res[0], smd->domain->res[1], smd->domain->res[2], smoke_get_density(smd->domain->fluid));
- else if(smd->type & MOD_SMOKE_TYPE_DOMAIN && smd->domain && !smd->domain->tex && highres)
- smd->domain->tex = GPU_texture_create_3D(smd->domain->res_wt[0], smd->domain->res_wt[1], smd->domain->res_wt[2], smoke_turbulence_get_density(smd->domain->wt));
-
- smd->domain->tex_shadow = GPU_texture_create_3D(smd->domain->res[0], smd->domain->res[1], smd->domain->res[2], smd->domain->shadow);
-}
-
void GPU_free_image(Image *ima)
{
/* free regular image binding */
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index d7b54e425fd..467b2c4a7f4 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -312,69 +312,6 @@ static GPUTexture *GPU_texture_create_nD(int w, int h, int n, float *fpixels, in
return tex;
}
-
-GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels)
-{
- GPUTexture *tex;
- GLenum type, format, internalformat;
- void *pixels = NULL;
- float vfBorderColor[4] = {0.0f, 0.0f, 0.0f, 0.0f};
-
- tex = MEM_callocN(sizeof(GPUTexture), "GPUTexture");
- tex->w = w;
- tex->h = h;
- tex->depth = depth;
- tex->number = -1;
- tex->refcount = 1;
- tex->target = GL_TEXTURE_3D;
-
- glGenTextures(1, &tex->bindcode);
-
- if (!tex->bindcode) {
- fprintf(stderr, "GPUTexture: texture create failed: %d\n",
- (int)glGetError());
- GPU_texture_free(tex);
- return NULL;
- }
-
- if (!GLEW_ARB_texture_non_power_of_two) {
- tex->w = larger_pow2(tex->w);
- tex->h = larger_pow2(tex->h);
- tex->depth = larger_pow2(tex->depth);
- }
-
- tex->number = 0;
- glBindTexture(tex->target, tex->bindcode);
-
- type = GL_FLOAT; // GL_UNSIGNED_BYTE
- format = GL_RED;
- internalformat = GL_RED;
-
- //if (fpixels)
- // pixels = GPU_texture_convert_pixels(w*h*depth, fpixels);
-
- glTexImage3D(tex->target, 0, internalformat, tex->w, tex->h, tex->depth, 0, format, type, 0);
-
- if (fpixels) {
- glTexSubImage3D(tex->target, 0, 0, 0, 0, w, h, depth, format, type, fpixels);
- }
-
- glTexParameterfv(GL_TEXTURE_3D, GL_TEXTURE_BORDER_COLOR, vfBorderColor);
- glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
- glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
- glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_BORDER);
-
- if (pixels)
- MEM_freeN(pixels);
-
- if (tex)
- GPU_texture_unbind(tex);
-
- return tex;
-}
-
GPUTexture *GPU_texture_from_blender(Image *ima, ImageUser *iuser, double time, int mipmap)
{
GPUTexture *tex;
diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt
index 5eb98151c14..391f6e9e1a2 100644
--- a/source/blender/imbuf/CMakeLists.txt
+++ b/source/blender/imbuf/CMakeLists.txt
@@ -27,35 +27,35 @@
FILE(GLOB SRC intern/*.c)
SET(INC
- . ../makesdna ../../../intern/guardedalloc ../../../intern/memutil ../blenlib
- ../avi ../blenkernel
- ${JPEG_INC}
- ${PNG_INC}
- ${TIFF_INC}
- ${ZLIB_INC}
- ${OPENJPEG_INC}
+ . ../makesdna ../../../intern/guardedalloc ../../../intern/memutil ../blenlib
+ ../avi ../quicktime ../blenkernel
+ ${JPEG_INC}
+ ${PNG_INC}
+ ${TIFF_INC}
+ ${ZLIB_INC}
+ ${OPENJPEG_INC}
)
IF(WITH_OPENEXR)
- ADD_DEFINITIONS(-DWITH_OPENEXR)
+ ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
IF(WITH_OPENJPEG)
- ADD_DEFINITIONS(-DWITH_OPENJPEG)
+ ADD_DEFINITIONS(-DWITH_OPENJPEG)
ENDIF(WITH_OPENJPEG)
IF(WITH_QUICKTIME)
- SET(INC ${INC} ../quicktime ${QUICKTIME_INC})
- ADD_DEFINITIONS(-DWITH_QUICKTIME)
+ SET(INC ${INC} ${QUICKTIME_INC})
+ ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
IF(WITH_FFMPEG)
- SET(INC ${INC} ${FFMPEG_INC})
- ADD_DEFINITIONS(-DWITH_FFMPEG)
+ SET(INC ${INC} ${FFMPEG_INC})
+ ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
if(WITH_DDS)
- ADD_DEFINITIONS(-DWITH_DDS)
+ ADD_DEFINITIONS(-DWITH_DDS)
ENDIF(WITH_DDS)
BLENDERLIB(bf_imbuf "${SRC}" "${INC}")
diff --git a/source/blender/imbuf/SConscript b/source/blender/imbuf/SConscript
index 6052b344da7..9da0cf21596 100644
--- a/source/blender/imbuf/SConscript
+++ b/source/blender/imbuf/SConscript
@@ -35,4 +35,4 @@ if env['WITH_BF_QUICKTIME']:
incs += ' ../quicktime ' + env['BF_QUICKTIME_INC']
defs.append('WITH_QUICKTIME')
-env.BlenderLib ( libname = 'bf_imbuf', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [185,115] )
+env.BlenderLib ( libname = 'bf_imbuf', sources = sources, includes = Split(incs), defines = defs, libtype=['core'], priority = [190] )
diff --git a/source/blender/imbuf/intern/anim5.c b/source/blender/imbuf/intern/anim5.c
index 43a6b0d2c5d..b6f29b6a145 100644
--- a/source/blender/imbuf/intern/anim5.c
+++ b/source/blender/imbuf/intern/anim5.c
@@ -31,7 +31,6 @@
#include "BLI_blenlib.h" /* BLI_remlink BLI_filesize BLI_addtail
BLI_countlist BLI_stringdec */
-
#include "imbuf.h"
#include "imbuf_patch.h"
@@ -47,11 +46,6 @@
#include "IMB_anim5.h"
-#ifdef _WIN32
-#include <io.h>
-#include "BLI_winstuff.h"
-#endif
-
typedef struct Anhd{
unsigned char type, mask;
unsigned short w, h;
@@ -210,12 +204,12 @@ static void anim5decode(struct ImBuf * ibuf, uchar * dlta) {
int *ofspoint;
uchar **planes;
- /* composition delta:
- list with ofsets for delta' s by bitplane (ofspoint)
- by column in delta (point)
- number of operations (noops)
+ /* samenstelling delta:
+ lijst met ofsets voor delta's per bitplane (ofspoint)
+ per kolom in delta (point)
+ aantal handelingen (noops)
code
- associated data
+ bijbehorende data
...
...
*/
diff --git a/source/blender/imbuf/intern/cineon/CMakeLists.txt b/source/blender/imbuf/intern/cineon/CMakeLists.txt
index 8b28086016b..53cd161634b 100644
--- a/source/blender/imbuf/intern/cineon/CMakeLists.txt
+++ b/source/blender/imbuf/intern/cineon/CMakeLists.txt
@@ -27,14 +27,14 @@
FILE(GLOB SRC *.c)
SET(INC
- .
- ../../../blenkernel
- ../../
- ..
- ../../../blenlib
- intern/include
- ../../../../../intern/guardedalloc
- ../../../makesdna
+ .
+ ../../../blenkernel
+ ../../
+ ..
+ ../../../blenlib
+ intern/include
+ ../../../../../intern/guardedalloc
+ ../../../makesdna
)
BLENDERLIB(bf_cineon "${SRC}" "${INC}")
diff --git a/source/blender/imbuf/intern/cineon/SConscript b/source/blender/imbuf/intern/cineon/SConscript
index d9c8ab14d35..ef9c44b85c8 100644
--- a/source/blender/imbuf/intern/cineon/SConscript
+++ b/source/blender/imbuf/intern/cineon/SConscript
@@ -14,4 +14,4 @@ incs = ['.',
defs = []
-env.BlenderLib ('bf_cineon', source_files, incs, defs, libtype=['core','player'], priority = [220,175])
+env.BlenderLib ('bf_cineon', source_files, incs, defs, libtype=['core','player'], priority = [220, 75])
diff --git a/source/blender/imbuf/intern/dds/CMakeLists.txt b/source/blender/imbuf/intern/dds/CMakeLists.txt
index dc45afb9f5b..842f53bd88b 100644
--- a/source/blender/imbuf/intern/dds/CMakeLists.txt
+++ b/source/blender/imbuf/intern/dds/CMakeLists.txt
@@ -27,18 +27,18 @@
FILE (GLOB SRC *.cpp)
SET(INC
- .
- ../../../blenkernel
- ../../../makesdna
- ../../
- ..
- ../../../blenlib
- intern/include
- ../../../../../intern/guardedalloc
+ .
+ ../../../blenkernel
+ ../../../makesdna
+ ../../
+ ..
+ ../../../blenlib
+ intern/include
+ ../../../../../intern/guardedalloc
)
if(WITH_DDS)
- ADD_DEFINITIONS(-DWITH_DDS)
+ ADD_DEFINITIONS(-DWITH_DDS)
ENDIF(WITH_DDS)
BLENDERLIB(bf_dds "${SRC}" "${INC}")
diff --git a/source/blender/imbuf/intern/dds/SConscript b/source/blender/imbuf/intern/dds/SConscript
index 0b7fd50e317..cec6023648b 100644
--- a/source/blender/imbuf/intern/dds/SConscript
+++ b/source/blender/imbuf/intern/dds/SConscript
@@ -16,4 +16,4 @@ incs = ['.',
defs = ['WITH_DDS']
-env.BlenderLib ('bf_dds', source_files, incs, defs, libtype=['core','player'], priority = [230,190])
+env.BlenderLib ('bf_dds', source_files, incs, defs, libtype=['core','player'], priority = [230, 105])
diff --git a/source/blender/imbuf/intern/hamx.c b/source/blender/imbuf/intern/hamx.c
index 258c196fcdf..2f32d155407 100644
--- a/source/blender/imbuf/intern/hamx.c
+++ b/source/blender/imbuf/intern/hamx.c
@@ -31,6 +31,11 @@
#include "BLI_blenlib.h"
+#ifdef WIN32
+#include <io.h>
+#endif
+
+
#include "imbuf.h"
#include "imbuf_patch.h"
#include "IMB_imbuf_types.h"
@@ -41,11 +46,6 @@
#include "IMB_ham.h"
#include "IMB_hamx.h"
-#ifdef WIN32
-#include <io.h>
-#include "BLI_winstuff.h"
-#endif
-
/* actually hard coded endianness */
#define GET_BIG_LONG(x) (((uchar *) (x))[0] << 24 | ((uchar *) (x))[1] << 16 | ((uchar *) (x))[2] << 8 | ((uchar *) (x))[3])
#define GET_LITTLE_LONG(x) (((uchar *) (x))[3] << 24 | ((uchar *) (x))[2] << 16 | ((uchar *) (x))[1] << 8 | ((uchar *) (x))[0])
diff --git a/source/blender/imbuf/intern/iff.c b/source/blender/imbuf/intern/iff.c
index 5fd823e78c1..c3695173068 100644
--- a/source/blender/imbuf/intern/iff.c
+++ b/source/blender/imbuf/intern/iff.c
@@ -29,15 +29,14 @@
* $Id$
*/
+#ifdef WIN32
+#include <io.h>
+#endif
#include "BLI_blenlib.h"
#include "imbuf.h"
#include "imbuf_patch.h"
#include "IMB_imbuf_types.h"
#include "IMB_iff.h"
-#ifdef WIN32
-#include <io.h>
-#include "BLI_winstuff.h"
-#endif
unsigned short imb_start_iff(struct ImBuf *ibuf, int file)
{
diff --git a/source/blender/imbuf/intern/openexr/CMakeLists.txt b/source/blender/imbuf/intern/openexr/CMakeLists.txt
index 33681da55af..21792086774 100644
--- a/source/blender/imbuf/intern/openexr/CMakeLists.txt
+++ b/source/blender/imbuf/intern/openexr/CMakeLists.txt
@@ -27,19 +27,19 @@
SET(SRC openexr_api.cpp)
SET(INC
- .
- ../../../blenkernel
- ../../
- ..
- ../../../blenlib
- intern/include
- ../../../../../intern/guardedalloc
- ../../../makesdna
- ${OPENEXR_INC}
+ .
+ ../../../blenkernel
+ ../../
+ ..
+ ../../../blenlib
+ intern/include
+ ../../../../../intern/guardedalloc
+ ../../../makesdna
+ ${OPENEXR_INC}
)
IF(WITH_OPENEXR)
- ADD_DEFINITIONS(-DWITH_OPENEXR)
+ ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
BLENDERLIB(bf_openexr "${SRC}" "${INC}")
diff --git a/source/blender/imbuf/intern/openexr/Makefile b/source/blender/imbuf/intern/openexr/Makefile
index 083089b11d5..f77e3723e8a 100644
--- a/source/blender/imbuf/intern/openexr/Makefile
+++ b/source/blender/imbuf/intern/openexr/Makefile
@@ -35,9 +35,6 @@ include nan_compile.mk
CFLAGS += $(LEVEL_1_C_WARNINGS)
-# If compiling the API, WITH_OPENEXR must be set.
-CPPFLAGS += -DWITH_OPENEXR
-
CPPFLAGS += -I../../../makesdna
CPPFLAGS += -I../../../blenkernel
CPPFLAGS += -I../../../blenlib
diff --git a/source/blender/imbuf/intern/openexr/SConscript b/source/blender/imbuf/intern/openexr/SConscript
index f504c503109..aa166a1983c 100644
--- a/source/blender/imbuf/intern/openexr/SConscript
+++ b/source/blender/imbuf/intern/openexr/SConscript
@@ -13,6 +13,6 @@ incs = ['.',
'../../../makesdna']
incs += Split(env['BF_OPENEXR_INC'])
-defs = ['WITH_OPENEXR']
+defs = []
-env.BlenderLib ('bf_openexr', source_files, incs, defs, libtype=['core','player'], priority = [225,180])
+env.BlenderLib ('bf_openexr', source_files, incs, defs, libtype=['core','player'], priority = [225, 85])
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index a780727b1a2..32d97d79bd7 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -51,6 +51,7 @@ _CRTIMP void __cdecl _invalid_parameter_noinfo(void)
#include "IMB_imbuf.h"
#include "IMB_allocimbuf.h"
+#define WITH_OPENEXR
#include "openexr_multi.h"
}
diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c
index 6053c5556f1..86ca43824f3 100644
--- a/source/blender/imbuf/intern/thumbs.c
+++ b/source/blender/imbuf/intern/thumbs.c
@@ -39,15 +39,8 @@
#include "IMB_thumbs.h"
#include "IMB_imginfo.h"
-#include "md5.h"
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdio.h>
+#include "md5.h"
#ifdef WIN32
#include <windows.h> /* need to include windows.h so _WIN32_IE is defined */
@@ -55,13 +48,22 @@
#define _WIN32_IE 0x0400 /* minimal requirements for SHGetSpecialFolderPath on MINGW MSVC has this defined already */
#endif
#include <shlobj.h> /* for SHGetSpecialFolderPath, has to be done before BLI_winstuff because 'near' is disabled through BLI_windstuff */
+#include "BLI_winstuff.h"
#include <process.h> /* getpid */
#include <direct.h> /* chdir */
-#include "BLI_winstuff.h"
#else
#include <unistd.h>
#endif
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+
#define URI_MAX FILE_MAX*3 + 8
static int get_thumb_dir( char* dir , ThumbSize size)
diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c
index b3af727190a..7e1120bf3e4 100644
--- a/source/blender/imbuf/intern/writeimage.c
+++ b/source/blender/imbuf/intern/writeimage.c
@@ -29,6 +29,10 @@
* $Id$
*/
+#ifdef WIN32
+#include <io.h>
+#endif
+
#include <stdio.h>
#include "BKE_global.h"
@@ -67,10 +71,6 @@
#include "IMB_bitplanes.h"
#include "IMB_divers.h"
-#ifdef WIN32
-#include <io.h>
-#include "BLI_winstuff.h"
-#endif
/* added facility to copy with saving non-float rects */
short IMB_saveiff(struct ImBuf *ibuf, char *name, int flags)
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 318204e3dd8..6f097ea3882 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -41,54 +41,6 @@ struct SpaceLink;
struct Object;
/* ************************************************ */
-/* Visualisation */
-
-/* Motion Paths ------------------------------------ */
-/* (used for Pose Channels and Objects) */
-
-/* Data point for motion path */
-typedef struct bMotionPathVert {
- float co[3]; /* coordinates of point in 3D-space */
- int flag; /* quick settings */
-} bMotionPathVert;
-
-/* Motion Path data cache - for elements providing transforms (i.e. Objects or PoseChannels) */
-typedef struct bMotionPath {
- bMotionPathVert *points; /* path samples */
- int length; /* the number of cached verts */
-
- int start_frame; /* for drawing paths, the start frame number */
- int end_frame; /* for drawing paths, the end frame number */
-
- int flag; /* extra settings */
-} bMotionPath;
-
-
-
-/* Animation Visualisation Settings - for Objects or Armatures (not PoseChannels) */
-typedef struct bAnimVizSettings {
- int pad;
- int pathflag; /* eMotionPath_Settings */
-
- int pathsf, pathef; /* start and end frames of path-calculation range */
- int pathbc, pathac; /* number of frames before/after current frame of path-calculation */
-} bAnimVizSettings;
-
-/* bMotionPathSettings->flag */
-typedef enum eMotionPath_Settings {
- /* show frames on path */
- MOTIONPATH_FLAG_FNUMS = (1<<0),
- /* show keyframes on path */
- MOTIONPATH_FLAG_KFRAS = (1<<1),
- /* for bones - calculate head-points for curves instead of tips */
- MOTIONPATH_FLAG_HEADS = (1<<2),
- /* show path around current frame */
- MOTIONPATH_FLAG_ACFRA = (1<<3),
- /* show keyframe/frame numbers */
- MOTIONPATH_FLAG_KFNOS = (1<<4)
-} eMotionPath_Settings;
-
-/* ************************************************ */
/* Poses */
/* PoseChannel ------------------------------------ */
@@ -199,18 +151,8 @@ typedef enum ePchan_IkFlag {
typedef enum ePchan_RotMode {
/* quaternion rotations (default, and for older Blender versions) */
PCHAN_ROT_QUAT = 0,
- /* euler rotations - keep in sync with enum in BLI_arithb.h */
- PCHAN_ROT_XYZ = 1, /* Blender 'default' (classic) - must be as 1 to sync with PoseChannel rotmode */
- PCHAN_ROT_XZY,
- PCHAN_ROT_YXZ,
- PCHAN_ROT_YZX,
- PCHAN_ROT_ZXY,
- PCHAN_ROT_ZYX,
- /* NOTE: space is reserved here for 18 other possible
- * euler rotation orders not implemented
- */
- /* axis angle rotations */
- PCHAN_ROT_AXISANGLE = -1
+ /* euler rotations (xyz only) */
+ PCHAN_ROT_EUL,
} ePchan_RotMode;
/* Pose ------------------------------------ */
@@ -496,3 +438,5 @@ typedef enum ACHAN_FLAG {
#endif
+
+
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index a3a1a342584..52ea298c110 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -86,6 +86,16 @@ typedef struct Brush {
#define BRUSH_SMOOTH_STROKE 2048
#define BRUSH_PERSISTENT 4096
+/* Brush.blend */
+#define BRUSH_BLEND_MIX 0
+#define BRUSH_BLEND_ADD 1
+#define BRUSH_BLEND_SUB 2
+#define BRUSH_BLEND_MUL 3
+#define BRUSH_BLEND_LIGHTEN 4
+#define BRUSH_BLEND_DARKEN 5
+#define BRUSH_BLEND_ERASE_ALPHA 6
+#define BRUSH_BLEND_ADD_ALPHA 7
+
/* Brush.sculpt_tool */
#define SCULPT_TOOL_DRAW 1
#define SCULPT_TOOL_SMOOTH 2
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index a92dc836197..79f032d0d21 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -64,8 +64,7 @@ typedef struct bConstraint {
float enforce; /* Amount of influence exherted by constraint (0.0-1.0) */
float headtail; /* Point along subtarget bone where the actual target is. 0=head (default for all), 1=tail*/
int pad;
-
- struct Ipo *ipo; /* local influence ipo or driver */ // XXX depreceated for 2.5... old animation system hack
+ struct Ipo *ipo; /* local influence ipo or driver */
} bConstraint;
@@ -86,7 +85,7 @@ typedef struct bConstraintTarget {
short space; /* space that target should be evaluated in (overrides bConstraint->tarspace) */
short flag; /* runtime settings (for editor, etc.) */
short type; /* type of target (B_CONSTRAINT_OB_TYPE) */
- short rotOrder; /* rotation order for target (as defined in BLI_arithb.h) */
+ short pad;
} bConstraintTarget;
/* bConstraintTarget -> flag */
@@ -450,10 +449,6 @@ typedef enum B_CONSTRAINTCHANNEL_FLAG {
#define TRACK_nY 0x04
#define TRACK_nZ 0x05
-/* FollowPath flags */
-#define FOLLOWPATH_FOLLOW 0x01
-#define FOLLOWPATH_STATIC 0x02
-
/* bTrackToConstraint->flags */
#define TARGET_Z_UP 0x01
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index fe601eefa32..b0f089d670f 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -64,7 +64,7 @@ typedef struct Path {
typedef struct BevList {
struct BevList *next, *prev;
int nr, flag;
- short poly, hole;
+ short poly, gat;
} BevList;
/* These two Lines with # tell makesdna this struct can be excluded. */
@@ -75,28 +75,25 @@ typedef struct BevPoint {
short f1, f2;
} BevPoint;
-/* Keyframes on F-Curves (allows code reuse of Bezier eval code) and
- * Points on Bezier Curves/Paths are generally BezTriples
- */
+/* Keyframes on IPO curves and Points on Bezier Curves/Paths are generally BezTriples */
/* note: alfa location in struct is abused by Key system */
/* vec in BezTriple looks like this:
vec[0][0]=x location of handle 1
vec[0][1]=y location of handle 1
- vec[0][2]=z location of handle 1 (not used for FCurve Points(2d))
+ vec[0][2]=z location of handle 1 (not used for IpoCurve Points(2d))
vec[1][0]=x location of control point
vec[1][1]=y location of control point
vec[1][2]=z location of control point
vec[2][0]=x location of handle 2
vec[2][1]=y location of handle 2
- vec[2][2]=z location of handle 2 (not used for FCurve Points(2d))
+ vec[2][2]=z location of handle 2 (not used for IpoCurve Points(2d))
*/
typedef struct BezTriple {
float vec[3][3];
float alfa, weight, radius; /* alfa: tilt in 3D View, weight: used for softbody goal weight, radius: for bevel tapering */
short ipo; /* ipo: interpolation mode for segment from this BezTriple to the next */
char h1, h2; /* h1, h2: the handle type of the two handles */
- char f1, f2, f3; /* f1, f2, f3: used for selection status */
- char hide; /* hide: used to indicate whether BezTriple is hidden (3D), type of keyframe (eBezTriple_KeyframeTypes) */
+ char f1, f2, f3, hide; /* f1, f2, f3: used for selection status, hide: used to indicate whether BezTriple is hidden */
} BezTriple;
/* note; alfa location in struct is abused by Key system */
@@ -145,7 +142,7 @@ typedef struct Curve {
struct BoundBox *bb;
- ListBase nurb; /* actual data, called splines in rna */
+ ListBase nurb; /* actual data */
ListBase disp;
ListBase *editnurb; /* edited data, not in file, use pointer so we can check for it */
@@ -163,9 +160,7 @@ typedef struct Curve {
float size[3];
float rot[3];
- int texflag; /* keep an int because of give_obdata_texspace() */
-
- short drawflag, pad[3];
+ int texflag;
short pathlen, totcol;
short flag, bevresol;
@@ -213,10 +208,6 @@ typedef struct Curve {
/* texflag */
#define CU_AUTOSPACE 1
-/* drawflag */
-#define CU_HIDE_HANDLES (1 << 0)
-#define CU_HIDE_NORMALS (1 << 1)
-
/* flag */
#define CU_3D 1
#define CU_FRONT 2
@@ -231,8 +222,6 @@ typedef struct Curve {
#define CU_RETOPO 1024
#define CU_DS_EXPAND 2048
-#define CU_NO_TWIST 4096
-
/* spacemode */
#define CU_LEFT 0
#define CU_MIDDLE 1
@@ -242,7 +231,6 @@ typedef struct Curve {
/* flag (nurb) */
#define CU_SMOOTH 1
-#define CU_2D 8 /* moved from type since 2.4x */
/* type (nurb) */
#define CU_POLY 0
@@ -250,7 +238,9 @@ typedef struct Curve {
#define CU_BSPLINE 2
#define CU_CARDINAL 3
#define CU_NURBS 4
-#define CU_TYPE (CU_POLY|CU_BEZIER|CU_BSPLINE|CU_CARDINAL|CU_NURBS)
+#define CU_TYPE 7
+
+#define CU_2D 8
/* only for adding */
#define CU_PRIMITIVE 0xF00
@@ -289,16 +279,6 @@ typedef enum eBezTriple_Interpolation {
BEZT_IPO_BEZ, /* bezier interpolation */
} eBezTriple_Interpolation;
-/* types of keyframe (used only for BezTriple->hide when BezTriple is used in F-Curves) */
-typedef enum eBezTriple_KeyframeType {
- BEZT_KEYTYPE_KEYFRAME = 0, /* default - 'proper' Keyframe */
- BEZT_KEYTYPE_BREAKDOWN, /* 'breakdown' keyframe */
-} eBezTriple_KeyframeType;
-
-/* checks if the given BezTriple is selected */
-#define BEZSELECTED(bezt) (((bezt)->f2 & SELECT) || ((bezt)->f1 & SELECT) || ((bezt)->f3 & SELECT))
-#define BEZSELECTED_HIDDENHANDLES(cu, bezt) (((cu)->drawflag & CU_HIDE_HANDLES) ? (bezt)->f2 & SELECT : BEZSELECTED(bezt))
-
/* *************** CHARINFO **************** */
/* flag */
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index 4bae9935ea7..ed209a127c7 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -33,7 +33,7 @@
/* Grease-Pencil Annotations - 'Stroke Point'
* -> Coordinates may either be 2d or 3d depending on settings at the time
* -> Coordinates of point on stroke, in proportions of window size
- * This assumes that the bottom-left corner is (0,0)
+ * (i.e. n/1000). This assumes that the bottom-left corner is (0,0)
*/
typedef struct bGPDspoint {
float x, y, z; /* co-ordinates of point (usually 2d, but can be 3d as well) */
@@ -135,14 +135,12 @@ typedef struct bGPdata {
/* bGPdata->flag */
// XXX many of these flags should be depreceated for more general ideas in 2.5
/* don't allow painting to occur at all */
- // XXX is depreceated - not well understood
#define GP_DATA_LMBPLOCK (1<<0)
/* show debugging info in viewport (i.e. status print) */
#define GP_DATA_DISPINFO (1<<1)
/* in Action Editor, show as expanded channel */
#define GP_DATA_EXPAND (1<<2)
/* is the block overriding all clicks? */
- // XXX is depreceated - nasty old concept
#define GP_DATA_EDITPAINT (1<<3)
/* new strokes are added in viewport space */
#define GP_DATA_VIEWALIGN (1<<4)
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index 55e3c9107e4..f7b3273c2e1 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -47,34 +47,6 @@ struct Ipo;
/* WATCH IT: change type? also make changes in ipo.h */
-typedef struct VolumeSettings {
- float density;
- float emission;
- float absorption;
- float scattering;
-
- float emission_col[3];
- float absorption_col[3];
- float density_scale;
- float depth_cutoff;
-
- short phasefunc_type;
- short vpad[3];
- float phasefunc_g;
-
- float stepsize;
- float shade_stepsize;
-
- short stepsize_type;
- short shadeflag;
- short shade_type;
- short precache_resolution;
-
- float ms_diff;
- float ms_intensity;
- int ms_steps;
-} VolumeSettings;
-
typedef struct Material {
ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
@@ -90,8 +62,6 @@ typedef struct Material {
float translucency;
/* end synced with render_types.h */
- struct VolumeSettings vol;
-
float fresnel_mir, fresnel_mir_i;
float fresnel_tra, fresnel_tra_i;
float filter; /* filter added, for raytrace transparency and transmissivity */
@@ -279,8 +249,6 @@ typedef struct Material {
#define MA_RAMP_SAT 13
#define MA_RAMP_VAL 14
#define MA_RAMP_COLOR 15
-#define MA_RAMP_SOFT 16
-#define MA_RAMP_LINEAR 17
/* texco */
#define TEXCO_ORCO 1
@@ -319,14 +287,6 @@ typedef struct Material {
#define MAP_WARP 8192
#define MAP_LAYER 16384
-/* volume mapto - reuse definitions for now - a bit naughty! */
-#define MAP_DENSITY 128
-#define MAP_EMISSION 64
-#define MAP_EMISSION_COL 1
-#define MAP_ABSORPTION 512
-#define MAP_ABSORPTION_COL 8
-#define MAP_SCATTERING 16
-
/* mapto for halo */
//#define MAP_HA_COL 1
//#define MAP_HA_ALPHA 128
@@ -370,29 +330,5 @@ typedef struct Material {
/* sss_flag */
#define MA_DIFF_SSS 1
-/* vol_stepsize_type */
-#define MA_VOL_STEP_RANDOMIZED 0
-#define MA_VOL_STEP_CONSTANT 1
-#define MA_VOL_STEP_ADAPTIVE 2
-
-/* vol_shadeflag */
-#define MA_VOL_SHADED 1
-#define MA_VOL_RECVSHADOW 4
-#define MA_VOL_PRECACHESHADING 8
-
-/* vol_shading_type */
-#define MA_VOL_SHADE_NONE 0
-#define MA_VOL_SHADE_SINGLE 1
-#define MA_VOL_SHADE_MULTIPLE 2
-#define MA_VOL_SHADE_SINGLEPLUSMULTIPLE 3
-
-/* vol_phasefunc_type */
-#define MA_VOL_PH_ISOTROPIC 0
-#define MA_VOL_PH_MIEHAZY 1
-#define MA_VOL_PH_MIEMURKY 2
-#define MA_VOL_PH_RAYLEIGH 3
-#define MA_VOL_PH_HG 4
-#define MA_VOL_PH_SCHLICK 5
-
#endif
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index be7452c4ae1..9d1707599b9 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -252,6 +252,7 @@ typedef struct SmokeModifierData {
struct SmokeCollSettings *coll; /* collision objects */
float time;
int type; /* domain, inflow, outflow, ... */
+ struct PointCache *point_cache; /* definition is in DNA_object_force.h */
} SmokeModifierData;
typedef struct DisplaceModifierData {
@@ -289,7 +290,7 @@ typedef struct UVProjectModifierData {
ModifierData modifier;
/* the objects which do the projecting */
- struct Object *projectors[10]; /* MOD_UVPROJECT_MAX */
+ struct Object *projectors[10];
struct Image *image; /* the image to project */
int flags;
int num_projectors;
@@ -397,8 +398,6 @@ typedef struct HookModifierData {
ModifierData modifier;
struct Object *object;
- char subtarget[32]; /* optional name of bone target */
-
float parentinv[4][4]; /* matrix making current transform unmodified */
float cent[3]; /* visualization of hook */
float falloff; /* if not zero, falloff is distance where influence zero */
@@ -642,6 +641,4 @@ typedef struct SimpleDeformModifierData {
coordinates or global coordinates of origin */
#define MOD_SIMPLEDEFORM_ORIGIN_LOCAL (1<<0)
-#define MOD_UVPROJECT_MAX 10
-
#endif
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
index 5696f82ab0d..625864c4888 100644
--- a/source/blender/makesdna/DNA_object_force.h
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -95,7 +95,7 @@ typedef struct PartDeflect {
typedef struct PTCacheMem {
struct PTCacheMem *next, *prev;
int frame, totpoint;
- unsigned int data_types, flag;
+ unsigned int data_types, rt;
int *index_array; /* quick access to stored points with index */
void *data[8]; /* BPHYS_TOT_DATA */
@@ -121,9 +121,6 @@ typedef struct PointCache {
char info[64];
char path[240]; /* file path */
struct ListBase mem_cache;
-
- struct PTCacheEdit *edit;
- void (*free_edit)(struct PTCacheEdit *edit); /* free callback */
} PointCache;
typedef struct SBVertex {
@@ -303,8 +300,8 @@ typedef struct SoftBody {
#define PTCACHE_OUTDATED 2
#define PTCACHE_SIMULATION_VALID 4
#define PTCACHE_BAKING 8
-//#define PTCACHE_BAKE_EDIT 16
-//#define PTCACHE_BAKE_EDIT_ACTIVE 32
+#define PTCACHE_BAKE_EDIT 16
+#define PTCACHE_BAKE_EDIT_ACTIVE 32
#define PTCACHE_DISK_CACHE 64
#define PTCACHE_QUICK_CACHE 128
#define PTCACHE_FRAMES_SKIPPED 256
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 19ef6f5be3b..bbc19d69966 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -54,10 +54,7 @@ struct FluidsimSettings;
struct ParticleSystem;
struct DerivedMesh;
struct SculptSession;
-struct bGPdata;
-
-/* Vertex Groups - Name Info */
typedef struct bDeformGroup {
struct bDeformGroup *next, *prev;
char name[32];
@@ -113,16 +110,14 @@ typedef struct Object {
struct bPose *pose;
void *data;
- struct bGPdata *gpd; /* Grease Pencil data */
-
ListBase constraintChannels; // XXX depreceated... old animation system
ListBase effect;
ListBase disp;
ListBase defbase;
ListBase modifiers; /* list of ModifierData structures */
- int mode; /* Local object mode */
- int restore_mode; /* Keep track of what mode to return to after toggling a mode */
+ /* For now just a flag for sculpt mode, eventually we make the other modes local too */
+ int mode, pad2;
/* materials */
struct Material **mat; /* material slots */
@@ -214,7 +209,7 @@ typedef struct Object {
short recalc; /* dependency flag */
float anisotropicFriction[3];
- ListBase constraints; /* object constraints */
+ ListBase constraints;
ListBase nlastrips; // XXX depreceated... old animation system
ListBase hooks;
ListBase particlesystem; /* particle systems */
@@ -239,11 +234,10 @@ typedef struct Object {
unsigned int state; /* bit masks of game controllers that are active */
unsigned int init_state; /* bit masks of initial state as recorded by the users */
- int pad2;
+ int restore_mode; /* Keep track of what mode to return to after edit mode exits */
ListBase gpulamp; /* runtime, for lamps only */
ListBase *duplilist; /* only for internal use by RNA API functions. To get dupli list, use object_duplilist instead */
- ListBase pc_ids;
} Object;
/* Warning, this is not used anymore because hooks are now modifiers */
@@ -526,16 +520,16 @@ extern Object workob;
#define OB_LOCK_SCALE 448
/* ob->mode */
-typedef enum ObjectMode {
- OB_MODE_OBJECT = 0,
- OB_MODE_EDIT = 1,
- OB_MODE_SCULPT = 2,
- OB_MODE_VERTEX_PAINT = 4,
- OB_MODE_WEIGHT_PAINT = 8,
- OB_MODE_TEXTURE_PAINT = 16,
- OB_MODE_PARTICLE_EDIT = 32,
- OB_MODE_POSE = 64
-} ObjectMode;
+#define OB_MODE_OBJECT 0
+#define OB_MODE_EDIT 1
+#define OB_MODE_SCULPT 2
+#define OB_MODE_VERTEX_PAINT 4
+#define OB_MODE_WEIGHT_PAINT 8
+#define OB_MODE_TEXTURE_PAINT 16
+#define OB_MODE_PARTICLE_EDIT 32
+#define OB_MODE_POSE 64
+
+/* ob->softflag in DNA_object_force.h */
#ifdef __cplusplus
}
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index d4dc3df0965..925fd31328d 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -33,7 +33,6 @@
#define DNA_PARTICLE_TYPES_H
#include "DNA_ID.h"
-#include "DNA_boid_types.h"
struct AnimData;
@@ -53,14 +52,6 @@ typedef struct ParticleKey { /* when changed update size of struct to copy_parti
float time; /* when this key happens */
} ParticleKey;
-typedef struct BoidParticle {
- struct Object *ground;
- struct BoidData data;
- float gravity[3];
- float wander[3];
- float rt;
-} BoidParticle;
-
/* Child particles are created around or between parent particles */
typedef struct ChildParticle {
int num, parent; /* num is face index on the final derived mesh */
@@ -78,34 +69,42 @@ typedef struct ParticleTarget {
float time, duration;
} ParticleTarget;
+/* Everything that's non dynamic for a particle: */
typedef struct ParticleData {
- ParticleKey state; /* current global coordinates */
+ struct Object *stick_ob;/* object that particle sticks to when dead */
+
+ ParticleKey state; /* normally current global coordinates or */
+ /* in sticky object space if dead & sticky */
ParticleKey prev_state; /* previous state */
-
+
HairKey *hair; /* hair vertices */
- ParticleKey *keys; /* keyed keys */
+ ParticleKey *keys; /* keyed states */
- BoidParticle *boid; /* boids data */
+ struct BoidData *boid; /* boids data */
- int totkey; /* amount of hair or keyed keys*/
+ float r_rot[4]; /* random values */
+ float r_ave[3],r_ve[3];
+
+ float fuv[4], foffset; /* coordinates on face/edge number "num" and depth along*/
+ /* face normal for volume emission */
float time, lifetime; /* dietime is not nescessarily time+lifetime as */
float dietime; /* particles can die unnaturally (collision) */
+ float size, sizemul; /* size and multiplier so that we can update size when ever */
+
int num; /* index to vert/edge/face */
int num_dmcache; /* index to derived mesh data (face) to avoid slow lookups */
- float fuv[4], foffset; /* coordinates on face/edge number "num" and depth along*/
- /* face normal for volume emission */
-
- float size; /* size and multiplier so that we can update size when ever */
+ int totkey;
+ int bpi; /* softbody body point start index */
short flag;
- short alive; /* the life state of a particle */
+ short alive; /* the life state of a particle */
short loop; /* how many times particle life has looped */
- short rt;
+ short rt2;
} ParticleData;
typedef struct ParticleSettings {
@@ -195,8 +194,8 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
ParticleData *particles; /* (parent) particles */
ChildParticle *child; /* child particles */
- struct PTCacheEdit *edit; /* particle editmode (runtime) */
- void (*free_edit)(struct PTCacheEdit *edit); /* free callback */
+ struct ParticleEdit *edit; /* particle editmode (runtime) */
+ void (*free_edit)(struct ParticleSystem *sys); /* free callback */
struct ParticleCacheKey **pathcache; /* path cache (runtime) */
struct ParticleCacheKey **childcache; /* child cache (runtime) */
@@ -259,7 +258,7 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
#define PART_TRAND 128
#define PART_EDISTR 256 /* particle/face from face areas */
-//#define PART_STICKY 512 /*collided particles can stick to collider*/
+#define PART_STICKY 512 /*collided particles can stick to collider*/
#define PART_DIE_ON_COL (1<<12)
#define PART_SIZE_DEFL (1<<13) /* swept sphere deflections */
#define PART_ROT_DYN (1<<14) /* dynamic rotation */
@@ -410,7 +409,7 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
/* psys->flag */
#define PSYS_CURRENT 1
-#define PSYS_GLOBAL_HAIR 2
+//#define PSYS_BAKING 2
//#define PSYS_BAKE_UI 4
#define PSYS_KEYED_TIMING 8
#define PSYS_ENABLED 16 /* deprecated */
@@ -420,15 +419,19 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
#define PSYS_DELETE 256 /* remove particlesystem as soon as possible */
#define PSYS_HAIR_DONE 512
#define PSYS_KEYED 1024
-//#define PSYS_EDITED 2048
+#define PSYS_EDITED 2048
//#define PSYS_PROTECT_CACHE 4096
#define PSYS_DISABLED 8192
/* pars->flag */
#define PARS_UNEXIST 1
#define PARS_NO_DISP 2
-//#define PARS_STICKY 4
-#define PARS_REKEY 8
+#define PARS_STICKY 4
+#define PARS_TRANSFORM 8
+#define PARS_HIDE 16
+#define PARS_TAG 32
+#define PARS_REKEY 64
+#define PARS_EDIT_RECALC 128
/* pars->alive */
#define PARS_KILLED 0
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 73afc3d1a53..4a3d555ca33 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -47,8 +47,6 @@ struct Text;
struct bNodeTree;
struct AnimData;
struct Editing;
-struct SceneStats;
-struct bGPdata;
typedef struct Base {
struct Base *next, *prev;
@@ -456,11 +454,8 @@ typedef struct Paint {
Brush **brushes;
int active_brush_index, brush_count;
- /* WM Paint cursor */
+ /* WM handle */
void *paint_cursor;
- unsigned char paint_cursor_col[4];
-
- int pad;
} Paint;
typedef struct ImagePaintSettings {
@@ -488,15 +483,10 @@ typedef struct ParticleEditSettings {
ParticleBrushData brush[7]; /* 7 = PE_TOT_BRUSH */
void *paintcursor; /* runtime */
- float emitterdist, rt;
-
- int selectmode;
- int edittype;
+ float emitterdist;
+ int draw_timed;
- int draw_step, fade_frames;
-
- struct Scene *scene;
- struct Object *object;
+ int selectmode, pad;
} ParticleEditSettings;
typedef struct TransformOrientation {
@@ -507,6 +497,9 @@ typedef struct TransformOrientation {
typedef struct Sculpt {
Paint paint;
+
+ /* WM handle */
+ void *cursor;
/* For rotating around a pivot point */
float pivot[3];
@@ -724,9 +717,7 @@ typedef struct Scene {
/* Units */
struct UnitSettings unit;
-
- /* Grease Pencil */
- struct bGPdata *gpd;
+
} Scene;
@@ -1047,10 +1038,9 @@ typedef enum SculptFlags {
#define PE_LOCK_FIRST 2
#define PE_DEFLECT_EMITTER 4
#define PE_INTERPOLATE_ADDED 8
-#define PE_DRAW_PART 16
+#define PE_SHOW_CHILD 16
+#define PE_SHOW_TIME 32
#define PE_X_MIRROR 64
-#define PE_FADE_TIME 128
-#define PE_AUTO_VELOCITY 256
/* toolsetting->particle brushtype */
#define PE_BRUSH_NONE -1
@@ -1059,15 +1049,11 @@ typedef enum SculptFlags {
#define PE_BRUSH_LENGTH 2
#define PE_BRUSH_PUFF 3
#define PE_BRUSH_ADD 4
-#define PE_BRUSH_SMOOTH 5
+#define PE_BRUSH_WEIGHT 5
+#define PE_BRUSH_SMOOTH 6
/* this must equal ParticleEditSettings.brush array size */
-#define PE_TOT_BRUSH 6
-
-/* tooksettings->particle edittype */
-#define PE_TYPE_PARTICLES 0
-#define PE_TYPE_SOFTBODY 1
-#define PE_TYPE_CLOTH 2
+#define PE_TOT_BRUSH 7
/* toolsettings->retopo_mode */
#define RETOPO 1
diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h
index cc998de7eec..8b29ce1338d 100644
--- a/source/blender/makesdna/DNA_sensor_types.h
+++ b/source/blender/makesdna/DNA_sensor_types.h
@@ -178,9 +178,6 @@ typedef struct bJoystickSensor {
/* bMouseSensor->type: uses blender event defines */
-/* bMouseSensor->flag: only pulse for now */
-#define SENS_MOUSE_FOCUS_PULSE 1
-
/* propertysensor->type */
#define SENS_PROP_EQUAL 0
#define SENS_PROP_NEQUAL 1
diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h
index 4e4714cdaa1..c7f49d3ddd2 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -30,7 +30,7 @@
#define DNA_SMOKE_TYPES_H
/* flags */
-#define MOD_SMOKE_HIGHRES (1<<1) /* enable high resolution */
+#define MOD_SMOKE_HIGHRES (1<<1) /* compute high resolution */
#define MOD_SMOKE_DISSOLVE (1<<2) /* let smoke dissolve */
#define MOD_SMOKE_DISSOLVE_LOG (1<<3) /* using 1/x for dissolve */
@@ -39,7 +39,15 @@
#define MOD_SMOKE_NOISEFFT (1<<1)
#define MOD_SMOKE_NOISECURL (1<<2)
/* viewsettings */
-#define MOD_SMOKE_VIEW_SHOWBIG (1<<0)
+#define MOD_SMOKE_VIEW_X (1<<0)
+#define MOD_SMOKE_VIEW_Y (1<<1)
+#define MOD_SMOKE_VIEW_Z (1<<2)
+#define MOD_SMOKE_VIEW_SMALL (1<<3)
+#define MOD_SMOKE_VIEW_BIG (1<<4)
+#define MOD_SMOKE_VIEW_CHANGETOBIG (1<<5)
+#define MOD_SMOKE_VIEW_REDRAWNICE (1<<6)
+#define MOD_SMOKE_VIEW_REDRAWALL (1<<7)
+#define MOD_SMOKE_VIEW_USEBIG (1<<8)
typedef struct SmokeDomainSettings {
struct SmokeModifierData *smd; /* for fast RNA access */
@@ -47,14 +55,16 @@ typedef struct SmokeDomainSettings {
struct Group *fluid_group;
struct Group *eff_group; // effector group for e.g. wind force
struct Group *coll_group; // collision objects group
- struct WTURBULENCE *wt; // WTURBULENCE object, if active
- struct GPUTexture *tex;
- struct GPUTexture *tex_wt;
- struct GPUTexture *tex_shadow;
- float *shadow;
+ unsigned int *bind;
+ float *tvox;
+ float *tray;
+ float *tvoxbig;
+ float *traybig;
float p0[3]; /* start point of BB */
float p1[3]; /* end point of BB */
float dx; /* edge length of one cell */
+ float firstframe;
+ float lastframe;
float omega; /* smoke color - from 0 to 1 */
float temp; /* fluid temperature */
float tempAmb; /* ambient temperature */
@@ -64,17 +74,14 @@ typedef struct SmokeDomainSettings {
int amplify; /* wavelet amplification */
int maxres; /* longest axis on the BB gets this resolution assigned */
int flags; /* show up-res or low res, etc */
- int pad;
+ int visibility; /* how many billboards to show (every 2nd, 3rd, 4th,..) */
int viewsettings;
+ int max_textures;
short noise; /* noise type: wave, curl, anisotropic */
short diss_percent;
int diss_speed;/* in frames */
float strength;
- int res_wt[3];
- float dx_wt;
- int v3dnum;
- struct PointCache *point_cache[2]; /* definition is in DNA_object_force.h */
- struct ListBase ptcaches[2];
+ struct WTURBULENCE *wt; // WTURBULENCE object, if active
} SmokeDomainSettings;
diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h
index 55b48e4aacd..5f6ebf60865 100644
--- a/source/blender/makesdna/DNA_sound_types.h
+++ b/source/blender/makesdna/DNA_sound_types.h
@@ -70,59 +70,57 @@ typedef struct Sound3D
typedef struct bSound {
ID id;
-
- /**
- * The path to the sound file.
- */
char name[160];
-
- /**
- * The packed file.
- */
+ void *stream; // AUD_XXX deprecated
struct PackedFile *packedfile;
-
+ struct PackedFile *newpackedfile; // AUD_XXX deprecated
+ void *snd_sound; // AUD_XXX used for AUD_Sound now
+ struct Ipo *ipo; // AUD_XXX deprecated
+ float volume, panning; // AUD_XXX deprecated
/**
- * The handle for audaspace.
+ * Sets the rollofffactor. The rollofffactor is a per-Source parameter
+ * the application can use to increase or decrease the range of a source
+ * by decreasing or increasing the attenuation, respectively. The default
+ * value is 1. The implementation is free to optimize for a rollofffactor
+ * value of 0, which indicates that the application does not wish any
+ * distance attenuation on the respective Source.
*/
- void *handle;
-
+ float attenuation; // AUD_XXX deprecated
+ float pitch; // AUD_XXX deprecated
/**
- * Deprecated; used for loading pre 2.5 files.
+ * min_gain indicates the minimal gain which is always guaranteed for this sound
*/
- struct PackedFile *newpackedfile;
- struct Ipo *ipo;
- float volume;
- float attenuation;
- float pitch;
- float min_gain;
- float max_gain;
- float distance;
- int flags;
-
-/** currently int type;
- struct bSound *child_sound;*/
-
+ float min_gain; // AUD_XXX deprecated
/**
- * Whether the sound has been changed and must be restarted if playing.
+ * max_gain indicates the maximal gain which is always guaranteed for this sound
*/
- int changed;
-
+ float max_gain; // AUD_XXX deprecated
/**
- * The audaspace handle for cache.
+ * Sets the referencedistance at which the listener will experience gain.
*/
+ float distance; // AUD_XXX deprecated
+ int flags; // AUD_XXX deprecated
+ int streamlen; // AUD_XXX deprecated
+ char channels; // AUD_XXX deprecated
+ char highprio; // AUD_XXX deprecated
+ char pad[10]; // AUD_XXX deprecated
+
+ // AUD_XXX NEW
+ int type;
+ int changed;
+ struct bSound *child_sound;
void *cache;
-/** XXX unused currently // SOUND_TYPE_LIMITER
- float start, end;*/
+ // SOUND_TYPE_LIMITER
+ float start, end;
} bSound;
-/* XXX unused currently
typedef enum eSound_Type {
SOUND_TYPE_INVALID = -1,
SOUND_TYPE_FILE = 0,
SOUND_TYPE_BUFFER,
SOUND_TYPE_LIMITER
-} eSound_Type;*/
+} eSound_Type;
/* spacesound->flag */
#define SND_DRAWFRAMES 1
@@ -144,7 +142,18 @@ typedef struct SpaceSound {
int pad2;
} SpaceSound;
+
+#define SOUND_CHANNELS_STEREO 0
+#define SOUND_CHANNELS_LEFT 1
+#define SOUND_CHANNELS_RIGHT 2
+
+#define SOUND_FLAGS_LOOP (1 << 0)
+#define SOUND_FLAGS_FIXED_VOLUME (1 << 1)
+#define SOUND_FLAGS_FIXED_PANNING (1 << 2)
#define SOUND_FLAGS_3D (1 << 3)
+#define SOUND_FLAGS_BIDIRECTIONAL_LOOP (1 << 4)
+#define SOUND_FLAGS_PRIORITY (1 << 5)
+#define SOUND_FLAGS_SEQUENCE (1 << 6)
/* to DNA_sound_types.h*/
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 6fdc3a7787b..37f28cfeaa6 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -720,7 +720,6 @@ enum FileSortTypeE {
#define SIPO_DRAWTIME (1<<4)
#define SIPO_SELCUVERTSONLY (1<<5)
#define SIPO_DRAWNAMES (1<<6)
-#define SIPO_SLIDERS (1<<7)
/* SpaceIpo->mode (Graph Editor Mode) */
enum {
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index c13c0522004..0054e885a21 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -128,55 +128,6 @@ typedef struct EnvMap {
short recalc, lastsize;
} EnvMap;
-typedef struct PointDensity {
- short flag;
-
- short falloff_type;
- float falloff_softness;
- float radius;
- short source;
- short color_source;
- int totpoints;
-
- int pdpad;
-
- struct Object *object; /* for 'Object' or 'Particle system' type - source object */
- struct ParticleSystem *psys;
- short psys_cache_space; /* cache points in worldspace, object space, ... ? */
- short ob_cache_space; /* cache points in worldspace, object space, ... ? */
-
- short pdpad2[2];
-
- void *point_tree; /* the acceleration tree containing points */
- float *point_data; /* dynamically allocated extra for extra information, like particle age */
-
- float noise_size;
- short noise_depth;
- short noise_influence;
- short noise_basis;
- short pdpad3[3];
- float noise_fac;
-
- float speed_scale;
- struct ColorBand *coba; /* for time -> color */
-
-} PointDensity;
-
-typedef struct VoxelData {
- int resol[3];
- int interp_type;
- short file_format;
- short flag;
- int pad;
-
- struct Object *object; /* for rendering smoke sims */
- float int_multiplier;
- int still_frame;
- char source_path[240];
- float *dataset;
-
-} VoxelData;
-
typedef struct Tex {
ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
@@ -230,8 +181,6 @@ typedef struct Tex {
struct ColorBand *coba;
struct EnvMap *env;
struct PreviewImage * preview;
- struct PointDensity *pd;
- struct VoxelData *vd;
char use_nodes;
char pad[7];
@@ -271,8 +220,6 @@ typedef struct TexMapping {
#define TEX_MUSGRAVE 11
#define TEX_VORONOI 12
#define TEX_DISTNOISE 13
-#define TEX_POINTDENSITY 14
-#define TEX_VOXELDATA 15
/* musgrave stype */
#define TEX_MFRACTAL 0
@@ -448,8 +395,6 @@ typedef struct TexMapping {
#define MTEX_BLEND_VAL 12
#define MTEX_BLEND_COLOR 13
#define MTEX_NUM_BLENDTYPES 14
-#define MTEX_SOFT_LIGHT 15
-#define MTEX_LIN_LIGHT 16
/* brush_map_mode */
#define MTEX_MAP_MODE_FIXED 0
@@ -472,62 +417,5 @@ typedef struct TexMapping {
#define ENV_NORMAL 1
#define ENV_OSA 2
-/* **************** PointDensity ********************* */
-
-/* source */
-#define TEX_PD_PSYS 0
-#define TEX_PD_OBJECT 1
-#define TEX_PD_FILE 2
-
-/* falloff_type */
-#define TEX_PD_FALLOFF_STD 0
-#define TEX_PD_FALLOFF_SMOOTH 1
-#define TEX_PD_FALLOFF_SOFT 2
-#define TEX_PD_FALLOFF_CONSTANT 3
-#define TEX_PD_FALLOFF_ROOT 4
-
-/* psys_cache_space */
-#define TEX_PD_OBJECTLOC 0
-#define TEX_PD_OBJECTSPACE 1
-#define TEX_PD_WORLDSPACE 2
-
-/* flag */
-#define TEX_PD_TURBULENCE 1
-
-
-/* noise_influence */
-#define TEX_PD_NOISE_STATIC 0
-#define TEX_PD_NOISE_VEL 1
-#define TEX_PD_NOISE_AGE 2
-#define TEX_PD_NOISE_TIME 3
-
-/* color_source */
-#define TEX_PD_COLOR_CONSTANT 0
-#define TEX_PD_COLOR_PARTAGE 1
-#define TEX_PD_COLOR_PARTSPEED 2
-#define TEX_PD_COLOR_PARTVEL 3
-
-#define POINT_DATA_VEL 1
-#define POINT_DATA_LIFE 2
-
-/******************** Voxel Data *****************************/
-/* flag */
-#define TEX_VD_STILL 1
-
-/* interpolation */
-#define TEX_VD_NEARESTNEIGHBOR 0
-#define TEX_VD_LINEAR 1
-#define TEX_VD_QUADRATIC 2
-#define TEX_VD_TRICUBIC_CATROM 3
-#define TEX_VD_TRICUBIC_BSPLINE 4
-#define TEX_VD_TRICUBIC_SLOW 5
-
-/* file format */
-#define TEX_VD_BLENDERVOXEL 0
-#define TEX_VD_RAW_8BIT 1
-#define TEX_VD_RAW_16BIT 2
-#define TEX_VD_IMAGE_SEQUENCE 3
-#define TEX_VD_SMOKE 4
-
#endif
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 826eea43a4d..c2314e1e3a2 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -369,7 +369,6 @@ extern UserDef U; /* from blenkernel blender.c */
#define USER_RELPATHS (1 << 20)
#define USER_DRAGIMMEDIATE (1 << 21)
#define USER_DONT_DOSCRIPTLINKS (1 << 22)
-#define USER_FILENOUI (1 << 23)
/* viewzom */
#define USER_ZOOM_CONT 0
@@ -440,7 +439,6 @@ extern UserDef U; /* from blenkernel blender.c */
#define USER_DUP_TEX (1 << 8)
#define USER_DUP_ARM (1 << 9)
#define USER_DUP_ACT (1 << 10)
-#define USER_DUP_PSYS (1 << 11)
/* gameflags */
#define USER_DEPRECATED_FLAG 1
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 10f83c8b9ec..7d03bbec1ee 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -285,7 +285,6 @@ typedef struct wmOperator {
ListBase macro; /* list of operators, can be a tree */
struct wmOperator *opm; /* current running macro, not saved */
- short flag, pad[3];
} wmOperator;
@@ -296,9 +295,6 @@ typedef struct wmOperator {
/* add this flag if the event should pass through */
#define OPERATOR_PASS_THROUGH 8
-/* wmOperator flag */
-#define OPERATOR_REPORT_FREE 1
-
/* ************** wmEvent ************************ */
/* for read-only rna access, dont save this */
diff --git a/source/blender/makesdna/SConscript b/source/blender/makesdna/SConscript
index c3d39783b00..f91cf166f62 100644
--- a/source/blender/makesdna/SConscript
+++ b/source/blender/makesdna/SConscript
@@ -8,4 +8,4 @@ objs += o
incs = '#/intern/guardedalloc .'
-env.BlenderLib ( 'bf_dna', objs, Split(incs), [], libtype=['core','player'], priority = [215,200] )
+env.BlenderLib ( 'bf_dna', objs, Split(incs), [], libtype=['core','player'], priority = [215, 215] )
diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt
index 1fb63156f26..6024799f852 100644
--- a/source/blender/makesdna/intern/CMakeLists.txt
+++ b/source/blender/makesdna/intern/CMakeLists.txt
@@ -33,9 +33,9 @@ ADD_EXECUTABLE(makesdna ${SRC} ${INC_FILES})
# Output dna.c
ADD_CUSTOM_COMMAND(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
- COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/
- DEPENDS makesdna
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
+ COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/
+ DEPENDS makesdna
)
# Build bf_dna library
diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript
index 1479af1055b..9089718da83 100644
--- a/source/blender/makesdna/intern/SConscript
+++ b/source/blender/makesdna/intern/SConscript
@@ -34,9 +34,6 @@ if not USE_WINE:
if sys.platform != 'cygwin':
makesdna_tool.Append (CCFLAGS = cflags)
makesdna_tool.Append (CPPDEFINES = defines)
-makesdna_tool.Append( CFLAGS = env['CFLAGS'])
-makesdna_tool.Append( CCFLAGS = env['CCFLAGS'])
-makesdna_tool.Append( LINKFLAGS = env['PLATFORM_LINKFLAGS'])
targetdir = normpath(root_build_dir+'/lib')
if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 05f39d73842..e08bc734242 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -213,11 +213,6 @@ extern StructRNA RNA_GameSoftBodySettings;
extern StructRNA RNA_GameStringProperty;
extern StructRNA RNA_GameTimerProperty;
extern StructRNA RNA_GlowSequence;
-extern StructRNA RNA_GreasePencil;
-extern StructRNA RNA_GPencilLayer;
-extern StructRNA RNA_GPencilFrame;
-extern StructRNA RNA_GPencilStroke;
-extern StructRNA RNA_GPencilStrokePoint;
extern StructRNA RNA_Group;
extern StructRNA RNA_Header;
extern StructRNA RNA_HemiLamp;
@@ -326,8 +321,6 @@ extern StructRNA RNA_ParticleTarget;
extern StructRNA RNA_PluginSequence;
extern StructRNA RNA_PluginTexture;
extern StructRNA RNA_PointCache;
-extern StructRNA RNA_PointDensity;
-extern StructRNA RNA_PointDensityTexture;
extern StructRNA RNA_PointerProperty;
extern StructRNA RNA_Pose;
extern StructRNA RNA_PoseChannel;
@@ -505,8 +498,6 @@ extern StructRNA RNA_VertexGroup;
extern StructRNA RNA_VertexGroupElement;
extern StructRNA RNA_VertexPaint;
extern StructRNA RNA_VoronoiTexture;
-extern StructRNA RNA_VoxelData;
-extern StructRNA RNA_VoxelDataTexture;
extern StructRNA RNA_WaveModifier;
extern StructRNA RNA_Window;
extern StructRNA RNA_WindowManager;
@@ -585,9 +576,7 @@ PropertySubType RNA_property_subtype(PropertyRNA *prop);
PropertyUnit RNA_property_unit(PropertyRNA *prop);
int RNA_property_flag(PropertyRNA *prop);
-int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop);
-int RNA_property_multi_array_length(PointerRNA *ptr, PropertyRNA *prop, int dimension);
-int RNA_property_array_dimension(PointerRNA *ptr, PropertyRNA *prop, int length[]);
+int RNA_property_array_length(PropertyRNA *prop);
char RNA_property_array_item_char(PropertyRNA *prop, int index);
int RNA_property_string_maxlength(PropertyRNA *prop);
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h
index 42c5343dbff..33f5d7137b8 100644
--- a/source/blender/makesrna/RNA_define.h
+++ b/source/blender/makesrna/RNA_define.h
@@ -72,8 +72,6 @@ typedef void StructOrFunctionRNA;
PropertyRNA *RNA_def_boolean(StructOrFunctionRNA *cont, const char *identifier, int default_value, const char *ui_name, const char *ui_description);
PropertyRNA *RNA_def_boolean_array(StructOrFunctionRNA *cont, const char *identifier, int len, int *default_value, const char *ui_name, const char *ui_description);
-PropertyRNA *RNA_def_boolean_layer(StructOrFunctionRNA *cont, const char *identifier, int len, int *default_value, const char *ui_name, const char *ui_description);
-PropertyRNA *RNA_def_boolean_layer_member(StructOrFunctionRNA *cont, const char *identifier, int len, int *default_value, const char *ui_name, const char *ui_description);
PropertyRNA *RNA_def_boolean_vector(StructOrFunctionRNA *cont, const char *identifier, int len, int *default_value, const char *ui_name, const char *ui_description);
PropertyRNA *RNA_def_int(StructOrFunctionRNA *cont, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax);
@@ -90,15 +88,11 @@ void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc);
PropertyRNA *RNA_def_float(StructOrFunctionRNA *cont, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax);
PropertyRNA *RNA_def_float_vector(StructOrFunctionRNA *cont, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax);
PropertyRNA *RNA_def_float_color(StructOrFunctionRNA *cont, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax);
-PropertyRNA *RNA_def_float_matrix(StructOrFunctionRNA *cont, const char *identifier, int rows, int columns, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax);
+PropertyRNA *RNA_def_float_matrix(StructOrFunctionRNA *cont, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax);
PropertyRNA *RNA_def_float_rotation(StructOrFunctionRNA *cont, const char *identifier, int len, const float *default_value,
float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax);
PropertyRNA *RNA_def_float_array(StructOrFunctionRNA *cont, const char *identifier, int len, const float *default_value,
float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax);
- /*
-PropertyRNA *RNA_def_float_dynamic_array(StructOrFunctionRNA *cont, const char *identifier, float hardmin, float hardmax,
- const char *ui_name, const char *ui_description, float softmin, float softmax, unsigned int dimension, unsigned short dim_size[]);
- */
PropertyRNA *RNA_def_float_percentage(StructOrFunctionRNA *cont, const char *identifier, float default_value, float hardmin, float hardmax,
const char *ui_name, const char *ui_description, float softmin, float softmax);
@@ -128,8 +122,7 @@ void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname,
void RNA_def_property_flag(PropertyRNA *prop, int flag);
void RNA_def_property_clear_flag(PropertyRNA *prop, int flag);
-void RNA_def_property_array(PropertyRNA *prop, int length);
-void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, int length[]);
+void RNA_def_property_array(PropertyRNA *prop, int arraylength);
void RNA_def_property_range(PropertyRNA *prop, double min, double max);
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item);
@@ -153,7 +146,6 @@ void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive);
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *updatefunc);
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable);
-void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength);
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set);
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range);
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range);
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index ccf4b7a2db3..46d8c50caa6 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -38,12 +38,9 @@ extern EnumPropertyItem modifier_type_items[];
extern EnumPropertyItem constraint_type_items[];
extern EnumPropertyItem boidrule_type_items[];
-extern EnumPropertyItem beztriple_keyframe_type_items[];
extern EnumPropertyItem beztriple_handle_type_items[];
extern EnumPropertyItem beztriple_interpolation_mode_items[];
-extern EnumPropertyItem keyingset_path_grouping_items[];
-
extern EnumPropertyItem fmodifier_type_items[];
extern EnumPropertyItem nla_mode_extend_items[];
@@ -54,10 +51,6 @@ extern EnumPropertyItem event_type_items[];
extern EnumPropertyItem brush_sculpt_tool_items[];
-extern EnumPropertyItem unpack_method_items[];
-
-extern EnumPropertyItem object_type_items[];
-
#endif /* RNA_ENUM_TYPES */
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 393281693e8..51c3645fb03 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -111,10 +111,6 @@ typedef enum PropertySubType {
/* pointers */
PROP_NEVER_NULL = 30,
-
- /* booleans */
- PROP_LAYER = 40,
- PROP_LAYER_MEMBER = 41
} PropertySubType;
typedef enum PropertyFlag {
@@ -149,6 +145,9 @@ typedef enum PropertyFlag {
/* pointers */
PROP_ID_REFCOUNT = 64,
+ /* arrays */
+ PROP_DYNAMIC_ARRAY = 32768,
+
/* internal flags */
PROP_BUILTIN = 128,
PROP_EXPORT = 256,
@@ -156,8 +155,7 @@ typedef enum PropertyFlag {
PROP_IDPROPERTY = 1024,
PROP_RAW_ACCESS = 8192,
PROP_RAW_ARRAY = 16384,
- PROP_FREE_POINTERS = 32768,
- PROP_DYNAMIC = 131072 /* for dynamic arrays and function retvals of string type */
+ PROP_FREE_POINTERS = 32768
} PropertyFlag;
typedef struct CollectionPropertyIterator {
@@ -180,11 +178,11 @@ typedef struct CollectionPointerLink {
} CollectionPointerLink;
typedef enum RawPropertyType {
- PROP_RAW_INT, // XXX - abused for types that are not set, eg. MFace.verts, needs fixing.
- PROP_RAW_SHORT,
PROP_RAW_CHAR,
- PROP_RAW_DOUBLE,
- PROP_RAW_FLOAT
+ PROP_RAW_SHORT,
+ PROP_RAW_INT,
+ PROP_RAW_FLOAT,
+ PROP_RAW_DOUBLE
} RawPropertyType;
typedef struct RawArray {
diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript
index 845abf636e2..80abd4fda61 100644
--- a/source/blender/makesrna/SConscript
+++ b/source/blender/makesrna/SConscript
@@ -37,7 +37,4 @@ if env['WITH_BF_LCMS']:
if env['WITH_BF_GAMEENGINE']:
defs.append('GAMEBLENDER=1')
-if env['BF_UNIT_TEST']:
- defs.append('UNIT_TEST')
-
-env.BlenderLib ( 'bf_rna', objs, Split(incs), defines=defs, libtype=['core','player'], priority = [165,20] )
+env.BlenderLib ( 'bf_rna', objs, Split(incs), defines=defs, libtype=['core'], priority = [195] )
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 709c5d017ec..152f4031b91 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -32,70 +32,58 @@ LIST(REMOVE_ITEM DEFSRC ${APISRC})
STRING(REGEX REPLACE "rna_([a-zA-Z0-9_-]*).c" "${CMAKE_CURRENT_BINARY_DIR}/rna_\\1_gen.c" GENSRC "${DEFSRC}")
SET(SRC
- makesrna.c
- rna_define.c
- ${DEFSRC}
- ${APISRC}
- ../../../../intern/guardedalloc/intern/mallocn.c
- ../../../../intern/guardedalloc/intern/mmap_win.c)
+ makesrna.c
+ rna_define.c
+ ${DEFSRC}
+ ${APISRC}
+ ../../../../intern/guardedalloc/intern/mallocn.c
+ ../../../../intern/guardedalloc/intern/mmap_win.c)
INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../windowmanager ../../editors/include ../../imbuf ../../render/extern/include .)
FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
IF(WITH_GAMEENGINE)
- ADD_DEFINITIONS(-DGAMEBLENDER)
+ ADD_DEFINITIONS(-DGAMEBLENDER)
ENDIF(WITH_GAMEENGINE)
IF(WITH_OPENEXR)
- ADD_DEFINITIONS(-DWITH_OPENEXR)
+ ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
IF(WITH_OPENJPEG)
- ADD_DEFINITIONS(-DWITH_OPENJPEG)
+ ADD_DEFINITIONS(-DWITH_OPENJPEG)
ENDIF(WITH_OPENJPEG)
IF(WITH_DDS)
- ADD_DEFINITIONS(-DWITH_DDS)
+ ADD_DEFINITIONS(-DWITH_DDS)
ENDIF(WITH_DDS)
IF(WITH_QUICKTIME)
- ADD_DEFINITIONS(-DWITH_QUICKTIME)
+ ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
IF(WITH_FFMPEG)
- SET(INC ${INC} ${FFMPEG_INC})
- ADD_DEFINITIONS(-DWITH_FFMPEG)
+ SET(INC ${INC} ${FFMPEG_INC})
+ ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
IF(NOT WITH_ELBEEM)
- ADD_DEFINITIONS(-DDISABLE_ELBEEM)
+ ADD_DEFINITIONS(-DDISABLE_ELBEEM)
ENDIF(NOT WITH_ELBEEM)
IF(WITH_FFTW3)
- ADD_DEFINITIONS(-DFFTW3=1)
+ ADD_DEFINITIONS(-DFFTW3=1)
ENDIF(WITH_FFTW3)
-IF(WITH_SDL)
- ADD_DEFINITIONS(-DWITH_SDL)
-ENDIF(WITH_SDL)
-
-IF(WITH_OPENAL)
- ADD_DEFINITIONS(-DWITH_OPENAL)
-ENDIF(WITH_OPENAL)
-
-IF(WITH_JACK)
- ADD_DEFINITIONS(-DWITH_JACK)
-ENDIF(WITH_JACK)
-
# Build makesrna executable
ADD_EXECUTABLE(makesrna ${SRC} ${INC_FILES})
TARGET_LINK_LIBRARIES(makesrna bf_dna)
# Output rna_*_gen.c
ADD_CUSTOM_COMMAND(
- OUTPUT ${GENSRC}
- COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesrna ${CMAKE_CURRENT_BINARY_DIR}/
- DEPENDS makesrna
+ OUTPUT ${GENSRC}
+ COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesrna ${CMAKE_CURRENT_BINARY_DIR}/
+ DEPENDS makesrna
)
# Build bf_rna
diff --git a/source/blender/makesrna/intern/Makefile b/source/blender/makesrna/intern/Makefile
index 4a4e41edd15..c7cc6e7a4bf 100644
--- a/source/blender/makesrna/intern/Makefile
+++ b/source/blender/makesrna/intern/Makefile
@@ -77,18 +77,6 @@ ifeq ($(WITH_QUICKTIME), true)
CPPFLAGS += -DWITH_QUICKTIME
endif
-ifeq ($(WITH_SDL),true)
- CPPFLAGS += -DWITH_SDL
-endif
-
-ifeq ($(WITH_JACK),true)
- CPPFLAGS += -DWITH_JACK
-endif
-
-ifeq ($(WITH_OPENAL),true)
- CPPFLAGS += -DWITH_OPENAL
-endif
-
ifeq ($(OS),windows)
# Windows needs these extra libs because of winstuff... It is not
# _really_ needed, but it is the easiest fix for now. If you have
diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript
index 569f0547731..1a3687af51e 100644
--- a/source/blender/makesrna/intern/SConscript
+++ b/source/blender/makesrna/intern/SConscript
@@ -6,7 +6,7 @@ def normpath(path):
return os.path.abspath(os.path.normpath(path))
Import ('env')
-cflags = ['-Wall']
+cflags = '-Wall'
defines = []
root_build_dir=normpath(env['BF_BUILDDIR'])
@@ -62,18 +62,6 @@ if env['WITH_BF_GAMEENGINE']:
if env['WITH_BF_FFTW3']:
defs.append('FFTW3=1')
-if env['WITH_BF_SDL']:
- defs.append('WITH_SDL')
-
-if env['WITH_BF_OPENAL']:
- defs.append('WITH_OPENAL')
-
-if env['WITH_BF_JACK']:
- defs.append('WITH_JACK')
-
-if env['BF_UNIT_TEST']:
- defs.append('UNIT_TEST')
-
makesrna_tool.Append(CPPDEFINES=defs)
makesrna_tool.Append (CPPPATH = Split(incs))
@@ -99,10 +87,6 @@ if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
makesrna_tool.Append (LIBPATH = libdir)
-makesrna_tool.Append( CFLAGS = env['CFLAGS'])
-makesrna_tool.Append( CCFLAGS = env['CCFLAGS'])
-makesrna_tool.Append( LINKFLAGS = env['PLATFORM_LINKFLAGS'])
-
if env['BF_PROFILE']:
makesrna_tool.Append (LINKFLAGS = env['BF_PROFILE_FLAGS'])
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 0294107466a..baf820e7249 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -306,10 +306,11 @@ static void rna_int_print(FILE *f, int num)
static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
{
char *func;
+ int i;
if(prop->flag & PROP_IDPROPERTY)
return NULL;
-
+
if(!manualfunc) {
if(!dp->dnastructname || !dp->dnaname) {
fprintf(stderr, "rna_def_property_get_func: %s.%s has no valid dna info.\n", srna->identifier, prop->identifier);
@@ -372,11 +373,8 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
break;
}
default:
- if(prop->arraydimension) {
- if(prop->flag & PROP_DYNAMIC)
- fprintf(f, "void %s(PointerRNA *ptr, %s values[])\n", func, rna_type_type(prop));
- else
- fprintf(f, "void %s(PointerRNA *ptr, %s values[%d])\n", func, rna_type_type(prop), prop->totarraylength);
+ if(prop->arraylength) {
+ fprintf(f, "void %s(PointerRNA *ptr, %s values[%d])\n", func, rna_type_type(prop), prop->arraylength);
fprintf(f, "{\n");
if(manualfunc) {
@@ -385,38 +383,27 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
else {
rna_print_data_get(f, dp);
- if(prop->flag & PROP_DYNAMIC) {
- char *lenfunc= rna_alloc_function_name(srna->identifier, prop->identifier, "get_length");
- fprintf(f, " int i, arraylen[RNA_MAX_ARRAY_DIMENSION];\n");
- fprintf(f, " int len= %s(ptr, arraylen);\n\n", lenfunc);
- fprintf(f, " for(i=0; i<len; i++) {\n");
- MEM_freeN(lenfunc);
- }
- else {
- fprintf(f, " int i;\n\n");
- fprintf(f, " for(i=0; i<%d; i++) {\n", prop->totarraylength);
- }
-
- if(dp->dnaarraylength == 1) {
- if(prop->type == PROP_BOOLEAN && dp->booleanbit)
- fprintf(f, " values[i]= (%s(data->%s & (%d<<i)) != 0);\n", (dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit);
- else
- fprintf(f, " values[i]= (%s)%s((&data->%s)[i]);\n", rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnaname);
- }
- else {
- if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
- fprintf(f, " values[i]= (%s(data->%s[i] & ", (dp->booleannegative)? "!": "", dp->dnaname);
- rna_int_print(f, dp->booleanbit);
- fprintf(f, ") != 0);\n");
+ for(i=0; i<prop->arraylength; i++) {
+ if(dp->dnaarraylength == 1) {
+ if(prop->type == PROP_BOOLEAN && dp->booleanbit)
+ fprintf(f, " values[%d]= (%s(data->%s & (%d<<%d)) != 0);\n", i, (dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit, i);
+ else
+ fprintf(f, " values[%d]= (%s)%s((&data->%s)[%d]);\n", i, rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnaname, i);
+ }
+ else {
+ if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
+ fprintf(f, " values[%d]= (%s(data->%s[%d] & ", i, (dp->booleannegative)? "!": "", dp->dnaname, i);
+ rna_int_print(f, dp->booleanbit);
+ fprintf(f, ") != 0);\n");
+ }
+ else if(rna_color_quantize(prop, dp))
+ fprintf(f, " values[%d]= (%s)(data->%s[%d]*(1.0f/255.0f));\n", i, rna_type_type(prop), dp->dnaname, i);
+ else if(dp->dnatype)
+ fprintf(f, " values[%d]= (%s)%s(((%s*)data->%s)[%d]);\n", i, rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnatype, dp->dnaname, i);
+ else
+ fprintf(f, " values[%d]= (%s)%s((data->%s)[%d]);\n", i, rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnaname, i);
}
- else if(rna_color_quantize(prop, dp))
- fprintf(f, " values[i]= (%s)(data->%s[i]*(1.0f/255.0f));\n", rna_type_type(prop), dp->dnaname);
- else if(dp->dnatype)
- fprintf(f, " values[i]= (%s)%s(((%s*)data->%s)[i]);\n", rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnatype, dp->dnaname);
- else
- fprintf(f, " values[i]= (%s)%s((data->%s)[i]);\n", rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnaname);
}
- fprintf(f, " }\n");
}
fprintf(f, "}\n\n");
}
@@ -451,13 +438,13 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
return func;
}
-static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
+static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array, int i)
{
if(prop->type == PROP_INT) {
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
if(iprop->hardmin != INT_MIN || iprop->hardmax != INT_MAX) {
- if(array) fprintf(f, "CLAMPIS(values[i], ");
+ if(array) fprintf(f, "CLAMPIS(values[%d], ", i);
else fprintf(f, "CLAMPIS(value, ");
rna_int_print(f, iprop->hardmin); fprintf(f, ", ");
rna_int_print(f, iprop->hardmax); fprintf(f, ");\n");
@@ -468,7 +455,7 @@ static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
if(fprop->hardmin != -FLT_MAX || fprop->hardmax != FLT_MAX) {
- if(array) fprintf(f, "CLAMPIS(values[i], ");
+ if(array) fprintf(f, "CLAMPIS(values[%d], ", i);
else fprintf(f, "CLAMPIS(value, ");
rna_float_print(f, fprop->hardmin); fprintf(f, ", ");
rna_float_print(f, fprop->hardmax); fprintf(f, ");\n");
@@ -477,7 +464,7 @@ static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
}
if(array)
- fprintf(f, "values[i];\n");
+ fprintf(f, "values[%d];\n", i);
else
fprintf(f, "value;\n");
}
@@ -485,6 +472,7 @@ static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, char *manualfunc)
{
char *func;
+ int i;
if(!(prop->flag & PROP_EDITABLE))
return NULL;
@@ -544,11 +532,8 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
break;
}
default:
- if(prop->arraydimension) {
- if(prop->flag & PROP_DYNAMIC)
- fprintf(f, "void %s(PointerRNA *ptr, const %s values[])\n", func, rna_type_type(prop));
- else
- fprintf(f, "void %s(PointerRNA *ptr, const %s values[%d])\n", func, rna_type_type(prop), prop->totarraylength);
+ if(prop->arraylength) {
+ fprintf(f, "void %s(PointerRNA *ptr, const %s values[%d])\n", func, rna_type_type(prop), prop->arraylength);
fprintf(f, "{\n");
if(manualfunc) {
@@ -557,49 +542,38 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
else {
rna_print_data_get(f, dp);
- if(prop->flag & PROP_DYNAMIC) {
- char *lenfunc= rna_alloc_function_name(srna->identifier, prop->identifier, "set_length");
- fprintf(f, " int i, arraylen[RNA_MAX_ARRAY_DIMENSION];\n");
- fprintf(f, " int len= %s(ptr, arraylen);\n\n", lenfunc);
- fprintf(f, " for(i=0; i<len; i++) {\n");
- MEM_freeN(lenfunc);
- }
- else {
- fprintf(f, " int i;\n\n");
- fprintf(f, " for(i=0; i<%d; i++) {\n", prop->totarraylength);
- }
-
- if(dp->dnaarraylength == 1) {
- if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
- fprintf(f, " if(%svalues[i]) data->%s |= (%d<<i);\n", (dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit);
- fprintf(f, " else data->%s &= ~(%d<<i);\n", dp->dnaname, dp->booleanbit);
- }
- else {
- fprintf(f, " (&data->%s)[i]= %s", dp->dnaname, (dp->booleannegative)? "!": "");
- rna_clamp_value(f, prop, 1);
- }
- }
- else {
- if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
- fprintf(f, " if(%svalues[i]) data->%s[i] |= ", (dp->booleannegative)? "!": "", dp->dnaname);
- rna_int_print(f, dp->booleanbit);
- fprintf(f, ";\n");
- fprintf(f, " else data->%s[i] &= ~", dp->dnaname);
- rna_int_print(f, dp->booleanbit);
- fprintf(f, ";\n");
- }
- else if(rna_color_quantize(prop, dp)) {
- fprintf(f, " data->%s[i]= FTOCHAR(values[i]);\n", dp->dnaname);
+ for(i=0; i<prop->arraylength; i++) {
+ if(dp->dnaarraylength == 1) {
+ if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
+ fprintf(f, " if(%svalues[%d]) data->%s |= (%d<<%d);\n", (dp->booleannegative)? "!": "", i, dp->dnaname, dp->booleanbit, i);
+ fprintf(f, " else data->%s &= ~(%d<<%d);\n", dp->dnaname, dp->booleanbit, i);
+ }
+ else {
+ fprintf(f, " (&data->%s)[%d]= %s", dp->dnaname, i, (dp->booleannegative)? "!": "");
+ rna_clamp_value(f, prop, 1, i);
+ }
}
else {
- if(dp->dnatype)
- fprintf(f, " ((%s*)data->%s)[i]= %s", dp->dnatype, dp->dnaname, (dp->booleannegative)? "!": "");
- else
- fprintf(f, " (data->%s)[i]= %s", dp->dnaname, (dp->booleannegative)? "!": "");
- rna_clamp_value(f, prop, 1);
+ if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
+ fprintf(f, " if(%svalues[%d]) data->%s[%d] |= ", (dp->booleannegative)? "!": "", i, dp->dnaname, i);
+ rna_int_print(f, dp->booleanbit);
+ fprintf(f, ";\n");
+ fprintf(f, " else data->%s[%d] &= ~", dp->dnaname, i);
+ rna_int_print(f, dp->booleanbit);
+ fprintf(f, ";\n");
+ }
+ else if(rna_color_quantize(prop, dp)) {
+ fprintf(f, " data->%s[%d]= FTOCHAR(values[%d]);\n", dp->dnaname, i, i);
+ }
+ else {
+ if(dp->dnatype)
+ fprintf(f, " ((%s*)data->%s)[%d]= %s", dp->dnatype, dp->dnaname, i, (dp->booleannegative)? "!": "");
+ else
+ fprintf(f, " (data->%s)[%d]= %s", dp->dnaname, i, (dp->booleannegative)? "!": "");
+ rna_clamp_value(f, prop, 1, i);
+ }
}
}
- fprintf(f, " }\n");
}
fprintf(f, "}\n\n");
}
@@ -628,7 +602,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
}
else {
fprintf(f, " data->%s= %s", dp->dnaname, (dp->booleannegative)? "!": "");
- rna_clamp_value(f, prop, 0);
+ rna_clamp_value(f, prop, 0, 0);
}
}
fprintf(f, "}\n\n");
@@ -845,7 +819,7 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
case PROP_BOOLEAN: {
BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
- if(!prop->arraydimension) {
+ if(!prop->arraylength) {
if(!bprop->get && !bprop->set && !dp->booleanbit)
rna_set_raw_property(dp, prop);
@@ -861,7 +835,7 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
case PROP_INT: {
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
- if(!prop->arraydimension) {
+ if(!prop->arraylength) {
if(!iprop->get && !iprop->set)
rna_set_raw_property(dp, prop);
@@ -880,7 +854,7 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
case PROP_FLOAT: {
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
- if(!prop->arraydimension) {
+ if(!prop->arraylength) {
if(!fprop->get && !fprop->set)
rna_set_raw_property(dp, prop);
@@ -979,23 +953,23 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
switch(prop->type) {
case PROP_BOOLEAN:
case PROP_INT: {
- if(!prop->arraydimension) {
+ if(!prop->arraylength) {
fprintf(f, "int %sget(PointerRNA *ptr);\n", func);
//fprintf(f, "void %sset(PointerRNA *ptr, int value);\n", func);
}
else {
- fprintf(f, "void %sget(PointerRNA *ptr, int values[%d]);\n", func, prop->totarraylength);
+ fprintf(f, "void %sget(PointerRNA *ptr, int values[%d]);\n", func, prop->arraylength);
//fprintf(f, "void %sset(PointerRNA *ptr, const int values[%d]);\n", func, prop->arraylength);
}
break;
}
case PROP_FLOAT: {
- if(!prop->arraydimension) {
+ if(!prop->arraylength) {
fprintf(f, "float %sget(PointerRNA *ptr);\n", func);
//fprintf(f, "void %sset(PointerRNA *ptr, float value);\n", func);
}
else {
- fprintf(f, "void %sget(PointerRNA *ptr, float values[%d]);\n", func, prop->totarraylength);
+ fprintf(f, "void %sget(PointerRNA *ptr, float values[%d]);\n", func, prop->arraylength);
//fprintf(f, "void %sset(PointerRNA *ptr, const float values[%d]);\n", func, prop->arraylength);
}
break;
@@ -1069,24 +1043,24 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
switch(prop->type) {
case PROP_BOOLEAN: {
- if(!prop->arraydimension)
+ if(!prop->arraylength)
fprintf(f, "\tbool %s(void);", prop->identifier);
else
- fprintf(f, "\tArray<int, %d> %s(void);", prop->totarraylength, prop->identifier);
+ fprintf(f, "\tArray<int, %d> %s(void);", prop->arraylength, prop->identifier);
break;
}
case PROP_INT: {
- if(!prop->arraydimension)
+ if(!prop->arraylength)
fprintf(f, "\tint %s(void);", prop->identifier);
else
- fprintf(f, "\tArray<int, %d> %s(void);", prop->totarraylength, prop->identifier);
+ fprintf(f, "\tArray<int, %d> %s(void);", prop->arraylength, prop->identifier);
break;
}
case PROP_FLOAT: {
- if(!prop->arraydimension)
+ if(!prop->arraylength)
fprintf(f, "\tfloat %s(void);", prop->identifier);
else
- fprintf(f, "\tArray<float, %d> %s(void);", prop->totarraylength, prop->identifier);
+ fprintf(f, "\tArray<float, %d> %s(void);", prop->arraylength, prop->identifier);
break;
}
case PROP_ENUM: {
@@ -1144,24 +1118,24 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
switch(prop->type) {
case PROP_BOOLEAN: {
- if(!prop->arraydimension)
+ if(!prop->arraylength)
fprintf(f, "\tBOOLEAN_PROPERTY(%s, %s)", srna->identifier, prop->identifier);
else
- fprintf(f, "\tBOOLEAN_ARRAY_PROPERTY(%s, %d, %s)", srna->identifier, prop->totarraylength, prop->identifier);
+ fprintf(f, "\tBOOLEAN_ARRAY_PROPERTY(%s, %d, %s)", srna->identifier, prop->arraylength, prop->identifier);
break;
}
case PROP_INT: {
- if(!prop->arraydimension)
+ if(!prop->arraylength)
fprintf(f, "\tINT_PROPERTY(%s, %s)", srna->identifier, prop->identifier);
else
- fprintf(f, "\tINT_ARRAY_PROPERTY(%s, %d, %s)", srna->identifier, prop->totarraylength, prop->identifier);
+ fprintf(f, "\tINT_ARRAY_PROPERTY(%s, %d, %s)", srna->identifier, prop->arraylength, prop->identifier);
break;
}
case PROP_FLOAT: {
- if(!prop->arraydimension)
+ if(!prop->arraylength)
fprintf(f, "\tFLOAT_PROPERTY(%s, %s)", srna->identifier, prop->identifier);
else
- fprintf(f, "\tFLOAT_ARRAY_PROPERTY(%s, %d, %s)", srna->identifier, prop->totarraylength, prop->identifier);
+ fprintf(f, "\tFLOAT_ARRAY_PROPERTY(%s, %d, %s)", srna->identifier, prop->arraylength, prop->identifier);
break;
}
case PROP_ENUM: {
@@ -1224,20 +1198,14 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
dparm= dfunc->cont.properties.first;
for(; dparm; dparm= dparm->next) {
- if(dparm->prop->arraydimension)
- ptrstr= "*";
- else if(dparm->prop==func->ret)
- ptrstr= ((dparm->prop->type == PROP_POINTER) && !(dparm->prop->flag & PROP_RNAPTR))? "*": "";
- else
- ptrstr= (dparm->prop->type == PROP_POINTER)? "*": "";
-
+ ptrstr= (dparm->prop->type == PROP_POINTER || dparm->prop->arraylength > 0)? "*" : "";
fprintf(f, "\t%s%s %s%s;\n", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), ptrstr, dparm->prop->identifier);
}
fprintf(f, "\tchar *_data");
if(func->ret) fprintf(f, ", *_retdata");
fprintf(f, ";\n");
- if(func->ret && (func->ret->flag & PROP_DYNAMIC)) fprintf(f, "\tint _ret_array_length;\n");
+ if(func->ret && (func->ret->flag & PROP_DYNAMIC_ARRAY)) fprintf(f, "\tint _ret_array_length;\n");
fprintf(f, "\t\n");
/* assign self */
@@ -1252,7 +1220,7 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
for(; dparm; dparm= dparm->next) {
if(dparm->prop==func->ret)
fprintf(f, "\t_retdata= _data;\n");
- else if(dparm->prop->arraydimension)
+ else if(dparm->prop->arraylength)
fprintf(f, "\t%s= ((%s%s*)_data);\n", dparm->prop->identifier, rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop));
else if(dparm->prop->type == PROP_POINTER) {
if(dparm->prop->flag & PROP_RNAPTR)
@@ -1292,7 +1260,7 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
fprintf(f, "reports");
}
- if(func->ret && (func->ret->flag & PROP_DYNAMIC)) {
+ if(func->ret && (func->ret->flag & PROP_DYNAMIC_ARRAY)) {
if(!first) fprintf(f, ", ");
first= 0;
fprintf(f, "&_ret_array_length");
@@ -1313,13 +1281,11 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
if(func->ret) {
dparm= rna_find_parameter_def(func->ret);
- ptrstr= (((dparm->prop->type == PROP_POINTER) && !(dparm->prop->flag & PROP_RNAPTR)) || (dparm->prop->arraydimension))? "*": "";
+ ptrstr= dparm->prop->type == PROP_POINTER || dparm->prop->arraylength > 0 ? "*" : "";
fprintf(f, "\t*((%s%s%s*)_retdata)= %s;\n", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), ptrstr, func->ret->identifier);
- if(func->ret && (func->ret->flag & PROP_DYNAMIC)) {
- fprintf(f, "\t_parms->func->ret->arraylength[0]= _ret_array_length;\n");
- fprintf(f, "\t_parms->func->ret->totarraylength= _ret_array_length;\n");
- fprintf(f, "\t_parms->func->ret->arraydimension= 1;\n");
+ if(func->ret && (func->ret->flag & PROP_DYNAMIC_ARRAY)) {
+ fprintf(f, "\t_parms->func->ret->arraylength= _ret_array_length;\n");
}
}
}
@@ -1433,8 +1399,6 @@ static const char *rna_property_subtypename(PropertyType type)
case PROP_XYZ: return "PROP_XYZ";
case PROP_RGB: return "PROP_RGB";
case PROP_NEVER_NULL: return "PROP_NEVER_NULL";
- case PROP_LAYER: return "PROP_LAYER";
- case PROP_LAYER_MEMBER: return "PROP_LAYER_MEMBER";
default: {
/* incase we dont have a type preset that includes the subtype */
if(RNA_SUBTYPE_UNIT(type)) {
@@ -1561,9 +1525,9 @@ static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA
/* return type */
for(dparm= dfunc->cont.properties.first; dparm; dparm= dparm->next) {
if(dparm->prop==func->ret) {
- if(dparm->prop->arraydimension)
- fprintf(f, "XXX no array return types yet"); /* XXX not supported */
- else if(dparm->prop->type == PROP_POINTER && !(dparm->prop->flag & PROP_RNAPTR))
+ if(dparm->prop->arraylength && !(dparm->prop->flag & PROP_DYNAMIC_ARRAY))
+ fprintf(f, "\"XXX array return types only allowed with PROP_DYNAMIC_ARRAY flag.\""); /* XXX not supported */
+ else if(dparm->prop->type == PROP_POINTER || (dparm->prop->flag & PROP_DYNAMIC_ARRAY))
fprintf(f, "%s%s *", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop));
else
fprintf(f, "%s%s ", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop));
@@ -1601,7 +1565,7 @@ static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA
}
/* dynamic array length paramter */
- if(func->ret && (func->ret->flag & PROP_DYNAMIC)) {
+ if(func->ret && (func->ret->flag & PROP_DYNAMIC_ARRAY)) {
if(!first) fprintf(f, ", ");
first= 0;
fprintf(f, "int *array_length");
@@ -1615,8 +1579,8 @@ static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA
if(!first) fprintf(f, ", ");
first= 0;
- if(dparm->prop->arraydimension)
- fprintf(f, "%s%s %s[%d]", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), dparm->prop->identifier, dparm->prop->totarraylength);
+ if(dparm->prop->arraylength)
+ fprintf(f, "%s%s %s[%d]", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), dparm->prop->identifier, dparm->prop->arraylength);
else if(dparm->prop->type == PROP_POINTER)
fprintf(f, "%s%s *%s", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), dparm->prop->identifier);
else
@@ -1699,15 +1663,15 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
unsigned int i;
- if(prop->arraydimension && prop->totarraylength) {
- fprintf(f, "static int rna_%s%s_%s_default[%d] = {", srna->identifier, strnest, prop->identifier, prop->totarraylength);
+ if(prop->arraylength) {
+ fprintf(f, "static int rna_%s%s_%s_default[%d] = {", srna->identifier, strnest, prop->identifier, prop->arraylength);
- for(i=0; i<prop->totarraylength; i++) {
+ for(i=0; i<prop->arraylength; i++) {
if(bprop->defaultarray)
fprintf(f, "%d", bprop->defaultarray[i]);
else
fprintf(f, "%d", bprop->defaultvalue);
- if(i != prop->totarraylength-1)
+ if(i != prop->arraylength-1)
fprintf(f, ", ");
}
@@ -1719,15 +1683,15 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
unsigned int i;
- if(prop->arraydimension && prop->totarraylength) {
- fprintf(f, "static int rna_%s%s_%s_default[%d] = {", srna->identifier, strnest, prop->identifier, prop->totarraylength);
+ if(prop->arraylength) {
+ fprintf(f, "static int rna_%s%s_%s_default[%d] = {", srna->identifier, strnest, prop->identifier, prop->arraylength);
- for(i=0; i<prop->totarraylength; i++) {
+ for(i=0; i<prop->arraylength; i++) {
if(iprop->defaultarray)
fprintf(f, "%d", iprop->defaultarray[i]);
else
fprintf(f, "%d", iprop->defaultvalue);
- if(i != prop->totarraylength-1)
+ if(i != prop->arraylength-1)
fprintf(f, ", ");
}
@@ -1739,15 +1703,15 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
unsigned int i;
- if(prop->arraydimension && prop->totarraylength) {
- fprintf(f, "static float rna_%s%s_%s_default[%d] = {", srna->identifier, strnest, prop->identifier, prop->totarraylength);
+ if(prop->arraylength) {
+ fprintf(f, "static float rna_%s%s_%s_default[%d] = {", srna->identifier, strnest, prop->identifier, prop->arraylength);
- for(i=0; i<prop->totarraylength; i++) {
+ for(i=0; i<prop->arraylength; i++) {
if(fprop->defaultarray)
rna_float_print(f, fprop->defaultarray[i]);
else
rna_float_print(f, fprop->defaultvalue);
- if(i != prop->totarraylength-1)
+ if(i != prop->arraylength-1)
fprintf(f, ", ");
}
@@ -1771,7 +1735,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
rna_print_c_string(f, prop->name); fprintf(f, ",\n\t");
rna_print_c_string(f, prop->description); fprintf(f, ",\n\t");
fprintf(f, "%d,\n", prop->icon);
- fprintf(f, "\t%s, %s|%s, %s, %d, {%d, %d, %d}, %d,\n", rna_property_typename(prop->type), rna_property_subtypename(prop->subtype), rna_property_subtype_unit(prop->subtype), rna_function_string(prop->getlength), prop->arraydimension, prop->arraylength[0], prop->arraylength[1], prop->arraylength[2], prop->totarraylength);
+ fprintf(f, "\t%s, %s|%s, %d,\n", rna_property_typename(prop->type), rna_property_subtypename(prop->subtype), rna_property_subtype_unit(prop->subtype), prop->arraylength);
fprintf(f, "\t%s, %d, %s,\n", rna_function_string(prop->update), prop->noteflag, rna_function_string(prop->editable));
if(prop->flag & PROP_RAW_ACCESS) rna_set_raw_offset(f, srna, prop);
@@ -1782,7 +1746,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
case PROP_BOOLEAN: {
BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, %s, %d, ", rna_function_string(bprop->get), rna_function_string(bprop->set), rna_function_string(bprop->getarray), rna_function_string(bprop->setarray), bprop->defaultvalue);
- if(prop->arraydimension && prop->totarraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
+ if(prop->arraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
else fprintf(f, "NULL\n");
break;
}
@@ -1795,7 +1759,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
rna_int_print(f, iprop->hardmax); fprintf(f, ", ");
rna_int_print(f, iprop->step); fprintf(f, ", ");
rna_int_print(f, iprop->defaultvalue); fprintf(f, ", ");
- if(prop->arraydimension && prop->totarraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
+ if(prop->arraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
else fprintf(f, "NULL\n");
break;
}
@@ -1809,7 +1773,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
rna_float_print(f, fprop->step); fprintf(f, ", ");
rna_int_print(f, (int)fprop->precision); fprintf(f, ", ");
rna_float_print(f, fprop->defaultvalue); fprintf(f, ", ");
- if(prop->arraydimension && prop->totarraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
+ if(prop->arraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
else fprintf(f, "NULL\n");
break;
}
@@ -1990,7 +1954,7 @@ RNAProcessItem PROCESS_ITEMS[]= {
{"rna_ID.c", NULL, RNA_def_ID},
{"rna_texture.c", NULL, RNA_def_texture},
{"rna_action.c", "rna_action_api.c", RNA_def_action},
- {"rna_animation.c", "rna_animation_api.c", RNA_def_animation},
+ {"rna_animation.c", NULL, RNA_def_animation},
{"rna_actuator.c", NULL, RNA_def_actuator},
{"rna_armature.c", NULL, RNA_def_armature},
{"rna_boid.c", NULL, RNA_def_boid},
@@ -2004,7 +1968,6 @@ RNAProcessItem PROCESS_ITEMS[]= {
{"rna_curve.c", NULL, RNA_def_curve},
{"rna_fcurve.c", NULL, RNA_def_fcurve},
{"rna_fluidsim.c", NULL, RNA_def_fluidsim},
- {"rna_gpencil.c", NULL, RNA_def_gpencil},
{"rna_group.c", NULL, RNA_def_group},
{"rna_image.c", "rna_image_api.c", RNA_def_image},
{"rna_key.c", NULL, RNA_def_key},
@@ -2031,7 +1994,6 @@ RNAProcessItem PROCESS_ITEMS[]= {
{"rna_sequence.c", NULL, RNA_def_sequence},
{"rna_smoke.c", NULL, RNA_def_smoke},
{"rna_space.c", NULL, RNA_def_space},
- {"rna_test.c", NULL, RNA_def_test},
{"rna_text.c", NULL, RNA_def_text},
{"rna_timeline.c", NULL, RNA_def_timeline_marker},
{"rna_sound.c", NULL, RNA_def_sound},
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index f5c6063e892..f6e0a2468c4 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -65,7 +65,6 @@ short RNA_type_to_ID_code(StructRNA *type)
if(RNA_struct_is_a(type, &RNA_Brush)) return ID_BR;
if(RNA_struct_is_a(type, &RNA_Camera)) return ID_CA;
if(RNA_struct_is_a(type, &RNA_Curve)) return ID_CU;
- if(RNA_struct_is_a(type, &RNA_GreasePencil)) return ID_GD;
if(RNA_struct_is_a(type, &RNA_Group)) return ID_GR;
if(RNA_struct_is_a(type, &RNA_Image)) return ID_IM;
if(RNA_struct_is_a(type, &RNA_Key)) return ID_KE;
@@ -98,7 +97,6 @@ StructRNA *ID_code_to_RNA_type(short idcode)
case ID_BR: return &RNA_Brush;
case ID_CA: return &RNA_Camera;
case ID_CU: return &RNA_Curve;
- case ID_GD: return &RNA_GreasePencil;
case ID_GR: return &RNA_Group;
case ID_IM: return &RNA_Image;
case ID_KE: return &RNA_Key;
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index e4bda24cf20..7b8edb6c341 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -209,41 +209,7 @@ static IDProperty *rna_idproperty_find(PointerRNA *ptr, const char *name)
return NULL;
}
-static int rna_ensure_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
-{
- if(prop->magic == RNA_MAGIC) {
- int arraylen[RNA_MAX_ARRAY_DIMENSION];
- return (prop->getlength)? prop->getlength(ptr, arraylen): prop->totarraylength;
- }
- else {
- IDProperty *idprop= (IDProperty*)prop;
-
- if(idprop->type == IDP_ARRAY)
- return idprop->len;
- else
- return 0;
- }
-}
-
-static void rna_ensure_property_multi_array_length(PointerRNA *ptr, PropertyRNA *prop, int length[])
-{
- if(prop->magic == RNA_MAGIC) {
- if(prop->getlength)
- prop->getlength(ptr, length);
- else
- memcpy(length, prop->arraylength, prop->arraydimension*sizeof(int));
- }
- else {
- IDProperty *idprop= (IDProperty*)prop;
-
- if(idprop->type == IDP_ARRAY)
- length[0]= idprop->len;
- else
- length[0]= 0;
- }
-}
-
-static int rna_idproperty_verify_valid(PointerRNA *ptr, PropertyRNA *prop, IDProperty *idprop)
+static int rna_idproperty_verify_valid(PropertyRNA *prop, IDProperty *idprop)
{
/* this verifies if the idproperty actually matches the property
* description and otherwise removes it. this is to ensure that
@@ -256,7 +222,7 @@ static int rna_idproperty_verify_valid(PointerRNA *ptr, PropertyRNA *prop, IDPro
return 0;
break;
case IDP_ARRAY:
- if(rna_ensure_property_array_length(ptr, prop) != idprop->len)
+ if(prop->arraylength != idprop->len)
return 0;
if(idprop->subtype == IDP_FLOAT && prop->type != PROP_FLOAT)
@@ -317,7 +283,7 @@ IDProperty *rna_idproperty_check(PropertyRNA **prop, PointerRNA *ptr)
if((*prop)->flag & PROP_IDPROPERTY) {
IDProperty *idprop= rna_idproperty_find(ptr, (*prop)->identifier);
- if(idprop && !rna_idproperty_verify_valid(ptr, *prop, idprop)) {
+ if(idprop && !rna_idproperty_verify_valid(*prop, idprop)) {
IDProperty *group= RNA_struct_idproperties(ptr, 0);
IDP_RemFromGroup(group, idprop);
@@ -344,7 +310,7 @@ IDProperty *rna_idproperty_check(PropertyRNA **prop, PointerRNA *ptr)
}
}
-static PropertyRNA *rna_ensure_property(PropertyRNA *prop)
+PropertyRNA *rna_ensure_property(PropertyRNA *prop)
{
/* the quick version if we don't need the idproperty */
@@ -361,7 +327,7 @@ static PropertyRNA *rna_ensure_property(PropertyRNA *prop)
}
}
-static const char *rna_ensure_property_identifier(PropertyRNA *prop)
+const char *rna_ensure_property_identifier(PropertyRNA *prop)
{
if(prop->magic == RNA_MAGIC)
return prop->identifier;
@@ -369,7 +335,7 @@ static const char *rna_ensure_property_identifier(PropertyRNA *prop)
return ((IDProperty*)prop)->name;
}
-static const char *rna_ensure_property_name(PropertyRNA *prop)
+const char *rna_ensure_property_name(PropertyRNA *prop)
{
if(prop->magic == RNA_MAGIC)
return prop->name;
@@ -377,6 +343,20 @@ static const char *rna_ensure_property_name(PropertyRNA *prop)
return ((IDProperty*)prop)->name;
}
+int rna_ensure_property_array_length(PropertyRNA *prop)
+{
+ if(prop->magic == RNA_MAGIC)
+ return prop->arraylength;
+ else {
+ IDProperty *idprop= (IDProperty*)prop;
+
+ if(idprop->type == IDP_ARRAY)
+ return idprop->len;
+ else
+ return 0;
+ }
+}
+
/* Structs */
const char *RNA_struct_identifier(StructRNA *type)
@@ -569,30 +549,9 @@ int RNA_property_flag(PropertyRNA *prop)
return rna_ensure_property(prop)->flag;
}
-int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
+int RNA_property_array_length(PropertyRNA *prop)
{
- return rna_ensure_property_array_length(ptr, prop);
-}
-
-/* used by BPY to make an array from the python object */
-int RNA_property_array_dimension(PointerRNA *ptr, PropertyRNA *prop, int length[])
-{
- PropertyRNA *rprop= rna_ensure_property(prop);
-
- if(length && rprop->arraydimension > 1)
- rna_ensure_property_multi_array_length(ptr, prop, length);
-
- return rprop->arraydimension;
-}
-
-/* Return the size of Nth dimension. */
-int RNA_property_multi_array_length(PointerRNA *ptr, PropertyRNA *prop, int dim)
-{
- int len[RNA_MAX_ARRAY_DIMENSION];
-
- rna_ensure_property_multi_array_length(ptr, prop, len);
-
- return len[dim];
+ return rna_ensure_property_array_length(prop);
}
char RNA_property_array_item_char(PropertyRNA *prop, int index)
@@ -895,40 +854,27 @@ void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, int *val
IDProperty *idprop;
if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
+ if(prop->arraylength == 0)
values[0]= RNA_property_boolean_get(ptr, prop);
else
memcpy(values, IDP_Array(idprop), sizeof(int)*idprop->len);
}
- else if(prop->arraydimension == 0)
+ else if(prop->arraylength == 0)
values[0]= RNA_property_boolean_get(ptr, prop);
else if(bprop->getarray)
bprop->getarray(ptr, values);
else if(bprop->defaultarray)
- memcpy(values, bprop->defaultarray, sizeof(int)*prop->totarraylength);
+ memcpy(values, bprop->defaultarray, sizeof(int)*prop->arraylength);
else
- memset(values, 0, sizeof(int)*prop->totarraylength);
+ memset(values, 0, sizeof(int)*prop->arraylength);
}
int RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
{
- int tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
-
- if(len <= RNA_MAX_ARRAY_LENGTH) {
- RNA_property_boolean_get_array(ptr, prop, tmp);
- return tmp[index];
- }
- else {
- int *tmparray, value;
+ int tmp[RNA_MAX_ARRAY];
- tmparray= MEM_callocN(sizeof(int)*len, "RNA_property_boolean_get_index");
- RNA_property_boolean_get_array(ptr, prop, tmparray);
- value= tmparray[index];
- MEM_freeN(tmparray);
-
- return value;
- }
+ RNA_property_boolean_get_array(ptr, prop, tmp);
+ return tmp[index];
}
void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *values)
@@ -937,12 +883,12 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in
IDProperty *idprop;
if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
+ if(prop->arraylength == 0)
IDP_Int(idprop)= values[0];
else
memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
}
- else if(prop->arraydimension == 0)
+ else if(prop->arraylength == 0)
RNA_property_boolean_set(ptr, prop, values[0]);
else if(bprop->setarray)
bprop->setarray(ptr, values);
@@ -950,7 +896,7 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in
IDPropertyTemplate val = {0};
IDProperty *group;
- val.array.len= prop->totarraylength;
+ val.array.len= prop->arraylength;
val.array.type= IDP_INT;
group= RNA_struct_idproperties(ptr, 1);
@@ -964,23 +910,11 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in
void RNA_property_boolean_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, int value)
{
- int tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
-
- if(len <= RNA_MAX_ARRAY_LENGTH) {
- RNA_property_boolean_get_array(ptr, prop, tmp);
- tmp[index]= value;
- RNA_property_boolean_set_array(ptr, prop, tmp);
- }
- else {
- int *tmparray;
+ int tmp[RNA_MAX_ARRAY];
- tmparray= MEM_callocN(sizeof(int)*len, "RNA_property_boolean_get_index");
- RNA_property_boolean_get_array(ptr, prop, tmparray);
- tmparray[index]= value;
- RNA_property_boolean_set_array(ptr, prop, tmparray);
- MEM_freeN(tmparray);
- }
+ RNA_property_boolean_get_array(ptr, prop, tmp);
+ tmp[index]= value;
+ RNA_property_boolean_set_array(ptr, prop, tmp);
}
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
@@ -1023,40 +957,27 @@ void RNA_property_int_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
IDProperty *idprop;
if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
+ if(prop->arraylength == 0)
values[0]= RNA_property_int_get(ptr, prop);
else
memcpy(values, IDP_Array(idprop), sizeof(int)*idprop->len);
}
- else if(prop->arraydimension == 0)
+ else if(prop->arraylength == 0)
values[0]= RNA_property_int_get(ptr, prop);
else if(iprop->getarray)
iprop->getarray(ptr, values);
else if(iprop->defaultarray)
- memcpy(values, iprop->defaultarray, sizeof(int)*prop->totarraylength);
+ memcpy(values, iprop->defaultarray, sizeof(int)*prop->arraylength);
else
- memset(values, 0, sizeof(int)*prop->totarraylength);
+ memset(values, 0, sizeof(int)*prop->arraylength);
}
int RNA_property_int_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
{
- int tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
-
- if(len <= RNA_MAX_ARRAY_LENGTH) {
- RNA_property_int_get_array(ptr, prop, tmp);
- return tmp[index];
- }
- else {
- int *tmparray, value;
+ int tmp[RNA_MAX_ARRAY];
- tmparray= MEM_callocN(sizeof(int)*len, "RNA_property_int_get_index");
- RNA_property_int_get_array(ptr, prop, tmparray);
- value= tmparray[index];
- MEM_freeN(tmparray);
-
- return value;
- }
+ RNA_property_int_get_array(ptr, prop, tmp);
+ return tmp[index];
}
void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *values)
@@ -1065,12 +986,12 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
IDProperty *idprop;
if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
+ if(prop->arraylength == 0)
IDP_Int(idprop)= values[0];
else
memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);\
}
- else if(prop->arraydimension == 0)
+ else if(prop->arraylength == 0)
RNA_property_int_set(ptr, prop, values[0]);
else if(iprop->setarray)
iprop->setarray(ptr, values);
@@ -1078,7 +999,7 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
IDPropertyTemplate val = {0};
IDProperty *group;
- val.array.len= prop->totarraylength;
+ val.array.len= prop->arraylength;
val.array.type= IDP_INT;
group= RNA_struct_idproperties(ptr, 1);
@@ -1092,23 +1013,11 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
void RNA_property_int_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, int value)
{
- int tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
-
- if(len <= RNA_MAX_ARRAY_LENGTH) {
- RNA_property_int_get_array(ptr, prop, tmp);
- tmp[index]= value;
- RNA_property_int_set_array(ptr, prop, tmp);
- }
- else {
- int *tmparray;
+ int tmp[RNA_MAX_ARRAY];
- tmparray= MEM_callocN(sizeof(int)*len, "RNA_property_int_get_index");
- RNA_property_int_get_array(ptr, prop, tmparray);
- tmparray[index]= value;
- RNA_property_int_set_array(ptr, prop, tmparray);
- MEM_freeN(tmparray);
- }
+ RNA_property_int_get_array(ptr, prop, tmp);
+ tmp[index]= value;
+ RNA_property_int_set_array(ptr, prop, tmp);
}
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
@@ -1161,7 +1070,7 @@ void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *val
int i;
if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
+ if(prop->arraylength == 0)
values[0]= RNA_property_float_get(ptr, prop);
else if(idprop->subtype == IDP_FLOAT) {
memcpy(values, IDP_Array(idprop), sizeof(float)*idprop->len);
@@ -1171,36 +1080,22 @@ void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *val
values[i]= (float)(((double*)IDP_Array(idprop))[i]);
}
}
- else if(prop->arraydimension == 0)
+ else if(prop->arraylength == 0)
values[0]= RNA_property_float_get(ptr, prop);
else if(fprop->getarray)
fprop->getarray(ptr, values);
else if(fprop->defaultarray)
- memcpy(values, fprop->defaultarray, sizeof(float)*prop->totarraylength);
+ memcpy(values, fprop->defaultarray, sizeof(float)*prop->arraylength);
else
- memset(values, 0, sizeof(float)*prop->totarraylength);
+ memset(values, 0, sizeof(float)*prop->arraylength);
}
float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
{
- float tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
-
- if(len <= RNA_MAX_ARRAY_LENGTH) {
- RNA_property_float_get_array(ptr, prop, tmp);
- return tmp[index];
- }
- else {
- float *tmparray, value;
-
- tmparray= MEM_callocN(sizeof(float)*len, "RNA_property_float_get_index");
- RNA_property_float_get_array(ptr, prop, tmparray);
- value= tmparray[index];
- MEM_freeN(tmparray);
-
- return value;
- }
+ float tmp[RNA_MAX_ARRAY];
+ RNA_property_float_get_array(ptr, prop, tmp);
+ return tmp[index];
}
void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const float *values)
@@ -1210,7 +1105,7 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
int i;
if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
+ if(prop->arraylength == 0)
IDP_Double(idprop)= values[0];
else if(idprop->subtype == IDP_FLOAT) {
memcpy(IDP_Array(idprop), values, sizeof(float)*idprop->len);
@@ -1220,7 +1115,7 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
((double*)IDP_Array(idprop))[i]= values[i];
}
}
- else if(prop->arraydimension == 0)
+ else if(prop->arraylength == 0)
RNA_property_float_set(ptr, prop, values[0]);
else if(fprop->setarray) {
fprop->setarray(ptr, values);
@@ -1229,7 +1124,7 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
IDPropertyTemplate val = {0};
IDProperty *group;
- val.array.len= prop->totarraylength;
+ val.array.len= prop->arraylength;
val.array.type= IDP_FLOAT;
group= RNA_struct_idproperties(ptr, 1);
@@ -1243,23 +1138,11 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
void RNA_property_float_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, float value)
{
- float tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
+ float tmp[RNA_MAX_ARRAY];
- if(len <= RNA_MAX_ARRAY_LENGTH) {
- RNA_property_float_get_array(ptr, prop, tmp);
- tmp[index]= value;
- RNA_property_float_set_array(ptr, prop, tmp);
- }
- else {
- float *tmparray;
-
- tmparray= MEM_callocN(sizeof(float)*len, "RNA_property_float_get_index");
- RNA_property_float_get_array(ptr, prop, tmparray);
- tmparray[index]= value;
- RNA_property_float_set_array(ptr, prop, tmparray);
- MEM_freeN(tmparray);
- }
+ RNA_property_float_get_array(ptr, prop, tmp);
+ tmp[index]= value;
+ RNA_property_float_set_array(ptr, prop, tmp);
}
void RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop, char *value)
@@ -1801,7 +1684,7 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
}
/* check item array */
- itemlen= RNA_property_array_length(&itemptr, itemprop);
+ itemlen= RNA_property_array_length(itemprop);
/* try to access as raw array */
if(RNA_property_collection_raw_array(ptr, prop, itemprop, &out)) {
@@ -1853,7 +1736,7 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
iprop= RNA_struct_find_property(&itemptr, propname);
if(iprop) {
- itemlen= RNA_property_array_length(&itemptr, iprop);
+ itemlen= RNA_property_array_length(iprop);
itemtype= RNA_property_type(iprop);
}
else {
@@ -2748,7 +2631,7 @@ int RNA_property_is_set(PointerRNA *ptr, const char *name)
return (rna_idproperty_find(ptr, name) != NULL);
}
else {
- // printf("RNA_property_is_set: %s.%s not found.\n", ptr->type->identifier, name);
+ printf("RNA_property_is_set: %s.%s not found.\n", ptr->type->identifier, name);
return 0;
}
}
@@ -2792,7 +2675,7 @@ char *RNA_pointer_as_string(PointerRNA *ptr)
char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
{
int type = RNA_property_type(prop);
- int len = RNA_property_array_length(ptr, prop);
+ int len = RNA_property_array_length(prop);
int i;
DynStr *dynstr= BLI_dynstr_new();
@@ -2981,15 +2864,15 @@ ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *ptr,
if(!(parm->flag & PROP_REQUIRED)) {
switch(parm->type) {
case PROP_BOOLEAN:
- if(parm->arraydimension) memcpy(data, &((BooleanPropertyRNA*)parm)->defaultarray, size);
+ if(parm->arraylength) memcpy(data, &((BooleanPropertyRNA*)parm)->defaultarray, size);
else memcpy(data, &((BooleanPropertyRNA*)parm)->defaultvalue, size);
break;
case PROP_INT:
- if(parm->arraydimension) memcpy(data, &((IntPropertyRNA*)parm)->defaultarray, size);
+ if(parm->arraylength) memcpy(data, &((IntPropertyRNA*)parm)->defaultarray, size);
else memcpy(data, &((IntPropertyRNA*)parm)->defaultvalue, size);
break;
case PROP_FLOAT:
- if(parm->arraydimension) memcpy(data, &((FloatPropertyRNA*)parm)->defaultarray, size);
+ if(parm->arraylength) memcpy(data, &((FloatPropertyRNA*)parm)->defaultarray, size);
else memcpy(data, &((FloatPropertyRNA*)parm)->defaultvalue, size);
break;
case PROP_ENUM:
@@ -3020,13 +2903,15 @@ void RNA_parameter_list_free(ParameterList *parms)
parm= parms->func->cont.properties.first;
for(tot= 0; parm; parm= parm->next) {
- if(parm->type == PROP_COLLECTION)
+ if(parm->type == PROP_COLLECTION) {
BLI_freelistN((ListBase*)((char*)parms->data+tot));
- else if (parm->flag & PROP_DYNAMIC) {
+ }
+ else if(parm == parms->func->ret) {
/* for dynamic arrays and strings, data is a pointer to an array */
- char *array= *(char**)((char*)parms->data+tot);
- if(array)
- MEM_freeN(array);
+ char *ptr= *(char**)((char*)parms->data+tot);
+ if((parm->flag & PROP_DYNAMIC_ARRAY || parm->type == PROP_STRING) && ptr) {
+ MEM_freeN(ptr);
+ }
}
tot+= rna_parameter_size(parm);
@@ -3400,7 +3285,7 @@ int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *pt
type= RNA_property_type(parm);
ftype= format[ofs++];
- len= RNA_property_array_length(&funcptr, parm);
+ len= RNA_property_array_length(parm);
alen= rna_function_format_array_length(format, ofs, flen);
if (len!=alen) {
@@ -3465,7 +3350,7 @@ int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *pt
type= RNA_property_type(parm);
ftype= format[ofs++];
- len= RNA_property_array_length(&funcptr, parm);
+ len= RNA_property_array_length(parm);
alen= rna_function_format_array_length(format, ofs, flen);
if (len!=alen) {
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 363cff0c01e..bc59e06a978 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -42,15 +42,15 @@ void rna_def_action_group(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
-
+
srna= RNA_def_struct(brna, "ActionGroup", NULL);
RNA_def_struct_sdna(srna, "bActionGroup");
RNA_def_struct_ui_text(srna, "Action Group", "Groups of F-Curves.");
-
+
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
-
+
/* dna warns not to treat the Action Channel listbase in the Action Group struct like a
normal listbase. I'll leave this here but comment out, for Joshua to review. He can
probably shed some more light on why this is */
@@ -58,19 +58,19 @@ void rna_def_action_group(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "channels", NULL);
RNA_def_property_struct_type(prop, "FCurve");
RNA_def_property_ui_text(prop, "Channels", "F-Curves in this group.");*/
-
+
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_SELECTED);
RNA_def_property_ui_text(prop, "Selected", "Action Group is selected.");
-
+
prop= RNA_def_property(srna, "locked", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_PROTECTED);
RNA_def_property_ui_text(prop, "Locked", "Action Group is locked.");
-
+
prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_EXPANDED);
RNA_def_property_ui_text(prop, "Expanded", "Action Group is expanded.");
-
+
prop= RNA_def_property(srna, "custom_color", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "customCol");
RNA_def_property_ui_text(prop, "Custom Color", "Index of custom color set.");
@@ -85,17 +85,17 @@ void rna_def_action(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "bAction");
RNA_def_struct_ui_text(srna, "Action", "A collection of F-Curves for animation.");
RNA_def_struct_ui_icon(srna, ICON_ACTION);
-
+
prop= RNA_def_property(srna, "fcurves", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "curves", NULL);
RNA_def_property_struct_type(prop, "FCurve");
RNA_def_property_ui_text(prop, "F-Curves", "The individual F-Curves that make up the Action.");
-
+
prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "groups", NULL);
RNA_def_property_struct_type(prop, "ActionGroup");
RNA_def_property_ui_text(prop, "Groups", "Convenient groupings of F-Curves.");
-
+
prop= RNA_def_property(srna, "pose_markers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
RNA_def_property_struct_type(prop, "TimelineMarker");
diff --git a/source/blender/makesrna/intern/rna_action_api.c b/source/blender/makesrna/intern/rna_action_api.c
index 35c6c921104..11efa6d5f8a 100644
--- a/source/blender/makesrna/intern/rna_action_api.c
+++ b/source/blender/makesrna/intern/rna_action_api.c
@@ -1,6 +1,4 @@
/**
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -43,8 +41,6 @@
#include "DNA_anim_types.h"
#include "DNA_curve_types.h"
-/* TODO bring back once array return types are allowed */
-#if 0
/* return frame range of all curves (min, max) or (0, 1) if there are no keys */
int *rna_Action_get_frame_range(bAction *act, int *ret_length)
{
@@ -61,7 +57,6 @@ int *rna_Action_get_frame_range(bAction *act, int *ret_length)
return ret;
}
-#endif
#else
@@ -70,13 +65,11 @@ void RNA_api_action(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
-#if 0
func= RNA_def_function(srna, "get_frame_range", "rna_Action_get_frame_range");
RNA_def_function_ui_description(func, "Get action frame range as a (min, max) tuple.");
parm= RNA_def_int_array(func, "frame_range", 1, NULL, 0, 0, "", "Action frame range.", 0, 0);
- RNA_def_property_flag(parm, PROP_DYNAMIC);
+ RNA_def_property_flag(parm, PROP_DYNAMIC_ARRAY);
RNA_def_function_return(func, parm);
-#endif
}
#endif
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index e4bea893992..e334e2b5e90 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * Contributor(s): Blender Foundation (2009), Joshua Leung
+ * Contributor(s): Blender Foundation (2008), Roland Hess
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -36,14 +36,6 @@
#include "MEM_guardedalloc.h"
-/* exported for use in API */
-EnumPropertyItem keyingset_path_grouping_items[] = {
- {KSP_GROUP_NAMED, "NAMED", 0, "Named Group", ""},
- {KSP_GROUP_NONE, "NONE", 0, "None", ""},
- {KSP_GROUP_KSNAME, "KEYINGSET", 0, "Keying Set Name", ""},
- {KSP_GROUP_TEMPLATE_ITEM, "TEMPLATE", 0, "Innermost Context-Item Name", ""},
- {0, NULL, 0, NULL, NULL}};
-
#ifdef RNA_RUNTIME
static int rna_AnimData_action_editable(PointerRNA *ptr)
@@ -98,6 +90,13 @@ void rna_def_keyingset_path(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ static EnumPropertyItem prop_mode_grouping_items[] = {
+ {KSP_GROUP_NAMED, "NAMED", 0, "Named Group", ""},
+ {KSP_GROUP_NONE, "NONE", 0, "None", ""},
+ {KSP_GROUP_KSNAME, "KEYINGSET", 0, "Keying Set Name", ""},
+ {KSP_GROUP_TEMPLATE_ITEM, "TEMPLATE", 0, "Innermost Context-Item Name", ""},
+ {0, NULL, 0, NULL, NULL}};
+
srna= RNA_def_struct(brna, "KeyingSetPath", NULL);
RNA_def_struct_sdna(srna, "KS_Path");
RNA_def_struct_ui_text(srna, "Keying Set Path", "Path to a setting for use in a Keying Set.");
@@ -113,7 +112,7 @@ void rna_def_keyingset_path(BlenderRNA *brna)
/* Grouping */
prop= RNA_def_property(srna, "grouping", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "groupmode");
- RNA_def_property_enum_items(prop, keyingset_path_grouping_items);
+ RNA_def_property_enum_items(prop, prop_mode_grouping_items);
RNA_def_property_ui_text(prop, "Grouping Method", "Method used to define which Group-name to use.");
/* Path + Array Index */
@@ -157,6 +156,7 @@ void rna_def_keyingset(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYINGSET_BUILTIN);
RNA_def_property_ui_text(prop, "Built-In", "Keying Set is a built-in to Blender.");
+ /* TODO: for now, this is editable, but do we really want this to happen? */
prop= RNA_def_property(srna, "absolute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYINGSET_ABSOLUTE);
RNA_def_property_ui_text(prop, "Absolute", "Keying Set defines specific paths/settings to be keyframed (i.e. is not reliant on context info)");
@@ -170,8 +170,7 @@ void rna_def_keyingset(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "keyingflag", INSERTKEY_MATRIX);
RNA_def_property_ui_text(prop, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'.");
- /* Keying Set API */
- RNA_api_keyingset(srna);
+
}
/* --- */
diff --git a/source/blender/makesrna/intern/rna_animation_api.c b/source/blender/makesrna/intern/rna_animation_api.c
deleted file mode 100644
index 7764c394e87..00000000000
--- a/source/blender/makesrna/intern/rna_animation_api.c
+++ /dev/null
@@ -1,89 +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2009 Blender Foundation.
- * All rights reserved.
- *
- *
- * Contributor(s): Joshua Leung
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "RNA_define.h"
-#include "RNA_enum_types.h"
-#include "RNA_types.h"
-
-#include "DNA_anim_types.h"
-#include "DNA_object_types.h"
-#include "DNA_scene_types.h"
-
-#ifdef RNA_RUNTIME
-
-#include "BKE_animsys.h"
-
-static void rna_KeyingSet_add_destination(KeyingSet *keyingset, ReportList *reports,
- ID *id, char rna_path[], int array_index, int entire_array,
- int grouping_method, char group_name[])
-{
- short flag = 0;
-
- /* validate flags */
- if (entire_array)
- flag |= KSP_FLAG_WHOLE_ARRAY;
-
- /* if data is valid, call the API function for this */
- if (keyingset) {
- BKE_keyingset_add_destination(keyingset, id, group_name, rna_path, array_index, flag, grouping_method);
- }
- else {
- BKE_report(reports, RPT_ERROR, "Keying Set Destination could not be added.");
- }
-}
-
-#else
-
-void RNA_api_keyingset(StructRNA *srna)
-{
- FunctionRNA *func;
- PropertyRNA *parm;
-
- /* Add Destination */
- func= RNA_def_function(srna, "add_destination", "rna_KeyingSet_add_destination");
- RNA_def_function_ui_description(func, "Add a new destination for the Keying Set.");
- RNA_def_function_flag(func, FUNC_USE_REPORTS);
- /* ID-block for target */
- 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, "rna_path", "", 256, "RNA-Path", "RNA-Path to destination property."); // xxx hopefully this is long enough
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm=RNA_def_int(func, "array_index", 0, 0, INT_MAX, "Array Index", "If applicable, the index ", 0, INT_MAX);
- /* flags */
- parm=RNA_def_boolean(func, "entire_array", 1, "Entire Array", "When an 'array/vector' type is chosen (Location, Rotation, Color, etc.), entire array is to be used.");
- /* grouping */
- parm=RNA_def_enum(func, "grouping_method", keyingset_path_grouping_items, KSP_GROUP_KSNAME, "Grouping Method", "Method used to define which Group-name to use.");
- parm=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).");
-}
-
-#endif
-
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index a2124b4067d..7bc09b052ee 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -48,17 +48,29 @@
static void rna_Armature_update_data(bContext *C, PointerRNA *ptr)
{
+ Main *bmain= CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
ID *id= ptr->id.data;
+ Object *ob;
- DAG_id_flush_update(id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
+ for(ob=bmain->object.first; ob; ob= ob->id.next) {
+ if(ob->data == id) {
+ /* XXX this will loop over all objects again (slow) */
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
+ }
}
static void rna_Armature_redraw_data(bContext *C, PointerRNA *ptr)
{
+ Main *bmain= CTX_data_main(C);
ID *id= ptr->id.data;
+ Object *ob;
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
+ for(ob=bmain->object.first; ob; ob= ob->id.next)
+ if(ob->data == id)
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
}
static void rna_bone_layer_set(short *layer, const int *values)
@@ -325,7 +337,7 @@ static void rna_def_bone_common(StructRNA *srna, int editbone)
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* flags */
- prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layer", 1);
RNA_def_property_array(prop, 16);
if(editbone) RNA_def_property_boolean_funcs(prop, "rna_EditBone_layer_get", "rna_EditBone_layer_set");
@@ -600,7 +612,7 @@ void rna_def_armature(BlenderRNA *brna)
/* Boolean values */
/* layer */
- prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layer", 1);
RNA_def_property_array(prop, 16);
RNA_def_property_ui_text(prop, "Visible Layers", "Armature layer visibility.");
@@ -609,7 +621,7 @@ void rna_def_armature(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
/* layer protection */
- prop= RNA_def_property(srna, "layer_protection", PROP_BOOLEAN, PROP_LAYER);
+ prop= RNA_def_property(srna, "layer_protection", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layer_protected", 1);
RNA_def_property_array(prop, 16);
RNA_def_property_ui_text(prop, "Layer Proxy Protection", "Protected layers in Proxy Instances are restored to Proxy settings on file reload and undo.");
diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c
index 8002aa89313..0c5565e253a 100644
--- a/source/blender/makesrna/intern/rna_boid.c
+++ b/source/blender/makesrna/intern/rna_boid.c
@@ -41,7 +41,6 @@
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
-#include "WM_api.h"
#include "WM_types.h"
EnumPropertyItem boidrule_type_items[] ={
@@ -83,15 +82,14 @@ static void rna_Boids_reset(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET;
- if(ob)
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ if(ob) {
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ }
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET);
}
-
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Boids_reset_deps(bContext *C, PointerRNA *ptr)
{
@@ -104,16 +102,15 @@ static void rna_Boids_reset_deps(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET;
- if(ob)
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ if(ob) {
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ }
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET);
DAG_scene_sort(scene);
}
-
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static StructRNA* rna_BoidRule_refine(struct PointerRNA *ptr)
@@ -250,12 +247,12 @@ static void rna_def_boidrule_goal(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Goal object.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset_deps");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset_deps");
prop= RNA_def_property(srna, "predict", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_GOAL_AVOID_PREDICT);
RNA_def_property_ui_text(prop, "Predict", "Predict target movement.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
}
static void rna_def_boidrule_avoid(BlenderRNA *brna)
@@ -271,17 +268,17 @@ static void rna_def_boidrule_avoid(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Object to avoid.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset_deps");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset_deps");
prop= RNA_def_property(srna, "predict", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_GOAL_AVOID_PREDICT);
RNA_def_property_ui_text(prop, "Predict", "Predict target movement.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "fear_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Fear factor", "Avoid object if danger from it is above this threshol.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
}
static void rna_def_boidrule_avoid_collision(BlenderRNA *brna)
@@ -295,17 +292,17 @@ static void rna_def_boidrule_avoid_collision(BlenderRNA *brna)
prop= RNA_def_property(srna, "boids", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_ACOLL_WITH_BOIDS);
RNA_def_property_ui_text(prop, "Boids", "Avoid collision with other boids.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "deflectors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_ACOLL_WITH_DEFLECTORS);
RNA_def_property_ui_text(prop, "Deflectors", "Avoid collision with deflector objects.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "look_ahead", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Look ahead", "Time to look ahead in seconds.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
}
static void rna_def_boidrule_follow_leader(BlenderRNA *brna)
@@ -320,22 +317,22 @@ static void rna_def_boidrule_follow_leader(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Follow this object instead of a boid.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset_deps");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset_deps");
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Distance", "Distance behind leader to follow.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "queue_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Queue Size", "How many boids in a line.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "line", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_LEADER_IN_LINE);
RNA_def_property_ui_text(prop, "Line", "Follow leader in a line.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
}
static void rna_def_boidrule_average_speed(BlenderRNA *brna)
@@ -349,17 +346,17 @@ static void rna_def_boidrule_average_speed(BlenderRNA *brna)
prop= RNA_def_property(srna, "wander", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Wander", "How fast velocity's direction is randomized.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "level", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Level", "How much velocity's z-component is kept constant.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Speed", "Percentage of maximum speed.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
}
static void rna_def_boidrule_fight(BlenderRNA *brna)
@@ -373,12 +370,12 @@ static void rna_def_boidrule_fight(BlenderRNA *brna)
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Fight Distance", "Attack boids at max this distance.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "flee_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Flee Distance", "Flee to this distance.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
}
static void rna_def_boidrule(BlenderRNA *brna)
@@ -408,12 +405,12 @@ static void rna_def_boidrule(BlenderRNA *brna)
prop= RNA_def_property(srna, "in_air", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BOIDRULE_IN_AIR);
RNA_def_property_ui_text(prop, "In Air", "Use rule when boid is flying.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "on_land", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BOIDRULE_ON_LAND);
RNA_def_property_ui_text(prop, "On Land", "Use rule when boid is on land.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
//prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
//RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded);
@@ -460,17 +457,17 @@ static void rna_def_boidstate(BlenderRNA *brna)
prop= RNA_def_property(srna, "rule_fuzziness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Rule Fuzzines", "");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Volume", "");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Falloff", "");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
}
static void rna_def_boid_settings(BlenderRNA *brna)
{
@@ -483,17 +480,17 @@ static void rna_def_boid_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "landing_smoothness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Landing Smoothness", "How smoothly the boids land.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "banking", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 2.0);
RNA_def_property_ui_text(prop, "Banking", "Amount of rotation around velocity vector on turns.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 2.0);
RNA_def_property_ui_text(prop, "Height", "Boid height relative to particle size.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
/* states */
prop= RNA_def_property(srna, "states", PROP_COLLECTION, PROP_NONE);
@@ -513,99 +510,99 @@ static void rna_def_boid_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "health", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Health", "Initial boid health when born.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Strength", "Maximum caused damage on attack per second.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "aggression", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Aggression", "Boid will fight this times stronger enemy.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "accuracy", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Accuracy", "Accuracy of attack.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "range", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Range", "The maximum distance from which a boid can attack.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
/* physical properties */
prop= RNA_def_property(srna, "air_min_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Min Air Speed", "Minimum speed in air (relative to maximum speed).");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "air_max_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Max Air Speed", "Maximum speed in air.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "air_max_acc", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Max Air Acceleration", "Maximum acceleration in air (relative to maximum speed).");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "air_max_ave", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Max Air Angular Velocity", "Maximum angular velocity in air (relative to 180 degrees).");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "air_personal_space", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Air Personal Space", "Radius of boids personal space in air (% of particle size).");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_jump_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Jump Speed", "Maximum speed for jumping.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_max_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Max Land Speed", "Maximum speed on land.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_max_acc", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Max Land Acceleration", "Maximum acceleration on land (relative to maximum speed).");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_max_ave", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Max Land Angular Velocity", "Maximum angular velocity on land (relative to 180 degrees).");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_personal_space", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Land Personal Space", "Radius of boids personal space on land (% of particle size).");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_stick_force", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Land Stick Force", "How strong a force must be to start effecting a boid on land.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
/* options */
prop= RNA_def_property(srna, "allow_flight", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BOID_ALLOW_FLIGHT);
RNA_def_property_ui_text(prop, "Allow Flight", "Allow boids to move in air.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "allow_land", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BOID_ALLOW_LAND);
RNA_def_property_ui_text(prop, "Allow Land", "Allow boids to move on land.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
prop= RNA_def_property(srna, "allow_climb", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BOID_ALLOW_CLIMB);
RNA_def_property_ui_text(prop, "Allow Climbing", "Allow boids to climb goal objects.");
- RNA_def_property_update(prop, 0, "rna_Boids_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
}
void RNA_def_boid(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 448a2046855..03b5a44f52b 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -32,8 +32,6 @@
#include "DNA_brush_types.h"
#include "DNA_texture_types.h"
-#include "IMB_imbuf.h"
-
EnumPropertyItem brush_sculpt_tool_items[] = {
{SCULPT_TOOL_DRAW, "DRAW", 0, "Draw", ""},
{SCULPT_TOOL_SMOOTH, "SMOOTH", 0, "Smooth", ""},
@@ -95,14 +93,14 @@ void rna_def_brush(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_blend_items[] = {
- {IMB_BLEND_MIX, "MIX", 0, "Mix", "Use mix blending mode while painting."},
- {IMB_BLEND_ADD, "ADD", 0, "Add", "Use add blending mode while painting."},
- {IMB_BLEND_SUB, "SUB", 0, "Subtract", "Use subtract blending mode while painting."},
- {IMB_BLEND_MUL, "MUL", 0, "Multiply", "Use multiply blending mode while painting."},
- {IMB_BLEND_LIGHTEN, "LIGHTEN", 0, "Lighten", "Use lighten blending mode while painting."},
- {IMB_BLEND_DARKEN, "DARKEN", 0, "Darken", "Use darken blending mode while painting."},
- {IMB_BLEND_ERASE_ALPHA, "ERASE_ALPHA", 0, "Erase Alpha", "Erase alpha while painting."},
- {IMB_BLEND_ADD_ALPHA, "ADD_ALPHA", 0, "Add Alpha", "Add alpha while painting."},
+ {BRUSH_BLEND_MIX, "MIX", 0, "Mix", "Use mix blending mode while painting."},
+ {BRUSH_BLEND_ADD, "ADD", 0, "Add", "Use add blending mode while painting."},
+ {BRUSH_BLEND_SUB, "SUB", 0, "Subtract", "Use subtract blending mode while painting."},
+ {BRUSH_BLEND_MUL, "MUL", 0, "Multiply", "Use multiply blending mode while painting."},
+ {BRUSH_BLEND_LIGHTEN, "LIGHTEN", 0, "Lighten", "Use lighten blending mode while painting."},
+ {BRUSH_BLEND_DARKEN, "DARKEN", 0, "Darken", "Use darken blending mode while painting."},
+ {BRUSH_BLEND_ERASE_ALPHA, "ERASE_ALPHA", 0, "Erase Alpha", "Erase alpha while painting."},
+ {BRUSH_BLEND_ADD_ALPHA, "ADD_ALPHA", 0, "Add Alpha", "Add alpha while painting."},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Brush", "ID");
@@ -166,22 +164,18 @@ void rna_def_brush(BlenderRNA *brna)
prop= RNA_def_property(srna, "strength_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ALPHA_PRESSURE);
- RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Strength Pressure", "Enable tablet pressure sensitivity for strength.");
prop= RNA_def_property(srna, "size_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SIZE_PRESSURE);
- RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Size Pressure", "Enable tablet pressure sensitivity for size.");
prop= RNA_def_property(srna, "falloff_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_RAD_PRESSURE);
- RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Falloff Pressure", "Enable tablet pressure sensitivity for falloff.");
prop= RNA_def_property(srna, "spacing_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACING_PRESSURE);
- RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Spacing Pressure", "Enable tablet pressure sensitivity for spacing.");
prop= RNA_def_property(srna, "rake", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index 38086502d6f..9096bfc2844 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -37,7 +37,6 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
-#include "WM_api.h"
#include "WM_types.h"
#ifdef RNA_RUNTIME
@@ -47,10 +46,10 @@
static void rna_cloth_update(bContext *C, PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = ptr->id.data;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
static void rna_ClothSettings_max_bend_set(struct PointerRNA *ptr, float value)
@@ -181,50 +180,50 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "mingoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Minimum", "Goal minimum, vertex group weights are scaled to match this range.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "goal_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxgoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Maximum", "Goal maximum, vertex group weights are scaled to match this range.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "goal_default", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "defgoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Default", "Default Goal (vertex target position) value, when no Vertex Group used.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "goal_spring", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalspring");
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Goal Stiffness", "Goal (vertex target position) spring stiffness.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "goal_friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalfrict");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Goal Damping", "Goal (vertex target position) friction.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
/* mass */
prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Mass", "Mass of cloth material.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "mass_vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ClothSettings_mass_vgroup_get", "rna_ClothSettings_mass_vgroup_length", "rna_ClothSettings_mass_vgroup_set");
RNA_def_property_ui_text(prop, "Mass Vertex Group", "Vertex Group for pinning of vertices.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -100.0, 100.0);
RNA_def_property_float_funcs(prop, "rna_ClothSettings_gravity_get", "rna_ClothSettings_gravity_set", NULL);
RNA_def_property_ui_text(prop, "Gravity", "Gravity or external force vector.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
/* various */
@@ -232,73 +231,73 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "Cvi");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Air Damping", "Air has normally some thickness which slows falling things down.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "pin_cloth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_SIMSETTINGS_FLAG_GOAL);
RNA_def_property_ui_text(prop, "Pin Cloth", "Enable pinning of cloth vertices to other objects/positions.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "pin_stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalspring");
RNA_def_property_range(prop, 0.0f, 50.0);
RNA_def_property_ui_text(prop, "Pin Stiffness", "Pin (vertex target position) spring stiffness.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "stepsPerFrame");
RNA_def_property_range(prop, 4, 80);
RNA_def_property_ui_text(prop, "Quality", "Quality of the simulation in steps per frame. (higher is better quality but slower)");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
/* springs */
prop= RNA_def_property(srna, "stiffness_scaling", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_SIMSETTINGS_FLAG_SCALING);
RNA_def_property_ui_text(prop, "Stiffness Scaling", "If enabled, stiffness can be scaled along a weight painted vertex group.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "spring_damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "Cdis");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Spring Damping", "Damping of cloth velocity. (higher = more smooth, less jiggling)");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "structural_stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "structural");
RNA_def_property_range(prop, 1.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Structural Stiffness", "Overall stiffness of structure.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "structural_stiffness_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_struct");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_float_funcs(prop, NULL, "rna_ClothSettings_max_struct_set", NULL);
RNA_def_property_ui_text(prop, "Structural Stiffness Maximum", "Maximum structural stiffness value.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "structural_stiffness_vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ClothSettings_struct_vgroup_get", "rna_ClothSettings_struct_vgroup_length", "rna_ClothSettings_struct_vgroup_set");
RNA_def_property_ui_text(prop, "Structural Stiffness Vertex Group", "Vertex group for fine control over structural stiffness.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "bending_stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bending");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Bending Stiffness", "Wrinkle coefficient. (higher = less smaller but more big wrinkles)");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "bending_stiffness_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_bend");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_float_funcs(prop, NULL, "rna_ClothSettings_max_bend_set", NULL);
RNA_def_property_ui_text(prop, "Bending Stiffness Maximum", "Maximum bending stiffness value.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "bending_vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ClothSettings_bend_vgroup_get", "rna_ClothSettings_bend_vgroup_length", "rna_ClothSettings_bend_vgroup_set");
RNA_def_property_ui_text(prop, "Bending Stiffness Vertex Group", "Vertex group for fine control over bending stiffness.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
/* unused */
@@ -359,48 +358,48 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "enable_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_COLLSETTINGS_FLAG_ENABLED);
RNA_def_property_ui_text(prop, "Enable Collision", "Enable collisions with other objects.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "min_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "epsilon");
RNA_def_property_range(prop, 0.001f, 1.0f);
RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance between collision objects before collision response takes in.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 80.0f);
RNA_def_property_ui_text(prop, "Friction", "Friction force if a collision happened. (higher = less movement)");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "collision_quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "loop_count");
RNA_def_property_range(prop, 1, 20);
RNA_def_property_ui_text(prop, "Collision Quality", "How many collision iterations should be done. (higher is better quality but slower)");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
/* self collision */
prop= RNA_def_property(srna, "enable_self_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_COLLSETTINGS_FLAG_SELF);
RNA_def_property_ui_text(prop, "Enable Self Collision", "Enable self collisions.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "self_min_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "selfepsilon");
RNA_def_property_range(prop, 0.5f, 1.0f);
RNA_def_property_ui_text(prop, "Self Minimum Distance", "0.5 means no distance at all, 1.0 is maximum distance.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "self_friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 80.0f);
RNA_def_property_ui_text(prop, "Self Friction", "Friction/damping with self contact.");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
prop= RNA_def_property(srna, "self_collision_quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "self_loop_count");
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Self Collision Quality", "How many self collision iterations should be done. (higher is better quality but slower)");
- RNA_def_property_update(prop, 0, "rna_cloth_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
}
void RNA_def_cloth(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 83f3042d8ee..a8dc0454cef 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -160,14 +160,15 @@ static char *rna_Constraint_path(PointerRNA *ptr)
static void rna_Constraint_update(bContext *C, PointerRNA *ptr)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= ptr->id.data;
if(ob->pose) update_pose_constraint_flags(ob->pose);
object_test_constraints(ob);
- if(ob->type==OB_ARMATURE) DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
- else DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ if(ob->type==OB_ARMATURE) DAG_object_flush_update(scene, ob, OB_RECALC_DATA|OB_RECALC_OB);
+ else DAG_object_flush_update(scene, ob, OB_RECALC_OB);
}
static void rna_Constraint_dependency_update(bContext *C, PointerRNA *ptr)
@@ -871,15 +872,9 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "offset", PROP_INT, PROP_TIME);
- RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
+ RNA_def_property_range(prop, -300000.0, 300000.f);
RNA_def_property_ui_text(prop, "Offset", "Offset from the position corresponding to the time frame.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
-
- prop= RNA_def_property(srna, "offset_percentage", PROP_FLOAT, PROP_PERCENTAGE);
- RNA_def_property_float_sdna(prop, NULL, "offset"); // XXX we might be better with another var or some hackery?
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Offset Percentage", "Percentage value defining target position along length of bone.");
- RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "forward", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "trackflag");
@@ -894,15 +889,9 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "curve_follow", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "followflag", FOLLOWPATH_FOLLOW);
+ RNA_def_property_boolean_sdna(prop, NULL, "followflag", 1);
RNA_def_property_ui_text(prop, "Follow Curve", "Object will follow the heading and banking of the curve.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
-
- // TODO: do we need to do some special trickery to get offset sane for this?
- prop= RNA_def_property(srna, "fixed_position", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "followflag", FOLLOWPATH_STATIC);
- RNA_def_property_ui_text(prop, "Fixed Position", "Object will stay locked to a single point somewhere along the length of the curve regardless of time.");
- RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
}
static void rna_def_constraint_stretch_to(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 91628bab376..1dd3d0e63c5 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -35,8 +35,6 @@
#include "BKE_font.h"
-#include "WM_types.h"
-
EnumPropertyItem beztriple_handle_type_items[] = {
{HD_FREE, "FREE", 0, "Free", ""},
{HD_AUTO, "AUTO", 0, "Auto", ""},
@@ -50,11 +48,6 @@ EnumPropertyItem beztriple_interpolation_mode_items[] = {
{BEZT_IPO_LIN, "LINEAR", 0, "Linear", ""},
{BEZT_IPO_BEZ, "BEZIER", 0, "Bezier", ""},
{0, NULL, 0, NULL, NULL}};
-
-EnumPropertyItem beztriple_keyframe_type_items[] = {
- {BEZT_KEYTYPE_KEYFRAME, "KEYFRAME", 0, "Keyframe", ""},
- {BEZT_KEYTYPE_BREAKDOWN, "BREAKDOWN", 0, "Breakdown", ""},
- {0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -65,6 +58,7 @@ EnumPropertyItem beztriple_keyframe_type_items[] = {
#include "BKE_main.h"
#include "WM_api.h"
+#include "WM_types.h"
StructRNA *rna_Curve_refine(PointerRNA *ptr)
{
@@ -76,22 +70,6 @@ StructRNA *rna_Curve_refine(PointerRNA *ptr)
else return &RNA_Curve;
}
-
-static PointerRNA rna_Curve_active_nurb_get(PointerRNA *ptr)
-{
- Curve *cu= (Curve*)ptr->data;
- Nurb *nu= NULL;
-
- if(cu->editnurb)
- nu = BLI_findlink(cu->editnurb, cu->actnu);
-
- if(nu)
- return rna_pointer_inherit_refine(ptr, &RNA_Nurb, nu);
-
- return rna_pointer_inherit_refine(ptr, NULL, NULL);
-}
-
-
static void rna_BezTriple_handle1_get(PointerRNA *ptr, float *values)
{
BezTriple *bt= (BezTriple*)ptr->data;
@@ -159,53 +137,12 @@ static void rna_Curve_material_index_range(PointerRNA *ptr, int *min, int *max)
*max= cu->totcol-1;
}
-static void rna_Curve_active_textbox_index_range(PointerRNA *ptr, int *min, int *max)
-{
- Curve *cu= (Curve*)ptr->id.data;
- *min= 0;
- *max= cu->totbox-1;
-}
-
-
-static void rna_Curve_2d_set(PointerRNA *ptr, int value)
-{
- Curve *cu= (Curve*)ptr->id.data;
- Nurb *nu= cu->editnurb ? cu->editnurb->first : cu->nurb.first;
-
- if(value) {
- cu->flag &= ~CU_3D;
- for( ; nu; nu= nu->next) {
- nu->flag |= CU_2D;
- test2DNurb(nu);
-
- /* since the handles are moved they need to be auto-located again */
- if(nu->type == CU_BEZIER)
- calchandlesNurb(nu);
- }
- }
- else {
- cu->flag |= CU_3D;
- for( ; nu; nu= nu->next) {
- nu->flag &= ~CU_2D;
- }
- }
-}
-
-
-
static int rna_Nurb_length(PointerRNA *ptr)
{
Nurb *nu= (Nurb*)ptr->data;
return nu->pntsv>0 ? nu->pntsu*nu->pntsv : nu->pntsu;
}
-static void rna_Nurb_type_set(PointerRNA *ptr, int value)
-{
- Nurb *nu= (Nurb*)ptr->data;
- nu->type = value;
- // XXX - TODO change datatypes
-}
-
static void rna_BPoint_array_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Nurb *nu= (Nurb*)ptr->data;
@@ -214,44 +151,20 @@ static void rna_BPoint_array_begin(CollectionPropertyIterator *iter, PointerRNA
static void rna_Curve_update_data(bContext *C, PointerRNA *ptr)
{
- ID *id= ptr->id.data;
-
- DAG_id_flush_update(id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
-}
-
-static void rna_Nurb_update_handle_data(bContext *C, PointerRNA *ptr)
-{
- Nurb *nu= (Nurb*)ptr->data;
-
- if(nu->type == CU_BEZIER)
- calchandlesNurb(nu);
-
- rna_Curve_update_data(C, ptr);
-}
-
-static void rna_Nurb_update_knot_u(bContext *C, PointerRNA *ptr)
-{
- Nurb *nu= (Nurb*)ptr->data;
-
- clamp_nurb_order_u(nu);
- makeknots(nu, 1);
-
- rna_Curve_update_data(C, ptr);
-}
-
-static void rna_Nurb_update_knot_v(bContext *C, PointerRNA *ptr)
-{
- Nurb *nu= (Nurb*)ptr->data;
-
- clamp_nurb_order_v(nu);
- makeknots(nu, 2);
-
- rna_Curve_update_data(C, ptr);
+ Main *bmain= CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
+ Curve *cu= ptr->id.data;
+ Object *ob;
+
+ for(ob=bmain->object.first; ob; ob= ob->id.next) {
+ if(ob->data == cu) {
+ /* XXX this will loop over all objects again (slow) */
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
+ }
}
-
-
#else
static void rna_def_bpoint(BlenderRNA *brna)
@@ -293,7 +206,7 @@ static void rna_def_bpoint(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Weight", "Softbody goal weight");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "bevel_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "radius");
/*RNA_def_property_range(prop, 0.0f, 1.0f);*/
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -346,15 +259,10 @@ static void rna_def_beztriple(BlenderRNA *brna)
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ipo");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items);
RNA_def_property_ui_text(prop, "Interpolation", "(For F-Curves Only) Interpolation to use for segment of curve starting from current BezTriple.");
- //RNA_def_property_update(prop, 0, "rna_Curve_update_data"); // this should be an F-Curve update call instead...
-
- prop= RNA_def_property(srna, "keyframe_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "hide");
- RNA_def_property_enum_items(prop, beztriple_keyframe_type_items);
- RNA_def_property_ui_text(prop, "Keyframe Type", "(For F-Curves only) The type of keyframe this control point defines.");
- //RNA_def_property_update(prop, 0, "rna_Curve_update_data"); // this should be an F-Curve update call instead...
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* Vector values */
prop= RNA_def_property(srna, "handle1", PROP_FLOAT, PROP_TRANSLATION);
@@ -387,7 +295,7 @@ static void rna_def_beztriple(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Weight", "Softbody goal weight");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "bevel_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "radius");
/*RNA_def_property_range(prop, 0.0f, 1.0f);*/
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -407,22 +315,22 @@ static void rna_def_path(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* flags */
- prop= RNA_def_property(srna, "use_path", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "path", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_PATH);
RNA_def_property_ui_text(prop, "Path", "Enable the curve to become a translation path.");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_path_follow", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "follow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FOLLOW);
RNA_def_property_ui_text(prop, "Follow", "Make curve path children to rotate along the path.");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_stretch", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "stretch", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_STRETCH);
RNA_def_property_ui_text(prop, "Stretch", "Option for curve-deform: makes deformed child to stretch along entire path.");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_time_offset", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "offset_path_distance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_OFFS_PATHDIST);
RNA_def_property_ui_text(prop, "Offset Path Distance", "Children will use TimeOffs value as path distance offset.");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
@@ -493,13 +401,13 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_ui_text(prop, "Shear", "Italic angle of the characters");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "x_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "X Offset", "Horizontal offset from the object center");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "y_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "Y Offset", "Vertical offset from the object center");
@@ -508,29 +416,25 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
prop= RNA_def_property(srna, "ul_position", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ulpos");
RNA_def_property_range(prop, -0.2f, 0.8f);
- RNA_def_property_ui_text(prop, "Underline Position", "Vertical position of underline");
+ RNA_def_property_ui_text(prop, "Underline position", "Vertical position of underline");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "ul_height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ulheight");
RNA_def_property_range(prop, -0.2f, 0.8f);
- RNA_def_property_ui_text(prop, "Underline Thickness", "");
+ RNA_def_property_ui_text(prop, "Underline thickness", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "textboxes", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_sdna(prop, NULL, "tb", "totbox");
- RNA_def_property_struct_type(prop, "TextBox");
- RNA_def_property_ui_text(prop, "Textboxes", "");
-
prop= RNA_def_property(srna, "active_textbox", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "actbox");
+ RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "The active text box", "");
- RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Curve_active_textbox_index_range");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* strings */
prop= RNA_def_property(srna, "family", PROP_STRING, PROP_NONE);
RNA_def_property_string_maxlength(prop, 21);
- RNA_def_property_ui_text(prop, "Object Font", "Use Blender Objects as font characters. Give font objects a common name followed by the character it represents, eg. familya, familyb etc, and turn on Verts Duplication");
+ RNA_def_property_ui_text(prop, "Family", "Blender uses font from selfmade objects.");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "str", PROP_STRING, PROP_NONE);
@@ -551,7 +455,12 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_pointer_sdna(prop, NULL, "vfont");
RNA_def_property_ui_text(prop, "Font", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
-
+
+ prop= RNA_def_property(srna, "textbox", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "tb");
+ RNA_def_property_ui_text(prop, "Textbox", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
+
prop= RNA_def_property(srna, "edit_format", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curinfo");
RNA_def_property_ui_text(prop, "Edit Format", "Editing settings character formatting.");
@@ -676,26 +585,10 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "key");
RNA_def_property_ui_text(prop, "Shape Keys", "");
- prop= RNA_def_property(srna, "splines", PROP_COLLECTION, PROP_NONE);
+ prop= RNA_def_property(srna, "curves", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "nurb", NULL);
RNA_def_property_struct_type(prop, "Nurb");
- RNA_def_property_ui_text(prop, "Splines", "Collection of splines in this curve data object.");
-
- prop= RNA_def_property(srna, "active_spline", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "Nurb");
- RNA_def_property_pointer_funcs(prop, "rna_Curve_active_nurb_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Active Spline", "The active editmode spline");
-
-
- prop= RNA_def_property(srna, "draw_handles", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "drawflag", CU_HIDE_HANDLES);
- RNA_def_property_ui_text(prop, "Draw Handles", "Display bezier handles in editmode.");
- RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL);
-
- prop= RNA_def_property(srna, "draw_normals", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "drawflag", CU_HIDE_NORMALS);
- RNA_def_property_ui_text(prop, "Draw Normals", "Display 3D curve normals in editmode.");
- RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL);
+ RNA_def_property_ui_text(prop, "Curves", "Collection of curves in this curve data object.");
rna_def_path(brna, srna);
@@ -769,7 +662,6 @@ static void rna_def_curve(BlenderRNA *brna)
/* Flags */
prop= RNA_def_property(srna, "curve_2d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CU_3D);
- RNA_def_property_boolean_funcs(prop, NULL, "rna_Curve_2d_set");
RNA_def_property_ui_text(prop, "2D Curve", "Define curve in two dimensions only. Note that fill only works when this is enabled.");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
@@ -783,11 +675,6 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Back", "Draw filled back for extruded/beveled curves.");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_twist_correction", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_NO_TWIST);
- RNA_def_property_ui_text(prop, "Minimal Twist", "Correct for twisting.");
- RNA_def_property_update(prop, 0, "rna_Curve_update_data");
-
prop= RNA_def_property(srna, "retopo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_RETOPO);
RNA_def_property_ui_text(prop, "Retopo", "Turn on the re-topology tool.");
@@ -796,14 +683,6 @@ static void rna_def_curve(BlenderRNA *brna)
static void rna_def_curve_nurb(BlenderRNA *brna)
{
- static EnumPropertyItem curve_type_items[] = {
- {CU_POLY, "POLY", 0, "Poly", ""},
- {CU_BEZIER, "BEZIER", 0, "Bezier", ""},
- {CU_BSPLINE, "BSPLINE", 0, "BSpline", ""},
- {CU_CARDINAL, "CARDINAL", 0, "Cardinal", ""},
- {CU_NURBS, "NURBS", 0, "Ease", ""},
- {0, NULL, 0, NULL, NULL}};
-
static EnumPropertyItem spline_interpolation_items[] = {
{BEZT_IPO_CONST, "LINEAR", 0, "Linear", ""},
{BEZT_IPO_LIN, "CARDINAL", 0, "Cardinal", ""},
@@ -815,18 +694,18 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Nurb", NULL);
- RNA_def_struct_ui_text(srna, "Spline", "Element of a curve, either Nurbs, Bezier or Polyline or a character with text objects.");
+ RNA_def_struct_ui_text(srna, "Nurb", "Element of a curve, either Nurb, Bezier or Polyline or a character with text objects.");
prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "bp", NULL);
RNA_def_property_struct_type(prop, "CurvePoint");
RNA_def_property_collection_funcs(prop, "rna_BPoint_array_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_Nurb_length", 0, 0, 0, 0);
- RNA_def_property_ui_text(prop, "Points", "Collection of points that make up this poly or nurbs spline.");
+ RNA_def_property_ui_text(prop, "Points", "Collection of points for Poly and Nurbs curves.");
prop= RNA_def_property(srna, "bezier_points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "BezierCurvePoint");
RNA_def_property_collection_sdna(prop, NULL, "bezt", "pntsu");
- RNA_def_property_ui_text(prop, "Bezier Points", "Collection of points for bezier curves only.");
+ RNA_def_property_ui_text(prop, "Bezier Points", "Collection of points bezier curves only.");
prop= RNA_def_property(srna, "tilt_interpolation", PROP_ENUM, PROP_NONE);
@@ -841,12 +720,6 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Radius Interpolation", "The type of radius interpolation for Bezier curves.");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- // XXX - switching type probably needs comprehensive recalc of data like in 2.4x
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, curve_type_items);
- RNA_def_property_enum_funcs(prop, NULL, "rna_Nurb_type_set", NULL);
- RNA_def_property_ui_text(prop, "Type", "The interpolation type for this curve element.");
- RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "point_count_u", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/
@@ -864,14 +737,14 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
prop= RNA_def_property(srna, "order_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "orderu");
RNA_def_property_range(prop, 2, 6);
- RNA_def_property_ui_text(prop, "Order U", "Nurbs order in the U direction (For splines and surfaces), Higher values let points influence a greater area");
- RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_u");
+ RNA_def_property_ui_text(prop, "Order U", "Nurbs order in the U direction (For curves and surfaces), Higher values let points influence a greater area");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "order_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "orderv");
RNA_def_property_range(prop, 2, 6);
RNA_def_property_ui_text(prop, "Order V", "Nurbs order in the V direction (For surfaces only), Higher values let points influence a greater area");
- RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_v");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
@@ -889,7 +762,7 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
prop= RNA_def_property(srna, "cyclic_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagu", CU_CYCLIC);
RNA_def_property_ui_text(prop, "Cyclic U", "Make this curve or surface a closed loop in the U direction.");
- RNA_def_property_update(prop, 0, "rna_Nurb_update_handle_data"); /* only needed for cyclic_u because cyclic_v cant do bezier */
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "cyclic_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagv", CU_CYCLIC);
@@ -901,22 +774,22 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
prop= RNA_def_property(srna, "endpoint_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagu", 2);
RNA_def_property_ui_text(prop, "Endpoint U", "Make this nurbs curve or surface meet the endpoints in the U direction (Cyclic U must be disabled).");
- RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_u");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "endpoint_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagv", 2);
RNA_def_property_ui_text(prop, "Endpoint V", "Make this nurbs surface meet the endpoints in the V direction (Cyclic V must be disabled).");
- RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_v");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "bezier_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagu", 4);
RNA_def_property_ui_text(prop, "Bezier U", "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).");
- RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_u");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "bezier_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagv", 4);
RNA_def_property_ui_text(prop, "Bezier V", "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).");
- RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_v");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "smooth", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 8d05cbde74c..f22fd594d8d 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -1001,18 +1001,18 @@ void RNA_def_property_clear_flag(PropertyRNA *prop, int flag)
prop->flag &= ~flag;
}
-void RNA_def_property_array(PropertyRNA *prop, int length)
+void RNA_def_property_array(PropertyRNA *prop, int arraylength)
{
StructRNA *srna= DefRNA.laststruct;
- if(length<0) {
+ if(arraylength<0) {
fprintf(stderr, "RNA_def_property_array: %s.%s, array length must be zero of greater.\n", srna->identifier, prop->identifier);
DefRNA.error= 1;
return;
}
- if(length>RNA_MAX_ARRAY_LENGTH) {
- fprintf(stderr, "RNA_def_property_array: %s.%s, array length must be smaller than %d.\n", srna->identifier, prop->identifier, RNA_MAX_ARRAY_LENGTH);
+ if(arraylength>RNA_MAX_ARRAY) {
+ fprintf(stderr, "RNA_def_property_array: %s.%s, array length must be smaller than %d.\n", srna->identifier, prop->identifier, RNA_MAX_ARRAY);
DefRNA.error= 1;
return;
}
@@ -1021,9 +1021,7 @@ void RNA_def_property_array(PropertyRNA *prop, int length)
case PROP_BOOLEAN:
case PROP_INT:
case PROP_FLOAT:
- prop->arraylength[0]= length;
- prop->totarraylength= length;
- prop->arraydimension= 1;
+ prop->arraylength= arraylength;
break;
default:
fprintf(stderr, "RNA_def_property_array: %s.%s, only boolean/int/float can be array.\n", srna->identifier, prop->identifier);
@@ -1032,44 +1030,6 @@ void RNA_def_property_array(PropertyRNA *prop, int length)
}
}
-void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, int length[])
-{
- StructRNA *srna= DefRNA.laststruct;
- int i;
-
- if (dimension < 1 || dimension > RNA_MAX_ARRAY_DIMENSION) {
- fprintf(stderr, "RNA_def_property_multi_array: %s.%s, array dimension must be between 1 and %d.\n", srna->identifier, prop->identifier, RNA_MAX_ARRAY_DIMENSION);
- DefRNA.error= 1;
- return;
- }
-
- switch(prop->type) {
- case PROP_BOOLEAN:
- case PROP_INT:
- case PROP_FLOAT:
- break;
- default:
- fprintf(stderr, "RNA_def_property_multi_array: %s.%s, only boolean/int/float can be array.\n", srna->identifier, prop->identifier);
- DefRNA.error= 1;
- break;
- }
-
- prop->arraydimension= dimension;
- prop->totarraylength= 0;
-
- if(length) {
- memcpy(prop->arraylength, length, sizeof(int)*dimension);
-
- prop->totarraylength= length[0];
- for(i=1; i<dimension; i++)
- prop->totarraylength *= length[i];
- }
- else
- memset(prop->arraylength, 0, sizeof(prop->arraylength));
-
- /* TODO make sure arraylength values are sane */
-}
-
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
{
prop->name= name;
@@ -1213,14 +1173,8 @@ void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item
defaultfound= 1;
}
- if(!defaultfound) {
- for(i=0; item[i].identifier; i++) {
- if(item[i].identifier[0]) {
- eprop->defaultvalue= item[i].value;
- break;
- }
- }
- }
+ if(!defaultfound)
+ eprop->defaultvalue= item[0].value;
break;
}
@@ -1440,15 +1394,10 @@ static PropertyDefRNA *rna_def_property_sdna(PropertyRNA *prop, const char *stru
}
}
- if(smember.arraylength > 1) {
- prop->arraylength[0]= smember.arraylength;
- prop->totarraylength= smember.arraylength;
- prop->arraydimension= 1;
- }
- else {
- prop->arraydimension= 0;
- prop->totarraylength= 0;
- }
+ if(smember.arraylength > 1)
+ prop->arraylength= smember.arraylength;
+ else
+ prop->arraylength= 0;
dp->dnastructname= structname;
dp->dnastructfromname= ds->dnafromname;
@@ -1568,10 +1517,8 @@ void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const
}
if((dp=rna_def_property_sdna(prop, structname, propname))) {
- if(prop->arraydimension) {
- prop->arraydimension= 0;
- prop->totarraylength= 0;
-
+ if(prop->arraylength) {
+ prop->arraylength= 0;
if(!DefRNA.silent) {
fprintf(stderr, "RNA_def_property_enum_sdna: %s.%s, array not supported for enum type.\n", structname, propname);
DefRNA.error= 1;
@@ -1610,10 +1557,9 @@ void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, con
}
if((dp=rna_def_property_sdna(prop, structname, propname))) {
- if(prop->arraydimension) {
- sprop->maxlength= prop->totarraylength;
- prop->arraydimension= 0;
- prop->totarraylength= 0;
+ if(prop->arraylength) {
+ sprop->maxlength= prop->arraylength;
+ prop->arraylength= 0;
}
}
}
@@ -1635,10 +1581,8 @@ void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, co
}
if((dp=rna_def_property_sdna(prop, structname, propname))) {
- if(prop->arraydimension) {
- prop->arraydimension= 0;
- prop->totarraylength= 0;
-
+ if(prop->arraylength) {
+ prop->arraylength= 0;
if(!DefRNA.silent) {
fprintf(stderr, "RNA_def_property_pointer_sdna: %s.%s, array not supported for pointer type.\n", structname, propname);
DefRNA.error= 1;
@@ -1665,9 +1609,8 @@ void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname,
}
if((dp=rna_def_property_sdna(prop, structname, propname))) {
- if(prop->arraydimension && !lengthpropname) {
- prop->arraydimension= 0;
- prop->totarraylength= 0;
+ if(prop->arraylength && !lengthpropname) {
+ prop->arraylength= 0;
if(!DefRNA.silent) {
fprintf(stderr, "RNA_def_property_collection_sdna: %s.%s, array of collections not supported.\n", structname, propname);
@@ -1691,9 +1634,8 @@ void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname,
if(lengthpropname[0] == 0 || rna_find_sdna_member(DefRNA.sdna, structname, lengthpropname, &smember)) {
if(lengthpropname[0] == 0) {
- dp->dnalengthfixed= prop->totarraylength;
- prop->arraydimension= 0;
- prop->totarraylength= 0;
+ dp->dnalengthfixed= prop->arraylength;
+ prop->arraylength= 0;
}
else {
dp->dnalengthstructname= structname;
@@ -1740,22 +1682,6 @@ void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
prop->update= (UpdateFunc)func;
}
-void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength)
-{
- if(!DefRNA.preprocess) {
- fprintf(stderr, "RNA_def_property_*_funcs: only during preprocessing.\n");
- return;
- }
-
- if (!(prop->flag & PROP_DYNAMIC)) {
- fprintf(stderr, "RNA_def_property_dynamic_array_funcs: property is a not dynamic array.\n");
- DefRNA.error= 1;
- return;
- }
-
- if(getlength) prop->getlength= (PropArrayLengthGetFunc)getlength;
-}
-
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
{
StructRNA *srna= DefRNA.laststruct;
@@ -1769,7 +1695,7 @@ void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const ch
case PROP_BOOLEAN: {
BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
- if(prop->arraydimension) {
+ if(prop->arraylength) {
if(get) bprop->getarray= (PropBooleanArrayGetFunc)get;
if(set) bprop->setarray= (PropBooleanArraySetFunc)set;
}
@@ -1799,7 +1725,7 @@ void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *
case PROP_INT: {
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
- if(prop->arraydimension) {
+ if(prop->arraylength) {
if(get) iprop->getarray= (PropIntArrayGetFunc)get;
if(set) iprop->setarray= (PropIntArraySetFunc)set;
}
@@ -1830,7 +1756,7 @@ void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char
case PROP_FLOAT: {
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
- if(prop->arraydimension) {
+ if(prop->arraylength) {
if(get) fprop->getarray= (PropFloatArrayGetFunc)get;
if(set) fprop->setarray= (PropFloatArraySetFunc)set;
}
@@ -1982,34 +1908,6 @@ PropertyRNA *RNA_def_boolean_array(StructOrFunctionRNA *cont_, const char *ident
return prop;
}
-PropertyRNA *RNA_def_boolean_layer(StructOrFunctionRNA *cont_, const char *identifier, int len, int *default_value,
- const char *ui_name, const char *ui_description)
-{
- ContainerRNA *cont= cont_;
- PropertyRNA *prop;
-
- prop= RNA_def_property(cont, identifier, PROP_BOOLEAN, PROP_LAYER);
- if(len != 0) RNA_def_property_array(prop, len);
- if(default_value) RNA_def_property_boolean_array_default(prop, default_value);
- RNA_def_property_ui_text(prop, ui_name, ui_description);
-
- return prop;
-}
-
-PropertyRNA *RNA_def_boolean_layer_member(StructOrFunctionRNA *cont_, const char *identifier, int len, int *default_value,
- const char *ui_name, const char *ui_description)
-{
- ContainerRNA *cont= cont_;
- PropertyRNA *prop;
-
- prop= RNA_def_property(cont, identifier, PROP_BOOLEAN, PROP_LAYER_MEMBER);
- if(len != 0) RNA_def_property_array(prop, len);
- if(default_value) RNA_def_property_boolean_array_default(prop, default_value);
- RNA_def_property_ui_text(prop, ui_name, ui_description);
-
- return prop;
-}
-
PropertyRNA *RNA_def_boolean_vector(StructOrFunctionRNA *cont_, const char *identifier, int len, int *default_value,
const char *ui_name, const char *ui_description)
{
@@ -2181,15 +2079,14 @@ PropertyRNA *RNA_def_float_color(StructOrFunctionRNA *cont_, const char *identif
}
-PropertyRNA *RNA_def_float_matrix(StructOrFunctionRNA *cont_, const char *identifier, int rows, int columns, const float *default_value,
+PropertyRNA *RNA_def_float_matrix(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value,
float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
{
ContainerRNA *cont= cont_;
PropertyRNA *prop;
- int length[2]= {rows, columns};
prop= RNA_def_property(cont, identifier, PROP_FLOAT, PROP_MATRIX);
- RNA_def_property_multi_array(prop, 2, length);
+ if(len != 0) RNA_def_property_array(prop, len);
if(default_value) RNA_def_property_float_array_default(prop, default_value);
if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
RNA_def_property_ui_text(prop, ui_name, ui_description);
@@ -2386,12 +2283,11 @@ void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
int rna_parameter_size(PropertyRNA *parm)
{
PropertyType ptype= parm->type;
- int len= parm->totarraylength; /* only supports fixed length at the moment */
+ int len= parm->arraylength;
- if(len > 0) {
- if (parm->flag & PROP_DYNAMIC)
- return sizeof(void *);
+ if (parm->flag & PROP_DYNAMIC_ARRAY) return sizeof(void*);
+ if(len > 0) {
switch (ptype) {
case PROP_BOOLEAN:
case PROP_INT:
@@ -2536,8 +2432,8 @@ void RNA_def_property_duplicate_pointers(PropertyRNA *prop)
BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
if(bprop->defaultarray) {
- iarray= MEM_callocN(sizeof(int)*prop->totarraylength, "RNA_def_property_store");
- memcpy(iarray, bprop->defaultarray, sizeof(int)*prop->totarraylength);
+ iarray= MEM_callocN(sizeof(int)*prop->arraylength, "RNA_def_property_store");
+ memcpy(iarray, bprop->defaultarray, sizeof(int)*prop->arraylength);
bprop->defaultarray= iarray;
}
break;
@@ -2546,8 +2442,8 @@ void RNA_def_property_duplicate_pointers(PropertyRNA *prop)
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
if(iprop->defaultarray) {
- iarray= MEM_callocN(sizeof(int)*prop->totarraylength, "RNA_def_property_store");
- memcpy(iarray, iprop->defaultarray, sizeof(int)*prop->totarraylength);
+ iarray= MEM_callocN(sizeof(int)*prop->arraylength, "RNA_def_property_store");
+ memcpy(iarray, iprop->defaultarray, sizeof(int)*prop->arraylength);
iprop->defaultarray= iarray;
}
break;
@@ -2572,8 +2468,8 @@ void RNA_def_property_duplicate_pointers(PropertyRNA *prop)
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
if(fprop->defaultarray) {
- farray= MEM_callocN(sizeof(float)*prop->totarraylength, "RNA_def_property_store");
- memcpy(farray, fprop->defaultarray, sizeof(float)*prop->totarraylength);
+ farray= MEM_callocN(sizeof(float)*prop->arraylength, "RNA_def_property_store");
+ memcpy(farray, fprop->defaultarray, sizeof(float)*prop->arraylength);
fprop->defaultarray= farray;
}
break;
@@ -2617,14 +2513,13 @@ void RNA_def_property_free_pointers(PropertyRNA *prop)
}
case PROP_ENUM: {
EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
+ if(eprop->item) MEM_freeN((void*)eprop->item);
for(a=0; a<eprop->totitem; a++) {
if(eprop->item[a].identifier) MEM_freeN((void*)eprop->item[a].identifier);
if(eprop->item[a].name) MEM_freeN((void*)eprop->item[a].name);
if(eprop->item[a].description) MEM_freeN((void*)eprop->item[a].description);
}
-
- if(eprop->item) MEM_freeN((void*)eprop->item);
break;
}
case PROP_STRING: {
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index bafe83f1812..fa6eea5f8a9 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -34,8 +34,6 @@
#include "MEM_guardedalloc.h"
-#include "WM_types.h"
-
EnumPropertyItem fmodifier_type_items[] = {
{FMODIFIER_TYPE_NULL, "NULL", 0, "Invalid", ""},
{FMODIFIER_TYPE_GENERATOR, "GENERATOR", 0, "Generator", ""},
@@ -170,20 +168,17 @@ static void rna_def_fmodifier_generator(BlenderRNA *brna)
prop= RNA_def_property(srna, "additive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_GENERATOR_ADDITIVE);
RNA_def_property_ui_text(prop, "Additive", "Values generated by this modifier are applied on top of the existing values instead of overwriting them.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
// XXX this has a special validation func
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_mode_items);
RNA_def_property_ui_text(prop, "Mode", "Type of generator to use.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
/* order of the polynomial */
// XXX this has a special validation func
prop= RNA_def_property(srna, "poly_order", PROP_INT, PROP_NONE);
RNA_def_property_ui_text(prop, "Polynomial Order", "The highest power of 'x' for this polynomial. (number of coefficients - 1)");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
/* coefficients array */
// FIXME: this is quite difficult to try to wrap
@@ -215,31 +210,25 @@ static void rna_def_fmodifier_function_generator(BlenderRNA *brna)
/* coefficients */
prop= RNA_def_property(srna, "amplitude", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Amplitude", "Scale factor determining the maximum/minimum values.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "phase_multiplier", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Phase Multiplier", "Scale factor determining the 'speed' of the function.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "phase_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Phase Offset", "Constant factor to offset time by for function.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "value_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Value Offset", "Constant factor to offset values by.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
/* flags */
prop= RNA_def_property(srna, "additive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_GENERATOR_ADDITIVE);
RNA_def_property_ui_text(prop, "Additive", "Values generated by this modifier are applied on top of the existing values instead of overwriting them.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "function_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, "Type", "Type of built-in function to use.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
/* --------- */
@@ -260,18 +249,15 @@ static void rna_def_fmodifier_envelope_ctrl(BlenderRNA *brna)
prop= RNA_def_property(srna, "minimum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min");
RNA_def_property_ui_text(prop, "Minimum Value", "Lower bound of envelope at this control-point.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "maximum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max");
RNA_def_property_ui_text(prop, "Maximum Value", "Upper bound of envelope at this control-point.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
/* Frame */
prop= RNA_def_property(srna, "frame", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "time");
RNA_def_property_ui_text(prop, "Frame", "Frame this control-point occurs on.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
// TODO:
// - selection flags (not implemented in UI yet though)
@@ -296,17 +282,14 @@ static void rna_def_fmodifier_envelope(BlenderRNA *brna)
prop= RNA_def_property(srna, "reference_value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "midval");
RNA_def_property_ui_text(prop, "Reference Value", "Value that envelope's influence is centered around / based on.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "default_minimum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min");
RNA_def_property_ui_text(prop, "Default Minimum", "Lower distance from Reference Value for 1:1 default influence.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "default_maximum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max");
RNA_def_property_ui_text(prop, "Default Maximum", "Upper distance from Reference Value for 1:1 default influence.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
/* --------- */
@@ -331,21 +314,18 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna)
prop= RNA_def_property(srna, "before_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Before Mode", "Cycling mode to use before first keyframe.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "before_cycles", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Before Cycles", "Maximum number of cycles to allow before first keyframe. (0 = infinite)");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
+
/* after */
prop= RNA_def_property(srna, "after_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "After Mode", "Cycling mode to use after last keyframe.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "after_cycles", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "After Cycles", "Maximum number of cycles to allow after last keyframe. (0 = infinite)");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
/* --------- */
@@ -374,42 +354,34 @@ static void rna_def_fmodifier_limits(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_minimum_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_LIMIT_XMIN);
RNA_def_property_ui_text(prop, "Minimum X", "Use the minimum X value.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "use_minimum_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_LIMIT_YMIN);
RNA_def_property_ui_text(prop, "Minimum Y", "Use the minimum Y value.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "use_maximum_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_LIMIT_XMAX);
RNA_def_property_ui_text(prop, "Maximum X", "Use the maximum X value.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "use_maximum_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_LIMIT_YMAX);
RNA_def_property_ui_text(prop, "Maximum Y", "Use the maximum Y value.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "minimum_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rect.xmin");
RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "minimum_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rect.ymin");
RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "maximum_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rect.xmax");
RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "maximum_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rect.ymax");
RNA_def_property_ui_text(prop, "Maximum Y", "Highest Y value to allow.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
/* --------- */
@@ -433,27 +405,22 @@ static void rna_def_fmodifier_noise(BlenderRNA *brna)
prop= RNA_def_property(srna, "modification", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_modification_items);
RNA_def_property_ui_text(prop, "Modification", "Method of modifying the existing F-Curve.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Size", "Scaling (in time) of the noise");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "strength");
RNA_def_property_ui_text(prop, "Strength", "Amplitude of the noise - the amount that it modifies the underlying curve");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "phase", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "phase");
RNA_def_property_ui_text(prop, "Phase", "A random seed for the noise effect");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "depth");
RNA_def_property_ui_text(prop, "Depth", "Amount of fine level detail present in the noise");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
}
@@ -492,20 +459,17 @@ void rna_def_fmodifier(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_MUTED);
RNA_def_property_ui_text(prop, "Muted", "F-Curve Modifier will not be evaluated.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
// XXX this is really an internal flag, but it may be useful for some tools to be able to access this...
prop= RNA_def_property(srna, "disabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_DISABLED);
RNA_def_property_ui_text(prop, "Disabled", "F-Curve Modifier has invalid settings and will not be evaluated.");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
// TODO: setting this to true must ensure that all others in stack are turned off too...
prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_ACTIVE);
RNA_def_property_ui_text(prop, "Active", "F-Curve Modifier is the one being edited ");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
}
/* *********************** */
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index a62002365c9..936e1700ed7 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -72,17 +72,10 @@ static StructRNA* rna_FluidSettings_refine(struct PointerRNA *ptr)
}
}
-static void rna_fluid_update(bContext *C, PointerRNA *ptr)
-{
- Object *ob= ptr->id.data;
-
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
-}
-
static void rna_FluidSettings_update_type(bContext *C, PointerRNA *ptr)
{
Main *bmain= CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
Object *ob= (Object*)ptr->id.data;
FluidsimModifierData *fluidmd;
ParticleSystemModifierData *psmd;
@@ -131,7 +124,8 @@ static void rna_FluidSettings_update_type(bContext *C, PointerRNA *ptr)
}
}
- rna_fluid_update(C, ptr);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
}
static void rna_DomainFluidSettings_memory_estimate_get(PointerRNA *ptr, char *value)
@@ -168,7 +162,7 @@ static void rna_def_fluidsim_slip(StructRNA *srna)
RNA_def_property_enum_items(prop, slip_items);
RNA_def_property_ui_text(prop, "Slip Type", "");
- prop= RNA_def_property(srna, "partial_slip_factor", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "partial_slip_amount", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "partSlipValue");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Partial Slip Amount", "Amount of mixing between no- and free-slip, 0 is no slip and 1 is free slip.");
@@ -222,7 +216,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "guiDisplayMode");
RNA_def_property_enum_items(prop, quality_items);
RNA_def_property_ui_text(prop, "Viewport Display Mode", "How to display the mesh in the viewport.");
- RNA_def_property_update(prop, 0, "rna_fluid_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "render_display_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "renderDisplayMode");
@@ -237,7 +231,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_string_maxlength(prop, 240);
RNA_def_property_string_sdna(prop, NULL, "surfdataPath");
RNA_def_property_ui_text(prop, "Path", "Directory (and/or filename prefix) to store baked fluid simulation files in.");
- RNA_def_property_update(prop, 0, "rna_fluid_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "memory_estimate", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -437,7 +431,7 @@ static void rna_def_fluidsim_particle(BlenderRNA *brna)
RNA_def_property_string_maxlength(prop, 240);
RNA_def_property_string_sdna(prop, NULL, "surfdataPath");
RNA_def_property_ui_text(prop, "Path", "Directory (and/or filename prefix) to store and load particles from.");
- RNA_def_property_update(prop, 0, "rna_fluid_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
}
static void rna_def_fluidsim_control(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
deleted file mode 100644
index 72e77e93607..00000000000
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ /dev/null
@@ -1,252 +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * Contributor(s): Blender Foundation (2009), Joshua Leung
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <stdlib.h>
-
-#include "RNA_define.h"
-#include "RNA_types.h"
-#include "RNA_enum_types.h"
-
-#include "rna_internal.h"
-
-#include "DNA_gpencil_types.h"
-#include "DNA_scene_types.h"
-
-#include "MEM_guardedalloc.h"
-
-#ifdef RNA_RUNTIME
-
-static int rna_GPencilLayer_active_frame_editable(PointerRNA *ptr)
-{
- bGPDlayer *gpl= (bGPDlayer *)ptr->data;
-
- /* surely there must be other criteria too... */
- if (gpl->flag & GP_LAYER_LOCKED)
- return 0;
- else
- return 1;
-}
-
-void rna_GPencilLayer_active_set(PointerRNA *ptr, int value)
-{
- bGPdata *gpd= ptr->id.data;
- bGPDlayer *gpl= ptr->data;
-
- /* disabled all other layers anyway */
- if (GS(gpd->id.name) == ID_GD) {
- bGPDlayer *gl;
-
- for (gl= gpd->layers.first; gl; gl= gl->next)
- gl->flag &= ~GP_LAYER_ACTIVE;
- }
-
- /* if enabling value, make it active */
- if (value)
- gpl->flag |= GP_LAYER_ACTIVE;
-}
-
-#else
-
-void rna_def_gpencil_stroke_point(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "GPencilStrokePoint", NULL);
- RNA_def_struct_sdna(srna, "bGPDspoint");
- RNA_def_struct_ui_text(srna, "Grease Pencil Stroke Point", "Data point for freehand stroke curve.");
-
- prop= RNA_def_property(srna, "coordinates", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "x");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Coordinates", "");
-
- prop= RNA_def_property(srna, "pressure", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "pressure");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Pressure", "Pressure of tablet at point when drawing it.");
-}
-
-void rna_def_gpencil_stroke(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "GPencilStroke", NULL);
- RNA_def_struct_sdna(srna, "bGPDstroke");
- RNA_def_struct_ui_text(srna, "Grease Pencil Stroke", "Freehand curve defining part of a sketch.");
-
- /* Points */
- prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_sdna(prop, NULL, "points", "totpoints");
- RNA_def_property_struct_type(prop, "GPencilStrokePoint");
- RNA_def_property_ui_text(prop, "Stroke Points", "Stroke data points");
-
- /* Flags - Readonly type-info really... */
- // TODO...
-}
-
-void rna_def_gpencil_frame(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "GPencilFrame", NULL);
- RNA_def_struct_sdna(srna, "bGPDframe");
- RNA_def_struct_ui_text(srna, "Grease Pencil Frame", "Collection of related sketches on a particular frame");
-
- /* Strokes */
- prop= RNA_def_property(srna, "strokes", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_sdna(prop, NULL, "strokes", NULL);
- RNA_def_property_struct_type(prop, "GPencilStroke");
- RNA_def_property_ui_text(prop, "Strokes", "Freehand curves defining the sketch on this frame.");
-
- /* Frame Number */
- prop= RNA_def_property(srna, "frame_number", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "framenum");
- RNA_def_property_range(prop, MINFRAME, MAXFRAME); // XXX note: this cannot occur on the same frame as another sketch
- RNA_def_property_ui_text(prop, "Frame Number", "The frame on which this sketch appears.");
-
- /* Flags */
- prop= RNA_def_property(srna, "paint_lock", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_FRAME_PAINT); // XXX should it be editable?
- RNA_def_property_ui_text(prop, "Paint Lock", "Frame is being edited (painted on).");
-
- prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_FRAME_SELECT);
- RNA_def_property_ui_text(prop, "Selected", "Frame is selected for editing in the DopeSheet.");
-}
-
-void rna_def_gpencil_layer(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "GPencilLayer", NULL);
- RNA_def_struct_sdna(srna, "bGPDlayer");
- RNA_def_struct_ui_text(srna, "Grease Pencil Layer", "Collection of related sketches");
-
- /* Name */
- prop= RNA_def_property(srna, "info", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Info", "Description of layer");
- RNA_def_struct_name_property(srna, prop);
-
- /* Frames */
- prop= RNA_def_property(srna, "frames", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_sdna(prop, NULL, "frames", NULL);
- RNA_def_property_struct_type(prop, "GPencilFrame");
- RNA_def_property_ui_text(prop, "Frames", "Sketches for this layer on different frames.");
-
- /* Active Frame */
- prop= RNA_def_property(srna, "active_frame", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "actframe");
- RNA_def_property_ui_text(prop, "Active Frame", "Frame currently being displayed for this layer.");
- RNA_def_property_editable_func(prop, "rna_GPencilLayer_active_frame_editable");
-
- /* Drawing Color */
- prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Color", "Color that all sketches in this layer are drawn with.");
-
- prop= RNA_def_property(srna, "opacity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "color[3]");
- RNA_def_property_range(prop, 0.3, 1.0f);
- RNA_def_property_ui_text(prop, "Opacity", "Visibility of strokes.");
-
- /* Line Thickness */
- prop= RNA_def_property(srna, "line_thickness", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "thickness");
- RNA_def_property_range(prop, 1, 10);
- RNA_def_property_ui_text(prop, "Thickness", "Thickness of strokes (in pixels).");
-
- /* Onion-Skinning */
- prop= RNA_def_property(srna, "use_onion_skinning", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_ONIONSKIN);
- RNA_def_property_ui_text(prop, "Use Onion Skinning", "Ghost frames on either side of frame.");
-
- prop= RNA_def_property(srna, "max_ghost_range", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "gstep");
- RNA_def_property_range(prop, 0, 120);
- RNA_def_property_ui_text(prop, "Max Ghost Range", "Maximum number of frames on either side of the active frame to show. (0 = just show the 'first' available sketch on either side)");
-
- /* Flags */
- prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_HIDE);
- RNA_def_property_ui_text(prop, "Hide", "Layer doesn't get drawn.");
-
- prop= RNA_def_property(srna, "locked", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_LOCKED);
- RNA_def_property_ui_text(prop, "Locked", "Layer is protected from further editing and/or frame changes.");
-
- prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_ACTIVE);
- RNA_def_property_boolean_funcs(prop, NULL, "rna_GPencilLayer_active_set");
- RNA_def_property_ui_text(prop, "Active", "Layer is 'active' layer being edited.");
-
- prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_SELECT);
- RNA_def_property_ui_text(prop, "Selected", "Layer is selected for editing in the DopeSheet.");
-
- // XXX keep this option?
- prop= RNA_def_property(srna, "show_points", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_DRAWDEBUG);
- RNA_def_property_ui_text(prop, "Show Points", "Draw the points which make up the strokes (for debugging purposes).");
-
-}
-
-void rna_def_gpencil_data(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "GreasePencil", "ID");
- RNA_def_struct_sdna(srna, "bGPdata");
- RNA_def_struct_ui_text(srna, "Grease Pencil", "Freehand annotation sketchbook.");
- RNA_def_struct_ui_icon(srna, ICON_GREASEPENCIL);
-
- /* Layers */
- prop= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_sdna(prop, NULL, "layers", NULL);
- RNA_def_property_struct_type(prop, "GPencilLayer");
- RNA_def_property_ui_text(prop, "Layers", "Similar to layers in Photoshop.");
-
- /* Flags */
- prop= RNA_def_property(srna, "view_space_draw", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_DATA_VIEWALIGN);
- RNA_def_property_ui_text(prop, "Stick to View", "Newly drawn strokes get added in view space (i.e. sketches stick to data when view is manipulated).");
-}
-
-/* --- */
-
-void RNA_def_gpencil(BlenderRNA *brna)
-{
- rna_def_gpencil_data(brna);
-
- rna_def_gpencil_layer(brna);
- rna_def_gpencil_frame(brna);
- rna_def_gpencil_stroke(brna);
- rna_def_gpencil_stroke_point(brna);
-}
-
-#endif
diff --git a/source/blender/makesrna/intern/rna_group.c b/source/blender/makesrna/intern/rna_group.c
index 31bc6ccc74b..18c04fbfb50 100644
--- a/source/blender/makesrna/intern/rna_group.c
+++ b/source/blender/makesrna/intern/rna_group.c
@@ -63,7 +63,7 @@ void RNA_def_group(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Objects", "A collection of this groups objects.");
RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Group_objects_get", 0, 0, 0, 0, 0);
- prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_LAYER);
+ prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layer", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Dupli Layers", "Layers visible when this groups is instanced as a dupli.");
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 31033031f4d..fee379cd285 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -1,5 +1,5 @@
/**
- * $Id$
+ *
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index c33a59cde3c..af94f0ccc6f 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -130,7 +130,6 @@ void RNA_def_curve(struct BlenderRNA *brna);
void RNA_def_fluidsim(struct BlenderRNA *brna);
void RNA_def_fcurve(struct BlenderRNA *brna);
void RNA_def_gameproperty(struct BlenderRNA *brna);
-void RNA_def_gpencil(struct BlenderRNA *brna);
void RNA_def_group(struct BlenderRNA *brna);
void RNA_def_image(struct BlenderRNA *brna);
void RNA_def_key(struct BlenderRNA *brna);
@@ -157,7 +156,6 @@ void RNA_def_sensor(struct BlenderRNA *brna);
void RNA_def_sequence(struct BlenderRNA *brna);
void RNA_def_smoke(struct BlenderRNA *brna);
void RNA_def_space(struct BlenderRNA *brna);
-void RNA_def_test(struct BlenderRNA *brna);
void RNA_def_text(struct BlenderRNA *brna);
void RNA_def_texture(struct BlenderRNA *brna);
void RNA_def_timeline_marker(struct BlenderRNA *brna);
@@ -196,18 +194,16 @@ void rna_object_vcollayer_name_set(struct PointerRNA *ptr, const char *value, ch
void rna_Object_update(struct bContext *C, struct PointerRNA *ptr);
void rna_Object_update_data(struct bContext *C, struct PointerRNA *ptr);
-void rna_Mesh_update_draw(struct bContext *C, struct PointerRNA *ptr);
/* API functions */
void RNA_api_action(StructRNA *srna);
void RNA_api_image(struct StructRNA *srna);
-void RNA_api_keyingset(struct StructRNA *srna);
void RNA_api_main(struct StructRNA *srna);
void RNA_api_material(StructRNA *srna);
void RNA_api_mesh(struct StructRNA *srna);
void RNA_api_object(struct StructRNA *srna);
-void RNA_api_scene(struct StructRNA *srna);
+void RNA_api_scene(struct StructRNA *srna);
void RNA_api_ui_layout(struct StructRNA *srna);
void RNA_api_wm(struct StructRNA *srna);
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index 645bc50ed89..12bd876ce52 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -39,13 +39,7 @@ struct bContext;
struct IDProperty;
struct GHash;
-#ifdef UNIT_TEST
-#define RNA_MAX_ARRAY_LENGTH 64
-#else
-#define RNA_MAX_ARRAY_LENGTH 32
-#endif
-
-#define RNA_MAX_ARRAY_DIMENSION 3
+#define RNA_MAX_ARRAY 32
/* Function Callbacks */
@@ -55,7 +49,6 @@ typedef struct IDProperty* (*IDPropertiesFunc)(struct PointerRNA *ptr, int creat
typedef struct StructRNA *(*StructRefineFunc)(struct PointerRNA *ptr);
typedef char *(*StructPathFunc)(struct PointerRNA *ptr);
-typedef int (*PropArrayLengthGetFunc)(struct PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION]);
typedef int (*PropBooleanGetFunc)(struct PointerRNA *ptr);
typedef void (*PropBooleanSetFunc)(struct PointerRNA *ptr, int value);
typedef void (*PropBooleanArrayGetFunc)(struct PointerRNA *ptr, int *values);
@@ -136,13 +129,8 @@ struct PropertyRNA {
PropertyType type;
/* subtype, 'interpretation' of the property */
PropertySubType subtype;
- /* if non-NULL, overrides arraylength. Must not return 0? */
- PropArrayLengthGetFunc getlength;
- /* dimension of array */
- unsigned int arraydimension;
- /* array lengths lengths for all dimensions (when arraydimension > 0) */
- unsigned int arraylength[RNA_MAX_ARRAY_DIMENSION];
- unsigned int totarraylength;
+ /* if an array this is > 0, specifying the length */
+ unsigned int arraylength;
/* callback for updates on change */
UpdateFunc update;
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index fbe339fe7f3..88047cda12b 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -260,13 +260,14 @@ static PointerRNA rna_ShapeKey_data_get(CollectionPropertyIterator *iter)
static void rna_Key_update_data(bContext *C, PointerRNA *ptr)
{
Main *bmain= CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
Key *key= ptr->id.data;
Object *ob;
for(ob=bmain->object.first; ob; ob= ob->id.next) {
if(ob_get_key(ob) == key) {
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
}
}
}
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index 1f7eee4d2d8..b53a0589ba6 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -89,10 +89,18 @@ static void rna_Lattice_points_begin(CollectionPropertyIterator *iter, PointerRN
static void rna_Lattice_update_data(bContext *C, PointerRNA *ptr)
{
- ID *id= ptr->id.data;
+ Main *bmain= CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
+ Lattice *lt= ptr->id.data;
+ Object *ob;
- DAG_id_flush_update(id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
+ for(ob=bmain->object.first; ob; ob= ob->id.next) {
+ if(ob->data == lt) {
+ /* XXX this will loop over all objects again (slow) */
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
+ }
}
static void rna_Lattice_update_size(bContext *C, PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index 344135acaff..4a24027f7e9 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -207,30 +207,12 @@ static void rna_Main_particle_begin(CollectionPropertyIterator *iter, PointerRNA
rna_iterator_listbase_begin(iter, &bmain->particle, NULL);
}
-static void rna_Main_gpencil_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
-{
- Main *bmain= (Main*)ptr->data;
- rna_iterator_listbase_begin(iter, &bmain->gpencil, NULL);
-}
-
static void rna_Main_wm_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Main *bmain= (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->wm, NULL);
}
-#ifdef UNIT_TEST
-
-static PointerRNA rna_Test_test_get(PointerRNA *ptr)
-{
- PointerRNA ret= *ptr;
- ret.type= &RNA_Test;
-
- return ret;
-}
-
-#endif
-
#else
void RNA_def_main(BlenderRNA *brna)
@@ -258,14 +240,13 @@ void RNA_def_main(BlenderRNA *brna)
{"brushes", "Brush", "rna_Main_brush_begin", "Brushes", "Brush datablocks.", NULL, NULL},
{"worlds", "World", "rna_Main_world_begin", "Worlds", "World datablocks.", NULL, NULL},
{"groups", "Group", "rna_Main_group_begin", "Groups", "Group datablocks.", NULL, NULL},
- {"keys", "Key", "rna_Main_key_begin", "Keys", "Key datablocks.", NULL, NULL},
+ {"keys", "ID", "rna_Main_key_begin", "Keys", "Key datablocks.", NULL, NULL},
{"scripts", "ID", "rna_Main_script_begin", "Scripts", "Script datablocks.", NULL, NULL},
{"texts", "Text", "rna_Main_text_begin", "Texts", "Text datablocks.", NULL, NULL},
{"sounds", "ID", "rna_Main_sound_begin", "Sounds", "Sound datablocks.", NULL, NULL},
{"armatures", "Armature", "rna_Main_armature_begin", "Armatures", "Armature datablocks.", NULL, NULL},
{"actions", "Action", "rna_Main_action_begin", "Actions", "Action datablocks.", NULL, NULL},
{"particles", "ParticleSettings", "rna_Main_particle_begin", "Particles", "Particle datablocks.", NULL, NULL},
- {"gpencil", "GreasePencil", "rna_Main_gpencil_begin", "Grease Pencil", "Grease Pencil datablocks.", NULL, NULL},
{NULL, NULL, NULL, NULL, NULL, NULL, NULL}};
int i;
@@ -288,18 +269,6 @@ void RNA_def_main(BlenderRNA *brna)
}
RNA_api_main(srna);
-
-#ifdef UNIT_TEST
-
- RNA_define_verify_sdna(0);
-
- prop= RNA_def_property(srna, "test", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "Test");
- RNA_def_property_pointer_funcs(prop, "rna_Test_test_get", NULL, NULL);
-
- RNA_define_verify_sdna(1);
-
-#endif
}
#endif
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 44098e96547..93d6b0283bd 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -35,20 +35,6 @@
#include "WM_types.h"
-static EnumPropertyItem prop_texture_coordinates_items[] = {
-{TEXCO_GLOB, "GLOBAL", 0, "Global", "Uses global coordinates for the texture coordinates."},
-{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", "Uses normalized strand texture coordinate (1D)."},
-{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."},
-{TEXCO_REFL, "REFLECTION", 0, "Reflection", "Uses reflection vector as texture coordinates."},
-{TEXCO_STRESS, "STRESS", 0, "Stress", "Uses the difference of edge lengths compared to original coordinates of the mesh."},
-{TEXCO_TANGENT, "TANGENT", 0, "Tangent", "Uses the optional tangent vector as texture coordinates."},
-{0, NULL, 0, NULL, NULL}};
-
#ifdef RNA_RUNTIME
#include "MEM_guardedalloc.h"
@@ -221,42 +207,6 @@ void rna_Material_use_nodes_set(PointerRNA *ptr, int value)
ED_node_shader_default(ma);
}
-static EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext *C, PointerRNA *ptr, int *free)
-{
- Material *ma= (Material*)ptr->id.data;
- EnumPropertyItem *item= NULL;
- int totitem= 0;
-
- if(C==NULL) {
- return prop_texture_coordinates_items;
- }
-
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_GLOB);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_OBJECT);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_ORCO);
-
- if(ma->material_type == MA_TYPE_VOLUME) {
-
- }
- else if (ELEM3(ma->material_type, MA_TYPE_SURFACE, MA_TYPE_HALO, MA_TYPE_WIRE)) {
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_UV);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_STRAND);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_STICKY);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_WINDOW);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_NORM);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_REFL);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_STRESS);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_TANGENT);
- }
-
- RNA_enum_item_end(&item, &totitem);
-
- *free= 1;
-
- return item;
-}
-
-
#else
static void rna_def_material_mtex(BlenderRNA *brna)
@@ -264,6 +214,21 @@ static void rna_def_material_mtex(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ static EnumPropertyItem prop_texture_coordinates_items[] = {
+ {TEXCO_GLOB, "GLOBAL", 0, "Global", "Uses global coordinates for the texture coordinates."},
+ {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", "Uses normalized strand texture coordinate (1D)."},
+ {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."},
+ {TEXCO_REFL, "REFLECTION", 0, "Reflection", "Uses reflection vector as texture coordinates."},
+ {TEXCO_STRESS, "STRESS", 0, "Stress", "Uses the difference of edge lengths compared to original coordinates of the mesh."},
+ {TEXCO_TANGENT, "TANGENT", 0, "Tangent", "Uses the optional tangent vector as texture coordinates."},
+
+ {0, NULL, 0, NULL, NULL}};
+
static EnumPropertyItem prop_mapping_items[] = {
{MTEX_FLAT, "FLAT", 0, "Flat", "Maps X and Y coordinates directly."},
{MTEX_CUBE, "CUBE", 0, "Cube", "Maps using the normal vector."},
@@ -306,10 +271,9 @@ static void rna_def_material_mtex(BlenderRNA *brna)
prop= RNA_def_property(srna, "texture_coordinates", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texco");
RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Material_texture_coordinates_itemf");
RNA_def_property_ui_text(prop, "Texture Coordinates", "");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
+
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_struct_type(prop, "Object");
@@ -515,75 +479,6 @@ static void rna_def_material_mtex(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Ambient Factor", "Amount texture affects ambient.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- /* volume material */
- prop= RNA_def_property(srna, "map_coloremission", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_EMISSION_COL);
- RNA_def_property_ui_text(prop, "Emission Color", "Causes the texture to affect the colour of emission");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "map_colorabsorption", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_ABSORPTION_COL);
- RNA_def_property_ui_text(prop, "Absorption Color", "Causes the texture to affect the result colour after absorption");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "map_density", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_DENSITY);
- RNA_def_property_ui_text(prop, "Density", "Causes the texture to affect the volume's density");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "map_emission", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_EMISSION);
- RNA_def_property_ui_text(prop, "Emission", "Causes the texture to affect the volume's emission");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "map_absorption", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_ABSORPTION);
- RNA_def_property_ui_text(prop, "Absorption", "Causes the texture to affect the volume's absorption");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "map_scattering", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_SCATTERING);
- RNA_def_property_ui_text(prop, "Scattering", "Causes the texture to affect the volume's scattering");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "coloremission_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Emission Color Factor", "Amount texture affects emission color.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "colorabsorption_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Absorpion Color Factor", "Amount texture affects diffuse color.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "density_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Density Factor", "Amount texture affects density.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "emission_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Emission Factor", "Amount texture affects emission.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "absorption_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Absorption Factor", "Amount texture affects absorption.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "scattering_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "varfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Scattering Factor", "Amount texture affects scattering.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- /* end volume material */
-
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_MaterialTextureSlot_enabled_get", "rna_MaterialTextureSlot_enabled_set");
RNA_def_property_ui_text(prop, "Enabled", "Enable this material texture slot.");
@@ -616,8 +511,6 @@ static void rna_def_material_colors(StructRNA *srna)
{MA_RAMP_SAT, "SATURATION", 0, "Saturation", ""},
{MA_RAMP_VAL, "VALUE", 0, "Value", ""},
{MA_RAMP_COLOR, "COLOR", 0, "Color", ""},
- {MA_RAMP_SOFT, "SOFT LIGHT", 0, "Soft Light", ""},
- {MA_RAMP_LINEAR, "LINEAR LIGHT", 0, "Linear Light", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_ramp_input_items[] = {
@@ -723,10 +616,10 @@ static void rna_def_material_diffuse(StructRNA *srna)
RNA_def_property_ui_text(prop, "Diffuse Shader Model", "");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "diffuse_intensity", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "diffuse_reflection", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "ref");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Diffuse Intensity", "Amount of diffuse reflection.");
+ RNA_def_property_ui_text(prop, "Diffuse Reflection", "Amount of diffuse reflection.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
prop= RNA_def_property(srna, "roughness", PROP_FLOAT, PROP_NONE);
@@ -784,10 +677,10 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Enabled", "Enable raytraced reflections.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "reflect_factor", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "reflect", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "ray_mirror");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Reflectivity", "Sets the amount mirror reflection for raytrace.");
+ RNA_def_property_ui_text(prop, "Reflect", "Sets the amount mirror reflection for raytrace.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE);
@@ -802,10 +695,10 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "gloss", PROP_FLOAT, PROP_PERCENTAGE);
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", "The shininess of the reflection. Values < 1.0 give diffuse, blurry reflections.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "gloss_anisotropic", PROP_FLOAT, PROP_PERCENTAGE);
@@ -873,10 +766,10 @@ static void rna_def_material_raytra(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "gloss", PROP_FLOAT, PROP_PERCENTAGE);
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", "The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE);
@@ -916,159 +809,6 @@ static void rna_def_material_raytra(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
}
-static void rna_def_material_volume(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- static EnumPropertyItem prop_scattering_items[] = {
- {MA_VOL_SHADE_NONE, "NONE", 0, "None", ""},
- {MA_VOL_SHADE_SINGLE, "SINGLE_SCATTERING", 0, "Single Scattering", ""},
- {MA_VOL_SHADE_MULTIPLE, "MULTIPLE_SCATTERING", 0, "Multiple Scattering", ""},
- {MA_VOL_SHADE_SINGLEPLUSMULTIPLE, "SINGLE_PLUS_MULTIPLE_SCATTERING", 0, "Single + Multiple Scattering", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem prop_stepsize_items[] = {
- {MA_VOL_STEP_RANDOMIZED, "RANDOMIZED", 0, "Randomized", ""},
- {MA_VOL_STEP_CONSTANT, "CONSTANT", 0, "Constant", ""},
- //{MA_VOL_STEP_ADAPTIVE, "ADAPTIVE", 0, "Adaptive", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem prop_phasefunction_items[] = {
- {MA_VOL_PH_ISOTROPIC, "ISOTROPIC", 0, "Isotropic", ""},
- {MA_VOL_PH_MIEHAZY, "MIE_HAZY", 0, "Mie Hazy", ""},
- {MA_VOL_PH_MIEMURKY, "MIE_MURKY", 0, "Mie Murky", ""},
- {MA_VOL_PH_RAYLEIGH, "RAYLEIGH", 0, "Rayleigh", ""},
- {MA_VOL_PH_HG, "HENYEY-GREENSTEIN", 0, "Henyey-Greenstein", ""},
- {MA_VOL_PH_SCHLICK, "SCHLICK", 0, "Schlick", ""},
- {0, NULL, 0, NULL, NULL}};
-
- srna= RNA_def_struct(brna, "MaterialVolume", NULL);
- RNA_def_struct_sdna(srna, "VolumeSettings");
- RNA_def_struct_nested(brna, srna, "Material");
- RNA_def_struct_ui_text(srna, "Material Volume", "Volume rendering settings for a Material datablock.");
-
- prop= RNA_def_property(srna, "step_calculation", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "stepsize_type");
- RNA_def_property_enum_items(prop, prop_stepsize_items);
- RNA_def_property_ui_text(prop, "Step Calculation", "Method of calculating the steps through the volume");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "step_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "stepsize");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Step Size", "Distance between subsequent volume depth samples.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "shading_step_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "shade_stepsize");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Shading Step Size", "Distance between subsequent volume shading samples.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "scattering_mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "shade_type");
- RNA_def_property_enum_items(prop, prop_scattering_items);
- RNA_def_property_ui_text(prop, "Scattering Mode", "Method of shading, attenuating, and scattering light through the volume");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "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_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- 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, 0, 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_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "ms_diffusion", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ms_diff");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_text(prop, "Diffusion", "Diffusion factor, the strength of the blurring effect");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "ms_spread", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "ms_steps");
- RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "Spread", "Simulation steps, the effective distance over which the light is diffused");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "ms_intensity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ms_intensity");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_text(prop, "Intensity", "Multiplier for multiple scattered light energy");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "depth_cutoff", 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_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "density", PROP_FLOAT, PROP_PERCENTAGE);
- RNA_def_property_float_sdna(prop, NULL, "density");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Density", "The base density of the volume");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "density_scale", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "density_scale");
- 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, "Density Scale", "Multiplier for the material's density");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "absorption", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "absorption");
- 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, "Absorption", "Amount of light that gets absorbed by the volume - higher values mean light travels less distance");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "absorption_color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "absorption_col");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Absorption Color", "");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
-
- prop= RNA_def_property(srna, "scattering", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "scattering");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1 ,3);
- RNA_def_property_ui_text(prop, "Scattering", "Amount of light that gets scattered by the volume - values > 1.0 are non-physical");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "emission", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "emission");
- 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, "Emission", "Amount of light that gets emitted by the volume");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "emission_color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "emission_col");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Emission Color", "");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
-
- prop= RNA_def_property(srna, "phase_function", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "phasefunc_type");
- RNA_def_property_enum_items(prop, prop_phasefunction_items);
- RNA_def_property_ui_text(prop, "Phase Function", "Isotropic/Anisotropic scattering");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "asymmetry", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "phasefunc_g");
- RNA_def_property_range(prop, -1.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Asymmetry", "Continuum between forward scattering and back scattering");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-}
-
-
static void rna_def_material_halo(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1171,14 +911,14 @@ static void rna_def_material_halo(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Star", "Renders halo as a star.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "texture", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOTEX);
- RNA_def_property_ui_text(prop, "Texture", "Gives halo a texture.");
+ RNA_def_property_ui_text(prop, "Use Texture", "Gives halo a texture.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "vertex_normal", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_vertex_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOPUNO);
- RNA_def_property_ui_text(prop, "Vertex Normal", "Uses the vertex normal to specify the dimension of the halo.");
+ RNA_def_property_ui_text(prop, "Use Vertex Normal", "Uses the vertex normal to specify the dimension of the halo.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "xalpha", PROP_BOOLEAN, PROP_NONE);
@@ -1285,10 +1025,10 @@ void rna_def_material_specularity(StructRNA *srna)
RNA_def_property_ui_text(prop, "Specular Shader Model", "");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "specular_intensity", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "specular_reflection", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "spec");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Specular Intensity", "");
+ RNA_def_property_ui_text(prop, "Specularity Intensity", "");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
/* NOTE: "har", "param", etc are used for multiple purposes depending on
@@ -1358,16 +1098,16 @@ void rna_def_material_strand(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Blender Units", "Use Blender units for widths instead of pixels.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "root_size", PROP_FLOAT, PROP_UNSIGNED);
+ prop= RNA_def_property(srna, "start_size", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "strand_sta");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_MaterialStrand_start_size_range");
- RNA_def_property_ui_text(prop, "Root Size", "Start size of strands in pixels Blender units.");
+ RNA_def_property_ui_text(prop, "Start Size", "Start size of strands in pixels Blender units.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "tip_size", PROP_FLOAT, PROP_UNSIGNED);
+ prop= RNA_def_property(srna, "end_size", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "strand_end");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_MaterialStrand_end_size_range");
- RNA_def_property_ui_text(prop, "Tip Size", "Start size of strands in pixels or Blender units.");
+ RNA_def_property_ui_text(prop, "End Size", "Start size of strands in pixels or Blender units.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "min_size", PROP_FLOAT, PROP_UNSIGNED);
@@ -1442,7 +1182,7 @@ void RNA_def_material(BlenderRNA *brna)
static EnumPropertyItem prop_type_items[] = {
{MA_TYPE_SURFACE, "SURFACE", 0, "Surface", "Render object as a surface."},
{MA_TYPE_WIRE, "WIRE", 0, "Wire", "Render the edges of faces as wires (not supported in ray tracing)."},
- {MA_TYPE_VOLUME, "VOLUME", 0, "Volume", "Render object as a volume."},
+ // {MA_TYPE_VOLUME, "VOLUME", 0, "Volume", "Render object as a volume."},
{MA_TYPE_HALO, "HALO", 0, "Halo", "Render object as halo particles."},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem transparency_items[] = {
@@ -1589,9 +1329,9 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Exclude Mist", "Excludes this material from mist effects (in world settings)");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "receive_transparent_shadows", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "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 casted through other objects");
+ RNA_def_property_ui_text(prop, "Transparent Shadows", "Allow this object to receive transparent shadows casted through other objects");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "ray_shadow_bias", PROP_BOOLEAN, PROP_NONE);
@@ -1625,11 +1365,6 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, "rna_Material_transp_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Raytrace Transparency", "Raytraced reflection settings for the material.");
- prop= RNA_def_property(srna, "volume", PROP_POINTER, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "vol");
- RNA_def_property_struct_type(prop, "MaterialVolume");
- RNA_def_property_ui_text(prop, "Volume", "Volume settings for the material.");
-
prop= RNA_def_property(srna, "halo", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialHalo");
RNA_def_property_pointer_funcs(prop, "rna_Material_halo_get", NULL, NULL);
@@ -1673,7 +1408,6 @@ void RNA_def_material(BlenderRNA *brna)
/* nested structs */
rna_def_material_raymirror(brna);
rna_def_material_raytra(brna);
- rna_def_material_volume(brna);
rna_def_material_halo(brna);
rna_def_material_sss(brna);
rna_def_material_mtex(brna);
@@ -1698,13 +1432,11 @@ void rna_def_mtex_common(StructRNA *srna, const char *begin, const char *activeg
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, activeget, activeset, NULL);
RNA_def_property_ui_text(prop, "Active Texture", "Active texture slot being displayed.");
- RNA_def_property_update(prop, NC_TEXTURE|ND_SHADING_DRAW, NULL);
prop= RNA_def_property(srna, "active_texture_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "texact");
RNA_def_property_range(prop, 0, MAX_MTEX-1);
RNA_def_property_ui_text(prop, "Active Texture Index", "Index of active texture slot.");
- RNA_def_property_update(prop, NC_TEXTURE|ND_SHADING_DRAW, NULL);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_material_api.c b/source/blender/makesrna/intern/rna_material_api.c
index e5dded2e53c..aa28b6b923c 100644
--- a/source/blender/makesrna/intern/rna_material_api.c
+++ b/source/blender/makesrna/intern/rna_material_api.c
@@ -1,5 +1,5 @@
/**
- * $Id$
+ *
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index f1a46b199b4..a8c9e799e91 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -55,24 +55,18 @@
static void rna_Mesh_update_data(bContext *C, PointerRNA *ptr)
{
+ Main *bmain= CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
ID *id= ptr->id.data;
+ Object *ob;
- DAG_id_flush_update(id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
-}
-
-static void rna_Mesh_update_select(bContext *C, PointerRNA *ptr)
-{
- ID *id= ptr->id.data;
-
- WM_event_add_notifier(C, NC_GEOM|ND_SELECT, id);
-}
-
-void rna_Mesh_update_draw(bContext *C, PointerRNA *ptr)
-{
- ID *id= ptr->id.data;
-
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
+ for(ob=bmain->object.first; ob; ob= ob->id.next) {
+ if(ob->data == id) {
+ /* XXX this will loop over all objects again (slow) */
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
+ }
}
static void rna_MeshVertex_normal_get(PointerRNA *ptr, float *value)
@@ -407,48 +401,6 @@ static void rna_MeshTextureFace_uv4_set(PointerRNA *ptr, const float *values)
mtface->uv[3][1]= values[1];
}
-static int rna_CustomDataData_numverts(PointerRNA *ptr, int type)
-{
- Mesh *me= (Mesh*)ptr->id.data;
- CustomData *fdata= rna_mesh_fdata(me);
- CustomDataLayer *cdl;
- int a;
- size_t b;
-
- for(cdl=fdata->layers, a=0; a<fdata->totlayer; cdl++, a++) {
- if(cdl->type == type) {
- b= ((char*)ptr->data - ((char*)cdl->data))/CustomData_sizeof(type);
- if(b >= 0 && b < me->totface)
- return (me->mface[b].v4? 4: 3);
- }
- }
-
- return 0;
-}
-
-static int rna_MeshTextureFace_uv_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
-{
- length[0]= rna_CustomDataData_numverts(ptr, CD_MTFACE);
- length[1]= 2;
- return length[0]*length[1];
-}
-
-static void rna_MeshTextureFace_uv_get(PointerRNA *ptr, float *values)
-{
- MTFace *mtface= (MTFace*)ptr->data;
- int totvert= rna_CustomDataData_numverts(ptr, CD_MTFACE);
-
- memcpy(values, mtface->uv, totvert * 2 * sizeof(float));
-}
-
-static void rna_MeshTextureFace_uv_set(PointerRNA *ptr, const float *values)
-{
- MTFace *mtface= (MTFace*)ptr->data;
- int totvert= rna_CustomDataData_numverts(ptr, CD_MTFACE);
-
- memcpy(mtface->uv, values, totvert * 2 * sizeof(float));
-}
-
static void rna_MeshTextureFaceLayer_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Mesh *me= (Mesh*)ptr->id.data;
@@ -711,30 +663,6 @@ static void rna_TextureFace_image_set(PointerRNA *ptr, PointerRNA value)
tf->tpage= (struct Image*)id;
}
-static int rna_MeshFace_verts_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
-{
- MFace *face= (MFace*)ptr->data;
-
- if(face)
- length[0]= (face->v4)? 4: 3;
- else
- length[0]= 4; // XXX rna_raw_access wants the length of a dummy face. this needs fixing. - Campbell
-
- return length[0];
-}
-
-static void rna_MeshFace_verts_get(PointerRNA *ptr, int *values)
-{
- MFace *face= (MFace*)ptr->data;
- memcpy(values, &face->v1, (face->v4 ? 4 : 3) * sizeof(int));
-}
-
-static void rna_MeshFace_verts_set(PointerRNA *ptr, const int *values)
-{
- MFace *face= (MFace*)ptr->data;
- memcpy(&face->v1, values, (face->v4 ? 4 : 3) * sizeof(int));
-}
-
/* path construction */
static char *rna_VertexGroupElement_path(PointerRNA *ptr)
@@ -860,12 +788,10 @@ static void rna_def_mvert_group(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "def_nr");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Group Index", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Weight", "Vertex Weight");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
static void rna_def_mvert(BlenderRNA *brna)
@@ -881,7 +807,6 @@ static void rna_def_mvert(BlenderRNA *brna)
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_ui_text(prop, "Location", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_DIRECTION);
RNA_def_property_float_sdna(prop, NULL, "no");
@@ -892,17 +817,14 @@ static void rna_def_mvert(BlenderRNA *brna)
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
RNA_def_property_ui_text(prop, "Selected", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_HIDE);
RNA_def_property_ui_text(prop, "Hidden", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "bevel_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_MeshVertex_bevel_weight_get", "rna_MeshVertex_bevel_weight_set", NULL);
RNA_def_property_ui_text(prop, "Bevel Weight", "Weight used by the Bevel modifier 'Only Vertices' option");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_MeshVertex_groups_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0, 0, 0);
@@ -930,32 +852,26 @@ static void rna_def_medge(BlenderRNA *brna)
prop= RNA_def_property(srna, "crease", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_MEdge_crease_get", "rna_MEdge_crease_set", NULL);
RNA_def_property_ui_text(prop, "Crease", "Weight used by the Subsurf modifier for creasing");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "bevel_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_MEdge_bevel_weight_get", "rna_MEdge_bevel_weight_set", NULL);
RNA_def_property_ui_text(prop, "Bevel Weight", "Weight used by the Bevel modifier");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
RNA_def_property_ui_text(prop, "Selected", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_HIDE);
RNA_def_property_ui_text(prop, "Hidden", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "seam", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_SEAM);
RNA_def_property_ui_text(prop, "Seam", "Seam edge for UV unwrapping");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "sharp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_SHARP);
RNA_def_property_ui_text(prop, "Sharp", "Sharp edge for the EdgeSplit modifier");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "loose", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_LOOSEEDGE);
@@ -979,7 +895,6 @@ static void rna_def_mface(BlenderRNA *brna)
RNA_def_struct_path_func(srna, "rna_MeshFace_path");
RNA_def_struct_ui_icon(srna, ICON_FACESEL);
- // XXX allows creating invalid meshes
prop= RNA_def_property(srna, "verts", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "v1");
RNA_def_property_array(prop, 4);
@@ -989,28 +904,25 @@ static void rna_def_mface(BlenderRNA *brna)
RNA_def_property_int_funcs(prop, "rna_MeshFace_verts_get", "rna_MeshFace_verts_set", NULL);
*/
RNA_def_property_ui_text(prop, "Vertices", "Vertex indices");
+ // XXX allows creating invalid meshes
prop= RNA_def_property(srna, "material_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "mat_nr");
RNA_def_property_ui_text(prop, "Material Index", "");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MeshFace_material_index_range");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_FACE_SEL);
RNA_def_property_ui_text(prop, "Selected", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_HIDE);
RNA_def_property_ui_text(prop, "Hidden", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "smooth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_SMOOTH);
RNA_def_property_ui_text(prop, "Smooth", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
-
+
prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_DIRECTION);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -1.0f, 1.0f);
@@ -1029,30 +941,25 @@ static void rna_def_mtface(BlenderRNA *brna)
{TF_ALPHA, "ALPHA", 0, "Alpha", "Render polygon transparent, depending on alpha channel of the texture"},
{TF_CLIP, "CLIPALPHA", 0, "Clip Alpha", "Use the images alpha values clipped with no blending (binary alpha)"},
{0, NULL, 0, NULL, NULL}};
- int uv_dim[]= {4, 2};
srna= RNA_def_struct(brna, "MeshTextureFaceLayer", NULL);
RNA_def_struct_ui_text(srna, "Mesh Texture Face Layer", "Layer of texture faces in a Mesh datablock.");
RNA_def_struct_sdna(srna, "CustomDataLayer");
RNA_def_struct_path_func(srna, "rna_MeshTextureFaceLayer_path");
- RNA_def_struct_ui_icon(srna, ICON_GROUP_UVS);
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshTextureFaceLayer_name_set");
RNA_def_property_ui_text(prop, "Name", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_MeshTextureFaceLayer_active_get", "rna_MeshTextureFaceLayer_active_set");
RNA_def_property_ui_text(prop, "Active", "Sets the layer as active for display and editing");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "active_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "active_rnd", 0);
RNA_def_property_boolean_funcs(prop, "rna_MeshTextureFaceLayer_active_render_get", "rna_MeshTextureFaceLayer_active_render_set");
RNA_def_property_ui_text(prop, "Active Render", "Sets the layer as active for rendering");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshTextureFace");
@@ -1070,117 +977,88 @@ static void rna_def_mtface(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, NULL, "rna_TextureFace_image_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Image", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "tex", 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");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "light", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_LIGHT);
RNA_def_property_ui_text(prop, "Light", "Use light for face");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "invisible", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_INVISIBLE);
RNA_def_property_ui_text(prop, "Invisible", "Make face invisible");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_DYNAMIC);
RNA_def_property_ui_text(prop, "Collision", "Use face for collision and ray-sensor detection");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "shared", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_SHAREDCOL);
RNA_def_property_ui_text(prop, "Shared", "Blend vertex colors across face when vertices are shared");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "twoside", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_TWOSIDE);
RNA_def_property_ui_text(prop, "Twoside", "Render face twosided");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "object_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_OBCOL);
RNA_def_property_ui_text(prop, "Object Color", "Use ObColor instead of vertex colors");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_BILLBOARD);
RNA_def_property_ui_text(prop, "Halo", "Screen aligned billboard");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "billboard", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_BILLBOARD2);
RNA_def_property_ui_text(prop, "Billboard", "Billboard with Z-axis constraint");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_SHADOW);
RNA_def_property_ui_text(prop, "Shadow", "Face is used for shadow");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "text", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_BMFONT);
RNA_def_property_ui_text(prop, "Text", "Enable bitmap text on face");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "alpha_sort", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_ALPHASORT);
RNA_def_property_ui_text(prop, "Alpha Sort", "Enable sorting of faces for correct alpha drawing (slow, use Clip Alpha instead when possible)");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "transp", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, transp_items);
RNA_def_property_ui_text(prop, "Transparency", "Transparency blending mode");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "uv_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TF_SEL1);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "UV Selected", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "uv_pinned", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "unwrap", TF_PIN1);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "UV Pinned", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "uv1", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv1_get", "rna_MeshTextureFace_uv1_set", NULL);
RNA_def_property_ui_text(prop, "UV 1", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "uv2", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv2_get", "rna_MeshTextureFace_uv2_set", NULL);
RNA_def_property_ui_text(prop, "UV 2", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "uv3", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv3_get", "rna_MeshTextureFace_uv3_set", NULL);
RNA_def_property_ui_text(prop, "UV 3", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "uv4", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv4_get", "rna_MeshTextureFace_uv4_set", NULL);
RNA_def_property_ui_text(prop, "UV 4", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
-
- prop= RNA_def_property(srna, "uv", PROP_FLOAT, PROP_NONE);
- RNA_def_property_multi_array(prop, 2, uv_dim);
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_dynamic_array_funcs(prop, "rna_MeshTextureFace_uv_get_length");
- RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv_get", "rna_MeshTextureFace_uv_set", NULL);
- RNA_def_property_ui_text(prop, "UV", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
static void rna_def_msticky(BlenderRNA *brna)
@@ -1195,7 +1073,6 @@ static void rna_def_msticky(BlenderRNA *brna)
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_XYZ);
RNA_def_property_ui_text(prop, "Location", "Sticky texture coordinate location.");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
static void rna_def_mcol(BlenderRNA *brna)
@@ -1207,24 +1084,20 @@ static void rna_def_mcol(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Mesh Vertex Color Layer", "Layer of vertex colors in a Mesh datablock.");
RNA_def_struct_sdna(srna, "CustomDataLayer");
RNA_def_struct_path_func(srna, "rna_MeshColorLayer_path");
- RNA_def_struct_ui_icon(srna, ICON_GROUP_VCOL);
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshColorLayer_name_set");
RNA_def_property_ui_text(prop, "Name", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_MeshColorLayer_active_get", "rna_MeshColorLayer_active_set");
RNA_def_property_ui_text(prop, "Active", "Sets the layer as active for display and editing");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "active_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "active_rnd", 0);
RNA_def_property_boolean_funcs(prop, "rna_MeshColorLayer_active_render_get", "rna_MeshColorLayer_active_render_set");
RNA_def_property_ui_text(prop, "Active Render", "Sets the layer as active for rendering");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshColor");
@@ -1241,28 +1114,24 @@ static void rna_def_mcol(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_float_funcs(prop, "rna_MeshColor_color1_get", "rna_MeshColor_color1_set", NULL);
RNA_def_property_ui_text(prop, "Color 1", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "color2", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_float_funcs(prop, "rna_MeshColor_color2_get", "rna_MeshColor_color2_set", NULL);
RNA_def_property_ui_text(prop, "Color 2", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "color3", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_float_funcs(prop, "rna_MeshColor_color3_get", "rna_MeshColor_color3_set", NULL);
RNA_def_property_ui_text(prop, "Color 3", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "color4", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_float_funcs(prop, "rna_MeshColor_color4_get", "rna_MeshColor_color4_set", NULL);
RNA_def_property_ui_text(prop, "Color 4", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
static void rna_def_mproperties(BlenderRNA *brna)
@@ -1279,7 +1148,6 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshFloatProperty");
@@ -1294,7 +1162,6 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f");
RNA_def_property_ui_text(prop, "Value", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
/* Int */
srna= RNA_def_struct(brna, "MeshIntPropertyLayer", NULL);
@@ -1305,7 +1172,6 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshIntProperty");
@@ -1320,7 +1186,6 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "value", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "i");
RNA_def_property_ui_text(prop, "Value", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
/* String */
srna= RNA_def_struct(brna, "MeshStringPropertyLayer", NULL);
@@ -1331,7 +1196,6 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshStringProperty");
@@ -1346,7 +1210,6 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "s");
RNA_def_property_ui_text(prop, "Value", "");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
@@ -1362,20 +1225,17 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Texure Space Location", "Texture space location.");
RNA_def_property_editable_func(prop, texspace_editable);
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop= RNA_def_property(srna, "texspace_size", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Texture Space Size", "Texture space size.");
RNA_def_property_editable_func(prop, texspace_editable);
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
/* not supported yet
prop= RNA_def_property(srna, "texspace_rot", PROP_FLOAT, PROP_EULER);
RNA_def_property_float(prop, NULL, "rot");
RNA_def_property_ui_text(prop, "Texture Space Rotation", "Texture space rotation");
- RNA_def_property_editable_func(prop, texspace_editable);
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");*/
+ RNA_def_property_editable_func(prop, texspace_editable);*/
/* materials */
prop= RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
@@ -1503,58 +1363,58 @@ static void rna_def_mesh(BlenderRNA *brna)
prop= RNA_def_property(srna, "draw_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWEDGES);
RNA_def_property_ui_text(prop, "Draw Edges", "Displays selected edges using hilights in the 3d view and UV editor");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWFACES);
RNA_def_property_ui_text(prop, "Draw Faces", "Displays all faces as shades in the 3d view and UV editor");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_normals", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWNORMALS);
RNA_def_property_ui_text(prop, "Draw Normals", "Displays face normals as lines");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_vertex_normals", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_VNORMALS);
RNA_def_property_ui_text(prop, "Draw Vertex Normals", "Displays vertex normals as lines");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_creases", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWCREASES);
RNA_def_property_ui_text(prop, "Draw Creases", "Displays creases created for subsurf weighting");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_bevel_weights", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWBWEIGHTS);
RNA_def_property_ui_text(prop, "Draw Bevel Weights", "Displays weights created for the Bevel modifier");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_seams", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWSEAMS);
RNA_def_property_ui_text(prop, "Draw Seams", "Displays UV unwrapping seams");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_sharp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWSHARP);
RNA_def_property_ui_text(prop, "Draw Sharp", "Displays sharp edges, used with the EdgeSplit modifier");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_edge_lenght", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_EDGELEN);
RNA_def_property_ui_text(prop, "Edge Length", "Displays selected edge lengths");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_edge_angle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_EDGEANG);
RNA_def_property_ui_text(prop, "Edge Angles", "Displays the angles in the selected edges in degrees");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "draw_face_area", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_FACEAREA);
RNA_def_property_ui_text(prop, "Face Area", "Displays the area of selected faces");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
rna_def_texmat_common(srna, "rna_Mesh_texspace_editable");
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index 6e37014a771..1db2f155d14 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -109,13 +109,20 @@ static void rna_Mesh_calc_edges(Mesh *mesh)
static void rna_Mesh_update(Mesh *mesh, bContext *C)
{
+ Main *bmain= CTX_data_main(C);
+ Object *ob;
+
if(mesh->totface && mesh->totedge == 0)
rna_Mesh_calc_edges(mesh);
mesh_calc_normals(mesh->mvert, mesh->totvert, mesh->mface, mesh->totface, NULL);
- DAG_id_flush_update(&mesh->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, mesh);
+ for(ob=bmain->object.first; ob; ob=ob->id.next) {
+ if(ob->data == mesh) {
+ ob->recalc |= OB_RECALC_DATA;
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
+ }
}
static void rna_Mesh_transform(Mesh *me, float *mat)
@@ -286,7 +293,7 @@ void RNA_api_mesh(StructRNA *srna)
func= RNA_def_function(srna, "transform", "rna_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);
+ parm= RNA_def_float_matrix(func, "matrix", 16, NULL, 0.0f, 0.0f, "", "Matrix.", 0.0f, 0.0f);
RNA_def_property_flag(parm, PROP_REQUIRED);
func= RNA_def_function(srna, "add_geometry", "rna_Mesh_add_geometry");
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index f3160a7bb18..7b14a7a4712 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -57,12 +57,14 @@ static void rna_MetaBall_update_data(bContext *C, PointerRNA *ptr)
MetaBall *mb= ptr->id.data;
Object *ob;
- for(ob=bmain->object.first; ob; ob= ob->id.next)
- if(ob->data == mb)
+ for(ob=bmain->object.first; ob; ob= ob->id.next) {
+ if(ob->data == mb) {
copy_mball_properties(scene, ob);
-
- DAG_id_flush_update(&mb->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb);
+ /* XXX this will loop over all objects again (slow) */
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
+ }
}
#else
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 28223d2f80b..837158b9ec8 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -40,46 +40,43 @@
#include "BKE_bmesh.h" /* For BevelModifierData */
#include "BKE_smoke.h" /* For smokeModifier_free & smokeModifier_createType */
-#include "WM_api.h"
#include "WM_types.h"
EnumPropertyItem modifier_type_items[] ={
- {0, "", 0, "Generate", ""},
+ {eModifierType_Armature, "ARMATURE", ICON_MOD_ARMATURE, "Armature", ""},
{eModifierType_Array, "ARRAY", ICON_MOD_ARRAY, "Array", ""},
{eModifierType_Bevel, "BEVEL", ICON_MOD_BEVEL, "Bevel", ""},
{eModifierType_Boolean, "BOOLEAN", ICON_MOD_BOOLEAN, "Boolean", ""},
{eModifierType_Build, "BUILD", ICON_MOD_BUILD, "Build", ""},
- {eModifierType_Decimate, "DECIMATE", ICON_MOD_DECIM, "Decimate", ""},
- {eModifierType_EdgeSplit, "EDGE_SPLIT", ICON_MOD_EDGESPLIT, "Edge Split", ""},
- {eModifierType_Mask, "MASK", ICON_MOD_MASK, "Mask", ""},
- {eModifierType_Mirror, "MIRROR", ICON_MOD_MIRROR, "Mirror", ""},
- {eModifierType_Multires, "MULTIRES", ICON_MOD_MULTIRES, "Multiresolution", ""},
- {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""},
- {eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""},
- {0, "", 0, "Deform", ""},
- {eModifierType_Armature, "ARMATURE", ICON_MOD_ARMATURE, "Armature", ""},
{eModifierType_Cast, "CAST", ICON_MOD_CAST, "Cast", ""},
+ {eModifierType_Cloth, "CLOTH", ICON_MOD_CLOTH, "Cloth", ""},
+ {eModifierType_Collision, "COLLISION", ICON_MOD_PHYSICS, "Collision", ""},
{eModifierType_Curve, "CURVE", ICON_MOD_CURVE, "Curve", ""},
+ {eModifierType_Decimate, "DECIMATE", ICON_MOD_DECIM, "Decimate", ""},
{eModifierType_Displace, "DISPLACE", ICON_MOD_DISPLACE, "Displace", ""},
+ {eModifierType_EdgeSplit, "EDGE_SPLIT", ICON_MOD_EDGESPLIT, "Edge Split", ""},
+ {eModifierType_Explode, "EXPLODE", ICON_MOD_EXPLODE, "Explode", ""},
+ {eModifierType_Fluidsim, "FLUID_SIMULATION", ICON_MOD_FLUIDSIM, "Fluid Simulation", ""},
{eModifierType_Hook, "HOOK", ICON_HOOK, "Hook", ""},
{eModifierType_Lattice, "LATTICE", ICON_MOD_LATTICE, "Lattice", ""},
+ {eModifierType_Mask, "MASK", ICON_MOD_MASK, "Mask", ""},
{eModifierType_MeshDeform, "MESH_DEFORM", ICON_MOD_MESHDEFORM, "Mesh Deform", ""},
+ {eModifierType_Mirror, "MIRROR", ICON_MOD_MIRROR, "Mirror", ""},
+ {eModifierType_Multires, "MULTIRES", ICON_MOD_MULTIRES, "Multiresolution", ""},
+ {eModifierType_ParticleInstance, "PARTICLE_INSTANCE", ICON_MOD_PARTICLES, "Particle Instance", ""},
+ {eModifierType_ParticleSystem, "PARTICLE_SYSTEM", ICON_MOD_PARTICLES, "Particle System", ""},
{eModifierType_Shrinkwrap, "SHRINKWRAP", ICON_MOD_SHRINKWRAP, "Shrinkwrap", ""},
{eModifierType_SimpleDeform, "SIMPLE_DEFORM", ICON_MOD_SIMPLEDEFORM, "Simple Deform", ""},
+ {eModifierType_Smoke, "SMOKE", 0, "Smoke", ""},
{eModifierType_Smooth, "SMOOTH", ICON_MOD_SMOOTH, "Smooth", ""},
- {eModifierType_Wave, "WAVE", ICON_MOD_WAVE, "Wave", ""},
- {0, "", 0, "Physics", ""},
- {eModifierType_Cloth, "CLOTH", ICON_MOD_CLOTH, "Cloth", ""},
- {eModifierType_Collision, "COLLISION", ICON_MOD_PHYSICS, "Collision", ""},
- {eModifierType_Explode, "EXPLODE", ICON_MOD_EXPLODE, "Explode", ""},
- {eModifierType_Fluidsim, "FLUID_SIMULATION", ICON_MOD_FLUIDSIM, "Fluid Simulation", ""},
- {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", ""},
{eModifierType_Softbody, "SOFT_BODY", ICON_MOD_SOFT, "Soft Body", ""},
+ {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""},
{eModifierType_Surface, "SURFACE", ICON_MOD_PHYSICS, "Surface", ""},
+ {eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""},
+ {eModifierType_Wave, "WAVE", ICON_MOD_WAVE, "Wave", ""},
{0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
#include "BKE_context.h"
@@ -89,7 +86,7 @@ EnumPropertyItem modifier_type_items[] ={
static void rna_UVProject_projectors_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
UVProjectModifierData *uvp= (UVProjectModifierData*)ptr->data;
- rna_iterator_array_begin(iter, (void*)uvp->projectors, sizeof(Object*), uvp->num_projectors, 0, NULL);
+ rna_iterator_array_begin(iter, (void*)uvp->projectors, sizeof(Object*), 10, 0, NULL);
}
static StructRNA* rna_Modifier_refine(struct PointerRNA *ptr)
@@ -171,8 +168,7 @@ static char *rna_Modifier_path(PointerRNA *ptr)
static void rna_Modifier_update(bContext *C, PointerRNA *ptr)
{
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ptr->id.data);
+ DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA);
}
static void rna_Modifier_dependency_update(bContext *C, PointerRNA *ptr)
@@ -185,15 +181,13 @@ static void rna_Smoke_set_type(bContext *C, PointerRNA *ptr)
{
SmokeModifierData *smd= (SmokeModifierData *)ptr->data;
Object *ob= (Object*)ptr->id.data;
-
- // nothing changed
- if((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain)
- return;
smokeModifier_free(smd); // XXX TODO: completely free all 3 pointers
smokeModifier_createType(smd); // create regarding of selected type
+ // particle_system_slot_add_exec(C, NULL);
+ // particle_system_slot_remove_exec(C, NULL);
- if(smd->type & MOD_SMOKE_TYPE_DOMAIN)
+ if(smd->type == MOD_SMOKE_TYPE_DOMAIN)
ob->dt = OB_WIRE;
// update dependancy since a domain - other type switch could have happened
@@ -402,34 +396,6 @@ static PointerRNA rna_CollisionModifier_settings_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_CollisionSettings, ob->pd);
}
-static PointerRNA rna_UVProjector_object_get(PointerRNA *ptr)
-{
- Object **ob= (Object**)ptr->data;
- return rna_pointer_inherit_refine(ptr, &RNA_Object, *ob);
-}
-
-static void rna_UVProjector_object_set(PointerRNA *ptr, PointerRNA value)
-{
- Object **ob= (Object**)ptr->data;
-
- if(*ob)
- id_us_min((ID*)*ob);
- if(value.data)
- id_us_plus((ID*)value.data);
-
- *ob= value.data;
-}
-
-static void rna_UVProjectModifier_num_projectors_set(PointerRNA *ptr, int value)
-{
- UVProjectModifierData *md= (UVProjectModifierData*)ptr->data;
- int a;
-
- md->num_projectors= CLAMPIS(value, 1, MOD_UVPROJECT_MAX);
- for(a=md->num_projectors; a<MOD_UVPROJECT_MAX; a++)
- md->projectors[a]= NULL;
-}
-
#else
static void rna_def_property_subdivision_common(StructRNA *srna, const char type[])
@@ -443,7 +409,7 @@ static void rna_def_property_subdivision_common(StructRNA *srna, const char type
RNA_def_property_enum_sdna(prop, NULL, type);
RNA_def_property_enum_items(prop, prop_subdivision_type_items);
RNA_def_property_ui_text(prop, "Subdivision Type", "Selects type of subdivision algorithm.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_subsurf(BlenderRNA *brna)
@@ -463,7 +429,7 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna)
RNA_def_property_range(prop, 1, 6);
RNA_def_property_ui_range(prop, 1, 6, 1, 0);
RNA_def_property_ui_text(prop, "Levels", "Number of subdivisions to perform.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "render_levels", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "renderLevels");
@@ -474,12 +440,12 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna)
prop= RNA_def_property(srna, "optimal_draw", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", eSubsurfModifierFlag_ControlEdges);
RNA_def_property_ui_text(prop, "Optimal Draw", "Skip drawing/rendering of interior subdivided edges");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "subsurf_uv", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", eSubsurfModifierFlag_SubsurfUv);
RNA_def_property_ui_text(prop, "Subsurf UV", "Use subsurf to subdivide UVs.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_multires(BlenderRNA *brna)
@@ -498,7 +464,7 @@ static void rna_def_modifier_multires(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "lvl");
RNA_def_property_ui_text(prop, "Level", "");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MultiresModifier_level_range");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_lattice(BlenderRNA *brna)
@@ -515,13 +481,13 @@ static void rna_def_modifier_lattice(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object", "Lattice object to deform with.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_LatticeModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_LatticeModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_curve(BlenderRNA *brna)
@@ -547,19 +513,19 @@ static void rna_def_modifier_curve(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object", "Curve object to deform with.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_CurveModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_CurveModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "deform_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "defaxis");
RNA_def_property_enum_items(prop, prop_deform_axis_items);
RNA_def_property_ui_text(prop, "Deform Axis", "The axis that the curve deforms along.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_build(BlenderRNA *brna)
@@ -575,21 +541,21 @@ static void rna_def_modifier_build(BlenderRNA *brna)
prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Start", "Specify the start frame of the effect.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "length", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Length", "Specify the total time the build effect requires");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "randomize", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Randomize", "Randomize the faces or edges during build.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Seed", "Specify the seed for random if used.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_mirror(BlenderRNA *brna)
@@ -605,50 +571,50 @@ static void rna_def_modifier_mirror(BlenderRNA *brna)
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_AXIS_X);
RNA_def_property_ui_text(prop, "X", "Enable X axis mirror.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_AXIS_Y);
RNA_def_property_ui_text(prop, "Y", "Enable Y axis mirror.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_AXIS_Z);
RNA_def_property_ui_text(prop, "Z", "Enable Z axis mirror.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_CLIPPING);
RNA_def_property_ui_text(prop, "Clip", "Prevents vertices from going through the mirror during transform.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "mirror_vertex_groups", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_VGROUP);
RNA_def_property_ui_text(prop, "Mirror Vertex Groups", "Mirror vertex groups (e.g. .R->.L).");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "mirror_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_MIRROR_U);
RNA_def_property_ui_text(prop, "Mirror U", "Mirror the U texture coordinate around the 0.5 point.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "mirror_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_MIRROR_V);
RNA_def_property_ui_text(prop, "Mirror V", "Mirror the V texture coordinate around the 0.5 point.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "merge_limit", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tolerance");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Merge Limit", "Distance from axis within which mirrored vertices are merged.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "mirror_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "mirror_ob");
RNA_def_property_ui_text(prop, "Mirror Object", "Object to use as mirror.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
}
static void rna_def_modifier_decimate(BlenderRNA *brna)
@@ -665,7 +631,7 @@ static void rna_def_modifier_decimate(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "percent");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Ratio", "Defines the ratio of triangles to reduce to.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "face_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "faceCount");
@@ -693,135 +659,135 @@ static void rna_def_modifier_wave(BlenderRNA *brna)
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_X);
RNA_def_property_ui_text(prop, "X", "X axis motion.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_Y);
RNA_def_property_ui_text(prop, "Y", "Y axis motion.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "cyclic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_CYCL);
RNA_def_property_ui_text(prop, "Cyclic", "Cyclic wave effect.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "normals", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM);
RNA_def_property_ui_text(prop, "Normals", "Dispace along normals.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "x_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM_X);
RNA_def_property_ui_text(prop, "X Normal", "Enable displacement along the X normal");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "y_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM_Y);
RNA_def_property_ui_text(prop, "Y Normal", "Enable displacement along the Y normal");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "z_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM_Z);
RNA_def_property_ui_text(prop, "Z Normal", "Enable displacement along the Z normal");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "timeoffs");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Time Offset", "Either the starting frame (for positive speed) or ending frame (for negative speed.)");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Lifetime", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "damping_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "damp");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Damping Time", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "falloff");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 100, 2);
RNA_def_property_ui_text(prop, "Falloff Radius", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "start_position_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "startx");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 100, 2);
RNA_def_property_ui_text(prop, "Start Position X", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "start_position_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "starty");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 100, 2);
RNA_def_property_ui_text(prop, "Start Position Y", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "start_position_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "objectcenter");
RNA_def_property_ui_text(prop, "Start Position Object", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
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 for modulating the wave.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WaveModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Texture", "Texture for modulating the wave.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture_coordinates", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texmapping");
RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
RNA_def_property_ui_text(prop, "Texture Coordinates", "Texture coordinates used for modulating input.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
RNA_def_property_ui_text(prop, "UV Layer", "UV layer name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WaveModifier_uvlayer_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture_coordinates_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "map_object");
RNA_def_property_ui_text(prop, "Texture Coordinates Object", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -1, 1, 10, 2);
RNA_def_property_ui_text(prop, "Speed", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -2, 2, 10, 2);
RNA_def_property_ui_text(prop, "Height", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 5, 10, 2);
RNA_def_property_ui_text(prop, "Width", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "narrowness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "narrow");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 10, 10, 2);
RNA_def_property_ui_text(prop, "Narrowness", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_armature(BlenderRNA *brna)
@@ -838,43 +804,43 @@ static void rna_def_modifier_armature(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object", "Armature object to deform with.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ArmatureModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
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_ArmatureModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "invert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_INVERT_VGROUP);
RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_vertex_groups", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_VGROUP);
RNA_def_property_ui_text(prop, "Use Vertex Groups", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_bone_envelopes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_ENVELOPE);
RNA_def_property_ui_text(prop, "Use Bone Envelopes", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "quaternion", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_QUATERNION);
RNA_def_property_ui_text(prop, "Quaternion", "Deform rotation interpolation with quaternions.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "b_bone_rest", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_B_BONE_REST);
RNA_def_property_ui_text(prop, "B-Bone Rest", "Make B-Bones deform already in rest position");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "multi_modifier", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "multi", 0);
RNA_def_property_ui_text(prop, "Multi Modifier", "Use same input as previous modifier, and mix results using overall vgroup");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_hook(BlenderRNA *brna)
@@ -891,28 +857,23 @@ static void rna_def_modifier_hook(BlenderRNA *brna)
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 100, 2);
RNA_def_property_ui_text(prop, "Falloff", "If not zero, the distance from the hook where influence ends.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Force", "Relative force of the hook.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Object", "Parent Object for hook, also recalculates and clears offset");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
-
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
- RNA_def_property_string_sdna(prop, NULL, "subtarget");
- RNA_def_property_ui_text(prop, "Sub-Target", "Name of Parent Bone for hook (if applicable), also recalculates and clears offset");
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_HookModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_softbody(BlenderRNA *brna)
@@ -956,12 +917,12 @@ static void rna_def_modifier_boolean(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object", "Mesh object to use for boolean operation.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_BooleanModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_operation_items);
RNA_def_property_ui_text(prop, "Operation", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_array(BlenderRNA *brna)
@@ -984,90 +945,90 @@ static void rna_def_modifier_array(BlenderRNA *brna)
prop= RNA_def_property(srna, "fit_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_fit_type_items);
RNA_def_property_ui_text(prop, "Fit Type", "Array length calculation method.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "count", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, INT_MAX);
RNA_def_property_ui_range(prop, 1, 1000, 1, 0);
RNA_def_property_ui_text(prop, "Count", "Number of duplicates to make.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "length", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
RNA_def_property_ui_text(prop, "Length", "Length to fit array within.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curve_ob");
RNA_def_property_ui_text(prop, "Curve", "Curve object to fit array length to.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ArrayModifier_curve_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
/* Offset parameters */
prop= RNA_def_property(srna, "constant_offset", PROP_BOOLEAN, PROP_TRANSLATION);
RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_CONST);
RNA_def_property_ui_text(prop, "Constant Offset", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "constant_offset_displacement", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "offset");
RNA_def_property_ui_text(prop, "Constant Offset Displacement", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "relative_offset", PROP_BOOLEAN, PROP_TRANSLATION);
RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_RELATIVE);
RNA_def_property_ui_text(prop, "Relative Offset", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "relative_offset_displacement", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "scale");
RNA_def_property_ui_text(prop, "Relative Offset Displacement", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
/* Vertex merging parameters */
prop= RNA_def_property(srna, "merge_adjacent_vertices", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_ARR_MERGE);
RNA_def_property_ui_text(prop, "Merge Vertices", "Merge vertices in adjacent duplicates.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "merge_end_vertices", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_ARR_MERGEFINAL);
RNA_def_property_ui_text(prop, "Merge Vertices", "Merge vertices in first and last duplicates.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "merge_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "merge_dist");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 1, 1, 4);
RNA_def_property_ui_text(prop, "Merge Distance", "Limit below which to merge vertices.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
/* Offset object */
prop= RNA_def_property(srna, "add_offset_object", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_OBJ);
RNA_def_property_ui_text(prop, "Add Offset Object", "Add an object transformation to the total offset.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "offset_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "offset_ob");
RNA_def_property_ui_text(prop, "Offset Object", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
/* Caps */
prop= RNA_def_property(srna, "start_cap", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Start Cap", "Mesh object to use as a start cap.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ArrayModifier_start_cap_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "end_cap", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "End Cap", "Mesh object to use as an end cap.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ArrayModifier_end_cap_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
}
static void rna_def_modifier_edgesplit(BlenderRNA *brna)
@@ -1084,17 +1045,17 @@ static void rna_def_modifier_edgesplit(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 180);
RNA_def_property_ui_range(prop, 0, 180, 100, 2);
RNA_def_property_ui_text(prop, "Split Angle", "Angle above which to split edges.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_edge_angle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_EDGESPLIT_FROMANGLE);
RNA_def_property_ui_text(prop, "Use Edge Angle", "Split edges with high angle between faces.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_sharp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_EDGESPLIT_FROMFLAG);
RNA_def_property_ui_text(prop, "Use Sharp Edges", "Split edges that are marked as sharp.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_displace(BlenderRNA *brna)
@@ -1126,47 +1087,47 @@ static void rna_def_modifier_displace(BlenderRNA *brna)
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_DisplaceModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Texture", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "midlevel", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Midlevel", "Material value that gives no displacement.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 10, 2);
RNA_def_property_ui_text(prop, "Strength", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_direction_items);
RNA_def_property_ui_text(prop, "Direction", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture_coordinates", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texmapping");
RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
RNA_def_property_ui_text(prop, "Texture Coordinates", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
RNA_def_property_ui_text(prop, "UV Layer", "UV layer name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_DisplaceModifier_uvlayer_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture_coordinate_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "map_object");
RNA_def_property_ui_text(prop, "Texture Coordinate Object", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
}
static void rna_def_modifier_uvproject(BlenderRNA *brna)
@@ -1175,7 +1136,7 @@ static void rna_def_modifier_uvproject(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "UVProjectModifier", "Modifier");
- RNA_def_struct_ui_text(srna, "UV Project Modifier", "UV projection modifier to sets UVs from a projector.");
+ RNA_def_struct_ui_text(srna, "UVProject Modifier", "UV projection modifier to sets UVs from a projector.");
RNA_def_struct_sdna(srna, "UVProjectModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_UVPROJECT);
@@ -1183,51 +1144,36 @@ static void rna_def_modifier_uvproject(BlenderRNA *brna)
RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
RNA_def_property_ui_text(prop, "UV Layer", "UV layer name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_UVProjectModifier_uvlayer_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
- prop= RNA_def_property(srna, "num_projectors", PROP_INT, PROP_NONE);
- RNA_def_property_ui_text(prop, "Number of Projectors", "Number of projectors to use.");
- RNA_def_property_int_funcs(prop, NULL, "rna_UVProjectModifier_num_projectors_set", NULL);
- RNA_def_property_range(prop, 1, MOD_UVPROJECT_MAX);
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "projectors", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_struct_type(prop, "UVProjector");
- RNA_def_property_collection_funcs(prop, "rna_UVProject_projectors_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0, 0, 0);
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_collection_funcs(prop, "rna_UVProject_projectors_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_dereference_get", 0, 0, 0, 0, 0);
RNA_def_property_ui_text(prop, "Projectors", "");
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Image", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "horizontal_aspect_ratio", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aspectx");
RNA_def_property_range(prop, 1, FLT_MAX);
RNA_def_property_ui_range(prop, 1, 1000, 100, 2);
RNA_def_property_ui_text(prop, "Horizontal Aspect Ratio", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "vertical_aspect_ratio", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aspecty");
RNA_def_property_range(prop, 1, FLT_MAX);
RNA_def_property_ui_range(prop, 1, 1000, 100, 2);
RNA_def_property_ui_text(prop, "Vertical Aspect Ratio", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "override_image", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_UVPROJECT_OVERRIDEIMAGE);
RNA_def_property_ui_text(prop, "Override Image", "Override faces' current images with the given image.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
- srna= RNA_def_struct(brna, "UVProjector", NULL);
- RNA_def_struct_ui_text(srna, "UVProjector", "UV projector used by the UV project modifier.");
-
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "Object");
- RNA_def_property_pointer_funcs(prop, "rna_UVProjector_object_get", "rna_UVProjector_object_set", NULL);
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Object", "Object to use as projector transform.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_smooth(BlenderRNA *brna)
@@ -1243,35 +1189,35 @@ static void rna_def_modifier_smooth(BlenderRNA *brna)
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SMOOTH_X);
RNA_def_property_ui_text(prop, "X", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SMOOTH_Y);
RNA_def_property_ui_text(prop, "Y", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SMOOTH_Z);
RNA_def_property_ui_text(prop, "Z", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fac");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -10, 10, 0.5, 2);
RNA_def_property_ui_text(prop, "Factor", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "repeat", PROP_INT, PROP_NONE);
RNA_def_property_ui_range(prop, 0, 30, 1, 0);
RNA_def_property_ui_text(prop, "Repeat", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
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_SmoothModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_cast(BlenderRNA *brna)
@@ -1294,63 +1240,63 @@ static void rna_def_modifier_cast(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_cast_type_items);
RNA_def_property_ui_text(prop, "Cast Type", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Object", "Control object: if available, its location determines the center of the effect");
RNA_def_property_pointer_funcs(prop, NULL, "rna_CastModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_X);
RNA_def_property_ui_text(prop, "X", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_Y);
RNA_def_property_ui_text(prop, "Y", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_Z);
RNA_def_property_ui_text(prop, "Z", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "from_radius", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_SIZE_FROM_RADIUS);
RNA_def_property_ui_text(prop, "From Radius", "Use radius as size of projection shape (0 = auto)");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_transform", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_USE_OB_TRANSFORM);
RNA_def_property_ui_text(prop, "Use transform", "Use object transform to control projection shape");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fac");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -10, 10, 5, 2);
RNA_def_property_ui_text(prop, "Factor", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 10, 2);
RNA_def_property_ui_text(prop, "Radius", "Only deform vertices within this distance from the center of the effect (leave as 0 for infinite.)");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 10, 2);
RNA_def_property_ui_text(prop, "Size", "Size of projection shape (leave as 0 for auto.)");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
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_CastModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_meshdeform(BlenderRNA *brna)
@@ -1367,29 +1313,29 @@ static void rna_def_modifier_meshdeform(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object", "Mesh object to deform with.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_MeshDeformModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "invert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MDEF_INVERT_VGROUP);
RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
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_MeshDeformModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "precision", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gridsize");
RNA_def_property_range(prop, 2, 10);
RNA_def_property_ui_text(prop, "Precision", "The grid size for binding.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "dynamic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MDEF_DYNAMIC_BIND);
RNA_def_property_ui_text(prop, "Dynamic", "Recompute binding dynamically on top of other deformers (slower and more memory consuming.)");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
@@ -1424,71 +1370,71 @@ static void rna_def_modifier_particleinstance(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_ui_text(prop, "Object", "Object that has the particle system.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "particle_system_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "psys");
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Particle System Number", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "axis");
RNA_def_property_enum_items(prop, particleinstance_axis);
RNA_def_property_ui_text(prop, "Axis", "Pole axis for rotation");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Parents);
RNA_def_property_ui_text(prop, "Normal", "Create instances from normal particles.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "children", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Children);
RNA_def_property_ui_text(prop, "Children", "Create instances from child particles.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "path", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Path);
RNA_def_property_ui_text(prop, "Path", "Create instances along particle paths.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "unborn", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Unborn);
RNA_def_property_ui_text(prop, "Unborn", "Show instances when particles are unborn.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "alive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Alive);
RNA_def_property_ui_text(prop, "Alive", "Show instances when particles are alive.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "dead", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Dead);
RNA_def_property_ui_text(prop, "Dead", "Show instances when particles are dead.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "keep_shape", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_KeepShape);
RNA_def_property_ui_text(prop, "Keep Shape", "Don't stretch the object.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_UseSize);
RNA_def_property_ui_text(prop, "Size", "Use particle size to scale the instances.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "position", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "position");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Position", "Position along path.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "random_position", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "random_position");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Random Position", "Randomize position along path.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_explode(BlenderRNA *brna)
@@ -1508,27 +1454,27 @@ static void rna_def_modifier_explode(BlenderRNA *brna)
prop= RNA_def_property(srna, "protect", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Protect", "Clean vertex group edges");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "split_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_EdgeSplit);
RNA_def_property_ui_text(prop, "Split Edges", "Split face edges for nicer shrapnel.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "unborn", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Unborn);
RNA_def_property_ui_text(prop, "Unborn", "Show mesh when particles are unborn.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "alive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Alive);
RNA_def_property_ui_text(prop, "Alive", "Show mesh when particles are alive.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "dead", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Dead);
RNA_def_property_ui_text(prop, "Dead", "Show mesh when particles are dead.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_cloth(BlenderRNA *brna)
@@ -1568,7 +1514,6 @@ static void rna_def_modifier_smoke(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SmokeModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Smoke Modifier", "Smoke simulation modifier.");
RNA_def_struct_sdna(srna, "SmokeModifierData");
- RNA_def_struct_ui_icon(srna, ICON_MOD_SMOKE);
prop= RNA_def_property(srna, "domain_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "domain");
@@ -1586,7 +1531,7 @@ static void rna_def_modifier_smoke(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_smoke_type_items);
RNA_def_property_ui_text(prop, "Type", "");
- RNA_def_property_update(prop, 0, "rna_Smoke_set_type");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_set_type");
}
static void rna_def_modifier_collision(BlenderRNA *brna)
@@ -1608,7 +1553,7 @@ static void rna_def_modifier_collision(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "absorption");
RNA_def_property_ui_range(prop, 0, 100, 1, 2);
RNA_def_property_ui_text(prop, "Absorption %", "How much of effector force gets lost during collision with this object (in percent).");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_bevel(BlenderRNA *brna)
@@ -1637,31 +1582,31 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "value");
RNA_def_property_range(prop, 0, 0.5);
RNA_def_property_ui_text(prop, "Width", "Bevel value/amount.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "only_vertices", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", BME_BEVEL_VERT);
RNA_def_property_ui_text(prop, "Only Vertices", "Bevel verts/corners, not edges.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "limit_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "lim_flags");
RNA_def_property_enum_items(prop, prop_limit_method_items);
RNA_def_property_ui_text(prop, "Limit Method", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "edge_weight_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "e_flags");
RNA_def_property_enum_items(prop, prop_edge_weight_method_items);
RNA_def_property_ui_text(prop, "Edge Weight Method", "What edge weight to use for weighting a vertex.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bevel_angle");
RNA_def_property_range(prop, 0, 180);
RNA_def_property_ui_range(prop, 0, 180, 100, 2);
RNA_def_property_ui_text(prop, "Angle", "Angle above which to bevel edges.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
@@ -1684,80 +1629,80 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "shrinkType");
RNA_def_property_enum_items(prop, prop_mode_items);
RNA_def_property_ui_text(prop, "Mode", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Target", "Mesh target to shrink to.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ShrinkwrapModifier_target_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "auxiliary_target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "auxTarget");
RNA_def_property_ui_text(prop, "Auxiliary Target", "Additional mesh target to shrink to.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ShrinkwrapModifier_auxiliary_target_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vgroup_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ShrinkwrapModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "keepDist");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 1, 2);
RNA_def_property_ui_text(prop, "Offset", "Distance to keep from the target.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS);
RNA_def_property_ui_text(prop, "X", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS);
RNA_def_property_ui_text(prop, "Y", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS);
RNA_def_property_ui_text(prop, "Z", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "subsurf_levels", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "subsurfLevels");
RNA_def_property_range(prop, 0, 6);
RNA_def_property_ui_range(prop, 0, 6, 1, 0);
RNA_def_property_ui_text(prop, "Subsurf Levels", "Number of subdivisions that must be performed before extracting vertices' positions and normals.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "negative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR);
RNA_def_property_ui_text(prop, "Negative", "Allow vertices to move in the negative direction of axis.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "positive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR);
RNA_def_property_ui_text(prop, "Positive", "Allow vertices to move in the positive direction of axis.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "cull_front_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE);
RNA_def_property_ui_text(prop, "Cull Front Faces", "Stop vertices from projecting to a front face on the target.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "cull_back_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_CULL_TARGET_BACKFACE);
RNA_def_property_ui_text(prop, "Cull Back Faces", "Stop vertices from projecting to a back face on the target.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "keep_above_surface", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE);
RNA_def_property_ui_text(prop, "Keep Above Surface", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_fluidsim(BlenderRNA *brna)
@@ -1793,25 +1738,25 @@ static void rna_def_modifier_mask(BlenderRNA *brna)
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_mode_items);
RNA_def_property_ui_text(prop, "Mode", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "armature", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ob_arm");
RNA_def_property_ui_text(prop, "Armature", "Armature to use as source of bones to mask.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_MaskModifier_armature_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vgroup");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MaskModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "inverse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MASK_INV);
RNA_def_property_ui_text(prop, "Inverse", "Use vertices that are not part of region defined.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_simpledeform(BlenderRNA *brna)
@@ -1834,29 +1779,29 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_mode_items);
RNA_def_property_ui_text(prop, "Mode", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vgroup_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SimpleDeformModifier_vgroup_set");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "origin", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Origin", "Origin of modifier space coordinates.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "relative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "originOpts", MOD_SIMPLEDEFORM_ORIGIN_LOCAL);
RNA_def_property_ui_text(prop, "Relative", "Sets the origin of deform space to be relative to the object.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -10, 10, 0.5, 2);
RNA_def_property_ui_text(prop, "Factor", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "limits", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "limit");
@@ -1864,17 +1809,17 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0, 1, 5, 2);
RNA_def_property_ui_text(prop, "Limits", "Lower/Upper limits for deform.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "lock_x_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "axis", MOD_SIMPLEDEFORM_LOCK_AXIS_X);
RNA_def_property_ui_text(prop, "Lock X Axis", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "lock_y_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "axis", MOD_SIMPLEDEFORM_LOCK_AXIS_Y);
RNA_def_property_ui_text(prop, "Lock Y Axis", "");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
}
static void rna_def_modifier_surface(BlenderRNA *brna)
@@ -1914,7 +1859,7 @@ void RNA_def_modifier(BlenderRNA *brna)
prop= RNA_def_property(srna, "realtime", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Realtime);
RNA_def_property_ui_text(prop, "Realtime", "Realtime display of a modifier.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 0);
prop= RNA_def_property(srna, "render", PROP_BOOLEAN, PROP_NONE);
@@ -1925,13 +1870,13 @@ void RNA_def_modifier(BlenderRNA *brna)
prop= RNA_def_property(srna, "editmode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Editmode);
RNA_def_property_ui_text(prop, "Editmode", "Use modifier while in the edit mode.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
RNA_def_property_ui_icon(prop, ICON_EDITMODE_HLT, 0);
prop= RNA_def_property(srna, "on_cage", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_OnCage);
RNA_def_property_ui_text(prop, "On Cage", "Enable direct editing of modifier control cage.");
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded);
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index 690a198f12c..98c72b7ee74 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -61,30 +61,6 @@ void rna_NlaStrip_name_set(PointerRNA *ptr, const char *value)
}
}
-static char *rna_NlaStrip_path(PointerRNA *ptr)
-{
- NlaStrip *strip= (NlaStrip *)ptr->data;
- AnimData *adt= BKE_animdata_from_id(ptr->id.data);
-
- /* if we're attached to AnimData, try to resolve path back to AnimData */
- if (adt) {
- NlaTrack *nlt;
- NlaStrip *nls;
-
- for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
- for (nls = nlt->strips.first; nls; nls = nls->next) {
- if (nls == strip) {
- // XXX but if we animate like this, the control will never work...
- return BLI_sprintfN("animation_data.nla_tracks[\"%s\"].strips[\"%s\"]", nlt->name, strip->name);
- }
- }
- }
- }
-
- /* no path */
- return "";
-}
-
static void rna_NlaStrip_start_frame_set(PointerRNA *ptr, float value)
{
@@ -295,7 +271,6 @@ void rna_def_nlastrip(BlenderRNA *brna)
/* struct definition */
srna= RNA_def_struct(brna, "NlaStrip", NULL);
RNA_def_struct_ui_text(srna, "NLA Strip", "A container referencing an existing Action.");
- RNA_def_struct_path_func(srna, "rna_NlaStrip_path");
RNA_def_struct_ui_icon(srna, ICON_NLA); // XXX
/* name property */
@@ -350,7 +325,6 @@ void rna_def_nlastrip(BlenderRNA *brna)
/* Action */
prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act");
- RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Action", "Action referenced by this strip.");
/* Action extents */
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 3fd358a1c16..23e79831292 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -57,15 +57,6 @@ StructRNA *rna_Node_refine(struct PointerRNA *ptr)
}
}
-static char *rna_Node_path(PointerRNA *ptr)
-{
- bNodeTree *ntree= (bNodeTree*)ptr->id.data;
- bNode *node= (bNode*)ptr->data;
- int index = BLI_findindex(&ntree->nodes, node);
-
- return BLI_sprintfN("nodes[%d]", index);
-}
-
#else
#define MaxNodes 1000
@@ -396,7 +387,6 @@ static void def_cmp_alpha_over(StructRNA *srna)
prop = RNA_def_property(srna, "premul", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "x");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Premul", "Mix Factor");
}
@@ -420,46 +410,38 @@ static void def_cmp_blur(StructRNA *srna)
prop = RNA_def_property(srna, "sizex", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sizex");
- RNA_def_property_range(prop, 0, 256);
RNA_def_property_ui_text(prop, "Size X", "");
prop = RNA_def_property(srna, "sizey", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sizey");
- RNA_def_property_range(prop, 1, 256);
RNA_def_property_ui_text(prop, "Size Y", "");
prop = RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samples");
- RNA_def_property_range(prop, 1, 256);
RNA_def_property_ui_text(prop, "Samples", "");
prop = RNA_def_property(srna, "max_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxspeed");
- RNA_def_property_range(prop, 1, 1024);
RNA_def_property_ui_text(prop, "Max Speed", "");
prop = RNA_def_property(srna, "min_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "minspeed");
- RNA_def_property_range(prop, 1, 1024);
RNA_def_property_ui_text(prop, "Min Speed", "");
-
+
prop = RNA_def_property(srna, "relative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "relative", 1);
RNA_def_property_ui_text(prop, "Relative", "");
prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fac");
- RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Factor", "");
prop = RNA_def_property(srna, "factor_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "percentx");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Relative Size X", "");
prop = RNA_def_property(srna, "factor_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "percenty");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Relative Size Y", "");
prop = RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE);
@@ -515,12 +497,10 @@ static void def_cmp_map_value(StructRNA *srna)
prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "loc");
- RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Offset", "");
prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "size");
- RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Size", "");
prop = RNA_def_property(srna, "use_min", PROP_BOOLEAN, PROP_NONE);
@@ -533,12 +513,10 @@ static void def_cmp_map_value(StructRNA *srna)
prop = RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min");
- RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Minimum", "");
prop = RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max");
- RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Maximum", "");
}
@@ -593,17 +571,14 @@ static void def_cmp_image(StructRNA *srna)
prop = RNA_def_property(srna, "frames", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "frames");
- RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Frames", "Number of images used in animation");
prop = RNA_def_property(srna, "start", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sfra");
- RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Start Frame", "");
prop = RNA_def_property(srna, "offset", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "offset");
- RNA_def_property_range(prop, -MAXFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Offset", "Offsets the number of the frame to use in the animation");
prop = RNA_def_property(srna, "cyclic", PROP_BOOLEAN, PROP_NONE);
@@ -620,7 +595,6 @@ static void def_cmp_image(StructRNA *srna)
prop = RNA_def_property(srna, "layer", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "layer");
- RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Layer", "");
/* } */
@@ -709,12 +683,10 @@ static void def_cmp_output_file(StructRNA *srna)
prop = RNA_def_property(srna, "start", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sfra");
- RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Start Frame", "");
prop = RNA_def_property(srna, "end", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "efra");
- RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "End Frame", "");
}
@@ -747,63 +719,39 @@ static void def_cmp_scale(StructRNA *srna)
static void def_cmp_diff_matte(StructRNA *srna)
{
PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
-
- /* TODO: nicer wrapping for tolerances */
- prop = RNA_def_property(srna, "tolerance", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Tolerance", "Color distances below this threshold are keyed.");
+ static EnumPropertyItem color_space_items[] = {
+ {1, "RGB", 0, "RGB", ""},
+ {2, "HSV", 0, "HSV", ""},
+ {3, "YUV", 0, "YUV", ""},
+ {4, "YCC", 0, "YCbCr", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
- prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "t2");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Falloff", "Color distances below this additional threshold are partially keyed.");
-}
-
-static void def_cmp_color_matte(StructRNA *srna)
-{
- PropertyRNA *prop;
+ prop = RNA_def_property(srna, "color_space", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "custom1");
+ RNA_def_property_enum_items(prop, color_space_items);
+ RNA_def_property_ui_text(prop, "Color Space", "");
RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
/* TODO: nicer wrapping for tolerances */
- prop = RNA_def_property(srna, "h", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "tolerance1", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "H", "Hue tolerance for colors to be considered a keying color");
+ RNA_def_property_ui_text(prop, "Channel 1 Tolerance", "");
- prop = RNA_def_property(srna, "s", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "tolerance2", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "S", "Saturation Tolerance for the color");
+ RNA_def_property_ui_text(prop, "Channel 2 Tolerance", "");
- prop = RNA_def_property(srna, "v", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "tolerance3", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t3");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "V", "Value Tolerance for the color");
-}
-
-static void def_cmp_distance_matte(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
-
- /* TODO: nicer wrapping for tolerances */
-
- prop = RNA_def_property(srna, "tolerance", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Tolerance", "Color distances below this threshold are keyed.");
+ RNA_def_property_ui_text(prop, "Channel 3 Tolerance", "");
prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "t2");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Falloff", "Color distances below this additional threshold are partially keyed.");
+ RNA_def_property_float_sdna(prop, NULL, "fstrength");
+ RNA_def_property_ui_text(prop, "Falloff", "");
}
static void def_cmp_color_spill(StructRNA *srna)
@@ -826,11 +774,10 @@ static void def_cmp_color_spill(StructRNA *srna)
prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_range(prop, 0.0f, 0.5f);
RNA_def_property_ui_text(prop, "Amount", "How much the selected channel is affected by");
}
-static void def_cmp_chroma_matte(StructRNA *srna)
+static void def_cmp_chroma(StructRNA *srna)
{
PropertyRNA *prop;
@@ -838,27 +785,22 @@ static void def_cmp_chroma_matte(StructRNA *srna)
prop = RNA_def_property(srna, "acceptance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_range(prop, 1.0f, 80.0f);
RNA_def_property_ui_text(prop, "Acceptance", "Tolerance for a color to be considered a keying color");
prop = RNA_def_property(srna, "cutoff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
- RNA_def_property_range(prop, 0.0f, 30.0f);
RNA_def_property_ui_text(prop, "Cutoff", "Tolerance below which colors will be considered as exact matches");
prop = RNA_def_property(srna, "lift", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fsize");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Lift", "Alpha lift");
prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fstrength");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gain", "Alpha gain");
prop = RNA_def_property(srna, "shadow_adjust", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t3");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shadow Adjust", "Adjusts the brightness of any shadows captured");
/* TODO:
@@ -893,12 +835,10 @@ static void def_cmp_channel_matte(StructRNA *srna)
prop = RNA_def_property(srna, "high", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "High", "Values higher than this setting are 100% opaque");
prop = RNA_def_property(srna, "low", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Low", "Values lower than this setting are 100% keyed");
/* TODO:
@@ -940,9 +880,8 @@ static void def_cmp_splitviewer(StructRNA *srna)
RNA_def_property_ui_text(prop, "Axis", "");
/* TODO: percentage */
- prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_PERCENTAGE);
+ prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "custom1");
- RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Factor", "");
}
@@ -952,7 +891,6 @@ static void def_cmp_id_mask(StructRNA *srna)
prop = RNA_def_property(srna, "index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom1");
- RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Index", "Pass index number to convert to alpha");
}
@@ -961,9 +899,8 @@ static void def_cmp_map_uv(StructRNA *srna)
PropertyRNA *prop;
/* TODO: percentage */
- prop = RNA_def_property(srna, "alpha", PROP_INT, PROP_PERCENTAGE);
+ prop = RNA_def_property(srna, "alpha", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom1");
- RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Alpha", "");
}
@@ -992,7 +929,6 @@ static void def_cmp_defocus(StructRNA *srna)
/* TODO: angle in degrees */
prop = RNA_def_property(srna, "angle", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rotation");
- RNA_def_property_range(prop, 0, 90);
RNA_def_property_ui_text(prop, "Angle", "Bokeh shape rotation offset in degrees");
prop = RNA_def_property(srna, "gamma_correction", PROP_BOOLEAN, PROP_NONE);
@@ -1002,17 +938,14 @@ static void def_cmp_defocus(StructRNA *srna)
/* TODO */
prop = RNA_def_property(srna, "f_stop", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fstop");
- RNA_def_property_range(prop, 0.0f, 128.0f);
RNA_def_property_ui_text(prop, "fStop", "Amount of focal blur, 128=infinity=perfect focus, half the value doubles the blur radius");
prop = RNA_def_property(srna, "max_blur", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxblur");
- RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Max Blur", "blur limit, maximum CoC radius, 0=no limit");
prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bthresh");
- RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Threshold", "CoC radius threshold, prevents background bleed on in-focus midground, 0=off");
prop = RNA_def_property(srna, "preview", PROP_BOOLEAN, PROP_NONE);
@@ -1021,7 +954,6 @@ static void def_cmp_defocus(StructRNA *srna)
prop = RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samples");
- RNA_def_property_range(prop, 16, 256);
RNA_def_property_ui_text(prop, "Samples", "Number of samples (16=grainy, higher=less noise)");
prop = RNA_def_property(srna, "use_zbuffer", PROP_BOOLEAN, PROP_NONE);
@@ -1030,7 +962,6 @@ static void def_cmp_defocus(StructRNA *srna)
prop = RNA_def_property(srna, "z_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scale");
- RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Z-Scale", "Scales the Z input when not using a zbuffer, controls maximum blur designated by the color white or input value 1");
}
@@ -1042,12 +973,10 @@ static void def_cmp_luma_matte(StructRNA *srna)
prop = RNA_def_property(srna, "high", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t1");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "High", "Values higher than this setting are 100% opaque");
prop = RNA_def_property(srna, "low", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "t2");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Low", "Values lower than this setting are 100% keyed");
/* TODO: keep low less than high */
@@ -1079,22 +1008,18 @@ static void def_cmp_crop(StructRNA *srna)
prop = RNA_def_property(srna, "x1", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "x1");
- RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "X1", "");
prop = RNA_def_property(srna, "x2", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "x2");
- RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "X2", "");
prop = RNA_def_property(srna, "y1", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "y1");
- RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Y1", "");
prop = RNA_def_property(srna, "y2", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "y2");
- RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Y2", "");
}
@@ -1106,7 +1031,6 @@ static void def_cmp_dblur(StructRNA *srna)
prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "iter");
- RNA_def_property_range(prop, 1, 128);
RNA_def_property_ui_text(prop, "Iterations", "");
prop = RNA_def_property(srna, "wrap", PROP_BOOLEAN, PROP_NONE);
@@ -1115,32 +1039,26 @@ static void def_cmp_dblur(StructRNA *srna)
prop = RNA_def_property(srna, "center_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "center_x");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Center X", "");
prop = RNA_def_property(srna, "center_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "center_y");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Center Y", "");
prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "distance");
- RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Distance", "");
prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "angle");
- RNA_def_property_range(prop, 0.0f, 360.0f);
RNA_def_property_ui_text(prop, "Angle", "");
prop = RNA_def_property(srna, "spin", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spin");
- RNA_def_property_range(prop, -360.0f, 360.0f);
RNA_def_property_ui_text(prop, "Spin", "");
prop = RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zoom");
- RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Zoom", "");
}
@@ -1152,18 +1070,16 @@ static void def_cmp_bilateral_blur(StructRNA *srna)
prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "iter");
- RNA_def_property_range(prop, 1, 128);
RNA_def_property_ui_text(prop, "Iterations", "");
prop = RNA_def_property(srna, "sigma_color", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sigma_color");
- RNA_def_property_range(prop, 0.01f, 3.0f);
RNA_def_property_ui_text(prop, "Color Sigma", "");
prop = RNA_def_property(srna, "sigma_space", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sigma_space");
- RNA_def_property_range(prop, 0.01f, 30.0f);
- RNA_def_property_ui_text(prop, "Space Sigma", "");
+ RNA_def_property_ui_text(prop, "Space Sigma", "");
+
}
static void def_cmp_premul_key(StructRNA *srna)
@@ -1216,37 +1132,30 @@ static void def_cmp_glare(StructRNA *srna)
prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "iter");
- RNA_def_property_range(prop, 2, 5);
RNA_def_property_ui_text(prop, "Iterations", "");
prop = RNA_def_property(srna, "color_modulation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colmod");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Color Modulation", "");
prop = RNA_def_property(srna, "mix", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mix");
- RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Mix", "-1 is original image only, 0 is exact 50/50 mix, 1 is processed image only");
prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "threshold");
- RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Threshold", "The glare filter will only be applied to pixels brighter than this value");
prop = RNA_def_property(srna, "streaks", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "angle");
- RNA_def_property_range(prop, 2, 16);
RNA_def_property_ui_text(prop, "Streaks", "Total number of streaks");
prop = RNA_def_property(srna, "angle_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "angle_ofs");
- RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "Angle Offset", "Streak angle offset in degrees");
prop = RNA_def_property(srna, "fade", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fade");
- RNA_def_property_range(prop, 0.75f, 1.0f);
RNA_def_property_ui_text(prop, "Fade", "Streak fade-out factor");
prop = RNA_def_property(srna, "rotate_45", PROP_BOOLEAN, PROP_NONE);
@@ -1255,7 +1164,6 @@ static void def_cmp_glare(StructRNA *srna)
prop = RNA_def_property(srna, "size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "size");
- RNA_def_property_range(prop, 6, 9);
RNA_def_property_ui_text(prop, "Size", "Glow/glare size (not actual size; relative to initial size of bright area of pixels)");
/* TODO */
@@ -1282,39 +1190,32 @@ static void def_cmp_tonemap(StructRNA *srna)
prop = RNA_def_property(srna, "key", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "key");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Key", "The value the average luminance is mapped to");
prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "offset");
- RNA_def_property_range(prop, 0.001f, 10.0f);
RNA_def_property_ui_text(prop, "Offset", "Normally always 1, but can be used as an extra control to alter the brightness curve");
prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "gamma");
- RNA_def_property_range(prop, 0.001f, 3.0f);
RNA_def_property_ui_text(prop, "Gamma", "If not used, set to 1");
/* TODO: } else { */
prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f");
- RNA_def_property_range(prop, -8.0f, 8.0f);
RNA_def_property_ui_text(prop, "Intensity", "If less than zero, darkens image; otherwise, makes it brighter");
prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "m");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Contrast", "Set to 0 to use estimate from input image");
prop = RNA_def_property(srna, "adaptation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "a");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Adaptation", "If 0, global; if 1, based on pixel intensity");
prop = RNA_def_property(srna, "correction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "c");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Color Correction", "If 0, same for all channels; if 1, each independent");
}
@@ -1370,22 +1271,18 @@ static void def_tex_bricks(StructRNA *srna)
prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "custom3");
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Offset Amount", "");
prop = RNA_def_property(srna, "offset_frequency", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom1");
- RNA_def_property_range(prop, 2, 99);
RNA_def_property_ui_text(prop, "Offset Frequency", "Offset every N rows");
prop = RNA_def_property(srna, "squash", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "custom4");
- RNA_def_property_range(prop, 0.0f, 99.0f);
RNA_def_property_ui_text(prop, "Squash Amount", "");
prop = RNA_def_property(srna, "squash_frequency", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "custom2");
- RNA_def_property_range(prop, 2, 99);
RNA_def_property_ui_text(prop, "Squash Frequency", "Squash every N rows");
}
@@ -1456,7 +1353,6 @@ static void rna_def_node(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Node", "Node in a node tree.");
RNA_def_struct_sdna(srna, "bNode");
RNA_def_struct_refine_func(srna, "rna_Node_refine");
- RNA_def_struct_path_func(srna, "rna_Node_path");
prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "locx");
diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h
index be4f131a6d6..47a7be163b1 100644
--- a/source/blender/makesrna/intern/rna_nodetree_types.h
+++ b/source/blender/makesrna/intern/rna_nodetree_types.h
@@ -82,7 +82,7 @@ DefNode( CompositorNode, CMP_NODE_SEPYUVA, 0, "SEPYU
DefNode( CompositorNode, CMP_NODE_COMBYUVA, 0, "COMBYUVA", CombYUVA, "Combine YUVA", "" )
DefNode( CompositorNode, CMP_NODE_DIFF_MATTE, def_cmp_diff_matte, "DIFF_MATTE", DiffMatte, "Difference Key", "" )
DefNode( CompositorNode, CMP_NODE_COLOR_SPILL, def_cmp_color_spill, "COLOR_SPILL", ColorSpill, "Color Spill", "" )
-DefNode( CompositorNode, CMP_NODE_CHROMA_MATTE, def_cmp_chroma_matte, "CHROMA_MATTE", ChromaMatte, "Chroma Key", "" )
+DefNode( CompositorNode, CMP_NODE_CHROMA, def_cmp_chroma, "CHROMA", Chroma, "Chroma Key", "" )
DefNode( CompositorNode, CMP_NODE_CHANNEL_MATTE, def_cmp_channel_matte, "CHANNEL_MATTE", ChannelMatte, "Channel Key", "" )
DefNode( CompositorNode, CMP_NODE_FLIP, def_cmp_flip, "FLIP", Flip, "Flip", "" )
DefNode( CompositorNode, CMP_NODE_SPLITVIEWER, def_cmp_splitviewer, "SPLITVIEWER", SplitViewer, "Split Viewer", "" )
@@ -104,9 +104,6 @@ DefNode( CompositorNode, CMP_NODE_PREMULKEY, def_cmp_premul_key, "PREMU
DefNode( CompositorNode, CMP_NODE_GLARE, def_cmp_glare, "GLARE", Glare, "Glare", "" )
DefNode( CompositorNode, CMP_NODE_TONEMAP, def_cmp_tonemap, "TONEMAP", Tonemap, "Tonemap", "" )
DefNode( CompositorNode, CMP_NODE_LENSDIST, def_cmp_lensdist, "LENSDIST", Lensdist, "Lensdist", "" )
-DefNode( CompositorNode, CMP_NODE_VIEW_LEVELS, 0, "LEVELS", Levels, "Levels", "" )
-DefNode( CompositorNode, CMP_NODE_COLOR_MATTE, def_cmp_color_matte, "COLOR_MATTE", ColorMatte, "Color Matte", "" )
-DefNode( CompositorNode, CMP_NODE_DIST_MATTE, def_cmp_distance_matte, "DISTANCE_MATTE", DistanceMatte, "Distance Matte", "" )
DefNode( TextureNode, TEX_NODE_OUTPUT, def_tex_output, "OUTPUT", Output, "Output", "" )
DefNode( TextureNode, TEX_NODE_CHECKER, 0, "CHECKER", Checker, "Checker", "" )
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 8525cf69f64..0b77390095e 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -39,9 +39,9 @@
#include "DNA_property_types.h"
#include "DNA_scene_types.h"
-#include "WM_api.h"
#include "WM_types.h"
+
EnumPropertyItem object_mode_items[] = {
{OB_MODE_OBJECT, "OBJECT", ICON_OBJECT_DATAMODE, "Object", ""},
{OB_MODE_EDIT, "EDIT", ICON_EDITMODE_HLT, "Edit", ""},
@@ -64,22 +64,6 @@ static EnumPropertyItem parent_type_items[] = {
{PARBONE, "BONE", 0, "Bone", ""},
{0, NULL, 0, NULL, NULL}};
-EnumPropertyItem object_type_items[] = {
- {OB_MESH, "MESH", 0, "Mesh", ""},
- {OB_CURVE, "CURVE", 0, "Curve", ""},
- {OB_SURF, "SURFACE", 0, "Surface", ""},
- {OB_MBALL, "META", 0, "Meta", ""},
- {OB_FONT, "TEXT", 0, "Text", ""},
- {0, "", 0, NULL, NULL},
- {OB_ARMATURE, "ARMATURE", 0, "Armature", ""},
- {OB_LATTICE, "LATTICE", 0, "Lattice", ""},
- {OB_EMPTY, "EMPTY", 0, "Empty", ""},
- {0, "", 0, NULL, NULL},
- {OB_CAMERA, "CAMERA", 0, "Camera", ""},
- {OB_LAMP, "LAMP", 0, "Lamp", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
#ifdef RNA_RUNTIME
#include "DNA_key_types.h"
@@ -100,7 +84,7 @@ EnumPropertyItem object_type_items[] = {
void rna_Object_update(bContext *C, PointerRNA *ptr)
{
- DAG_id_flush_update(ptr->id.data, OB_RECALC_OB);
+ DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_OB);
}
void rna_Object_matrix_update(bContext *C, PointerRNA *ptr)
@@ -111,13 +95,12 @@ void rna_Object_matrix_update(bContext *C, PointerRNA *ptr)
void rna_Object_update_data(bContext *C, PointerRNA *ptr)
{
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ptr->id.data);
+ DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA);
}
static void rna_Object_dependency_update(bContext *C, PointerRNA *ptr)
{
- DAG_id_flush_update(ptr->id.data, OB_RECALC_OB);
+ DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_OB);
DAG_scene_sort(CTX_data_scene(C));
}
@@ -807,8 +790,8 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
{OB_BOUND_SPHERE, "SPHERE", 0, "Sphere", ""},
{OB_BOUND_CYLINDER, "CYLINDER", 0, "Cylinder", ""},
{OB_BOUND_CONE, "CONE", 0, "Cone", ""},
- {OB_BOUND_POLYT, "CONVEX_HULL", 0, "Convex Hull", ""},
- {OB_BOUND_POLYH, "TRIANGLE_MESH", 0, "Triangle Mesh", ""},
+ {OB_BOUND_POLYH, "CONVEX_HULL", 0, "Convex Hull", ""},
+ {OB_BOUND_POLYT, "TRIANGLE_MESH", 0, "Triangle Mesh", ""},
//{OB_DYN_MESH, "DYNAMIC_MESH", 0, "Dynamic Mesh", ""},
{0, NULL, 0, NULL, NULL}};
@@ -1062,8 +1045,6 @@ static void rna_def_object(BlenderRNA *brna)
{OB_DUPLIGROUP, "GROUP", 0, "Group", "Enable group instancing."},
{0, NULL, 0, NULL, NULL}};
- int matrix_dimsize[]= {4, 4};
-
srna= RNA_def_struct(brna, "Object", "ID");
RNA_def_struct_ui_text(srna, "Object", "Object datablock defining an object in a scene..");
RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
@@ -1075,7 +1056,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_editable_func(prop, "rna_Object_data_editable");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Data", "Object data.");
- RNA_def_property_update(prop, 0, "rna_Object_update_data");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update_data");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
@@ -1089,7 +1070,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Mode", "Object interaction mode.");
- prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Layers", "Layers the object is on.");
@@ -1174,8 +1155,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "actcol");
RNA_def_property_int_funcs(prop, "rna_Object_active_material_index_get", "rna_Object_active_material_index_set", "rna_Object_active_material_index_range");
RNA_def_property_ui_text(prop, "Active Material Index", "Index of active material slot.");
- RNA_def_property_update(prop, NC_OBJECT|ND_SHADING, NULL);
-
+
/* transform */
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
@@ -1226,7 +1206,7 @@ static void rna_def_object(BlenderRNA *brna)
/* matrix */
prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "obmat");
- RNA_def_property_multi_array(prop, 2, matrix_dimsize);
+ RNA_def_property_array(prop, 16);
RNA_def_property_ui_text(prop, "Matrix", "Transformation matrix.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_matrix_update");
@@ -1257,13 +1237,13 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "VertexGroup");
RNA_def_property_pointer_funcs(prop, "rna_Object_active_vertex_group_get", "rna_Object_active_vertex_group_set", NULL);
RNA_def_property_ui_text(prop, "Active Vertex Group", "Vertex groups of the object.");
- RNA_def_property_update(prop, 0, "rna_Object_update_data");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "active_vertex_group_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "actdef");
RNA_def_property_int_funcs(prop, "rna_Object_active_vertex_group_index_get", "rna_Object_active_vertex_group_index_set", "rna_Object_active_vertex_group_index_range");
RNA_def_property_ui_text(prop, "Active Vertex Group Index", "Active index in vertex group array.");
- RNA_def_property_update(prop, 0, "rna_Object_update_data");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
/* empty */
@@ -1505,13 +1485,6 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "X-Ray", "Makes the object draw in front of others.");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- /* Grease Pencil */
- prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "gpd");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_struct_type(prop, "GreasePencil");
- RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil datablock");
-
/* pose */
prop= RNA_def_property(srna, "pose_library", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "poselib");
@@ -1530,7 +1503,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_boolean_funcs(prop, NULL, "rna_Object_shape_key_lock_set");
RNA_def_property_ui_text(prop, "Shape Key Lock", "Always show the current Shape for this Object.");
RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
- RNA_def_property_update(prop, 0, "rna_Object_update_data");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "active_shape_key", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ShapeKey");
@@ -1541,7 +1514,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "shapenr");
RNA_def_property_int_funcs(prop, "rna_Object_active_shape_key_index_get", "rna_Object_active_shape_key_index_set", "rna_Object_active_shape_key_index_range");
RNA_def_property_ui_text(prop, "Active Shape Key Index", "Current shape key index.");
- RNA_def_property_update(prop, 0, "rna_Object_update_data");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
RNA_api_object(srna);
}
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 968aa971f73..3c79c1cbc21 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -282,18 +282,18 @@ static void rna_Object_convert_to_triface(Object *ob, bContext *C, ReportList *r
if (!ob_editing)
free_editMesh(me->edit_mesh);
- DAG_id_flush_update(ob, OB_RECALC_DATA);
+ DAG_object_flush_update(sce, ob, OB_RECALC_DATA);
}
static bDeformGroup *rna_Object_add_vertex_group(Object *ob, char *group_name)
{
- return ED_vgroup_add_name(ob, group_name);
+ return add_defgroup_name(ob, group_name);
}
static void rna_Object_add_vertex_to_group(Object *ob, int vertex_index, bDeformGroup *def, float weight, int assignmode)
{
/* creates dverts if needed */
- ED_vgroup_vert_add(ob, def, vertex_index, weight, assignmode);
+ add_vert_to_defgroup(ob, def, vertex_index, weight, assignmode);
}
/* copied from old API Object.makeDisplayList (Object.c) */
@@ -307,7 +307,7 @@ static void rna_Object_make_display_list(Object *ob, bContext *C)
BKE_text_to_curve(sce, ob, CU_LEFT);
}
- DAG_id_flush_update(ob, OB_RECALC_DATA);
+ DAG_object_flush_update(sce, ob, OB_RECALC_DATA);
}
static Object *rna_Object_find_armature(Object *ob)
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 3dfbfcccacf..932bef9969d 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -54,6 +54,7 @@
static void rna_Cache_change(bContext *C, PointerRNA *ptr)
{
+ Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
PointCache *cache = (PointCache*)ptr->data;
PTCacheID *pid = NULL;
@@ -66,7 +67,7 @@ static void rna_Cache_change(bContext *C, PointerRNA *ptr)
BKE_ptcache_ids_from_object(&pidlist, ob);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
for(pid=pidlist.first; pid; pid=pid->next) {
if(pid->cache==cache)
@@ -104,6 +105,7 @@ static void rna_Cache_toggle_disk_cache(bContext *C, PointerRNA *ptr)
static void rna_Cache_idname_change(bContext *C, PointerRNA *ptr)
{
+ Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
PointCache *cache = (PointCache*)ptr->data;
PTCacheID *pid = NULL, *pid2= NULL;
@@ -131,7 +133,7 @@ static void rna_Cache_idname_change(bContext *C, PointerRNA *ptr)
cache->flag &= ~(PTCACHE_OUTDATED|PTCACHE_FRAMES_SKIPPED);
BKE_ptcache_load_external(pid);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
else {
for(pid=pidlist.first; pid; pid=pid->next) {
@@ -360,6 +362,7 @@ static void rna_SoftBodySettings_goal_vgroup_set(PointerRNA *ptr, const char *va
static void rna_FieldSettings_update(bContext *C, PointerRNA *ptr)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= (Object*)ptr->id.data;
if(ob->pd->forcefield != PFIELD_TEXTURE && ob->pd->tex) {
@@ -367,7 +370,7 @@ static void rna_FieldSettings_update(bContext *C, PointerRNA *ptr)
ob->pd->tex= 0;
}
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_object_flush_update(scene, ob, OB_RECALC_OB);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
}
@@ -410,9 +413,9 @@ static void rna_FieldSettings_dependency_update(bContext *C, PointerRNA *ptr)
DAG_scene_sort(scene);
if(ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE)
- DAG_id_flush_update(&ob->id, OB_RECALC);
+ DAG_object_flush_update(scene, ob, OB_RECALC);
else
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_object_flush_update(scene, ob, OB_RECALC_OB);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
}
@@ -434,20 +437,13 @@ static void rna_CollisionSettings_dependency_update(bContext *C, PointerRNA *ptr
static void rna_CollisionSettings_update(bContext *C, PointerRNA *ptr)
{
+ Scene *scene= CTX_data_scene(C);
Object *ob= (Object*)ptr->id.data;
- DAG_id_flush_update(&ob->id, OB_RECALC);
+ DAG_object_flush_update(scene, ob, OB_RECALC);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
}
-static void rna_softbody_update(bContext *C, PointerRNA *ptr)
-{
- Object *ob= (Object*)ptr->id.data;
-
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
-}
-
#else
static void rna_def_pointcache(BlenderRNA *brna)
@@ -900,25 +896,25 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "mediafrict");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Friction", "General media friction for point movements");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "nodemass");
RNA_def_property_range(prop, 0.0f, 50000.0f);
RNA_def_property_ui_text(prop, "Mass", "");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "grav");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_text(prop, "Gravitation", "Apply gravitation to point movement");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "physics_speed");
RNA_def_property_range(prop, 0.01f, 100.0f);
RNA_def_property_ui_text(prop, "Speed", "Tweak timing for physics to control frequency and speed");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
/* Goal */
@@ -931,31 +927,31 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "mingoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Minimum", "Goal minimum, vertex group weights are scaled to match this range.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "goal_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxgoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Maximum", "Goal maximum, vertex group weights are scaled to match this range.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "goal_default", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "defgoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Default", "Default Goal (vertex target position) value, when no Vertex Group used.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "goal_spring", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalspring");
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Goal Stiffness", "Goal (vertex target position) spring stiffness.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "goal_friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalfrict");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Goal Damping", "Goal (vertex target position) friction.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
/* Edge Spring Settings */
@@ -963,43 +959,43 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "inspring");
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Pull", "Edge spring stiffness when longer than rest length");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "push", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "inpush");
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Push", "Edge spring stiffness when shorter than rest length");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "damp", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "infrict");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Damp", "Edge spring friction");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "spring_length", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "springpreload");
RNA_def_property_range(prop, 0.0f, 200.0f);
RNA_def_property_ui_text(prop, "SL", "Alter spring length to shrink/blow up (unit %) 0 to disable");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "aero", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aeroedge");
RNA_def_property_range(prop, 0.0f, 30000.0f);
RNA_def_property_ui_text(prop, "Aero", "Make edges 'sail'");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "plastic", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "plastic");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Plastic", "Permanent deform");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "bending", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "secondspring");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Bending", "Bending Stiffness");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "shear", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shearstiff");
@@ -1012,25 +1008,25 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "sbc_mode");
RNA_def_property_enum_items(prop, collision_type_items);
RNA_def_property_ui_text(prop, "Collision Type", "Choose Collision Type");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "ball_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colball");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_text(prop, "Ball Size", "Absolute ball size or factor if not manual adjusted");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "ball_stiff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ballstiff");
RNA_def_property_range(prop, 0.001f, 100.0f);
RNA_def_property_ui_text(prop, "Ball Size", "Ball inflating presure");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "ball_damp", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "balldamp");
RNA_def_property_range(prop, 0.001f, 1.0f);
RNA_def_property_ui_text(prop, "Ball Size", "Blending to inelastic collision");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
/* Solver */
@@ -1038,36 +1034,36 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "rklimit");
RNA_def_property_range(prop, 0.001f, 10.0f);
RNA_def_property_ui_text(prop, "Error Limit", "The Runge-Kutta ODE solver error limit, low value gives more precision, high values speed");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "minstep", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "minloops");
RNA_def_property_range(prop, 0, 30000);
RNA_def_property_ui_text(prop, "Min Step", "Minimal # solver steps/frame");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "maxstep", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxloops");
RNA_def_property_range(prop, 0, 30000);
RNA_def_property_ui_text(prop, "Max Step", "Maximal # solver steps/frame");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "choke", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "choke");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Choke", "'Viscosity' inside collision target");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "fuzzy", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "fuzzyness");
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_text(prop, "Fuzzy", "Fuzzyness while on collision, high values make collsion handling faster but less stable");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "auto_step", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "solverflags", SBSO_OLDERR);
RNA_def_property_ui_text(prop, "V", "Use velocities for automagic step sizes");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "diagnose", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "solverflags", SBSO_MONITOR);
@@ -1078,37 +1074,37 @@ static void rna_def_softbody(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_goal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_use_goal_get", "rna_SoftBodySettings_use_goal_set");
RNA_def_property_ui_text(prop, "Use Goal", "Define forces for vertices to stick to animated position.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "use_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_use_edges_get", "rna_SoftBodySettings_use_edges_set");
RNA_def_property_ui_text(prop, "Use Edges", "Use Edges as springs");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "stiff_quads", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_stiff_quads_get", "rna_SoftBodySettings_stiff_quads_set");
RNA_def_property_ui_text(prop, "Stiff Quads", "Adds diagonal springs on 4-gons.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "edge_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_edge_collision_get", "rna_SoftBodySettings_edge_collision_set");
RNA_def_property_ui_text(prop, "Edge Collision", "Edges collide too.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "face_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_face_collision_get", "rna_SoftBodySettings_face_collision_set");
RNA_def_property_ui_text(prop, "Face Collision", "Faces collide too, SLOOOOOW warning.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "new_aero", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_new_aero_get", "rna_SoftBodySettings_new_aero_set");
RNA_def_property_ui_text(prop, "N", "New aero(uses angle and length).");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
prop= RNA_def_property(srna, "self_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_self_collision_get", "rna_SoftBodySettings_self_collision_set");
RNA_def_property_ui_text(prop, "Self Collision", "Enable naive vertex ball self collision.");
- RNA_def_property_update(prop, 0, "rna_softbody_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
}
void RNA_def_object_force(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_packedfile.c b/source/blender/makesrna/intern/rna_packedfile.c
index 85918bce05b..6b9a708f555 100644
--- a/source/blender/makesrna/intern/rna_packedfile.c
+++ b/source/blender/makesrna/intern/rna_packedfile.c
@@ -31,13 +31,6 @@
#include "DNA_packedFile_types.h"
-EnumPropertyItem unpack_method_items[] = {
- {PF_USE_LOCAL, "USE_LOCAL", 0, "Use Local File", ""},
- {PF_WRITE_LOCAL, "WRITE_LOCAL", 0, "Write Local File (overwrite existing)", ""},
- {PF_USE_ORIGINAL, "USE_ORIGINAL", 0, "Use Original File", ""},
- {PF_WRITE_ORIGINAL, "WRITE_ORIGINAL", 0, "Write Original File (overwrite existing)", ""},
- {0, NULL, 0, NULL, NULL}};
-
#ifdef RNA_RUNTIME
#else
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 719e6f43eed..e0dbc232e06 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -98,7 +98,6 @@ EnumPropertyItem part_hair_ren_as_items[] = {
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_particle.h"
-#include "BKE_pointcache.h"
#include "BLI_arithb.h"
@@ -114,14 +113,12 @@ static void rna_Particle_redo(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_REDO;
if(ob)
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_REDO);
}
-
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Particle_reset(bContext *C, PointerRNA *ptr)
@@ -136,15 +133,13 @@ static void rna_Particle_reset(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET;
if(ob) {
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET);
}
-
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Particle_target_reset(bContext *C, PointerRNA *ptr)
@@ -176,23 +171,22 @@ static void rna_Particle_target_reset(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
DAG_scene_sort(scene);
}
-
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Particle_target_redo(bContext *C, PointerRNA *ptr)
{
+ Scene *scene = CTX_data_scene(C);
+
if(ptr->type==&RNA_ParticleTarget) {
Object *ob = (Object*)ptr->id.data;
ParticleSystem *psys = psys_get_current(ob);
psys->recalc = PSYS_RECALC_REDO;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
}
@@ -208,15 +202,13 @@ static void rna_Particle_change_type(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET|PSYS_RECALC_TYPE;
if(ob) {
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET|PSYS_RECALC_TYPE);
}
-
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Particle_change_physics(bContext *C, PointerRNA *ptr)
@@ -224,7 +216,6 @@ static void rna_Particle_change_physics(bContext *C, PointerRNA *ptr)
Scene *scene = CTX_data_scene(C);
ParticleSettings *part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET|PSYS_RECALC_PHYS);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Particle_redo_child(bContext *C, PointerRNA *ptr)
@@ -239,15 +230,13 @@ static void rna_Particle_redo_child(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_CHILD;
if(ob)
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_CHILD);
}
-
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static PointerRNA rna_particle_settings_get(PointerRNA *ptr)
{
@@ -447,30 +436,7 @@ static void rna_ParticleTarget_name_get(PointerRNA *ptr, char *str)
else
strcpy(str, "Invalid target!");
}
-static int rna_ParticleSystem_multiple_caches_get(PointerRNA *ptr)
-{
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
-
- return (psys->ptcaches.first != psys->ptcaches.last);
-}
-static int rna_ParticleSystem_editable_get(PointerRNA *ptr)
-{
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
-
- if(psys->part && psys->part->type==PART_HAIR)
- return (psys->flag & PSYS_HAIR_DONE);
- else
- return (psys->pointcache->flag & PTCACHE_BAKED);
-}
-static int rna_ParticleSystem_edited_get(PointerRNA *ptr)
-{
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
- if(psys->part && psys->part->type==PART_HAIR)
- return (psys->edit && psys->edit->edited);
- else
- return (psys->pointcache->edit && psys->pointcache->edit->edited);
-}
EnumPropertyItem from_items[] = {
{PART_FROM_VERT, "VERT", 0, "Vertexes", ""},
{PART_FROM_FACE, "FACE", 0, "Faces", ""},
@@ -643,6 +609,12 @@ static void rna_def_particle(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "ParticleData");
RNA_def_struct_ui_text(srna, "Particle", "Particle in a particle system.");
+ prop= RNA_def_property(srna, "stick_object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "stick_ob");
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Stick Object", "Object that particle sticks to when dead");
+
/* Particle State & Previous State */
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "state.co");
@@ -687,6 +659,24 @@ static void rna_def_particle(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "keys", "totkey");
RNA_def_property_struct_type(prop, "ParticleKey");
RNA_def_property_ui_text(prop, "Keyed States", "");
+
+ /* Random variables */
+
+ prop= RNA_def_property(srna, "random_rotation", PROP_FLOAT, PROP_QUATERNION);
+ RNA_def_property_float_sdna(prop, NULL, "r_rot");
+// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
+ RNA_def_property_ui_text(prop, "Random Rotation", "");
+
+ prop= RNA_def_property(srna, "random_a_velocity", PROP_FLOAT, PROP_VELOCITY);
+ RNA_def_property_float_sdna(prop, NULL, "r_ave");
+// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
+ RNA_def_property_ui_text(prop, "Random Angular Velocity", "");
+
+ prop= RNA_def_property(srna, "random_velocity", PROP_FLOAT, PROP_VELOCITY);
+ RNA_def_property_float_sdna(prop, NULL, "r_ve");
+// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
+ RNA_def_property_ui_text(prop, "Random Velocity", "");
+
//
// float fuv[4], foffset; /* coordinates on face/edge number "num" and depth along*/
// /* face normal for volume emission */
@@ -709,12 +699,18 @@ static void rna_def_particle(BlenderRNA *brna)
// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
RNA_def_property_ui_text(prop, "Size", "");
+ prop= RNA_def_property(srna, "size_multiplier", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "sizemul");
+// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
+ RNA_def_property_ui_text(prop, "Size Multiplier", "");
+
//
// int num; /* index to vert/edge/face */
// int num_dmcache; /* index to derived mesh data (face) to avoid slow lookups */
// int pad;
//
// int totkey;
+// int bpi; /* softbody body point start index */
/* flag */
prop= RNA_def_property(srna, "unexist", PROP_BOOLEAN, PROP_NONE);
@@ -725,10 +721,31 @@ static void rna_def_particle(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_NO_DISP);
RNA_def_property_ui_text(prop, "no_disp", "");
+ prop= RNA_def_property(srna, "sticky", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_STICKY);
+ RNA_def_property_ui_text(prop, "sticky", "");
+
+ prop= RNA_def_property(srna, "transform", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_TRANSFORM);
+ RNA_def_property_ui_text(prop, "transform", "");
+
+ prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_HIDE);
+ RNA_def_property_ui_text(prop, "hide", "");
+
+ prop= RNA_def_property(srna, "tag", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_TAG);
+ RNA_def_property_ui_text(prop, "tag", "");
+
prop= RNA_def_property(srna, "rekey", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_REKEY);
RNA_def_property_ui_text(prop, "rekey", "");
+ prop= RNA_def_property(srna, "edit_recalc", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PARS_EDIT_RECALC);
+ RNA_def_property_ui_text(prop, "edit_recalc", "");
+
+
prop= RNA_def_property(srna, "alive_state", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "alive");
RNA_def_property_enum_items(prop, alive_items);
@@ -868,19 +885,19 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_REACT_STA_END);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Start/End", "Give birth to unreacted particles eventually.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "react_multiple", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_REACT_MULTIPLE);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Multi React", "React multiple times.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "loop", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_LOOP);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Loop", "Loop particle lives.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* TODO: used somewhere? */
prop= RNA_def_property(srna, "hair_geometry", PROP_BOOLEAN, PROP_NONE);
@@ -890,88 +907,94 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "unborn", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_UNBORN);
RNA_def_property_ui_text(prop, "Unborn", "Show particles before they are emitted.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "died", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_DIED);
RNA_def_property_ui_text(prop, "Died", "Show particles after they have died");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "trand", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_TRAND);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Random", "Emit in random order of elements");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "even_distribution", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_EDISTR);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Even Distribution", "Use even distribution from faces based on face areas or edge lengths.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
-
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+
+ prop= RNA_def_property(srna, "sticky", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_STICKY);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
+ RNA_def_property_ui_text(prop, "Sticky", "Particles stick to collided objects if they die in the collision.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+
prop= RNA_def_property(srna, "die_on_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_DIE_ON_COL);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Die on hit", "Particles die when they collide with a deflector object.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "size_deflect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SIZE_DEFL);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Size Deflect", "Use particle's size in deflection.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "rotation_dynamic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_ROT_DYN);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Dynamic", "Sets rotation to dynamic/constant");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "sizemass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SIZEMASS);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Mass from Size", "Multiply mass with particle size.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "boids_2d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_BOIDS_2D);
RNA_def_property_ui_text(prop, "Boids 2D", "Constrain boids to a surface");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "branching", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_BRANCHING);
RNA_def_property_ui_text(prop, "Branching", "Branch child paths from each other.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "animate_branching", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_ANIM_BRANCHING);
RNA_def_property_ui_text(prop, "Animated", "Animate branching");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "symmetric_branching", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SYMM_BRANCHING);
RNA_def_property_ui_text(prop, "Symmetric", "Start and end points are the same.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "hair_bspline", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_HAIR_BSPLINE);
RNA_def_property_ui_text(prop, "B-Spline", "Interpolate hair using B-Splines.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "grid_invert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_GRID_INVERT);
RNA_def_property_ui_text(prop, "Invert", "Invert what is considered object and what is not.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "child_effector", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_EFFECT);
RNA_def_property_ui_text(prop, "Children", "Apply effectors to children.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "child_seams", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_SEAMS);
RNA_def_property_ui_text(prop, "Use seams", "Use seams to determine parents");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
/* TODO: used somewhere? */
prop= RNA_def_property(srna, "child_render", PROP_BOOLEAN, PROP_NONE);
@@ -981,19 +1004,19 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "child_guide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_GUIDE);
RNA_def_property_ui_text(prop, "child_guide", "");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "self_effect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SELF_EFFECT);
RNA_def_property_ui_text(prop, "Self Effect", "Particle effectors effect themselves.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, type_items);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Type", "");
- RNA_def_property_update(prop, 0, "rna_Particle_change_type");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_change_type");
prop= RNA_def_property(srna, "emit_from", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "from");
@@ -1001,14 +1024,14 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_from_itemf");
RNA_def_property_ui_text(prop, "Emit From", "Where to emit particles from");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "distribution", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "distr");
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_items(prop, dist_items);
RNA_def_property_ui_text(prop, "Distribution", "How to distribute particles on selected element");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* physics modes */
prop= RNA_def_property(srna, "physics_type", PROP_ENUM, PROP_NONE);
@@ -1016,130 +1039,130 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_items(prop, phys_type_items);
RNA_def_property_ui_text(prop, "Physics Type", "Particle physics type");
- RNA_def_property_update(prop, 0, "rna_Particle_change_physics");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_change_physics");
prop= RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rotmode");
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_items(prop, rot_mode_items);
RNA_def_property_ui_text(prop, "Rotation", "Particles initial rotation");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "angular_velocity_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "avemode");
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_items(prop, ave_mode_items);
RNA_def_property_ui_text(prop, "Angular Velocity Mode", "Particle angular velocity mode.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "react_event", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "reactevent");
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_items(prop, react_event_items);
RNA_def_property_ui_text(prop, "React On", "The event of target particles to react on.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/*draw flag*/
prop= RNA_def_property(srna, "velocity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_VEL);
RNA_def_property_ui_text(prop, "Velocity", "Show particle velocity");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "show_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_SIZE);
RNA_def_property_ui_text(prop, "Size", "Show particle size");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "emitter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_EMITTER);
RNA_def_property_ui_text(prop, "Emitter", "Render emitter Object also.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "draw_health", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_HEALTH);
RNA_def_property_ui_text(prop, "Health", "Draw boid health");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "abs_path_time", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_ABS_PATH_TIME);
RNA_def_property_ui_text(prop, "Absolute Path Time", "Path timing is in absolute frames");
- RNA_def_property_update(prop, 0, "rna_Particle_abspathtime_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_abspathtime_update");
prop= RNA_def_property(srna, "billboard_lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_BB_LOCK);
RNA_def_property_ui_text(prop, "Lock Billboard", "Lock the billboards align axis");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "parent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_PARENT);
RNA_def_property_ui_text(prop, "Parents", "Render parent particles.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "num", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_NUM);
RNA_def_property_ui_text(prop, "Number", "Show particle number");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "rand_group", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_RAND_GR);
RNA_def_property_ui_text(prop, "Pick Random", "Pick objects from group randomly");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "render_adaptive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_REN_ADAPT);
RNA_def_property_ui_text(prop, "Adaptive render", "Draw steps of the particle path");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "velocity_length", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_VEL_LENGTH);
RNA_def_property_ui_text(prop, "Speed", "Multiply line length by particle speed");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "material_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_MAT_COL);
RNA_def_property_ui_text(prop, "Material Color", "Draw particles using material's diffuse color.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "whole_group", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_WHOLE_GR);
RNA_def_property_ui_text(prop, "Whole Group", "Use whole group at once.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "render_strand", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_REN_STRAND);
RNA_def_property_ui_text(prop, "Strand render", "Use the strand primitive for rendering");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "draw_as", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "draw_as");
RNA_def_property_enum_items(prop, part_draw_as_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_draw_as_itemf");
RNA_def_property_ui_text(prop, "Particle Drawing", "How particles are drawn in viewport");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "ren_as", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ren_as");
RNA_def_property_enum_items(prop, part_ren_as_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_ren_as_itemf");
RNA_def_property_ui_text(prop, "Particle Rendering", "How particles are rendered");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "draw_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Draw Size", "Size of particles on viewport in pixels (0=default)");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "child_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "childtype");
RNA_def_property_enum_items(prop, child_type_items);
RNA_def_property_ui_text(prop, "Children From", "Create child particles");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "draw_step", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 7);
RNA_def_property_ui_range(prop, 0, 10, 1, 0);
RNA_def_property_ui_text(prop, "Steps", "How many steps paths are drawn with (power of 2)");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "render_step", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ren_step");
@@ -1150,7 +1173,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "hair_step", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 2, 50);
RNA_def_property_ui_text(prop, "Segments", "Number of hair segments");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
//TODO: not found in UI, readonly?
@@ -1173,13 +1196,13 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "disp");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Display", "Percentage of particles to display in 3d view");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "material", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "omat");
RNA_def_property_range(prop, 1, 16);
RNA_def_property_ui_text(prop, "Material", "Specify material used for the particles");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
//TODO: is this read only/internal?
@@ -1191,24 +1214,24 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "integrator", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, integrator_type_items);
RNA_def_property_ui_text(prop, "Integration", "Select physics integrator type");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "kink", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, kink_type_items);
RNA_def_property_ui_text(prop, "Kink", "Type of periodic offset on the path");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "kink_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, kink_axis_items);
RNA_def_property_ui_text(prop, "Axis", "Which axis to use for offset");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
/* billboards */
prop= RNA_def_property(srna, "billboard_align", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "bb_align");
RNA_def_property_enum_items(prop, bb_align_items);
RNA_def_property_ui_text(prop, "Align to", "In respect to what the billboards are aligned");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "billboard_uv_split", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "bb_uv_split");
@@ -1230,13 +1253,13 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "bb_tilt");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Tilt", "Tilt of the billboards");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "billboard_random_tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bb_rand_tilt");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Tilt", "Random tilt of the billboards");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "billboard_offset", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "bb_offset");
@@ -1244,7 +1267,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, -100.0f, 100.0f);
RNA_def_property_ui_range(prop, -1.0, 1.0, 0.1, 3);
RNA_def_property_ui_text(prop, "Billboard Offset", "");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
/* simplification */
prop= RNA_def_property(srna, "enable_simplify", PROP_BOOLEAN, PROP_NONE);
@@ -1279,7 +1302,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_start_set", NULL);
RNA_def_property_ui_text(prop, "Start", "Frame # to start emitting particles.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "end", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
@@ -1287,37 +1310,37 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_end_set", NULL);
RNA_def_property_ui_text(prop, "End", "Frame # to stop emitting particles.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, 1.0f, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Lifetime", "Specify the life span of the particles");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "random_lifetime", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randlife");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random", "Give the particle life a random variation.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "time_tweak", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "timetweak");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Tweak", "A multiplier for physics timestep (1.0 means one frame = 1/25 seconds)");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "jitter_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_float_sdna(prop, NULL, "jitfac");
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Amount", "Amount of jitter applied to the sampling.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "effect_hair", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "eff_hair");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Stiffnes", "Hair stiffness for effectors");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "amount", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "totpart");
@@ -1328,14 +1351,14 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 10000000);
RNA_def_property_ui_range(prop, 0, 100000, 1, 0);
RNA_def_property_ui_text(prop, "Amount", "Total number of particles.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "userjit", PROP_INT, PROP_UNSIGNED);//TODO: can we get a better name for userjit?
RNA_def_property_int_sdna(prop, NULL, "userjit");
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_range(prop, 0, 1000);
RNA_def_property_ui_text(prop, "P/F", "Emission locations / face (0 = automatic).");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "grid_resolution", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "grid_res");
@@ -1343,102 +1366,102 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 1, 46); /* ~100k particles in a cube */
RNA_def_property_ui_range(prop, 1, 215, 1, 0); /* ~10M particles in a cube */
RNA_def_property_ui_text(prop, "Resolution", "The resolution of the particle grid.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* initial velocity factors */
prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "normfac");//optional if prop names are the same
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Normal", "Let the surface normal give the particle a starting speed.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "object_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "obfac");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Object", "Let the object give the particle a starting speed");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "random_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randfac");//optional if prop names are the same
RNA_def_property_range(prop, 0.0f, 200.0f);
RNA_def_property_ui_text(prop, "Random", "Give the starting speed a random variation.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "particle_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "partfac");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Particle", "Let the target particle give the particle a starting speed.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "tangent_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tanfac");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Tangent", "Let the surface tangent give the particle a starting speed.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "tangent_phase", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tanphase");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Rot", "Rotate the surface tangent.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "reactor_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "reactfac");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_text(prop, "Reactor", "Let the vector away from the target particles location give the particle a starting speed.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "angular_velocity_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "avefac");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Angular Velocity", "Angular velocity amount");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "phase_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "phasefac");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Phase", "Initial rotation phase");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "random_rotation_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randrotfac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Rotation", "Randomize rotation");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "random_phase_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randphasefac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Phase", "Randomize rotation phase");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* physical properties */
prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 100.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Mass", "Specify the mass of the particles");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "particle_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_range(prop, 0.001f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 100.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Size", "The size of the particles");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "random_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randsize");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Size", "Give the particle size a random variation");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "reaction_shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "reactshape");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Shape", "Power of reaction strength dependence on distance to target.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* global physical properties */
@@ -1447,38 +1470,38 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Acceleration", "Constant acceleration");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "acc[2]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Gravity", "Constant acceleration in global Z axis direction");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "drag_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dragfac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Drag", "Specify the amount of air-drag.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "brownian_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "brownfac");
RNA_def_property_range(prop, 0.0f, 200.0f);
RNA_def_property_ui_text(prop, "Brownian", "Specify the amount of brownian motion");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "damp_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dampfac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Damp", "Specify the amount of damping");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* random length */
prop= RNA_def_property(srna, "random_length", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randlength");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Length", "Give path length a random variation.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
/* children */
prop= RNA_def_property(srna, "child_nbr", PROP_INT, PROP_NONE);
@@ -1486,7 +1509,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 100000);
RNA_def_property_ui_range(prop, 0, 1000, 1, 0);
RNA_def_property_ui_text(prop, "Children Per Parent", "Amount of children/parent");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rendered_child_nbr", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ren_child_nbr");
@@ -1498,45 +1521,45 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "parents");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Virtual Parents", "Relative amount of virtual parents.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "childsize");
RNA_def_property_range(prop, 0.001f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 100.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Child Size", "A multiplier for the child particle size.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_random_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "childrandsize");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Child Size", "Random variation to the size of the child particles.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "childrad");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Child Radius", "Radius of children around parent.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_roundness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "childflat");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Child Roundness", "Roundness of children around parent.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
/* clumping */
prop= RNA_def_property(srna, "clump_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clumpfac");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Clump", "Amount of clumping");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "clumppow", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clumppow");
RNA_def_property_range(prop, -0.999f, 0.999f);
RNA_def_property_ui_text(prop, "Shape", "Shape of clumping");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
/* kink */
@@ -1545,19 +1568,19 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, -100000.0f, 100000.0f);
RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Amplitude", "The amplitude of the offset.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "kink_frequency", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kink_freq");
RNA_def_property_range(prop, -100000.0f, 100000.0f);
RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Frequency", "The frequency of the offset (1/total length)");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "kink_shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -0.999f, 0.999f);
RNA_def_property_ui_text(prop, "Shape", "Adjust the offset to the beginning/end");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
/* rough */
@@ -1565,64 +1588,64 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Rough1", "Amount of location dependent rough.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough1_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Size1", "Size of location dependent rough.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough2", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough2");
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Rough2", "Amount of random rough.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough2_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough2_size");
RNA_def_property_range(prop, 0.01f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Size2", "Size of random rough.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough2_thres", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough2_thres");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold", "Amount of particles left untouched by random rough.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough_endpoint", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough_end");
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Rough Endpoint", "Amount of end point rough.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough_end_shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Shape", "Shape of end point rough");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_length", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clength");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Length", "Length of child paths");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_length_thres", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clength_thres");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold", "Amount of particles left untouched by child path length.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
/* branching */
prop= RNA_def_property(srna, "branch_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "branch_thres");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold", "Threshold of branching.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
/* drawing stuff */
prop= RNA_def_property(srna, "line_length_tail", PROP_FLOAT, PROP_NONE);
@@ -1630,33 +1653,33 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Back", "Length of the line's tail");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "line_length_head", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_PartSetting_linelenhead_get", "rna_PartSetting_linelenhead_set", NULL);
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Head", "Length of the line's head");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "path_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "path_start");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_PartSetting_pathstartend_range");
RNA_def_property_ui_text(prop, "Path Start", "Starting time of drawn path.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "path_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "path_end");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_PartSetting_pathstartend_range");
RNA_def_property_ui_text(prop, "Path End", "End time of drawn path.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "trail_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "trail_count");
RNA_def_property_range(prop, 1, 100000);
RNA_def_property_ui_range(prop, 1, 100, 1, 0);
RNA_def_property_ui_text(prop, "Trail Count", "Number of trail particles.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
/* keyed particles */
prop= RNA_def_property(srna, "keyed_loops", PROP_INT, PROP_NONE);
@@ -1664,7 +1687,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 1.0f, 10000.0f);
RNA_def_property_ui_range(prop, 1.0f, 100.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Loop count", "Number of times the keys are looped.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
/* boids */
prop= RNA_def_property(srna, "boids", PROP_POINTER, PROP_NONE);
@@ -1679,21 +1702,21 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Dupli Group", "Show Objects in this Group in place of particles");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "dupli_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "dup_ob");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Dupli Object", "Show this Object in place of particles.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "billboard_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bb_ob");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Billboard Object", "Billboards face this object (default is active camera)");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
/* effectors */
prop= RNA_def_property(srna, "effector_group", PROP_POINTER, PROP_NONE);
@@ -1701,77 +1724,77 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Effector Group", "Limit effectors to this Group.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_all", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[0]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "All", "All effector's weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_spherical", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[1]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Spherical", "Spherical effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_vortex", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[2]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Vortex", "Vortex effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_magnetic", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[3]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Magnetic", "Magnetic effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_wind", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[4]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Wind", "Wind effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_curveguide", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[5]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Curve Guide", "Curve guide effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_texture", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[6]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
- RNA_def_property_ui_text(prop, "Texture", "Texture effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_ui_text(prop, "Magnetic", "Texture effector weight.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_harmonic", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[7]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Harmonic", "Harmonic effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_charge", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[8]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Charge", "Charge effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_lennardjones", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[9]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Lennard-Jones", "Lennard-Jones effector weight.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* animation here? */
rna_def_animdata_common(srna);
@@ -1806,25 +1829,25 @@ static void rna_def_particle_target(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Target Object", "The object that has the target particle system (empty if same object).");
- RNA_def_property_update(prop, 0, "rna_Particle_target_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_target_reset");
prop= RNA_def_property(srna, "system", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "psys");
RNA_def_property_range(prop, 1, INT_MAX);
RNA_def_property_ui_text(prop, "Target Particle System", "The index of particle system on the target object.");
- RNA_def_property_update(prop, 0, "rna_Particle_target_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_target_reset");
prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "time");
RNA_def_property_range(prop, 0.0, 30000.0f); //TODO: replace 30000 with MAXFRAMEF when available in 2.5
RNA_def_property_ui_text(prop, "Time", "");
- RNA_def_property_update(prop, 0, "rna_Particle_target_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_target_redo");
prop= RNA_def_property(srna, "duration", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "duration");
RNA_def_property_range(prop, 0.0, 30000.0f); //TODO: replace 30000 with MAXFRAMEF when available in 2.5
RNA_def_property_ui_text(prop, "Duration", "");
- RNA_def_property_update(prop, 0, "rna_Particle_target_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_target_redo");
prop= RNA_def_property(srna, "valid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTARGET_VALID);
@@ -1835,7 +1858,7 @@ static void rna_def_particle_target(BlenderRNA *brna)
RNA_def_property_enum_items(prop, mode_items);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Mode", "");
- RNA_def_property_update(prop, 0, "rna_Particle_target_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_target_reset");
}
static void rna_def_particle_system(BlenderRNA *brna)
@@ -1859,7 +1882,7 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_particle_settings_get", "rna_particle_settings_set", NULL);
RNA_def_property_ui_text(prop, "Settings", "Particle system settings.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "particles", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "particles", "totpart");
@@ -1873,7 +1896,7 @@ static void rna_def_particle_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "seed", PROP_INT, PROP_UNSIGNED);
RNA_def_property_ui_text(prop, "Seed", "Offset in the random number table, to get a different randomized result.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* hair */
prop= RNA_def_property(srna, "softbody", PROP_POINTER, PROP_NONE);
@@ -1884,30 +1907,30 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "softflag", OB_SB_ENABLE);
RNA_def_property_ui_text(prop, "Use Soft Body", "Enable use of soft body for hair physics simulation.");
- prop= RNA_def_property(srna, "global_hair", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_GLOBAL_HAIR);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Global Hair", "Hair keys are in global coordinate space");
+ prop= RNA_def_property(srna, "editable", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_EDITED);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* various checks needed */
+ RNA_def_property_ui_text(prop, "Editable", "For hair particle systems, finalize the hair to enable editing.");
/* reactor */
prop= RNA_def_property(srna, "reactor_target_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "target_ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Reactor Target Object", "For reactor systems, the object that has the target particle system (empty if same object).");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "reactor_target_particle_system", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "target_psys");
RNA_def_property_range(prop, 1, INT_MAX);
RNA_def_property_ui_text(prop, "Reactor Target Particle System", "For reactor systems, index of particle system on the target object.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* keyed */
prop= RNA_def_property(srna, "keyed_timing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_KEYED_TIMING);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Keyed timing", "Use key times");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "ParticleTarget");
@@ -1943,122 +1966,122 @@ static void rna_def_particle_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "vertex_group_density", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[0]");
RNA_def_property_ui_text(prop, "Vertex Group Density", "Vertex group to control density.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_density_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_DENSITY));
RNA_def_property_ui_text(prop, "Vertex Group Density Negate", "Negate the effect of the density vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_velocity", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[1]");
RNA_def_property_ui_text(prop, "Vertex Group Velocity", "Vertex group to control velocity.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_velocity_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_VEL));
RNA_def_property_ui_text(prop, "Vertex Group Velocity Negate", "Negate the effect of the velocity vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_length", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[2]");
RNA_def_property_ui_text(prop, "Vertex Group Length", "Vertex group to control length.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "vertex_group_length_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_LENGTH));
RNA_def_property_ui_text(prop, "Vertex Group Length Negate", "Negate the effect of the length vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
prop= RNA_def_property(srna, "vertex_group_clump", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[3]");
RNA_def_property_ui_text(prop, "Vertex Group Clump", "Vertex group to control clump.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_clump_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_CLUMP));
RNA_def_property_ui_text(prop, "Vertex Group Clump Negate", "Negate the effect of the clump vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_kink", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[4]");
RNA_def_property_ui_text(prop, "Vertex Group Kink", "Vertex group to control kink.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_kink_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_KINK));
RNA_def_property_ui_text(prop, "Vertex Group Kink Negate", "Negate the effect of the kink vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness1", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[5]");
RNA_def_property_ui_text(prop, "Vertex Group Roughness 1", "Vertex group to control roughness 1.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness1_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROUGH1));
RNA_def_property_ui_text(prop, "Vertex Group Roughness 1 Negate", "Negate the effect of the roughness 1 vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness2", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[6]");
RNA_def_property_ui_text(prop, "Vertex Group Roughness 2", "Vertex group to control roughness 2.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness2_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROUGH2));
RNA_def_property_ui_text(prop, "Vertex Group Roughness 2 Negate", "Negate the effect of the roughness 2 vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness_end", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[7]");
RNA_def_property_ui_text(prop, "Vertex Group Roughness End", "Vertex group to control roughness end.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness_end_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROUGHE));
RNA_def_property_ui_text(prop, "Vertex Group Roughness End Negate", "Negate the effect of the roughness end vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[8]");
RNA_def_property_ui_text(prop, "Vertex Group Size", "Vertex group to control size.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_size_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_SIZE));
RNA_def_property_ui_text(prop, "Vertex Group Size Negate", "Negate the effect of the size vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_tangent", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[9]");
RNA_def_property_ui_text(prop, "Vertex Group Tangent", "Vertex group to control tangent.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_tangent_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_TAN));
RNA_def_property_ui_text(prop, "Vertex Group Tangent Negate", "Negate the effect of the tangent vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_rotation", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[10]");
RNA_def_property_ui_text(prop, "Vertex Group Rotation", "Vertex group to control rotation.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_rotation_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROT));
RNA_def_property_ui_text(prop, "Vertex Group Rotation Negate", "Negate the effect of the rotation vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_field", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[11]");
RNA_def_property_ui_text(prop, "Vertex Group Field", "Vertex group to control field.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_field_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_EFFECTOR));
RNA_def_property_ui_text(prop, "Vertex Group Field Negate", "Negate the effect of the field vertex group.");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
/* pointcache */
prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NEVER_NULL);
@@ -2066,28 +2089,12 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "PointCache");
RNA_def_property_ui_text(prop, "Point Cache", "");
- prop= RNA_def_property(srna, "multiple_caches", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_ParticleSystem_multiple_caches_get", NULL);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Multiple Caches", "Particle system has multiple point caches");
-
/* offset ob */
prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "parent");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Parent", "Use this object's coordinate system instead of global coordinate system.");
- RNA_def_property_update(prop, 0, "rna_Particle_redo");
-
- /* hair or cache editing */
- prop= RNA_def_property(srna, "editable", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_ParticleSystem_editable_get", NULL);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Editable", "Particle system can be edited in particle mode");
-
- prop= RNA_def_property(srna, "edited", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_ParticleSystem_edited_get", NULL);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Edited", "Particle system has been edited in particle mode");
+ RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
}
void RNA_def_particle(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 0ee5f7e2663..9e4af513062 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -55,7 +55,7 @@ static void rna_Pose_update(bContext *C, PointerRNA *ptr)
{
// XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
+ DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA);
}
static char *rna_PoseChannel_path(PointerRNA *ptr)
@@ -124,73 +124,12 @@ static void rna_PoseChannel_euler_rotation_set(PointerRNA *ptr, const float *val
{
bPoseChannel *pchan= ptr->data;
- if(pchan->rotmode == PCHAN_ROT_QUAT) /* default XYZ eulers when using quats... */
+ if(pchan->rotmode == PCHAN_ROT_QUAT)
EulToQuat((float*)value, pchan->quat);
else
VECCOPY(pchan->eul, value);
}
-static void rna_PoseChannel_rotation_mode_set(PointerRNA *ptr, int value)
-{
- bPoseChannel *pchan= ptr->data;
-
- /* check if any change - if so, need to convert data */
- // TODO: this needs to be generalised at some point to work for objects too...
- if (value > 0) { /* to euler */
- if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
- /* axis-angle to euler */
- float m[3][3];
-
- /* convert to 3x3 matrix, then to euler
- * - axis angle is stored in quats
- */
- VecRotToMat3(&pchan->quat[1], pchan->quat[0], m);
- Mat3ToEulO(m, pchan->eul, value);
- }
- else if (pchan->rotmode == PCHAN_ROT_QUAT) {
- /* quat to euler */
- QuatToEulO(pchan->quat, pchan->eul, value);
- }
- /* else { no conversion needed } */
- }
- else if (value == PCHAN_ROT_QUAT) { /* to quat */
- if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
- /* axis angle to quat */
- float q[4];
-
- /* copy to temp var first, since quats and axis-angle are stored in same place */
- QuatCopy(q, pchan->quat);
- AxisAngleToQuat(q, &pchan->quat[1], pchan->quat[0]);
- }
- else if (pchan->rotmode > 0) {
- /* euler to quat */
- EulOToQuat(pchan->eul, pchan->rotmode, pchan->quat);
- }
- /* else { no conversion needed } */
- }
- else { /* to axis-angle */
- if (pchan->rotmode > 0) {
- /* euler to axis angle */
- float q[4];
-
- /* convert to temp quat, then to axis angle (since stored in same var) */
- EulOToQuat(pchan->eul, pchan->rotmode, q);
- QuatToAxisAngle(q, &pchan->quat[1], &pchan->quat[0]);
- }
- else if (pchan->rotmode == PCHAN_ROT_QUAT) {
- /* quat to axis angle */
- float q[4];
-
- /* copy to temp var first, since quats and axis-angle are stored in same place */
- QuatCopy(q, pchan->quat);
- QuatToAxisAngle(q, &pchan->quat[1], &pchan->quat[0]);
- }
- }
-
- /* finally, set the new rotation type */
- pchan->rotmode= value;
-}
-
static void rna_PoseChannel_name_set(PointerRNA *ptr, const char *value)
{
Object *ob= (Object*)ptr->id.data;
@@ -212,72 +151,12 @@ static int rna_PoseChannel_has_ik_get(PointerRNA *ptr)
return ED_pose_channel_in_IK_chain(ob, pchan);
}
-static PointerRNA rna_PoseChannel_bone_group_get(PointerRNA *ptr)
-{
- Object *ob= (Object*)ptr->id.data;
- bPose *pose= (ob) ? ob->pose : NULL;
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
- bActionGroup *grp;
-
- if (pose)
- grp= BLI_findlink(&pose->agroups, pchan->agrp_index-1);
- else
- grp= NULL;
-
- return rna_pointer_inherit_refine(ptr, &RNA_BoneGroup, grp);
-}
-
-static void rna_PoseChannel_bone_group_set(PointerRNA *ptr, PointerRNA value)
-{
- Object *ob= (Object*)ptr->id.data;
- bPose *pose= (ob) ? ob->pose : NULL;
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
-
- if (pose)
- pchan->agrp_index= BLI_findindex(&pose->agroups, value.data) + 1;
- else
- pchan->agrp_index= 0;
-}
-
-static int rna_PoseChannel_bone_group_index_get(PointerRNA *ptr)
-{
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
- return MAX2(pchan->agrp_index-1, 0);
-}
-
-static void rna_PoseChannel_bone_group_index_set(PointerRNA *ptr, int value)
-{
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
- pchan->agrp_index= value+1;
-}
-
-static void rna_PoseChannel_bone_group_index_range(PointerRNA *ptr, int *min, int *max)
-{
- Object *ob= (Object*)ptr->id.data;
- bPose *pose= (ob) ? ob->pose : NULL;
-
- *min= 0;
-
- if (pose) {
- *max= BLI_countlist(&pose->agroups)-1;
- *max= MAX2(0, *max);
- }
- else
- *max= 0;
-}
-
static PointerRNA rna_Pose_active_bone_group_get(PointerRNA *ptr)
{
bPose *pose= (bPose*)ptr->data;
return rna_pointer_inherit_refine(ptr, &RNA_BoneGroup, BLI_findlink(&pose->agroups, pose->active_group-1));
}
-static void rna_Pose_active_bone_group_set(PointerRNA *ptr, PointerRNA value)
-{
- bPose *pose= (bPose*)ptr->data;
- pose->active_group= BLI_findindex(&pose->agroups, value.data) + 1;
-}
-
static int rna_Pose_active_bone_group_index_get(PointerRNA *ptr)
{
bPose *pose= (bPose*)ptr->data;
@@ -386,7 +265,6 @@ static void rna_def_bone_group(BlenderRNA *brna)
srna= RNA_def_struct(brna, "BoneGroup", NULL);
RNA_def_struct_sdna(srna, "bActionGroup");
RNA_def_struct_ui_text(srna, "Bone Group", "Groups of Pose Channels (Bones).");
- RNA_def_struct_ui_icon(srna, ICON_GROUP_BONE);
/* name */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -415,13 +293,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
{
static EnumPropertyItem prop_rotmode_items[] = {
{PCHAN_ROT_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock (default)"},
- {PCHAN_ROT_XYZ, "XYZ", 0, "XYZ Euler", "XYZ Rotation Order. Prone to Gimbal Lock"},
- {PCHAN_ROT_XZY, "XZY", 0, "XZY Euler", "XZY Rotation Order. Prone to Gimbal Lock"},
- {PCHAN_ROT_YXZ, "YXZ", 0, "YXZ Euler", "YXZ Rotation Order. Prone to Gimbal Lock"},
- {PCHAN_ROT_YZX, "YZX", 0, "YZX Euler", "YZX Rotation Order. Prone to Gimbal Lock"},
- {PCHAN_ROT_ZXY, "ZXY", 0, "ZXY Euler", "ZXY Rotation Order. Prone to Gimbal Lock"},
- {PCHAN_ROT_ZYX, "ZYX", 0, "ZYX Euler", "ZYX Rotation Order. Prone to Gimbal Lock"},
- //{PCHAN_ROT_AXISANGLE, "AXIS_ANGLE", 0, "Axis Angle", "Axis Angle (W+XYZ). Defines a rotation around some axis defined by 3D-Vector."},
+ {PCHAN_ROT_EUL, "EULER", 0, "Euler (XYZ)", "Prone to Gimbal Lock"},
{0, NULL, 0, NULL, NULL}};
StructRNA *srna;
@@ -432,23 +304,60 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Pose Channel", "Channel defining pose data for a bone in a Pose.");
RNA_def_struct_path_func(srna, "rna_PoseChannel_path");
RNA_def_struct_idproperties_func(srna, "rna_PoseChannel_idproperties");
-
- /* Bone 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 that act on this PoseChannel.");
- /* Name + Selection Status */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_PoseChannel_name_set");
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
+
+ prop= RNA_def_property(srna, "has_ik", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_PoseChannel_has_ik_get", NULL);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Has IK", "Is part of an IK chain.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+ prop= RNA_def_property(srna, "ik_dof_x", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_XDOF);
+ RNA_def_property_ui_text(prop, "IK X DoF", "Allow movement around the X axis.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+ prop= RNA_def_property(srna, "ik_dof_y", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_YDOF);
+ RNA_def_property_ui_text(prop, "IK Y DoF", "Allow movement around the Y axis.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+ prop= RNA_def_property(srna, "ik_dof_z", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_ZDOF);
+ RNA_def_property_ui_text(prop, "IK Z DoF", "Allow movement around the Z axis.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+ prop= RNA_def_property(srna, "ik_limit_x", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_XLIMIT);
+ RNA_def_property_ui_text(prop, "IK X Limit", "Limit movement around the X axis.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+ prop= RNA_def_property(srna, "ik_limit_y", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_YLIMIT);
+ RNA_def_property_ui_text(prop, "IK Y Limit", "Limit movement around the Y axis.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+ prop= RNA_def_property(srna, "ik_limit_z", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_ZLIMIT);
+ RNA_def_property_ui_text(prop, "IK Z Limit", "Limit movement around the Z axis.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "selectflag", BONE_SELECTED);
RNA_def_property_ui_text(prop, "Selected", "");
+
+ prop= RNA_def_property(srna, "bone_group_index", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "agrp_index");
+ RNA_def_property_ui_text(prop, "Bone Group Index", "Bone Group this pose channel belongs to (0=no group).");
- /* Baked Bone Path cache data s*/
prop= RNA_def_property(srna, "path_start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "pathsf");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -460,8 +369,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bone Paths Calculation End Frame", "End frame of range of frames to use for Bone Path calculations.");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
-
- /* Relationships to other bones */
+
prop= RNA_def_property(srna, "bone", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "Bone");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -476,35 +384,33 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "PoseChannel");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Child", "Child of this pose channel.");
-
- /* Transformation settings */
+
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Scale", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "quat");
RNA_def_property_ui_text(prop, "Rotation", "Rotation in Quaternions.");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "euler_rotation", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "eul");
RNA_def_property_float_funcs(prop, "rna_PoseChannel_euler_rotation_get", "rna_PoseChannel_euler_rotation_set", NULL);
RNA_def_property_ui_text(prop, "Rotation (Euler)", "Rotation in Eulers.");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rotmode");
RNA_def_property_enum_items(prop, prop_rotmode_items);
- RNA_def_property_enum_funcs(prop, NULL, "rna_PoseChannel_rotation_mode_set", NULL);
RNA_def_property_ui_text(prop, "Rotation Mode", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
/* These three matrix properties await an implementation of the PROP_MATRIX subtype, which currently doesn't exist. */
prop= RNA_def_property(srna, "channel_matrix", PROP_FLOAT, PROP_MATRIX);
@@ -527,7 +433,6 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Constraint Inverse Matrix", "4x4 matrix, defines transform from final position to unconstrained position.");
*/
- /* Head/Tail Coordinates (in Pose Space) - Automatically calculated... */
prop= RNA_def_property(srna, "pose_head", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Pose Head Position", "Location of head of the channel's bone.");
@@ -535,145 +440,85 @@ static void rna_def_pose_channel(BlenderRNA *brna)
prop= RNA_def_property(srna, "pose_tail", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Pose Tail Position", "Location of tail of the channel's bone.");
-
- /* IK Settings */
- prop= RNA_def_property(srna, "has_ik", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_PoseChannel_has_ik_get", NULL);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Has IK", "Is part of an IK chain.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
- prop= RNA_def_property(srna, "ik_dof_x", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_XDOF);
- RNA_def_property_ui_text(prop, "IK X DoF", "Allow movement around the X axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- prop= RNA_def_property(srna, "ik_dof_y", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_YDOF);
- RNA_def_property_ui_text(prop, "IK Y DoF", "Allow movement around the Y axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- prop= RNA_def_property(srna, "ik_dof_z", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_ZDOF);
- RNA_def_property_ui_text(prop, "IK Z DoF", "Allow movement around the Z axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- prop= RNA_def_property(srna, "ik_limit_x", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_XLIMIT);
- RNA_def_property_ui_text(prop, "IK X Limit", "Limit movement around the X axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- prop= RNA_def_property(srna, "ik_limit_y", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_YLIMIT);
- RNA_def_property_ui_text(prop, "IK Y Limit", "Limit movement around the Y axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- prop= RNA_def_property(srna, "ik_limit_z", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_ZLIMIT);
- RNA_def_property_ui_text(prop, "IK Z Limit", "Limit movement around the Z axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
prop= RNA_def_property(srna, "ik_min_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmin[0]");
RNA_def_property_range(prop, -180.0f, 0.0f);
RNA_def_property_ui_text(prop, "IK X Minimum", "Minimum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_max_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmax[0]");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "IK X Maximum", "Maximum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_min_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmin[1]");
RNA_def_property_range(prop, -180.0f, 0.0f);
RNA_def_property_ui_text(prop, "IK Y Minimum", "Minimum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_max_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmax[1]");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "IK Y Maximum", "Maximum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_min_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmin[2]");
RNA_def_property_range(prop, -180.0f, 0.0f);
RNA_def_property_ui_text(prop, "IK Z Minimum", "Minimum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_max_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmax[2]");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "IK Z Maximum", "Maximum angles for IK Limit");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_stiffness_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stiffness[0]");
RNA_def_property_range(prop, 0.0f, 0.99f);
RNA_def_property_ui_text(prop, "IK X Stiffness", "IK stiffness around the X axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_stiffness_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stiffness[1]");
RNA_def_property_range(prop, 0.0f, 0.99f);
RNA_def_property_ui_text(prop, "IK Y Stiffness", "IK stiffness around the Y axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_stiffness_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stiffness[2]");
RNA_def_property_range(prop, 0.0f, 0.99f);
RNA_def_property_ui_text(prop, "IK Z Stiffness", "IK stiffness around the Z axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
prop= RNA_def_property(srna, "ik_stretch", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ikstretch");
RNA_def_property_range(prop, 0.0f,1.0f);
RNA_def_property_ui_text(prop, "IK Stretch", "Allow scaling of the bone for IK.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- /* custom bone shapes */
- prop= RNA_def_property(srna, "custom_shape", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "custom");
- RNA_def_property_struct_type(prop, "Object");
- RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+ prop= RNA_def_property(srna, "custom", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Custom Object", "Object that defines custom draw type for this bone.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- /* bone groups */
- prop= RNA_def_property(srna, "bone_group_index", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "agrp_index");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_int_funcs(prop, "rna_PoseChannel_bone_group_index_get", "rna_PoseChannel_bone_group_index_set", "rna_PoseChannel_bone_group_index_range");
- RNA_def_property_ui_text(prop, "Bone Group Index", "Bone Group this pose channel belongs to (0=no group).");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- prop= RNA_def_property(srna, "bone_group", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "BoneGroup");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_pointer_funcs(prop, "rna_PoseChannel_bone_group_get", "rna_PoseChannel_bone_group_set", NULL);
- RNA_def_property_ui_text(prop, "Bone Group", "Bone Group this pose channel belongs to");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
-
- /* transform locks */
+ RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
prop= RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_LOCX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Location", "Lock editing of location in the interface.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
prop= RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_SCALEX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface.");
- RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
}
static void rna_def_pose(BlenderRNA *brna)
@@ -700,9 +545,8 @@ static void rna_def_pose(BlenderRNA *brna)
prop= RNA_def_property(srna, "active_bone_group", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "BoneGroup");
- RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_Pose_active_bone_group_get", "rna_Pose_active_bone_group_set", NULL);
- RNA_def_property_ui_text(prop, "Active Bone Group", "Active bone group for this pose.");
+ RNA_def_property_ui_text(prop, "Active Bone Group", "Bone groups of the pose.");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
prop= RNA_def_property(srna, "active_bone_group_index", PROP_INT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_pose_api.c b/source/blender/makesrna/intern/rna_pose_api.c
index 40bb131b3f9..42bb52d8544 100644
--- a/source/blender/makesrna/intern/rna_pose_api.c
+++ b/source/blender/makesrna/intern/rna_pose_api.c
@@ -1,6 +1,4 @@
/**
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index a67831715a2..9137e596da1 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -170,52 +170,41 @@ static void rna_RenderLayer_passes_begin(CollectionPropertyIterator *iter, Point
rna_iterator_listbase_begin(iter, &rl->passes, NULL);
}
-static int rna_RenderLayer_rect_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
+static float rna_RenderValue_value_get(PointerRNA *ptr)
{
- RenderLayer *rl= (RenderLayer*)ptr->data;
-
- length[0]= rl->rectx*rl->recty;
- length[1]= 4;
-
- return length[0]*length[1];
+ return *(float*)ptr->data;
}
-static void rna_RenderLayer_rect_get(PointerRNA *ptr, float *values)
+static void rna_RenderValue_value_set(PointerRNA *ptr, float value)
{
- RenderLayer *rl= (RenderLayer*)ptr->data;
- memcpy(values, rl->rectf, sizeof(float)*rl->rectx*rl->recty*4);
+ *(float*)ptr->data= value;
}
-static void rna_RenderLayer_rect_set(PointerRNA *ptr, const float *values)
+static void rna_RenderLayer_rect_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
RenderLayer *rl= (RenderLayer*)ptr->data;
- memcpy(rl->rectf, values, sizeof(float)*rl->rectx*rl->recty*4);
+ rna_iterator_array_begin(iter, (void*)rl->rectf, sizeof(float), rl->rectx*rl->recty*4, 0, NULL);
}
-static int rna_RenderPass_rect_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
+static int rna_RenderLayer_rect_length(PointerRNA *ptr)
{
- RenderPass *rpass= (RenderPass*)ptr->data;
-
- length[0]= rpass->rectx*rpass->recty;
- length[1]= rpass->channels;
-
- return length[0]*length[1];
+ RenderLayer *rl= (RenderLayer*)ptr->data;
+ return rl->rectx*rl->recty*4;
}
-static void rna_RenderPass_rect_get(PointerRNA *ptr, float *values)
+static void rna_RenderPass_rect_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
RenderPass *rpass= (RenderPass*)ptr->data;
- printf("rect get\n");
- memcpy(values, rpass->rect, sizeof(float)*rpass->rectx*rpass->recty*rpass->channels);
+ rna_iterator_array_begin(iter, (void*)rpass->rect, sizeof(float), rpass->rectx*rpass->recty*rpass->channels, 0, NULL);
}
-static void rna_RenderPass_rect_set(PointerRNA *ptr, const float *values)
+static int rna_RenderPass_rect_length(PointerRNA *ptr)
{
RenderPass *rpass= (RenderPass*)ptr->data;
- printf("rect set\n");
- memcpy(rpass->rect, values, sizeof(float)*rpass->rectx*rpass->recty*rpass->channels);
+ return rpass->rectx*rpass->recty*rpass->channels;
}
+
#else // RNA_RUNTIME
static void rna_def_render_engine(BlenderRNA *brna)
@@ -335,11 +324,16 @@ static void rna_def_render_layer(BlenderRNA *brna)
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, 0, 0);
- prop= RNA_def_property(srna, "rect", PROP_FLOAT, PROP_NONE);
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_multi_array(prop, 2, NULL);
- RNA_def_property_dynamic_array_funcs(prop, "rna_RenderLayer_rect_get_length");
- RNA_def_property_float_funcs(prop, "rna_RenderLayer_rect_get", "rna_RenderLayer_rect_set", NULL);
+ prop= RNA_def_property(srna, "rect", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_struct_type(prop, "RenderValue");
+ RNA_def_property_collection_funcs(prop, "rna_RenderLayer_rect_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_RenderLayer_rect_length", 0, 0, 0, 0);
+
+ /* value */
+ srna= RNA_def_struct(brna, "RenderValue", NULL);
+ RNA_def_struct_ui_text(srna, "Render Value", "");
+
+ prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_funcs(prop, "rna_RenderValue_value_get", "rna_RenderValue_value_set", NULL);
RNA_define_verify_sdna(1);
}
@@ -389,11 +383,9 @@ static void rna_def_render_pass(BlenderRNA *brna)
RNA_def_property_enum_items(prop, pass_type_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "rect", PROP_FLOAT, PROP_NONE);
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_multi_array(prop, 2, NULL);
- RNA_def_property_dynamic_array_funcs(prop, "rna_RenderPass_rect_get_length");
- RNA_def_property_float_funcs(prop, "rna_RenderPass_rect_get", "rna_RenderPass_rect_set", NULL);
+ prop= RNA_def_property(srna, "rect", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_struct_type(prop, "RenderValue");
+ RNA_def_property_collection_funcs(prop, "rna_RenderPass_rect_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_RenderPass_rect_length", 0, 0, 0, 0);
RNA_define_verify_sdna(1);
}
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 8df6398f1f4..57ed5ccef39 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -430,7 +430,7 @@ static int rna_Property_array_length_get(PointerRNA *ptr)
{
PropertyRNA *prop= (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
- return prop->totarraylength;
+ return prop->arraylength;
}
static int rna_Property_registered_get(PointerRNA *ptr)
@@ -798,8 +798,6 @@ static void rna_def_property(BlenderRNA *brna)
{PROP_XYZ, "XYZ", 0, "XYZ", ""},
{PROP_RGB, "RGB", 0, "RGB", ""},
{PROP_NEVER_NULL, "NEVER_NULL", 0, "Never Null", ""},
- {PROP_LAYER, "LAYER", 0, "Layer", ""},
- {PROP_LAYER_MEMBER, "LAYER_MEMBERSHIP", 0, "Layer Membership", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem unit_items[] = {
{PROP_UNIT_NONE, "NONE", 0, "None", ""},
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 965796c6d5b..60071efb0a8 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -32,9 +32,6 @@
#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
-/* Include for Bake Options */
-#include "RE_pipeline.h"
-
#ifdef WITH_FFMPEG
#include "BKE_writeffmpeg.h"
#include <libavcodec/avcodec.h>
@@ -65,7 +62,6 @@ EnumPropertyItem prop_mode_items[] ={
#include "BLI_threads.h"
-#include "ED_info.h"
#include "ED_node.h"
#include "RE_pipeline.h"
@@ -363,6 +359,12 @@ static void rna_SceneRenderLayer_layer_set(PointerRNA *ptr, const int *values)
rl->lay= layer_set(rl->lay, values);
}
+static void rna_SceneRenderLayer_zmask_layer_set(PointerRNA *ptr, const int *values)
+{
+ SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
+ rl->lay_zmask= layer_set(rl->lay_zmask, values);
+}
+
static void rna_SceneRenderLayer_pass_update(bContext *C, PointerRNA *ptr)
{
Scene *scene= (Scene*)ptr->id.data;
@@ -388,10 +390,10 @@ static void rna_def_tool_settings(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem uv_select_mode_items[] = {
- {UV_SELECT_VERTEX, "VERTEX", ICON_UV_VERTEXSEL, "Vertex", "Vertex selection mode."},
- {UV_SELECT_EDGE, "EDGE", ICON_UV_EDGESEL, "Edge", "Edge selection mode."},
- {UV_SELECT_FACE, "FACE", ICON_UV_FACESEL, "Face", "Face selection mode."},
- {UV_SELECT_ISLAND, "ISLAND", ICON_UV_ISLANDSEL, "Island", "Island selection mode."},
+ {UV_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode."},
+ {UV_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode."},
+ {UV_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode."},
+ {UV_SELECT_ISLAND, "ISLAND", ICON_LINKEDSEL, "Island", "Island selection mode."},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem mesh_select_mode_items[] = {
@@ -415,7 +417,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem auto_key_items[] = {
- {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add & Replace", ""},
+ {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add/Replace", ""},
{AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
{0, NULL, 0, NULL, NULL}};
@@ -452,13 +454,6 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_enum_items(prop, prop_mode_items);
RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode.");
- prop= RNA_def_property(srna, "normal_size", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_sdna(prop, NULL, "normalsize");
- RNA_def_property_ui_text(prop, "Normal Size", "Display size for normals in the 3D view.");
- RNA_def_property_range(prop, 0.00001, 1000.0);
- RNA_def_property_ui_range(prop, 0.01, 10.0, 0.1, 2);
- RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL);
-
prop= RNA_def_property(srna, "automerge_editing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "automerge", 0);
RNA_def_property_ui_text(prop, "AutoMerge Editing", "Automatically merge vertices moved to the same location.");
@@ -591,7 +586,7 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
/* layers */
- prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Visible Layers", "Scene layers included in this render layer.");
@@ -600,10 +595,12 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "zmask_layers", PROP_BOOLEAN, PROP_LAYER);
+ prop= RNA_def_property(srna, "zmask_layers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "lay_zmask", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Zmask Layers", "Zmask scene layers.");
+ if(scene) RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_zmask_layer_set");
+ else RNA_def_property_boolean_funcs(prop, NULL, "rna_RenderLayer_zmask_layer_set");
if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -1112,30 +1109,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{R_OUTPUT_WINDOW, "WINDOW", 0, "New Window", "Images are rendered in new Window"},
{0, NULL, 0, NULL, NULL}};
- /* Bake */
- static EnumPropertyItem bake_mode_items[] ={
- {RE_BAKE_ALL, "FULL", 0, "Full Render", ""},
- {RE_BAKE_AO, "AO", 0, "Ambient Occlusion", ""},
- {RE_BAKE_SHADOW, "SHADOW", 0, "Shadow", ""},
- {RE_BAKE_NORMALS, "NORMALS", 0, "Normals", ""},
- {RE_BAKE_TEXTURE, "TEXTURE", 0, "Textures", ""},
- {RE_BAKE_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem bake_normal_space_items[] ={
- {R_BAKE_SPACE_CAMERA, "CAMERA", 0, "Camera", ""},
- {R_BAKE_SPACE_WORLD, "WORLD", 0, "World", ""},
- {R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", ""},
- {R_BAKE_SPACE_TANGENT, "TANGENT", 0, "Tangent", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem bake_aa_items[] ={
- {5, "AA_5", 0, "5", ""},
- {8, "AA_8", 0, "8", ""},
- {11, "AA_11", 0, "11", ""},
- {16, "AA_16", 0, "16", ""},
- {0, NULL, 0, NULL, NULL}};
-
static EnumPropertyItem octree_resolution_items[] = {
{64, "OCTREE_RES_64", 0, "64", ""},
{128, "OCTREE_RES_128", 0, "128", ""},
@@ -1167,30 +1140,30 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{0, "STAMP_FONT_LARGE", 0, "Large", ""},
{4, "STAMP_FONT_EXTRALARGE", 0, "Extra Large", ""},
{0, NULL, 0, NULL, NULL}};
-
+
+
static EnumPropertyItem image_type_items[] = {
- {0, "", 0, "Image", NULL},
{R_PNG, "PNG", 0, "PNG", ""},
{R_JPEG90, "JPEG", 0, "JPEG", ""},
#ifdef WITH_OPENJPEG
{R_JP2, "JPEG2000", 0, "JPEG 2000", ""},
#endif
+ {R_TIFF, "TIFF", 0, "TIFF", ""}, // XXX only with G.have_libtiff
{R_BMP, "BMP", 0, "BMP", ""},
{R_TARGA, "TARGA", 0, "Targa", ""},
{R_RAWTGA, "RAWTARGA", 0, "Targa Raw", ""},
//{R_DDS, "DDS", 0, "DDS", ""}, // XXX not yet implemented
{R_HAMX, "HAMX", 0, "HamX", ""},
{R_IRIS, "IRIS", 0, "Iris", ""},
- {0, "", 0, " ", NULL},
+ {0, "", 0, NULL, NULL},
#ifdef WITH_OPENEXR
{R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
{R_MULTILAYER, "MULTILAYER", 0, "MultiLayer", ""},
#endif
- {R_TIFF, "TIFF", 0, "TIFF", ""}, // XXX only with G.have_libtiff
{R_RADHDR, "RADHDR", 0, "Radiance HDR", ""},
{R_CINEON, "CINEON", 0, "Cineon", ""},
{R_DPX, "DPX", 0, "DPX", ""},
- {0, "", 0, "Movie", NULL},
+ {0, "", 0, NULL, NULL},
{R_AVIRAW, "AVIRAW", 0, "AVI Raw", ""},
{R_AVIJPEG, "AVIJPEG", 0, "AVI JPEG", ""},
#ifdef _WIN32
@@ -1213,6 +1186,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
#endif
{R_FFMPEG, "FFMPEG", 0, "FFMpeg", ""},
#endif
+ {0, "", 0, NULL, NULL},
{R_FRAMESERVER, "FRAMESERVER", 0, "Frame Server", ""},
{0, NULL, 0, NULL, NULL}};
@@ -1620,10 +1594,10 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Edge", "Create a toon outline around the edges of geometry");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "edge_threshold", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "edge_intensity", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "edgeint");
RNA_def_property_range(prop, 0, 255);
- RNA_def_property_ui_text(prop, "Edge Threshold", "Threshold for drawing outlines on geometry edges");
+ RNA_def_property_ui_text(prop, "Edge Intensity", "Threshold for drawing outlines on geometry edges");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "edge_color", PROP_FLOAT, PROP_COLOR);
@@ -1649,7 +1623,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur (uses number of anti-aliasing samples).");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "border", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER);
RNA_def_property_ui_text(prop, "Border", "Render a user-defined border region, within the frame size.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -1659,14 +1633,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Crop to Border", "Crop the rendered frame to the defined border size.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_placeholder", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "placeholders", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_TOUCH);
RNA_def_property_ui_text(prop, "Placeholders", "Create empty placeholder files while rendering frames (similar to Unix 'touch').");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", R_NO_OVERWRITE);
- RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing files while rendering.");
+ prop= RNA_def_property(srna, "no_overwrite", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", R_NO_OVERWRITE);
+ RNA_def_property_ui_text(prop, "No Overwrite", "Skip and don't overwrite existing files while rendering");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE);
@@ -1732,57 +1706,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Output Path", "Directory/name to save animations, # characters defines the position and length of frame numbers.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- /* Bake */
-
- prop= RNA_def_property(srna, "bake_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_mode");
- RNA_def_property_enum_items(prop, bake_mode_items);
- RNA_def_property_ui_text(prop, "Bake Mode", "");
-
- prop= RNA_def_property(srna, "bake_normal_space", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_normal_space");
- RNA_def_property_enum_items(prop, bake_normal_space_items);
- RNA_def_property_ui_text(prop, "Normal Space", "Choose normal space for baking");
-
- prop= RNA_def_property(srna, "bake_aa_mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_osa");
- RNA_def_property_enum_items(prop, bake_aa_items);
- RNA_def_property_ui_text(prop, "Anti-Aliasing Level", "");
-
- prop= RNA_def_property(srna, "bake_active", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_TO_ACTIVE);
- RNA_def_property_ui_text(prop, "Selected to Active", "Bake shading on the surface of selected objects to the active object");
-
- prop= RNA_def_property(srna, "bake_normalized", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_NORMALIZE);
- RNA_def_property_ui_text(prop, "Normalized", "");
- //"Bake ambient occlusion normalized, without taking into acount material settings"
- //"Normalized displacement value to fit the 'Dist' range"
- // XXX: Need 1 tooltip here...
-
- prop= RNA_def_property(srna, "bake_clear", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_CLEAR);
- RNA_def_property_ui_text(prop, "Clear", "Clear Images before baking");
-
- prop= RNA_def_property(srna, "bake_enable_aa", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_OSA);
- RNA_def_property_ui_text(prop, "Anti-Aliasing", "Enables Anti-aliasing");
-
- prop= RNA_def_property(srna, "bake_margin", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "bake_filter");
- RNA_def_property_range(prop, 0, 32);
- RNA_def_property_ui_text(prop, "Margin", "Amount of pixels to extend the baked result with, as post process filter");
-
- prop= RNA_def_property(srna, "bake_distance", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "bake_maxdist");
- RNA_def_property_range(prop, 0.0, 1000.0);
- RNA_def_property_ui_text(prop, "Distance", "Maximum distance from active object to other object (in blender units");
-
- prop= RNA_def_property(srna, "bake_bias", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "bake_biasdist");
- RNA_def_property_range(prop, 0.0, 1000.0);
- RNA_def_property_ui_text(prop, "Bias", "Bias towards faces further away from the object (in blender units)");
-
/* stamp */
prop= RNA_def_property(srna, "stamp_time", PROP_BOOLEAN, PROP_NONE);
@@ -1900,7 +1823,6 @@ void RNA_def_scene(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- FunctionRNA *func;
/* Struct definition */
srna= RNA_def_struct(brna, "Scene", "ID");
@@ -1932,7 +1854,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Scene_objects_get", 0, 0, 0, 0, 0);
/* Layers */
- prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible when rendering the scene.");
@@ -2060,27 +1982,13 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "gm");
RNA_def_property_struct_type(prop, "SceneGameData");
RNA_def_property_ui_text(prop, "Game Data", "");
-
- /* Statistics */
- func= RNA_def_function(srna, "statistics", "ED_info_stats_string");
- prop= RNA_def_string(func, "statistics", "", 0, "Statistics", "");
- RNA_def_function_return(func, prop);
- /* Grease Pencil */
- prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "gpd");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_struct_type(prop, "GreasePencil");
- RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil datablock");
-
- /* Nestled Data */
rna_def_tool_settings(brna);
rna_def_unit_settings(brna);
rna_def_scene_render_data(brna);
rna_def_scene_game_data(brna);
rna_def_scene_render_layer(brna);
-
- /* Scene API */
+
RNA_api_scene(srna);
}
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index fa21257be29..076fe38ed2f 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -1,5 +1,5 @@
/**
- * $Id$
+ * $Id: rna_object_api.c 21115 2009-06-23 19:17:59Z kazanbas $
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -21,7 +21,7 @@
* All rights reserved.
*
*
- * Contributor(s): Arystanbek Dyussenov, Joshua Leung
+ * Contributor(s): Blender Foundation
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -30,16 +30,13 @@
#include <stdio.h>
#include "RNA_define.h"
-#include "RNA_enum_types.h"
#include "RNA_types.h"
-#include "DNA_anim_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#ifdef RNA_RUNTIME
-#include "BKE_animsys.h"
#include "BKE_scene.h"
#include "BKE_depsgraph.h"
@@ -84,33 +81,6 @@ static void rna_Scene_set_frame(Scene *sce, bContext *C, int frame)
WM_event_add_notifier(C, NC_SCENE|ND_FRAME, sce);
}
-static KeyingSet *rna_Scene_add_keying_set(Scene *sce, ReportList *reports,
- char name[], int absolute, int insertkey_needed, int insertkey_visual)
-{
- KeyingSet *ks= NULL;
- short flag=0, keyingflag=0;
-
- /* validate flags */
- if (absolute)
- flag |= KEYINGSET_ABSOLUTE;
- if (insertkey_needed)
- keyingflag |= INSERTKEY_NEEDED;
- if (insertkey_visual)
- keyingflag |= INSERTKEY_MATRIX;
-
- /* call the API func, and set the active keyingset index */
- ks= BKE_keyingset_add(&sce->keyingsets, name, flag, keyingflag);
-
- if (ks) {
- sce->active_keyingset= BLI_countlist(&sce->keyingsets);
- return ks;
- }
- else {
- BKE_report(reports, RPT_ERROR, "Keying Set could not be added.");
- return NULL;
- }
-}
-
#else
void RNA_api_scene(StructRNA *srna)
@@ -135,21 +105,7 @@ void RNA_api_scene(StructRNA *srna)
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);
-
- /* Add Keying Set */
- func= RNA_def_function(srna, "add_keying_set", "rna_Scene_add_keying_set");
- RNA_def_function_ui_description(func, "Add a new Keying Set to Scene.");
- RNA_def_function_flag(func, FUNC_USE_REPORTS);
- /* returns the new KeyingSet */
- parm= RNA_def_pointer(func, "keyingset", "KeyingSet", "", "Newly created Keying Set.");
- RNA_def_function_return(func, parm);
- /* name */
- RNA_def_string(func, "name", "KeyingSet", 64, "Name", "Name of Keying Set");
- /* flags */
- RNA_def_boolean(func, "absolute", 1, "Absolute", "Keying Set defines specific paths/settings to be keyframed (i.e. is not reliant on context info)");
- /* keying flags */
- RNA_def_boolean(func, "insertkey_needed", 0, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves.");
- RNA_def_boolean(func, "insertkey_visual", 0, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'.");
}
#endif
+
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index ab4b27cea7b..c2c906e38f2 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -33,34 +33,8 @@
#include "BKE_paint.h"
-#include "WM_types.h"
-
-static EnumPropertyItem particle_edit_hair_brush_items[] = {
- {PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush."},
- {PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb hairs."},
- {PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth hairs."},
- {PE_BRUSH_ADD, "ADD", 0, "Add", "Add hairs."},
- {PE_BRUSH_LENGTH, "LENGTH", 0, "Length", "Make hairs longer or shorter."},
- {PE_BRUSH_PUFF, "PUFF", 0, "Puff", "Make hairs stand up."},
- {PE_BRUSH_CUT, "CUT", 0, "Cut", "Cut hairs."},
- {0, NULL, 0, NULL, NULL}};
-
#ifdef RNA_RUNTIME
-#include "BKE_context.h"
-#include "BKE_pointcache.h"
-#include "BKE_particle.h"
-#include "BKE_depsgraph.h"
-
-#include "ED_particle.h"
-
-static EnumPropertyItem particle_edit_cache_brush_items[] = {
- {PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush."},
- {PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb paths."},
- {PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth paths."},
- {PE_BRUSH_LENGTH, "LENGTH", 0, "Length", "Make paths longer or shorter."},
- {0, NULL, 0, NULL, NULL}};
-
static PointerRNA rna_ParticleEdit_brush_get(PointerRNA *ptr)
{
ParticleEditSettings *pset= (ParticleEditSettings*)ptr->data;
@@ -100,62 +74,6 @@ static void rna_Paint_active_brush_set(PointerRNA *ptr, PointerRNA value)
paint_brush_set(ptr->data, value.data);
}
-static void rna_ParticleEdit_redo(bContext *C, PointerRNA *ptr)
-{
- PTCacheEdit *edit = PE_get_current(CTX_data_scene(C), CTX_data_active_object(C));
-
- if(!edit)
- return;
-
- psys_free_path_cache(edit->psys, edit);
-}
-
-static void rna_ParticleEdit_update(bContext *C, PointerRNA *ptr)
-{
- Object *ob = CTX_data_active_object(C);
-
- if(ob) DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
-}
-
-static EnumPropertyItem *rna_ParticleEdit_tool_itemf(bContext *C, PointerRNA *ptr, int *free)
-{
- if(C==NULL) {
- EnumPropertyItem *item= NULL;
- int totitem= 0;
-
- /* needed for doc generation */
- RNA_enum_items_add(&item, &totitem, particle_edit_hair_brush_items);
- RNA_enum_item_end(&item, &totitem);
-
- *free= 1;
-
- return item;
- }
- else {
- Scene *scene= CTX_data_scene(C);
- PTCacheEdit *edit = PE_get_current(scene, CTX_data_active_object(C));
-
- if(edit && edit->psys)
- return particle_edit_hair_brush_items;
-
- return particle_edit_cache_brush_items;
- }
-}
-
-static int rna_ParticleEdit_editable_get(PointerRNA *ptr)
-{
- ParticleEditSettings *pset= (ParticleEditSettings*)ptr->data;
-
- return (pset->object && PE_get_current(pset->scene, pset->object));
-}
-static int rna_ParticleEdit_hair_get(PointerRNA *ptr)
-{
- ParticleEditSettings *pset= (ParticleEditSettings*)ptr->data;
-
- PTCacheEdit *edit = PE_get_current(pset->scene, pset->object);
-
- return (edit && edit->psys);
-}
#else
static void rna_def_paint(BlenderRNA *brna)
@@ -348,6 +266,17 @@ static void rna_def_particle_edit(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ static EnumPropertyItem tool_items[] = {
+ {PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush."},
+ {PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb hairs."},
+ {PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth hairs."},
+ {PE_BRUSH_WEIGHT, "WEIGHT", 0, "Weight", "Assign weight to hairs."},
+ {PE_BRUSH_ADD, "ADD", 0, "Add", "Add hairs."},
+ {PE_BRUSH_LENGTH, "LENGTH", 0, "Length", "Make hairs longer or shorter."},
+ {PE_BRUSH_PUFF, "PUFF", 0, "Puff", "Make hairs stand up."},
+ {PE_BRUSH_CUT, "CUT", 0, "Cut", "Cut hairs."},
+ {0, NULL, 0, NULL, NULL}};
+
static EnumPropertyItem select_mode_items[] = {
{SCE_SELECT_PATH, "PATH", ICON_EDGESEL, "Path", ""}, // XXX icon
{SCE_SELECT_POINT, "POINT", ICON_VERTEXSEL, "Point", ""}, // XXX icon
@@ -364,14 +293,6 @@ static void rna_def_particle_edit(BlenderRNA *brna)
{1, "SHRINK", 0, "Shrink", "Make hairs shorter."},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem edit_type_items[]= {
- {PE_TYPE_PARTICLES, "PARTICLES", 0, "Particles", ""},
- {PE_TYPE_SOFTBODY, "SOFT_BODY", 0, "Soft body", ""},
- {PE_TYPE_CLOTH, "CLOTH", 0, "Cloth", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
-
/* edit */
srna= RNA_def_struct(brna, "ParticleEdit", NULL);
@@ -380,15 +301,13 @@ static void rna_def_particle_edit(BlenderRNA *brna)
prop= RNA_def_property(srna, "tool", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "brushtype");
- RNA_def_property_enum_items(prop, particle_edit_hair_brush_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ParticleEdit_tool_itemf");
+ RNA_def_property_enum_items(prop, tool_items);
RNA_def_property_ui_text(prop, "Tool", "");
prop= RNA_def_property(srna, "selection_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "selectmode");
RNA_def_property_enum_items(prop, select_mode_items);
RNA_def_property_ui_text(prop, "Selection Mode", "Particle select and display mode.");
- RNA_def_property_update(prop, NC_OBJECT, "rna_ParticleEdit_update");
prop= RNA_def_property(srna, "keep_lengths", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_KEEP_LENGTHS);
@@ -407,19 +326,13 @@ static void rna_def_particle_edit(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 10, 3);
RNA_def_property_ui_text(prop, "Emitter Distance", "Distance to keep particles away from the emitter.");
- prop= RNA_def_property(srna, "fade_time", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_FADE_TIME);
- RNA_def_property_ui_text(prop, "Fade Time", "Fade paths and keys further away from current frame.");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_update");
+ prop= RNA_def_property(srna, "show_time", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_SHOW_TIME);
+ RNA_def_property_ui_text(prop, "Show Time", "Show time values of the baked keys.");
- prop= RNA_def_property(srna, "auto_velocity", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_AUTO_VELOCITY);
- RNA_def_property_ui_text(prop, "Auto Velocity", "Calculate point velocities automatically.");
-
- prop= RNA_def_property(srna, "draw_particles", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_DRAW_PART);
- RNA_def_property_ui_text(prop, "Draw Particles", "Draw actual particles.");
- RNA_def_property_update(prop, NC_OBJECT, NULL);
+ prop= RNA_def_property(srna, "show_children", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_SHOW_CHILD);
+ RNA_def_property_ui_text(prop, "Show Children", "Show child particles.");
prop= RNA_def_property(srna, "mirror_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_X_MIRROR);
@@ -440,37 +353,6 @@ static void rna_def_particle_edit(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, "rna_ParticleEdit_brush_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Brush", "");
- prop= RNA_def_property(srna, "draw_step", PROP_INT, PROP_NONE);
- RNA_def_property_range(prop, 2, 10);
- RNA_def_property_ui_text(prop, "Steps", "How many steps to draw the path with.");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_redo");
-
- prop= RNA_def_property(srna, "fade_frames", PROP_INT, PROP_NONE);
- RNA_def_property_range(prop, 2, 100);
- RNA_def_property_ui_text(prop, "Frames", "How many frames to fade.");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_update");
-
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "edittype");
- RNA_def_property_enum_items(prop, edit_type_items);
- RNA_def_property_ui_text(prop, "Type", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_redo");
-
- prop= RNA_def_property(srna, "editable", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_ParticleEdit_editable_get", NULL);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Editable", "A valid edit mode exists");
-
- prop= RNA_def_property(srna, "hair", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_ParticleEdit_hair_get", NULL);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Hair", "Editing hair");
-
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Object", "The edited object");
-
-
/* brush */
srna= RNA_def_struct(brna, "ParticleBrush", NULL);
diff --git a/source/blender/makesrna/intern/rna_sequence.c b/source/blender/makesrna/intern/rna_sequence.c
index 9f016f73694..470909f4eff 100644
--- a/source/blender/makesrna/intern/rna_sequence.c
+++ b/source/blender/makesrna/intern/rna_sequence.c
@@ -221,16 +221,6 @@ static StructRNA* rna_Sequence_refine(struct PointerRNA *ptr)
}
}
-static char *rna_Sequence_path(PointerRNA *ptr)
-{
- Sequence *seq= (Sequence*)ptr->data;
-
- /* sequencer data comes from scene...
- * TODO: would be nice to make SequenceEditor data a datablock of its own (for shorter paths)
- */
- return BLI_sprintfN("sequence_editor.sequences[\"%s\"]", seq->name+2);
-}
-
static PointerRNA rna_SequenceEdtior_meta_stack_get(CollectionPropertyIterator *iter)
{
ListBaseIterator *internal= iter->internal;
@@ -370,7 +360,7 @@ static void rna_def_sequence(BlenderRNA *brna)
{SEQ_META, "META", 0, "Meta", ""},
{SEQ_SCENE, "SCENE", 0, "Scene", ""},
{SEQ_MOVIE, "MOVIE", 0, "Movie", ""},
- {SEQ_SOUND, "SOUND", 0, "Sound", ""},
+ {SEQ_SOUND, "_SOUND", 0, "Sound", ""},
{SEQ_EFFECT, "REPLACE", 0, "Replace", ""},
{SEQ_CROSS, "CROSS", 0, "Cross", ""},
{SEQ_ADD, "ADD", 0, "Add", ""},
@@ -403,7 +393,6 @@ static void rna_def_sequence(BlenderRNA *brna)
srna = RNA_def_struct(brna, "Sequence", NULL);
RNA_def_struct_ui_text(srna, "Sequence", "Sequence strip in the sequence editor.");
RNA_def_struct_refine_func(srna, "rna_Sequence_refine");
- RNA_def_struct_path_func(srna, "rna_Sequence_path");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_Sequence_name_get", "rna_Sequence_name_length", "rna_Sequence_name_set");
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 943129c7169..6f1babb495a 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -51,7 +51,7 @@
static void rna_Smoke_update(bContext *C, PointerRNA *ptr)
{
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
+ DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA);
}
static void rna_Smoke_dependency_update(bContext *C, PointerRNA *ptr)
@@ -78,6 +78,13 @@ static void rna_Smoke_reset_dependancy(bContext *C, PointerRNA *ptr)
rna_Smoke_dependency_update(C, ptr);
}
+static void rna_Smoke_redraw(bContext *C, PointerRNA *ptr)
+{
+ SmokeDomainSettings *settings = (SmokeDomainSettings*)ptr->data;
+
+ settings->flags |= MOD_SMOKE_VIEW_REDRAWNICE;
+}
+
static char *rna_SmokeDomainSettings_path(PointerRNA *ptr)
{
SmokeDomainSettings *settings = (SmokeDomainSettings*)ptr->data;
@@ -129,6 +136,13 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Max Res", "Maximal resolution used in the fluid domain.");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
+ prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "omega");
+ RNA_def_property_range(prop, 0.02, 1.0);
+ RNA_def_property_ui_range(prop, 0.02, 1.0, 0.02, 2);
+ RNA_def_property_ui_text(prop, "Color", "Smoke color (0 = black, 1 = white).");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Smoke_redraw");
+
prop= RNA_def_property(srna, "amplify", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "amplify");
RNA_def_property_range(prop, 1, 10);
@@ -142,9 +156,9 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
prop= RNA_def_property(srna, "viewhighres", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "viewsettings", MOD_SMOKE_VIEW_SHOWBIG);
+ RNA_def_property_boolean_sdna(prop, NULL, "viewsettings", MOD_SMOKE_VIEW_USEBIG);
RNA_def_property_ui_text(prop, "Show High Resolution", "Show high resolution (using amplification).");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_redraw");
prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noise");
@@ -152,6 +166,13 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Noise Method", "Noise method which is used for creating the high resolution");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
+ prop= RNA_def_property(srna, "visibility", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "visibility");
+ RNA_def_property_range(prop, 1, 15);
+ RNA_def_property_ui_range(prop, 1, 15, 1, 0);
+ RNA_def_property_ui_text(prop, "Display", "How much of the resolution should be shown during preview (every 2nd, 3rd, etc).");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Smoke_redraw");
+
prop= RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alpha");
RNA_def_property_range(prop, -5.0, 5.0);
@@ -199,25 +220,17 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 1.0, 100.0);
RNA_def_property_ui_range(prop, 1.0, 1000.0, 1, 0);
RNA_def_property_ui_text(prop, "Dissolve Speed", "Dissolve Speed");
- RNA_def_property_update(prop, 0, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
prop= RNA_def_property(srna, "dissolve_smoke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_DISSOLVE);
RNA_def_property_ui_text(prop, "Dissolve Smoke", "Enable smoke to disappear over time.");
- RNA_def_property_update(prop, 0, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
prop= RNA_def_property(srna, "dissolve_smoke_log", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_DISSOLVE_LOG);
RNA_def_property_ui_text(prop, "Logarithmic dissolve", "Using 1/x ");
- RNA_def_property_update(prop, 0, NULL);
-
- prop= RNA_def_property(srna, "point_cache_low", PROP_POINTER, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "point_cache[0]");
- RNA_def_property_ui_text(prop, "Point Cache", "");
-
- prop= RNA_def_property(srna, "point_cache_high", PROP_POINTER, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "point_cache[1]");
- RNA_def_property_ui_text(prop, "Point Cache", "");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
}
static void rna_def_smoke_flow_settings(BlenderRNA *brna)
@@ -235,26 +248,26 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.001, 1);
RNA_def_property_ui_range(prop, 0.001, 1.0, 1.0, 4);
RNA_def_property_ui_text(prop, "Density", "");
- RNA_def_property_update(prop, 0, NULL); // NC_OBJECT|ND_MODIFIER
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
prop= RNA_def_property(srna, "temperature", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "temp");
RNA_def_property_range(prop, -10, 10);
RNA_def_property_ui_range(prop, -10, 10, 1, 1);
RNA_def_property_ui_text(prop, "Temp. Diff.", "Temperature difference to ambientt temperature.");
- RNA_def_property_update(prop, 0, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
prop= RNA_def_property(srna, "psys", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "psys");
RNA_def_property_struct_type(prop, "ParticleSystem");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Particle Systems", "Particle systems emitted from the object.");
- RNA_def_property_update(prop, 0, "rna_Smoke_reset_dependancy");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy");
prop= RNA_def_property(srna, "outflow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "type", MOD_SMOKE_FLOW_TYPE_OUTFLOW);
RNA_def_property_ui_text(prop, "Outflow", "Deletes smoke from simulation");
- RNA_def_property_update(prop, 0, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
}
static void rna_def_smoke_coll_settings(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c
index 38e4d850c68..a029ef85544 100644
--- a/source/blender/makesrna/intern/rna_sound.c
+++ b/source/blender/makesrna/intern/rna_sound.c
@@ -34,29 +34,6 @@
#ifdef RNA_RUNTIME
-#include "BKE_sound.h"
-#include "BKE_context.h"
-
-static void rna_Sound_filename_update(bContext *C, PointerRNA *ptr)
-{
- sound_load(CTX_data_main(C), (bSound*)ptr->data);
-}
-
-static int rna_Sound_caching_get(PointerRNA *ptr)
-{
- bSound *sound = (bSound*)(ptr->data);
- return sound->cache != NULL;
-}
-
-static void rna_Sound_caching_set(PointerRNA *ptr, const int value)
-{
- bSound *sound = (bSound*)(ptr->data);
- if(value)
- sound_cache(sound, 0);
- else
- sound_delete_cache(sound);
-}
-
#else
static void rna_def_sound(BlenderRNA *brna)
@@ -74,16 +51,10 @@ static void rna_def_sound(BlenderRNA *brna)
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Filename", "Sound sample file used by this Sound datablock.");
- RNA_def_property_update(prop, 0, "rna_Sound_filename_update");
prop= RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "packedfile");
RNA_def_property_ui_text(prop, "Packed File", "");
-
- prop= RNA_def_property(srna, "caching", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_Sound_caching_get", "rna_Sound_caching_set");
- RNA_def_property_ui_text(prop, "Caching", "The sound file is decoded and loaded into RAM.");
- RNA_def_property_update(prop, 0, "rna_Sound_filename_update");
}
void RNA_def_sound(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 542f6e2aeda..be0707390c4 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -151,7 +151,7 @@ static void rna_SpaceImageEditor_paint_update(bContext *C, PointerRNA *ptr)
Scene *scene= CTX_data_scene(C);
if(scene)
- paint_init(&scene->toolsettings->imapaint.paint, PAINT_CURSOR_TEXTURE_PAINT);
+ paint_init(&scene->toolsettings->imapaint.paint, "Brush");
}
static int rna_SpaceImageEditor_show_render_get(PointerRNA *ptr)
@@ -375,68 +375,65 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "sticky");
RNA_def_property_enum_items(prop, sticky_mode_items);
RNA_def_property_ui_text(prop, "Sticky Selection Mode", "Automatically select also UVs sharing the same vertex as the ones being selected.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
/* drawing */
prop= RNA_def_property(srna, "edge_draw_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dt_uv");
RNA_def_property_enum_items(prop, dt_uv_items);
RNA_def_property_ui_text(prop, "Edge Draw Type", "Draw type for drawing UV edges.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "draw_smooth_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_SMOOTH_UV);
RNA_def_property_ui_text(prop, "Draw Smooth Edges", "Draw UV edges anti-aliased.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "draw_stretch", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_STRETCH);
RNA_def_property_ui_text(prop, "Draw Stretch", "Draw faces colored according to the difference in shape between UVs and their 3D coordinates (blue for low distortion, red for high distortion).");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "draw_stretch_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dt_uvstretch");
RNA_def_property_enum_items(prop, dt_uvstretch_items);
RNA_def_property_ui_text(prop, "Draw Stretch Type", "Type of stretch to draw.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "draw_modified_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAWSHADOW);
RNA_def_property_ui_text(prop, "Draw Modified Edges", "Draw edges after modifiers are applied.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "draw_other_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_OTHER);
RNA_def_property_ui_text(prop, "Draw Other Objects", "Draw other selected objects that share the same image.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "normalized_coordinates", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_COORDFLOATS);
RNA_def_property_ui_text(prop, "Normalized Coordinates", "Display UV coordinates from 0.0 to 1.0 rather than in pixels.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
/* todo: move edge and face drawing options here from G.f */
prop= RNA_def_property(srna, "snap_to_pixels", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_PIXELSNAP);
RNA_def_property_ui_text(prop, "Snap to Pixels", "Snap UVs to pixel locations while editing.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "constrain_to_image_bounds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_CLIP_UV);
RNA_def_property_ui_text(prop, "Constrain to Image Bounds", "Constraint to stay within the image bounds while editing.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "live_unwrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_LIVE_UNWRAP);
RNA_def_property_ui_text(prop, "Live Unwrap", "Continuously unwrap the selected UV island while transforming pinned vertices.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "pivot", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "around");
RNA_def_property_enum_items(prop, pivot_items);
RNA_def_property_ui_text(prop, "Pivot", "Rotation/Scaling Pivot.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
}
static void rna_def_space_outliner(BlenderRNA *brna)
@@ -467,12 +464,12 @@ static void rna_def_space_outliner(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "outlinevis");
RNA_def_property_enum_items(prop, display_mode_items);
RNA_def_property_ui_text(prop, "Display Mode", "Type of information to display");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "show_restriction_columns", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SO_HIDE_RESTRICTCOLS);
RNA_def_property_ui_text(prop, "Show Restriction Columns", "Show colum");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
@@ -489,34 +486,35 @@ static void rna_def_background_image(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ima");
RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, NULL);
prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
- prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "x_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_ui_text(prop, "X Offset", "Offsets image horizontally from the view center");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
- prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "y_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_ui_text(prop, "Y Offset", "Offsets image vertically from the view center");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Size", "Scaling factor for the background image.");
RNA_def_property_range(prop, 0.0, FLT_MAX);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "transparency", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "blend");
RNA_def_property_ui_text(prop, "Transparency", "Amount to blend the image against the background color.");
RNA_def_property_range(prop, 0.0, 1.0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
+
}
static void rna_def_space_3dview(BlenderRNA *brna)
@@ -555,12 +553,10 @@ static void rna_def_space_3dview(BlenderRNA *brna)
prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "camera");
RNA_def_property_ui_text(prop, "Camera", "Active camera used in this view (when unlocked from the scene's active camera).");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "lock_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ob_centre");
RNA_def_property_ui_text(prop, "Lock Object", "3D View center is locked to this object's position");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "background_image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bgpic");
@@ -570,142 +566,136 @@ static void rna_def_space_3dview(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "drawtype");
RNA_def_property_enum_items(prop, viewport_shading_items);
RNA_def_property_ui_text(prop, "Viewport Shading", "Method to display/shade objects in the 3D View.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "localview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "localview", 0);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Local View", "Display an isolated sub-set of objects, apart from the scene visibility.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "lens", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lens");
RNA_def_property_ui_text(prop, "Lens", "Lens angle (mm) in perspective view.");
RNA_def_property_range(prop, 1.0f, 250.0f);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "near");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Clip Start", "3D View near clipping distance.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "far");
RNA_def_property_range(prop, 1.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Clip End", "3D View far clipping distance.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "grid_spacing", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "grid");
RNA_def_property_ui_text(prop, "Grid Spacing", "The distance between 3D View grid lines.");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "grid_lines", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gridlines");
RNA_def_property_ui_text(prop, "Grid Lines", "The number of grid lines to display in perspective view.");
RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "grid_subdivisions", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gridsubdiv");
RNA_def_property_ui_text(prop, "Grid Subdivisions", "The number of subdivisions between grid lines.");
RNA_def_property_range(prop, 1, 1024);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "display_floor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_FLOOR);
RNA_def_property_ui_text(prop, "Display Grid Floor", "Show the ground plane grid in perspective view.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "display_x_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_X);
RNA_def_property_ui_text(prop, "Display X Axis", "Show the X axis line in perspective view.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "display_y_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Y);
RNA_def_property_ui_text(prop, "Display Y Axis", "Show the Y axis line in perspective view.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "display_z_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Z);
RNA_def_property_ui_text(prop, "Display Z Axis", "Show the Z axis line in perspective view.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "outline_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_SELECT_OUTLINE);
RNA_def_property_ui_text(prop, "Outline Selected", "Show an outline highlight around selected objects in non-wireframe views.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "all_object_centers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DRAW_CENTERS);
RNA_def_property_ui_text(prop, "All Object Centers", "Show the object center dot for all (selected and unselected) objects.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "relationship_lines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", V3D_HIDE_HELPLINES);
RNA_def_property_ui_text(prop, "Relationship Lines", "Show dashed lines indicating parent or constraint relationships.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "textured_solid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SOLID_TEX);
RNA_def_property_ui_text(prop, "Textured Solid", "Display face-assigned textures in solid view");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "display_background_image", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, NULL, "rna_View3D_display_background_image_set");
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DISPBGPIC);
RNA_def_property_ui_text(prop, "Display Background Image", "Display a reference image behind objects in the 3D View");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "around");
RNA_def_property_enum_items(prop, pivot_items);
RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "manipulator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twflag", V3D_USE_MANIPULATOR);
RNA_def_property_ui_text(prop, "Manipulator", "Use a 3D manipulator widget for controlling transforms.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL);
prop= RNA_def_property(srna, "manipulator_translate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_TRANSLATE);
RNA_def_property_ui_text(prop, "Manipulator Translate", "Use the manipulator for movement transformations.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL);
prop= RNA_def_property(srna, "manipulator_rotate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_ROTATE);
RNA_def_property_ui_text(prop, "Manipulator Rotate", "Use the manipulator for rotation transformations.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL);
prop= RNA_def_property(srna, "manipulator_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_SCALE);
RNA_def_property_ui_text(prop, "Manipulator Scale", "Use the manipulator for scale transformations.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL);
prop= RNA_def_property(srna, "transform_orientation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "twmode");
RNA_def_property_enum_items(prop, transform_orientation_items);
RNA_def_property_ui_text(prop, "Transform Orientation", "The alignment of manipulator handles.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL);
prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, "RegionView3D", "viewlock", RV3D_LOCKED);
RNA_def_property_ui_text(prop, "Lock", "Lock View Rotation");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "box_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, "RegionView3D", "viewlock", RV3D_BOXVIEW);
RNA_def_property_ui_text(prop, "Box", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "box_clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, "RegionView3D", "viewlock", RV3D_BOXCLIP);
RNA_def_property_ui_text(prop, "Clip", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
}
static void rna_def_space_buttons(BlenderRNA *brna)
@@ -740,19 +730,19 @@ static void rna_def_space_buttons(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "mainb");
RNA_def_property_enum_items(prop, buttons_context_items);
RNA_def_property_ui_text(prop, "Context", "Type of active data to display and edit.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "align");
RNA_def_property_enum_items(prop, align_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceProperties_align_set", NULL);
RNA_def_property_ui_text(prop, "Align", "Arrangement of the panels.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "brush_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SB_BRUSH_TEX);
RNA_def_property_ui_text(prop, "Brush Texture", "Show brush textures.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
/* pinned data */
prop= RNA_def_property(srna, "pin_id", PROP_POINTER, PROP_NONE);
@@ -760,7 +750,6 @@ static void rna_def_space_buttons(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ID");
RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_SpaceProperties_pin_id_typef");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
}
static void rna_def_space_image(BlenderRNA *brna)
@@ -777,35 +766,35 @@ static void rna_def_space_image(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceImageEditor_image_set", NULL);
RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "curves", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "cumap");
RNA_def_property_ui_text(prop, "Curves", "Color curve mapping to use for displaying the image.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "image_pin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pin", 0);
RNA_def_property_ui_text(prop, "Image Pin", "Display current image regardless of object selection.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
/* image draw */
prop= RNA_def_property(srna, "draw_repeated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_TILE);
RNA_def_property_ui_text(prop, "Draw Repeated", "Draw the image repeated outside of the main view.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "draw_channels", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, dc_all_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceImageEditor_draw_channels_itemf");
RNA_def_property_ui_text(prop, "Draw Channels", "Channels of the image to draw.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
/* uv */
prop= RNA_def_property(srna, "uv_editor", PROP_POINTER, PROP_NEVER_NULL);
@@ -818,7 +807,7 @@ static void rna_def_space_image(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAWTOOL);
RNA_def_property_ui_text(prop, "Image Painting", "Enable image painting mode.");
RNA_def_property_ui_icon(prop, ICON_TPAINT_HLT, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_paint_update");
+ RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_SpaceImageEditor_paint_update");
/* grease pencil */
prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
@@ -877,69 +866,64 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "mainb");
RNA_def_property_enum_items(prop, display_mode_items);
RNA_def_property_ui_text(prop, "Display Mode", "The view mode to use for displaying sequencer output.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+ RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
/* flag's */
prop= RNA_def_property(srna, "draw_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAWFRAMES);
RNA_def_property_ui_text(prop, "Draw Frames", "Draw frames rather then seconds.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+ RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
prop= RNA_def_property(srna, "transform_markers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MARKER_TRANS);
RNA_def_property_ui_text(prop, "Transform Markers", "Transform markers as well as strips.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "seperate_color_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_COLOR_SEPERATED);
RNA_def_property_ui_text(prop, "Seperate Colors", "Seperate color channels in preview.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+ RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
prop= RNA_def_property(srna, "draw_safe_margin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_SAFE_MARGINS);
RNA_def_property_ui_text(prop, "Safe Margin", "Draw title safe margins in preview.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+ RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
prop= RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_GPENCIL);
RNA_def_property_ui_text(prop, "Use Grease Pencil", "Display and edit the grease pencil freehand annotations overlay.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+ RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
/* grease pencil */
prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "gpd");
RNA_def_property_struct_type(prop, "UnknownType");
RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
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, 0, 32); // MAXSEQ --- todo, move from BKE_sequence.h
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+ RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
prop= RNA_def_property(srna, "draw_overexposed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "zebra");
RNA_def_property_ui_text(prop, "Show Overexposed", "Show overexposed areas with zebra stripes.");
RNA_def_property_range(prop, 0, 110);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+ RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
/* not sure we need rna access to these but adding anyway */
- prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "x_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_ui_text(prop, "X Offset", "Offsets image horizontally from the view center");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "y_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_ui_text(prop, "Y Offset", "Offsets image horizontally from the view center");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zoom");
RNA_def_property_ui_text(prop, "Zoom", "Display zoom level");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
}
static void rna_def_space_text(BlenderRNA *brna)
@@ -956,68 +940,63 @@ static void rna_def_space_text(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Text", "Text displayed and edited in this space.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceTextEditor_text_set", NULL);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
+ RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
/* display */
prop= RNA_def_property(srna, "syntax_highlight", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "showsyntax", 0);
RNA_def_property_ui_text(prop, "Syntax Highlight", "Syntax highlight for scripting.");
RNA_def_property_ui_icon(prop, ICON_SYNTAX_OFF, 1);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
+ RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "word_wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "wordwrap", 0);
RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceTextEditor_word_wrap_set");
RNA_def_property_ui_text(prop, "Word Wrap", "Wrap words if there is not enough horizontal space.");
RNA_def_property_ui_icon(prop, ICON_WORDWRAP_OFF, 1);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
+ RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "line_numbers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "showlinenrs", 0);
RNA_def_property_ui_text(prop, "Line Numbers", "Show line numbers next to the text.");
RNA_def_property_ui_icon(prop, ICON_LINENUMBERS_OFF, 1);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
+ RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "overwrite", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Overwrite", "Overwrite characters when typing rather than inserting them.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
+ RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "live_edit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Live Edit", "Run python while editing.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "tab_width", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tabnumber");
RNA_def_property_range(prop, 2, 8);
RNA_def_property_ui_text(prop, "Tab Width", "Number of spaces to display tabs with.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
+ RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
prop= RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "lheight");
RNA_def_property_range(prop, 8, 32);
RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
+ RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
/* find */
prop= RNA_def_property(srna, "find_all", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_FIND_ALL);
RNA_def_property_ui_text(prop, "Find All", "Search in all text datablocks, instead of only the active one.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "find_wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_FIND_WRAP);
RNA_def_property_ui_text(prop, "Find Wrap", "Search again from the start of the file when reaching the end.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "find_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "findstr");
RNA_def_property_ui_text(prop, "Find Text", "Text to search for with the find tool.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "replace_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "replacestr");
RNA_def_property_ui_text(prop, "Replace Text", "Text to replace selected text with using the replace tool.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
}
static void rna_def_space_dopesheet(BlenderRNA *brna)
@@ -1042,30 +1021,25 @@ static void rna_def_space_dopesheet(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_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
/* display */
prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_DRAWTIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NODRAWCFRANUM);
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
prop= RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_SLIDERS);
RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
/* editing */
prop= RNA_def_property(srna, "automerge_keyframes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOTRANSKEYCULL);
RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Show handles of Bezier control points.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
// TODO... autosnap, dopesheet?
}
@@ -1090,40 +1064,29 @@ 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_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
/* display */
prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_DRAWTIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWCFRANUM);
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
-
- prop= RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SLIDERS);
- RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
prop= RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_NOHANDLES);
RNA_def_property_ui_text(prop, "Show Handles", "Show handles of Bezier control points.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
prop= RNA_def_property(srna, "only_selected_curves_handles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SELCUVERTSONLY);
RNA_def_property_ui_text(prop, "Only Selected Curve Keyframes", "Only keyframes of selected F-Curves are visible and editable.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
/* editing */
prop= RNA_def_property(srna, "automerge_keyframes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOTRANSKEYCULL);
RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Show handles of Bezier control points.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
// TODO... autosnap, dopesheet?
}
@@ -1142,17 +1105,14 @@ static void rna_def_space_nla(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", SNLA_DRAWTIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NODRAWCFRANUM);
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
prop= RNA_def_property(srna, "show_strip_curves", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NOSTRIPCURVES);
RNA_def_property_ui_text(prop, "Show Control Curves", "Show influence curves on strips.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
/* editing */
// TODO... autosnap, dopesheet?
@@ -1172,44 +1132,43 @@ static void rna_def_space_time(BlenderRNA *brna)
prop= RNA_def_property(srna, "play_top_left", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_REGION);
RNA_def_property_ui_text(prop, "Top-Left 3D Window", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
prop= RNA_def_property(srna, "play_all_3d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_3D_WIN);
RNA_def_property_ui_text(prop, "All 3D Windows", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
prop= RNA_def_property(srna, "play_anim", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_ANIM_WIN);
RNA_def_property_ui_text(prop, "Animation Windows", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
prop= RNA_def_property(srna, "play_buttons", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_BUTS_WIN);
RNA_def_property_ui_text(prop, "Properties Windows", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
prop= RNA_def_property(srna, "play_image", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_IMAGE_WIN);
RNA_def_property_ui_text(prop, "Image Windows", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
prop= RNA_def_property(srna, "play_sequencer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_SEQ);
RNA_def_property_ui_text(prop, "Sequencer Windows", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
/* Other options */
prop= RNA_def_property(srna, "continue_physics", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_CONTINUE_PHYSICS);
RNA_def_property_ui_text(prop, "Continue Physics", "During playblack, continue physics simulations regardless of the frame number");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
prop= RNA_def_property(srna, "only_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_ONLYACTSEL);
RNA_def_property_ui_text(prop, "Only Selected channels", "Show keyframes only from active/selected channels.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_console_line(BlenderRNA *brna)
@@ -1219,17 +1178,15 @@ static void rna_def_console_line(BlenderRNA *brna)
srna = RNA_def_struct(brna, "ConsoleLine", NULL);
RNA_def_struct_ui_text(srna, "Console Input", "Input line for the interactive console.");
- // XXX using non-inited "prop", uh? RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
prop= RNA_def_property(srna, "line", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ConsoleLine_line_get", "rna_ConsoleLine_line_length", "rna_ConsoleLine_line_set");
RNA_def_property_ui_text(prop, "Line", "Text in the line.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
prop= RNA_def_property(srna, "current_character", PROP_INT, PROP_NONE); /* copied from text editor */
RNA_def_property_int_sdna(prop, NULL, "cursor");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_ConsoleLine_cursor_index_range");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
+
}
static EnumPropertyItem console_type_items[] = {
@@ -1251,39 +1208,39 @@ static void rna_def_space_console(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "lheight");
RNA_def_property_range(prop, 8, 32);
RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
+ RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE, NULL);
prop= RNA_def_property(srna, "console_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, console_type_items);
RNA_def_property_ui_text(prop, "Type", "Console type.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
+ RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE, NULL);
/* reporting display */
prop= RNA_def_property(srna, "show_report_debug", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_DEBUG);
RNA_def_property_ui_text(prop, "Show Debug", "Display debug reporting info.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+ RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE_REPORT, NULL);
prop= RNA_def_property(srna, "show_report_info", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_INFO);
RNA_def_property_ui_text(prop, "Show Info", "Display general information.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+ RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE_REPORT, NULL);
prop= RNA_def_property(srna, "show_report_operator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_OP);
RNA_def_property_ui_text(prop, "Show Operator", "Display the operator log.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+ RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE_REPORT, NULL);
prop= RNA_def_property(srna, "show_report_warn", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_WARN);
RNA_def_property_ui_text(prop, "Show Warn", "Display warnings.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+ RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE_REPORT, NULL);
prop= RNA_def_property(srna, "show_report_error", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_ERR);
RNA_def_property_ui_text(prop, "Show Error", "Display error text.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+ RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE_REPORT, NULL);
@@ -1331,82 +1288,82 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "dir");
RNA_def_property_ui_text(prop, "Directory", "Directory displayed in the file browser.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_PARAMS, NULL);
prop= RNA_def_property(srna, "file", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "file");
RNA_def_property_ui_text(prop, "File Name", "Active file in the file browser.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_PARAMS, NULL);
prop= RNA_def_property(srna, "display", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "display");
RNA_def_property_enum_items(prop, file_display_items);
RNA_def_property_ui_text(prop, "Display Mode", "Display mode for the file list");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_PARAMS, NULL);
prop= RNA_def_property(srna, "do_filter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FILE_FILTER);
RNA_def_property_ui_text(prop, "Filter Files", "Enable filtering of files.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
prop= RNA_def_property(srna, "hide_dot", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FILE_HIDE_DOT);
RNA_def_property_ui_text(prop, "Hide Dot Files", "Hide hidden dot files.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST , NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST , NULL);
prop= RNA_def_property(srna, "sort", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "sort");
RNA_def_property_enum_items(prop, file_sort_items);
RNA_def_property_ui_text(prop, "Sort", "");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_PARAMS, NULL);
prop= RNA_def_property(srna, "filter_image", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", IMAGEFILE);
RNA_def_property_ui_text(prop, "Filter Images", "Show image files.");
RNA_def_property_ui_icon(prop, ICON_FILE_IMAGE, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
prop= RNA_def_property(srna, "filter_blender", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", BLENDERFILE);
RNA_def_property_ui_text(prop, "Filter Blender", "Show .blend files.");
RNA_def_property_ui_icon(prop, ICON_FILE_BLEND, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
prop= RNA_def_property(srna, "filter_movie", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", MOVIEFILE);
RNA_def_property_ui_text(prop, "Filter Movies", "Show movie files.");
RNA_def_property_ui_icon(prop, ICON_FILE_MOVIE, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
prop= RNA_def_property(srna, "filter_script", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", PYSCRIPTFILE);
RNA_def_property_ui_text(prop, "Filter Script", "Show script files.");
RNA_def_property_ui_icon(prop, ICON_FILE_SCRIPT, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
prop= RNA_def_property(srna, "filter_font", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", FTFONTFILE);
RNA_def_property_ui_text(prop, "Filter Fonts", "Show font files.");
RNA_def_property_ui_icon(prop, ICON_FILE_FONT, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
prop= RNA_def_property(srna, "filter_sound", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", SOUNDFILE);
RNA_def_property_ui_text(prop, "Filter Sound", "Show sound files.");
RNA_def_property_ui_icon(prop, ICON_FILE_SOUND, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
prop= RNA_def_property(srna, "filter_text", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", TEXTFILE);
RNA_def_property_ui_text(prop, "Filter Text", "Show text files.");
RNA_def_property_ui_icon(prop, ICON_FILE_BLANK, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
prop= RNA_def_property(srna, "filter_folder", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", FOLDERFILE);
RNA_def_property_ui_text(prop, "Filter Folder", "Show folders.");
RNA_def_property_ui_icon(prop, ICON_FILE_FOLDER, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+ RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
}
@@ -1452,7 +1409,7 @@ static void rna_def_space_node(BlenderRNA *brna)
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."},
+ {NTREE_COMPOSIT, "COMPOSITING", ICON_RENDER_RESULT, "Compositing", "Compositing nodes."},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem texture_type_items[] = {
@@ -1469,13 +1426,13 @@ static void rna_def_space_node(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "treetype");
RNA_def_property_enum_items(prop, tree_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);
+ RNA_def_property_update(prop, NC_NODE, NULL);
prop= RNA_def_property(srna, "texture_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texfrom");
RNA_def_property_enum_items(prop, texture_type_items);
RNA_def_property_ui_text(prop, "Texture Type", "Type of data to take texture from.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
+ RNA_def_property_update(prop, NC_NODE, NULL);
prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -1493,7 +1450,7 @@ static void rna_def_space_node(BlenderRNA *brna)
prop= RNA_def_property(srna, "backdrop", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_BACKDRAW);
RNA_def_property_ui_text(prop, "Backdrop", "Use active Viewer Node output as backdrop for compositing nodes.");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
+ RNA_def_property_update(prop, NC_NODE, NULL);
}
static void rna_def_space_logic(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_test.c b/source/blender/makesrna/intern/rna_test.c
deleted file mode 100644
index 48f2fef4765..00000000000
--- a/source/blender/makesrna/intern/rna_test.c
+++ /dev/null
@@ -1,189 +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * Contributor(s): Arystanbek Dyussenov
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/* Defines a structure with properties used for array manipulation tests in BPY. */
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "RNA_define.h"
-#include "RNA_types.h"
-
-#include "rna_internal.h"
-
-#define ARRAY_SIZE 3
-#define DYNAMIC_ARRAY_SIZE 64
-#define MULTI_ARRAY_DIM [3][4][5]
-#define MULTI_ARRAY_TOTDIM 3
-#define MULTI_ARRAY_LENGTH 3, 4, 5
-#define MULTI_ARRAY_SIZE(type) (sizeof(type MULTI_ARRAY_DIM) / sizeof(type))
-#define DYNAMIC_MULTI_ARRAY_DIM [3][4][5]
-#define DYNAMIC_MULTI_ARRAY_SIZE(type) (sizeof(type DYNAMIC_MULTI_ARRAY_DIM) / sizeof(type))
-
-#ifdef RNA_RUNTIME
-
-#ifdef UNIT_TEST
-
-#define DEF_VARS(type, prefix) \
- static type prefix ## arr[ARRAY_SIZE]; \
- static type prefix ## darr[DYNAMIC_ARRAY_SIZE]; \
- static int prefix ## darr_len= ARRAY_SIZE; \
- static type prefix ## marr MULTI_ARRAY_DIM; \
- static type prefix ## dmarr DYNAMIC_MULTI_ARRAY_DIM; \
- static int prefix ## dmarr_len= sizeof(prefix ## dmarr);
-
-#define DEF_GET_SET(type, arr) \
- void rna_Test_ ## arr ## _get(PointerRNA *ptr, type *values) \
- { \
- memcpy(values, arr, sizeof(arr)); \
- } \
- \
- void rna_Test_ ## arr ## _set(PointerRNA *ptr, const type *values) \
- { \
- memcpy(arr, values, sizeof(arr)); \
- }
-
-#define DEF_GET_SET_LEN(arr, max) \
- static int rna_Test_ ## arr ## _get_length(PointerRNA *ptr) \
- { \
- return arr ## _len; \
- }/* \
- \
- static int rna_Test_ ## arr ## _set_length(PointerRNA *ptr, int length) \
- { \
- if (length > max) \
- return 0; \
- \
- arr ## _len= length; \
- \
- return 1; \
- } \
- */
-
-DEF_VARS(float, f)
-DEF_VARS(int, i)
-DEF_VARS(int, b)
-
-DEF_GET_SET(float, farr)
-DEF_GET_SET(int, iarr)
-DEF_GET_SET(int, barr)
-
-DEF_GET_SET(float, fmarr)
-DEF_GET_SET(int, imarr)
-DEF_GET_SET(int, bmarr)
-
-DEF_GET_SET(float, fdarr)
-DEF_GET_SET_LEN(fdarr, DYNAMIC_ARRAY_SIZE)
-DEF_GET_SET(int, idarr)
-DEF_GET_SET_LEN(idarr, DYNAMIC_ARRAY_SIZE)
-DEF_GET_SET(int, bdarr)
-DEF_GET_SET_LEN(bdarr, DYNAMIC_ARRAY_SIZE)
-
-DEF_GET_SET(float, fdmarr)
-DEF_GET_SET_LEN(fdmarr, DYNAMIC_MULTI_ARRAY_SIZE(float))
-DEF_GET_SET(int, idmarr)
-DEF_GET_SET_LEN(idmarr, DYNAMIC_MULTI_ARRAY_SIZE(int))
-DEF_GET_SET(int, bdmarr)
-DEF_GET_SET_LEN(bdmarr, DYNAMIC_MULTI_ARRAY_SIZE(int))
-
-#endif
-
-#else
-
-void RNA_def_test(BlenderRNA *brna)
-{
-#ifdef UNIT_TEST
- StructRNA *srna;
- PropertyRNA *prop;
- int dimsize[]= {MULTI_ARRAY_LENGTH};
-
- srna= RNA_def_struct(brna, "Test", NULL);
- RNA_def_struct_sdna(srna, "Test");
-
- prop= RNA_def_float_array(srna, "farr", ARRAY_SIZE, NULL, 0.0f, 0.0f, "farr", "float array", 0.0f, 0.0f);
- RNA_def_property_float_funcs(prop, "rna_Test_farr_get", "rna_Test_farr_set", NULL);
-
- prop= RNA_def_int_array(srna, "iarr", ARRAY_SIZE, NULL, 0, 0, "iarr", "int array", 0, 0);
- RNA_def_property_int_funcs(prop, "rna_Test_iarr_get", "rna_Test_iarr_set", NULL);
-
- prop= RNA_def_boolean_array(srna, "barr", ARRAY_SIZE, NULL, "barr", "boolean array");
- RNA_def_property_boolean_funcs(prop, "rna_Test_barr_get", "rna_Test_barr_set");
-
- /* dynamic arrays */
-
- prop= RNA_def_float_array(srna, "fdarr", DYNAMIC_ARRAY_SIZE, NULL, 0.0f, 0.0f, "fdarr", "dynamic float array", 0.0f, 0.0f);
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_dynamic_array_funcs(prop, "rna_Test_fdarr_get_length");
- RNA_def_property_float_funcs(prop, "rna_Test_fdarr_get", "rna_Test_fdarr_set", NULL);
-
- prop= RNA_def_int_array(srna, "idarr", DYNAMIC_ARRAY_SIZE, NULL, 0, 0, "idarr", "int array", 0, 0);
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_dynamic_array_funcs(prop, "rna_Test_idarr_get_length");
- RNA_def_property_int_funcs(prop, "rna_Test_idarr_get", "rna_Test_idarr_set", NULL);
-
- prop= RNA_def_boolean_array(srna, "bdarr", DYNAMIC_ARRAY_SIZE, NULL, "bdarr", "boolean array");
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_dynamic_array_funcs(prop, "rna_Test_bdarr_get_length");
- RNA_def_property_boolean_funcs(prop, "rna_Test_bdarr_get", "rna_Test_bdarr_set");
-
- /* multidimensional arrays */
-
- prop= RNA_def_property(srna, "fmarr", PROP_FLOAT, PROP_NONE);
- RNA_def_property_multi_array(prop, MULTI_ARRAY_TOTDIM, dimsize);
- RNA_def_property_float_funcs(prop, "rna_Test_fmarr_get", "rna_Test_fmarr_set", NULL);
-
- prop= RNA_def_property(srna, "imarr", PROP_INT, PROP_NONE);
- RNA_def_property_multi_array(prop, MULTI_ARRAY_TOTDIM, dimsize);
- RNA_def_property_int_funcs(prop, "rna_Test_imarr_get", "rna_Test_imarr_set", NULL);
-
- prop= RNA_def_property(srna, "bmarr", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_multi_array(prop, MULTI_ARRAY_TOTDIM, dimsize);
- RNA_def_property_boolean_funcs(prop, "rna_Test_bmarr_get", "rna_Test_bmarr_set");
-
- /* dynamic multidimensional arrays */
-
- prop= RNA_def_property(srna, "fdmarr", PROP_FLOAT, PROP_NONE);
- RNA_def_property_multi_array(prop, MULTI_ARRAY_TOTDIM, dimsize);
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_dynamic_array_funcs(prop, "rna_Test_fdmarr_get_length");
- RNA_def_property_float_funcs(prop, "rna_Test_fdmarr_get", "rna_Test_fdmarr_set", NULL);
-
- prop= RNA_def_property(srna, "idmarr", PROP_INT, PROP_NONE);
- RNA_def_property_multi_array(prop, MULTI_ARRAY_TOTDIM, dimsize);
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_dynamic_array_funcs(prop, "rna_Test_idmarr_get_length");
- RNA_def_property_int_funcs(prop, "rna_Test_idmarr_get", "rna_Test_idmarr_set", NULL);
-
- prop= RNA_def_property(srna, "bdmarr", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_multi_array(prop, MULTI_ARRAY_TOTDIM, dimsize);
- RNA_def_property_flag(prop, PROP_DYNAMIC);
- RNA_def_property_dynamic_array_funcs(prop, "rna_Test_bdmarr_get_length");
- RNA_def_property_boolean_funcs(prop, "rna_Test_bdmarr_get", "rna_Test_bdmarr_set");
-
-#endif
-}
-
-#endif /* RNA_RUNTIME */
-
-
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index f6835f3e7b5..b7403ab1178 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -86,32 +86,11 @@ StructRNA *rna_Texture_refine(struct PointerRNA *ptr)
return &RNA_VoronoiTexture;
case TEX_DISTNOISE:
return &RNA_DistortedNoiseTexture;
- case TEX_POINTDENSITY:
- return &RNA_PointDensityTexture;
- case TEX_VOXELDATA:
- return &RNA_VoxelDataTexture;
default:
return &RNA_Texture;
}
}
-static void rna_Texture_type_set(PointerRNA *ptr, int value)
-{
- Tex *tex= (Tex*)ptr->data;
-
- if (value == TEX_VOXELDATA) {
- if (tex->vd == NULL) {
- tex->vd = BKE_add_voxeldata();
- }
- } else if (value == TEX_POINTDENSITY) {
- if (tex->pd == NULL) {
- tex->pd = BKE_add_pointdensity();
- }
- }
-
- tex->type = value;
-}
-
static int rna_TextureSlot_name_length(PointerRNA *ptr)
{
MTex *mtex= ptr->data;
@@ -163,7 +142,7 @@ static EnumPropertyItem *rna_TextureSlot_output_node_itemf(bContext *C, PointerR
EnumPropertyItem *item= NULL;
int totitem= 0;
- if(tex && C) { /* Note, tex/mtex/ntree can be invalid of C is NULL, TODO - can this give valid results when C is NULL? */
+ if(tex) {
bNodeTree *ntree= tex->nodetree;
if(ntree) {
EnumPropertyItem tmp= {0, "", 0, "", ""};
@@ -374,8 +353,6 @@ static void rna_def_mtex(BlenderRNA *brna)
{MTEX_BLEND_SAT, "SATURATION", 0, "Saturation", ""},
{MTEX_BLEND_VAL, "VALUE", 0, "Value", ""},
{MTEX_BLEND_COLOR, "COLOR", 0, "Color", ""},
- {MTEX_SOFT_LIGHT, "SOFT LIGHT", 0, "Soft Light", ""},
- {MTEX_LIN_LIGHT , "LINEAR LIGHT", 0, "Linear Light", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_map_mode_items[] = {
@@ -1295,7 +1272,7 @@ static void rna_def_texture_distorted_noise(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Distorted Noise", "Procedural distorted noise texture.");
RNA_def_struct_sdna(srna, "Tex");
- prop= RNA_def_property(srna, "distortion", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "distortion_amount", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dist_amount");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Distortion Amount", "");
@@ -1309,13 +1286,13 @@ static void rna_def_texture_distorted_noise(BlenderRNA *brna)
RNA_def_property_update(prop, NC_TEXTURE, NULL);
prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
+ RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Basis", "Sets the noise basis used for turbulence");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
prop= RNA_def_property(srna, "noise_distortion", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
+ RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Distortion", "Sets the noise basis for the distortion");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
@@ -1327,252 +1304,6 @@ static void rna_def_texture_distorted_noise(BlenderRNA *brna)
RNA_def_property_update(prop, NC_TEXTURE, NULL);
}
-static void rna_def_texture_pointdensity(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- static EnumPropertyItem point_source_items[] = {
- {TEX_PD_PSYS, "PARTICLE_SYSTEM", 0, "Particle System", "Generate point density from a particle system"},
- {TEX_PD_OBJECT, "OBJECT", 0, "Object Vertices", "Generate point density from an object's vertices"},
- //{TEX_PD_FILE, "FILE", 0 , "File", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem particle_cache_items[] = {
- {TEX_PD_OBJECTLOC, "OBJECT_LOCATION", 0, "Emit Object Location", ""},
- {TEX_PD_OBJECTSPACE, "OBJECT_SPACE", 0, "Emit Object Space", ""},
- {TEX_PD_WORLDSPACE, "WORLD_SPACE", 0 , "Global Space", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem vertice_cache_items[] = {
- {TEX_PD_OBJECTLOC, "OBJECT_LOCATION", 0, "Object Location", ""},
- {TEX_PD_OBJECTSPACE, "OBJECT_SPACE", 0, "Object Space", ""},
- {TEX_PD_WORLDSPACE, "WORLD_SPACE", 0 , "Global Space", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem falloff_items[] = {
- {TEX_PD_FALLOFF_STD, "STANDARD", 0, "Standard", ""},
- {TEX_PD_FALLOFF_SMOOTH, "SMOOTH", 0, "Smooth", ""},
- {TEX_PD_FALLOFF_SOFT, "SOFT", 0, "Soft", ""},
- {TEX_PD_FALLOFF_CONSTANT, "CONSTANT", 0, "Constant", "Density is constant within lookup radius"},
- {TEX_PD_FALLOFF_ROOT, "ROOT", 0, "Root", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem color_source_items[] = {
- {TEX_PD_COLOR_CONSTANT, "CONSTANT", 0, "Constant", ""},
- {TEX_PD_COLOR_PARTAGE, "PARTICLE_AGE", 0, "Particle Age", "Lifetime mapped as 0.0 - 1.0 intensity"},
- {TEX_PD_COLOR_PARTSPEED, "PARTICLE_SPEED", 0, "Particle Speed", "Particle speed (absolute magnitude of velocity) mapped as 0.0-1.0 intensity"},
- {TEX_PD_COLOR_PARTVEL, "PARTICLE_VELOCITY", 0, "Particle Velocity", "XYZ velocity mapped to RGB colors"},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem turbulence_influence_items[] = {
- {TEX_PD_NOISE_STATIC, "STATIC", 0, "Static", "Noise patterns will remain unchanged, faster and suitable for stills"},
- {TEX_PD_NOISE_VEL, "PARTICLE_VELOCITY", 0, "Particle Velocity", "Turbulent noise driven by particle velocity"},
- {TEX_PD_NOISE_AGE, "PARTICLE_AGE", 0, "Particle Age", "Turbulent noise driven by the particle's age between birth and death"},
- {TEX_PD_NOISE_TIME, "GLOBAL_TIME", 0, "Global Time", "Turbulent noise driven by the global current frame"},
- {0, NULL, 0, NULL, NULL}};
-
- srna= RNA_def_struct(brna, "PointDensity", NULL);
- RNA_def_struct_sdna(srna, "PointDensity");
- RNA_def_struct_ui_text(srna, "PointDensity", "Point density settings.");
-
- prop= RNA_def_property(srna, "point_source", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "source");
- RNA_def_property_enum_items(prop, point_source_items);
- RNA_def_property_ui_text(prop, "Point Source", "Point data to use as renderable point density");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "object");
- RNA_def_property_ui_text(prop, "Object", "Object to take point data from");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "psys");
- RNA_def_property_ui_text(prop, "Particle System", "Particle System to render as points");
- RNA_def_property_struct_type(prop, "ParticleSystem");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "particle_cache", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "psys_cache_space");
- RNA_def_property_enum_items(prop, particle_cache_items);
- RNA_def_property_ui_text(prop, "Particle Cache", "Co-ordinate system to cache particles in");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "vertices_cache", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "ob_cache_space");
- RNA_def_property_enum_items(prop, vertice_cache_items);
- RNA_def_property_ui_text(prop, "Vertices Cache", "Co-ordinate system to cache vertices in");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "radius");
- RNA_def_property_range(prop, 0.01, FLT_MAX);
- RNA_def_property_ui_text(prop, "Radius", "Radius from the shaded sample to look for points within");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "falloff_type");
- RNA_def_property_enum_items(prop, falloff_items);
- RNA_def_property_ui_text(prop, "Falloff", "Method of attenuating density by distance from the point");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "falloff_softness", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "falloff_softness");
- RNA_def_property_range(prop, 0.01, FLT_MAX);
- RNA_def_property_ui_text(prop, "Softness", "Softness of the 'soft' falloff option");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "color_source", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "color_source");
- RNA_def_property_enum_items(prop, color_source_items);
- RNA_def_property_ui_text(prop, "Color Source", "Data to derive color results from");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "speed_scale", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "speed_scale");
- RNA_def_property_range(prop, 0.001, 100.0);
- RNA_def_property_ui_text(prop, "Scale", "Multipler to bring particle speed within an acceptable range");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "coba");
- RNA_def_property_struct_type(prop, "ColorRamp");
- RNA_def_property_ui_text(prop, "Color Ramp", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- /* Turbulence */
- prop= RNA_def_property(srna, "turbulence", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_PD_TURBULENCE);
- RNA_def_property_ui_text(prop, "Turbulence", "Add directed noise to the density at render-time");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "turbulence_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "noise_size");
- RNA_def_property_range(prop, 0.01, FLT_MAX);
- RNA_def_property_ui_text(prop, "Size", "Scale of the added turbulent noise");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "turbulence_strength", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "noise_fac");
- RNA_def_property_range(prop, 0.01, FLT_MAX);
- RNA_def_property_ui_text(prop, "Strength", "");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "turbulence_depth", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "noise_depth");
- RNA_def_property_range(prop, 0, INT_MAX);
- RNA_def_property_ui_text(prop, "Depth", "Level of detail in the added turbulent noise");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "turbulence_influence", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "noise_influence");
- RNA_def_property_enum_items(prop, turbulence_influence_items);
- RNA_def_property_ui_text(prop, "Turbulence Influence", "Method for driving added turbulent noise");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "noise_basis");
- RNA_def_property_enum_items(prop, prop_noise_basis_items);
- RNA_def_property_ui_text(prop, "Noise Basis", "Noise formula used for tubulence");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
-
- srna= RNA_def_struct(brna, "PointDensityTexture", "Texture");
- RNA_def_struct_sdna(srna, "Tex");
- RNA_def_struct_ui_text(srna, "Point Density", "Settings for the Point Density texture");
-
- prop= RNA_def_property(srna, "pointdensity", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "pd");
- RNA_def_property_struct_type(prop, "PointDensity");
- RNA_def_property_ui_text(prop, "Point Density", "The point density settings associated with this texture");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-}
-
-static void rna_def_texture_voxeldata(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- static EnumPropertyItem interpolation_type_items[] = {
- {TEX_VD_NEARESTNEIGHBOR, "NEREASTNEIGHBOR", 0, "Nearest Neighbor", "No interpolation, fast but blocky and low quality."},
- {TEX_VD_LINEAR, "TRILINEAR", 0, "Linear", "Good smoothness and speed"},
- {TEX_VD_QUADRATIC, "QUADRATIC", 0, "Quadratic", "Mid-range quality and speed"},
- {TEX_VD_TRICUBIC_CATROM, "TRICUBIC_CATROM", 0, "Cubic Catmull-Rom", "High quality interpolation, but slower"},
- {TEX_VD_TRICUBIC_BSPLINE, "TRICUBIC_BSPLINE", 0, "Cubic B-Spline", "Smoothed high quality interpolation, but slower"},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem file_format_items[] = {
- {TEX_VD_BLENDERVOXEL, "BLENDER_VOXEL", 0, "Blender Voxel", "Default binary voxel file format"},
- {TEX_VD_RAW_8BIT, "RAW_8BIT", 0, "8 bit RAW", "8 bit greyscale binary data"},
- //{TEX_VD_RAW_16BIT, "RAW_16BIT", 0, "16 bit RAW", ""},
- {TEX_VD_IMAGE_SEQUENCE, "IMAGE_SEQUENCE", 0, "Image Sequence", "Generate voxels from a sequence of image slices"},
- {TEX_VD_SMOKE, "SMOKE", 0, "Smoke", "Render voxels from a Blender smoke simulation"},
- {0, NULL, 0, NULL, NULL}};
-
- srna= RNA_def_struct(brna, "VoxelData", NULL);
- RNA_def_struct_sdna(srna, "VoxelData");
- RNA_def_struct_ui_text(srna, "VoxelData", "Voxel data settings.");
-
- prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "interp_type");
- RNA_def_property_enum_items(prop, interpolation_type_items);
- RNA_def_property_ui_text(prop, "Interpolation", "Method to interpolate/smooth values between voxel cells");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "int_multiplier");
- RNA_def_property_range(prop, 0.01, FLT_MAX);
- RNA_def_property_ui_text(prop, "Intensity", "Multiplier for intensity values");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "file_format");
- RNA_def_property_enum_items(prop, file_format_items);
- RNA_def_property_ui_text(prop, "File Format", "Format of the source data set to render ");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "source_path", PROP_STRING, PROP_FILEPATH);
- RNA_def_property_string_sdna(prop, NULL, "source_path");
- RNA_def_property_ui_text(prop, "Source Path", "The external source data file to use");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "resol");
- RNA_def_property_ui_text(prop, "Resolution", "Resolution of the voxel grid.");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "still", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_VD_STILL);
- RNA_def_property_ui_text(prop, "Still Frame Only", "Always render a still frame from the voxel data sequence");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "still_frame_number", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "still_frame");
- RNA_def_property_range(prop, 0, INT_MAX);
- RNA_def_property_ui_text(prop, "Still Frame Number", "The frame number to always use");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop= RNA_def_property(srna, "domain_object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "object");
- RNA_def_property_ui_text(prop, "Domain Object", "Object used as the smoke simulation domain");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
-
- srna= RNA_def_struct(brna, "VoxelDataTexture", "Texture");
- RNA_def_struct_sdna(srna, "Tex");
- RNA_def_struct_ui_text(srna, "Voxel Data", "Settings for the Voxel Data texture");
-
- prop= RNA_def_property(srna, "voxeldata", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "vd");
- RNA_def_property_struct_type(prop, "VoxelData");
- RNA_def_property_ui_text(prop, "Voxel Data", "The voxel data associated with this texture");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-}
-
static void rna_def_texture(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1593,8 +1324,6 @@ static void rna_def_texture(BlenderRNA *brna)
{TEX_MUSGRAVE, "MUSGRAVE", ICON_TEXTURE, "Musgrave", ""},
{TEX_VORONOI, "VORONOI", ICON_TEXTURE, "Voronoi", ""},
{TEX_DISTNOISE, "DISTORTED_NOISE", ICON_TEXTURE, "Distorted Noise", ""},
- {TEX_POINTDENSITY, "POINT_DENSITY", ICON_TEXTURE, "Point Density", ""},
- {TEX_VOXELDATA, "VOXEL_DATA", ICON_TEXTURE, "Voxel Data", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Texture", "ID");
@@ -1607,7 +1336,6 @@ static void rna_def_texture(BlenderRNA *brna)
//RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
- RNA_def_property_enum_funcs(prop, NULL, "rna_Texture_type_set", NULL);
RNA_def_property_ui_text(prop, "Type", "");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
@@ -1671,8 +1399,6 @@ static void rna_def_texture(BlenderRNA *brna)
rna_def_texture_musgrave(brna);
rna_def_texture_voronoi(brna);
rna_def_texture_distorted_noise(brna);
- rna_def_texture_pointdensity(brna);
- rna_def_texture_voxeldata(brna);
/* XXX add more types here .. */
}
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 40d25a2a30a..82694098e69 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -1,5 +1,5 @@
/**
- * $Id$
+ * $Id:
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -37,23 +37,6 @@
#ifdef RNA_RUNTIME
-static void rna_uiItemR(uiLayout *layout, char *name, int icon, PointerRNA *ptr, char *propname, int expand, int slider, int toggle)
-{
- int flag= 0;
-
- flag |= (slider)? UI_ITEM_R_SLIDER: 0;
- flag |= (expand)? UI_ITEM_R_EXPAND: 0;
- flag |= (toggle)? UI_ITEM_R_TOGGLE: 0;
-
- uiItemR(layout, name, icon, ptr, propname, flag);
-}
-
-static PointerRNA rna_uiItemO(uiLayout *layout, char *name, int icon, char *opname, int properties)
-{
- int flag= (properties)? UI_ITEM_O_RETURN_PROPS: 0;
- return uiItemFullO(layout, name, icon, opname, NULL, uiLayoutGetOperatorContext(layout), flag);
-}
-
#else
#define DEF_ICON(name) {name, #name, 0, #name, ""},
@@ -139,7 +122,7 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_float(func, "percentage", 0.0f, 0.0f, 1.0f, "Percentage", "Percentage of width to split at.", 0.0f, 1.0f);
/* items */
- func= RNA_def_function(srna, "itemR", "rna_uiItemR");
+ func= RNA_def_function(srna, "itemR", "uiItemR");
api_ui_item_common(func);
api_ui_item_rna_common(func);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
@@ -167,12 +150,8 @@ void RNA_api_ui_layout(StructRNA *srna)
parm= RNA_def_string(func, "search_property", "", 0, "", "Identifier of search collection property.");
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "itemO", "rna_uiItemO");
+ func= RNA_def_function(srna, "itemO", "uiItemO");
api_ui_item_op_common(func);
- parm= RNA_def_boolean(func, "properties", 0, "Properties", "Return operator properties to fill in manually.");
- parm= RNA_def_pointer(func, "return_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);
func= RNA_def_function(srna, "item_enumO", "uiItemEnumO_string");
api_ui_item_op_common(func);
@@ -247,7 +226,6 @@ void RNA_api_ui_layout(StructRNA *srna)
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.");
func= RNA_def_function(srna, "template_modifier", "uiTemplateModifier");
@@ -312,6 +290,12 @@ void RNA_api_ui_layout(StructRNA *srna)
func= RNA_def_function(srna, "template_header_3D", "uiTemplateHeader3D");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ func= RNA_def_function(srna, "view3d_select_metaballmenu", "uiTemplate_view3d_select_metaballmenu");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ func= RNA_def_function(srna, "view3d_select_armaturemenu", "uiTemplate_view3d_select_armaturemenu");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ func= RNA_def_function(srna, "view3d_select_posemenu", "uiTemplate_view3d_select_posemenu");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
func= RNA_def_function(srna, "view3d_select_faceselmenu", "uiTemplate_view3d_select_faceselmenu");
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 ffc3f1696fc..d1245528100 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -33,7 +33,6 @@
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
-#include "WM_api.h"
#include "WM_types.h"
#include "BKE_utildefines.h"
@@ -42,12 +41,7 @@
#ifdef RNA_RUNTIME
-static void rna_userdef_update(bContext *C, PointerRNA *ptr)
-{
- WM_event_add_notifier(C, NC_WINDOW, NULL);
-}
-
-static void rna_userdef_lmb_select_set(PointerRNA *ptr,int value)
+static void rna_userdef_lmb_select_set(struct PointerRNA *ptr,int value)
{
UserDef *userdef = (UserDef*)ptr->data;
@@ -59,12 +53,12 @@ static void rna_userdef_lmb_select_set(PointerRNA *ptr,int value)
userdef->flag &= ~USER_LMOUSESELECT;
}
-static void rna_userdef_rmb_select_set(PointerRNA *ptr,int value)
+static void rna_userdef_rmb_select_set(struct PointerRNA *ptr,int value)
{
rna_userdef_lmb_select_set(ptr, !value);
}
-static void rna_userdef_emulate_set(PointerRNA *ptr,int value)
+static void rna_userdef_emulate_set(struct PointerRNA *ptr,int value)
{
UserDef *userdef = (UserDef*)ptr->data;
@@ -74,7 +68,7 @@ static void rna_userdef_emulate_set(PointerRNA *ptr,int value)
userdef->flag ^= USER_TWOBUTTONMOUSE;
}
-static int rna_userdef_autokeymode_get(PointerRNA *ptr)
+static int rna_userdef_autokeymode_get(struct PointerRNA *ptr)
{
UserDef *userdef = (UserDef*)ptr->data;
short retval = userdef->autokey_mode;
@@ -85,7 +79,7 @@ static int rna_userdef_autokeymode_get(PointerRNA *ptr)
return retval;
}
-static void rna_userdef_autokeymode_set(PointerRNA *ptr,int value)
+static void rna_userdef_autokeymode_set(struct PointerRNA *ptr,int value)
{
UserDef *userdef = (UserDef*)ptr->data;
@@ -148,38 +142,38 @@ static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
prop= RNA_def_property(srna, "points", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 6, 48);
RNA_def_property_ui_text(prop, "Points", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "font_kerning_style", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "kerning");
RNA_def_property_enum_items(prop, font_kerning_style);
RNA_def_property_ui_text(prop, "Kerning Style", "Which style to use for font kerning.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "shadow", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 5);
RNA_def_property_ui_text(prop, "Shadow Size", "Shadow size in pixels (0, 3 and 5 supported)");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "shadx", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, -10, 10);
RNA_def_property_ui_text(prop, "Shadow X Offset", "Shadow offset in pixels");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "shady", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, -10, 10);
RNA_def_property_ui_text(prop, "Shadow Y Offset", "Shadow offset in pixels");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "shadowalpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shadow Alpha", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "shadowcolor", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shadow Brightness", "Shadow color in grey value");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
@@ -201,25 +195,25 @@ static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "paneltitle");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
RNA_def_property_ui_text(prop, "Panel Font", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "grouplabel", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "grouplabel");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
RNA_def_property_ui_text(prop, "Group Label Font", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "widgetlabel", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "widgetlabel");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
RNA_def_property_ui_text(prop, "Widget Label Font", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "widget", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "widget");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
RNA_def_property_ui_text(prop, "Widget Font", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
@@ -235,47 +229,47 @@ static void rna_def_userdef_theme_ui_wcol(BlenderRNA *brna)
prop= RNA_def_property(srna, "outline", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Outline", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "inner", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Inner", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "inner_sel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Inner Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "item", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Item", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "text_sel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Text Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "shaded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shaded", 1);
RNA_def_property_ui_text(prop, "Shaded", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "shadetop", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, -100, 100);
RNA_def_property_ui_text(prop, "Shade Top", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "shadedown", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, -100, 100);
RNA_def_property_ui_text(prop, "Shade Down", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna)
@@ -290,36 +284,36 @@ static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna)
prop= RNA_def_property(srna, "inner_anim", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Animated", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "inner_anim_sel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Animated Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "inner_key", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Keyframe", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "inner_key_sel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Keyframe Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "inner_driven", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Driven", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "inner_driven_sel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Driven Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "blend", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_ui_text(prop, "Blend", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_ui(BlenderRNA *brna)
@@ -338,102 +332,102 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "wcol_regular");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Regular Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_tool", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_tool");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Tool Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_radio", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_radio");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Radio Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_text", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_text");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Text Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_option", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_option");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Option Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_toggle", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_toggle");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Toggle Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_num", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_num");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Number Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_numslider", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_numslider");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Slider Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_box", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_box");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Box Backdrop Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_menu", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Menu Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_pulldown", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_pulldown");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Pulldown Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_menu_back", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu_back");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Menu Backdrop Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_menu_item", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu_item");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Menu Item Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_scroll", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_scroll");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Scroll Widget Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_list_item", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_list_item");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "List Item Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wcol_state", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_state");
RNA_def_property_struct_type(prop, "ThemeWidgetStateColors");
RNA_def_property_ui_text(prop, "State Colors", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "iconfile");
RNA_def_property_ui_text(prop, "Icon File", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_spaces_main(StructRNA *srna, int spacetype)
@@ -444,60 +438,60 @@ static void rna_def_userdef_theme_spaces_main(StructRNA *srna, int spacetype)
prop= RNA_def_property(srna, "back", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Back", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "title", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Title", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "text_hi", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Text Highlight", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
/* header */
prop= RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Header", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "header_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Header Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "header_text_hi", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Header Text Highlight", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
/* buttons */
if(! ELEM(spacetype, SPACE_BUTS, SPACE_OUTLINER)) {
prop= RNA_def_property(srna, "button", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Button Back", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "button_title", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Button Title", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "button_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Button Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "button_text_hi", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Button Text Highlight", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
/* list/channels */
@@ -505,22 +499,22 @@ static void rna_def_userdef_theme_spaces_main(StructRNA *srna, int spacetype)
prop= RNA_def_property(srna, "list", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "List Back", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "list_title", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "List Title", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "list_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "List Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "list_text_hi", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "List Text Highlight", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
}
@@ -531,17 +525,17 @@ static void rna_def_userdef_theme_spaces_vertex(StructRNA *srna)
prop= RNA_def_property(srna, "vertex", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Vertex", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "vertex_select", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Vertex Select", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "vertex_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Vertex Size", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_spaces_edge(StructRNA *srna)
@@ -551,22 +545,22 @@ static void rna_def_userdef_theme_spaces_edge(StructRNA *srna)
prop= RNA_def_property(srna, "edge_select", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "edge Select", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "edge_seam", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge Seam", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "edge_sharp", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge Sharp", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "edge_facesel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge UV Face Select", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_spaces_face(StructRNA *srna)
@@ -576,22 +570,22 @@ static void rna_def_userdef_theme_spaces_face(StructRNA *srna)
prop= RNA_def_property(srna, "face", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Face", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "face_select", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Face Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "face_dot", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Face Dot Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "facedot_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Face Dot Size", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
@@ -610,51 +604,51 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Panel", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Wire", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "lamp", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Lamp", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "object_selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Object Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "object_active", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active Object", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "object_grouped", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Object Grouped", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "object_grouped_active", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group_active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Object Grouped Active", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "transform", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Transform", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
rna_def_userdef_theme_spaces_vertex(srna);
rna_def_userdef_theme_spaces_edge(srna);
@@ -663,28 +657,28 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
prop= RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Active Vert/Edge/Face", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Normal", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "bone_solid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bone Solid", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "bone_pose", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bone Pose", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
@@ -703,24 +697,24 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Panel", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Sliders", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "channels_region", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channels Region", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
rna_def_userdef_theme_spaces_vertex(srna);
@@ -728,46 +722,46 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "handle_vertex", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Handle Vertex", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "handle_vertex_select", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Handle Vertex Select", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "handle_vertex_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_text(prop, "Handle Vertex Size", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channel Group", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group_active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active Channel Group", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ds_channel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "DopeSheet Channel", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ds_subchannel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "DopeSheet Sub-Channel", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
@@ -787,37 +781,37 @@ static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "hilite");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected File", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "tiles", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "panel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Tiles", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "scrollbar", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Scrollbar", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "scroll_handle", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Scroll Handle", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "active_file", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active File", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "active_file_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "grid");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active File Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_outliner(BlenderRNA *brna)
@@ -877,55 +871,55 @@ static void rna_def_userdef_theme_space_text(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "grid");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Line Numbers Background", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "scroll_bar", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Scroll Bar", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "hilite");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Cursor", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "syntax_builtin", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxb");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Builtin", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "syntax_special", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxv");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Special", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "syntax_comment", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxc");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Comment", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "syntax_string", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxl");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax String", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "syntax_numbers", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxn");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Numbers", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
@@ -945,49 +939,49 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "wire");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Wires", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "wire_select", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "edge_select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Wire Select", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected Text", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "node_backdrop", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxl");
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Node Backdrop", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "in_out_node", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxn");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "In/Out Node", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "converter_node", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxv");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Converter Node", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "operator_node", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxb");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Operator Node", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "group_node", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxc");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Group Node", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_logic(BlenderRNA *brna)
@@ -1006,7 +1000,7 @@ static void rna_def_userdef_theme_space_logic(BlenderRNA *brna)
prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Panel", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
@@ -1026,7 +1020,7 @@ static void rna_def_userdef_theme_space_buts(BlenderRNA *brna)
prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Panel", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_time(BlenderRNA *brna)
@@ -1045,13 +1039,13 @@ static void rna_def_userdef_theme_space_time(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_sound(BlenderRNA *brna)
@@ -1070,19 +1064,19 @@ static void rna_def_userdef_theme_space_sound(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Sliders", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
@@ -1103,7 +1097,7 @@ static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
prop= RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Active Vert/Edge/Face", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
@@ -1120,79 +1114,79 @@ static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Sliders", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "movie_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "movie");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Movie Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "image_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "image");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Image Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "scene_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "scene");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Scene Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "audio_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "audio");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Audio Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "effect_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "effect");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Effect Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "plugin_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "plugin");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Plugin Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "transition_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "transition");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Transition Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "meta_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "meta");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Meta Strip", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "keyframe", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "vertex_select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Keyframe", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "draw_action", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "bone_pose");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Draw Action", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
@@ -1211,73 +1205,73 @@ static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "value_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "face");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Value Sliders", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "View Sliders", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "channels", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channels", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "channels_selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "hilite");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channels Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channel Group", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group_active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active Channel Group", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "long_key", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "strip");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Long Key", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "long_key_selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "strip_select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Long Key Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ds_channel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "DopeSheet Channel", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ds_subchannel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "DopeSheet Sub-Channel", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
@@ -1296,43 +1290,43 @@ static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "View Sliders", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "bars", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bars", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "bars_selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "hilite");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bars Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "strips", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "strip");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "strips", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "strips_selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "strip_select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Strips Selected", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_theme_colorset(BlenderRNA *brna)
@@ -1348,23 +1342,23 @@ static void rna_def_userdef_theme_colorset(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "solid");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Normal", "Color used for the surface of bones.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected", "Color used for selected bones.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "active", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active", "Color used for active bones.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "colored_constraints", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TH_WIRECOLOR_CONSTCOLS);
RNA_def_property_ui_text(prop, "Colored Constraints", "Allow the use of colors indicating constraints/keyed status.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_themes(BlenderRNA *brna)
@@ -1553,27 +1547,27 @@ static void rna_def_userdef_view(BlenderRNA *brna)
prop= RNA_def_property(srna, "display_object_info", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DRAWVIEWINFO);
RNA_def_property_ui_text(prop, "Display Object Info", "Display objects name and frame number in 3d view.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "global_scene", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SCENEGLOBAL);
RNA_def_property_ui_text(prop, "Global Scene", "Forces the current Scene to be displayed in all Screens.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "use_large_cursors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "curssize", 0);
RNA_def_property_ui_text(prop, "Large Cursors", "Use large mouse cursors when available.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "show_view_name", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_VIEWPORTNAME);
RNA_def_property_ui_text(prop, "Show View Name", "Show the name of the view's direction in each 3D View.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "show_playback_fps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_FPS);
RNA_def_property_ui_text(prop, "Show Playback FPS", "Show the frames per second screen refresh rate, while animation is played back.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
/* menus */
prop= RNA_def_property(srna, "open_mouse_over", PROP_BOOLEAN, PROP_NONE);
@@ -1668,19 +1662,16 @@ static void rna_def_userdef_view(BlenderRNA *brna)
prop= RNA_def_property(srna, "show_mini_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_ROTVIEWICON);
RNA_def_property_ui_text(prop, "Show Mini Axis", "Show a small rotating 3D axis in the bottom left corner of the 3D View.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "mini_axis_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rvisize");
RNA_def_property_range(prop, 10, 64);
RNA_def_property_ui_text(prop, "Mini Axis Size", "The axis icon's size.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "mini_axis_brightness", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rvibright");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Mini Axis Brightness", "The brightness of the icon.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
/* middle mouse button */
prop= RNA_def_property(srna, "middle_mouse_rotate", PROP_BOOLEAN, PROP_NONE);
@@ -1714,19 +1705,16 @@ static void rna_def_userdef_view(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_manipulator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "tw_flag", 1);
RNA_def_property_ui_text(prop, "Manipulator", "Use 3d transform manipulator.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "manipulator_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_size");
RNA_def_property_range(prop, 2, 40);
RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of widget, in 10 pixel units.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "manipulator_handle_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_handlesize");
RNA_def_property_range(prop, 2, 40);
RNA_def_property_ui_text(prop, "Manipulator Handle Size", "Size of widget handles as percentage of widget radius.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_hotspot");
@@ -1737,7 +1725,6 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "obcenter_dia");
RNA_def_property_range(prop, 4, 10);
RNA_def_property_ui_text(prop, "Object Center Size", "Diameter in Pixels for Object/Lamp center display.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "ndof_pan_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ndof_pan");
@@ -1870,51 +1857,47 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
prop= RNA_def_property(srna, "duplicate_mesh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MESH);
- RNA_def_property_ui_text(prop, "Duplicate Mesh", "Causes mesh data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Mesh", "Causes mesh data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_surface", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_SURF);
- RNA_def_property_ui_text(prop, "Duplicate Surface", "Causes surface data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Surface", "Causes surface data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_curve", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_CURVE);
- RNA_def_property_ui_text(prop, "Duplicate Curve", "Causes curve data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Curve", "Causes curve data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_text", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_FONT);
- RNA_def_property_ui_text(prop, "Duplicate Text", "Causes text data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Text", "Causes text data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_metaball", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MBALL);
- RNA_def_property_ui_text(prop, "Duplicate Metaball", "Causes metaball data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Metaball", "Causes metaball data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_armature", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ARM);
- RNA_def_property_ui_text(prop, "Duplicate Armature", "Causes armature data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Armature", "Causes armature data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_lamp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_LAMP);
- RNA_def_property_ui_text(prop, "Duplicate Lamp", "Causes lamp data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Lamp", "Causes lamp data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_material", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MAT);
- RNA_def_property_ui_text(prop, "Duplicate Material", "Causes material data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Material", "Causes material data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_TEX);
- RNA_def_property_ui_text(prop, "Duplicate Texture", "Causes texture data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Texture", "Causes texture data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_ipo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_IPO);
- RNA_def_property_ui_text(prop, "Duplicate Ipo", "Causes ipo data to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Ipo", "Causes ipo data to be duplicated with Shift+D.");
prop= RNA_def_property(srna, "duplicate_action", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ACT);
- RNA_def_property_ui_text(prop, "Duplicate Action", "Causes actions to be duplicated with the object.");
-
- prop= RNA_def_property(srna, "duplicate_particle", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_PSYS);
- RNA_def_property_ui_text(prop, "Duplicate Particle", "Causes particle systems to be duplicated with the object.");
+ RNA_def_property_ui_text(prop, "Duplicate Action", "Causes actions to be duplicated with Shift+D.");
}
static void rna_def_userdef_language(BlenderRNA *brna)
@@ -1957,13 +1940,13 @@ static void rna_def_userdef_language(BlenderRNA *brna)
prop= RNA_def_property(srna, "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, NULL);
prop= RNA_def_property(srna, "dpi", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dpi");
RNA_def_property_range(prop, 48, 128);
RNA_def_property_ui_text(prop, "DPI", "Font size and resolution for display.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "scrollback", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "scrollback");
@@ -1975,27 +1958,27 @@ static void rna_def_userdef_language(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, NULL);
prop= RNA_def_property(srna, "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");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "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");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "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.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
prop= RNA_def_property(srna, "use_textured_fonts", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_USETEXTUREFONT);
RNA_def_property_ui_text(prop, "Textured Fonts", "Use textures for drawing international fonts.");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
}
static void rna_def_userdef_system(BlenderRNA *brna)
@@ -2027,15 +2010,9 @@ static void rna_def_userdef_system(BlenderRNA *brna)
static EnumPropertyItem audio_device_items[] = {
{0, "AUDIO_DEVICE_NULL", 0, "No Audio", "Null device - there will be no audio output."},
-#ifdef WITH_SDL
{1, "AUDIO_DEVICE_SDL", 0, "SDL", "SDL device - simple direct media layer, recommended for sequencer usage."},
-#endif
-#ifdef WITH_OPENAL
{2, "AUDIO_DEVICE_OPENAL", 0, "OpenAL", "OpenAL device - supports 3D audio, recommended for game engine usage."},
-#endif
-#ifdef WITH_JACK
{3, "AUDIO_DEVICE_JACK", 0, "Jack", "Jack device - open source pro audio, recommended for pro audio users."},
-#endif
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem audio_rate_items[] = {
@@ -2222,10 +2199,6 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_FILECOMPRESS);
RNA_def_property_ui_text(prop, "Compress File", "Enable file compression when saving .blend files.");
- prop= RNA_def_property(srna, "load_ui", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_FILENOUI);
- RNA_def_property_ui_text(prop, "Load UI", "Load user interface setup when loading .blend files.");
-
prop= RNA_def_property(srna, "fonts_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "fontdir");
RNA_def_property_ui_text(prop, "Fonts Directory", "The default directory to search for loading fonts.");
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index af3ac4a0a82..eaed0100386 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -377,22 +377,22 @@ static void rna_def_event(BlenderRNA *brna)
prop= RNA_def_property(srna, "shift", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shift", 1);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Shift", "True when the Shift key is held.");
+ RNA_def_property_ui_text(prop, "Shift", "True when the shift key is held.");
prop= RNA_def_property(srna, "ctrl", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ctrl", 1);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Ctrl", "True when the Ctrl key is held.");
+ RNA_def_property_ui_text(prop, "Ctrl", "True when the shift key is held.");
prop= RNA_def_property(srna, "alt", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "alt", 1);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Alt", "True when the Alt/Option key is held.");
+ RNA_def_property_ui_text(prop, "Alt", "True when the shift key is held.");
prop= RNA_def_property(srna, "oskey", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "oskey", 1);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "OS Key", "True when the Cmd key is held.");
+ RNA_def_property_ui_text(prop, "OS Key", "True when the shift key is held.");
}
static void rna_def_window(BlenderRNA *brna)
@@ -419,7 +419,6 @@ static void rna_def_windowmanager(BlenderRNA *brna)
srna= RNA_def_struct(brna, "WindowManager", "ID");
RNA_def_struct_ui_text(srna, "Window Manager", "Window manager datablock defining open windows and other user interface data.");
- RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
RNA_def_struct_sdna(srna, "wmWindowManager");
prop= RNA_def_property(srna, "operators", PROP_COLLECTION, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index 0ed5016ccd2..525a4446932 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -324,14 +324,12 @@ static void rna_def_world_mist(BlenderRNA *brna)
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
RNA_def_property_ui_text(prop, "Start", "Starting distance of the mist, measured from the camera");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "depth", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "mistdist");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
RNA_def_property_ui_text(prop, "Depth", "The distance over which the mist effect fades in");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "misthi");
diff --git a/source/blender/nodes/CMP_node.h b/source/blender/nodes/CMP_node.h
index 041bf1c8361..020bbdebfa2 100644
--- a/source/blender/nodes/CMP_node.h
+++ b/source/blender/nodes/CMP_node.h
@@ -25,7 +25,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): Bob Holcomb.
+ * Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -49,7 +49,6 @@ extern bNodeType cmp_node_composite;
extern bNodeType cmp_node_viewer;
extern bNodeType cmp_node_splitviewer;
extern bNodeType cmp_node_output_file;
-extern bNodeType cmp_node_view_levels;
extern bNodeType cmp_node_curve_rgb;
extern bNodeType cmp_node_mix_rgb;
@@ -89,9 +88,7 @@ extern bNodeType cmp_node_combycca;
extern bNodeType cmp_node_premulkey;
extern bNodeType cmp_node_diff_matte;
-extern bNodeType cmp_node_distance_matte;
-extern bNodeType cmp_node_chroma_matte;
-extern bNodeType cmp_node_color_matte;
+extern bNodeType cmp_node_chroma;
extern bNodeType cmp_node_channel_matte;
extern bNodeType cmp_node_color_spill;
extern bNodeType cmp_node_luma_matte;
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index df2567142ca..ca21ba592a8 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -26,32 +26,32 @@
FILE(GLOB SRC intern/*.c intern/CMP_nodes/*.c intern/SHD_nodes/*.c intern/TEX_nodes/*.c)
SET(INC
- . ../../../intern/guardedalloc ../editors/include ../blenlib ../makesdna
- ../render/extern/include ../../../intern/decimation/extern ../makesrna
- ../imbuf ../avi ../../../intern/elbeem/extern
- ../../../intern/iksolver/extern ../blenloader
- ../blenkernel ../../../extern/glew/include ../gpu
- ${ZLIB_INC}
+ . ../../../intern/guardedalloc ../editors/include ../blenlib ../makesdna
+ ../render/extern/include ../../../intern/decimation/extern ../makesrna
+ ../imbuf ../avi ../../../intern/elbeem/extern
+ ../../../intern/iksolver/extern ../blenloader ../quicktime
+ ../blenkernel ../../../extern/glew/include ../gpu
+ ${ZLIB_INC}
)
IF(WITH_OPENEXR)
- ADD_DEFINITIONS(-DWITH_OPENEXR)
+ ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
IF(WITH_QUICKTIME)
- SET(INC ${INC} ../quicktime ${QUICKTIME_INC})
- ADD_DEFINITIONS(-DWITH_QUICKTIME)
+ SET(INC ${INC} ${QUICKTIME_INC})
+ ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
IF(WITH_FFMPEG)
- SET(INC ${INC} ${FFMPEG_INC})
- ADD_DEFINITIONS(-DWITH_FFMPEG)
+ SET(INC ${INC} ${FFMPEG_INC})
+ ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
IF(WITH_PYTHON)
- SET(INC ${INC} ../python ${PYTHON_INC})
+ SET(INC ${INC} ../python ${PYTHON_INC})
ELSE(WITH_PYTHON)
- ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ ADD_DEFINITIONS(-DDISABLE_PYTHON)
ENDIF(WITH_PYTHON)
BLENDERLIB(bf_nodes "${SRC}" "${INC}")
diff --git a/source/blender/nodes/SConscript b/source/blender/nodes/SConscript
index 771ce42e1dc..0b35db3b4b7 100644
--- a/source/blender/nodes/SConscript
+++ b/source/blender/nodes/SConscript
@@ -38,7 +38,7 @@ if env['WITH_BF_QUICKTIME']:
defs.append('WITH_QUICKTIME')
incs += ' ' + env['BF_QUICKTIME_INC']
-env.BlenderLib ( libname = 'bf_nodes', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [190,105] )
-env.BlenderLib ( libname = 'bf_cmpnodes', sources = cmpsources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [175,101] )
-env.BlenderLib ( libname = 'bf_shdnodes', sources = shdsources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [175,101] )
-env.BlenderLib ( libname = 'bf_texnodes', sources = texsources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [175,101] )
+env.BlenderLib ( libname = 'bf_nodes', sources = sources, includes = Split(incs), defines = defs, libtype=['core'], priority = [190] )
+env.BlenderLib ( libname = 'bf_cmpnodes', sources = cmpsources, includes = Split(incs), defines = defs, libtype=['core'], priority = [175] )
+env.BlenderLib ( libname = 'bf_shdnodes', sources = shdsources, includes = Split(incs), defines = defs, libtype=['core'], priority = [175] )
+env.BlenderLib ( libname = 'bf_texnodes', sources = texsources, includes = Split(incs), defines = defs, libtype=['core'], priority = [175] )
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
index b0a2531ac1f..d0cc4e5b88d 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
@@ -22,7 +22,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): Bob Holcomb
+ * Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -180,7 +180,7 @@ static void node_composit_init_channel_matte(bNode *node)
{
NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
node->storage=c;
- c->t1= 1.0f;
+ c->t1= 0.0f;
c->t2= 0.0f;
c->t3= 0.0f;
c->fsize= 0.0f;
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c
index 28b81fe9f47..6a40018e659 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c
@@ -172,9 +172,9 @@ static void node_composit_init_chroma_matte(bNode *node)
c->fstrength= 1.0f;
};
-bNodeType cmp_node_chroma_matte={
+bNodeType cmp_node_chroma={
/* *next,*prev */ NULL, NULL,
- /* type code */ CMP_NODE_CHROMA_MATTE,
+ /* type code */ CMP_NODE_CHROMA,
/* name */ "Chroma Key",
/* width+range */ 200, 80, 300,
/* class+opts */ NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS,
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c
deleted file mode 100644
index 0a4d3fceff9..00000000000
--- a/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * $Id: CMP_colorMatte.c 12931 2007-12-17 18:20:48Z theeth $
- *
- * ***** 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): Bob Holcomb
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include "../CMP_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},
- {-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},
- {-1,0,""}
-};
-
-static void do_color_key(bNode *node, float *out, float *in)
-{
- NodeChroma *c;
- c=node->storage;
-
-
- VECCOPY(out, in);
-
- if(fabs(in[0]-c->key[0]) < c->t1 &&
- fabs(in[1]-c->key[1]) < c->t2 &&
- fabs(in[2]-c->key[2]) < c->t3)
- {
- out[3]=0.0; /*make transparent*/
- }
-
- else { /*pixel is outside key color */
- out[3]=in[3]; /* make pixel just as transparent as it was before */
- }
-}
-
-static void node_composit_exec_color_matte(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
-{
- CompBuf *cbuf;
- CompBuf *colorbuf;
- NodeChroma *c;
-
- if(in[0]->hasinput==0) return;
- if(in[0]->data==NULL) return;
- if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return;
-
- cbuf= typecheck_compbuf(in[0]->data, CB_RGBA);
-
- colorbuf= dupalloc_compbuf(cbuf);
-
- c=node->storage;
-
- /*convert rgbbuf to hsv*/
- composit1_pixel_processor(node, colorbuf, cbuf, in[0]->vec, do_rgba_to_hsva, CB_RGBA);
-
- /*convert key to hsv*/
- do_rgba_to_hsva(node, c->key, in[1]->vec);
-
-
- /*per pixel color key*/
- composit1_pixel_processor(node, colorbuf, colorbuf, in[0]->vec, do_color_key, CB_RGBA);
-
- /*convert back*/
- composit1_pixel_processor(node, colorbuf, colorbuf, in[0]->vec, do_hsva_to_rgba, CB_RGBA);
-
- out[0]->data= colorbuf;
- if(out[1]->hasoutput)
- out[1]->data= valbuf_from_rgbabuf(colorbuf, CHAN_A);
-
- generate_preview(node, colorbuf);
-
- if(cbuf!=in[0]->data)
- free_compbuf(cbuf);
-};
-
-static void node_composit_init_color_matte(bNode *node)
-{
- NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node color");
- node->storage= c;
- c->t1= 0.01f;
- c->t2= 0.1f;
- c->t3= 0.1f;
- c->fsize= 0.0f;
- c->fstrength= 1.0f;
-};
-
-bNodeType cmp_node_color_matte={
- /* *next,*prev */ NULL, NULL,
- /* type code */ CMP_NODE_COLOR_MATTE,
- /* name */ "Color Key",
- /* width+range */ 200, 80, 300,
- /* class+opts */ NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS,
- /* input sock */ cmp_node_color_in,
- /* output sock */ cmp_node_color_out,
- /* storage */ "NodeChroma",
- /* execfunc */ node_composit_exec_color_matte,
- /* butfunc */ NULL,
- /* initfunc */ node_composit_init_color_matte,
- /* freestoragefunc */ node_free_standard_storage,
- /* copystoragefunc */ node_copy_standard_storage,
- /* id */ NULL
-};
-
-
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c
index 68a1bcd5471..ade2111f246 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c
@@ -22,7 +22,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): Bob Holcomb
+ * Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -31,8 +31,8 @@
/* ******************* 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},
+ {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},
{-1,0,""}
};
@@ -44,85 +44,157 @@ static bNodeSocketType cmp_node_diff_matte_out[]={
/* note, keyvals is passed on from caller as stack array */
/* might have been nicer as temp struct though... */
-static void do_diff_matte(bNode *node, float *colorbuf, float *imbuf1, float *imbuf2)
+static void do_diff_matte(bNode *node, float *colorbuf, float *inbuf, float *keyvals)
{
NodeChroma *c= (NodeChroma *)node->storage;
- float tolerence=c->t1;
- float falloff=c->t2;
- float difference;
- float alpha;
+ float *keymin= keyvals;
+ float *keymax= keyvals+3;
+ float *key= keyvals+6;
+ float tolerance= keyvals[9];
+ float distance, alpha;
- difference=fabs(imbuf2[0]-imbuf1[0])+
- fabs(imbuf2[1]-imbuf1[1])+
- fabs(imbuf2[2]-imbuf1[2]);
-
- /*average together the distances*/
- difference=difference/3.0;
-
- VECCOPY(colorbuf, imbuf1);
-
- /*make 100% transparent*/
- if(difference < tolerence){
- colorbuf[3]=0.0;
+ /*process the pixel if it is close to the key or already transparent*/
+ if(((colorbuf[0]>keymin[0] && colorbuf[0]<keymax[0]) &&
+ (colorbuf[1]>keymin[1] && colorbuf[1]<keymax[1]) &&
+ (colorbuf[2]>keymin[2] && colorbuf[2]<keymax[2])) || inbuf[3]<1.0f) {
+
+ /*true distance from key*/
+ distance= sqrt((colorbuf[0]-key[0])*(colorbuf[0]-key[0])+
+ (colorbuf[1]-key[1])*(colorbuf[1]-key[1])+
+ (colorbuf[2]-key[2])*(colorbuf[2]-key[2]));
+
+ /*is it less transparent than the prevous pixel*/
+ alpha= distance/tolerance;
+ if(alpha > inbuf[3]) alpha= inbuf[3];
+ if(alpha > c->fstrength) alpha= 0.0f;
+
+ /*clamp*/
+ if (alpha>1.0f) alpha=1.0f;
+ if (alpha<0.0f) alpha=0.0f;
+
+ /*premultiplied picture*/
+ colorbuf[3]= alpha;
}
- /*in the falloff region, make partially transparent */
- else if(difference < falloff+tolerence){
- difference=difference-tolerence;
- alpha=difference/falloff;
- /*only change if more transparent than before */
- if(alpha < imbuf1[3]) {
- colorbuf[3]=alpha;
- }
- else { /* leave as before */
- colorbuf[3]=imbuf1[3];
- }
- }
else {
/*foreground object*/
- colorbuf[3]= imbuf1[3];
+ colorbuf[3]= inbuf[3];
}
}
static void node_composit_exec_diff_matte(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- CompBuf *outbuf;
- CompBuf *imbuf1;
- CompBuf *imbuf2;
+ /*
+ Losely based on the Sequencer chroma key plug-in, but enhanced to work in other color spaces and
+ uses a differnt difference function (suggested in forums of vfxtalk.com).
+ */
+ CompBuf *workbuf;
+ CompBuf *inbuf;
NodeChroma *c;
+ float keyvals[10];
+ float *keymin= keyvals;
+ float *keymax= keyvals+3;
+ float *key= keyvals+6;
+ float *tolerance= keyvals+9;
+ float t[3];
/*is anything connected?*/
if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return;
/*must have an image imput*/
if(in[0]->data==NULL) return;
- if(in[1]->data==NULL) return;
- imbuf1=typecheck_compbuf(in[0]->data, CB_RGBA);
- imbuf2=typecheck_compbuf(in[1]->data, CB_RGBA);
+ inbuf=typecheck_compbuf(in[0]->data, CB_RGBA);
c=node->storage;
- outbuf=dupalloc_compbuf(imbuf1);
+ workbuf=dupalloc_compbuf(inbuf);
+
+ /*use the input color*/
+ key[0]= in[1]->vec[0];
+ key[1]= in[1]->vec[1];
+ key[2]= in[1]->vec[2];
+
+ /*get the tolerances from the UI*/
+ t[0]=c->t1;
+ t[1]=c->t2;
+ t[2]=c->t3;
+
+ /*convert to colorspace*/
+ switch(node->custom1) {
+ case 1: /*RGB*/
+ break;
+ case 2: /*HSV*/
+ /*convert the key (in place)*/
+ rgb_to_hsv(key[0], key[1], key[2], &key[0], &key[1], &key[2]);
+ composit1_pixel_processor(node, workbuf, inbuf, in[1]->vec, do_rgba_to_hsva, CB_RGBA);
+ break;
+ case 3: /*YUV*/
+ rgb_to_yuv(key[0], key[1], key[2], &key[0], &key[1], &key[2]);
+ composit1_pixel_processor(node, workbuf, inbuf, in[1]->vec, do_rgba_to_yuva, CB_RGBA);
+ break;
+ case 4: /*YCC*/
+ rgb_to_ycc(key[0], key[1], key[2], &key[0], &key[1], &key[2]);
+ composit1_pixel_processor(node, workbuf, inbuf, in[1]->vec, do_rgba_to_ycca, CB_RGBA);
+ /*account for ycc is on a 0..255 scale*/
+ t[0]= c->t1*255.0;
+ t[1]= c->t2*255.0;
+ t[2]= c->t3*255.0;
+ break;
+ default:
+ break;
+ }
+
+ /*find min/max tolerances*/
+ keymin[0]= key[0]-t[0];
+ keymin[1]= key[1]-t[1];
+ keymin[2]= key[2]-t[2];
+ keymax[0]= key[0]+t[0];
+ keymax[1]= key[1]+t[1];
+ keymax[2]= key[2]+t[2];
+
+ /*tolerance*/
+ *tolerance= sqrt((t[0])*(t[0])+
+ (t[1])*(t[1])+
+ (t[2])*(t[2]));
/* note, processor gets a keyvals array passed on as buffer constant */
- composit2_pixel_processor(node, outbuf, imbuf1, in[0]->vec, imbuf2, in[1]->vec, do_diff_matte, CB_RGBA, CB_RGBA);
+ composit2_pixel_processor(node, workbuf, workbuf, in[0]->vec, NULL, keyvals, do_diff_matte, CB_RGBA, CB_VAL);
- out[0]->data=outbuf;
+ /*convert back to RGB colorspace*/
+ switch(node->custom1) {
+ case 1: /*RGB*/
+ composit1_pixel_processor(node, workbuf, workbuf, in[1]->vec, do_copy_rgba, CB_RGBA);
+ break;
+ case 2: /*HSV*/
+ composit1_pixel_processor(node, workbuf, workbuf, in[1]->vec, do_hsva_to_rgba, CB_RGBA);
+ break;
+ case 3: /*YUV*/
+ composit1_pixel_processor(node, workbuf, workbuf, in[1]->vec, do_yuva_to_rgba, CB_RGBA);
+ break;
+ case 4: /*YCC*/
+ composit1_pixel_processor(node, workbuf, workbuf, in[1]->vec, do_ycca_to_rgba, CB_RGBA);
+ break;
+ default:
+ break;
+ }
+
+ out[0]->data=workbuf;
if(out[1]->hasoutput)
- out[1]->data=valbuf_from_rgbabuf(outbuf, CHAN_A);
- generate_preview(node, outbuf);
-
- if(imbuf1!=in[0]->data)
- free_compbuf(imbuf1);
+ out[1]->data=valbuf_from_rgbabuf(workbuf, CHAN_A);
+ generate_preview(node, workbuf);
- if(imbuf2!=in[1]->data)
- free_compbuf(imbuf2);
+ if(inbuf!=in[0]->data)
+ free_compbuf(inbuf);
}
static void node_composit_init_diff_matte(bNode *node)
{
NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
node->storage= c;
- c->t1= 0.1f;
- c->t2= 0.1f;
+ c->t1= 0.01f;
+ c->t2= 0.01f;
+ c->t3= 0.01f;
+ c->fsize= 0.0f;
+ c->fstrength= 0.0f;
+ node->custom1= 1; /* RGB */
}
bNodeType cmp_node_diff_matte={
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
deleted file mode 100644
index 921ac869cb8..00000000000
--- a/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * $Id: CMP_diffMatte.c 12931 2007-12-17 18:20:48Z theeth $
- *
- * ***** 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): Bob Holcomb
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include "../CMP_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},
- {-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},
- {-1,0,""}
-};
-
-/* note, keyvals is passed on from caller as stack array */
-/* might have been nicer as temp struct though... */
-static void do_distance_matte(bNode *node, float *out, float *in)
-{
- NodeChroma *c= (NodeChroma *)node->storage;
- float tolerence=c->t1;
- float falloff=c->t2;
- float distance;
- float alpha;
-
- distance=sqrt((c->key[0]-in[0])*(c->key[0]-in[0]) +
- (c->key[1]-in[1])*(c->key[1]-in[1]) +
- (c->key[2]-in[2])*(c->key[2]-in[2]));
-
- VECCOPY(out, in);
-
- /*make 100% transparent */
- if(distance < tolerence) {
- out[3]=0.0;
- }
- /*in the falloff region, make partially transparent */
- else if(distance < falloff+tolerence){
- distance=distance-tolerence;
- alpha=distance/falloff;
- /*only change if more transparent than before */
- if(alpha < in[3]) {
- out[3]=alpha;
- }
- else { /* leave as before */
- out[3]=in[3];
- }
- }
- else {
- out[3]=in[3];
- }
-}
-
-static void node_composit_exec_distance_matte(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
-{
- /*
- Losely based on the Sequencer chroma key plug-in, but enhanced to work in other color spaces and
- uses a differnt difference function (suggested in forums of vfxtalk.com).
- */
- CompBuf *workbuf;
- CompBuf *inbuf;
- NodeChroma *c;
-
- /*is anything connected?*/
- if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return;
- /*must have an image imput*/
- if(in[0]->data==NULL) return;
-
- inbuf=typecheck_compbuf(in[0]->data, CB_RGBA);
-
- c=node->storage;
- workbuf=dupalloc_compbuf(inbuf);
-
- /*use the input color*/
- c->key[0]= in[1]->vec[0];
- c->key[1]= in[1]->vec[1];
- c->key[2]= in[1]->vec[2];
-
- /* note, processor gets a keyvals array passed on as buffer constant */
- composit1_pixel_processor(node, workbuf, workbuf, in[0]->vec, do_distance_matte, CB_RGBA);
-
-
- out[0]->data=workbuf;
- if(out[1]->hasoutput)
- out[1]->data=valbuf_from_rgbabuf(workbuf, CHAN_A);
- generate_preview(node, workbuf);
-
- if(inbuf!=in[0]->data)
- free_compbuf(inbuf);
-}
-
-static void node_composit_init_distance_matte(bNode *node)
-{
- NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
- node->storage= c;
- c->t1= 0.1f;
- c->t2= 0.1f;
-}
-
-bNodeType cmp_node_distance_matte={
- /* *next,*prev */ NULL, NULL,
- /* type code */ CMP_NODE_DIST_MATTE,
- /* name */ "Distance Key",
- /* width+range */ 200, 80, 250,
- /* class+opts */ NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS,
- /* input sock */ cmp_node_distance_matte_in,
- /* output sock */ cmp_node_distance_matte_out,
- /* storage */ "NodeChroma",
- /* execfunc */ node_composit_exec_distance_matte,
- /* butfunc */ NULL,
- /* initfunc */ node_composit_init_distance_matte,
- /* freestoragefunc */ node_free_standard_storage,
- /* copystoragefunc */ node_copy_standard_storage,
- /* id */ NULL
-};
-
-
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_levels.c b/source/blender/nodes/intern/CMP_nodes/CMP_levels.c
deleted file mode 100644
index 414c535789e..00000000000
--- a/source/blender/nodes/intern/CMP_nodes/CMP_levels.c
+++ /dev/null
@@ -1,337 +0,0 @@
-/**
- * $Id: CMP_levels.c 12931 2007-12-17 18:20:48Z theeth $
- *
- * ***** 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): Bob Holcomb.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include "../CMP_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},
- { -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},
- {-1,0,""}
-};
-
-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)
-{
- float value[4];
- int ivalue;
- int x,y;
-
- /*fill bins */
- for(y=0; y<in->y; y++) {
- for(x=0; x<in->x; x++) {
-
- /* get the pixel */
- qd_getPixel(in, x, y, value);
-
- if(value[3] > 0.0) { /* don't count transparent pixels */
- switch(node->custom1) {
- case 1: { /* all colors */
- 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 */
- value[0]=value[0]*255; /* scale to 0-255 range */
- ivalue=(int)value[0];
- break;
- }
- case 3: { /* green channel */
- value[1]=value[1]*255; /* scale to 0-255 range */
- ivalue=(int)value[1];
- break;
- }
- case 4: /*blue channel */
- {
- value[2]=value[2]*255; /* scale to 0-255 range */
- ivalue=(int)value[2];
- break;
- }
- case 5: /* luminence */
- {
- rgb_to_yuv(value[0],value[1],value[2], &value[0], &value[1], &value[2]);
- value[0]=value[0]*255; /* scale to 0-255 range */
- ivalue=(int)value[0];
- break;
- }
- } /*end switch */
-
- /*clip*/
- if(ivalue<0) ivalue=0;
- if(ivalue>255) ivalue=255;
-
- /*put in the correct bin*/
- bins[ivalue]+=1;
- } /*end if alpha */
- }
- }
-}
-
-static float brightness_mean(bNode* node, CompBuf* in)
-{
- float sum=0.0;
- int numPixels=0.0;
- int x,y;
- float value[4];
-
- for(x=0; x< in->x; x++) {
- for(y=0; y < in->y; y++) {
-
- /* get the pixel */
- qd_getPixel(in, x, y, value);
-
- if(value[3] > 0.0) { /* don't count transparent pixels */
- numPixels++;
- switch(node->custom1)
- {
- case 1:
- {
- rgb_tobw(value[0],value[1],value[2], &value[0]);
- sum+=value[0];
- break;
- }
- case 2:
- {
- sum+=value[0];
- break;
- }
- case 3:
- {
- sum+=value[1];
- break;
- }
- case 4:
- {
- sum+=value[2];
- break;
- }
- case 5:
- {
- rgb_to_yuv(value[0],value[1],value[2], &value[0], &value[1], &value[2]);
- sum+=value[0];
- break;
- }
- }
- }
- }
- }
-
- return sum/numPixels;
-}
-
-static float brightness_standard_deviation(bNode* node, CompBuf* in, float mean)
-{
- float sum=0.0;
- int numPixels=0.0;
- int x,y;
- float value[4];
-
- for(x=0; x< in->x; x++) {
- for(y=0; y < in->y; y++) {
-
- /* get the pixel */
- qd_getPixel(in, x, y, value);
-
- if(value[3] > 0.0) { /* don't count transparent pixels */
- numPixels++;
- switch(node->custom1)
- {
- case 1:
- {
- rgb_tobw(value[0],value[1],value[2], &value[0]);
- sum+=(value[0]-mean)*(value[0]-mean);
- break;
- }
- case 2:
- {
- sum+=value[0];
- sum+=(value[0]-mean)*(value[0]-mean);
- break;
- }
- case 3:
- {
- sum+=value[1];
- sum+=(value[1]-mean)*(value[1]-mean);
- break;
- }
- case 4:
- {
- sum+=value[2];
- sum+=(value[2]-mean)*(value[2]-mean);
- break;
- }
- case 5:
- {
- rgb_to_yuv(value[0],value[1],value[2], &value[0], &value[1], &value[2]);
- sum+=(value[0]-mean)*(value[0]-mean);
- break;
- }
- }
- }
- }
- }
-
-
- return sqrt(sum/(float)(numPixels-1));
-}
-
-static void draw_histogram(bNode *node, CompBuf *out, int* bins)
-{
- int x,y;
- float color[4];
- float value;
- int max;
-
- /* find max value */
- max=0;
- for(x=0; x<256; x++) {
- if(bins[x]>max) max=bins[x];
- }
-
- /*draw histogram in buffer */
- for(x=0; x<out->x; x++) {
- for(y=0;y<out->y; y++) {
-
- /* get normalized value (0..255) */
- value=((float)bins[x]/(float)max)*255.0;
-
- if(y < (int)value) { /*if the y value is below the height of the bar for this line then draw with the color */
- switch (node->custom1) {
- case 1: { /* draw in black */
- color[0]=0.0; color[1]=0.0; color[2]=0.0; color[3]=1.0;
- break;
- }
- case 2: { /* draw in red */
- color[0]=1.0; color[1]=0.0; color[2]=0.0; color[3]=1.0;
- break;
- }
- case 3: { /* draw in green */
- color[0]=0.0; color[1]=1.0; color[2]=0.0; color[3]=1.0;
- break;
- }
- case 4: { /* draw in blue */
- color[0]=0.0; color[1]=0.0; color[2]=1.0; color[3]=1.0;
- break;
- }
- case 5: { /* draw in white */
- color[0]=1.0; color[1]=1.0; color[2]=1.0; color[3]=1.0;
- break;
- }
- }
- }
- else{
- color[0]=0.8; color[1]=0.8; color[2]=0.8; color[3]=1.0;
- }
-
- /* set the color */
- qd_setPixel(out, x, y, color);
- }
- }
-}
-
-static void node_composit_exec_view_levels(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
-{
- CompBuf* cbuf;
- CompBuf* histogram;
- float mean, std_dev;
- int bins[256];
- int x;
-
- if(in[0]->hasinput==0) return;
- if(in[0]->data==NULL) return;
-
- histogram=alloc_compbuf(256, 256, CB_RGBA, 1);
- cbuf=typecheck_compbuf(in[0]->data, CB_RGBA);
-
- /*initalize bins*/
- for(x=0; x<256; x++) {
- bins[x]=0;
- }
-
- /*fill bins */
- fill_bins(node, in[0]->data, bins);
-
- /* draw the histogram chart */
- draw_histogram(node, histogram, bins);
-
- /* calculate the average brightness and contrast */
- mean=brightness_mean(node, in[0]->data);
- std_dev=brightness_standard_deviation(node, in[0]->data, mean);
-
- /* Printf debuging ;)
- printf("Mean: %f\n", mean);
- printf("Std Dev: %f\n", std_dev);
- */
-
- if(out[0]->hasoutput)
- out[0]->vec[0]= mean;
- if(out[1]->hasoutput)
- out[1]->vec[0]= std_dev;
-
- generate_preview(node, histogram);
-
- if(cbuf!=in[0]->data)
- free_compbuf(cbuf);
- free_compbuf(histogram);
-}
-
-static void node_composit_init_view_levels(bNode* node)
-{
- node->custom1=1; /*All channels*/
-}
-
-bNodeType cmp_node_view_levels= {
- /* *next,*prev */ NULL, NULL,
- /* type code */ CMP_NODE_VIEW_LEVELS,
- /* name */ "Levels",
- /* widthrange */ 140, 100, 320,
- /* classopts */ NODE_CLASS_OUTPUT, NODE_OPTIONS|NODE_PREVIEW,
- /* input sock */ cmp_node_view_levels_in,
- /* output sock */ cmp_node_view_levels_out,
- /* storage */ "ImageUser",
- /* execfunc */ node_composit_exec_view_levels,
- /* butfunc */ NULL,
- /* initfunc */ node_composit_init_view_levels,
- /* freestoragefunc */ node_free_standard_storage,
- /* copystoragefunc */ node_copy_standard_storage,
- /* id */ NULL
-
-};
-
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c b/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c
index 350def76736..9aebd999b29 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c
@@ -22,7 +22,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): Bob Holcomb .
+ * Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*/
diff --git a/source/blender/nodes/intern/CMP_util.c b/source/blender/nodes/intern/CMP_util.c
index b396d5549d7..f9805645115 100644
--- a/source/blender/nodes/intern/CMP_util.c
+++ b/source/blender/nodes/intern/CMP_util.c
@@ -1104,23 +1104,9 @@ void qd_getPixel(CompBuf* src, int x, int y, float* col)
{
if ((x >= 0) && (x < src->x) && (y >= 0) && (y < src->y)) {
float* bc = &src->rect[(x + y*src->x)*src->type];
- switch(src->type){
- /* these fallthrough to get all the channels */
- case CB_RGBA: col[3]=bc[3];
- case CB_VEC3: col[2]=bc[2];
- case CB_VEC2: col[1]=bc[1];
- case CB_VAL: col[0]=bc[0];
- }
- }
- else {
- switch(src->type){
- /* these fallthrough to get all the channels */
- case CB_RGBA: col[3]=0.0;
- case CB_VEC3: col[2]=0.0;
- case CB_VEC2: col[1]=0.0;
- case CB_VAL: col[0]=0.0;
- }
+ col[0] = bc[0], col[1] = bc[1], col[2] = bc[2];
}
+ else col[0] = col[1] = col[2] = 0.f;
}
// sets pixel (x, y) to color col
@@ -1128,13 +1114,7 @@ void qd_setPixel(CompBuf* src, int x, int y, float* col)
{
if ((x >= 0) && (x < src->x) && (y >= 0) && (y < src->y)) {
float* bc = &src->rect[(x + y*src->x)*src->type];
- switch(src->type){
- /* these fallthrough to get all the channels */
- case CB_RGBA: bc[3]=col[3];
- case CB_VEC3: bc[2]=col[2];
- case CB_VEC2: bc[1]=col[1];
- case CB_VAL: bc[0]=col[0];
- }
+ bc[0] = col[0], bc[1] = col[1], bc[2] = col[2];
}
}
diff --git a/source/blender/nodes/intern/CMP_util.h b/source/blender/nodes/intern/CMP_util.h
index 2a2dc97ed73..19e41f5c118 100644
--- a/source/blender/nodes/intern/CMP_util.h
+++ b/source/blender/nodes/intern/CMP_util.h
@@ -168,7 +168,7 @@ typedef float fRGB[4];
/* clear color */
#define fRGB_clear(c) { c[0]=c[1]=c[2]=0.f; }
/* copy c2 to c1 */
-#define fRGB_copy(c1, c2) { c1[0]=c2[0]; c1[1]=c2[1]; c1[2]=c2[2]; c1[3]=c2[3]; }
+#define fRGB_copy(c1, c2) { c1[0]=c2[0]; c1[1]=c2[1]; c1[2]=c2[2]; }
/* add c2 to c1 */
#define fRGB_add(c1, c2) { c1[0]+=c2[0]; c1[1]+=c2[1]; c1[2]+=c2[2]; }
/* subtract c2 from c1 */
@@ -186,8 +186,7 @@ typedef float fRGB[4];
/* swap colors c1 & c2 */
#define fRGB_swap(c1, c2) { float _t=c1[0]; c1[0]=c2[0]; c2[0]=_t;\
_t=c1[1]; c1[1]=c2[1]; c2[1]=_t;\
- _t=c1[2]; c1[2]=c2[2]; c2[2]=_t;\
- _t=c1[3]; c1[3]=c2[3]; c3[3]=_t;}
+ _t=c1[2]; c1[2]=c2[2]; c2[2]=_t; }
void qd_getPixel(CompBuf* src, int x, int y, float* col);
void qd_setPixel(CompBuf* src, int x, int y, float* col);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c b/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c
index bdf5a1ce079..0fd95642be6 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c
@@ -27,7 +27,7 @@
*/
#include <math.h>
-
+#include "MTC_vectorops.h"
#include "../TEX_util.h"
static bNodeSocketType inputs[]= {
@@ -65,19 +65,19 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
if(magsq == 0) magsq = 1;
- ndx = Inpf(coord, ax);
+ ndx = MTC_dot3Float(coord, ax);
para[0] = ax[0] * ndx * (1 - cos_a);
para[1] = ax[1] * ndx * (1 - cos_a);
para[2] = ax[2] * ndx * (1 - cos_a);
- VecSubf(perp, coord, para);
+ MTC_diff3Float(perp, coord, para);
perp[0] = coord[0] * cos_a;
perp[1] = coord[1] * cos_a;
perp[2] = coord[2] * cos_a;
- Crossf(cp, ax, coord);
+ MTC_cross3Float(cp, ax, coord);
cp[0] = cp[0] * sin_a;
cp[1] = cp[1] * sin_a;
diff --git a/source/blender/nodes/intern/TEX_util.c b/source/blender/nodes/intern/TEX_util.c
index 2c21627dad9..a6a5877722b 100644
--- a/source/blender/nodes/intern/TEX_util.c
+++ b/source/blender/nodes/intern/TEX_util.c
@@ -47,8 +47,6 @@
#define PREV_RES 128 /* default preview resolution */
-int preview_flag = 0;
-
void tex_call_delegate(TexDelegate *dg, float *out, TexParams *params, short thread)
{
if(dg->node->need_exec)
@@ -110,6 +108,12 @@ static void init_preview(bNode *node)
if(node->preview==NULL)
node->preview= MEM_callocN(sizeof(bNodePreview), "node preview");
+ if(node->preview->rect)
+ if(node->preview->xsize!=xsize && node->preview->ysize!=ysize) {
+ MEM_freeN(node->preview->rect);
+ node->preview->rect= NULL;
+ }
+
if(node->preview->rect==NULL) {
node->preview->rect= MEM_callocN(4*xsize + xsize*ysize*sizeof(float)*4, "node preview rect");
node->preview->xsize= xsize;
@@ -132,8 +136,6 @@ void tex_do_preview(bNode *node, bNodeStack *ns, TexCallData *cdata)
bNodePreview *preview;
float coord[3] = {0, 0, 0};
TexParams params;
- int resolution;
- int xsize, ysize;
if(!cdata->do_preview)
return;
@@ -144,23 +146,19 @@ void tex_do_preview(bNode *node, bNodeStack *ns, TexCallData *cdata)
init_preview(node);
preview = node->preview;
- xsize = preview->xsize;
- ysize = preview->ysize;
params.dxt = 0;
params.dyt = 0;
params.cfra = cdata->cfra;
params.coord = coord;
- resolution = (xsize < ysize) ? xsize : ysize;
-
- for(x=0; x<xsize; x++)
- for(y=0; y<ysize; y++)
+ for(x=0; x<preview->xsize; x++)
+ for(y=0; y<preview->ysize; y++)
{
- params.coord[0] = ((float) x / resolution) * 2 - 1;
- params.coord[1] = ((float) y / resolution) * 2 - 1;
+ params.coord[0] = ((float) x / preview->xsize) * 2 - 1;
+ params.coord[1] = ((float) y / preview->ysize) * 2 - 1;
- result = preview->rect + 4 * (xsize*y + x);
+ result = preview->rect + 4 * (preview->xsize*y + x);
tex_input_rgba(result, ns, &params, cdata->thread);
}
@@ -214,6 +212,7 @@ void ntreeTexExecTree(
TexResult *texres,
float *coord,
float *dxt, float *dyt,
+ char do_preview,
short thread,
Tex *tex,
short which_output,
@@ -231,19 +230,28 @@ void ntreeTexExecTree(
data.dxt = dxt;
data.dyt = dyt;
data.target = texres;
- data.do_preview = preview_flag;
+ data.do_preview = do_preview;
data.thread = thread;
data.which_output = which_output;
data.cfra= cfra;
- preview_flag = 0;
-
ntreeExecTree(nodes, &data, thread);
}
-void ntreeTexSetPreviewFlag(int doit)
+void ntreeTexUpdatePreviews(bNodeTree* nodetree)
{
- preview_flag = doit;
+ Tex *tex;
+ float coord[] = {0,0,0};
+ TexResult dummy_texres;
+
+ for(tex= G.main->tex.first; tex; tex= tex->id.next)
+ if(tex->nodetree == nodetree) break;
+ if(tex) {
+ dummy_texres.nor = 0;
+
+ ntreeBeginExecTree(nodetree);
+ ntreeTexExecTree(nodetree, &dummy_texres, coord, 0, 0, 1, 0, tex, 0, 0);
+ }
}
char* ntreeTexOutputMenu(bNodeTree *ntree)
diff --git a/source/blender/nodes/intern/TEX_util.h b/source/blender/nodes/intern/TEX_util.h
index 87a9cf288d6..7fff8d04651 100644
--- a/source/blender/nodes/intern/TEX_util.h
+++ b/source/blender/nodes/intern/TEX_util.h
@@ -102,7 +102,8 @@ float tex_input_value(bNodeStack *in, TexParams *params, short thread);
void tex_output(bNode *node, bNodeStack **in, bNodeStack *out, TexFn texfn);
void tex_do_preview(bNode *node, bNodeStack *ns, TexCallData *cdata);
-void ntreeTexExecTree(bNodeTree *nodes, TexResult *texres, float *coord, float *dxt, float *dyt, short thread, struct Tex *tex, short which_output, int cfra);
+void ntreeTexUpdatePreviews( bNodeTree* nodetree );
+void ntreeTexExecTree(bNodeTree *nodes, TexResult *texres, float *coord, float *dxt, float *dyt, char do_preview, short thread, struct Tex *tex, short which_output, int cfra);
void params_from_cdata(TexParams *out, TexCallData *in);
diff --git a/source/blender/python/CMakeLists.txt b/source/blender/python/CMakeLists.txt
index 7abec566505..7700e6bc2aa 100644
--- a/source/blender/python/CMakeLists.txt
+++ b/source/blender/python/CMakeLists.txt
@@ -27,23 +27,23 @@ FILE(GLOB SRC intern/*.c)
FILE(GLOB GENSRC generic/*.c)
SET(INC
- . ../../../intern/guardedalloc ../blenlib ../makesdna ../makesrna
- ../blenkernel ../editors/include ../windowmanager ${PYTHON_INC}
- ../../../extern/glew/include
+ . ../../../intern/guardedalloc ../blenlib ../makesdna ../makesrna
+ ../blenkernel ../editors/include ../windowmanager ${PYTHON_INC}
+ ../../../extern/glew/include
)
IF(WITH_OPENEXR)
- ADD_DEFINITIONS(-DWITH_OPENEXR)
+ ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
IF(WITH_QUICKTIME)
- SET(INC ${INC} ${QUICKTIME_INC})
- ADD_DEFINITIONS(-DWITH_QUICKTIME)
+ SET(INC ${INC} ${QUICKTIME_INC})
+ ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
IF(WITH_FFMPEG)
- SET(INC ${INC} ${FFMPEG_INC})
- ADD_DEFINITIONS(-DWITH_FFMPEG)
+ SET(INC ${INC} ${FFMPEG_INC})
+ ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
ADD_DEFINITIONS(-DWITH_CCGSUBSURF)
diff --git a/source/blender/python/SConscript b/source/blender/python/SConscript
index ca742a3646a..d44cf762a0f 100644
--- a/source/blender/python/SConscript
+++ b/source/blender/python/SConscript
@@ -13,9 +13,9 @@ defs = []
if env['OURPLATFORM'] in ('win32-mingw', 'win32-vc','win64-vc') and env['BF_DEBUG']:
defs.append('_DEBUG')
-env.BlenderLib( libname = 'bf_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core','player'], priority = [361,160])
+env.BlenderLib( libname = 'bf_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core'], priority = [140])
# generic
sources = env.Glob('generic/*.c')
-env.BlenderLib( libname = 'bf_gen_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core','player'], priority = [362,165]) # ketsji is 360
+env.BlenderLib( libname = 'bf_gen_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core'], priority = [361]) # ketsji is 360
diff --git a/source/blender/python/epy_doc_gen.py b/source/blender/python/epy_doc_gen.py
index c2ef6bbc0d0..6a515648340 100644
--- a/source/blender/python/epy_doc_gen.py
+++ b/source/blender/python/epy_doc_gen.py
@@ -37,94 +37,6 @@ Generate html docs by running...
# if you dont have graphvis installed ommit the --graph arg.
-# GLOBALS['BASEDIR'] = './source/blender/python/doc'
-
-import os
-
-SUBMODULES = {}
-INIT_SUBMODULES = {} # store initialized files
-
-INIT_SUBMODULES_IMPORTS = {} # dont import the same module twice
-
-def append_package(package_path, mod_name):
-
- init_path = os.path.join(os.path.dirname(package_path), "__init__.py")
-
- # avoid double ups
- if mod_name:
- imports = INIT_SUBMODULES_IMPORTS.setdefault(init_path, [])
- if mod_name in imports:
- return
- imports.append(mod_name)
-
- try:
- os.makedirs(os.path.dirname(init_path)) # make the dirs if they are not there
- except:
- pass
-
- # Open the new file for the first time, otherwise keep it open.
- f = INIT_SUBMODULES.get(init_path)
- if f == None:
- f = INIT_SUBMODULES[init_path] = open(init_path, 'w')
-
- if mod_name:
- f.write("import %s\n" % mod_name)
-
- return f
-
-def append_package_recursive(package_path, BASEPATH):
- '''
- assume the last item of package_path will be a file (not a dir thats created)
- '''
-
- package_path = os.path.splitext(package_path)[0] # incase of .py
-
- try:
- os.makedirs(os.path.join(BASEPATH, os.path.dirname(package_path))) # make the dirs if they are not there
- except:
- pass
-
- new_path = BASEPATH
-
- for mod_name in package_path.split(os.sep):
- init_path = os.path.join(new_path, "__init__.py")
- new_path = os.path.join(new_path, mod_name)
- append_package(init_path, mod_name)
-
-
-def open_submodule(subpath, BASEPATH):
- '''
- This is a utility function that lets us quickly add submodules
- '''
-
- # create all the package paths leading up to this module
- append_package_recursive(subpath, BASEPATH)
-
- module_name = os.path.basename( os.path.splitext(subpath)[0] )
- mod_path = os.path.join(BASEPATH, subpath)
-
- # Open the new file for the first time, otherwise keep it open.
- f = SUBMODULES.get(mod_path)
- if f == None:
- f = SUBMODULES[mod_path] = open(mod_path, 'w')
-
- f = open(mod_path, 'w')
- return f
-
-def close_all():
- for files in (INIT_SUBMODULES.values(), SUBMODULES.values()):
- for f in files:
- if f.name.endswith('.py'):
- f_name = f.name
- f.close()
-
- f = open(f_name, 'a')
- f.write("\ndel __package__\n") # annoying, no need do show this
-
-
- f.close()
-
-
def range_str(val):
if val < -10000000: return '-inf'
if val > 10000000: return 'inf'
@@ -147,19 +59,6 @@ def full_rna_struct_path(rna_struct):
else:
return rna_struct.identifier
-def rna_id_ignore(rna_id):
- if rna_id == "rna_type":
- return True
-
- if "_OT_" in rna_id:
- return True
- if "_MT_" in rna_id:
- return True
- if "_PT_" in rna_id:
- return True
-
- return False
-
def write_func(rna, ident, out, func_type):
# Keyword attributes
kw_args = [] # "foo = 1", "bar=0.5", "spam='ENUM'"
@@ -169,7 +68,7 @@ def write_func(rna, ident, out, func_type):
# Operators and functions work differently
if func_type=='OPERATOR':
- rna_func_name = rna_struct.identifier.split("_OT_")[-1]
+ rna_func_name = rna_struct.identifier
rna_func_desc = rna_struct.description.strip()
items = rna_struct.properties.items()
else:
@@ -179,7 +78,7 @@ def write_func(rna, ident, out, func_type):
for rna_prop_identifier, rna_prop in items:
- if rna_id_ignore(rna_prop_identifier):
+ if rna_prop_identifier=='rna_type':
continue
# clear vars
@@ -297,7 +196,7 @@ def write_func(rna, ident, out, func_type):
-def rna2epy(BASEPATH):
+def rna2epy(target_path):
# Use for faster lookups
# use rna_struct.identifier as the key for each dict
@@ -356,7 +255,7 @@ def rna2epy(BASEPATH):
for rna_prop_identifier, rna_prop in rna_struct.properties.items():
if rna_prop_identifier=='RNA': continue
- if rna_id_ignore(rna_prop_identifier): continue
+ if rna_prop_identifier=='rna_type': continue
if rna_prop_identifier in rna_base_prop_keys: continue # does this prop exist in our parent class, if so skip
rna_desc = rna_prop.description.strip()
@@ -421,10 +320,7 @@ def rna2epy(BASEPATH):
for child in rna_children_dict[identifier]:
write_struct(child, ident + '\t')
-
-
- # out = open(target_path, 'w')
- out = open_submodule("types.py", BASEPATH) # bpy.types
+ out = open(target_path, 'w')
def base_id(rna_struct):
try: return rna_struct.base.identifier
@@ -447,23 +343,21 @@ def rna2epy(BASEPATH):
#if not rna_type_name.startswith('__'):
identifier = rna_struct.identifier
+ structs.append( (base_id(rna_struct), identifier, rna_struct) )
- if not rna_id_ignore(identifier):
- structs.append( (base_id(rna_struct), identifier, rna_struct) )
-
- # Simple lookup
- rna_struct_dict[identifier] = rna_struct
-
- # Store full rna path 'GameObjectSettings' -> 'Object.GameObjectSettings'
- rna_full_path_dict[identifier] = full_rna_struct_path(rna_struct)
-
- # Store a list of functions, remove inherited later
- rna_functions_dict[identifier]= list(rna_struct.functions)
-
-
- # fill in these later
- rna_children_dict[identifier]= []
- rna_references_dict[identifier]= []
+ # Simple lookup
+ rna_struct_dict[identifier] = rna_struct
+
+ # Store full rna path 'GameObjectSettings' -> 'Object.GameObjectSettings'
+ rna_full_path_dict[identifier] = full_rna_struct_path(rna_struct)
+
+ # Store a list of functions, remove inherited later
+ rna_functions_dict[identifier]= list(rna_struct.functions)
+
+
+ # fill in these later
+ rna_children_dict[identifier]= []
+ rna_references_dict[identifier]= []
else:
@@ -523,7 +417,7 @@ def rna2epy(BASEPATH):
for rna_prop_identifier, rna_prop in rna_struct.properties.items():
if rna_prop_identifier=='RNA': continue
- if rna_id_ignore(rna_prop_identifier): continue
+ if rna_prop_identifier=='rna_type': continue
if rna_prop_identifier in rna_base_prop_keys: continue
try: rna_prop_ptr = rna_prop.fixed_type
@@ -537,7 +431,7 @@ def rna2epy(BASEPATH):
for rna_prop_identifier, rna_prop in rna_func.parameters.items():
if rna_prop_identifier=='RNA': continue
- if rna_id_ignore(rna_prop_identifier): continue
+ if rna_prop_identifier=='rna_type': continue
if rna_prop_identifier in rna_base_func_keys: continue
@@ -582,7 +476,6 @@ def rna2epy(BASEPATH):
# # We could also just run....
# os.system('epydoc source/blender/python/doc/rna.py -o ./source/blender/python/doc/html -v')
- target_path = os.path.join(BASEPATH, "dump.py") # XXX - used for other funcs
# Write graphviz
out= open(target_path.replace('.py', '.dot'), 'w')
@@ -653,8 +546,8 @@ def rna2epy(BASEPATH):
out.write('%s\n' % w)
-def op2epy(BASEPATH):
- # out = open(target_path, 'w')
+def op2epy(target_path):
+ out = open(target_path, 'w')
op_mods = dir(bpy.ops)
op_mods.remove('add')
@@ -663,73 +556,26 @@ def op2epy(BASEPATH):
for op_mod_name in sorted(op_mods):
if op_mod_name.startswith('__'):
continue
-
- # open the submodule
- mod_path = os.path.join("ops", op_mod_name + ".py")
- out = open_submodule(mod_path, BASEPATH)
-
op_mod = getattr(bpy.ops, op_mod_name)
+
operators = dir(op_mod)
for op in sorted(operators):
# rna = getattr(bpy.types, op).__rna__
rna = getattr(op_mod, op).get_rna()
write_func(rna, '', out, 'OPERATOR')
-
- out.write('\n')
- out.close()
-
-def misc2epy(BASEPATH):
- '''
- Hard coded modules, try to avoid adding stuff here
- '''
- f = append_package(os.path.join(BASEPATH, ""), ""); # add a slash on the end of the base path
- f.write('''
-"""
-@type data: L{bpy.types.Main}
-@var data: blender data is accessed from here
-"""
-''')
-
- f = open_submodule("props.py", BASEPATH)
- f.write('''
-MAX_INT= 2**31
-MAX_FLOAT= 1e+37
-def BoolProperty(attr, name="", description="", default=False):
- """
- return a new bool property
- """
-def IntProperty(attr, name="", description="", min=-MAX_INT, max=MAX_INT, soft_min=-MAX_INT, soft_max=MAX_INT, default=0):
- """
- return a new int property
- """
-def FloatProperty(attr, name="", description="", min=-MAX_FLOAT, max=MAX_FLOAT, soft_min=-MAX_FLOAT, soft_max=MAX_FLOAT, default=0.0):
- """
- return a new float property
- """
-def StringProperty(attr, name="", description="", maxlen=0, default=""):
- """
- return a new string property
- """
-def EnumProperty(attr, items, name="", description="", default=""):
- """
- return a new enum property
- """
-''')
-
+ out.write('\n')
+ out.close()
if __name__ == '__main__':
if 'bpy' not in dir():
print("\nError, this script must run from inside blender2.5")
print(script_help_msg)
+
else:
- misc2epy('source/blender/python/doc/bpy') # first to write in info in some of the modules.
- rna2epy('source/blender/python/doc/bpy')
- op2epy('source/blender/python/doc/bpy')
-
-
- close_all()
+ rna2epy('source/blender/python/doc/rna.py')
+ op2epy('source/blender/python/doc/bpyoperator.py')
import sys
sys.exit()
diff --git a/source/blender/python/generic/bpy_internal_import.h b/source/blender/python/generic/bpy_internal_import.h
index 4e761fe8da0..c93d930dab0 100644
--- a/source/blender/python/generic/bpy_internal_import.h
+++ b/source/blender/python/generic/bpy_internal_import.h
@@ -31,15 +31,6 @@
#ifndef EXPP_bpy_import_h
#define EXPP_bpy_import_h
-/* python redefines :/ */
-#ifdef _POSIX_C_SOURCE
-#undef _POSIX_C_SOURCE
-#endif
-
-#ifdef _XOPEN_SOURCE
-#undef _XOPEN_SOURCE
-#endif
-
#include <Python.h>
#include "compile.h" /* for the PyCodeObject */
#include "eval.h" /* for PyEval_EvalCode */
diff --git a/source/blender/python/generic/matrix.c b/source/blender/python/generic/matrix.c
index edb6fb7af63..be3e704460a 100644
--- a/source/blender/python/generic/matrix.c
+++ b/source/blender/python/generic/matrix.c
@@ -598,18 +598,18 @@ static PyObject *Matrix_repr(MatrixObject * self)
return NULL;
BLI_strncpy(str,"",1024);
- for(x = 0; x < self->colSize; x++){
+ for(x = 0; x < self->rowSize; x++){
sprintf(buffer, "[");
strcat(str,buffer);
- for(y = 0; y < (self->rowSize - 1); y++) {
- sprintf(buffer, "%.6f, ", self->matrix[y][x]);
+ for(y = 0; y < (self->colSize - 1); y++) {
+ sprintf(buffer, "%.6f, ", self->matrix[x][y]);
strcat(str,buffer);
}
- if(x < (self->colSize-1)){
- sprintf(buffer, "%.6f](matrix [row %d])\n", self->matrix[y][x], x);
+ if(x < (self->rowSize-1)){
+ sprintf(buffer, "%.6f](matrix [row %d])\n", self->matrix[x][y], x);
strcat(str,buffer);
}else{
- sprintf(buffer, "%.6f](matrix [row %d])", self->matrix[y][x], x);
+ sprintf(buffer, "%.6f](matrix [row %d])", self->matrix[x][y], x);
strcat(str,buffer);
}
}
@@ -703,7 +703,7 @@ static int Matrix_ass_item(MatrixObject * self, int i, PyObject * ob)
return -1;
if(i >= self->rowSize || i < 0){
- PyErr_SetString(PyExc_TypeError, "matrix[attribute] = x: bad column\n");
+ PyErr_SetString(PyExc_TypeError, "matrix[attribute] = x: bad row\n");
return -1;
}
@@ -933,21 +933,21 @@ static PyObject *Matrix_mul(PyObject * m1, PyObject * m2)
}
if(mat1 && mat2) { /*MATRIX * MATRIX*/
- if(mat1->rowSize != mat2->colSize){
+ if(mat1->colSize != mat2->rowSize){
PyErr_SetString(PyExc_AttributeError,"Matrix multiplication: matrix A rowsize must equal matrix B colsize");
return NULL;
}
- for(x = 0; x < mat2->rowSize; x++) {
- for(y = 0; y < mat1->colSize; y++) {
- for(z = 0; z < mat1->rowSize; z++) {
- dot += (mat1->matrix[z][y] * mat2->matrix[x][z]);
+ for(x = 0; x < mat1->rowSize; x++) {
+ for(y = 0; y < mat2->colSize; y++) {
+ for(z = 0; z < mat1->colSize; z++) {
+ dot += (mat1->matrix[x][z] * mat2->matrix[z][y]);
}
- mat[((x * mat1->colSize) + y)] = (float)dot;
+ mat[((x * mat1->rowSize) + y)] = (float)dot;
dot = 0.0f;
}
}
- return newMatrixObject(mat, mat2->rowSize, mat1->colSize, Py_NEW, NULL);
+ return newMatrixObject(mat, mat1->rowSize, mat2->colSize, Py_NEW, NULL);
}
if(mat1==NULL){
@@ -1288,9 +1288,9 @@ PyObject *newMatrixObject_cb(PyObject *cb_user, int rowSize, int colSize, int cb
//----------------column_vector_multiplication (internal)---------
//COLUMN VECTOR Multiplication (Matrix X Vector)
-// [1][4][7] [a]
-// [2][5][8] * [b]
-// [3][6][9] [c]
+// [1][2][3] [a]
+// [4][5][6] * [b]
+// [7][8][9] [c]
//vector/matrix multiplication IS NOT COMMUTATIVE!!!!
static PyObject *column_vector_multiplication(MatrixObject * mat, VectorObject* vec)
{
@@ -1312,12 +1312,11 @@ static PyObject *column_vector_multiplication(MatrixObject * mat, VectorObject*
for(x = 0; x < vec->size; x++){
vecCopy[x] = vec->vec[x];
- }
- vecNew[3] = 1.0f;
+ }
- for(x = 0; x < mat->colSize; z++) {
- for(y = 0; y < mat->rowSize; y++) {
- dot += mat->matrix[y][x] * vecCopy[y];
+ for(x = 0; x < mat->rowSize; x++) {
+ for(y = 0; y < mat->colSize; y++) {
+ dot += mat->matrix[x][y] * vecCopy[y];
}
vecNew[z++] = (float)dot;
dot = 0.0f;
diff --git a/source/blender/python/generic/vector.c b/source/blender/python/generic/vector.c
index 605f45be128..923c4bbe58a 100644
--- a/source/blender/python/generic/vector.c
+++ b/source/blender/python/generic/vector.c
@@ -168,7 +168,7 @@ static PyObject *Vector_Resize2D(VectorObject * self)
return NULL;
}
if(self->cb_user) {
- PyErr_SetString(PyExc_TypeError, "vector.resize2d(): cannot resize a vector that has an owner");
+ PyErr_SetString(PyExc_TypeError, "vector.resize4d(): cannot resize a vector that has an owner");
return NULL;
}
@@ -191,7 +191,7 @@ static PyObject *Vector_Resize3D(VectorObject * self)
return NULL;
}
if(self->cb_user) {
- PyErr_SetString(PyExc_TypeError, "vector.resize3d(): cannot resize a vector that has an owner");
+ PyErr_SetString(PyExc_TypeError, "vector.resize4d(): cannot resize a vector that has an owner");
return NULL;
}
@@ -354,12 +354,18 @@ static PyObject *Vector_ToTrackQuat( VectorObject * self, PyObject * args )
/*----------------------------Vector.reflect(mirror) ----------------------
return a reflected vector on the mirror normal
- vec - ((2 * DotVecs(vec, mirror)) * mirror)
-*/
+ ((2 * DotVecs(vec, mirror)) * mirror) - vec
+ using arithb.c would be nice here */
static PyObject *Vector_Reflect( VectorObject * self, VectorObject * value )
{
- float mirror[3], vec[3];
- float reflect[3] = {0.0f, 0.0f, 0.0f};
+ float mirror[3];
+ float vec[3];
+ float reflect[4] = {0.0f, 0.0f, 0.0f, 0.0f};
+ float dot2;
+
+ /* for normalizing */
+ int i;
+ float norm = 0.0f;
if (!VectorObject_Check(value)) {
PyErr_SetString( PyExc_TypeError, "vec.reflect(value): expected a vector argument" );
@@ -374,12 +380,26 @@ static PyObject *Vector_Reflect( VectorObject * self, VectorObject * value )
if (value->size > 2) mirror[2] = value->vec[2];
else mirror[2] = 0.0;
+ /* normalize, whos idea was it not to use arithb.c? :-/ */
+ for(i = 0; i < 3; i++) {
+ norm += mirror[i] * mirror[i];
+ }
+ norm = (float) sqrt(norm);
+ for(i = 0; i < 3; i++) {
+ mirror[i] /= norm;
+ }
+ /* done */
+
vec[0] = self->vec[0];
vec[1] = self->vec[1];
if (self->size > 2) vec[2] = self->vec[2];
else vec[2] = 0.0;
- VecReflect(reflect, vec, mirror);
+ dot2 = 2 * vec[0]*mirror[0]+vec[1]*mirror[1]+vec[2]*mirror[2];
+
+ reflect[0] = (dot2 * mirror[0]) - vec[0];
+ reflect[1] = (dot2 * mirror[1]) - vec[1];
+ reflect[2] = (dot2 * mirror[2]) - vec[2];
return newVectorObject(reflect, self->size, Py_NEW, NULL);
}
@@ -1935,9 +1955,9 @@ PyObject *newVectorObject_cb(PyObject *cb_user, int size, int cb_type, int cb_su
//-----------------row_vector_multiplication (internal)-----------
//ROW VECTOR Multiplication - Vector X Matrix
-//[x][y][z] * [1][4][7]
-// [2][5][8]
-// [3][6][9]
+//[x][y][z] * [1][2][3]
+// [4][5][6]
+// [7][8][9]
//vector/matrix multiplication IS NOT COMMUTATIVE!!!!
static PyObject *row_vector_multiplication(VectorObject* vec, MatrixObject * mat)
{
@@ -1946,7 +1966,7 @@ static PyObject *row_vector_multiplication(VectorObject* vec, MatrixObject * mat
int x, y, z = 0, vec_size = vec->size;
if(mat->colSize != vec_size){
- if(mat->colSize == 4 && vec_size != 3){
+ if(mat->rowSize == 4 && vec_size != 3){
PyErr_SetString(PyExc_AttributeError, "vector * matrix: matrix column size and the vector size must be the same");
return NULL;
}else{
@@ -1960,11 +1980,11 @@ static PyObject *row_vector_multiplication(VectorObject* vec, MatrixObject * mat
for(x = 0; x < vec_size; x++){
vecCopy[x] = vec->vec[x];
}
- vecNew[3] = 1.0f;
+
//muliplication
- for(x = 0; x < mat->rowSize; x++) {
- for(y = 0; y < mat->colSize; y++) {
- dot += mat->matrix[x][y] * vecCopy[y];
+ for(x = 0; x < mat->colSize; x++) {
+ for(y = 0; y < mat->rowSize; y++) {
+ dot += mat->matrix[y][x] * vecCopy[y];
}
vecNew[z++] = (float)dot;
dot = 0.0f;
diff --git a/source/blender/python/intern/bpy_array.c b/source/blender/python/intern/bpy_array.c
deleted file mode 100644
index 4459c7c313f..00000000000
--- a/source/blender/python/intern/bpy_array.c
+++ /dev/null
@@ -1,515 +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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * Contributor(s): Arystanbek Dyussenov
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include "Python.h"
-
-#include "bpy_rna.h"
-
-#include "RNA_access.h"
-
-#include "BLI_string.h"
-
-#include "BKE_global.h"
-
-#include "MEM_guardedalloc.h"
-
-#define MAX_ARRAY_DIMENSION 10
-
-typedef void (*ItemConvertFunc)(PyObject *, char *);
-typedef int (*ItemTypeCheckFunc)(PyObject *);
-typedef void (*RNA_SetArrayFunc)(PointerRNA *, PropertyRNA *, const char *);
-typedef void (*RNA_SetIndexFunc)(PointerRNA *, PropertyRNA *, int index, void *);
-
-/*
- arr[3][4][5]
- 0 1 2 <- dimension index
-*/
-
-/*
- arr[2] = x
-
- py_to_array_index(arraydim=0, arrayoffset=0, index=2)
- validate_array(lvalue_dim=0)
- ... make real index ...
-*/
-
-/* arr[3]=x, self->arraydim is 0, lvalue_dim is 1 */
-/* Ensures that a python sequence has expected number of items/sub-items and items are of desired type. */
-static int validate_array_type(PyObject *seq, int dim, int totdim, int dimsize[],
- ItemTypeCheckFunc check_item_type, const char *item_type_str, const char *error_prefix)
-{
- int i;
-
- /* not the last dimension */
- if (dim + 1 < totdim) {
- /* check that a sequence contains dimsize[dim] items */
-
- for (i= 0; i < PySequence_Length(seq); i++) {
- PyObject *item;
- int ok= 1;
- item= PySequence_GetItem(seq, i);
-
- if (!PySequence_Check(item)) {
- /* BLI_snprintf(error_str, error_str_size, "expected a sequence of %s", item_type_str); */
- PyErr_Format(PyExc_TypeError, "%s expected a sequence of %s", error_prefix, item_type_str);
- ok= 0;
- }
- /* arr[3][4][5]
- dimsize[1]=4
- dimsize[2]=5
-
- dim=0 */
- else if (PySequence_Length(item) != dimsize[dim + 1]) {
- /* BLI_snprintf(error_str, error_str_size, "sequences of dimension %d should contain %d items", (int)dim + 1, (int)dimsize[dim + 1]); */
- PyErr_Format(PyExc_ValueError, "%s sequences of dimension %d should contain %d items", error_prefix, (int)dim + 1, (int)dimsize[dim + 1]);
- ok= 0;
- }
- else if (!validate_array_type(item, dim + 1, totdim, dimsize, check_item_type, item_type_str, error_prefix)) {
- ok= 0;
- }
-
- Py_DECREF(item);
-
- if (!ok)
- return 0;
- }
- }
- else {
- /* check that items are of correct type */
- for (i= 0; i < PySequence_Length(seq); i++) {
- PyObject *item= PySequence_GetItem(seq, i);
-
- if (!check_item_type(item)) {
- Py_DECREF(item);
-
- /* BLI_snprintf(error_str, error_str_size, "sequence items should be of type %s", item_type_str); */
- PyErr_Format(PyExc_TypeError, "sequence items should be of type %s", item_type_str);
- return 0;
- }
-
- Py_DECREF(item);
- }
- }
-
- return 1;
-}
-
-/* Returns the number of items in a single- or multi-dimensional sequence. */
-static int count_items(PyObject *seq)
-{
- int totitem= 0;
-
- if (PySequence_Check(seq)) {
- int i;
- for (i= 0; i < PySequence_Length(seq); i++) {
- PyObject *item= PySequence_GetItem(seq, i);
- totitem += count_items(item);
- Py_DECREF(item);
- }
- }
- else
- totitem= 1;
-
- return totitem;
-}
-
-/* Modifies property array length if needed and PROP_DYNAMIC flag is set. */
-static int validate_array_length(PyObject *rvalue, PointerRNA *ptr, PropertyRNA *prop, int lvalue_dim, int *totitem, const char *error_prefix)
-{
- int dimsize[MAX_ARRAY_DIMENSION];
- int tot, totdim, len;
-
- tot= count_items(rvalue);
- totdim= RNA_property_array_dimension(ptr, prop, dimsize);
-
- if ((RNA_property_flag(prop) & PROP_DYNAMIC) && lvalue_dim == 0) {
- if (RNA_property_array_length(ptr, prop) != tot) {
-#if 0
- /* length is flexible */
- if (!RNA_property_dynamic_array_set_length(ptr, prop, tot)) {
- /* BLI_snprintf(error_str, error_str_size, "%s.%s: array length cannot be changed to %d", RNA_struct_identifier(ptr->type), RNA_property_identifier(prop), tot); */
- PyErr_Format(PyExc_ValueError, "%s %s.%s: array length cannot be changed to %d", error_prefix, RNA_struct_identifier(ptr->type), RNA_property_identifier(prop), tot);
- return 0;
- }
-#else
- PyErr_Format(PyExc_ValueError, "%s %s.%s: array length cannot be changed to %d", error_prefix, RNA_struct_identifier(ptr->type), RNA_property_identifier(prop), tot);
- return 0;
-#endif
- }
-
- len= tot;
- }
- else {
- /* length is a constraint */
- if (!lvalue_dim) {
- len= RNA_property_array_length(ptr, prop);
- }
- /* array item assignment */
- else {
- int i;
-
- len= 1;
-
- /* arr[3][4][5]
-
- arr[2] = x
- dimsize={4, 5}
- dimsize[1] = 4
- dimsize[2] = 5
- lvalue_dim=0, totdim=3
-
- arr[2][3] = x
- lvalue_dim=1
-
- arr[2][3][4] = x
- lvalue_dim=2 */
- for (i= lvalue_dim; i < totdim; i++)
- len *= dimsize[i];
- }
-
- if (tot != len) {
- /* BLI_snprintf(error_str, error_str_size, "sequence must have length of %d", len); */
- PyErr_Format(PyExc_ValueError, "%s sequence must have %d items total", error_prefix, len);
- return 0;
- }
- }
-
- *totitem= len;
-
- return 1;
-}
-
-static int validate_array(PyObject *rvalue, PointerRNA *ptr, PropertyRNA *prop, int lvalue_dim, ItemTypeCheckFunc check_item_type, const char *item_type_str, int *totitem, const char *error_prefix)
-{
- int dimsize[MAX_ARRAY_DIMENSION];
- int totdim= RNA_property_array_dimension(ptr, prop, dimsize);
-
- /* validate type first because length validation may modify property array length */
-
- if (!validate_array_type(rvalue, lvalue_dim, totdim, dimsize, check_item_type, item_type_str, error_prefix))
- return 0;
-
- return validate_array_length(rvalue, ptr, prop, lvalue_dim, totitem, error_prefix);
-}
-
-static char *copy_values(PyObject *seq, PointerRNA *ptr, PropertyRNA *prop, int dim, char *data, unsigned int item_size, int *index, ItemConvertFunc convert_item, RNA_SetIndexFunc rna_set_index)
-{
- unsigned int i;
- int totdim= RNA_property_array_dimension(ptr, prop, NULL);
-
- for (i= 0; i < PySequence_Length(seq); i++) {
- PyObject *item= PySequence_GetItem(seq, i);
-
- if (dim + 1 < totdim) {
- data= copy_values(item, ptr, prop, dim + 1, data, item_size, index, convert_item, rna_set_index);
- }
- else {
- if (!data) {
- char value[sizeof(int)];
-
- convert_item(item, value);
- rna_set_index(ptr, prop, *index, value);
- *index = *index + 1;
- }
- else {
- convert_item(item, data);
- data += item_size;
- }
- }
-
- Py_DECREF(item);
- }
-
- return data;
-}
-
-static int py_to_array(PyObject *py, PointerRNA *ptr, PropertyRNA *prop, char *param_data, ItemTypeCheckFunc check_item_type, const char *item_type_str, int item_size, ItemConvertFunc convert_item, RNA_SetArrayFunc rna_set_array, const char *error_prefix)
-{
- int totdim, dim_size[MAX_ARRAY_DIMENSION];
- int totitem;
- char *data= NULL;
-
- totdim= RNA_property_array_dimension(ptr, prop, dim_size);
-
- if (!validate_array(py, ptr, prop, 0, check_item_type, item_type_str, &totitem, error_prefix)) {
- return 0;
- }
-
- if (totitem) {
- if (!param_data || RNA_property_flag(prop) & PROP_DYNAMIC)
- data= MEM_callocN(item_size * totitem, "pyrna primitive type array");
- else
- data= param_data;
-
- copy_values(py, ptr, prop, 0, data, item_size, NULL, convert_item, NULL);
-
- if (param_data) {
- if (RNA_property_flag(prop) & PROP_DYNAMIC) {
- /* not freeing allocated mem, RNA_parameter_list_free will do this */
- *(char**)param_data= data;
- }
- }
- else {
- /* NULL can only pass through in case RNA property arraylength is 0 (impossible?) */
- rna_set_array(ptr, prop, data);
- MEM_freeN(data);
- }
- }
-
- return 1;
-}
-
-static int py_to_array_index(PyObject *py, PointerRNA *ptr, PropertyRNA *prop, int lvalue_dim, int arrayoffset, int index, ItemTypeCheckFunc check_item_type, const char *item_type_str, ItemConvertFunc convert_item, RNA_SetIndexFunc rna_set_index, const char *error_prefix)
-{
- int totdim, dimsize[MAX_ARRAY_DIMENSION];
- int totitem, i;
-
- totdim= RNA_property_array_dimension(ptr, prop, dimsize);
-
- /* convert index */
-
- /* arr[3][4][5]
-
- arr[2] = x
- lvalue_dim=0, index = 0 + 2 * 4 * 5
-
- arr[2][3] = x
- lvalue_dim=1, index = 40 + 3 * 5 */
-
- lvalue_dim++;
-
- for (i= lvalue_dim; i < totdim; i++)
- index *= dimsize[i];
-
- index += arrayoffset;
-
- if (!validate_array(py, ptr, prop, lvalue_dim, check_item_type, item_type_str, &totitem, error_prefix))
- return 0;
-
- if (totitem)
- copy_values(py, ptr, prop, lvalue_dim, NULL, 0, &index, convert_item, rna_set_index);
-
- return 1;
-}
-
-static void py_to_float(PyObject *py, char *data)
-{
- *(float*)data= (float)PyFloat_AsDouble(py);
-}
-
-static void py_to_int(PyObject *py, char *data)
-{
- *(int*)data= (int)PyLong_AsSsize_t(py);
-}
-
-static void py_to_bool(PyObject *py, char *data)
-{
- *(int*)data= (int)PyObject_IsTrue(py);
-}
-
-static int py_float_check(PyObject *py)
-{
- /* accept both floats and integers */
- return PyFloat_Check(py) || PyLong_Check(py);
-}
-
-static int py_int_check(PyObject *py)
-{
- /* accept only integers */
- return PyLong_Check(py);
-}
-
-static int py_bool_check(PyObject *py)
-{
- return PyBool_Check(py);
-}
-
-static void float_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, void *value)
-{
- RNA_property_float_set_index(ptr, prop, index, *(float*)value);
-}
-
-static void int_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, void *value)
-{
- RNA_property_int_set_index(ptr, prop, index, *(int*)value);
-}
-
-static void bool_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, void *value)
-{
- RNA_property_boolean_set_index(ptr, prop, index, *(int*)value);
-}
-
-int pyrna_py_to_array(PointerRNA *ptr, PropertyRNA *prop, char *param_data, PyObject *py, const char *error_prefix)
-{
- int ret;
- switch (RNA_property_type(prop)) {
- case PROP_FLOAT:
- ret= py_to_array(py, ptr, prop, param_data, py_float_check, "float", sizeof(float), py_to_float, (RNA_SetArrayFunc)RNA_property_float_set_array, error_prefix);
- break;
- case PROP_INT:
- ret= py_to_array(py, ptr, prop, param_data, py_int_check, "int", sizeof(int), py_to_int, (RNA_SetArrayFunc)RNA_property_int_set_array, error_prefix);
- break;
- case PROP_BOOLEAN:
- ret= py_to_array(py, ptr, prop, param_data, py_bool_check, "boolean", sizeof(int), py_to_bool, (RNA_SetArrayFunc)RNA_property_boolean_set_array, error_prefix);
- break;
- default:
- PyErr_SetString(PyExc_TypeError, "not an array type");
- ret= 0;
- }
-
- return ret;
-}
-
-int pyrna_py_to_array_index(PointerRNA *ptr, PropertyRNA *prop, int arraydim, int arrayoffset, int index, PyObject *py, const char *error_prefix)
-{
- int ret;
- switch (RNA_property_type(prop)) {
- case PROP_FLOAT:
- ret= py_to_array_index(py, ptr, prop, arraydim, arrayoffset, index, py_float_check, "float", py_to_float, float_set_index, error_prefix);
- break;
- case PROP_INT:
- ret= py_to_array_index(py, ptr, prop, arraydim, arrayoffset, index, py_int_check, "int", py_to_int, int_set_index, error_prefix);
- break;
- case PROP_BOOLEAN:
- ret= py_to_array_index(py, ptr, prop, arraydim, arrayoffset, index, py_bool_check, "boolean", py_to_bool, bool_set_index, error_prefix);
- break;
- default:
- PyErr_SetString(PyExc_TypeError, "not an array type");
- ret= 0;
- }
-
- return ret;
-}
-
-static PyObject *pyrna_array_item(PointerRNA *ptr, PropertyRNA *prop, int index)
-{
- PyObject *item;
-
- switch (RNA_property_type(prop)) {
- case PROP_FLOAT:
- item= PyFloat_FromDouble(RNA_property_float_get_index(ptr, prop, index));
- break;
- case PROP_BOOLEAN:
- item= PyBool_FromLong(RNA_property_boolean_get_index(ptr, prop, index));
- break;
- case PROP_INT:
- item= PyLong_FromSsize_t(RNA_property_int_get_index(ptr, prop, index));
- break;
- default:
- PyErr_SetString(PyExc_TypeError, "not an array type");
- item= NULL;
- }
-
- return item;
-}
-
-#if 0
-/* XXX this is not used (and never will?) */
-/* Given an array property, creates an N-dimensional tuple of values. */
-static PyObject *pyrna_py_from_array_internal(PointerRNA *ptr, PropertyRNA *prop, int dim, int *index)
-{
- PyObject *tuple;
- int i, len;
- int totdim= RNA_property_array_dimension(ptr, prop, NULL);
-
- len= RNA_property_multi_array_length(ptr, prop, dim);
-
- tuple= PyTuple_New(len);
-
- for (i= 0; i < len; i++) {
- PyObject *item;
-
- if (dim + 1 < totdim)
- item= pyrna_py_from_array_internal(ptr, prop, dim + 1, index);
- else {
- item= pyrna_array_item(ptr, prop, *index);
- *index= *index + 1;
- }
-
- if (!item) {
- Py_DECREF(tuple);
- return NULL;
- }
-
- PyTuple_SetItem(tuple, i, item);
- }
-
- return tuple;
-}
-#endif
-
-PyObject *pyrna_py_from_array_index(BPy_PropertyRNA *self, int index)
-{
- int totdim, i, len;
- int dimsize[MAX_ARRAY_DIMENSION];
- BPy_PropertyRNA *ret= NULL;
-
- /* just in case check */
- len= RNA_property_multi_array_length(&self->ptr, self->prop, self->arraydim);
- if (index >= len || index < 0) {
- /* this shouldn't happen because higher level funcs must check for invalid index */
- if (G.f & G_DEBUG) printf("pyrna_py_from_array_index: invalid index %d for array with length=%d\n", index, len);
-
- PyErr_SetString(PyExc_IndexError, "out of range");
- return NULL;
- }
-
- totdim= RNA_property_array_dimension(&self->ptr, self->prop, dimsize);
-
- if (self->arraydim + 1 < totdim) {
- ret= (BPy_PropertyRNA*)pyrna_prop_CreatePyObject(&self->ptr, self->prop);
- ret->arraydim= self->arraydim + 1;
-
- /* arr[3][4][5]
-
- x = arr[2]
- index = 0 + 2 * 4 * 5
-
- x = arr[2][3]
- index = offset + 3 * 5 */
-
- for (i= self->arraydim + 1; i < totdim; i++)
- index *= dimsize[i];
-
- ret->arrayoffset= self->arrayoffset + index;
- }
- else {
- index = self->arrayoffset + index;
- ret= (BPy_PropertyRNA*)pyrna_array_item(&self->ptr, self->prop, index);
- }
-
- return (PyObject*)ret;
-}
-
-PyObject *pyrna_py_from_array(PointerRNA *ptr, PropertyRNA *prop)
-{
- PyObject *ret;
-
- ret= pyrna_math_object_from_array(ptr, prop);
-
- /* is this a maths object? */
- if (ret) return ret;
-
- return pyrna_prop_CreatePyObject(ptr, prop);
-}
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 3e089fffe6c..ae2f4244eac 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -1,37 +1,13 @@
-/**
- * $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.
- *
- * Contributor(s): Michel Selten, Willian P. Germano, Stephen Swaney,
- * Chris Keith, Chris Want, Ken Hughes, Campbell Barton
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
-
-/* grr, python redefines */
-#ifdef _POSIX_C_SOURCE
-#undef _POSIX_C_SOURCE
+#ifndef WIN32
+#include <dirent.h>
+#else
+#include "BLI_winstuff.h"
#endif
#include <Python.h>
@@ -44,12 +20,6 @@
#include "bpy_sys.h"
#include "bpy_util.h"
-#ifndef WIN32
-#include <dirent.h>
-#else
-#include "BLI_winstuff.h"
-#endif
-
#include "DNA_anim_types.h"
#include "DNA_space_types.h"
#include "DNA_text_types.h"
@@ -57,7 +27,6 @@
#include "MEM_guardedalloc.h"
#include "BLI_util.h"
-#include "BLI_storage.h"
#include "BLI_fileops.h"
#include "BLI_string.h"
@@ -623,7 +592,7 @@ void BPY_run_ui_scripts(bContext *C, int reload)
}
}
#ifndef __linux__
- else if( BLI_join_dirfile(path, dirname, de->d_name), S_ISDIR(BLI_exist(path))) {
+ else if( BLI_join_dirfile(path, dirname, de->d_name), S_ISDIR(BLI_exists(path))) {
#else
else if(de->d_type==DT_DIR) {
BLI_join_dirfile(path, dirname, de->d_name);
diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c
index 062db42e0e9..e431f2a21e9 100644
--- a/source/blender/python/intern/bpy_operator.c
+++ b/source/blender/python/intern/bpy_operator.c
@@ -40,23 +40,42 @@
#include "BKE_utildefines.h"
+/* 'self' stores the operator string */
static PyObject *pyop_call( PyObject * self, PyObject * args)
{
wmOperatorType *ot;
int error_val = 0;
PointerRNA ptr;
- char *opname;
- PyObject *kw= NULL; /* optional args */
-
- /* note that context is an int, python does the conversion in this case */
- int context= WM_OP_EXEC_DEFAULT;
+ char *opname;
+ PyObject *kw= NULL;
// XXX Todo, work out a better solution for passing on context, could make a tuple from self and pack the name and Context into it...
bContext *C = BPy_GetContext();
- if (!PyArg_ParseTuple(args, "s|O!i:bpy.__ops__.call", &opname, &PyDict_Type, &kw, &context))
+
+ switch(PyTuple_Size(args)) {
+ case 2:
+ kw = PyTuple_GET_ITEM(args, 1);
+
+ if(!PyDict_Check(kw)) {
+ PyErr_SetString( PyExc_AttributeError, "bpy.__ops__.call: expected second arg to be a dict");
+ return NULL;
+ }
+ /* pass through */
+ case 1:
+ opname = _PyUnicode_AsString(PyTuple_GET_ITEM(args, 0));
+
+ if(opname==NULL) {
+ PyErr_SetString( PyExc_AttributeError, "bpy.__ops__.call: expected the first arg to be a string");
+ return NULL;
+ }
+ break;
+ default:
+ PyErr_SetString( PyExc_AttributeError, "bpy.__ops__.call: expected a string and optional dict");
return NULL;
+ }
+
ot= WM_operatortype_find(opname, TRUE);
@@ -69,7 +88,7 @@ static PyObject *pyop_call( PyObject * self, PyObject * args)
PyErr_SetString( PyExc_SystemError, "bpy.__ops__.call: operator poll() function failed, context is incorrect");
return NULL;
}
-
+
/* WM_operator_properties_create(&ptr, opname); */
/* Save another lookup */
RNA_pointer_create(NULL, ot->srna, NULL, &ptr);
@@ -83,7 +102,7 @@ static PyObject *pyop_call( PyObject * self, PyObject * args)
BKE_reports_init(&reports, RPT_STORE);
- WM_operator_call_py(C, ot, context, &ptr, &reports);
+ WM_operator_call_py(C, ot, &ptr, &reports);
if(BPy_reports_to_error(&reports))
error_val = -1;
diff --git a/source/blender/python/intern/bpy_operator_wrap.c b/source/blender/python/intern/bpy_operator_wrap.c
index 0a487a8dbe8..9a74bf0aee8 100644
--- a/source/blender/python/intern/bpy_operator_wrap.c
+++ b/source/blender/python/intern/bpy_operator_wrap.c
@@ -228,7 +228,7 @@ static int PYTHON_OT_invoke(bContext *C, wmOperator *op, wmEvent *event)
return PYTHON_OT_generic(PYOP_INVOKE, C, op, event);
}
-static int PYTHON_OT_execute(bContext *C, wmOperator *op)
+static int PYTHON_OT_exec(bContext *C, wmOperator *op)
{
return PYTHON_OT_generic(PYOP_EXEC, C, op, NULL);
}
@@ -268,7 +268,7 @@ void PYTHON_OT_wrapper(wmOperatorType *ot, void *userdata)
if (PyObject_HasAttrString(py_class, "invoke"))
ot->invoke= PYTHON_OT_invoke;
if (PyObject_HasAttrString(py_class, "execute"))
- ot->exec= PYTHON_OT_execute;
+ ot->exec= PYTHON_OT_exec;
if (PyObject_HasAttrString(py_class, "poll"))
ot->poll= PYTHON_OT_poll;
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 49105422325..3679d748d1f 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -130,70 +130,6 @@ Mathutils_Callback mathutils_rna_matrix_cb = {
(BaseMathSetIndexFunc) NULL
};
-PyObject *pyrna_math_object_from_array(PointerRNA *ptr, PropertyRNA *prop)
-{
- PyObject *ret= NULL;
-
-#ifdef USE_MATHUTILS
- int type, subtype, totdim;
- int len;
-
- len= RNA_property_array_length(ptr, prop);
- type= RNA_property_type(prop);
- subtype= RNA_property_subtype(prop);
- totdim= RNA_property_array_dimension(ptr, prop, NULL);
-
- if (type != PROP_FLOAT) return NULL;
-
- if (totdim == 1 || (totdim == 2 && subtype == PROP_MATRIX)) {
- ret = pyrna_prop_CreatePyObject(ptr, prop);
-
- switch(RNA_property_subtype(prop)) {
- case PROP_TRANSLATION:
- case PROP_DIRECTION:
- case PROP_VELOCITY:
- case PROP_ACCELERATION:
- case PROP_XYZ:
- if(len>=2 && len <= 4) {
- PyObject *vec_cb= newVectorObject_cb(ret, len, mathutils_rna_array_cb_index, FALSE);
- Py_DECREF(ret); /* the vector owns now */
- ret= vec_cb; /* return the vector instead */
- }
- break;
- case PROP_MATRIX:
- if(len==16) {
- PyObject *mat_cb= newMatrixObject_cb(ret, 4,4, mathutils_rna_matrix_cb_index, FALSE);
- Py_DECREF(ret); /* the matrix owns now */
- ret= mat_cb; /* return the matrix instead */
- }
- else if (len==9) {
- PyObject *mat_cb= newMatrixObject_cb(ret, 3,3, mathutils_rna_matrix_cb_index, FALSE);
- Py_DECREF(ret); /* the matrix owns now */
- ret= mat_cb; /* return the matrix instead */
- }
- break;
- case PROP_EULER:
- case PROP_QUATERNION:
- if(len==3) { /* euler */
- PyObject *eul_cb= newEulerObject_cb(ret, mathutils_rna_array_cb_index, FALSE);
- Py_DECREF(ret); /* the matrix owns now */
- ret= eul_cb; /* return the matrix instead */
- }
- else if (len==4) {
- PyObject *quat_cb= newQuaternionObject_cb(ret, mathutils_rna_array_cb_index, FALSE);
- Py_DECREF(ret); /* the matrix owns now */
- ret= quat_cb; /* return the matrix instead */
- }
- break;
- default:
- break;
- }
- }
-#endif
-
- return ret;
-}
-
#endif
static StructRNA *pyrna_struct_as_srna(PyObject *self);
@@ -208,64 +144,25 @@ static int pyrna_prop_compare( BPy_PropertyRNA * a, BPy_PropertyRNA * b )
return (a->prop==b->prop && a->ptr.data==b->ptr.data ) ? 0 : -1;
}
-static PyObject *pyrna_struct_richcmp(PyObject *a, PyObject *b, int op)
+/* For some reason python3 needs these :/ */
+static PyObject *pyrna_struct_richcmp(BPy_StructRNA * a, BPy_StructRNA * b, int op)
{
- PyObject *res;
- int ok= -1; /* zero is true */
-
- if (BPy_StructRNA_Check(a) && BPy_StructRNA_Check(b))
- ok= pyrna_struct_compare((BPy_StructRNA *)a, (BPy_StructRNA *)b);
-
- switch (op) {
- case Py_NE:
- ok = !ok; /* pass through */
- case Py_EQ:
- res = ok ? Py_False : Py_True;
- break;
-
- case Py_LT:
- case Py_LE:
- case Py_GT:
- case Py_GE:
- res = Py_NotImplemented;
- break;
- default:
- PyErr_BadArgument();
- return NULL;
+ int cmp_result= -1; /* assume false */
+ if (BPy_StructRNA_Check(a) && BPy_StructRNA_Check(b)) {
+ cmp_result= pyrna_struct_compare(a, b);
}
- Py_INCREF(res);
- return res;
+ return Py_CmpToRich(op, cmp_result);
}
-static PyObject *pyrna_prop_richcmp(PyObject *a, PyObject *b, int op)
+static PyObject *pyrna_prop_richcmp(BPy_PropertyRNA * a, BPy_PropertyRNA * b, int op)
{
- PyObject *res;
- int ok= -1; /* zero is true */
-
- if (BPy_PropertyRNA_Check(a) && BPy_PropertyRNA_Check(b))
- ok= pyrna_prop_compare((BPy_PropertyRNA *)a, (BPy_PropertyRNA *)b);
-
- switch (op) {
- case Py_NE:
- ok = !ok; /* pass through */
- case Py_EQ:
- res = ok ? Py_False : Py_True;
- break;
-
- case Py_LT:
- case Py_LE:
- case Py_GT:
- case Py_GE:
- res = Py_NotImplemented;
- break;
- default:
- PyErr_BadArgument();
- return NULL;
+ int cmp_result= -1; /* assume false */
+ if (BPy_PropertyRNA_Check(a) && BPy_PropertyRNA_Check(b)) {
+ cmp_result= pyrna_prop_compare(a, b);
}
- Py_INCREF(res);
- return res;
+ return Py_CmpToRich(op, cmp_result);
}
/*----------------------repr--------------------------------------------*/
@@ -370,10 +267,61 @@ PyObject * pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop)
{
PyObject *ret;
int type = RNA_property_type(prop);
- int len = RNA_property_array_length(ptr, prop);
+ int len = RNA_property_array_length(prop);
if (len > 0) {
- return pyrna_py_from_array(ptr, prop);
+ /* resolve the array from a new pytype */
+ PyObject *ret = pyrna_prop_CreatePyObject(ptr, prop);
+
+#ifdef USE_MATHUTILS
+
+ /* return a mathutils vector where possible */
+ if(RNA_property_type(prop)==PROP_FLOAT) {
+ switch(RNA_property_subtype(prop)) {
+ case PROP_TRANSLATION:
+ case PROP_DIRECTION:
+ case PROP_VELOCITY:
+ case PROP_ACCELERATION:
+ case PROP_XYZ:
+ if(len>=2 && len <= 4) {
+ PyObject *vec_cb= newVectorObject_cb(ret, len, mathutils_rna_array_cb_index, FALSE);
+ Py_DECREF(ret); /* the vector owns now */
+ ret= vec_cb; /* return the vector instead */
+ }
+ break;
+ case PROP_MATRIX:
+ if(len==16) {
+ PyObject *mat_cb= newMatrixObject_cb(ret, 4,4, mathutils_rna_matrix_cb_index, FALSE);
+ Py_DECREF(ret); /* the matrix owns now */
+ ret= mat_cb; /* return the matrix instead */
+ }
+ else if (len==9) {
+ PyObject *mat_cb= newMatrixObject_cb(ret, 3,3, mathutils_rna_matrix_cb_index, FALSE);
+ Py_DECREF(ret); /* the matrix owns now */
+ ret= mat_cb; /* return the matrix instead */
+ }
+ break;
+ case PROP_EULER:
+ case PROP_QUATERNION:
+ if(len==3) { /* euler */
+ PyObject *eul_cb= newEulerObject_cb(ret, mathutils_rna_array_cb_index, FALSE);
+ Py_DECREF(ret); /* the matrix owns now */
+ ret= eul_cb; /* return the matrix instead */
+ }
+ else if (len==4) {
+ PyObject *quat_cb= newQuaternionObject_cb(ret, mathutils_rna_array_cb_index, FALSE);
+ Py_DECREF(ret); /* the matrix owns now */
+ ret= quat_cb; /* return the matrix instead */
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+#endif
+
+ return ret;
}
/* see if we can coorce into a python type - PropertyType */
@@ -542,26 +490,127 @@ int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyObject *v
{
/* XXX hard limits should be checked here */
int type = RNA_property_type(prop);
- int len = RNA_property_array_length(ptr, prop);
+ int len = RNA_property_array_length(prop);
if (len > 0) {
+ PyObject *item;
+ int py_len = -1;
+ int i;
+
#ifdef USE_MATHUTILS
if(MatrixObject_Check(value)) {
MatrixObject *mat = (MatrixObject*)value;
if(!BaseMath_ReadCallback(mat))
return -1;
+
+ py_len = mat->rowSize * mat->colSize;
} else /* continue... */
#endif
- if (!PySequence_Check(value)) {
+ if (PySequence_Check(value)) {
+ py_len= (int)PySequence_Length(value);
+ }
+ else {
PyErr_Format(PyExc_TypeError, "%.200s RNA array assignment expected a sequence instead of %.200s instance.", error_prefix, Py_TYPE(value)->tp_name);
return -1;
}
- else if (!pyrna_py_to_array(ptr, prop, data, value, error_prefix)) {
- /* PyErr_Format(PyExc_AttributeError, "%.200s %s", error_prefix, error_str); */
+ /* done getting the length */
+
+ if (py_len != len) {
+ PyErr_Format(PyExc_TypeError, "%.200s python sequence length %d did not match the RNA array length %d.", error_prefix, py_len, len);
return -1;
}
- }
- else {
+
+ /* for arrays we have a limited number of types */
+ switch (type) {
+ case PROP_BOOLEAN:
+ {
+ int *param_arr;
+ if(data) param_arr= (int*)data;
+ else param_arr= MEM_mallocN(sizeof(int) * len, "pyrna bool array");
+
+
+ /* collect the variables before assigning, incase one of them is incorrect */
+ for (i=0; i<len; i++) {
+ item = PySequence_GetItem(value, i);
+ param_arr[i] = PyObject_IsTrue( item );
+ Py_DECREF(item);
+
+ if (param_arr[i] < 0) {
+ if(data==NULL)
+ MEM_freeN(param_arr);
+ PyErr_Format(PyExc_AttributeError, "%.200s one or more of the values in the sequence is not a boolean", error_prefix);
+ return -1;
+ }
+ }
+ if(data==NULL) {
+ RNA_property_boolean_set_array(ptr, prop, param_arr);
+ MEM_freeN(param_arr);
+ }
+
+ break;
+ }
+ case PROP_INT:
+ {
+ int *param_arr;
+ if(data) param_arr= (int*)data;
+ else param_arr= MEM_mallocN(sizeof(int) * len, "pyrna int array");
+
+
+ /* collect the variables */
+ for (i=0; i<len; i++) {
+ item = PySequence_GetItem(value, i);
+ param_arr[i] = (int)PyLong_AsSsize_t(item); /* deal with any errors later */
+ Py_DECREF(item);
+ }
+
+ if (PyErr_Occurred()) {
+ if(data==NULL)
+ MEM_freeN(param_arr);
+ PyErr_Format(PyExc_AttributeError, "%.200s one or more of the values in the sequence could not be used as an int", error_prefix);
+ return -1;
+ }
+ if(data==NULL) {
+ RNA_property_int_set_array(ptr, prop, param_arr);
+ MEM_freeN(param_arr);
+ }
+ break;
+ }
+ case PROP_FLOAT:
+ {
+ float *param_arr;
+ if(data) param_arr = (float*)data;
+ else param_arr = MEM_mallocN(sizeof(float) * len, "pyrna float array");
+
+
+#ifdef USE_MATHUTILS
+ if(MatrixObject_Check(value) && RNA_property_subtype(prop) == PROP_MATRIX) {
+ MatrixObject *mat = (MatrixObject*)value;
+ memcpy(param_arr, mat->contigPtr, sizeof(float) * len);
+ } else /* continue... */
+#endif
+ {
+ /* collect the variables */
+ for (i=0; i<len; i++) {
+ item = PySequence_GetItem(value, i);
+ param_arr[i] = (float)PyFloat_AsDouble(item); /* deal with any errors later */
+ Py_DECREF(item);
+ }
+ }
+
+ if (PyErr_Occurred()) {
+ if(data==NULL)
+ MEM_freeN(param_arr);
+ PyErr_Format(PyExc_AttributeError, "%.200s one or more of the values in the sequence could not be used as a float", error_prefix);
+ return -1;
+ }
+ if(data==NULL) {
+ RNA_property_float_set_array(ptr, prop, param_arr);
+ MEM_freeN(param_arr);
+ }
+ break;
+ }
+ }
+ } else {
/* Normal Property (not an array) */
/* see if we can coorce into a python type - PropertyType */
@@ -759,84 +808,82 @@ int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyObject *v
return 0;
}
-static PyObject * pyrna_prop_to_py_index(BPy_PropertyRNA *self, int index)
+static PyObject * pyrna_prop_to_py_index(PointerRNA *ptr, PropertyRNA *prop, int index)
{
- return pyrna_py_from_array_index(self, index);
+ PyObject *ret;
+ int type = RNA_property_type(prop);
+
+ /* see if we can coorce into a python type - PropertyType */
+ switch (type) {
+ case PROP_BOOLEAN:
+ ret = PyBool_FromLong( RNA_property_boolean_get_index(ptr, prop, index) );
+ break;
+ case PROP_INT:
+ ret = PyLong_FromSsize_t( (Py_ssize_t)RNA_property_int_get_index(ptr, prop, index) );
+ break;
+ case PROP_FLOAT:
+ ret = PyFloat_FromDouble( RNA_property_float_get_index(ptr, prop, index) );
+ break;
+ default:
+ PyErr_SetString(PyExc_AttributeError, "not an array type");
+ ret = NULL;
+ break;
+ }
+
+ return ret;
}
-static int pyrna_py_to_prop_index(BPy_PropertyRNA *self, int index, PyObject *value)
+static int pyrna_py_to_prop_index(PointerRNA *ptr, PropertyRNA *prop, int index, PyObject *value)
{
int ret = 0;
- int totdim;
- PointerRNA *ptr= &self->ptr;
- PropertyRNA *prop= self->prop;
int type = RNA_property_type(prop);
-
- totdim= RNA_property_array_dimension(ptr, prop, NULL);
-
- if (totdim > 1) {
- /* char error_str[512]; */
- if (!pyrna_py_to_array_index(&self->ptr, self->prop, self->arraydim, self->arrayoffset, index, value, "")) {
- /* PyErr_SetString(PyExc_AttributeError, error_str); */
- ret= -1;
+
+ /* see if we can coorce into a python type - PropertyType */
+ switch (type) {
+ case PROP_BOOLEAN:
+ {
+ int param = PyObject_IsTrue( value );
+
+ if( param < 0 ) {
+ PyErr_SetString(PyExc_TypeError, "expected True/False or 0/1");
+ ret = -1;
+ } else {
+ RNA_property_boolean_set_index(ptr, prop, index, param);
}
+ break;
}
- else {
- /* see if we can coorce into a python type - PropertyType */
- switch (type) {
- case PROP_BOOLEAN:
- {
- int param = PyObject_IsTrue( value );
-
- if( param < 0 ) {
- PyErr_SetString(PyExc_TypeError, "expected True/False or 0/1");
- ret = -1;
- } else {
- RNA_property_boolean_set_index(ptr, prop, index, param);
- }
- break;
- }
- case PROP_INT:
- {
- int param = PyLong_AsSsize_t(value);
- if (PyErr_Occurred()) {
- PyErr_SetString(PyExc_TypeError, "expected an int type");
- ret = -1;
- } else {
- RNA_property_int_set_index(ptr, prop, index, param);
- }
- break;
- }
- case PROP_FLOAT:
- {
- float param = PyFloat_AsDouble(value);
- if (PyErr_Occurred()) {
- PyErr_SetString(PyExc_TypeError, "expected a float type");
- ret = -1;
- } else {
- RNA_property_float_set_index(ptr, prop, index, param);
- }
- break;
- }
- default:
- PyErr_SetString(PyExc_AttributeError, "not an array type");
+ case PROP_INT:
+ {
+ int param = PyLong_AsSsize_t(value);
+ if (PyErr_Occurred()) {
+ PyErr_SetString(PyExc_TypeError, "expected an int type");
ret = -1;
- break;
+ } else {
+ RNA_property_int_set_index(ptr, prop, index, param);
+ }
+ break;
+ }
+ case PROP_FLOAT:
+ {
+ float param = PyFloat_AsDouble(value);
+ if (PyErr_Occurred()) {
+ PyErr_SetString(PyExc_TypeError, "expected a float type");
+ ret = -1;
+ } else {
+ RNA_property_float_set_index(ptr, prop, index, param);
}
+ break;
+ }
+ default:
+ PyErr_SetString(PyExc_AttributeError, "not an array type");
+ ret = -1;
+ break;
}
return ret;
}
//---------------sequence-------------------------------------------
-static int pyrna_prop_array_length(BPy_PropertyRNA *self)
-{
- if (RNA_property_array_dimension(&self->ptr, self->prop, NULL) > 1)
- return RNA_property_multi_array_length(&self->ptr, self->prop, self->arraydim);
- else
- return RNA_property_array_length(&self->ptr, self->prop);
-}
-
static Py_ssize_t pyrna_prop_len( BPy_PropertyRNA * self )
{
Py_ssize_t len;
@@ -844,10 +891,10 @@ static Py_ssize_t pyrna_prop_len( BPy_PropertyRNA * self )
if (RNA_property_type(self->prop) == PROP_COLLECTION) {
len = RNA_property_collection_length(&self->ptr, self->prop);
} else {
- len = pyrna_prop_array_length(self);
+ len = RNA_property_array_length(self->prop);
if (len==0) { /* not an array*/
- PyErr_SetString(PyExc_AttributeError, "len() only available for collection and array RNA types");
+ PyErr_SetString(PyExc_AttributeError, "len() only available for collection RNA types");
return -1;
}
}
@@ -868,15 +915,14 @@ static PyObject *prop_subscript_collection_int(BPy_PropertyRNA * self, int keynu
PyErr_Format(PyExc_IndexError, "index %d out of range", keynum);
return NULL;
}
-
static PyObject *prop_subscript_array_int(BPy_PropertyRNA * self, int keynum)
{
- int len= pyrna_prop_array_length(self);
+ int len= RNA_property_array_length(self->prop);
if(keynum < 0) keynum += len;
if(keynum >= 0 && keynum < len)
- return pyrna_prop_to_py_index(self, keynum);
+ return pyrna_prop_to_py_index(&self->ptr, self->prop, keynum);
PyErr_Format(PyExc_IndexError, "index %d out of range", keynum);
return NULL;
@@ -923,7 +969,7 @@ static PyObject *prop_subscript_array_slice(BPy_PropertyRNA * self, int start, i
start = MIN2(start,stop); /* values are clamped from PySlice_GetIndicesEx */
for(count = start; count < stop; count++)
- PyList_SetItem(list, count - start, pyrna_prop_to_py_index(self, count));
+ PyList_SetItem(list, count - start, pyrna_prop_to_py_index(&self->ptr, self->prop, count));
return list;
}
@@ -976,8 +1022,8 @@ static PyObject *prop_subscript_array(BPy_PropertyRNA * self, PyObject *key)
return prop_subscript_array_int(self, PyLong_AsSsize_t(key));
}
else if (PySlice_Check(key)) {
+ int len= RNA_property_array_length(self->prop);
Py_ssize_t start, stop, step, slicelength;
- int len = pyrna_prop_array_length(self);
if (PySlice_GetIndicesEx((PySliceObject*)key, len, &start, &stop, &step, &slicelength) < 0)
return NULL;
@@ -1003,12 +1049,13 @@ static PyObject *pyrna_prop_subscript( BPy_PropertyRNA * self, PyObject *key )
{
if (RNA_property_type(self->prop) == PROP_COLLECTION) {
return prop_subscript_collection(self, key);
- } else if (RNA_property_array_length(&self->ptr, self->prop)) { /* zero length means its not an array */
+ } else if (RNA_property_array_length(self->prop)) { /* arrays are currently fixed length, zero length means its not an array */
return prop_subscript_array(self, key);
- }
+ } else {
+ PyErr_SetString(PyExc_TypeError, "rna type is not an array or a collection");
+ return NULL;
+ }
- PyErr_SetString(PyExc_TypeError, "rna type is not an array or a collection");
- return NULL;
}
static int prop_subscript_ass_array_slice(BPy_PropertyRNA * self, int begin, int end, PyObject *value)
@@ -1019,7 +1066,7 @@ static int prop_subscript_ass_array_slice(BPy_PropertyRNA * self, int begin, int
begin = MIN2(begin,end);
for(count = begin; count < end; count++) {
- if(pyrna_py_to_prop_index(self, count - begin, value) == -1) {
+ if(pyrna_py_to_prop_index(&self->ptr, self->prop, count - begin, value) == -1) {
/* TODO - this is wrong since some values have been assigned... will need to fix that */
return -1; /* pyrna_struct_CreatePyObject should set the error */
}
@@ -1030,12 +1077,13 @@ static int prop_subscript_ass_array_slice(BPy_PropertyRNA * self, int begin, int
static int prop_subscript_ass_array_int(BPy_PropertyRNA * self, int keynum, PyObject *value)
{
- int len= pyrna_prop_array_length(self);
+
+ int len= RNA_property_array_length(self->prop);
if(keynum < 0) keynum += len;
if(keynum >= 0 && keynum < len)
- return pyrna_py_to_prop_index(self, keynum, value);
+ return pyrna_py_to_prop_index(&self->ptr, self->prop, keynum, value);
PyErr_SetString(PyExc_IndexError, "out of range");
return -1;
@@ -1064,7 +1112,7 @@ static int pyrna_prop_ass_subscript( BPy_PropertyRNA * self, PyObject *key, PyOb
return prop_subscript_ass_array_int(self, i, value);
}
else if (PySlice_Check(key)) {
- int len= RNA_property_array_length(&self->ptr, self->prop);
+ int len= RNA_property_array_length(self->prop);
Py_ssize_t start, stop, step, slicelength;
if (PySlice_GetIndicesEx((PySliceObject*)key, len, &start, &stop, &step, &slicelength) < 0)
@@ -1477,7 +1525,7 @@ static void foreach_attr_type( BPy_PropertyRNA *self, char *attr,
RNA_PROP_BEGIN(&self->ptr, itemptr, self->prop) {
prop = RNA_struct_find_property(&itemptr, attr);
*raw_type= RNA_property_raw_type(prop);
- *attr_tot = RNA_property_array_length(&itemptr, prop);
+ *attr_tot = RNA_property_array_length(prop);
*attr_signed= (RNA_property_subtype(prop)==PROP_UNSIGNED) ? FALSE:TRUE;
break;
}
@@ -1516,7 +1564,7 @@ static int foreach_parse_args(
if (RNA_property_type(self->prop) == PROP_COLLECTION)
array_tot = RNA_property_collection_length(&self->ptr, self->prop);
else
- array_tot = RNA_property_array_length(&self->ptr, self->prop);
+ array_tot = RNA_property_array_length(self->prop);
target_tot= array_tot * (*attr_tot);
@@ -1709,7 +1757,7 @@ PyObject *pyrna_prop_iter(BPy_PropertyRNA *self)
if (ret==NULL) {
/* collection did not work, try array */
- int len = pyrna_prop_array_length(self);
+ int len = RNA_property_array_length(self->prop);
if (len) {
int i;
@@ -1717,7 +1765,7 @@ PyObject *pyrna_prop_iter(BPy_PropertyRNA *self)
ret = PyList_New(len);
for (i=0; i < len; i++) {
- PyList_SET_ITEM(ret, i, pyrna_prop_to_py_index(self, i));
+ PyList_SET_ITEM(ret, i, pyrna_prop_to_py_index(&self->ptr, self->prop, i));
}
}
}
@@ -1800,7 +1848,7 @@ PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *data)
{
PyObject *ret;
int type = RNA_property_type(prop);
- int len = RNA_property_array_length(ptr, prop);
+ int len = RNA_property_array_length(prop);
int a;
@@ -1809,7 +1857,7 @@ PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *data)
ret = PyTuple_New(len);
/* for return values, data is a pointer to an array, not first element pointer */
- if (RNA_property_flag(prop) & PROP_DYNAMIC)
+ if (RNA_property_flag(prop) & PROP_DYNAMIC_ARRAY)
data = *(char**)(char*)data;
switch (type) {
@@ -2476,9 +2524,6 @@ PyObject *pyrna_prop_CreatePyObject( PointerRNA *ptr, PropertyRNA *prop )
pyrna->ptr = *ptr;
pyrna->prop = prop;
-
- pyrna->arraydim= 0;
- pyrna->arrayoffset= 0;
return ( PyObject * ) pyrna;
}
@@ -2643,17 +2688,8 @@ PyObject *BPY_rna_props( void )
static StructRNA *pyrna_struct_as_srna(PyObject *self)
{
- BPy_StructRNA *py_srna;
+ BPy_StructRNA *py_srna= (BPy_StructRNA*)PyObject_GetAttrString(self, "__rna__");
StructRNA *srna;
-
- /* ack, PyObject_GetAttrString wont look up this types tp_dict first :/ */
- if(PyType_Check(self)) {
- py_srna = (BPy_StructRNA *)PyDict_GetItemString(((PyTypeObject *)self)->tp_dict, "__rna__");
- Py_XINCREF(py_srna);
- }
-
- if(py_srna==NULL)
- py_srna = (BPy_StructRNA*)PyObject_GetAttrString(self, "__rna__");
if(py_srna==NULL) {
PyErr_SetString(PyExc_SystemError, "internal error, self had no __rna__ attribute, should never happen.");
@@ -2928,12 +2964,12 @@ static StructRNA *pointer_type_from_py(PyObject *value)
srna= srna_from_self(value);
if(!srna) {
- PyErr_SetString(PyExc_SystemError, "expected an RNA type derived from IDPropertyGroup");
+ PyErr_SetString(PyExc_SystemError, "expected an RNA type derived from IDPropertyGroup (1)");
return NULL;
}
if(!RNA_struct_is_a(srna, &RNA_IDPropertyGroup)) {
- PyErr_SetString(PyExc_SystemError, "expected an RNA type derived from IDPropertyGroup");
+ PyErr_SetString(PyExc_SystemError, "expected an RNA type derived from IDPropertyGroup (3)");
return NULL;
}
@@ -3010,52 +3046,6 @@ PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw)
return NULL;
}
-static int deferred_register_props(PyObject *py_class, StructRNA *srna)
-{
- PyObject *props, *dummy_args, *item;
- int i;
-
- props= PyObject_GetAttrString(py_class, "__props__");
-
- if(!props) {
- PyErr_Clear();
- return 1;
- }
-
- dummy_args = PyTuple_New(0);
-
- for(i=0; i<PyList_Size(props); i++) {
- PyObject *py_func_ptr, *py_kw, *py_srna_cobject, *py_ret;
- item = PyList_GET_ITEM(props, i);
-
- if(PyArg_ParseTuple(item, "O!O!", &PyCObject_Type, &py_func_ptr, &PyDict_Type, &py_kw)) {
- PyObject *(*pyfunc)(PyObject *, PyObject *, PyObject *);
- pyfunc = PyCObject_AsVoidPtr(py_func_ptr);
- py_srna_cobject = PyCObject_FromVoidPtr(srna, NULL);
-
- py_ret = pyfunc(py_srna_cobject, dummy_args, py_kw);
- Py_DECREF(py_srna_cobject);
-
- if(py_ret) {
- Py_DECREF(py_ret);
- }
- else {
- Py_DECREF(dummy_args);
- return 0;
- }
- }
- else {
- PyErr_Clear();
- PyErr_SetString(PyExc_AttributeError, "expected list of dicts for __props__.");
- Py_DECREF(dummy_args);
- return 0;
- }
- }
-
- Py_DECREF(dummy_args);
- return 1;
-}
-
/*-------------------- Type Registration ------------------------*/
static int rna_function_arg_count(FunctionRNA *func)
@@ -3416,9 +3406,6 @@ PyObject *pyrna_basetype_register(PyObject *self, PyObject *py_class)
// Py_DECREF(py_class); // shuld be able to do this XXX since the old rna adds a new ref.
}
- if(!deferred_register_props(py_class, srna_new))
- return NULL;
-
Py_RETURN_NONE;
}
@@ -3442,6 +3429,7 @@ PyObject *pyrna_basetype_unregister(PyObject *self, PyObject *py_class)
/* get the context, so register callback can do necessary refreshes */
C= BPy_GetContext();
+
/* call unregister */
unreg(C, srna); /* calls bpy_class_free, this decref's py_class */
diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h
index d006b168f45..1b8d69bc511 100644
--- a/source/blender/python/intern/bpy_rna.h
+++ b/source/blender/python/intern/bpy_rna.h
@@ -55,10 +55,6 @@ typedef struct {
PyObject_HEAD /* required python macro */
PointerRNA ptr;
PropertyRNA *prop;
-
- /* Arystan: this is a hack to allow sub-item r/w access like: face.uv[n][m] */
- int arraydim; /* array dimension, e.g: 0 for face.uv, 2 for face.uv[n][m], etc. */
- int arrayoffset; /* array first item offset, e.g. if face.uv is [4][2], arrayoffset for face.uv[n] is 2n */
} BPy_PropertyRNA;
/* cheap trick */
@@ -95,12 +91,4 @@ PyObject *pyrna_basetype_unregister(PyObject *self, PyObject *args);
void pyrna_alloc_types(void);
void pyrna_free_types(void);
-/* primitive type conversion */
-int pyrna_py_to_array(PointerRNA *ptr, PropertyRNA *prop, char *param_data, PyObject *py, const char *error_prefix);
-int pyrna_py_to_array_index(PointerRNA *ptr, PropertyRNA *prop, int arraydim, int arrayoffset, int index, PyObject *py, const char *error_prefix);
-
-PyObject *pyrna_py_from_array(PointerRNA *ptr, PropertyRNA *prop);
-PyObject *pyrna_py_from_array_index(BPy_PropertyRNA *self, int index);
-PyObject *pyrna_math_object_from_array(PointerRNA *ptr, PropertyRNA *prop);
-
#endif
diff --git a/source/blender/python/intern/bpy_util.c b/source/blender/python/intern/bpy_util.c
index 7e35d51bb6d..924d1dbf06a 100644
--- a/source/blender/python/intern/bpy_util.c
+++ b/source/blender/python/intern/bpy_util.c
@@ -127,6 +127,44 @@ int BPY_flag_from_seq(BPY_flag_def *flagdef, PyObject *seq, int *flag)
return 0; /* ok */
}
+
+/* Copied from pythons 3's Object.c */
+PyObject *
+Py_CmpToRich(int op, int cmp)
+{
+ PyObject *res;
+ int ok;
+
+ if (PyErr_Occurred())
+ return NULL;
+ switch (op) {
+ case Py_LT:
+ ok = cmp < 0;
+ break;
+ case Py_LE:
+ ok = cmp <= 0;
+ break;
+ case Py_EQ:
+ ok = cmp == 0;
+ break;
+ case Py_NE:
+ ok = cmp != 0;
+ break;
+ case Py_GT:
+ ok = cmp > 0;
+ break;
+ case Py_GE:
+ ok = cmp >= 0;
+ break;
+ default:
+ PyErr_BadArgument();
+ return NULL;
+ }
+ res = ok ? Py_True : Py_False;
+ Py_INCREF(res);
+ return res;
+}
+
/* for debugging */
void PyObSpit(char *name, PyObject *var) {
fprintf(stderr, "<%s> : ", name);
diff --git a/source/blender/python/intern/bpy_util.h b/source/blender/python/intern/bpy_util.h
index 83fa7a5b7c4..0400d595520 100644
--- a/source/blender/python/intern/bpy_util.h
+++ b/source/blender/python/intern/bpy_util.h
@@ -50,6 +50,8 @@ void PyObSpit(char *name, PyObject *var);
void PyLineSpit(void);
void BPY_getFileAndNum(char **filename, int *lineno);
+PyObject *Py_CmpToRich(int op, int cmp);
+
PyObject *BPY_exception_buffer(void);
/* own python like utility function */
diff --git a/source/blender/quicktime/CMakeLists.txt b/source/blender/quicktime/CMakeLists.txt
index ac503bb62cb..95969878cf1 100644
--- a/source/blender/quicktime/CMakeLists.txt
+++ b/source/blender/quicktime/CMakeLists.txt
@@ -27,18 +27,18 @@
SET(SRC apple/quicktime_import.c apple/quicktime_export.c)
SET(INC
- .
- ../quicktime
- ../makesdna
- ../../../intern/guardedalloc
- ../blenlib
- ../blenkernel
- ../avi
- ../imbuf
- ../imbuf/intern
- ../blenloader
- ../render/extern/include
- ../include
+ .
+ ../quicktime
+ ../makesdna
+ ../../../intern/guardedalloc
+ ../blenlib
+ ../blenkernel
+ ../avi
+ ../imbuf
+ ../imbuf/intern
+ ../blenloader
+ ../render/extern/include
+ ../include
)
SET(INC ${INC} ${QUICKTIME_INC})
diff --git a/source/blender/quicktime/SConscript b/source/blender/quicktime/SConscript
index 10e88a8f461..5f3995a410a 100644
--- a/source/blender/quicktime/SConscript
+++ b/source/blender/quicktime/SConscript
@@ -19,7 +19,7 @@ incs = ['.',
incs.append(env['BF_QUICKTIME_INC'])
-types = ['core','player']
-priorities = [200,235]
+types = ['core']
+priorities = [200]
env.BlenderLib ('bf_quicktime', sources=source_files, includes=incs, defines=['WITH_QUICKTIME'], libtype=types, priority=priorities)
diff --git a/source/blender/readblenfile/CMakeLists.txt b/source/blender/readblenfile/CMakeLists.txt
index ded4a1e00cf..dc4a8f5636d 100644
--- a/source/blender/readblenfile/CMakeLists.txt
+++ b/source/blender/readblenfile/CMakeLists.txt
@@ -27,7 +27,7 @@
FILE(GLOB SRC intern/*.c)
SET(INC
- . ../blenloader ../blenloader/intern ../blenkernel ../blenlib ../makesdna ../../kernel/gen_messaging
+ . ../blenloader ../blenloader/intern ../blenkernel ../blenlib ../makesdna ../../kernel/gen_messaging
)
BLENDERLIB(bf_readblenfile "${SRC}" "${INC}")
diff --git a/source/blender/readblenfile/SConscript b/source/blender/readblenfile/SConscript
index 57ee1866263..59771aa0829 100644
--- a/source/blender/readblenfile/SConscript
+++ b/source/blender/readblenfile/SConscript
@@ -5,4 +5,4 @@ sources = env.Glob('intern/*.c')
incs = '. ../blenloader ../blenloader/intern ../blenkernel ../blenlib ../makesdna ../../kernel/gen_messaging'
-env.BlenderLib ( 'bf_readblenfile', sources, Split(incs), [], libtype=['core','player'], priority = [0,195] )
+env.BlenderLib ( 'bf_readblenfile', sources, Split(incs), [], libtype=['core','player'], priority = [0, 220] )
diff --git a/source/blender/readblenfile/intern/BLO_readblenfile.c b/source/blender/readblenfile/intern/BLO_readblenfile.c
index 5672b9f4cb2..40a991ad702 100644
--- a/source/blender/readblenfile/intern/BLO_readblenfile.c
+++ b/source/blender/readblenfile/intern/BLO_readblenfile.c
@@ -43,7 +43,6 @@
#ifdef WIN32
#include <io.h> // read, open
-#include "BLI_winstuff.h"
#else // ! WIN32
#include <unistd.h> // read
#endif
diff --git a/source/blender/render/CMakeLists.txt b/source/blender/render/CMakeLists.txt
index 3284f7ea79a..411bd61c3ff 100644
--- a/source/blender/render/CMakeLists.txt
+++ b/source/blender/render/CMakeLists.txt
@@ -27,24 +27,23 @@
FILE(GLOB SRC intern/source/*.c)
SET(INC
- intern/include ../../../intern/guardedalloc ../blenlib ../makesdna
- extern/include ../blenkernel ../imbuf
- ../include ../../kernel/gen_messaging ../blenloader
- ../../../intern/smoke/extern
- ../makesrna
+ intern/include ../../../intern/guardedalloc ../blenlib ../makesdna
+ extern/include ../blenkernel ../radiosity/extern/include ../imbuf
+ ../quicktime ../include ../../kernel/gen_messaging ../blenloader
+ ../makesrna
)
IF(WITH_OPENEXR)
- ADD_DEFINITIONS(-DWITH_OPENEXR)
+ ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
IF(WITH_QUICKTIME)
- SET(INC ${INC} ../quicktime ${QUICKTIME_INC})
- ADD_DEFINITIONS(-DWITH_QUICKTIME)
+ SET(INC ${INC} ${QUICKTIME_INC})
+ ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
IF(WITH_FFMPEG)
- ADD_DEFINITIONS(-DWITH_FFMPEG)
+ ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
#TODO
diff --git a/source/blender/render/SConscript b/source/blender/render/SConscript
index db151775b96..dbd9f65254b 100644
--- a/source/blender/render/SConscript
+++ b/source/blender/render/SConscript
@@ -6,7 +6,7 @@ sources = env.Glob('intern/source/*.c')
incs = 'intern/include #/intern/guardedalloc ../blenlib ../makesdna ../makesrna'
incs += ' extern/include ../blenkernel ../radiosity/extern/include ../imbuf'
-incs += ' ../include ../blenloader ../../../intern/smoke/extern'
+incs += ' ../include ../blenloader'
defs = []
diff --git a/source/blender/render/extern/include/RE_shader_ext.h b/source/blender/render/extern/include/RE_shader_ext.h
index 435e3ddc07f..5f5b493a9ec 100644
--- a/source/blender/render/extern/include/RE_shader_ext.h
+++ b/source/blender/render/extern/include/RE_shader_ext.h
@@ -112,7 +112,7 @@ typedef struct ShadeInput
/* internal face coordinates */
float u, v, dx_u, dx_v, dy_u, dy_v;
- float co[3], view[3], camera_co[3];
+ float co[3], view[3];
/* copy from material, keep synced so we can do memcopy */
/* current size: 23*4 */
@@ -160,7 +160,6 @@ typedef struct ShadeInput
int samplenr; /* sample counter, to detect if we should do shadow again */
int depth; /* 1 or larger on raytrace shading */
- int volume_depth; /* number of intersections through volumes */
/* stored copy of original face normal (facenor)
* before flipping. Used in Front/back output on geometry node */
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index e50e498228d..ab3758781ce 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -201,9 +201,6 @@ struct Render
ListBase customdata_names;
struct Object *excludeob;
- ListBase render_volumes_inside;
- ListBase volumes;
- ListBase volume_precache_parts;
/* arena for allocating data for use during render, for
* example dynamic TFaces to go in the VlakRen structure.
@@ -295,9 +292,7 @@ typedef struct ObjectInstanceRen {
float dupliorco[3], dupliuv[2];
float (*duplitexmat)[4];
-
- struct VolumePrecache *volume_precache;
-
+
float *vectors;
int totvector;
} ObjectInstanceRen;
@@ -407,46 +402,6 @@ typedef struct StrandRen {
float orco[3];
} StrandRen;
-/* ------------------------------------------------------------------------- */
-
-typedef struct VolumeOb
-{
- struct VolumeOb *next, *prev;
- struct Material *ma;
- struct ObjectRen *obr;
-} VolumeOb;
-
-typedef struct MatInside {
- struct MatInside *next, *prev;
- struct Material *ma;
- struct ObjectInstanceRen *obi;
-} MatInside;
-
-typedef struct VolPrecachePart
-{
- struct VolPrecachePart *next, *prev;
- struct RayTree *tree;
- struct ShadeInput *shi;
- struct ObjectInstanceRen *obi;
- int num;
- int minx, maxx;
- int miny, maxy;
- int minz, maxz;
- int res[3];
- float bbmin[3];
- float voxel[3];
- int working, done;
-} VolPrecachePart;
-
-typedef struct VolumePrecache
-{
- int res[3];
- float *data_r;
- float *data_g;
- float *data_b;
-} VolumePrecache;
-
-/* ------------------------------------------------------------------------- */
struct LampRen;
struct MTex;
diff --git a/source/blender/render/intern/include/shading.h b/source/blender/render/intern/include/shading.h
index 95bccd2be1e..d195f32d5ef 100644
--- a/source/blender/render/intern/include/shading.h
+++ b/source/blender/render/intern/include/shading.h
@@ -33,7 +33,6 @@ struct VlakRen;
struct StrandSegment;
struct StrandPoint;
struct ObjectInstanceRen obi;
-struct Isect;
/* shadeinput.c */
@@ -53,7 +52,6 @@ typedef struct ShadeSample {
/* also the node shader callback */
void shade_material_loop(struct ShadeInput *shi, struct ShadeResult *shr);
-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);
@@ -89,11 +87,7 @@ void shade_color(struct ShadeInput *shi, ShadeResult *shr);
void ambient_occlusion_to_diffuse(struct ShadeInput *shi, float *diff);
void ambient_occlusion(struct ShadeInput *shi);
-ListBase *get_lights(struct ShadeInput *shi);
float lamp_get_visibility(struct LampRen *lar, float *co, 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);
-
-/* rayshade.c */
-extern void shade_ray(struct Isect *is, struct ShadeInput *shi, struct ShadeResult *shr);
diff --git a/source/blender/render/intern/include/texture.h b/source/blender/render/intern/include/texture.h
index 78d6a912af1..c254b768292 100644
--- a/source/blender/render/intern/include/texture.h
+++ b/source/blender/render/intern/include/texture.h
@@ -56,7 +56,6 @@ 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_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);
void init_render_textures(Render *re);
void end_render_textures(void);
diff --git a/source/blender/render/intern/include/volume_precache.h b/source/blender/render/intern/include/volume_precache.h
deleted file mode 100644
index 9d87a219c82..00000000000
--- a/source/blender/render/intern/include/volume_precache.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 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): Matt Ebb.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-void volume_precache(Render *re);
-void free_volume_precache(Render *re);
-int point_inside_volume_objectinstance(ObjectInstanceRen *obi, float *co);
-
-#define VOL_MS_TIMESTEP 0.1f \ No newline at end of file
diff --git a/source/blender/render/intern/include/volumetric.h b/source/blender/render/intern/include/volumetric.h
deleted file mode 100644
index 026b4840ea3..00000000000
--- a/source/blender/render/intern/include/volumetric.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 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): Matt Ebb.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-float vol_get_stepsize(struct ShadeInput *shi, int context);
-float vol_get_density(struct ShadeInput *shi, float *co);
-void vol_get_scattering(ShadeInput *shi, float *scatter_col, float *co, float stepsize, float density);
-
-void shade_volume_outside(ShadeInput *shi, ShadeResult *shr);
-void shade_volume_inside(ShadeInput *shi, ShadeResult *shr);
-void shade_volume_shadow(struct ShadeInput *shi, struct ShadeResult *shr, struct Isect *last_is);
-
-#define STEPSIZE_VIEW 0
-#define STEPSIZE_SHADE 1
-
-#define VOL_IS_BACKFACE 1
-#define VOL_IS_SAMEMATERIAL 2
-
-#define VOL_BOUNDS_DEPTH 0
-#define VOL_BOUNDS_SS 1
-
-#define VOL_SHADE_OUTSIDE 0
-#define VOL_SHADE_INSIDE 1
diff --git a/source/blender/render/intern/include/voxeldata.h b/source/blender/render/intern/include/voxeldata.h
deleted file mode 100644
index b291bdc096d..00000000000
--- a/source/blender/render/intern/include/voxeldata.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 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): Raul Fernandez Hernandez (Farsthary), Matt Ebb.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef VOXELDATA_H
-#define VOXELDATA_H
-
-struct Render;
-struct TexResult;
-
-typedef struct VoxelDataHeader
-{
- int resolX, resolY, resolZ;
- int frames;
-} VoxelDataHeader;
-
-void make_voxeldata(struct Render *re);
-void free_voxeldata(struct Render *re);
-int voxeldatatex(struct Tex *tex, float *texvec, struct TexResult *texres);
-
-#endif /* VOXELDATA_H */
diff --git a/source/blender/render/intern/source/Makefile b/source/blender/render/intern/source/Makefile
index c313549f9b9..3c8d0f637a3 100644
--- a/source/blender/render/intern/source/Makefile
+++ b/source/blender/render/intern/source/Makefile
@@ -39,6 +39,7 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
# The external modules follow after. There should be a nicer way to say this.
CPPFLAGS += -I../include
CPPFLAGS += -I../../extern/include
+CPPFLAGS += -I../../../radiosity/extern/include
CPPFLAGS += -I../../../blenlib
CPPFLAGS += -I../../../imbuf
CPPFLAGS += -I../../../makesdna
@@ -50,7 +51,6 @@ CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
# not very neat: the rest of blender..
CPPFLAGS += -I../../../editors/include
CPPFLAGS += $(NAN_SDLCFLAGS)
-CPPFLAGS += -I../../../../../intern/smoke/extern
ifeq ($(WITH_QUICKTIME), true)
CPPFLAGS += -DWITH_QUICKTIME
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 99825c0c2ff..2c264ce2337 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -31,7 +31,7 @@
#include <string.h>
#include <limits.h>
-
+#include "MTC_matrixops.h"
#include "MEM_guardedalloc.h"
@@ -100,8 +100,6 @@
#include "envmap.h"
#include "occlusion.h"
-#include "pointdensity.h"
-#include "voxeldata.h"
#include "render_types.h"
#include "rendercore.h"
#include "renderdatabase.h"
@@ -110,7 +108,6 @@
#include "shading.h"
#include "strand.h"
#include "texture.h"
-#include "volume_precache.h"
#include "sss.h"
#include "strand.h"
#include "zbuf.h"
@@ -191,8 +188,8 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void),
if (re) re->flag |= R_HALO;
else stargrid *= 1.0; /* then it draws fewer */
- if(re) Mat4Invert(mat, re->viewmat);
- else Mat4One(mat);
+ if(re) MTC_Mat4Invert(mat, re->viewmat);
+ else MTC_Mat4One(mat);
/* BOUNDING BOX CALCULATION
* bbox goes from z = loc_near_var | loc_far_var,
@@ -240,7 +237,7 @@ void RE_make_stars(Render *re, Scene *scenev3d, void (*initfunc)(void),
done++;
}
else {
- Mat4MulVecfl(re->viewmat, vec);
+ MTC_Mat4MulVecfl(re->viewmat, vec);
/* in vec are global coordinates
* calculate distance to camera
@@ -829,7 +826,7 @@ static void autosmooth(Render *re, ObjectRen *obr, float mat[][4], int degr)
/* rotate vertices and calculate normal of faces */
for(a=0; a<obr->totvert; a++) {
ver= RE_findOrAddVert(obr, a);
- Mat4MulVecfl(mat, ver->co);
+ MTC_Mat4MulVecfl(mat, ver->co);
}
for(a=0; a<obr->totvlak; a++) {
vlr= RE_findOrAddVlak(obr, a);
@@ -920,7 +917,6 @@ static Material *give_render_material(Render *re, Object *ob, int nr)
if(re->r.mode & R_SPEED) ma->texco |= NEED_UV;
- if(ma->material_type == MA_TYPE_VOLUME) ma->mode |= MA_TRANSP;
if((ma->mode & MA_TRANSP) && (ma->mode & MA_ZTRANSP))
re->flag |= R_ZTRA;
@@ -1280,19 +1276,19 @@ static void particle_billboard(Render *re, ObjectRen *obr, Material *ma, Particl
VECADD(vlr->v1->co, bb_center, xvec);
VECADD(vlr->v1->co, vlr->v1->co, yvec);
- Mat4MulVecfl(re->viewmat, vlr->v1->co);
+ MTC_Mat4MulVecfl(re->viewmat, vlr->v1->co);
VECSUB(vlr->v2->co, bb_center, xvec);
VECADD(vlr->v2->co, vlr->v2->co, yvec);
- Mat4MulVecfl(re->viewmat, vlr->v2->co);
+ MTC_Mat4MulVecfl(re->viewmat, vlr->v2->co);
VECSUB(vlr->v3->co, bb_center, xvec);
VECSUB(vlr->v3->co, vlr->v3->co, yvec);
- Mat4MulVecfl(re->viewmat, vlr->v3->co);
+ MTC_Mat4MulVecfl(re->viewmat, vlr->v3->co);
VECADD(vlr->v4->co, bb_center, xvec);
VECSUB(vlr->v4->co, vlr->v4->co, yvec);
- Mat4MulVecfl(re->viewmat, vlr->v4->co);
+ MTC_Mat4MulVecfl(re->viewmat, vlr->v4->co);
CalcNormFloat4(vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co, vlr->n);
VECCOPY(vlr->v1->n,vlr->n);
@@ -1392,7 +1388,7 @@ static void particle_normal_ren(short ren_as, ParticleSettings *part, Render *re
VECCOPY(loc, state->co);
if(ren_as != PART_DRAW_BB)
- Mat4MulVecfl(re->viewmat, loc);
+ MTC_Mat4MulVecfl(re->viewmat, loc);
switch(ren_as) {
case PART_DRAW_LINE:
@@ -1401,7 +1397,7 @@ static void particle_normal_ren(short ren_as, ParticleSettings *part, Render *re
sd->size = hasize;
VECCOPY(vel, state->vel);
- Mat4Mul3Vecfl(re->viewmat, vel);
+ MTC_Mat4Mul3Vecfl(re->viewmat, vel);
Normalize(vel);
if(part->draw & PART_DRAW_VEL_LENGTH)
@@ -1621,8 +1617,8 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
}
/* 2.5 setup matrices */
- Mat4MulMat4(mat, ob->obmat, re->viewmat);
- Mat4Invert(ob->imat, mat); /* need to be that way, for imat texture */
+ MTC_Mat4MulMat4(mat, ob->obmat, re->viewmat);
+ MTC_Mat4Invert(ob->imat, mat); /* need to be that way, for imat texture */
Mat3CpyMat4(nmat, ob->imat);
Mat3Transp(nmat);
@@ -1743,10 +1739,8 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
pa_size = pa->size;
- BLI_srandom(psys->seed+a);
-
- r_tilt = 2.0f*(BLI_frand() - 0.5f);
- r_length = BLI_frand();
+ r_tilt = 1.0f + pa->r_ave[0];
+ r_length = 0.5f * (1.0f + pa->r_ave[1]);
if(path_nbr) {
cache = psys->pathcache[a];
@@ -1904,7 +1898,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
time= curlen/strandlen;
VECCOPY(loc,state.co);
- Mat4MulVecfl(re->viewmat,loc);
+ MTC_Mat4MulVecfl(re->viewmat,loc);
if(strandbuf) {
VECCOPY(svert->co, loc);
@@ -2046,8 +2040,8 @@ static void make_render_halos(Render *re, ObjectRen *obr, Mesh *me, int totvert,
float vec[3], hasize, mat[4][4], imat[3][3];
int a, ok, seed= ma->seed1;
- Mat4MulMat4(mat, ob->obmat, re->viewmat);
- Mat3CpyMat4(imat, ob->imat);
+ MTC_Mat4MulMat4(mat, ob->obmat, re->viewmat);
+ MTC_Mat3CpyMat4(imat, ob->imat);
re->flag |= R_HALO;
@@ -2058,7 +2052,7 @@ static void make_render_halos(Render *re, ObjectRen *obr, Mesh *me, int totvert,
hasize= ma->hasize;
VECCOPY(vec, mvert->co);
- Mat4MulVecfl(mat, vec);
+ MTC_Mat4MulVecfl(mat, vec);
if(ma->mode & MA_HALOPUNO) {
xn= mvert->no[0];
@@ -2191,7 +2185,7 @@ static void displace_render_vert(Render *re, ObjectRen *obr, ShadeInput *shi, Ve
}
if (texco & TEXCO_GLOB) {
VECCOPY(shi->gl, shi->co);
- Mat4MulVecfl(re->viewinv, shi->gl);
+ MTC_Mat4MulVecfl(re->viewinv, shi->gl);
}
if (texco & TEXCO_NORM) {
VECCOPY(shi->orn, shi->vn);
@@ -2332,9 +2326,9 @@ static void init_render_mball(Render *re, ObjectRen *obr)
if (ob!=find_basis_mball(re->scene, ob))
return;
- Mat4MulMat4(mat, ob->obmat, re->viewmat);
- Mat4Invert(ob->imat, mat);
- Mat3CpyMat4(imat, ob->imat);
+ MTC_Mat4MulMat4(mat, ob->obmat, re->viewmat);
+ MTC_Mat4Invert(ob->imat, mat);
+ MTC_Mat3CpyMat4(imat, ob->imat);
ma= give_render_material(re, ob, 1);
@@ -2355,7 +2349,7 @@ static void init_render_mball(Render *re, ObjectRen *obr)
ver= RE_findOrAddVert(obr, obr->totvert++);
VECCOPY(ver->co, data);
- Mat4MulVecfl(mat, ver->co);
+ MTC_Mat4MulVecfl(mat, ver->co);
/* render normals are inverted */
xn= -nors[0];
@@ -2439,7 +2433,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
if(orco) {
v1->orco= orco; orco+= 3; orcoret++;
}
- Mat4MulVecfl(mat, v1->co);
+ MTC_Mat4MulVecfl(mat, v1->co);
for (v = 1; v < sizev; v++) {
ver= RE_findOrAddVert(obr, obr->totvert++);
@@ -2447,7 +2441,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
if(orco) {
ver->orco= orco; orco+= 3; orcoret++;
}
- Mat4MulVecfl(mat, ver->co);
+ MTC_Mat4MulVecfl(mat, ver->co);
}
/* if V-cyclic, add extra vertices at end of the row */
if (dl->flag & DL_CYCL_U) {
@@ -2597,8 +2591,8 @@ static void init_render_surf(Render *re, ObjectRen *obr)
nu= cu->nurb.first;
if(nu==0) return;
- Mat4MulMat4(mat, ob->obmat, re->viewmat);
- Mat4Invert(ob->imat, mat);
+ MTC_Mat4MulMat4(mat, ob->obmat, re->viewmat);
+ MTC_Mat4Invert(ob->imat, mat);
/* material array */
totmat= ob->totcol+1;
@@ -2658,8 +2652,8 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
dl= cu->disp.first;
if(cu->disp.first==NULL) return;
- Mat4MulMat4(mat, ob->obmat, re->viewmat);
- Mat4Invert(ob->imat, mat);
+ MTC_Mat4MulMat4(mat, ob->obmat, re->viewmat);
+ MTC_Mat4Invert(ob->imat, mat);
/* material array */
totmat= ob->totcol+1;
@@ -2701,7 +2695,7 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
ver->flag = 0;
}
- Mat4MulVecfl(mat, ver->co);
+ MTC_Mat4MulVecfl(mat, ver->co);
if (orco) {
ver->orco = orco;
@@ -2753,7 +2747,7 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
ver= RE_findOrAddVert(obr, obr->totvert++);
VECCOPY(ver->co, fp);
- Mat4MulVecfl(mat, ver->co);
+ MTC_Mat4MulVecfl(mat, ver->co);
fp+= 3;
if (orco) {
@@ -2982,53 +2976,6 @@ static void use_mesh_edge_lookup(ObjectRen *obr, DerivedMesh *dm, MEdge *medge,
}
}
-static void free_camera_inside_volumes(Render *re)
-{
- BLI_freelistN(&re->render_volumes_inside);
-}
-
-static void init_camera_inside_volumes(Render *re)
-{
- ObjectInstanceRen *obi;
- VolumeOb *vo;
- float co[3] = {0.f, 0.f, 0.f};
-
- for(vo= re->volumes.first; vo; vo= vo->next) {
- for(obi= re->instancetable.first; obi; obi= obi->next) {
- if (obi->obr == vo->obr) {
- if (point_inside_volume_objectinstance(obi, co)) {
- MatInside *mi;
-
- mi = MEM_mallocN(sizeof(MatInside), "camera inside material");
- mi->ma = vo->ma;
- mi->obi = obi;
-
- BLI_addtail(&(re->render_volumes_inside), mi);
- }
- }
- }
- }
-
- /* debug {
- MatInside *m;
- for (m=re->render_volumes_inside.first; m; m=m->next) {
- printf("matinside: ma: %s \n", m->ma->id.name+2);
- }
- }*/
-}
-
-static void add_volume(Render *re, ObjectRen *obr, Material *ma)
-{
- struct VolumeOb *vo;
-
- vo = MEM_mallocN(sizeof(VolumeOb), "volume object");
-
- vo->ma = ma;
- vo->obr = obr;
-
- BLI_addtail(&re->volumes, vo);
-}
-
static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
{
Object *ob= obr->ob;
@@ -3050,9 +2997,9 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
me= ob->data;
- Mat4MulMat4(mat, ob->obmat, re->viewmat);
- Mat4Invert(ob->imat, mat);
- Mat3CpyMat4(imat, ob->imat);
+ MTC_Mat4MulMat4(mat, ob->obmat, re->viewmat);
+ MTC_Mat4Invert(ob->imat, mat);
+ MTC_Mat3CpyMat4(imat, ob->imat);
if(me->totvert==0)
return;
@@ -3133,7 +3080,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
ver= RE_findOrAddVert(obr, obr->totvert++);
VECCOPY(ver->co, mvert->co);
if(do_autosmooth==0) /* autosmooth on original unrotated data to prevent differences between frames */
- Mat4MulVecfl(mat, ver->co);
+ MTC_Mat4MulVecfl(mat, ver->co);
if(orco) {
ver->orco= orco;
@@ -3354,13 +3301,13 @@ static void initshadowbuf(Render *re, LampRen *lar, float mat[][4])
shb->soft= lar->soft;
shb->shadhalostep= lar->shadhalostep;
- Mat4Ortho(mat);
- Mat4Invert(shb->winmat, mat); /* winmat is temp */
+ MTC_Mat4Ortho(mat);
+ MTC_Mat4Invert(shb->winmat, mat); /* winmat is temp */
/* matrix: combination of inverse view and lampmat */
/* calculate again: the ortho-render has no correct viewinv */
- Mat4Invert(viewinv, re->viewmat);
- Mat4MulMat4(shb->viewmat, viewinv, shb->winmat);
+ MTC_Mat4Invert(viewinv, re->viewmat);
+ MTC_Mat4MulMat4(shb->viewmat, viewinv, shb->winmat);
/* projection */
shb->d= lar->clipsta;
@@ -3438,11 +3385,11 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
BLI_addtail(&re->lampren, lar);
go->lampren= lar;
- Mat4MulMat4(mat, ob->obmat, re->viewmat);
- Mat4Invert(ob->imat, mat);
+ MTC_Mat4MulMat4(mat, ob->obmat, re->viewmat);
+ MTC_Mat4Invert(ob->imat, mat);
- Mat3CpyMat4(lar->mat, mat);
- Mat3CpyMat4(lar->imat, ob->imat);
+ MTC_Mat3CpyMat4(lar->mat, mat);
+ MTC_Mat3CpyMat4(lar->imat, ob->imat);
lar->bufsize = la->bufsize;
lar->samp = la->samp;
@@ -3598,7 +3545,7 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
lar->sh_invcampos[0]= -lar->co[0];
lar->sh_invcampos[1]= -lar->co[1];
lar->sh_invcampos[2]= -lar->co[2];
- Mat3MulVecfl(lar->imat, lar->sh_invcampos);
+ MTC_Mat3MulVecfl(lar->imat, lar->sh_invcampos);
/* z factor, for a normalized volume */
angle= saacos(lar->spotsi);
@@ -3862,7 +3809,6 @@ static void set_fullsample_flag(Render *re, ObjectRen *obr)
vlr->flag |= R_FULL_OSA;
else if(trace) {
if(mode & MA_SHLESS);
- else if(vlr->mat->material_type == MA_TYPE_VOLUME);
else if((mode & MA_RAYMIRROR) || ((mode & MA_TRANSP) && (mode & MA_RAYTRANSP)))
/* for blurry reflect/refract, better to take more samples
* inside the raytrace than as OSA samples */
@@ -4222,7 +4168,7 @@ static void set_dupli_tex_mat(Render *re, ObjectInstanceRen *obi, DupliObject *d
obi->duplitexmat= BLI_memarena_alloc(re->memArena, sizeof(float)*4*4);
Mat4Invert(imat, dob->mat);
- Mat4MulSerie(obi->duplitexmat, re->viewmat, dob->omat, imat, re->viewinv, 0, 0, 0, 0);
+ MTC_Mat4MulSerie(obi->duplitexmat, re->viewmat, dob->omat, imat, re->viewinv, 0, 0, 0, 0);
}
}
@@ -4270,7 +4216,7 @@ static void add_render_object(Render *re, Object *ob, Object *par, DupliObject *
ObjectRen *obr;
ObjectInstanceRen *obi;
ParticleSystem *psys;
- int show_emitter, allow_render= 1, index, psysindex, i;
+ int show_emitter, allow_render= 1, index, psysindex;
index= (dob)? dob->index: 0;
@@ -4306,12 +4252,6 @@ static void add_render_object(Render *re, Object *ob, Object *par, DupliObject *
}
else
find_dupli_instances(re, obr);
-
- for (i=1; i<=ob->totcol; i++) {
- Material* ma = give_render_material(re, ob, i);
- if (ma && ma->material_type == MA_TYPE_VOLUME)
- add_volume(re, obr, ma);
- }
}
/* and one render object per particle system */
@@ -4352,8 +4292,8 @@ static void init_render_object(Render *re, Object *ob, Object *par, DupliObject
else if(render_object_type(ob->type))
add_render_object(re, ob, par, dob, timeoffset, vectorlay);
else {
- Mat4MulMat4(mat, ob->obmat, re->viewmat);
- Mat4Invert(ob->imat, mat);
+ MTC_Mat4MulMat4(mat, ob->obmat, re->viewmat);
+ MTC_Mat4Invert(ob->imat, mat);
}
time= PIL_check_seconds_timer();
@@ -4394,8 +4334,6 @@ void RE_Database_Free(Render *re)
curvemapping_free(lar->curfalloff);
}
- free_volume_precache(re);
-
BLI_freelistN(&re->lampren);
BLI_freelistN(&re->lights);
@@ -4422,11 +4360,6 @@ void RE_Database_Free(Render *re)
end_render_materials();
end_render_textures();
- free_pointdensities(re);
- free_voxeldata(re);
-
- free_camera_inside_volumes(re);
-
if(re->wrld.aosphere) {
MEM_freeN(re->wrld.aosphere);
re->wrld.aosphere= NULL;
@@ -4603,8 +4536,8 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp
for(SETLOOPER(re->scene, base)) {
ob= base->object;
/* imat objects has to be done here, since displace can have texture using Object map-input */
- Mat4MulMat4(mat, ob->obmat, re->viewmat);
- Mat4Invert(ob->imat, mat);
+ MTC_Mat4MulMat4(mat, ob->obmat, re->viewmat);
+ MTC_Mat4Invert(ob->imat, mat);
/* each object should only be rendered once */
ob->flag &= ~OB_DONE;
ob->transflag &= ~OB_RENDER_DUPLI;
@@ -4750,8 +4683,8 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp
if(redoimat) {
for(SETLOOPER(re->scene, base)) {
ob= base->object;
- Mat4MulMat4(mat, ob->obmat, re->viewmat);
- Mat4Invert(ob->imat, mat);
+ MTC_Mat4MulMat4(mat, ob->obmat, re->viewmat);
+ MTC_Mat4Invert(ob->imat, mat);
}
}
@@ -4819,8 +4752,6 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view)
/* MAKE RENDER DATA */
database_init_objects(re, lay, 0, 0, 0, 0);
-
- init_camera_inside_volumes(re);
if(!re->test_break(re->tbh)) {
int tothalo;
@@ -4869,13 +4800,6 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view)
/* ENVIRONMENT MAPS */
if(!re->test_break(re->tbh))
make_envmaps(re);
-
- /* point density texture */
- if(!re->test_break(re->tbh))
- make_pointdensities(re);
- /* voxel data texture */
- if(!re->test_break(re->tbh))
- make_voxeldata(re);
}
if(!re->test_break(re->tbh))
@@ -4892,11 +4816,6 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view)
if((re->r.mode & R_SSS) && !re->test_break(re->tbh))
if(re->r.renderer==R_INTERN)
make_sss_tree(re);
-
- if(!re->test_break(re->tbh))
- if(re->r.mode & R_RAYTRACE)
- volume_precache(re);
-
}
if(re->test_break(re->tbh))
@@ -5177,7 +5096,7 @@ static int load_fluidsimspeedvectors(Render *re, ObjectInstanceRen *obi, float *
return 0;
Mat4CpyMat4(mat, re->viewmat);
- Mat4Invert(imat, mat);
+ MTC_Mat4Invert(imat, mat);
/* set first vertex OK */
if(!fss->meshSurfNormals) return 0;
diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c
index b5774d11799..a57e38f47c8 100644
--- a/source/blender/render/intern/source/envmap.c
+++ b/source/blender/render/intern/source/envmap.c
@@ -51,7 +51,7 @@
#include "BKE_texture.h"
#include "BKE_utildefines.h"
-
+#include "MTC_matrixops.h"
/* this module */
#include "render_types.h"
@@ -211,9 +211,9 @@ static void envmap_transmatrix(float mat[][4], int part)
eul[2]= -M_PI/2.0;
}
- Mat4CpyMat4(tmat, mat);
+ MTC_Mat4CpyMat4(tmat, mat);
EulToMat4(eul, rotmat);
- Mat4MulSerie(mat, tmat, rotmat,
+ MTC_Mat4MulSerie(mat, tmat, rotmat,
0, 0, 0,
0, 0, 0);
}
@@ -231,12 +231,12 @@ static void env_rotate_scene(Render *re, float mat[][4], int mode)
int a;
if(mode==0) {
- Mat4Invert(tmat, mat);
- Mat3CpyMat4(imat, tmat);
+ MTC_Mat4Invert(tmat, mat);
+ MTC_Mat3CpyMat4(imat, tmat);
}
else {
- Mat4CpyMat4(tmat, mat);
- Mat3CpyMat4(imat, mat);
+ MTC_Mat4CpyMat4(tmat, mat);
+ MTC_Mat3CpyMat4(imat, mat);
}
for(obi=re->instancetable.first; obi; obi=obi->next) {
@@ -267,7 +267,7 @@ static void env_rotate_scene(Render *re, float mat[][4], int mode)
if((a & 255)==0) har= obr->bloha[a>>8];
else har++;
- Mat4MulVecfl(tmat, har->co);
+ MTC_Mat4MulVecfl(tmat, har->co);
}
}
@@ -280,22 +280,22 @@ static void env_rotate_scene(Render *re, float mat[][4], int mode)
Mat3CpyMat3(cmat, lar->imat);
Mat3MulMat3(lar->imat, cmat, imat);
- Mat3MulVecfl(imat, lar->vec);
- Mat4MulVecfl(tmat, lar->co);
+ MTC_Mat3MulVecfl(imat, lar->vec);
+ MTC_Mat4MulVecfl(tmat, lar->co);
lar->sh_invcampos[0]= -lar->co[0];
lar->sh_invcampos[1]= -lar->co[1];
lar->sh_invcampos[2]= -lar->co[2];
- Mat3MulVecfl(lar->imat, lar->sh_invcampos);
+ MTC_Mat3MulVecfl(lar->imat, lar->sh_invcampos);
lar->sh_invcampos[2]*= lar->sh_zfac;
if(lar->shb) {
if(mode==1) {
- Mat4Invert(pmat, mat);
- Mat4MulMat4(smat, pmat, lar->shb->viewmat);
- Mat4MulMat4(lar->shb->persmat, smat, lar->shb->winmat);
+ MTC_Mat4Invert(pmat, mat);
+ MTC_Mat4MulMat4(smat, pmat, lar->shb->viewmat);
+ MTC_Mat4MulMat4(lar->shb->persmat, smat, lar->shb->winmat);
}
- else Mat4MulMat4(lar->shb->persmat, lar->shb->viewmat, lar->shb->winmat);
+ else MTC_Mat4MulMat4(lar->shb->persmat, lar->shb->viewmat, lar->shb->winmat);
}
}
@@ -373,8 +373,8 @@ static void env_set_imats(Render *re)
base= re->scene->base.first;
while(base) {
- Mat4MulMat4(mat, base->object->obmat, re->viewmat);
- Mat4Invert(base->object->imat, mat);
+ MTC_Mat4MulMat4(mat, base->object->obmat, re->viewmat);
+ MTC_Mat4Invert(base->object->imat, mat);
base= base->next;
}
@@ -393,18 +393,18 @@ static void render_envmap(Render *re, EnvMap *env)
short part;
/* need a recalc: ortho-render has no correct viewinv */
- Mat4Invert(oldviewinv, re->viewmat);
+ MTC_Mat4Invert(oldviewinv, re->viewmat);
envre= envmap_render_copy(re, env);
/* precalc orthmat for object */
- Mat4CpyMat4(orthmat, env->object->obmat);
- Mat4Ortho(orthmat);
+ MTC_Mat4CpyMat4(orthmat, env->object->obmat);
+ MTC_Mat4Ortho(orthmat);
/* need imat later for texture imat */
- Mat4MulMat4(mat, orthmat, re->viewmat);
- Mat4Invert(tmat, mat);
- Mat3CpyMat4(env->obimat, tmat);
+ MTC_Mat4MulMat4(mat, orthmat, re->viewmat);
+ MTC_Mat4Invert(tmat, mat);
+ MTC_Mat3CpyMat4(env->obimat, tmat);
for(part=0; part<6; part++) {
if(env->type==ENV_PLANE && part!=1)
@@ -412,17 +412,17 @@ static void render_envmap(Render *re, EnvMap *env)
re->display_clear(re->dch, envre->result);
- Mat4CpyMat4(tmat, orthmat);
+ MTC_Mat4CpyMat4(tmat, orthmat);
envmap_transmatrix(tmat, part);
- Mat4Invert(mat, tmat);
+ MTC_Mat4Invert(mat, tmat);
/* mat now is the camera 'viewmat' */
- Mat4CpyMat4(envre->viewmat, mat);
- Mat4CpyMat4(envre->viewinv, tmat);
+ MTC_Mat4CpyMat4(envre->viewmat, mat);
+ MTC_Mat4CpyMat4(envre->viewinv, tmat);
/* we have to correct for the already rotated vertexcoords */
- Mat4MulMat4(tmat, oldviewinv, envre->viewmat);
- Mat4Invert(env->imat, tmat);
+ MTC_Mat4MulMat4(tmat, oldviewinv, envre->viewmat);
+ MTC_Mat4Invert(env->imat, tmat);
env_rotate_scene(envre, tmat, 1);
init_render_world(envre);
@@ -503,13 +503,13 @@ void make_envmaps(Render *re)
float orthmat[4][4], mat[4][4], tmat[4][4];
/* precalc orthmat for object */
- Mat4CpyMat4(orthmat, env->object->obmat);
- Mat4Ortho(orthmat);
+ MTC_Mat4CpyMat4(orthmat, env->object->obmat);
+ MTC_Mat4Ortho(orthmat);
/* need imat later for texture imat */
- Mat4MulMat4(mat, orthmat, re->viewmat);
- Mat4Invert(tmat, mat);
- Mat3CpyMat4(env->obimat, tmat);
+ MTC_Mat4MulMat4(mat, orthmat, re->viewmat);
+ MTC_Mat4Invert(tmat, mat);
+ MTC_Mat3CpyMat4(env->obimat, tmat);
}
else {
@@ -678,20 +678,20 @@ int envmaptex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexRe
/* rotate to envmap space, if object is set */
VECCOPY(vec, texvec);
- if(env->object) Mat3MulVecfl(env->obimat, vec);
- else Mat4Mul3Vecfl(R.viewinv, vec);
+ if(env->object) MTC_Mat3MulVecfl(env->obimat, vec);
+ else MTC_Mat4Mul3Vecfl(R.viewinv, vec);
face= envcube_isect(env, vec, sco);
ibuf= env->cube[face];
if(osatex) {
if(env->object) {
- Mat3MulVecfl(env->obimat, dxt);
- Mat3MulVecfl(env->obimat, dyt);
+ MTC_Mat3MulVecfl(env->obimat, dxt);
+ MTC_Mat3MulVecfl(env->obimat, dyt);
}
else {
- Mat4Mul3Vecfl(R.viewinv, dxt);
- Mat4Mul3Vecfl(R.viewinv, dyt);
+ MTC_Mat4Mul3Vecfl(R.viewinv, dxt);
+ MTC_Mat4Mul3Vecfl(R.viewinv, dyt);
}
set_dxtdyt(dxts, dyts, dxt, dyt, face);
imagewraposa(tex, NULL, ibuf, sco, dxts, dyts, texres);
diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c
index d388e81a745..842adcf8520 100644
--- a/source/blender/render/intern/source/initrender.c
+++ b/source/blender/render/intern/source/initrender.c
@@ -41,7 +41,7 @@
#include "BLI_blenlib.h"
#include "BLI_jitter.h"
-
+#include "MTC_matrixops.h"
#include "DNA_camera_types.h"
#include "DNA_group_types.h"
diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c
index a15377a8c6d..feef3dd424a 100644
--- a/source/blender/render/intern/source/occlusion.c
+++ b/source/blender/render/intern/source/occlusion.c
@@ -630,7 +630,7 @@ static OcclusionTree *occ_tree_build(Render *re)
if((a & 255)==0) vlr= obr->vlaknodes[a>>8].vlak;
else vlr++;
- if((vlr->mat->mode & MA_TRACEBLE) && (vlr->mat->material_type == MA_TYPE_SURFACE))
+ if(vlr->mat->mode & MA_TRACEBLE)
totface++;
}
}
@@ -663,7 +663,7 @@ static OcclusionTree *occ_tree_build(Render *re)
if((a & 255)==0) vlr= obr->vlaknodes[a>>8].vlak;
else vlr++;
- if((vlr->mat->mode & MA_TRACEBLE) && (vlr->mat->material_type == MA_TYPE_SURFACE)) {
+ if(vlr->mat->mode & MA_TRACEBLE) {
tree->face[b].obi= c;
tree->face[b].facenr= a;
tree->occlusion[b]= 1.0f;
diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c
index de3a50acddf..75a2ab257f4 100644
--- a/source/blender/render/intern/source/pixelshading.c
+++ b/source/blender/render/intern/source/pixelshading.c
@@ -32,8 +32,8 @@
/* External modules: */
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
-
-
+#include "MTC_matrixops.h"
+#include "MTC_vectorops.h"
#include "DNA_camera_types.h"
#include "DNA_group_types.h"
@@ -155,7 +155,7 @@ static void render_lighting_halo(HaloRen *har, float *colf)
/* rotate view to lampspace */
VECCOPY(lvrot, lv);
- Mat3MulVecfl(lar->imat, lvrot);
+ MTC_Mat3MulVecfl(lar->imat, lvrot);
x= MAX2(fabs(lvrot[0]/lvrot[2]) , fabs(lvrot[1]/lvrot[2]));
/* 1.0/(sqrt(1+x*x)) is equivalent to cos(atan(x)) */
@@ -553,7 +553,7 @@ void shadeSkyView(float *colf, float *rco, float *view, float *dxyview, short th
VECCOPY(lo, view);
if(R.wrld.skytype & WO_SKYREAL) {
- Mat3MulVecfl(R.imat, lo);
+ MTC_Mat3MulVecfl(R.imat, lo);
SWAP(float, lo[1], lo[2]);
@@ -595,7 +595,7 @@ void shadeSunView(float *colf, float *view)
VECCOPY(sview, view);
Normalize(sview);
- Mat3MulVecfl(R.imat, sview);
+ MTC_Mat3MulVecfl(R.imat, sview);
if (sview[2] < 0.0)
sview[2] = 0.0;
Normalize(sview);
@@ -678,7 +678,7 @@ void shadeAtmPixel(struct SunSky *sunsky, float *collector, float fx, float fy,
calc_view_vector(view, fx, fy);
Normalize(view);
- /*Mat3MulVecfl(R.imat, view);*/
+ /*MTC_Mat3MulVecfl(R.imat, view);*/
AtmospherePixleShader(sunsky, view, distance, collector);
}
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
deleted file mode 100644
index 5f8cf5504fa..00000000000
--- a/source/blender/render/intern/source/pointdensity.c
+++ /dev/null
@@ -1,484 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 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.
- *
- * Contributors: Matt Ebb
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <math.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_arithb.h"
-#include "BLI_blenlib.h"
-#include "BLI_kdopbvh.h"
-
-#include "BKE_DerivedMesh.h"
-#include "BKE_global.h"
-#include "BKE_lattice.h"
-#include "BKE_main.h"
-#include "BKE_object.h"
-#include "BKE_particle.h"
-#include "BKE_texture.h"
-
-#include "DNA_texture_types.h"
-#include "DNA_particle_types.h"
-
-#include "render_types.h"
-#include "renderdatabase.h"
-#include "texture.h"
-
-/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-/* defined in pipeline.c, is hardcopy of active dynamic allocated Render */
-/* only to be used here in this file, it's for speed */
-extern struct Render R;
-/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-
-
-static int point_data_used(PointDensity *pd)
-{
- int pd_bitflag = 0;
-
- if ((pd->noise_influence == TEX_PD_NOISE_VEL) || (pd->color_source == TEX_PD_COLOR_PARTVEL) || (pd->color_source == TEX_PD_COLOR_PARTSPEED))
- pd_bitflag |= POINT_DATA_VEL;
- if ((pd->noise_influence == TEX_PD_NOISE_AGE) || (pd->color_source == TEX_PD_COLOR_PARTAGE))
- pd_bitflag |= POINT_DATA_LIFE;
-
- return pd_bitflag;
-}
-
-
-/* additional data stored alongside the point density BVH,
- * accessible by point index number to retrieve other information
- * such as particle velocity or lifetime */
-static void alloc_point_data(PointDensity *pd, int total_particles, int point_data_used)
-{
- int data_size = 0;
-
- if (point_data_used & POINT_DATA_VEL) {
- /* store 3 channels of velocity data */
- data_size += 3;
- }
- if (point_data_used & POINT_DATA_LIFE) {
- /* store 1 channel of lifetime data */
- data_size += 1;
- }
-
- if (data_size)
- pd->point_data = MEM_mallocN(sizeof(float)*data_size*total_particles, "particle point data");
-}
-
-static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, ParticleSystem *psys)
-{
- DerivedMesh* dm;
- ParticleKey state;
- ParticleData *pa=NULL;
- float cfra = bsystem_time(re->scene, ob, (float)re->scene->r.cfra, 0.0);
- int i, childexists;
- int total_particles, offset=0;
- int data_used = point_data_used(pd);
- float partco[3];
- float obview[4][4];
-
-
- /* init everything */
- if (!psys || !ob || !pd) return;
-
- Mat4MulMat4(obview, re->viewinv, ob->obmat);
-
- /* Just to create a valid rendering context for particles */
- psys_render_set(ob, psys, re->viewmat, re->winmat, re->winx, re->winy, 0);
-
- dm = mesh_create_derived_render(re->scene, ob,CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL);
-
- if ( !psys_check_enabled(ob, psys)) {
- psys_render_restore(ob, psys);
- return;
- }
-
- /* in case ob->imat isn't up-to-date */
- Mat4Invert(ob->imat, ob->obmat);
-
- total_particles = psys->totpart+psys->totchild;
- psys->lattice=psys_get_lattice(re->scene,ob,psys);
-
- pd->point_tree = BLI_bvhtree_new(total_particles, 0.0, 4, 6);
- alloc_point_data(pd, total_particles, data_used);
- pd->totpoints = total_particles;
- if (data_used & POINT_DATA_VEL) offset = pd->totpoints*3;
-
- if (psys->totchild > 0 && !(psys->part->draw & PART_DRAW_PARENT))
- childexists = 1;
-
- for (i=0, pa=psys->particles; i < total_particles; i++, pa++) {
-
- state.time = cfra;
- if(psys_get_particle_state(re->scene, ob, psys, i, &state, 0)) {
-
- VECCOPY(partco, state.co);
-
- if (pd->psys_cache_space == TEX_PD_OBJECTSPACE)
- Mat4MulVecfl(ob->imat, partco);
- else if (pd->psys_cache_space == TEX_PD_OBJECTLOC) {
- float obloc[3];
- VECCOPY(obloc, ob->loc);
- VecSubf(partco, partco, obloc);
- } else {
- /* TEX_PD_WORLDSPACE */
- }
-
- BLI_bvhtree_insert(pd->point_tree, i, partco, 1);
-
- if (data_used & POINT_DATA_VEL) {
- pd->point_data[i*3 + 0] = state.vel[0];
- pd->point_data[i*3 + 1] = state.vel[1];
- pd->point_data[i*3 + 2] = state.vel[2];
- }
- if (data_used & POINT_DATA_LIFE) {
- float pa_time;
-
- if (i < psys->totpart) {
- pa_time = (cfra - pa->time)/pa->lifetime;
- } else {
- ChildParticle *cpa= (psys->child + i) - psys->totpart;
- float pa_birthtime, pa_dietime;
-
- pa_time = psys_get_child_time(psys, cpa, cfra, &pa_birthtime, &pa_dietime);
- }
-
- pd->point_data[offset + i] = pa_time;
- }
- }
- }
-
- BLI_bvhtree_balance(pd->point_tree);
- dm->release(dm);
-
- if(psys->lattice){
- end_latt_deform(psys->lattice);
- psys->lattice=0;
- }
-
- psys_render_restore(ob, psys);
-}
-
-
-static void pointdensity_cache_object(Render *re, PointDensity *pd, ObjectRen *obr)
-{
- int i;
-
- if (!obr || !pd) return;
- if(!obr->vertnodes) return;
-
- /* in case ob->imat isn't up-to-date */
- Mat4Invert(obr->ob->imat, obr->ob->obmat);
-
- pd->point_tree = BLI_bvhtree_new(obr->totvert, 0.0, 4, 6);
- pd->totpoints = obr->totvert;
-
- for(i=0; i<obr->totvert; i++) {
- float ver_co[3];
- VertRen *ver= RE_findOrAddVert(obr, i);
-
- VECCOPY(ver_co, ver->co);
- Mat4MulVecfl(re->viewinv, ver_co);
-
- if (pd->ob_cache_space == TEX_PD_OBJECTSPACE) {
- Mat4MulVecfl(obr->ob->imat, ver_co);
- } else if (pd->psys_cache_space == TEX_PD_OBJECTLOC) {
- VecSubf(ver_co, ver_co, obr->ob->loc);
- } else {
- /* TEX_PD_WORLDSPACE */
- }
-
- BLI_bvhtree_insert(pd->point_tree, i, ver_co, 1);
- }
-
- BLI_bvhtree_balance(pd->point_tree);
-
-}
-static void cache_pointdensity(Render *re, Tex *tex)
-{
- PointDensity *pd = tex->pd;
-
- if (pd->point_tree) {
- BLI_bvhtree_free(pd->point_tree);
- pd->point_tree = NULL;
- }
-
- if (pd->source == TEX_PD_PSYS) {
- Object *ob = pd->object;
-
- if (!ob) return;
- if (!pd->psys) return;
-
- pointdensity_cache_psys(re, pd, ob, pd->psys);
- }
- else if (pd->source == TEX_PD_OBJECT) {
- Object *ob = pd->object;
- ObjectRen *obr;
- int found=0;
-
- /* find the obren that corresponds to the object */
- for (obr=re->objecttable.first; obr; obr=obr->next) {
- if (obr->ob == ob) {
- found=1;
- break;
- }
- }
- if (!found) return;
-
- pointdensity_cache_object(re, pd, obr);
- }
-}
-
-static void free_pointdensity(Render *re, Tex *tex)
-{
- PointDensity *pd = tex->pd;
-
- if (!pd) return;
-
- if (pd->point_tree) {
- BLI_bvhtree_free(pd->point_tree);
- pd->point_tree = NULL;
- }
-
- if (pd->point_data) {
- MEM_freeN(pd->point_data);
- pd->point_data = NULL;
- }
- pd->totpoints = 0;
-}
-
-
-
-void make_pointdensities(Render *re)
-{
- Tex *tex;
-
- if(re->scene->r.scemode & R_PREVIEWBUTS)
- return;
-
- re->i.infostr= "Caching Point Densities";
- re->stats_draw(re->sdh, &re->i);
-
- for (tex= G.main->tex.first; tex; tex= tex->id.next) {
- if(tex->id.us && tex->type==TEX_POINTDENSITY) {
- cache_pointdensity(re, tex);
- }
- }
-
- re->i.infostr= NULL;
- re->stats_draw(re->sdh, &re->i);
-}
-
-void free_pointdensities(Render *re)
-{
- Tex *tex;
-
- if(re->scene->r.scemode & R_PREVIEWBUTS)
- return;
-
- for (tex= G.main->tex.first; tex; tex= tex->id.next) {
- if(tex->id.us && tex->type==TEX_POINTDENSITY) {
- free_pointdensity(re, tex);
- }
- }
-}
-
-typedef struct PointDensityRangeData
-{
- float *density;
- float squared_radius;
- float *point_data;
- float *vec;
- float softness;
- short falloff_type;
- short noise_influence;
- float *age;
- int point_data_used;
- int offset;
-} PointDensityRangeData;
-
-void accum_density(void *userdata, int index, float squared_dist)
-{
- PointDensityRangeData *pdr = (PointDensityRangeData *)userdata;
- const float dist = (pdr->squared_radius - squared_dist) / pdr->squared_radius * 0.5f;
- float density = 0.0f;
-
- if (pdr->falloff_type == TEX_PD_FALLOFF_STD)
- density = dist;
- else if (pdr->falloff_type == TEX_PD_FALLOFF_SMOOTH)
- density = 3.0f*dist*dist - 2.0f*dist*dist*dist;
- else if (pdr->falloff_type == TEX_PD_FALLOFF_SOFT)
- density = pow(dist, pdr->softness);
- else if (pdr->falloff_type == TEX_PD_FALLOFF_CONSTANT)
- density = pdr->squared_radius;
- else if (pdr->falloff_type == TEX_PD_FALLOFF_ROOT)
- density = sqrt(dist);
-
- if (pdr->point_data_used & POINT_DATA_VEL) {
- pdr->vec[0] += pdr->point_data[index*3 + 0]; //* density;
- pdr->vec[1] += pdr->point_data[index*3 + 1]; //* density;
- pdr->vec[2] += pdr->point_data[index*3 + 2]; //* density;
- }
- if (pdr->point_data_used & POINT_DATA_LIFE) {
- *pdr->age += pdr->point_data[pdr->offset + index]; // * density;
- }
-
- *pdr->density += density;
-}
-
-
-static void init_pointdensityrangedata(PointDensity *pd, PointDensityRangeData *pdr, float *density, float *vec, float *age)
-{
- pdr->squared_radius = pd->radius*pd->radius;
- pdr->density = density;
- pdr->point_data = pd->point_data;
- pdr->falloff_type = pd->falloff_type;
- pdr->vec = vec;
- pdr->age = age;
- pdr->softness = pd->falloff_softness;
- pdr->noise_influence = pd->noise_influence;
- pdr->point_data_used = point_data_used(pd);
- pdr->offset = (pdr->point_data_used & POINT_DATA_VEL)?pd->totpoints*3:0;
-}
-
-
-int pointdensitytex(Tex *tex, float *texvec, TexResult *texres)
-{
- int retval = TEX_INT;
- PointDensity *pd = tex->pd;
- PointDensityRangeData pdr;
- float density=0.0f, age=0.0f, time=0.0f;
- float vec[3] = {0.0f, 0.0f, 0.0f}, co[3];
- float col[4];
- float turb, noise_fac;
- int num=0;
-
- texres->tin = 0.0f;
-
- if ((!pd) || (!pd->point_tree))
- return 0;
-
- init_pointdensityrangedata(pd, &pdr, &density, vec, &age);
- noise_fac = pd->noise_fac * 0.5f; /* better default */
-
- VECCOPY(co, texvec);
-
- if (point_data_used(pd)) {
- /* does a BVH lookup to find accumulated density and additional point data *
- * stores particle velocity vector in 'vec', and particle lifetime in 'time' */
- num = BLI_bvhtree_range_query(pd->point_tree, co, pd->radius, accum_density, &pdr);
- if (num > 0) {
- age /= num;
- VecMulf(vec, 1.0f/num);
- }
-
- /* reset */
- density = vec[0] = vec[1] = vec[2] = 0.0f;
- }
-
- if (pd->flag & TEX_PD_TURBULENCE) {
-
- if (pd->noise_influence == TEX_PD_NOISE_AGE) {
- turb = BLI_gTurbulence(pd->noise_size, texvec[0]+age, texvec[1]+age, texvec[2]+age, pd->noise_depth, 0, pd->noise_basis);
- }
- else if (pd->noise_influence == TEX_PD_NOISE_TIME) {
- time = R.cfra / (float)R.r.efra;
- turb = BLI_gTurbulence(pd->noise_size, texvec[0]+time, texvec[1]+time, texvec[2]+time, pd->noise_depth, 0, pd->noise_basis);
- //turb = BLI_turbulence(pd->noise_size, texvec[0]+time, texvec[1]+time, texvec[2]+time, pd->noise_depth);
- }
- else {
- turb = BLI_gTurbulence(pd->noise_size, texvec[0]+vec[0], texvec[1]+vec[1], texvec[2]+vec[2], pd->noise_depth, 0, pd->noise_basis);
- }
-
- turb -= 0.5f; /* re-center 0.0-1.0 range around 0 to prevent offsetting result */
-
- /* now we have an offset coordinate to use for the density lookup */
- co[0] = texvec[0] + noise_fac * turb;
- co[1] = texvec[1] + noise_fac * turb;
- co[2] = texvec[2] + noise_fac * turb;
- }
-
- /* BVH query with the potentially perturbed coordinates */
- num = BLI_bvhtree_range_query(pd->point_tree, co, pd->radius, accum_density, &pdr);
- if (num > 0) {
- age /= num;
- VecMulf(vec, 1.0f/num);
- }
-
- texres->tin = density;
- BRICONT;
-
- if (pd->color_source == TEX_PD_COLOR_CONSTANT)
- return retval;
-
- retval |= TEX_RGB;
-
- switch (pd->color_source) {
- case TEX_PD_COLOR_PARTAGE:
- if (pd->coba) {
- if (do_colorband(pd->coba, age, col)) {
- texres->talpha= 1;
- VECCOPY(&texres->tr, col);
- texres->tin *= col[3];
- texres->ta = texres->tin;
- }
- }
- break;
- case TEX_PD_COLOR_PARTSPEED:
- {
- float speed = VecLength(vec) * pd->speed_scale;
-
- if (pd->coba) {
- if (do_colorband(pd->coba, speed, col)) {
- texres->talpha= 1;
- VECCOPY(&texres->tr, col);
- texres->tin *= col[3];
- texres->ta = texres->tin;
- }
- }
- break;
- }
- case TEX_PD_COLOR_PARTVEL:
- texres->talpha= 1;
- VecMulf(vec, pd->speed_scale);
- VECCOPY(&texres->tr, vec);
- texres->ta = texres->tin;
- break;
- case TEX_PD_COLOR_CONSTANT:
- default:
- texres->tr = texres->tg = texres->tb = texres->ta = 1.0f;
- break;
- }
- BRICONTRGB;
-
- return retval;
-
- /*
- if (texres->nor!=NULL) {
- texres->nor[0] = texres->nor[1] = texres->nor[2] = 0.0f;
- }
- */
-}
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index d2599f6050c..0c8749ce329 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -54,7 +54,6 @@
#include "pixelshading.h"
#include "shading.h"
#include "texture.h"
-#include "volumetric.h"
#include "RE_raytrace.h"
@@ -96,17 +95,6 @@ static int vlr_check_intersect(Isect *is, int ob, RayFace *face)
return (is->lay & obi->lay);
}
-static int vlr_check_intersect_solid(Isect *is, int ob, RayFace *face)
-{
- VlakRen *vlr = (VlakRen*)face;
-
- /* solid material types only */
- if (vlr->mat->material_type == MA_TYPE_SURFACE)
- return 1;
- else
- return 0;
-}
-
static float *vlr_get_transform(void *userdata, int i)
{
ObjectInstanceRen *obi= RAY_OBJECT_GET((Render*)userdata, i);
@@ -217,7 +205,7 @@ void makeraytree(Render *re)
re->stats_draw(re->sdh, &re->i);
}
-void shade_ray(Isect *is, ShadeInput *shi, ShadeResult *shr)
+static void shade_ray(Isect *is, ShadeInput *shi, ShadeResult *shr)
{
VlakRen *vlr= (VlakRen*)is->face;
ObjectInstanceRen *obi= RAY_OBJECT_GET(&R, is->ob);
@@ -272,14 +260,8 @@ void shade_ray(Isect *is, ShadeInput *shi, ShadeResult *shr)
shade_input_flip_normals(shi);
shade_input_set_shade_texco(shi);
- if (shi->mat->material_type == MA_TYPE_VOLUME) {
- if(ELEM(is->mode, RE_RAY_SHADOW, RE_RAY_SHADOW_TRA)) {
- shade_volume_shadow(shi, shr, is);
- } else {
- shade_volume_outside(shi, shr);
- }
- }
- else if(is->mode==RE_RAY_SHADOW_TRA) {
+
+ if(is->mode==RE_RAY_SHADOW_TRA) {
/* temp hack to prevent recursion */
if(shi->nodes==0 && shi->mat->nodetree && shi->mat->use_nodes) {
ntreeShaderExecTree(shi->mat->nodetree, shi, shr);
@@ -293,20 +275,9 @@ void shade_ray(Isect *is, ShadeInput *shi, ShadeResult *shr)
ntreeShaderExecTree(shi->mat->nodetree, shi, shr);
shi->mat= vlr->mat; /* shi->mat is being set in nodetree */
}
- else {
- int tempdepth;
- /* XXX dodgy business here, set ray depth to -1
- * to ignore raytrace in shade_material_loop()
- * this could really use a refactor --Matt */
- if (shi->volume_depth == 0) {
- tempdepth = shi->depth;
- shi->depth = -1;
- shade_material_loop(shi, shr);
- shi->depth = tempdepth;
- } else {
- shade_material_loop(shi, shr);
- }
- }
+ else
+ shade_material_loop(shi, shr);
+
/* raytrace likes to separate the spec color */
VECSUB(shr->diff, shr->combined, shr->spec);
}
@@ -1267,20 +1238,15 @@ void ray_trace(ShadeInput *shi, ShadeResult *shr)
}
if(shi->combinedflag & SCE_PASS_REFLECT) {
- /* values in shr->spec can be greater then 1.0.
- * In this case the mircol uses a zero blending factor, so ignoring it is ok.
- * Fixes bug #18837 - when the spec is higher then 1.0,
- * diff can become a negative color - Campbell */
- f1= 1.0f-i;
+ f= fr*(1.0f-shr->spec[0]); f1= 1.0f-i;
+ diff[0]= f*mircol[0] + f1*diff[0];
- diff[0] *= f1;
- diff[1] *= f1;
- diff[2] *= f1;
+ f= fg*(1.0f-shr->spec[1]); f1= 1.0f-i;
+ diff[1]= f*mircol[1] + f1*diff[1];
- if(shr->spec[0]<1.0f) diff[0] += mircol[0] * (fr*(1.0f-shr->spec[0]));
- if(shr->spec[1]<1.0f) diff[1] += mircol[1] * (fg*(1.0f-shr->spec[1]));
- if(shr->spec[2]<1.0f) diff[2] += mircol[2] * (fb*(1.0f-shr->spec[2]));
+ f= fb*(1.0f-shr->spec[2]); f1= 1.0f-i;
+ diff[2]= f*mircol[2] + f1*diff[2];
}
}
}
@@ -1336,15 +1302,11 @@ static void ray_trace_shadow_tra(Isect *is, ShadeInput *origshi, int depth, int
shi.nodes= origshi->nodes;
shade_ray(is, &shi, &shr);
- if (shi.mat->material_type == MA_TYPE_SURFACE) {
- if (traflag & RAY_TRA)
- d= shade_by_transmission(is, &shi, &shr);
-
- /* mix colors based on shadfac (rgb + amount of light factor) */
- addAlphaLight(is->col, shr.diff, shr.alpha, d*shi.mat->filter);
- } else if (shi.mat->material_type == MA_TYPE_VOLUME) {
- addAlphaLight(is->col, shr.combined, shr.alpha, 1.0f);
- }
+ if (traflag & RAY_TRA)
+ d= shade_by_transmission(is, &shi, &shr);
+
+ /* mix colors based on shadfac (rgb + amount of light factor) */
+ addAlphaLight(is->col, shr.diff, shr.alpha, d*shi.mat->filter);
if(depth>0 && is->col[3]>0.0f) {
@@ -1645,7 +1607,7 @@ static void ray_ao_qmc(ShadeInput *shi, float *shadfac)
prev = fac;
- if(RE_ray_tree_intersect_check(R.raytree, &isec, vlr_check_intersect_solid)) {
+ if(RE_ray_tree_intersect(R.raytree, &isec)) {
if (R.wrld.aomode & WO_AODIST) fac+= exp(-isec.labda*R.wrld.aodistfac);
else fac+= 1.0f;
}
@@ -1770,7 +1732,7 @@ static void ray_ao_spheresamp(ShadeInput *shi, float *shadfac)
isec.end[2] = shi->co[2] - maxdist*vec[2];
/* do the trace */
- if(RE_ray_tree_intersect_check(R.raytree, &isec, vlr_check_intersect_solid)) {
+ if(RE_ray_tree_intersect(R.raytree, &isec)) {
if (R.wrld.aomode & WO_AODIST) sh+= exp(-isec.labda*R.wrld.aodistfac);
else sh+= 1.0f;
}
diff --git a/source/blender/render/intern/source/raytrace.c b/source/blender/render/intern/source/raytrace.c
index b34fe6a7039..09d3711885a 100644
--- a/source/blender/render/intern/source/raytrace.c
+++ b/source/blender/render/intern/source/raytrace.c
@@ -931,7 +931,7 @@ int RE_ray_face_intersection(Isect *is, RayObjectTransformFunc transformfunc, Ra
intersection to be detected in its neighbour face */
if(is->facecontr && is->faceisect); // optimizing, the tests below are not needed
- else if(is->labda< .1 && is->faceorig) {
+ else if(is->labda< .1) {
RayFace *face= is->faceorig;
float *origv1, *origv2, *origv3, *origv4;
short de= 0;
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index 5db81288c1e..b774bf6374d 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -2234,7 +2234,7 @@ static int bake_check_intersect(Isect *is, int ob, RayFace *face)
/* no direction checking for now, doesn't always improve the result
* (INPR(shi->facenor, bs->dir) > 0.0f); */
- return (R.objectinstance[ob & ~RE_RAY_TRANSFORM_OFFS].obr->ob != bs->actob);
+ return (R.objectinstance[ob].obr->ob != bs->actob);
}
static int bake_intersect_tree(RayTree* raytree, Isect* isect, float *start, float *dir, float sign, float *hitco, float *dist)
diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c
index 48305d31e10..33085b98095 100644
--- a/source/blender/render/intern/source/shadbuf.c
+++ b/source/blender/render/intern/source/shadbuf.c
@@ -26,7 +26,7 @@
#include <math.h>
#include <string.h>
-
+#include "MTC_matrixops.h"
#include "MEM_guardedalloc.h"
#include "DNA_group_types.h"
@@ -403,7 +403,7 @@ void makeshadowbuf(Render *re, LampRen *lar)
wsize= shb->pixsize*(shb->size/2.0);
i_window(-wsize, wsize, -wsize, wsize, shb->d, shb->clipend, shb->winmat);
- Mat4MulMat4(shb->persmat, shb->viewmat, shb->winmat);
+ MTC_Mat4MulMat4(shb->persmat, shb->viewmat, shb->winmat);
if(ELEM(lar->buftype, LA_SHADBUF_REGULAR, LA_SHADBUF_HALFWAY)) {
/* jitter, weights - not threadsafe! */
@@ -673,7 +673,7 @@ float testshadowbuf(Render *re, ShadBuf *shb, float *rco, float *dxco, float *dy
VECCOPY(co, rco);
co[3]= 1.0f;
- Mat4MulVec4fl(shb->persmat, co); /* rational hom co */
+ MTC_Mat4MulVec4fl(shb->persmat, co); /* rational hom co */
xs1= siz*(1.0f+co[0]/co[3]);
ys1= siz*(1.0f+co[1]/co[3]);
@@ -714,7 +714,7 @@ float testshadowbuf(Render *re, ShadBuf *shb, float *rco, float *dxco, float *dy
co[1]= rco[1]+dxco[1];
co[2]= rco[2]+dxco[2];
co[3]= 1.0;
- Mat4MulVec4fl(shb->persmat,co); /* rational hom co */
+ MTC_Mat4MulVec4fl(shb->persmat,co); /* rational hom co */
dx[0]= xs1- siz*(1.0+co[0]/co[3]);
dx[1]= ys1- siz*(1.0+co[1]/co[3]);
@@ -722,7 +722,7 @@ float testshadowbuf(Render *re, ShadBuf *shb, float *rco, float *dxco, float *dy
co[1]= rco[1]+dyco[1];
co[2]= rco[2]+dyco[2];
co[3]= 1.0;
- Mat4MulVec4fl(shb->persmat,co); /* rational hom co */
+ MTC_Mat4MulVec4fl(shb->persmat,co); /* rational hom co */
dy[0]= xs1- siz*(1.0+co[0]/co[3]);
dy[1]= ys1- siz*(1.0+co[1]/co[3]);
@@ -858,7 +858,7 @@ float shadow_halo(LampRen *lar, float *p1, float *p2)
co[1]= p1[1];
co[2]= p1[2]/lar->sh_zfac;
co[3]= 1.0;
- Mat4MulVec4fl(shb->winmat, co); /* rational hom co */
+ MTC_Mat4MulVec4fl(shb->winmat, co); /* rational hom co */
xf1= siz*(1.0+co[0]/co[3]);
yf1= siz*(1.0+co[1]/co[3]);
zf1= (co[2]/co[3]);
@@ -868,7 +868,7 @@ float shadow_halo(LampRen *lar, float *p1, float *p2)
co[1]= p2[1];
co[2]= p2[2]/lar->sh_zfac;
co[3]= 1.0;
- Mat4MulVec4fl(shb->winmat, co); /* rational hom co */
+ MTC_Mat4MulVec4fl(shb->winmat, co); /* rational hom co */
xf2= siz*(1.0+co[0]/co[3]);
yf2= siz*(1.0+co[1]/co[3]);
zf2= (co[2]/co[3]);
@@ -1659,7 +1659,7 @@ static int viewpixel_to_lampbuf(ShadBuf *shb, ObjectInstanceRen *obi, VlakRen *v
}
/* move 3d vector to lampbuf */
- Mat4MulVec4fl(shb->persmat, hoco); /* rational hom co */
+ MTC_Mat4MulVec4fl(shb->persmat, hoco); /* rational hom co */
/* clip We can test for -1.0/1.0 because of the properties of the
* coordinate transformations. */
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c
index 7541ce53073..857b401e298 100644
--- a/source/blender/render/intern/source/shadeinput.c
+++ b/source/blender/render/intern/source/shadeinput.c
@@ -29,7 +29,7 @@
#include <math.h>
#include <string.h>
-
+#include "MTC_matrixops.h"
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
@@ -52,7 +52,6 @@
#include "shading.h"
#include "strand.h"
#include "texture.h"
-#include "volumetric.h"
#include "zbuf.h"
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
@@ -167,11 +166,6 @@ void shade_material_loop(ShadeInput *shi, ShadeResult *shr)
if((shi->layflag & SCE_LAY_SKY) && (R.r.alphamode==R_ADDSKY))
shr->alpha= 1.0f;
}
-
- if(R.r.mode & R_RAYTRACE) {
- if (R.render_volumes_inside.first)
- shade_volume_inside(shi, shr);
- }
}
@@ -189,12 +183,7 @@ void shade_input_do_shade(ShadeInput *shi, ShadeResult *shr)
/* copy all relevant material vars, note, keep this synced with render_types.h */
shade_input_init_material(shi);
- if (shi->mat->material_type == MA_TYPE_VOLUME) {
- if(R.r.mode & R_RAYTRACE)
- shade_volume_outside(shi, shr);
- } else { /* MA_TYPE_SURFACE, MA_TYPE_WIRE */
- shade_material_loop(shi, shr);
- }
+ shade_material_loop(shi, shr);
}
/* copy additional passes */
@@ -221,12 +210,11 @@ void shade_input_do_shade(ShadeInput *shi, ShadeResult *shr)
if(shr->alpha!=1.0f || alpha!=1.0f) {
float fac= alpha*(shr->alpha);
shr->combined[3]= fac;
-
- if (shi->mat->material_type!= MA_TYPE_VOLUME)
- VecMulf(shr->combined, fac);
+ shr->combined[0]*= fac;
+ shr->combined[1]*= fac;
+ shr->combined[2]*= fac;
}
- else
- shr->combined[3]= 1.0f;
+ else shr->combined[3]= 1.0f;
/* add z */
shr->z= -shi->co[2];
@@ -458,13 +446,13 @@ void shade_input_set_strand_texco(ShadeInput *shi, StrandRen *strand, StrandVert
if(texco & TEXCO_GLOB) {
VECCOPY(shi->gl, shi->co);
- Mat4MulVecfl(R.viewinv, shi->gl);
+ MTC_Mat4MulVecfl(R.viewinv, shi->gl);
if(shi->osatex) {
VECCOPY(shi->dxgl, shi->dxco);
- Mat3MulVecfl(R.imat, shi->dxco);
+ MTC_Mat3MulVecfl(R.imat, shi->dxco);
VECCOPY(shi->dygl, shi->dyco);
- Mat3MulVecfl(R.imat, shi->dyco);
+ MTC_Mat3MulVecfl(R.imat, shi->dyco);
}
}
@@ -710,10 +698,6 @@ void shade_input_calc_viewco(ShadeInput *shi, float x, float y, float z, float *
}
}
- /* set camera coords - for scanline, it's always 0.0,0.0,0.0 (render is in camera space)
- * however for raytrace it can be different - the position of the last intersection */
- shi->camera_co[0] = shi->camera_co[1] = shi->camera_co[2] = 0.0f;
-
/* cannot normalize earlier, code above needs it at viewplane level */
Normalize(view);
}
@@ -1021,15 +1005,15 @@ void shade_input_set_shade_texco(ShadeInput *shi)
if(texco & TEXCO_GLOB) {
VECCOPY(shi->gl, shi->co);
- Mat4MulVecfl(R.viewinv, shi->gl);
+ MTC_Mat4MulVecfl(R.viewinv, shi->gl);
if(shi->osatex) {
VECCOPY(shi->dxgl, shi->dxco);
// TXF: bug was here, but probably should be in convertblender.c, R.imat only valid if there is a world
- //Mat3MulVecfl(R.imat, shi->dxco);
- Mat4Mul3Vecfl(R.viewinv, shi->dxco);
+ //MTC_Mat3MulVecfl(R.imat, shi->dxco);
+ MTC_Mat4Mul3Vecfl(R.viewinv, shi->dxco);
VECCOPY(shi->dygl, shi->dyco);
- //Mat3MulVecfl(R.imat, shi->dyco);
- Mat4Mul3Vecfl(R.viewinv, shi->dyco);
+ //MTC_Mat3MulVecfl(R.imat, shi->dyco);
+ MTC_Mat4Mul3Vecfl(R.viewinv, shi->dyco);
}
}
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index 5e523199755..d5c8cf30b30 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -30,7 +30,7 @@
#include <math.h>
#include <string.h>
-
+#include "MTC_matrixops.h"
#include "BLI_arithb.h"
#include "BKE_colortools.h"
@@ -58,7 +58,7 @@
extern struct Render R;
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-ListBase *get_lights(ShadeInput *shi)
+static ListBase *get_lights(ShadeInput *shi)
{
if(R.r.scemode & R_PREVIEWBUTS)
@@ -168,7 +168,7 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens)
p1[0]= shi->co[0]-lar->co[0];
p1[1]= shi->co[1]-lar->co[1];
p1[2]= -lar->co[2];
- Mat3MulVecfl(lar->imat, p1);
+ MTC_Mat3MulVecfl(lar->imat, p1);
VECCOPY(npos, p1); // npos is double!
/* pre-scale */
@@ -180,7 +180,7 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens)
/* rotate view */
VECCOPY(nray, shi->view);
- Mat3MulVecd(lar->imat, nray);
+ MTC_Mat3MulVecd(lar->imat, nray);
if(R.wrld.mode & WO_MIST) {
/* patchy... */
@@ -1143,7 +1143,7 @@ float lamp_get_visibility(LampRen *lar, float *co, float *lv, float *dist)
/* rotate view to lampspace */
VECCOPY(lvrot, lv);
- Mat3MulVecfl(lar->imat, lvrot);
+ MTC_Mat3MulVecfl(lar->imat, lvrot);
x= MAX2(fabs(lvrot[0]/lvrot[2]) , fabs(lvrot[1]/lvrot[2]));
/* 1.0f/(sqrt(1+x*x)) is equivalent to cos(atan(x)) */
diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c
index 2d2c01e0bf1..3db78bfea93 100644
--- a/source/blender/render/intern/source/texture.c
+++ b/source/blender/render/intern/source/texture.c
@@ -30,7 +30,7 @@
#include <string.h>
#include <math.h>
-
+#include "MTC_matrixops.h"
#include "BLI_blenlib.h"
#include "BLI_arithb.h"
@@ -65,8 +65,6 @@
#include "BKE_ipo.h"
#include "envmap.h"
-#include "pointdensity.h"
-#include "voxeldata.h"
#include "renderpipeline.h"
#include "render_types.h"
#include "rendercore.h"
@@ -721,7 +719,7 @@ static int evalnodes(Tex *tex, float *texvec, float *dxt, float *dyt, TexResult
short rv = TEX_INT;
bNodeTree *nodes = tex->nodetree;
- ntreeTexExecTree(nodes, texres, texvec, dxt, dyt, thread, tex, which_output, R.r.cfra);
+ ntreeTexExecTree(nodes, texres, texvec, dxt, dyt, 0, thread, tex, which_output, R.r.cfra);
if(texres->nor) rv |= TEX_NOR;
rv |= TEX_RGB;
@@ -832,7 +830,7 @@ static int cubemap_glob(float *n, float x, float y, float z, float *adr1, float
else {
VECCOPY(nor, n);
}
- Mat4Mul3Vecfl(R.viewinv, nor);
+ MTC_Mat4Mul3Vecfl(R.viewinv, nor);
x1= fabs(nor[0]);
y1= fabs(nor[1]);
@@ -925,7 +923,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);
- if(ob) Mat4Mul3Vecfl(ob->imat, nor);
+ if(ob) MTC_Mat4Mul3Vecfl(ob->imat, nor);
x1= fabs(nor[0]);
y1= fabs(nor[1]);
@@ -1264,13 +1262,6 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex,
retval= mg_distNoiseTex(tex, tmpvec, texres);
break;
- case TEX_POINTDENSITY:
- retval= pointdensitytex(tex, texvec, texres);
- break;
- case TEX_VOXELDATA:
- retval= voxeldatatex(tex, texvec, texres);
- break;
-
}
if (tex->flag & TEX_COLORBAND) {
@@ -1281,7 +1272,7 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex,
texres->tg= col[1];
texres->tb= col[2];
texres->ta= col[3];
- retval |= TEX_RGB;
+ retval |= 1;
}
}
return retval;
@@ -1455,22 +1446,12 @@ void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg
VECCOPY(in, out);
ramp_blend(MA_RAMP_COLOR, in, in+1, in+2, fact, tex);
break;
- case MTEX_SOFT_LIGHT:
- fact*= facg;
- VECCOPY(in, out);
- ramp_blend(MA_RAMP_SOFT, in, in+1, in+2, fact, tex);
- break;
- case MTEX_LIN_LIGHT:
- fact*= facg;
- VECCOPY(in, out);
- ramp_blend(MA_RAMP_LINEAR, in, in+1, in+2, fact, tex);
- break;
}
}
float texture_value_blend(float tex, float out, float fact, float facg, int blendtype, int flip)
{
- float in=0.0, facm, col, scf;
+ float in=0.0, facm, col;
fact*= facg;
facm= 1.0-fact;
@@ -1515,19 +1496,6 @@ float texture_value_blend(float tex, float out, float fact, float facg, int blen
col= fact*tex;
if(col > out) in= col; else in= out;
break;
-
- case MTEX_SOFT_LIGHT:
- col= fact*tex;
- scf=1.0 - (1.0 - tex) * (1.0 - out);
- in= facm*out + fact * ((1.0 - out) * tex * out) + (out * scf);
- break;
-
- case MTEX_LIN_LIGHT:
- if (tex > 0.5)
- in = out + fact*(2*(tex - 0.5));
- else
- in = out + fact*(2*tex - 1);
- break;
}
return in;
@@ -1671,13 +1639,13 @@ void do_material_tex(ShadeInput *shi)
VECCOPY(tempvec, shi->co);
if(mtex->texflag & MTEX_OB_DUPLI_ORIG)
if(shi->obi && shi->obi->duplitexmat)
- Mat4MulVecfl(shi->obi->duplitexmat, tempvec);
- Mat4MulVecfl(ob->imat, tempvec);
+ MTC_Mat4MulVecfl(shi->obi->duplitexmat, tempvec);
+ MTC_Mat4MulVecfl(ob->imat, tempvec);
if(shi->osatex) {
VECCOPY(dxt, shi->dxco);
VECCOPY(dyt, shi->dyco);
- Mat4Mul3Vecfl(ob->imat, dxt);
- Mat4Mul3Vecfl(ob->imat, dyt);
+ MTC_Mat4Mul3Vecfl(ob->imat, dxt);
+ MTC_Mat4Mul3Vecfl(ob->imat, dyt);
}
}
else {
@@ -2280,187 +2248,6 @@ void do_material_tex(ShadeInput *shi)
}
}
-
-void do_volume_tex(ShadeInput *shi, float *xyz, int mapto_flag, float *col, float *val)
-{
- MTex *mtex;
- Tex *tex;
- TexResult texres= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
- int tex_nr, rgbnor= 0;
- float co[3], texvec[3];
- float fact, stencilTin=1.0;
-
- if (R.r.scemode & R_NO_TEX) return;
- /* here: test flag if there's a tex (todo) */
-
- for(tex_nr=0; tex_nr<MAX_MTEX; tex_nr++) {
- /* separate tex switching */
- if(shi->mat->septex & (1<<tex_nr)) continue;
-
- if(shi->mat->mtex[tex_nr]) {
- mtex= shi->mat->mtex[tex_nr];
- tex= mtex->tex;
- if(tex==0) continue;
-
- /* only process if this texture is mapped
- * to one that we're interested in */
- if (!(mtex->mapto & mapto_flag)) continue;
-
- /* which coords */
- if(mtex->texco==TEXCO_OBJECT) {
- Object *ob= mtex->object;
- ob= mtex->object;
- if(ob) {
- VECCOPY(co, xyz);
- if(mtex->texflag & MTEX_OB_DUPLI_ORIG) {
- if(shi->obi && shi->obi->duplitexmat)
- Mat4MulVecfl(shi->obi->duplitexmat, co);
- }
- Mat4MulVecfl(ob->imat, co);
- }
- }
- /* not really orco, but 'local' */
- else if(mtex->texco==TEXCO_ORCO) {
-
- if(mtex->texflag & MTEX_DUPLI_MAPTO) {
- VECCOPY(co, shi->duplilo);
- }
- else {
- Object *ob= shi->obi->ob;
- VECCOPY(co, xyz);
- Mat4MulVecfl(ob->imat, co);
- }
- }
- else if(mtex->texco==TEXCO_GLOB) {
- VECCOPY(co, xyz);
- Mat4MulVecfl(R.viewinv, co);
- }
- else continue; // can happen when texco defines disappear and it renders old files
-
- texres.nor= NULL;
-
- if(tex->type==TEX_IMAGE) {
- continue; /* not supported yet */
- //do_2d_mapping(mtex, texvec, NULL, NULL, dxt, dyt);
- }
- else {
- /* placement */
- if(mtex->projx) texvec[0]= mtex->size[0]*(co[mtex->projx-1]+mtex->ofs[0]);
- else texvec[0]= mtex->size[0]*(mtex->ofs[0]);
-
- if(mtex->projy) texvec[1]= mtex->size[1]*(co[mtex->projy-1]+mtex->ofs[1]);
- else texvec[1]= mtex->size[1]*(mtex->ofs[1]);
-
- if(mtex->projz) texvec[2]= mtex->size[2]*(co[mtex->projz-1]+mtex->ofs[2]);
- else texvec[2]= mtex->size[2]*(mtex->ofs[2]);
- }
-
- rgbnor= multitex(tex, texvec, NULL, NULL, 0, &texres, 0, mtex->which_output); /* NULL = dxt/dyt, 0 = shi->osatex - not supported */
-
- /* texture output */
-
- if( (rgbnor & TEX_RGB) && (mtex->texflag & MTEX_RGBTOINT)) {
- texres.tin= (0.35*texres.tr+0.45*texres.tg+0.2*texres.tb);
- rgbnor-= TEX_RGB;
- }
- if(mtex->texflag & MTEX_NEGATIVE) {
- if(rgbnor & TEX_RGB) {
- texres.tr= 1.0-texres.tr;
- texres.tg= 1.0-texres.tg;
- texres.tb= 1.0-texres.tb;
- }
- texres.tin= 1.0-texres.tin;
- }
- if(mtex->texflag & MTEX_STENCIL) {
- if(rgbnor & TEX_RGB) {
- fact= texres.ta;
- texres.ta*= stencilTin;
- stencilTin*= fact;
- }
- else {
- fact= texres.tin;
- texres.tin*= stencilTin;
- stencilTin*= fact;
- }
- }
-
-
- if((mapto_flag & (MAP_EMISSION_COL+MAP_ABSORPTION_COL)) && (mtex->mapto & (MAP_EMISSION_COL+MAP_ABSORPTION_COL))) {
- float tcol[3], colfac;
-
- /* stencil maps on the texture control slider, not texture intensity value */
- colfac= mtex->colfac*stencilTin;
-
- if((rgbnor & TEX_RGB)==0) {
- tcol[0]= mtex->r;
- tcol[1]= mtex->g;
- tcol[2]= mtex->b;
- } else {
- tcol[0]=texres.tr;
- tcol[1]=texres.tg;
- tcol[2]=texres.tb;
- if(texres.talpha)
- texres.tin= texres.ta;
- }
-
- /* inverse gamma correction */
- if (R.r.color_mgt_flag & R_COLOR_MANAGEMENT) {
- color_manage_linearize(tcol, tcol);
- }
-
- /* used for emit */
- if((mapto_flag & MAP_EMISSION_COL) && (mtex->mapto & MAP_EMISSION_COL)) {
- texture_rgb_blend(col, tcol, col, texres.tin, colfac, mtex->blendtype);
- }
-
- /* MAP_COLMIR is abused for absorption colour at the moment */
- if((mapto_flag & MAP_ABSORPTION_COL) && (mtex->mapto & MAP_ABSORPTION_COL)) {
- texture_rgb_blend(col, tcol, col, texres.tin, colfac, mtex->blendtype);
- }
- }
-
- if((mapto_flag & MAP_VARS) && (mtex->mapto & MAP_VARS)) {
- /* stencil maps on the texture control slider, not texture intensity value */
- float varfac= mtex->varfac*stencilTin;
-
- /* convert RGB to intensity if intensity info isn't provided */
- if (!(rgbnor & TEX_INT)) {
- if (rgbnor & TEX_RGB) {
- if(texres.talpha) texres.tin= texres.ta;
- else texres.tin= (0.35*texres.tr+0.45*texres.tg+0.2*texres.tb);
- }
- }
-
- if((mapto_flag & MAP_EMISSION) && (mtex->mapto & MAP_EMISSION)) {
- int flip= mtex->maptoneg & MAP_EMISSION;
-
- *val = texture_value_blend(mtex->def_var, *val, texres.tin, varfac, mtex->blendtype, flip);
- if(*val<0.0) *val= 0.0;
- }
- if((mapto_flag & MAP_DENSITY) && (mtex->mapto & MAP_DENSITY)) {
- int flip= mtex->maptoneg & MAP_DENSITY;
-
- *val = texture_value_blend(mtex->def_var, *val, texres.tin, varfac, mtex->blendtype, flip);
- CLAMP(*val, 0.0, 1.0);
- }
- if((mapto_flag & MAP_ABSORPTION) && (mtex->mapto & MAP_ABSORPTION)) {
- int flip= mtex->maptoneg & MAP_ABSORPTION;
-
- *val = texture_value_blend(mtex->def_var, *val, texres.tin, varfac, mtex->blendtype, flip);
- CLAMP(*val, 0.0, 1.0);
- }
- if((mapto_flag & MAP_SCATTERING) && (mtex->mapto & MAP_SCATTERING)) {
- int flip= mtex->maptoneg & MAP_SCATTERING;
-
- *val = texture_value_blend(mtex->def_var, *val, texres.tin, varfac, mtex->blendtype, flip);
- CLAMP(*val, 0.0, 1.0);
- }
- }
- }
- }
-}
-
-
/* ------------------------------------------------------------------------- */
void do_halo_tex(HaloRen *har, float xn, float yn, float *colf)
@@ -2662,7 +2449,7 @@ void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, f
case TEXCO_OBJECT:
if(mtex->object) {
VECCOPY(tempvec, lo);
- Mat4MulVecfl(mtex->object->imat, tempvec);
+ MTC_Mat4MulVecfl(mtex->object->imat, tempvec);
co= tempvec;
}
break;
@@ -2670,16 +2457,16 @@ void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, f
case TEXCO_GLOB:
if(rco) {
VECCOPY(tempvec, rco);
- Mat4MulVecfl(R.viewinv, tempvec);
+ MTC_Mat4MulVecfl(R.viewinv, tempvec);
co= tempvec;
}
else
co= lo;
// VECCOPY(shi->dxgl, shi->dxco);
-// Mat3MulVecfl(R.imat, shi->dxco);
+// MTC_Mat3MulVecfl(R.imat, shi->dxco);
// VECCOPY(shi->dygl, shi->dyco);
-// Mat3MulVecfl(R.imat, shi->dyco);
+// MTC_Mat3MulVecfl(R.imat, shi->dyco);
break;
}
@@ -2806,12 +2593,12 @@ void do_lamp_tex(LampRen *la, float *lavec, ShadeInput *shi, float *colf, int ef
dx= dxt;
dy= dyt;
VECCOPY(tempvec, shi->co);
- Mat4MulVecfl(ob->imat, tempvec);
+ MTC_Mat4MulVecfl(ob->imat, tempvec);
if(shi->osatex) {
VECCOPY(dxt, shi->dxco);
VECCOPY(dyt, shi->dyco);
- Mat4Mul3Vecfl(ob->imat, dxt);
- Mat4Mul3Vecfl(ob->imat, dyt);
+ MTC_Mat4Mul3Vecfl(ob->imat, dxt);
+ MTC_Mat4Mul3Vecfl(ob->imat, dyt);
}
}
else {
@@ -2822,12 +2609,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);
- Mat4MulVecfl(R.viewinv, shi->gl);
+ MTC_Mat4MulVecfl(R.viewinv, shi->gl);
}
else if(mtex->texco==TEXCO_VIEW) {
VECCOPY(tempvec, lavec);
- Mat3MulVecfl(la->imat, tempvec);
+ MTC_Mat3MulVecfl(la->imat, tempvec);
if(la->type==LA_SPOT) {
tempvec[0]*= la->spottexfac;
@@ -2840,8 +2627,8 @@ void do_lamp_tex(LampRen *la, float *lavec, ShadeInput *shi, float *colf, int ef
VECCOPY(dxt, shi->dxlv);
VECCOPY(dyt, shi->dylv);
/* need some matrix conversion here? la->imat is a [3][3] matrix!!! **/
- Mat3MulVecfl(la->imat, dxt);
- Mat3MulVecfl(la->imat, dyt);
+ MTC_Mat3MulVecfl(la->imat, dxt);
+ MTC_Mat3MulVecfl(la->imat, dyt);
VecMulf(dxt, la->spottexfac);
VecMulf(dyt, la->spottexfac);
diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c
deleted file mode 100644
index 15d8643fea4..00000000000
--- a/source/blender/render/intern/source/volume_precache.c
+++ /dev/null
@@ -1,746 +0,0 @@
-/**
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 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): Matt Ebb.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <math.h>
-#include <stdlib.h>
-#include <string.h>
-#include <float.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_blenlib.h"
-#include "BLI_arithb.h"
-#include "BLI_threads.h"
-#include "BLI_voxel.h"
-
-#include "PIL_time.h"
-
-#include "RE_shader_ext.h"
-#include "RE_raytrace.h"
-
-#include "DNA_material_types.h"
-
-#include "render_types.h"
-#include "renderdatabase.h"
-#include "volumetric.h"
-#include "volume_precache.h"
-
-#if defined( _MSC_VER ) && !defined( __cplusplus )
-# define inline __inline
-#endif // defined( _MSC_VER ) && !defined( __cplusplus )
-
-#include "BKE_global.h"
-
-/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-/* defined in pipeline.c, is hardcopy of active dynamic allocated Render */
-/* only to be used here in this file, it's for speed */
-extern struct Render R;
-/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-
-/* *** utility code to set up an individual raytree for objectinstance, for checking inside/outside *** */
-
-/* Recursive test for intersections, from a point inside the mesh, to outside
- * Number of intersections (depth) determine if a point is inside or outside the mesh */
-int intersect_outside_volume(RayTree *tree, Isect *isect, float *offset, int limit, int depth)
-{
- if (limit == 0) return depth;
-
- if (RE_ray_tree_intersect(tree, isect)) {
- float hitco[3];
-
- hitco[0] = isect->start[0] + isect->labda*isect->vec[0];
- hitco[1] = isect->start[1] + isect->labda*isect->vec[1];
- hitco[2] = isect->start[2] + isect->labda*isect->vec[2];
- VecAddf(isect->start, hitco, offset);
-
- return intersect_outside_volume(tree, isect, offset, limit-1, depth+1);
- } else {
- return depth;
- }
-}
-
-/* Uses ray tracing to check if a point is inside or outside an ObjectInstanceRen */
-int point_inside_obi(RayTree *tree, ObjectInstanceRen *obi, float *co)
-{
- float maxsize = RE_ray_tree_max_size(tree);
- Isect isect;
- float vec[3] = {0.0f,0.0f,1.0f};
- int final_depth=0, depth=0, limit=20;
-
- /* set up the isect */
- memset(&isect, 0, sizeof(isect));
- VECCOPY(isect.start, co);
- isect.end[0] = co[0] + vec[0] * maxsize;
- isect.end[1] = co[1] + vec[1] * maxsize;
- isect.end[2] = co[2] + vec[2] * maxsize;
-
- /* and give it a little offset to prevent self-intersections */
- VecMulf(vec, 1e-5);
- VecAddf(isect.start, isect.start, vec);
-
- isect.mode= RE_RAY_MIRROR;
- isect.face_last= NULL;
- isect.lay= -1;
-
- final_depth = intersect_outside_volume(tree, &isect, vec, limit, depth);
-
- /* even number of intersections: point is outside
- * odd number: point is inside */
- if (final_depth % 2 == 0) return 0;
- else return 1;
-}
-
-static int inside_check_func(Isect *is, int ob, RayFace *face)
-{
- return 1;
-}
-static void vlr_face_coords(RayFace *face, float **v1, float **v2, float **v3, float **v4)
-{
- VlakRen *vlr= (VlakRen*)face;
-
- *v1 = (vlr->v1)? vlr->v1->co: NULL;
- *v2 = (vlr->v2)? vlr->v2->co: NULL;
- *v3 = (vlr->v3)? vlr->v3->co: NULL;
- *v4 = (vlr->v4)? vlr->v4->co: NULL;
-}
-
-RayTree *create_raytree_obi(ObjectInstanceRen *obi, float *bbmin, float *bbmax)
-{
- int v;
- VlakRen *vlr= NULL;
-
- /* create empty raytree */
- RayTree *tree = RE_ray_tree_create(64, obi->obr->totvlak, bbmin, bbmax,
- vlr_face_coords, inside_check_func, NULL, NULL);
-
- /* fill it with faces */
- for(v=0; v<obi->obr->totvlak; v++) {
- if((v & 255)==0)
- vlr= obi->obr->vlaknodes[v>>8].vlak;
- else
- vlr++;
-
- RE_ray_tree_add_face(tree, 0, vlr);
- }
-
- RE_ray_tree_done(tree);
-
- return tree;
-}
-
-/* *** light cache filtering *** */
-
-static float get_avg_surrounds(float *cache, int *res, int xx, int yy, int zz)
-{
- int x, y, z, x_, y_, z_;
- int added=0;
- float tot=0.0f;
-
- for (z=-1; z <= 1; z++) {
- z_ = zz+z;
- if (z_ >= 0 && z_ <= res[2]-1) {
-
- for (y=-1; y <= 1; y++) {
- y_ = yy+y;
- if (y_ >= 0 && y_ <= res[1]-1) {
-
- for (x=-1; x <= 1; x++) {
- x_ = xx+x;
- if (x_ >= 0 && x_ <= res[0]-1) {
-
- if (cache[ V_I(x_, y_, z_, res) ] > 0.0f) {
- tot += cache[ V_I(x_, y_, z_, res) ];
- added++;
- }
-
- }
- }
- }
- }
- }
- }
-
- tot /= added;
-
- return ((added>0)?tot:0.0f);
-}
-
-/* function to filter the edges of the light cache, where there was no volume originally.
- * For each voxel which was originally external to the mesh, it finds the average values of
- * the surrounding internal voxels and sets the original external voxel to that average amount.
- * Works almost a bit like a 'dilate' filter */
-static void lightcache_filter(VolumePrecache *vp)
-{
- int x, y, z;
-
- for (z=0; z < vp->res[2]; z++) {
- for (y=0; y < vp->res[1]; y++) {
- for (x=0; x < vp->res[0]; x++) {
- /* trigger for outside mesh */
- if (vp->data_r[ V_I(x, y, z, vp->res) ] < -0.5f)
- vp->data_r[ V_I(x, y, z, vp->res) ] = get_avg_surrounds(vp->data_r, vp->res, x, y, z);
- if (vp->data_g[ V_I(x, y, z, vp->res) ] < -0.5f)
- vp->data_g[ V_I(x, y, z, vp->res) ] = get_avg_surrounds(vp->data_g, vp->res, x, y, z);
- if (vp->data_b[ V_I(x, y, z, vp->res) ] < -0.5f)
- vp->data_b[ V_I(x, y, z, vp->res) ] = get_avg_surrounds(vp->data_b, vp->res, x, y, z);
- }
- }
- }
-}
-
-static inline int ms_I(int x, int y, int z, int *n) //has a pad of 1 voxel surrounding the core for boundary simulation
-{
- return z*(n[1]+2)*(n[0]+2) + y*(n[0]+2) + x;
-}
-
-
-/* *** multiple scattering approximation *** */
-
-/* get the total amount of light energy in the light cache. used to normalise after multiple scattering */
-static float total_ss_energy(VolumePrecache *vp)
-{
- int x, y, z;
- int *res = vp->res;
- float energy=0.f;
-
- for (z=0; z < res[2]; z++) {
- for (y=0; y < res[1]; y++) {
- for (x=0; x < res[0]; x++) {
- if (vp->data_r[ V_I(x, y, z, res) ] > 0.f) energy += vp->data_r[ V_I(x, y, z, res) ];
- if (vp->data_g[ V_I(x, y, z, res) ] > 0.f) energy += vp->data_g[ V_I(x, y, z, res) ];
- if (vp->data_b[ V_I(x, y, z, res) ] > 0.f) energy += vp->data_b[ V_I(x, y, z, res) ];
- }
- }
- }
-
- return energy;
-}
-
-static float total_ms_energy(float *sr, float *sg, float *sb, int *res)
-{
- int x, y, z, i;
- float energy=0.f;
-
- for (z=1;z<=res[2];z++) {
- for (y=1;y<=res[1];y++) {
- for (x=1;x<=res[0];x++) {
-
- i = ms_I(x,y,z,res);
- if (sr[i] > 0.f) energy += sr[i];
- if (sg[i] > 0.f) energy += sg[i];
- if (sb[i] > 0.f) energy += sb[i];
- }
- }
- }
-
- return energy;
-}
-
-static void ms_diffuse(int b, float* x0, float* x, float diff, int *n)
-{
- int i, j, k, l;
- const float dt = VOL_MS_TIMESTEP;
- const float a = dt*diff*n[0]*n[1]*n[2];
-
- for (l=0; l<20; l++)
- {
- for (k=1; k<=n[2]; k++)
- {
- for (j=1; j<=n[1]; j++)
- {
- for (i=1; i<=n[0]; i++)
- {
- x[ms_I(i,j,k,n)] = (x0[ms_I(i,j,k,n)] + a*(
- x[ms_I(i-1,j,k,n)]+x[ms_I(i+1,j,k,n)]+
- x[ms_I(i,j-1,k,n)]+x[ms_I(i,j+1,k,n)]+
- x[ms_I(i,j,k-1,n)]+x[ms_I(i,j,k+1,n)]))/(1+6*a);
- }
- }
- }
- }
-}
-
-void multiple_scattering_diffusion(Render *re, VolumePrecache *vp, Material *ma)
-{
- const float diff = ma->vol.ms_diff * 0.001f; /* compensate for scaling for a nicer UI range */
- const float simframes = ma->vol.ms_steps;
- const int shade_type = ma->vol.shade_type;
- float fac = ma->vol.ms_intensity;
-
- int x, y, z, m;
- int *n = vp->res;
- const int size = (n[0]+2)*(n[1]+2)*(n[2]+2);
- double time, lasttime= PIL_check_seconds_timer();
- float total;
- float c=1.0f;
- int i;
- float origf; /* factor for blending in original light cache */
- float energy_ss, energy_ms;
-
- float *sr0=(float *)MEM_callocN(size*sizeof(float), "temporary multiple scattering buffer");
- float *sr=(float *)MEM_callocN(size*sizeof(float), "temporary multiple scattering buffer");
- float *sg0=(float *)MEM_callocN(size*sizeof(float), "temporary multiple scattering buffer");
- float *sg=(float *)MEM_callocN(size*sizeof(float), "temporary multiple scattering buffer");
- float *sb0=(float *)MEM_callocN(size*sizeof(float), "temporary multiple scattering buffer");
- float *sb=(float *)MEM_callocN(size*sizeof(float), "temporary multiple scattering buffer");
-
- total = (float)(n[0]*n[1]*n[2]*simframes);
-
- energy_ss = total_ss_energy(vp);
-
- /* Scattering as diffusion pass */
- for (m=0; m<simframes; m++)
- {
- /* add sources */
- for (z=1; z<=n[2]; z++)
- {
- for (y=1; y<=n[1]; y++)
- {
- for (x=1; x<=n[0]; x++)
- {
- i = V_I((x-1), (y-1), (z-1), n);
- time= PIL_check_seconds_timer();
- c++;
-
- if (vp->data_r[i] > 0.f)
- sr[ms_I(x,y,z,n)] += vp->data_r[i];
- if (vp->data_g[i] > 0.f)
- sg[ms_I(x,y,z,n)] += vp->data_g[i];
- if (vp->data_b[i] > 0.f)
- sb[ms_I(x,y,z,n)] += vp->data_b[i];
-
- /* Displays progress every second */
- if(time-lasttime>1.0f) {
- char str[64];
- sprintf(str, "Simulating multiple scattering: %d%%", (int)
- (100.0f * (c / total)));
- re->i.infostr= str;
- re->stats_draw(re->sdh, &re->i);
- re->i.infostr= NULL;
- lasttime= time;
- }
- }
- }
- }
- SWAP(float *, sr, sr0);
- SWAP(float *, sg, sg0);
- SWAP(float *, sb, sb0);
-
- /* main diffusion simulation */
- ms_diffuse(0, sr0, sr, diff, n);
- ms_diffuse(0, sg0, sg, diff, n);
- ms_diffuse(0, sb0, sb, diff, n);
-
- if (re->test_break(re->tbh)) break;
- }
-
- /* normalisation factor to conserve energy */
- energy_ms = total_ms_energy(sr, sg, sb, n);
- fac *= (energy_ss / energy_ms);
-
- /* blend multiple scattering back in the light cache */
- if (shade_type == MA_VOL_SHADE_SINGLEPLUSMULTIPLE) {
- /* conserve energy - half single, half multiple */
- origf = 0.5f;
- fac *= 0.5f;
- } else {
- origf = 0.0f;
- }
-
- for (z=1;z<=n[2];z++)
- {
- for (y=1;y<=n[1];y++)
- {
- for (x=1;x<=n[0];x++)
- {
- int index=(x-1)*n[1]*n[2] + (y-1)*n[2] + z-1;
- vp->data_r[index] = origf * vp->data_r[index] + fac * sr[ms_I(x,y,z,n)];
- vp->data_g[index] = origf * vp->data_g[index] + fac * sg[ms_I(x,y,z,n)];
- vp->data_b[index] = origf * vp->data_b[index] + fac * sb[ms_I(x,y,z,n)];
- }
- }
- }
-
- MEM_freeN(sr0);
- MEM_freeN(sr);
- MEM_freeN(sg0);
- MEM_freeN(sg);
- MEM_freeN(sb0);
- MEM_freeN(sb);
-}
-
-
-
-#if 0 // debug stuff
-static void *vol_precache_part_test(void *data)
-{
- VolPrecachePart *pa = data;
-
- printf("part number: %d \n", pa->num);
- printf("done: %d \n", pa->done);
- printf("x min: %d x max: %d \n", pa->minx, pa->maxx);
- printf("y min: %d y max: %d \n", pa->miny, pa->maxy);
- printf("z min: %d z max: %d \n", pa->minz, pa->maxz);
-
- return NULL;
-}
-#endif
-
-/* Iterate over the 3d voxel grid, and fill the voxels with scattering information
- *
- * It's stored in memory as 3 big float grids next to each other, one for each RGB channel.
- * I'm guessing the memory alignment may work out better this way for the purposes
- * of doing linear interpolation, but I haven't actually tested this theory! :)
- */
-static void *vol_precache_part(void *data)
-{
- VolPrecachePart *pa = (VolPrecachePart *)data;
- ObjectInstanceRen *obi = pa->obi;
- RayTree *tree = pa->tree;
- ShadeInput *shi = pa->shi;
- float density, scatter_col[3] = {0.f, 0.f, 0.f};
- float co[3];
- int x, y, z;
- const int res[3]= {pa->res[0], pa->res[1], pa->res[2]};
- const float stepsize = vol_get_stepsize(shi, STEPSIZE_VIEW);
-
- for (z= pa->minz; z < pa->maxz; z++) {
- co[2] = pa->bbmin[2] + (pa->voxel[2] * (z + 0.5f));
-
- for (y= pa->miny; y < pa->maxy; y++) {
- co[1] = pa->bbmin[1] + (pa->voxel[1] * (y + 0.5f));
-
- for (x=pa->minx; x < pa->maxx; x++) {
- co[0] = pa->bbmin[0] + (pa->voxel[0] * (x + 0.5f));
-
- // don't bother if the point is not inside the volume mesh
- if (!point_inside_obi(tree, obi, co)) {
- obi->volume_precache->data_r[ V_I(x, y, z, res) ] = -1.0f;
- obi->volume_precache->data_g[ V_I(x, y, z, res) ] = -1.0f;
- obi->volume_precache->data_b[ V_I(x, y, z, res) ] = -1.0f;
- continue;
- }
-
- VecCopyf(shi->view, co);
- Normalize(shi->view);
- density = vol_get_density(shi, co);
- vol_get_scattering(shi, scatter_col, co, stepsize, density);
-
- obi->volume_precache->data_r[ V_I(x, y, z, res) ] = scatter_col[0];
- obi->volume_precache->data_g[ V_I(x, y, z, res) ] = scatter_col[1];
- obi->volume_precache->data_b[ V_I(x, y, z, res) ] = scatter_col[2];
- }
- }
- }
-
- pa->done = 1;
-
- return 0;
-}
-
-
-static void precache_setup_shadeinput(Render *re, ObjectInstanceRen *obi, Material *ma, ShadeInput *shi)
-{
- memset(shi, 0, sizeof(ShadeInput));
- shi->depth= 1;
- shi->mask= 1;
- shi->mat = ma;
- shi->vlr = NULL;
- memcpy(&shi->r, &shi->mat->r, 23*sizeof(float)); // note, keep this synced with render_types.h
- shi->har= shi->mat->har;
- shi->obi= obi;
- shi->obr= obi->obr;
- shi->lay = re->scene->lay;
-}
-
-static void precache_init_parts(Render *re, RayTree *tree, ShadeInput *shi, ObjectInstanceRen *obi, int totthread, int *parts)
-{
- VolumePrecache *vp = obi->volume_precache;
- int i=0, x, y, z;
- float voxel[3];
- int sizex, sizey, sizez;
- float *bbmin=obi->obr->boundbox[0], *bbmax=obi->obr->boundbox[1];
- int *res;
- int minx, maxx;
- int miny, maxy;
- int minz, maxz;
-
- if (!vp) return;
-
- BLI_freelistN(&re->volume_precache_parts);
-
- /* currently we just subdivide the box, number of threads per side */
- parts[0] = parts[1] = parts[2] = totthread;
- res = vp->res;
-
- VecSubf(voxel, bbmax, bbmin);
-
- voxel[0] /= res[0];
- voxel[1] /= res[1];
- voxel[2] /= res[2];
-
- for (x=0; x < parts[0]; x++) {
- sizex = ceil(res[0] / (float)parts[0]);
- minx = x * sizex;
- maxx = minx + sizex;
- maxx = (maxx>res[0])?res[0]:maxx;
-
- for (y=0; y < parts[1]; y++) {
- sizey = ceil(res[1] / (float)parts[1]);
- miny = y * sizey;
- maxy = miny + sizey;
- maxy = (maxy>res[1])?res[1]:maxy;
-
- for (z=0; z < parts[2]; z++) {
- VolPrecachePart *pa= MEM_callocN(sizeof(VolPrecachePart), "new precache part");
-
- sizez = ceil(res[2] / (float)parts[2]);
- minz = z * sizez;
- maxz = minz + sizez;
- maxz = (maxz>res[2])?res[2]:maxz;
-
- pa->done = 0;
- pa->working = 0;
-
- pa->num = i;
- pa->tree = tree;
- pa->shi = shi;
- pa->obi = obi;
- VECCOPY(pa->bbmin, bbmin);
- VECCOPY(pa->voxel, voxel);
- VECCOPY(pa->res, res);
-
- pa->minx = minx; pa->maxx = maxx;
- pa->miny = miny; pa->maxy = maxy;
- pa->minz = minz; pa->maxz = maxz;
-
-
- BLI_addtail(&re->volume_precache_parts, pa);
-
- i++;
- }
- }
- }
-}
-
-static VolPrecachePart *precache_get_new_part(Render *re)
-{
- VolPrecachePart *pa, *nextpa=NULL;
-
- for (pa = re->volume_precache_parts.first; pa; pa=pa->next)
- {
- if (pa->done==0 && pa->working==0) {
- nextpa = pa;
- break;
- }
- }
-
- return nextpa;
-}
-
-static int precache_resolution(VolumePrecache *vp, float *bbmin, float *bbmax, int res)
-{
- float dim[3], div;
-
- VecSubf(dim, bbmax, bbmin);
-
- div = MAX3(dim[0], dim[1], dim[2]);
- dim[0] /= div;
- dim[1] /= div;
- dim[2] /= div;
-
- vp->res[0] = dim[0] * (float)res;
- vp->res[1] = dim[1] * (float)res;
- vp->res[2] = dim[2] * (float)res;
-
- if ((vp->res[0] < 1) || (vp->res[1] < 1) || (vp->res[2] < 1))
- return 0;
-
- return 1;
-}
-
-/* Precache a volume into a 3D voxel grid.
- * The voxel grid is stored in the ObjectInstanceRen,
- * in camera space, aligned with the ObjectRen's bounding box.
- * Resolution is defined by the user.
- */
-void vol_precache_objectinstance_threads(Render *re, ObjectInstanceRen *obi, Material *ma)
-{
- VolumePrecache *vp;
- VolPrecachePart *nextpa, *pa;
- RayTree *tree;
- ShadeInput shi;
- ListBase threads;
- float *bbmin=obi->obr->boundbox[0], *bbmax=obi->obr->boundbox[1];
- int parts[3], totparts;
-
- int caching=1, counter=0;
- int totthread = re->r.threads;
-
- double time, lasttime= PIL_check_seconds_timer();
-
- R = *re;
-
- /* create a raytree with just the faces of the instanced ObjectRen,
- * used for checking if the cached point is inside or outside. */
- tree = create_raytree_obi(obi, bbmin, bbmax);
- if (!tree) return;
-
- vp = MEM_callocN(sizeof(VolumePrecache), "volume light cache");
-
- if (!precache_resolution(vp, bbmin, bbmax, ma->vol.precache_resolution)) {
- MEM_freeN(vp);
- vp = NULL;
- return;
- }
-
- vp->data_r = MEM_callocN(sizeof(float)*vp->res[0]*vp->res[1]*vp->res[2], "volume light cache data red channel");
- vp->data_g = MEM_callocN(sizeof(float)*vp->res[0]*vp->res[1]*vp->res[2], "volume light cache data green channel");
- vp->data_b = MEM_callocN(sizeof(float)*vp->res[0]*vp->res[1]*vp->res[2], "volume light cache data blue channel");
- obi->volume_precache = vp;
-
- /* Need a shadeinput to calculate scattering */
- precache_setup_shadeinput(re, obi, ma, &shi);
-
- precache_init_parts(re, tree, &shi, obi, totthread, parts);
- totparts = parts[0] * parts[1] * parts[2];
-
- BLI_init_threads(&threads, vol_precache_part, totthread);
-
- while(caching) {
-
- if(BLI_available_threads(&threads) && !(re->test_break(re->tbh))) {
- nextpa = precache_get_new_part(re);
- if (nextpa) {
- nextpa->working = 1;
- BLI_insert_thread(&threads, nextpa);
- }
- }
- else PIL_sleep_ms(50);
-
- caching=0;
- counter=0;
- for(pa= re->volume_precache_parts.first; pa; pa= pa->next) {
-
- if(pa->done) {
- counter++;
- BLI_remove_thread(&threads, pa);
- } else
- caching = 1;
- }
-
- if (re->test_break(re->tbh) && BLI_available_threads(&threads)==totthread)
- caching=0;
-
- time= PIL_check_seconds_timer();
- if(time-lasttime>1.0f) {
- char str[64];
- sprintf(str, "Precaching volume: %d%%", (int)(100.0f * ((float)counter / (float)totparts)));
- re->i.infostr= str;
- re->stats_draw(re->sdh, &re->i);
- re->i.infostr= NULL;
- lasttime= time;
- }
- }
-
- BLI_end_threads(&threads);
- BLI_freelistN(&re->volume_precache_parts);
-
- if(tree) {
- RE_ray_tree_free(tree);
- tree= NULL;
- }
-
- lightcache_filter(obi->volume_precache);
-
- if (ELEM(ma->vol.shade_type, MA_VOL_SHADE_MULTIPLE, MA_VOL_SHADE_SINGLEPLUSMULTIPLE))
- {
- multiple_scattering_diffusion(re, vp, ma);
- }
-}
-
-static int using_lightcache(Material *ma)
-{
- return (((ma->vol.shadeflag & MA_VOL_PRECACHESHADING) && (ma->vol.shade_type == MA_VOL_SHADE_SINGLE))
- || (ELEM(ma->vol.shade_type, MA_VOL_SHADE_MULTIPLE, MA_VOL_SHADE_SINGLEPLUSMULTIPLE)));
-}
-
-/* loop through all objects (and their associated materials)
- * marked for pre-caching in convertblender.c, and pre-cache them */
-void volume_precache(Render *re)
-{
- ObjectInstanceRen *obi;
- VolumeOb *vo;
-
- for(vo= re->volumes.first; vo; vo= vo->next) {
- if (using_lightcache(vo->ma)) {
- for(obi= re->instancetable.first; obi; obi= obi->next) {
- if (obi->obr == vo->obr) {
- vol_precache_objectinstance_threads(re, obi, vo->ma);
- }
- }
- }
- }
-
- re->i.infostr= NULL;
- re->stats_draw(re->sdh, &re->i);
-}
-
-void free_volume_precache(Render *re)
-{
- ObjectInstanceRen *obi;
-
- for(obi= re->instancetable.first; obi; obi= obi->next) {
- if (obi->volume_precache != NULL) {
- MEM_freeN(obi->volume_precache->data_r);
- MEM_freeN(obi->volume_precache->data_g);
- MEM_freeN(obi->volume_precache->data_b);
- MEM_freeN(obi->volume_precache);
- obi->volume_precache = NULL;
- }
- }
-
- BLI_freelistN(&re->volumes);
-}
-
-int point_inside_volume_objectinstance(ObjectInstanceRen *obi, float *co)
-{
- RayTree *tree;
- int inside=0;
-
- tree = create_raytree_obi(obi, obi->obr->boundbox[0], obi->obr->boundbox[1]);
- if (!tree) return 0;
-
- inside = point_inside_obi(tree, obi, co);
-
- RE_ray_tree_free(tree);
- tree= NULL;
-
- return inside;
-}
-
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c
deleted file mode 100644
index bc425c8a1a3..00000000000
--- a/source/blender/render/intern/source/volumetric.c
+++ /dev/null
@@ -1,752 +0,0 @@
-/**
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 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): Matt Ebb, Raul Fernandez Hernandez (Farsthary)
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <math.h>
-#include <stdlib.h>
-#include <string.h>
-#include <float.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_blenlib.h"
-#include "BLI_arithb.h"
-#include "BLI_rand.h"
-#include "BLI_voxel.h"
-
-#include "RE_shader_ext.h"
-#include "RE_raytrace.h"
-
-#include "DNA_material_types.h"
-#include "DNA_group_types.h"
-#include "DNA_lamp_types.h"
-#include "DNA_meta_types.h"
-
-#include "BKE_global.h"
-
-#include "render_types.h"
-#include "pixelshading.h"
-#include "shading.h"
-#include "texture.h"
-#include "volumetric.h"
-#include "volume_precache.h"
-
-#if defined( _MSC_VER ) && !defined( __cplusplus )
-# define inline __inline
-#endif // defined( _MSC_VER ) && !defined( __cplusplus )
-
-/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-/* defined in pipeline.c, is hardcopy of active dynamic allocated Render */
-/* only to be used here in this file, it's for speed */
-extern struct Render R;
-/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
-
-/* luminance rec. 709 */
-inline float luminance(float* col)
-{
- return (0.212671f*col[0] + 0.71516f*col[1] + 0.072169f*col[2]);
-}
-
-/* tracing */
-
-static int vol_get_bounds(ShadeInput *shi, float *co, float *vec, float *hitco, Isect *isect, int intersect_type)
-{
- float maxsize = RE_ray_tree_max_size(R.raytree);
-
- /* XXX TODO - get raytrace max distance from object instance's bounding box */
- /* need to account for scaling only, but keep coords in camera space...
- * below code is WIP and doesn't work!
- VecSubf(bb_dim, shi->obi->obr->boundbox[1], shi->obi->obr->boundbox[2]);
- Mat3MulVecfl(shi->obi->nmat, bb_dim);
- maxsize = VecLength(bb_dim);
- */
-
- VECCOPY(isect->start, co);
- isect->end[0] = co[0] + vec[0] * maxsize;
- isect->end[1] = co[1] + vec[1] * maxsize;
- isect->end[2] = co[2] + vec[2] * maxsize;
-
- isect->mode= RE_RAY_MIRROR;
- isect->oborig= RAY_OBJECT_SET(&R, shi->obi);
- isect->face_last= NULL;
- isect->ob_last= 0;
- isect->lay= -1;
-
- if (intersect_type == VOL_BOUNDS_DEPTH) isect->faceorig= (RayFace*)shi->vlr;
- else if (intersect_type == VOL_BOUNDS_SS) isect->faceorig= NULL;
-
- if(RE_ray_tree_intersect(R.raytree, isect))
- {
- hitco[0] = isect->start[0] + isect->labda*isect->vec[0];
- hitco[1] = isect->start[1] + isect->labda*isect->vec[1];
- hitco[2] = isect->start[2] + isect->labda*isect->vec[2];
- return 1;
- } else {
- return 0;
- }
-}
-
-static void shade_intersection(ShadeInput *shi, float *col, Isect *is)
-{
- ShadeInput shi_new;
- ShadeResult shr_new;
-
- memset(&shi_new, 0, sizeof(ShadeInput));
-
- shi_new.mask= shi->mask;
- shi_new.osatex= shi->osatex;
- shi_new.thread= shi->thread;
- shi_new.depth = shi->depth + 1;
- shi_new.volume_depth= shi->volume_depth + 1;
- shi_new.xs= shi->xs;
- shi_new.ys= shi->ys;
- shi_new.lay= shi->lay;
- shi_new.passflag= SCE_PASS_COMBINED; /* result of tracing needs no pass info */
- shi_new.combinedflag= 0xFFFFFF; /* ray trace does all options */
- shi_new.light_override= shi->light_override;
- shi_new.mat_override= shi->mat_override;
-
- VECCOPY(shi_new.camera_co, is->start);
-
- memset(&shr_new, 0, sizeof(ShadeResult));
-
- /* hardcoded limit of 100 for now - prevents problems in weird geometry */
- if (shi->volume_depth < 100) {
- shade_ray(is, &shi_new, &shr_new);
- }
-
- VecCopyf(col, shr_new.combined);
- col[3] = shr_new.alpha;
-}
-
-static void vol_trace_behind(ShadeInput *shi, VlakRen *vlr, float *co, float *col)
-{
- Isect isect;
- float maxsize = RE_ray_tree_max_size(R.raytree);
-
- VECCOPY(isect.start, co);
- isect.end[0] = isect.start[0] + shi->view[0] * maxsize;
- isect.end[1] = isect.start[1] + shi->view[1] * maxsize;
- isect.end[2] = isect.start[2] + shi->view[2] * maxsize;
-
- isect.faceorig= (RayFace *)vlr;
-
- isect.mode= RE_RAY_MIRROR;
- isect.oborig= RAY_OBJECT_SET(&R, shi->obi);
- isect.face_last= NULL;
- isect.ob_last= 0;
- isect.lay= -1;
-
- /* check to see if there's anything behind the volume, otherwise shade the sky */
- if(RE_ray_tree_intersect(R.raytree, &isect)) {
- shade_intersection(shi, col, &isect);
- } else {
- shadeSkyView(col, co, shi->view, NULL, shi->thread);
- shadeSunView(col, shi->view);
- }
-}
-
-/* input shader data */
-
-float vol_get_stepsize(struct ShadeInput *shi, int context)
-{
- if (shi->mat->vol.stepsize_type == MA_VOL_STEP_RANDOMIZED) {
- /* range between 0.75 and 1.25 */
- const float rnd = 0.5f * BLI_thread_frand(shi->thread) + 0.75f;
-
- if (context == STEPSIZE_VIEW)
- return shi->mat->vol.stepsize * rnd;
- else if (context == STEPSIZE_SHADE)
- return shi->mat->vol.shade_stepsize * rnd;
- }
- else { // MA_VOL_STEP_CONSTANT
-
- if (context == STEPSIZE_VIEW)
- return shi->mat->vol.stepsize;
- else if (context == STEPSIZE_SHADE)
- return shi->mat->vol.shade_stepsize;
- }
-
- return shi->mat->vol.stepsize;
-}
-
-/* trilinear interpolation */
-static void vol_get_precached_scattering(ShadeInput *shi, float *scatter_col, float *co)
-{
- VolumePrecache *vp = shi->obi->volume_precache;
- float bbmin[3], bbmax[3], dim[3];
- float sample_co[3];
-
- if (!vp) return;
-
- /* convert input coords to 0.0, 1.0 */
- VECCOPY(bbmin, shi->obi->obr->boundbox[0]);
- VECCOPY(bbmax, shi->obi->obr->boundbox[1]);
- VecSubf(dim, bbmax, bbmin);
-
- sample_co[0] = ((co[0] - bbmin[0]) / dim[0]);
- sample_co[1] = ((co[1] - bbmin[1]) / dim[1]);
- sample_co[2] = ((co[2] - bbmin[2]) / dim[2]);
-
- scatter_col[0] = voxel_sample_trilinear(vp->data_r, vp->res, sample_co);
- scatter_col[1] = voxel_sample_trilinear(vp->data_g, vp->res, sample_co);
- scatter_col[2] = voxel_sample_trilinear(vp->data_b, vp->res, sample_co);
-}
-
-/* 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)
-{
- float mat[4][4], imat[4][4], dens = 0.f;
- MetaBall* mb = (MetaBall*)ob->data;
- MetaElem* ml;
-
- /* transform co to meta-element */
- float tco[3] = {co[0], co[1], co[2]};
- Mat4MulMat4(mat, ob->obmat, R.viewmat);
- Mat4Invert(imat, mat);
- Mat4MulVecfl(imat, tco);
-
- for (ml = mb->elems.first; ml; ml=ml->next) {
- float bmat[3][3], dist2;
-
- /* element rotation transform */
- float tp[3] = {ml->x - tco[0], ml->y - tco[1], ml->z - tco[2]};
- QuatToMat3(ml->quat, bmat);
- Mat3Transp(bmat); // rot.only, so inverse == transpose
- Mat3MulVecfl(bmat, tp);
-
- /* MB_BALL default */
- switch (ml->type) {
- case MB_ELIPSOID:
- tp[0] /= ml->expx, tp[1] /= ml->expy, tp[2] /= ml->expz;
- break;
- case MB_CUBE:
- tp[2] = (tp[2] > ml->expz) ? (tp[2] - ml->expz) : ((tp[2] < -ml->expz) ? (tp[2] + ml->expz) : 0.f);
- // no break, xy as plane
- case MB_PLANE:
- tp[1] = (tp[1] > ml->expy) ? (tp[1] - ml->expy) : ((tp[1] < -ml->expy) ? (tp[1] + ml->expy) : 0.f);
- // no break, x as tube
- case MB_TUBE:
- tp[0] = (tp[0] > ml->expx) ? (tp[0] - ml->expx) : ((tp[0] < -ml->expx) ? (tp[0] + ml->expx) : 0.f);
- }
-
- /* ml->rad2 is not set */
- dist2 = 1.f - ((tp[0]*tp[0] + tp[1]*tp[1] + tp[2]*tp[2]) / (ml->rad*ml->rad));
- if (dist2 > 0.f)
- dens += (ml->flag & MB_NEGATIVE) ? -ml->s*dist2*dist2*dist2 : ml->s*dist2*dist2*dist2;
- }
-
- dens -= mb->thresh;
- return (dens < 0.f) ? 0.f : dens;
-}
-
-float vol_get_density(struct ShadeInput *shi, float *co)
-{
- float density = shi->mat->vol.density;
- float density_scale = shi->mat->vol.density_scale;
-
- do_volume_tex(shi, co, MAP_DENSITY, NULL, &density);
-
- // if meta-object, modulate by metadensity without increasing it
- if (shi->obi->obr->ob->type == OB_MBALL) {
- const float md = metadensity(shi->obi->obr->ob, co);
- if (md < 1.f) density *= md;
- }
-
- return density * density_scale;
-}
-
-/* scattering multiplier, values above 1.0 are non-physical,
- * but can be useful to tweak lighting */
-float vol_get_scattering_fac(ShadeInput *shi, float *co)
-{
- float scatter = shi->mat->vol.scattering;
- float col[3] = {0.0, 0.0, 0.0};
-
- do_volume_tex(shi, co, MAP_SCATTERING, col, &scatter);
-
- return scatter;
-}
-
-/* compute emission component, amount of radiance to add per segment
- * can be textured with 'emit' */
-void vol_get_emission(ShadeInput *shi, float *emission_col, float *co, float density)
-{
- float emission = shi->mat->vol.emission;
- VECCOPY(emission_col, shi->mat->vol.emission_col);
-
- do_volume_tex(shi, co, MAP_EMISSION+MAP_EMISSION_COL, emission_col, &emission);
-
- emission_col[0] = emission_col[0] * emission * density;
- emission_col[1] = emission_col[1] * emission * density;
- emission_col[2] = emission_col[2] * emission * density;
-}
-
-void vol_get_absorption(ShadeInput *shi, float *absorb_col, float *co)
-{
- float absorption = shi->mat->vol.absorption;
- VECCOPY(absorb_col, shi->mat->vol.absorption_col);
-
- do_volume_tex(shi, co, MAP_ABSORPTION+MAP_ABSORPTION_COL, absorb_col, &absorption);
-
- absorb_col[0] = (1.0f - absorb_col[0]) * absorption;
- absorb_col[1] = (1.0f - absorb_col[1]) * absorption;
- absorb_col[2] = (1.0f - absorb_col[2]) * absorption;
-}
-
-/* phase function - determines in which directions the light
- * is scattered in the volume relative to incoming direction
- * and view direction */
-float vol_get_phasefunc(ShadeInput *shi, short phasefunc_type, float g, float *w, float *wp)
-{
- const float costheta = Inpf(w, wp);
- const float scale = M_PI;
-
- /*
- * Scale constant is required, since Blender's shading system doesn't normalise for
- * energy conservation - eg. scaling by 1/pi for a lambert shader.
- * This makes volumes darker than other solid objects, for the same lighting intensity.
- * To correct this, scale up the phase function values
- * until Blender's shading system supports this better. --matt
- */
-
- switch (phasefunc_type) {
- case MA_VOL_PH_MIEHAZY:
- return scale * (0.5f + 4.5f * powf(0.5 * (1.f + costheta), 8.f)) / (4.f*M_PI);
- case MA_VOL_PH_MIEMURKY:
- return scale * (0.5f + 16.5f * powf(0.5 * (1.f + costheta), 32.f)) / (4.f*M_PI);
- case MA_VOL_PH_RAYLEIGH:
- return scale * 3.f/(16.f*M_PI) * (1 + costheta * costheta);
- case MA_VOL_PH_HG:
- return scale * (1.f / (4.f * M_PI) * (1.f - g*g) / powf(1.f + g*g - 2.f * g * costheta, 1.5f));
- case MA_VOL_PH_SCHLICK:
- {
- const float k = 1.55f * g - .55f * g * g * g;
- const float kcostheta = k * costheta;
- return scale * (1.f / (4.f * M_PI) * (1.f - k*k) / ((1.f - kcostheta) * (1.f - kcostheta)));
- }
- case MA_VOL_PH_ISOTROPIC:
- default:
- return scale * (1.f / (4.f * M_PI));
- }
-}
-
-/* Compute transmittance = e^(-attenuation) */
-void vol_get_transmittance_seg(ShadeInput *shi, float *tr, float stepsize, float *co, float density)
-{
- /* input density = density at co */
- float tau[3] = {0.f, 0.f, 0.f};
- float absorb[3];
- const float scatter_dens = vol_get_scattering_fac(shi, co) * density * stepsize;
-
- vol_get_absorption(shi, absorb, co);
-
- /* homogenous volume within the sampled distance */
- tau[0] += scatter_dens * absorb[0];
- tau[1] += scatter_dens * absorb[1];
- tau[2] += scatter_dens * absorb[2];
-
- tr[0] *= exp(-tau[0]);
- tr[1] *= exp(-tau[1]);
- tr[2] *= exp(-tau[2]);
-}
-
-/* Compute transmittance = e^(-attenuation) */
-static void vol_get_transmittance(ShadeInput *shi, float *tr, float *co, float *endco)
-{
- 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]};
- //const float ambtau = -logf(shi->mat->vol.depth_cutoff); // never zero
- float tau[3] = {0.f, 0.f, 0.f};
-
- float t0 = 0.f;
- float t1 = Normalize(step_vec);
- float pt0 = t0;
-
- t0 += shi->mat->vol.shade_stepsize * ((shi->mat->vol.stepsize_type == MA_VOL_STEP_CONSTANT) ? 0.5f : BLI_thread_frand(shi->thread));
- p[0] += t0 * step_vec[0];
- p[1] += t0 * step_vec[1];
- p[2] += t0 * step_vec[2];
- VecMulf(step_vec, shi->mat->vol.shade_stepsize);
-
- for (; t0 < t1; pt0 = t0, t0 += shi->mat->vol.shade_stepsize) {
- float absorb[3];
- const float d = vol_get_density(shi, p);
- const float stepd = (t0 - pt0) * d;
- const float scatter_dens = vol_get_scattering_fac(shi, p) * stepd;
- vol_get_absorption(shi, absorb, p);
-
- tau[0] += scatter_dens * absorb[0];
- tau[1] += scatter_dens * absorb[1];
- tau[2] += scatter_dens * absorb[2];
-
- //if (luminance(tau) >= ambtau) break;
- VecAddf(p, p, step_vec);
- }
-
- /* return transmittance */
- tr[0] = expf(-tau[0]);
- tr[1] = expf(-tau[1]);
- tr[2] = expf(-tau[2]);
-}
-
-void vol_shade_one_lamp(struct ShadeInput *shi, float *co, LampRen *lar, float *lacol)
-{
- float visifac, lv[3], lampdist;
- float tr[3]={1.0,1.0,1.0};
- float hitco[3], *atten_co;
- float p;
- float scatter_fac;
- float shade_stepsize = vol_get_stepsize(shi, STEPSIZE_SHADE);
-
- if (lar->mode & LA_LAYER) if((lar->lay & shi->obi->lay)==0) return;
- if ((lar->lay & shi->lay)==0) return;
- if (lar->energy == 0.0) return;
-
- if ((visifac= lamp_get_visibility(lar, co, lv, &lampdist)) == 0.f) return;
-
- VecCopyf(lacol, &lar->r);
-
- if(lar->mode & LA_TEXTURE) {
- shi->osatex= 0;
- do_lamp_tex(lar, lv, shi, lacol, LA_TEXTURE);
- }
-
- VecMulf(lacol, visifac);
-
- if (ELEM(lar->type, LA_SUN, LA_HEMI))
- VECCOPY(lv, lar->vec);
- VecMulf(lv, -1.0f);
-
- if (shi->mat->vol.shade_type != MA_VOL_SHADE_NONE) {
- Isect is;
-
- /* find minimum of volume bounds, or lamp coord */
- if (vol_get_bounds(shi, co, lv, hitco, &is, VOL_BOUNDS_SS)) {
- float dist = VecLenf(co, hitco);
- VlakRen *vlr = (VlakRen *)is.face;
-
- /* simple internal shadowing */
- if (vlr->mat->material_type == MA_TYPE_SURFACE) {
- lacol[0] = lacol[1] = lacol[2] = 0.0f;
- return;
- }
-
- if (ELEM(lar->type, LA_SUN, LA_HEMI))
- /* infinite lights, can never be inside volume */
- atten_co = hitco;
- else if ( lampdist < dist ) {
- atten_co = lar->co;
- } else
- atten_co = hitco;
-
- vol_get_transmittance(shi, tr, co, atten_co);
-
- VecMulVecf(lacol, lacol, tr);
- }
- else {
- /* Point is on the outside edge of the volume,
- * therefore no attenuation, full transmission.
- * Radiance from lamp remains unchanged */
- }
- }
-
- p = vol_get_phasefunc(shi, shi->mat->vol.phasefunc_type, shi->mat->vol.phasefunc_g, shi->view, lv);
- VecMulf(lacol, p);
-
- scatter_fac = vol_get_scattering_fac(shi, co);
- VecMulf(lacol, scatter_fac);
-}
-
-/* single scattering only for now */
-void vol_get_scattering(ShadeInput *shi, float *scatter_col, float *co, float stepsize, float density)
-{
- ListBase *lights;
- GroupObject *go;
- LampRen *lar;
-
- scatter_col[0] = scatter_col[1] = scatter_col[2] = 0.f;
-
- lights= get_lights(shi);
- for(go=lights->first; go; go= go->next)
- {
- float lacol[3] = {0.f, 0.f, 0.f};
- lar= go->lampren;
-
- if (lar) {
- vol_shade_one_lamp(shi, co, lar, lacol);
- VecAddf(scatter_col, scatter_col, lacol);
- }
- }
-}
-
-
-/*
-The main volumetric integrator, using an emission/absorption/scattering model.
-
-Incoming radiance =
-
-outgoing radiance from behind surface * beam transmittance/attenuation
-+ added radiance from all points along the ray due to participating media
- --> radiance for each segment =
- (radiance added by scattering + radiance added by emission) * beam transmittance/attenuation
-*/
-static void volumeintegrate(struct ShadeInput *shi, float *col, float *co, float *endco)
-{
- float tr[3] = {1.0f, 1.0f, 1.0f};
- float radiance[3] = {0.f, 0.f, 0.f}, d_radiance[3] = {0.f, 0.f, 0.f};
- float stepsize = vol_get_stepsize(shi, STEPSIZE_VIEW);
- int nsteps, s;
- float emit_col[3], scatter_col[3] = {0.0, 0.0, 0.0};
- float stepvec[3], step_sta[3], step_end[3], step_mid[3];
- float density;
- const float depth_cutoff = shi->mat->vol.depth_cutoff;
-
- /* ray marching */
- nsteps = (int)((VecLenf(co, endco) / stepsize) + 0.5);
-
- VecSubf(stepvec, endco, co);
- VecMulf(stepvec, 1.0f / nsteps);
- VecCopyf(step_sta, co);
- VecAddf(step_end, step_sta, stepvec);
-
- /* get radiance from all points along the ray due to participating media */
- for (s = 0; s < nsteps; s++) {
-
- density = vol_get_density(shi, step_sta);
-
- /* there's only any use in shading here if there's actually some density to shade! */
- if (density > 0.01f) {
-
- /* transmittance component (alpha) */
- vol_get_transmittance_seg(shi, tr, stepsize, co, density);
-
- step_mid[0] = step_sta[0] + (stepvec[0] * 0.5);
- step_mid[1] = step_sta[1] + (stepvec[1] * 0.5);
- step_mid[2] = step_sta[2] + (stepvec[2] * 0.5);
-
- /* incoming light via emission or scattering (additive) */
- vol_get_emission(shi, emit_col, step_mid, density);
-
- if (shi->obi->volume_precache)
- vol_get_precached_scattering(shi, scatter_col, step_mid);
- else
- vol_get_scattering(shi, scatter_col, step_mid, stepsize, density);
-
- VecMulf(scatter_col, density);
- VecAddf(d_radiance, emit_col, scatter_col);
-
- /* Lv += Tr * (Lve() + Ld) */
- VecMulVecf(d_radiance, tr, d_radiance);
- VecMulf(d_radiance, stepsize);
-
- VecAddf(radiance, radiance, d_radiance);
- }
-
- VecCopyf(step_sta, step_end);
- VecAddf(step_end, step_end, stepvec);
-
- /* luminance rec. 709 */
- if ((0.2126*tr[0] + 0.7152*tr[1] + 0.0722*tr[2]) < depth_cutoff) break;
- }
-
- /* multiply original color (behind volume) with beam transmittance over entire distance */
- VecMulVecf(col, tr, col);
- VecAddf(col, col, radiance);
-
- /* alpha <-- transmission luminance */
- col[3] = 1.0f -(0.2126*tr[0] + 0.7152*tr[1] + 0.0722*tr[2]);
-}
-
-/* the main entry point for volume shading */
-static void volume_trace(struct ShadeInput *shi, struct ShadeResult *shr, int inside_volume)
-{
- float hitco[3], col[4] = {0.f,0.f,0.f,0.f};
- float *startco, *endco;
- int trace_behind = 1;
- const int ztransp= ((shi->depth==0) && (shi->mat->mode & MA_TRANSP) && (shi->mat->mode & MA_ZTRANSP));
- Isect is;
-
- /* check for shading an internal face a volume object directly */
- if (inside_volume == VOL_SHADE_INSIDE)
- trace_behind = 0;
- else if (inside_volume == VOL_SHADE_OUTSIDE) {
- if (shi->flippednor)
- inside_volume = VOL_SHADE_INSIDE;
- }
-
- if (ztransp && inside_volume == VOL_SHADE_INSIDE) {
- MatInside *mi;
- int render_this=0;
-
- /* don't render the backfaces of ztransp volume materials.
-
- * volume shading renders the internal volume from between the
- * near view intersection of the solid volume to the
- * intersection on the other side, as part of the shading of
- * the front face.
-
- * Because ztransp renders both front and back faces independently
- * this will double up, so here we prevent rendering the backface as well,
- * which would otherwise render the volume in between the camera and the backface
- * --matt */
-
- for (mi=R.render_volumes_inside.first; mi; mi=mi->next) {
- /* weak... */
- if (mi->ma == shi->mat) render_this=1;
- }
- if (!render_this) return;
- }
-
-
- if (inside_volume == VOL_SHADE_INSIDE)
- {
- startco = shi->camera_co;
- endco = shi->co;
-
- if (trace_behind) {
- if (!ztransp)
- /* trace behind the volume object */
- vol_trace_behind(shi, shi->vlr, endco, col);
- } else {
- /* we're tracing through the volume between the camera
- * and a solid surface, so use that pre-shaded radiance */
- QUATCOPY(col, shr->combined);
- }
-
- /* shade volume from 'camera' to 1st hit point */
- volumeintegrate(shi, col, startco, endco);
- }
- /* trace to find a backface, the other side bounds of the volume */
- /* (ray intersect ignores front faces here) */
- else if (vol_get_bounds(shi, shi->co, shi->view, hitco, &is, VOL_BOUNDS_DEPTH))
- {
- VlakRen *vlr = (VlakRen *)is.face;
-
- startco = shi->co;
- endco = hitco;
-
- if (!ztransp) {
- /* if it's another face in the same material */
- if (vlr->mat == shi->mat) {
- /* trace behind the 2nd (raytrace) hit point */
- vol_trace_behind(shi, (VlakRen *)is.face, endco, col);
- } else {
- shade_intersection(shi, col, &is);
- }
- }
-
- /* shade volume from 1st hit point to 2nd hit point */
- volumeintegrate(shi, col, startco, endco);
- }
-
- if (ztransp)
- col[3] = col[3]>1.f?1.f:col[3];
- else
- col[3] = 1.f;
-
- VecCopyf(shr->combined, col);
- shr->alpha = col[3];
-
- VECCOPY(shr->diff, shr->combined);
-}
-
-/* Traces a shadow through the object,
- * pretty much gets the transmission over a ray path */
-void shade_volume_shadow(struct ShadeInput *shi, struct ShadeResult *shr, struct Isect *last_is)
-{
- float hitco[3];
- float tr[3] = {1.0,1.0,1.0};
- Isect is;
- float shade_stepsize = vol_get_stepsize(shi, STEPSIZE_SHADE);
- float *startco, *endco;
- float density=0.f;
-
- memset(shr, 0, sizeof(ShadeResult));
-
- /* if 1st hit normal is facing away from the camera,
- * then we're inside the volume already. */
- if (shi->flippednor) {
- startco = last_is->start;
- endco = shi->co;
- }
- /* trace to find a backface, the other side bounds of the volume */
- /* (ray intersect ignores front faces here) */
- else if (vol_get_bounds(shi, shi->co, shi->view, hitco, &is, VOL_BOUNDS_DEPTH)) {
- startco = shi->co;
- endco = hitco;
- }
- else {
- shr->combined[0] = shr->combined[1] = shr->combined[2] = 0.f;
- shr->alpha = shr->combined[3] = 1.f;
- return;
- }
-
- density = vol_get_density(shi, startco);
- vol_get_transmittance(shi, tr, startco, endco);
-
- VecCopyf(shr->combined, tr);
- shr->combined[3] = 1.0f -(0.2126*tr[0] + 0.7152*tr[1] + 0.0722*tr[2]);
- shr->alpha = shr->combined[3];
-}
-
-
-/* delivers a fully filled in ShadeResult, for all passes */
-void shade_volume_outside(ShadeInput *shi, ShadeResult *shr)
-{
- memset(shr, 0, sizeof(ShadeResult));
- volume_trace(shi, shr, VOL_SHADE_OUTSIDE);
-}
-
-
-void shade_volume_inside(ShadeInput *shi, ShadeResult *shr)
-{
- MatInside *m;
- Material *mat_backup;
- ObjectInstanceRen *obi_backup;
- float prev_alpha = shr->alpha;
-
- //if (BLI_countlist(&R.render_volumes_inside) == 0) return;
-
- /* XXX: extend to multiple volumes perhaps later */
- mat_backup = shi->mat;
- obi_backup = shi->obi;
-
- m = R.render_volumes_inside.first;
- shi->mat = m->ma;
- shi->obi = m->obi;
- shi->obr = m->obi->obr;
-
- volume_trace(shi, shr, VOL_SHADE_INSIDE);
- shr->alpha += prev_alpha;
- CLAMP(shr->alpha, 0.f, 1.f);
-
- shi->mat = mat_backup;
- shi->obi = obi_backup;
- shi->obr = obi_backup->obr;
-} \ No newline at end of file
diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c
deleted file mode 100644
index 17858e55e3d..00000000000
--- a/source/blender/render/intern/source/voxeldata.c
+++ /dev/null
@@ -1,346 +0,0 @@
-/**
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 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): Raul Fernandez Hernandez (Farsthary), Matt Ebb.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#include <math.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_arithb.h"
-#include "BLI_blenlib.h"
-#include "BLI_voxel.h"
-
-#include "IMB_imbuf.h"
-#include "IMB_imbuf_types.h"
-
-#include "BKE_global.h"
-#include "BKE_image.h"
-#include "BKE_main.h"
-#include "BKE_modifier.h"
-
-#include "smoke_API.h"
-
-#include "DNA_texture_types.h"
-#include "DNA_object_types.h"
-#include "DNA_modifier_types.h"
-#include "DNA_smoke_types.h"
-
-
-#include "render_types.h"
-#include "renderdatabase.h"
-#include "texture.h"
-#include "voxeldata.h"
-
-void load_frame_blendervoxel(FILE *fp, float *F, int size, int frame, int offset)
-{
- fseek(fp,frame*size*sizeof(float)+offset,0);
- fread(F,sizeof(float),size,fp);
-}
-
-void load_frame_raw8(FILE *fp, float *F, int size, int frame)
-{
- char *tmp;
- int i;
-
- tmp = (char *)MEM_mallocN(sizeof(char)*size, "temporary voxel file reading storage");
-
- fseek(fp,(frame-1)*size*sizeof(char),0);
- fread(tmp, sizeof(char), size, fp);
-
- for (i=0; i<size; i++) {
- F[i] = (float)tmp[i] / 256.f;
- }
- MEM_freeN(tmp);
-}
-
-void load_frame_image_sequence(Render *re, VoxelData *vd, Tex *tex)
-{
- ImBuf *ibuf;
- Image *ima = tex->ima;
- ImageUser *iuser = &tex->iuser;
- int x=0, y=0, z=0;
- float *rf;
-
- if (!ima || !iuser) return;
-
- ima->source = IMA_SRC_SEQUENCE;
- iuser->framenr = 1 + iuser->offset;
-
- /* find the first valid ibuf and use it to initialise the resolution of the data set */
- /* need to do this in advance so we know how much memory to allocate */
- ibuf= BKE_image_get_ibuf(ima, iuser);
- while (!ibuf && (iuser->framenr < iuser->frames)) {
- iuser->framenr++;
- ibuf= BKE_image_get_ibuf(ima, iuser);
- }
- if (!ibuf) return;
- if (!ibuf->rect_float) IMB_float_from_rect(ibuf);
-
- vd->flag |= TEX_VD_STILL;
- vd->resol[0] = ibuf->x;
- vd->resol[1] = ibuf->y;
- vd->resol[2] = iuser->frames;
- vd->dataset = MEM_mapallocN(sizeof(float)*(vd->resol[0])*(vd->resol[1])*(vd->resol[2]), "voxel dataset");
-
- for (z=0; z < iuser->frames; z++)
- {
- /* get a new ibuf for each frame */
- if (z > 0) {
- iuser->framenr++;
- ibuf= BKE_image_get_ibuf(ima, iuser);
- if (!ibuf) break;
- if (!ibuf->rect_float) IMB_float_from_rect(ibuf);
- }
- rf = ibuf->rect_float;
-
- for (y=0; y < ibuf->y; y++)
- {
- for (x=0; x < ibuf->x; x++)
- {
- /* currently converted to monchrome */
- vd->dataset[ V_I(x, y, z, vd->resol) ] = (rf[0] + rf[1] + rf[2])*0.333f;
- rf +=4;
- }
- }
-
- BKE_image_free_anim_ibufs(ima, iuser->framenr);
- }
-}
-
-void write_voxeldata_header(struct VoxelDataHeader *h, FILE *fp)
-{
- fwrite(h,sizeof(struct VoxelDataHeader),1,fp);
-}
-
-void read_voxeldata_header(FILE *fp, struct VoxelData *vd)
-{
- VoxelDataHeader *h=(VoxelDataHeader *)MEM_mallocN(sizeof(VoxelDataHeader), "voxel data header");
-
- rewind(fp);
- fread(h,sizeof(VoxelDataHeader),1,fp);
-
- vd->resol[0]=h->resolX;
- vd->resol[1]=h->resolY;
- vd->resol[2]=h->resolZ;
-
- MEM_freeN(h);
-}
-
-void init_frame_smoke(Render *re, VoxelData *vd, Tex *tex)
-{
- Object *ob;
- ModifierData *md;
-
- vd->dataset = NULL;
- if (vd->object == NULL) return;
- ob= vd->object;
-
- /* draw code for smoke */
- if( (md = (ModifierData *)modifiers_findByType(ob, eModifierType_Smoke)) )
- {
- SmokeModifierData *smd = (SmokeModifierData *)md;
-
- if(smd->domain && smd->domain->fluid) {
- //int big = (smd->domain->flags & MOD_SMOKE_HIGHRES);
- int big=0;
-
- if (big) {
- //smoke_turbulence_get_res(smd->domain->wt, vd->resol);
- //vd->dataset = smoke_turbulence_get_density(smd->domain->wt);
- } else {
- VECCOPY(vd->resol, smd->domain->res);
- vd->dataset = smoke_get_density(smd->domain->fluid);
- }
- }
- }
-}
-
-void cache_voxeldata(struct Render *re,Tex *tex)
-{
- VoxelData *vd = tex->vd;
- FILE *fp;
- int size;
- int curframe;
-
- if (!vd) return;
-
- /* image sequence gets special treatment */
- if (vd->file_format == TEX_VD_IMAGE_SEQUENCE) {
- load_frame_image_sequence(re, vd, tex);
- return;
- } else if (vd->file_format == TEX_VD_SMOKE) {
- init_frame_smoke(re, vd, tex);
- return;
- }
-
- if (!BLI_exists(vd->source_path)) return;
- fp = fopen(vd->source_path,"rb");
- if (!fp) return;
-
- if (vd->file_format == TEX_VD_BLENDERVOXEL)
- read_voxeldata_header(fp, vd);
-
- size = (vd->resol[0])*(vd->resol[1])*(vd->resol[2]);
- vd->dataset = MEM_mapallocN(sizeof(float)*size, "voxel dataset");
-
- if (vd->flag & TEX_VD_STILL) curframe = vd->still_frame;
- else curframe = re->r.cfra;
-
- switch(vd->file_format) {
- case TEX_VD_BLENDERVOXEL:
- load_frame_blendervoxel(fp, vd->dataset, size, curframe-1, sizeof(VoxelDataHeader));
- break;
- case TEX_VD_RAW_8BIT:
- load_frame_raw8(fp, vd->dataset, size, curframe);
- break;
- }
-
- fclose(fp);
-}
-
-void make_voxeldata(struct Render *re)
-{
- Tex *tex;
-
- if(re->scene->r.scemode & R_PREVIEWBUTS)
- return;
-
- re->i.infostr= "Loading voxel datasets";
- re->stats_draw(re->sdh, &re->i);
-
- /* XXX: should be doing only textures used in this render */
- for (tex= G.main->tex.first; tex; tex= tex->id.next) {
- if(tex->id.us && tex->type==TEX_VOXELDATA) {
- cache_voxeldata(re, tex);
- }
- }
-
- re->i.infostr= NULL;
- re->stats_draw(re->sdh, &re->i);
-
-}
-
-static void free_voxeldata_one(Render *re, Tex *tex)
-{
- VoxelData *vd = tex->vd;
-
- if (vd->dataset) {
- MEM_freeN(vd->dataset);
- vd->dataset = NULL;
- }
-}
-
-
-void free_voxeldata(Render *re)
-{
- Tex *tex;
-
- if(re->scene->r.scemode & R_PREVIEWBUTS)
- return;
-
- for (tex= G.main->tex.first; tex; tex= tex->id.next) {
- if(tex->id.us && tex->type==TEX_VOXELDATA) {
- free_voxeldata_one(re, tex);
- }
- }
-}
-
-int voxeldatatex(struct Tex *tex, float *texvec, struct TexResult *texres)
-{
- int retval = TEX_INT;
- VoxelData *vd = tex->vd;
- float co[3], offset[3] = {0.5, 0.5, 0.5};
-
- if ((!vd) || (vd->dataset==NULL)) {
- texres->tin = 0.0f;
- return 0;
- }
-
- /* scale lookup from 0.0-1.0 (original location) to -1.0, 1.0, consistent with image texture tex coords */
- /* in implementation this works backwards, bringing sample locations from -1.0, 1.0
- * to the range 0.0, 1.0, before looking up in the voxel structure. */
- VecCopyf(co, texvec);
- VecMulf(co, 0.5f);
- VecAddf(co, co, offset);
-
- /* co is now in the range 0.0, 1.0 */
- switch (tex->extend) {
- case TEX_CLIP:
- {
- if ((co[0] < 0.f || co[0] > 1.f) || (co[1] < 0.f || co[1] > 1.f) || (co[2] < 0.f || co[2] > 1.f)) {
- texres->tin = 0.f;
- return retval;
- }
- break;
- }
- case TEX_REPEAT:
- {
- co[0] = co[0] - floor(co[0]);
- co[1] = co[1] - floor(co[1]);
- co[2] = co[2] - floor(co[2]);
- break;
- }
- case TEX_EXTEND:
- {
- CLAMP(co[0], 0.f, 1.f);
- CLAMP(co[1], 0.f, 1.f);
- CLAMP(co[2], 0.f, 1.f);
- break;
- }
- }
-
- switch (vd->interp_type) {
- case TEX_VD_NEARESTNEIGHBOR:
- texres->tin = voxel_sample_nearest(vd->dataset, vd->resol, co);
- break;
- case TEX_VD_LINEAR:
- texres->tin = voxel_sample_trilinear(vd->dataset, vd->resol, co);
- break;
- case TEX_VD_QUADRATIC:
- texres->tin = voxel_sample_triquadratic(vd->dataset, vd->resol, co);
- break;
- case TEX_VD_TRICUBIC_CATROM:
- case TEX_VD_TRICUBIC_BSPLINE:
- texres->tin = voxel_sample_tricubic(vd->dataset, vd->resol, co, (vd->interp_type == TEX_VD_TRICUBIC_BSPLINE));
- break;
- }
-
- texres->tin *= vd->int_multiplier;
- BRICONT;
-
- texres->tr = texres->tin;
- texres->tg = texres->tin;
- texres->tb = texres->tin;
- texres->ta = texres->tin;
- BRICONTRGB;
-
- return retval;
-}
-
-
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index 3b3a8568933..53a05dd0d67 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -42,7 +42,7 @@
#include "BLI_jitter.h"
#include "BLI_threads.h"
-
+#include "MTC_matrixops.h"
#include "MEM_guardedalloc.h"
#include "DNA_lamp_types.h"
diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt
index cb2fc92a1b6..a268ffebffb 100644
--- a/source/blender/windowmanager/CMakeLists.txt
+++ b/source/blender/windowmanager/CMakeLists.txt
@@ -27,52 +27,52 @@
FILE(GLOB SRC intern/*.c)
SET(INC .
- ../editors/include
- ../../../intern/guardedalloc ../../../intern/memutil
- ../blenlib ../makesdna ../makesrna ../blenkernel
- ../include ../imbuf ../render/extern/include
- ../../../intern/bsp/extern
- ../../../intern/decimation/extern ../blenloader
- ../../kernel/gen_system ../readstreamglue
- ../../../intern/elbeem/extern
- ../../../intern/ghost ../../../intern/opennl/extern ../../../extern/glew/include
- ../nodes
- ../gpu
- ../blenfont
- ${OPENGL_INCLUDE_DIR}
+ ../editors/include
+ ../../../intern/guardedalloc ../../../intern/memutil
+ ../blenlib ../makesdna ../makesrna ../blenkernel
+ ../include ../imbuf ../render/extern/include
+ ../../../intern/bsp/extern ../radiosity/extern/include
+ ../../../intern/decimation/extern ../blenloader
+ ../../kernel/gen_system ../readstreamglue
+ ../quicktime ../../../intern/elbeem/extern
+ ../../../intern/ghost ../../../intern/opennl/extern ../../../extern/glew/include
+ ../nodes
+ ../gpu
+ ../blenfont
+ ${OPENGL_INCLUDE_DIR}
)
IF(WITH_INTERNATIONAL)
- ADD_DEFINITIONS(-DINTERNATIONAL)
+ ADD_DEFINITIONS(-DINTERNATIONAL)
ENDIF(WITH_INTERNATIONAL)
IF(WITH_OPENEXR)
- ADD_DEFINITIONS(-DWITH_OPENEXR)
+ ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
IF(WITH_QUICKTIME)
- SET(INC ${INC} ../quicktime ${QUICKTIME_INC})
- ADD_DEFINITIONS(-DWITH_QUICKTIME)
+ SET(INC ${INC} ${QUICKTIME_INC})
+ ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
IF(WITH_FFMPEG)
- SET(INC ${INC} ${FFMPEG_INC})
- ADD_DEFINITIONS(-DWITH_FFMPEG)
+ SET(INC ${INC} ${FFMPEG_INC})
+ ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
IF(WITH_PYTHON)
- SET(INC ${INC} ../python ${PYTHON_INC})
+ SET(INC ${INC} ../python ${PYTHON_INC})
ELSE(WITH_PYTHON)
- ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ ADD_DEFINITIONS(-DDISABLE_PYTHON)
ENDIF(WITH_PYTHON)
IF(WIN32)
- SET(INC ${INC} ${PTHREADS_INC})
+ SET(INC ${INC} ${PTHREADS_INC})
ENDIF(WIN32)
# TODO buildinfo
IF(BF_BUILDINFO)
- ADD_DEFINITIONS(-DNAN_BUILDINFO)
+ ADD_DEFINITIONS(-DNAN_BUILDINFO)
ENDIF(BF_BUILDINFO)
BLENDERLIB_NOLIST(bf_windowmanager "${SRC}" "${INC}")
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 544804b26d6..0f5558382c4 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -165,7 +165,7 @@ wmOperatorTypeMacro *WM_operatortype_macro_define(wmOperatorType *ot, const char
int WM_operator_call (struct bContext *C, struct wmOperator *op);
int WM_operator_repeat (struct bContext *C, struct wmOperator *op);
int WM_operator_name_call (struct bContext *C, const char *opstring, int context, struct PointerRNA *properties);
-int WM_operator_call_py(struct bContext *C, struct wmOperatorType *ot, int context, struct PointerRNA *properties, struct ReportList *reports);
+int WM_operator_call_py(struct bContext *C, struct wmOperatorType *ot, struct PointerRNA *properties, struct ReportList *reports);
void WM_operator_properties_create(struct PointerRNA *ptr, const char *opstring);
void WM_operator_properties_free(struct PointerRNA *ptr);
@@ -245,5 +245,6 @@ void WM_jobs_stop_all(struct wmWindowManager *wm);
char *WM_clipboard_text_get(int selection);
void WM_clipboard_text_set(char *buf, int selection);
+
#endif /* WM_API_H */
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 806f5409b0a..00e9f6a2fa2 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -130,10 +130,10 @@ typedef struct wmNotifier {
#define NC_BRUSH (11<<24)
#define NC_TEXT (12<<24)
#define NC_WORLD (13<<24)
-#define NC_ANIMATION (14<<24)
-#define NC_SPACE (15<<24)
-#define NC_NODE (15<<24)
-#define NC_GEOM (16<<24)
+#define NC_FILE (14<<24)
+#define NC_ANIMATION (15<<24)
+#define NC_CONSOLE (16<<24)
+#define NC_NODE (17<<24)
/* data type, 256 entries is enough, it can overlap */
#define NOTE_DATA 0x00FF0000
@@ -148,7 +148,6 @@ typedef struct wmNotifier {
#define ND_SCREENDELETE (2<<16)
#define ND_SCREENCAST (3<<16)
#define ND_ANIMPLAY (4<<16)
-#define ND_GPENCIL (5<<16)
/* NC_SCENE Scene */
#define ND_SCENEBROWSE (1<<16)
@@ -171,12 +170,13 @@ typedef struct wmNotifier {
#define ND_POSE (18<<16)
#define ND_BONE_ACTIVE (19<<16)
#define ND_BONE_SELECT (20<<16)
-#define ND_DRAW (21<<16)
-#define ND_MODIFIER (22<<16) /* modifiers edited */
-#define ND_KEYS (23<<16)
-#define ND_CONSTRAINT (24<<16) /* constraints edited */
-#define ND_PARTICLE_DATA (25<<16) /* particles edited */
-#define ND_PARTICLE_SELECT (26<<16) /* particles selecting change */
+#define ND_GEOM_SELECT (21<<16)
+#define ND_DRAW (22<<16)
+#define ND_MODIFIER (23<<16)
+#define ND_KEYS (24<<16)
+#define ND_GEOM_DATA (25<<16)
+#define ND_CONSTRAINT (26<<16)
+#define ND_PARTICLE (27<<16)
/* NC_MATERIAL Material */
#define ND_SHADING (30<<16)
@@ -191,6 +191,10 @@ typedef struct wmNotifier {
#define ND_CURSOR (50<<16)
#define ND_DISPLAY (51<<16)
+ /* NC_FILE Filebrowser */
+#define ND_PARAMS (60<<16)
+#define ND_FILELIST (61<<16)
+
/* NC_ANIMATION Animato */
#define ND_KEYFRAME_SELECT (70<<16)
#define ND_KEYFRAME_EDIT (71<<16)
@@ -201,28 +205,9 @@ typedef struct wmNotifier {
#define ND_NLA_EDIT (76<<16)
#define ND_NLA_ACTCHANGE (77<<16)
- /* NC_GEOM Geometry */
- /* Mesh, Curve, MetaBall, Armature, .. */
-#define ND_SELECT (80<<16)
-#define ND_DATA (81<<16)
-
- /* NC_SPACE */
-#define ND_SPACE_CONSOLE (1<<16) /* general redraw */
-#define ND_SPACE_CONSOLE_REPORT (2<<16) /* update for reports, could specify type */
-#define ND_SPACE_INFO (2<<16)
-#define ND_SPACE_IMAGE (3<<16)
-#define ND_SPACE_FILE_PARAMS (4<<16)
-#define ND_SPACE_FILE_LIST (5<<16)
-#define ND_SPACE_NODE (6<<16)
-#define ND_SPACE_OUTLINER (7<<16)
-#define ND_SPACE_VIEW3D (8<<16)
-#define ND_SPACE_PROPERTIES (9<<16)
-#define ND_SPACE_TEXT (10<<16)
-#define ND_SPACE_TIME (11<<16)
-#define ND_SPACE_GRAPH (12<<16)
-#define ND_SPACE_DOPESHEET (13<<16)
-#define ND_SPACE_NLA (14<<16)
-#define ND_SPACE_SEQUENCER (15<<16)
+ /* console */
+#define ND_CONSOLE (78<<16) /* general redraw */
+#define ND_CONSOLE_REPORT (79<<16) /* update for reports, could spesify type */
/* subtype, 256 entries too */
#define NOTE_SUBTYPE 0x0000FF00
@@ -297,17 +282,10 @@ typedef struct wmTimer {
double delta; /* time since previous step in seconds */
double ltime; /* internal, last time timer was activated */
- double ntime; /* internal, next time we want to activate the timer */
- double stime; /* internal, when the timer started */
int sleep; /* internal, put timers to sleep when needed */
} wmTimer;
-/* **************** Paint Cursor ******************* */
-
-typedef void (*wmPaintCursorDraw)(struct bContext *C, int, int, void *customdata);
-
-
/* ****************** Messages ********************* */
enum {
diff --git a/source/blender/windowmanager/intern/Makefile b/source/blender/windowmanager/intern/Makefile
index f4d65975d43..823423cc28b 100644
--- a/source/blender/windowmanager/intern/Makefile
+++ b/source/blender/windowmanager/intern/Makefile
@@ -58,6 +58,7 @@ CPPFLAGS += -I../../imbuf
CPPFLAGS += -I../../blenloader
CPPFLAGS += -I../../gpu
CPPFLAGS += -I../../render/extern/include
+CPPFLAGS += -I../../radiosity/extern/include
CPPFLAGS += -I../../../kernel/gen_system
CPPFLAGS += -I../../blenfont
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index 38cf39c2081..85f8a647826 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -69,7 +69,7 @@ void WM_operator_free(wmOperator *op)
MEM_freeN(op->properties);
}
- if(op->reports && (op->flag & OPERATOR_REPORT_FREE)) {
+ if(op->reports) {
BKE_reports_clear(op->reports);
MEM_freeN(op->reports);
}
@@ -108,7 +108,7 @@ void wm_operator_register(bContext *C, wmOperator *op)
MEM_freeN(buf);
/* so the console is redrawn */
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+ WM_event_add_notifier(C, NC_CONSOLE|ND_CONSOLE_REPORT, NULL);
}
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 3c03d24ca93..f0d9f8c0989 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -52,7 +52,6 @@
#include "BKE_pointcache.h"
#include "ED_fileselect.h"
-#include "ED_info.h"
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_util.h"
@@ -130,7 +129,7 @@ static wmNotifier *wm_notifier_next(wmWindowManager *wm)
void wm_event_do_notifiers(bContext *C)
{
wmWindowManager *wm= CTX_wm_manager(C);
- wmNotifier *note, *next;
+ wmNotifier *note;
wmWindow *win;
if(wm==NULL)
@@ -142,9 +141,7 @@ void wm_event_do_notifiers(bContext *C)
CTX_wm_window_set(C, win);
- for(note= wm->queue.first; note; note= next) {
- next= note->next;
-
+ for(note= wm->queue.first; note; note= note->next) {
if(note->category==NC_WM) {
if( ELEM(note->data, ND_FILEREAD, ND_FILESAVE)) {
wm->file_saved= 1;
@@ -177,10 +174,6 @@ void wm_event_do_notifiers(bContext *C)
do_anim= 1;
}
}
- if(ELEM4(note->category, NC_SCENE, NC_OBJECT, NC_GEOM, NC_SCENE)) {
- ED_info_stats_clear(CTX_data_scene(C));
- WM_event_add_notifier(C, NC_SPACE|ND_SPACE_INFO, NULL);
- }
}
if(do_anim) {
/* depsgraph gets called, might send more notifiers */
@@ -345,12 +338,11 @@ static wmOperator *wm_operator_create(wmWindowManager *wm, wmOperatorType *ot, P
/* initialize error reports */
if (reports) {
- op->reports= reports; /* must be initialized already */
+ op->reports= reports; /* must be initialized alredy */
}
else {
op->reports= MEM_mallocN(sizeof(ReportList), "wmOperatorReportList");
BKE_reports_init(op->reports, RPT_STORE);
- op->flag |= OPERATOR_REPORT_FREE;
}
/* recursive filling of operator macro list */
@@ -393,13 +385,13 @@ static void wm_region_mouse_co(bContext *C, wmEvent *event)
}
}
-static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, PointerRNA *properties, ReportList *reports)
+static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, PointerRNA *properties)
{
wmWindowManager *wm= CTX_wm_manager(C);
int retval= OPERATOR_PASS_THROUGH;
if(wm_operator_poll(C, ot)) {
- wmOperator *op= wm_operator_create(wm, ot, properties, reports); /* if reports==NULL, theyll be initialized */
+ wmOperator *op= wm_operator_create(wm, ot, properties, NULL);
if((G.f & G_DEBUG) && event && event->type!=MOUSEMOVE)
printf("handle evt %d win %d op %s\n", event?event->type:0, CTX_wm_screen(C)->subwinactive, ot->idname);
@@ -443,12 +435,10 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
return retval;
}
-/* WM_operator_name_call is the main accessor function
- * this is for python to access since its done the operator lookup
- *
- * invokes operator in context */
-static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, int context, PointerRNA *properties, ReportList *reports)
+/* invokes operator in context */
+int WM_operator_name_call(bContext *C, const char *opstring, int context, PointerRNA *properties)
{
+ wmOperatorType *ot= WM_operatortype_find(opstring, 0);
wmWindow *window= CTX_wm_window(C);
wmEvent *event;
@@ -476,7 +466,7 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, int contex
CTX_wm_region_set(C, ar1);
}
- retval= wm_operator_invoke(C, ot, event, properties, reports);
+ retval= wm_operator_invoke(C, ot, event, properties);
/* set region back */
CTX_wm_region_set(C, ar);
@@ -491,7 +481,7 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, int contex
ARegion *ar= CTX_wm_region(C);
CTX_wm_region_set(C, NULL);
- retval= wm_operator_invoke(C, ot, event, properties, reports);
+ retval= wm_operator_invoke(C, ot, event, properties);
CTX_wm_region_set(C, ar);
return retval;
@@ -506,7 +496,7 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, int contex
CTX_wm_region_set(C, NULL);
CTX_wm_area_set(C, NULL);
- retval= wm_operator_invoke(C, ot, event, properties, reports);
+ retval= wm_operator_invoke(C, ot, event, properties);
CTX_wm_region_set(C, ar);
CTX_wm_area_set(C, area);
@@ -515,45 +505,32 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, int contex
case WM_OP_EXEC_DEFAULT:
event= NULL; /* pass on without break */
case WM_OP_INVOKE_DEFAULT:
- return wm_operator_invoke(C, ot, event, properties, reports);
+ return wm_operator_invoke(C, ot, event, properties);
}
}
return 0;
}
-
-/* invokes operator in context */
-int WM_operator_name_call(bContext *C, const char *opstring, int context, PointerRNA *properties)
-{
- wmOperatorType *ot= WM_operatortype_find(opstring, 0);
- if(ot)
- return wm_operator_call_internal(C, ot, context, properties, NULL);
-
- return 0;
-}
-
/* Similar to WM_operator_name_call called with WM_OP_EXEC_DEFAULT context.
- wmOperatorType is used instead of operator name since python alredy has the operator type
- poll() must be called by python before this runs.
- reports can be passed to this function (so python can report them as exceptions)
*/
-int WM_operator_call_py(bContext *C, wmOperatorType *ot, int context, PointerRNA *properties, ReportList *reports)
+int WM_operator_call_py(bContext *C, wmOperatorType *ot, PointerRNA *properties, ReportList *reports)
{
- int retval= OPERATOR_CANCELLED;
-
-#if 0
- wmOperator *op;
wmWindowManager *wm= CTX_wm_manager(C);
- op= wm_operator_create(wm, ot, properties, reports);
-
+ wmOperator *op= wm_operator_create(wm, ot, properties, reports);
+ int retval= OPERATOR_CANCELLED;
+
if (op->type->exec)
retval= op->type->exec(C, op);
else
printf("error \"%s\" operator has no exec function, python cannot call it\n", op->type->name);
-#endif
-
- retval= wm_operator_call_internal(C, ot, context, properties, reports);
+
+ if (reports)
+ op->reports= NULL; /* dont let the operator free reports passed to this function */
+ WM_operator_free(op);
return retval;
}
@@ -836,7 +813,7 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand
wmOperatorType *ot= WM_operatortype_find(event->keymap_idname, 0);
if(ot)
- retval= wm_operator_invoke(C, ot, event, properties, NULL);
+ retval= wm_operator_invoke(C, ot, event, properties);
}
if(retval & OPERATOR_PASS_THROUGH)
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index a6e38a61e0f..9c30c99bbdd 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -37,8 +37,8 @@
#define _WIN32_IE 0x0400 /* minimal requirements for SHGetSpecialFolderPath on MINGW MSVC has this defined already */
#endif
#include <shlobj.h> /* for SHGetSpecialFolderPath, has to be done before BLI_winstuff because 'near' is disabled through BLI_windstuff */
-#include <process.h> /* getpid */
#include "BLI_winstuff.h"
+#include <process.h> /* getpid */
#else
#include <unistd.h> /* getpid */
#endif
@@ -96,7 +96,6 @@
#include "wm.h"
#include "wm_window.h"
-static void writeBlog(void);
/* To be able to read files without windows closing, opening, moving
we try to prepare for worst case:
@@ -257,10 +256,7 @@ void WM_read_file(bContext *C, char *name, ReportList *reports)
if(retval==2) wm_init_userdef(); // in case a userdef is read from regular .blend
- if (retval!=0) {
- G.relbase_valid = 1;
- writeBlog();
- }
+ if (retval!=0) G.relbase_valid = 1;
// XXX undo_editmode_clear();
BKE_reset_undo();
@@ -388,7 +384,7 @@ void WM_read_autosavefile(bContext *C)
void read_Blog(void)
{
- char name[FILE_MAX];
+ char name[FILE_MAX], filename[FILE_MAX];
LinkNode *l, *lines;
struct RecentFile *recent;
char *line;
@@ -420,6 +416,58 @@ void read_Blog(void)
BLI_free_file_lines(lines);
+#ifdef WIN32
+ /* Add the drive names to the listing */
+ {
+ __int64 tmp;
+ char folder[MAX_PATH];
+ char tmps[4];
+ int i;
+
+ tmp= GetLogicalDrives();
+
+ for (i=2; i < 26; i++) {
+ if ((tmp>>i) & 1) {
+ tmps[0]='a'+i;
+ tmps[1]=':';
+ tmps[2]='\\';
+ tmps[3]=0;
+
+// XX fsmenu_insert_entry(tmps, 0, 0);
+ }
+ }
+
+ /* Adding Desktop and My Documents */
+// XXX fsmenu_append_separator();
+
+ SHGetSpecialFolderPath(0, folder, CSIDL_PERSONAL, 0);
+// XXX fsmenu_insert_entry(folder, 0, 0);
+ SHGetSpecialFolderPath(0, folder, CSIDL_DESKTOPDIRECTORY, 0);
+// XXX fsmenu_insert_entry(folder, 0, 0);
+
+// XXX fsmenu_append_separator();
+ }
+#endif
+
+ BLI_make_file_string(G.sce, name, BLI_gethome(), ".Bfs");
+ lines= BLI_read_file_as_lines(name);
+
+ for (l= lines; l; l= l->next) {
+ char *line= l->link;
+
+ if (!BLI_streq(line, "")) {
+// XXX fsmenu_insert_entry(line, 0, 1);
+ }
+ }
+
+// XXX fsmenu_append_separator();
+
+ /* add last saved file */
+ BLI_split_dirfile(G.sce, name, filename); /* G.sce shouldn't be relative */
+
+// XXX fsmenu_insert_entry(name, 0, 0);
+
+ BLI_free_file_lines(lines);
}
static void writeBlog(void)
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 9a268f8be17..ee826d5f57e 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -266,8 +266,6 @@ void WM_exit(bContext *C)
CTX_free(C);
- SYS_DeleteSystem(SYS_GetSystem());
-
if(MEM_get_memory_blocks_in_use()!=0) {
printf("Error Totblock: %d\n", MEM_get_memory_blocks_in_use());
MEM_printmemlist();
@@ -284,6 +282,9 @@ void WM_exit(bContext *C)
}
#endif
+
+ SYS_DeleteSystem(SYS_GetSystem());
+
exit(G.afbreek==1);
}
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 0913d58258f..2e813bac37d 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -91,12 +91,10 @@ wmOperatorType *WM_operatortype_find(const char *idname, int quiet)
char idname_bl[OP_MAX_TYPENAME]; // XXX, needed to support python style names without the _OT_ syntax
WM_operator_bl_idname(idname_bl, idname);
-
- if (idname_bl[0]) {
- for(ot= global_ops.first; ot; ot= ot->next) {
- if(strncmp(ot->idname, idname_bl, OP_MAX_TYPENAME)==0)
- return ot;
- }
+
+ for(ot= global_ops.first; ot; ot= ot->next) {
+ if(strncmp(ot->idname, idname_bl, OP_MAX_TYPENAME)==0)
+ return ot;
}
if(!quiet)
@@ -111,12 +109,10 @@ wmOperatorType *WM_operatortype_exists(const char *idname)
char idname_bl[OP_MAX_TYPENAME]; // XXX, needed to support python style names without the _OT_ syntax
WM_operator_bl_idname(idname_bl, idname);
-
- if(idname_bl[0]) {
- for(ot= global_ops.first; ot; ot= ot->next) {
- if(strncmp(ot->idname, idname_bl, OP_MAX_TYPENAME)==0)
- return ot;
- }
+
+ for(ot= global_ops.first; ot; ot= ot->next) {
+ if(strncmp(ot->idname, idname_bl, OP_MAX_TYPENAME)==0)
+ return ot;
}
return NULL;
}
@@ -326,25 +322,21 @@ void WM_operator_py_idname(char *to, const char *from)
/* some.op -> SOME_OT_op */
void WM_operator_bl_idname(char *to, const char *from)
{
- if (from) {
- char *sep= strchr(from, '.');
+ char *sep= strchr(from, '.');
- if(sep) {
- int i, ofs= (sep-from);
+ if(sep) {
+ int i, ofs= (sep-from);
- for(i=0; i<ofs; i++)
- to[i]= toupper(from[i]);
+ for(i=0; i<ofs; i++)
+ to[i]= toupper(from[i]);
- BLI_strncpy(to+ofs, "_OT_", OP_MAX_TYPENAME);
- BLI_strncpy(to+(ofs+4), sep+1, OP_MAX_TYPENAME);
- }
- else {
- /* should not happen but support just incase */
- BLI_strncpy(to, from, OP_MAX_TYPENAME);
- }
+ BLI_strncpy(to+ofs, "_OT_", OP_MAX_TYPENAME);
+ BLI_strncpy(to+(ofs+4), sep+1, OP_MAX_TYPENAME);
+ }
+ else {
+ /* should not happen but support just incase */
+ BLI_strncpy(to, from, OP_MAX_TYPENAME);
}
- else
- to[0]= 0;
}
/* print a string representation of the operator, with the args that it runs
@@ -448,24 +440,13 @@ void WM_operator_properties_free(PointerRNA *ptr)
/* ************ default op callbacks, exported *********** */
/* invoke callback, uses enum property named "type" */
+/* only weak thing is the fixed property name... */
int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- PropertyRNA *prop;
+ PropertyRNA *prop= RNA_struct_find_property(op->ptr, "type");
uiPopupMenu *pup;
uiLayout *layout;
- prop= RNA_struct_find_property(op->ptr, "type");
-
- if(!prop) {
- RNA_STRUCT_BEGIN(op->ptr, findprop) {
- if(RNA_property_type(findprop) == PROP_ENUM) {
- prop= findprop;
- break;
- }
- }
- RNA_STRUCT_END;
- }
-
if(prop==NULL) {
printf("WM_menu_invoke: %s has no \"type\" enum property\n", op->type->idname);
}
@@ -475,7 +456,7 @@ int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
else {
pup= uiPupMenuBegin(C, op->type->name, 0);
layout= uiPupMenuLayout(pup);
- uiItemsEnumO(layout, op->type->idname, (char*)RNA_property_identifier(prop));
+ uiItemsEnumO(layout, op->type->idname, "type");
uiPupMenuEnd(C, pup);
}
@@ -739,7 +720,6 @@ int wm_search_menu_poll(bContext *C)
{
if(CTX_wm_window(C)==NULL) return 0;
if(CTX_wm_area(C) && CTX_wm_area(C)->spacetype==SPACE_CONSOLE) return 0; // XXX - so we can use the shortcut in the console
- if(CTX_wm_area(C) && CTX_wm_area(C)->spacetype==SPACE_TEXT) return 0; // XXX - so we can use the spacebar in the text editor
return 1;
}
@@ -761,6 +741,7 @@ static void WM_OT_window_duplicate(wmOperatorType *ot)
ot->name= "Duplicate Window";
ot->idname= "WM_OT_window_duplicate";
+ ot->invoke= WM_operator_confirm;
ot->exec= wm_window_duplicate_op;
ot->poll= WM_operator_winactive;
}
@@ -833,12 +814,22 @@ static EnumPropertyItem *open_recentfile_itemf(bContext *C, PointerRNA *ptr, int
struct RecentFile *recent;
int totitem= 0, i, ofs= 0;
+ if(G.sce[0]) {
+ tmp.value= 1;
+ tmp.identifier= G.sce;
+ tmp.name= G.sce;
+ RNA_enum_item_add(&item, &totitem, &tmp);
+ ofs = 1;
+ }
+
/* dynamically construct enum */
for(recent = G.recent_files.first, i=0; (i<U.recent_files) && (recent); recent = recent->next, i++) {
- tmp.value= i+ofs+1;
- tmp.identifier= recent->filename;
- tmp.name= recent->filename;
- RNA_enum_item_add(&item, &totitem, &tmp);
+ if(strcmp(recent->filename, G.sce)) {
+ tmp.value= i+ofs+1;
+ tmp.identifier= recent->filename;
+ tmp.name= recent->filename;
+ RNA_enum_item_add(&item, &totitem, &tmp);
+ }
}
RNA_enum_item_end(&item, &totitem);
@@ -878,17 +869,10 @@ static void untitled(char *name)
}
}
-static void load_set_load_ui(wmOperator *op)
-{
- if(!RNA_property_is_set(op->ptr, "load_ui"))
- RNA_boolean_set(op->ptr, "load_ui", !(U.flag & USER_FILENOUI));
-}
static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
RNA_string_set(op->ptr, "filename", G.sce);
- load_set_load_ui(op);
-
WM_event_add_fileselect(C, op);
return OPERATOR_RUNNING_MODAL;
@@ -897,14 +881,7 @@ static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *event)
static int wm_open_mainfile_exec(bContext *C, wmOperator *op)
{
char filename[FILE_MAX];
-
RNA_string_get(op->ptr, "filename", filename);
- load_set_load_ui(op);
-
- if(RNA_boolean_get(op->ptr, "load_ui"))
- G.fileflags &= ~G_FILE_NO_UI;
- else
- G.fileflags |= G_FILE_NO_UI;
// XXX wm in context is not set correctly after WM_read_file -> crash
// do it before for now, but is this correct with multiple windows?
@@ -925,8 +902,6 @@ static void WM_OT_open_mainfile(wmOperatorType *ot)
ot->poll= WM_operator_winactive;
WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE);
-
- RNA_def_boolean(ot->srna, "load_ui", 1, "Load UI", "Load user interface setup in the .blend file.");
}
static int wm_recover_last_session_exec(bContext *C, wmOperator *op)
@@ -1060,6 +1035,7 @@ static void WM_OT_window_fullscreen_toggle(wmOperatorType *ot)
ot->name= "Toggle Fullscreen";
ot->idname= "WM_OT_window_fullscreen_toggle";
+ ot->invoke= WM_operator_confirm;
ot->exec= wm_window_fullscreen_toggle_op;
ot->poll= WM_operator_winactive;
}
@@ -1091,7 +1067,7 @@ static void WM_OT_exit_blender(wmOperatorType *ot)
*/
void *WM_paint_cursor_activate(wmWindowManager *wm, int (*poll)(bContext *C),
- wmPaintCursorDraw draw, void *customdata)
+ void (*draw)(bContext *C, int, int, void *customdata), void *customdata)
{
wmPaintCursor *pc= MEM_callocN(sizeof(wmPaintCursor), "paint cursor");
@@ -1918,28 +1894,19 @@ void wm_window_keymap(wmWindowManager *wm)
/* note, this doesn't replace existing keymap items */
WM_keymap_verify_item(keymap, "WM_OT_window_duplicate", WKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
- #ifdef __APPLE__
- WM_keymap_add_item(keymap, "WM_OT_read_homefile", NKEY, KM_PRESS, KM_OSKEY, 0);
- WM_keymap_add_item(keymap, "WM_OT_open_recentfile", OKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0);
- WM_keymap_add_item(keymap, "WM_OT_open_mainfile", OKEY, KM_PRESS, KM_OSKEY, 0);
- WM_keymap_add_item(keymap, "WM_OT_save_mainfile", SKEY, KM_PRESS, KM_OSKEY, 0);
- WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", SKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0);
- WM_keymap_add_item(keymap, "WM_OT_exit_blender", QKEY, KM_PRESS, KM_OSKEY, 0);
- #endif
- WM_keymap_add_item(keymap, "WM_OT_read_homefile", NKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "WM_OT_save_homefile", UKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "WM_OT_open_recentfile", OKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
- WM_keymap_add_item(keymap, "WM_OT_open_mainfile", OKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "WM_OT_save_mainfile", SKEY, KM_PRESS, KM_CTRL, 0);
- WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", SKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
-
+ WM_keymap_verify_item(keymap, "WM_OT_read_homefile", XKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_verify_item(keymap, "WM_OT_save_homefile", UKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_verify_item(keymap, "WM_OT_open_recentfile", OKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_verify_item(keymap, "WM_OT_open_mainfile", F1KEY, KM_PRESS, 0, 0);
+ WM_keymap_verify_item(keymap, "WM_OT_save_mainfile", WKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_verify_item(keymap, "WM_OT_save_as_mainfile", F2KEY, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "WM_OT_window_fullscreen_toggle", F11KEY, KM_PRESS, KM_SHIFT, 0);
- WM_keymap_add_item(keymap, "WM_OT_exit_blender", QKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_verify_item(keymap, "WM_OT_exit_blender", QKEY, KM_PRESS, KM_CTRL, 0);
/* debug/testing */
WM_keymap_verify_item(keymap, "WM_OT_ten_timer", TKEY, KM_PRESS, KM_ALT|KM_CTRL, 0);
WM_keymap_verify_item(keymap, "WM_OT_debug_menu", DKEY, KM_PRESS, KM_ALT|KM_CTRL, 0);
- WM_keymap_verify_item(keymap, "WM_OT_search_menu", SPACEKEY, KM_PRESS, 0, 0);
+ WM_keymap_verify_item(keymap, "WM_OT_search_menu", SPACEKEY, KM_PRESS, KM_CTRL, 0);
}
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index d70516ef02e..d6bde9a468c 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -26,7 +26,6 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -91,7 +90,7 @@ static void wm_window_check_position(rcti *rect)
wm_get_screensize(&width, &height);
#ifdef __APPLE__
- height -= 70;
+ height -= 42;
#endif
if(rect->xmin < 0) {
@@ -691,13 +690,12 @@ static int wm_window_timer(const bContext *C)
wmTimer *wt;
for(wt= win->timers.first; wt; wt= wt->next) {
if(wt->sleep==0) {
- if(time > wt->ntime) {
+ if(wt->timestep < time - wt->ltime) {
wmEvent event= *(win->eventstate);
wt->delta= time - wt->ltime;
wt->duration += wt->delta;
wt->ltime= time;
- wt->ntime= wt->stime + wt->timestep*ceil(wt->duration/wt->timestep);
event.type= wt->event_type;
event.custom= EVT_DATA_TIMER;
@@ -792,8 +790,6 @@ wmTimer *WM_event_add_window_timer(wmWindow *win, int event_type, double timeste
wt->event_type= event_type;
wt->ltime= PIL_check_seconds_timer();
- wt->ntime= wt->ltime + timestep;
- wt->stime= wt->ltime;
wt->timestep= timestep;
BLI_addtail(&win->timers, wt);
diff --git a/source/blenderplayer/CMakeLists.txt b/source/blenderplayer/CMakeLists.txt
deleted file mode 100644
index 62064e31d59..00000000000
--- a/source/blenderplayer/CMakeLists.txt
+++ /dev/null
@@ -1,144 +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., 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): Jacques Beaurain.
-#
-# ***** END GPL LICENSE BLOCK *****
-
-MESSAGE(STATUS "Configuring blenderplayer")
-
-SETUP_LIBDIRS()
-
-IF(WITH_QUICKTIME)
- ADD_DEFINITIONS(-DWITH_QUICKTIME)
-ENDIF(WITH_QUICKTIME)
-
-IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
- ADD_DEFINITIONS(-DWITH_BINRELOC)
- INCLUDE_DIRECTORIES(${BINRELOC_INC})
-ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-
-ADD_CUSTOM_COMMAND(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
- COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/
- DEPENDS ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna
-)
-
-IF(WIN32)
- ADD_EXECUTABLE(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../icons/winblender.rc)
-ELSE(WIN32)
- ADD_EXECUTABLE(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)
-ENDIF(WIN32)
-
-ADD_DEPENDENCIES(blenderplayer makesdna)
-
-FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
-
-SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} gp_common gp_ghost blenkernel_blc)
-
-IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
- SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc)
-ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-
-IF(UNIX)
- # Sort libraries
- SET(BLENDER_SORTED_LIBS
- gp_ghost
- gp_common
- bf_string
- bf_ghost
- bf_rna
- bf_blenkernel
- bf_blenloader
- bf_blenpluginapi
- bf_blroutines
- bf_converter
- bf_ketsji
- bf_bullet
- bf_common
- bf_dummy
- bf_logic
- bf_rasterizer
- bf_oglrasterizer
- bf_expressions
- bf_scenegraph
- bf_IK
- bf_moto
- bf_kernel
- bf_nodes
- bf_gpu
- bf_imbuf
- bf_avi
- kx_network
- bf_ngnetwork
- bf_loopbacknetwork
- extern_bullet
- bf_guardedalloc
- bf_memutil
- bf_python
- bf_gen_python
- bf_blenlib
- bf_cineon
- bf_openexr
- extern_libopenjpeg
- bf_dds
- bf_readblenfile
- bf_dna
- bf_videotex
- bf_blenfont
- bf_audaspace
- blenkernel_blc
- extern_binreloc
- extern_glew
- )
-
- IF(WITH_QUICKTIME)
- SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} quicktime)
- ENDIF(WITH_QUICKTIME)
-
- IF(WITH_CXX_GUARDEDALLOC)
- SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_guardedalloc_cpp)
- ENDIF(WITH_CXX_GUARDEDALLOC)
-
- FOREACH(SORTLIB ${BLENDER_SORTED_LIBS})
- SET(REMLIB ${SORTLIB})
- FOREACH(SEARCHLIB ${BLENDER_LINK_LIBS})
- IF(${SEARCHLIB} STREQUAL ${SORTLIB})
- SET(REMLIB "")
- ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB})
- ENDFOREACH(SEARCHLIB)
- IF(REMLIB)
- MESSAGE(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured")
- LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
- ENDIF(REMLIB)
- ENDFOREACH(SORTLIB)
-
- TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_SORTED_LIBS})
-ELSE(UNIX)
- TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_LINK_LIBS})
-ENDIF(UNIX)
-
-IF(WITH_PLAYER)
- ADD_SUBDIRECTORY(bad_level_call_stubs)
-ENDIF(WITH_PLAYER)
-
-SETUP_LIBLINKS(blenderplayer)
diff --git a/source/blenderplayer/bad_level_call_stubs/CMakeLists.txt b/source/blenderplayer/bad_level_call_stubs/CMakeLists.txt
deleted file mode 100644
index 502b374a318..00000000000
--- a/source/blenderplayer/bad_level_call_stubs/CMakeLists.txt
+++ /dev/null
@@ -1,40 +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., 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): Jacques Beaurain.
-#
-# ***** END GPL LICENSE BLOCK *****
-
-FILE(GLOB SRC stubs.c)
-
-SET(INC
- .
- ..
- ../../../source/blender/makesdna
- ../../../source/blender/makesrna
-)
-
-IF(WITH_INTERNATIONAL)
- ADD_DEFINITIONS(-DWITH_FREETYPE2)
-ENDIF(WITH_INTERNATIONAL)
-
-BLENDERLIB_NOLIST(blenkernel_blc "${SRC}" "${INC}")
diff --git a/source/blenderplayer/bad_level_call_stubs/Makefile b/source/blenderplayer/bad_level_call_stubs/Makefile
deleted file mode 100644
index 1d9f6a27327..00000000000
--- a/source/blenderplayer/bad_level_call_stubs/Makefile
+++ /dev/null
@@ -1,45 +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., 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 *****
-#
-#
-
-LIBNAME = blenkernel_blc
-DIR = $(OCGDIR)/blenderplayer/$(LIBNAME)
-
-include nan_compile.mk
-
-CFLAGS += $(LEVEL_2_C_WARNINGS)
-CFLAGS += $(FIX_STUBS_WARNINGS)
-
-CPPFLAGS += $(OGL_CPPFLAGS)
-CPPFLAGS += -I../../source/blender/makesdna
-CPPFLAGS += -I../../source/blender/makesrna
-
-# path to our own external headerfiles
-CPPFLAGS += -I..
-
diff --git a/source/blenderplayer/bad_level_call_stubs/SConscript b/source/blenderplayer/bad_level_call_stubs/SConscript
deleted file mode 100644
index ab98e984cef..00000000000
--- a/source/blenderplayer/bad_level_call_stubs/SConscript
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/python
-Import ('env')
-
-sources = 'stubs.c'
-
-incs = '#/source/blender/makesdna'
-incs += ' #/source/blender/makesrna'
-
-defs = ''
-if env['WITH_BF_INTERNATIONAL']:
- defs += 'WITH_FREETYPE2'
-
-env.BlenderLib ('blenkernel_blc', sources = Split(sources), includes=Split(incs), defines=Split(defs), libtype=['player'],priority=[220] )
diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c
deleted file mode 100644
index c1585a71ac1..00000000000
--- a/source/blenderplayer/bad_level_call_stubs/stubs.c
+++ /dev/null
@@ -1,200 +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., 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 *****
- * BKE_bad_level_calls function stubs
- */
-
-#include <stdlib.h>
-#include "DNA_listBase.h"
-#include "RNA_types.h"
-
-/*new render funcs */
-float *RE_RenderLayerGetPass(struct RenderLayer *rl, int passtype) {return NULL;}
-float RE_filter_value(int type, float x) {return 0.0f;}
-struct RenderLayer *RE_GetRenderLayer(struct RenderResult *rr, const char *name) {return (struct RenderLayer *)NULL;}
-
-/* zbuf.c stub */
-void antialias_tagbuf(int xsize, int ysize, char *rectmove) {}
-void RE_zbuf_accumulate_vecblur(struct NodeBlurData *nbd, int xsize, int ysize, float *newrect, float *imgrect, float *vecbufrect, float *zbufrect) {}
-
-/* imagetexture.c stub */
-void ibuf_sample(struct ImBuf *ibuf, float fx, float fy, float dx, float dy, float *result) {}
-
-/* texture.c */
-int multitex_thread(struct Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, struct TexResult *texres, short thread, short which_output) {return 0;}
-int multitex_ext(struct Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, struct TexResult *texres){return 0;}
-
-/* nodes */
-struct RenderResult *RE_GetResult(struct Render *re){return (struct RenderResult *) NULL;}
-struct Render *RE_GetRender(const char *name){return (struct Render *) NULL;}
-
-/* blenkernel */
-char* btempdir(){return NULL;}
-void RE_FreeRenderResult(struct RenderResult *res){}
-char* datatoc_bmonofont_ttf(){return NULL;}
-int datatoc_bmonofont_ttf_size(){return 0;}
-struct RenderResult *RE_MultilayerConvert(void *exrhandle, int rectx, int recty){return (struct RenderResult *) NULL;}
-void RE_GetResultImage(struct Render *re, struct RenderResult *rr){}
-int RE_RenderInProgress(struct Render *re){return 0;}
-struct Scene *RE_GetScene(struct Render *re){return (struct Scene *) NULL;}
-void RE_Database_Free(struct Render *re){}
-void RE_FreeRender(struct Render *re){}
-void RE_shade_external(struct Render *re, struct ShadeInput *shi, struct ShadeResult *shr){}
-void RE_DataBase_GetView(struct Render *re, float mat[][4]){}
-int externtex(struct MTex *mtex, float *vec, float *tin, float *tr, float *tg, float *tb, float *ta){return 0;}
-float texture_value_blend(float tex, float out, float fact, float facg, int blendtype, int flip){return 0.0f;}
-void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg, int blendtype){}
-char stipple_quarttone[1]; //GLubyte stipple_quarttone[128]
-double elbeemEstimateMemreq(int res, float sx, float sy, float sz, int refine, char *retstr) {return 0.0f;}
-
-/* rna */
-void WM_event_add_notifier(const struct bContext *C, unsigned int type, void *reference){}
-void ED_armature_bone_rename(struct bArmature *arm, char *oldnamep, char *newnamep){}
-void object_test_constraints (struct Object *owner){}
-void ED_object_parent(struct Object *ob, struct Object *par, int type, const char *substr){}
-void ED_node_composit_default(struct Scene *sce){}
-
-struct EditBone *ED_armature_bone_get_mirrored(struct ListBase *edbo, struct EditBone *ebo){return (struct EditBone *) NULL;}
-struct ListBase *get_active_constraints (struct Object *ob){return (struct ListBase *) NULL;}
-int ED_pose_channel_in_IK_chain(struct Object *ob, struct bPoseChannel *pchan){return 0;}
-
-int ED_space_image_show_uvedit(struct SpaceImage *sima, struct Object *obedit){return 0;}
-int ED_space_image_show_render(struct SpaceImage *sima){return 0;}
-int ED_space_image_show_paint(struct SpaceImage *sima){return 0;}
-void ED_space_image_set(struct bContext *C, struct SpaceImage *sima, struct Scene *scene, struct Object *obedit, struct Image *ima){}
-struct ImBuf *ED_space_image_buffer(struct SpaceImage *sima){return (struct ImBuf *) NULL;}
-
-struct PTCacheEdit *PE_get_current(struct Scene *scene, struct Object *ob){return (struct PTCacheEdit *) NULL;}
-
-/* rna editors */
-char *ED_info_stats_string(struct Scene *scene){return NULL;}
-void ED_area_tag_redraw(struct ScrArea *sa){}
-void WM_event_add_fileselect(struct bContext *C, struct wmOperator *op){}
-void ED_node_texture_default(struct Tex *tx){}
-int text_file_modified(struct Text *text){return 0;}
-void ED_node_shader_default(struct Material *ma){}
-void ED_screen_animation_timer_update(struct bContext *C, int redraws){}
-int ED_object_modifier_remove(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct ModifierData *md){return 0;}
-int ED_object_modifier_add(struct ReportList *reports, struct Scene *scene, struct Object *ob, int type){return 0;}
-int uiLayoutGetActive(struct uiLayout *layout){return 0;}
-int uiLayoutGetOperatorContext(struct uiLayout *layout){return 0;}
-int uiLayoutGetAlignment(struct uiLayout *layout){return 0;}
-int uiLayoutGetEnabled(struct uiLayout *layout){return 0;}
-float uiLayoutGetScaleX(struct uiLayout *layout){return 0.0f;}
-float uiLayoutGetScaleY(struct uiLayout *layout){return 0.0f;}
-void uiLayoutSetActive(struct uiLayout *layout, int active){}
-void uiLayoutSetOperatorContext(struct uiLayout *layout, int opcontext){}
-void uiLayoutSetEnabled(struct uiLayout *layout, int enabled){}
-void uiLayoutSetAlignment(struct uiLayout *layout, int alignment){}
-void uiLayoutSetScaleX(struct uiLayout *layout, float scale){}
-void uiLayoutSetScaleY(struct uiLayout *layout, float scale){}
-
-void uiItemR(struct uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, int flag){}
-
-PointerRNA uiItemFullO(struct uiLayout *layout, char *name, int icon, char *idname, struct IDProperty *properties, int context, int flag){PointerRNA a; return a;}
-struct uiLayout *uiLayoutRow(struct uiLayout *layout, int align){return (struct uiLayout *) NULL;}
-struct uiLayout *uiLayoutColumn(struct uiLayout *layout, int align){return (struct uiLayout *) NULL;}
-struct uiLayout *uiLayoutColumnFlow(struct uiLayout *layout, int number, int align){return (struct uiLayout *) NULL;}
-struct uiLayout *uiLayoutBox(struct uiLayout *layout){return (struct uiLayout *) NULL;}
-struct uiLayout *uiLayoutSplit(struct uiLayout *layout, float percentage){return (struct uiLayout *) NULL;}
-void uiItemsEnumR(struct uiLayout *layout, struct PointerRNA *ptr, char *propname){}
-void uiItemMenuEnumR(struct uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname){}
-void uiItemEnumR_string(struct uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, char *value){}
-void uiItemPointerR(struct uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, struct PointerRNA *searchptr, char *searchpropname){}
-void uiItemsEnumO(struct uiLayout *layout, char *opname, char *propname){}
-void uiItemEnumO_string(struct uiLayout *layout, char *name, int icon, char *opname, char *propname, char *value_str){}
-void uiItemMenuEnumO(struct uiLayout *layout, char *name, int icon, char *opname, char *propname){}
-void uiItemBooleanO(struct uiLayout *layout, char *name, int icon, char *opname, char *propname, int value){}
-void uiItemIntO(struct uiLayout *layout, char *name, int icon, char *opname, char *propname, int value){}
-void uiItemFloatO(struct uiLayout *layout, char *name, int icon, char *opname, char *propname, float value){}
-void uiItemStringO(struct uiLayout *layout, char *name, int icon, char *opname, char *propname, char *value){}
-void uiItemL(struct uiLayout *layout, char *name, int icon){}
-void uiItemM(struct uiLayout *layout, struct bContext *C, char *name, int icon, char *menuname){}
-void uiItemS(struct uiLayout *layout){}
-void uiLayoutSetContextPointer(struct uiLayout *layout, char *name, struct PointerRNA *ptr){}
-
-/* rna template */
-void uiTemplateHeader(struct uiLayout *layout, struct bContext *C, int menus){}
-void uiTemplateID(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, char *newop, char *unlinkop){}
-struct uiLayout *uiTemplateModifier(struct uiLayout *layout, struct PointerRNA *ptr){return (struct uiLayout *) NULL;}
-struct uiLayout *uiTemplateConstraint(struct uiLayout *layout, struct PointerRNA *ptr){return (struct uiLayout *) NULL;}
-void uiTemplatePreview(struct uiLayout *layout, struct ID *id, struct ID *parent, struct MTex *slot){}
-void uiTemplateCurveMapping(struct uiLayout *layout, struct CurveMapping *cumap, int type, int compact){}
-void uiTemplateColorRamp(struct uiLayout *layout, struct ColorBand *coba, int expand){}
-void uiTemplateLayers(struct uiLayout *layout, struct PointerRNA *ptr, char *propname){}
-void uiTemplateTriColorSet(struct uiLayout *layout, struct PointerRNA *ptr, char *propname){}
-void uiTemplateImageLayers(struct uiLayout *layout, struct bContext *C, struct Image *ima, struct ImageUser *iuser){}
-ListBase uiTemplateList(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, struct PointerRNA *activeptr, char *activepropname, int rows, int listtype){struct ListBase b = {0,0}; return b;}
-void uiTemplateRunningJobs(struct uiLayout *layout, struct bContext *C){}
-void uiTemplateOperatorSearch(struct uiLayout *layout){}
-void uiTemplateHeader3D(struct uiLayout *layout, struct bContext *C){}
-void uiTemplate_view3d_select_faceselmenu(struct uiLayout *layout, struct bContext *C){}
-void uiTemplateTextureImage(struct uiLayout *layout, struct bContext *C, struct Tex *tex){}
-
-/* rna render */
-struct RenderResult *RE_engine_begin_result(struct RenderEngine *engine, int x, int y, int w, int h){return (struct RenderResult *) NULL;}
-void RE_engine_update_result(struct RenderEngine *engine, struct RenderResult *result){}
-void RE_engine_end_result(struct RenderEngine *engine, struct RenderResult *result){}
-void RE_engine_update_stats(struct RenderEngine *engine, char *stats, char *info){}
-void RE_layer_load_from_file(struct RenderLayer *layer, struct ReportList *reports, char *filename){}
-void RE_result_load_from_file(struct RenderResult *result, struct ReportList *reports, char *filename){}
-int RE_engine_test_break(struct RenderEngine *engine){return 0;}
-
-/* python */
-struct wmOperatorType *WM_operatortype_find(const char *idname, int quiet){return (struct wmOperatorType *) NULL;}
-struct wmOperatorType *WM_operatortype_first(){return (struct wmOperatorType *) NULL;}
-struct wmOperatorType *WM_operatortype_exists(const char *idname){return (struct wmOperatorType *) NULL;}
-int WM_operator_call_py(struct bContext *C, struct wmOperatorType *ot, int context, struct PointerRNA *properties, struct ReportList *reports){return 0;}
-int WM_operatortype_remove(const char *idname){return 0;}
-void WM_operator_properties_free(struct PointerRNA *ptr){}
-void WM_operator_properties_create(struct PointerRNA *ptr, const char *opstring){}
-void WM_operatortype_append_ptr(void (*opfunc)(struct wmOperatorType*, void*), void *userdata){}
-void WM_operator_bl_idname(char *to, const char *from){}
-short insert_keyframe (struct ID *id, struct bAction *act, const char group[], const char rna_path[], int array_index, float cfra, short flag){return 0;}
-
-/* smoke */
-void lzo1x_1_compress(void) {return;}
-void LzmaCompress(void) { return; }
-void smoke_export(void) {return;}
-void lzo1x_decompress(void) {return;}
-void LzmaUncompress(void) {return;}
-void smoke_init(void) {return;}
-void smoke_turbulence_init(void) {return;}
-void smoke_turbulence_initBlenderRNA(void) {return;}
-void smoke_initBlenderRNA(void) {return;}
-void smoke_free(void) {return;}
-void smoke_turbulence_free(void) {return;}
-void smoke_turbulence_step(void) {return;}
-void smoke_dissolve(void) {return;}
-void smoke_get_density(void) {return;}
-void smoke_get_heat(void) {return;}
-void smoke_get_velocity_x(void) {return;}
-void smoke_get_velocity_y(void) {return;}
-void smoke_get_velocity_z(void) {return;}
-void smoke_get_obstacle(void) {return;}
-void smoke_get_index(void) {return;}
-void smoke_step(void) {return;}
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 1256881182b..a9368e021cd 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -27,56 +27,56 @@
SETUP_LIBDIRS()
INCLUDE_DIRECTORIES(../../intern/guardedalloc
- ../blender/blenlib
- ../blender/blenkernel
- ../blender/editors/include
- ../blender/makesrna
- ../blender/makesrna/intern
- ../blender/nodes
- ../blender/include
- ../blender/blenloader
- ../blender/imbuf
- ../blender/renderconverter
- ../blender/render/extern/include
- ../blender/makesdna
- ../blender/gpu
- ../blender/windowmanager
- ../kernel/gen_messaging
- ../kernel/gen_system
- ../../extern/glew/include
+ ../blender/blenlib
+ ../blender/blenkernel
+ ../blender/editors/include
+ ../blender/makesrna
+ ../blender/makesrna/intern
+ ../blender/nodes
+ ../blender/include
+ ../blender/blenloader
+ ../blender/imbuf
+ ../blender/renderconverter
+ ../blender/render/extern/include
+ ../blender/makesdna
+ ../blender/gpu
+ ../blender/windowmanager
+ ../kernel/gen_messaging
+ ../kernel/gen_system
+ ../../extern/glew/include
)
IF(WITH_QUICKTIME)
- ADD_DEFINITIONS(-DWITH_QUICKTIME)
+ ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
IF(WITH_OPENEXR)
- ADD_DEFINITIONS(-DWITH_OPENEXR)
+ ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
IF(WITH_PYTHON)
- INCLUDE_DIRECTORIES(../blender/python)
+ INCLUDE_DIRECTORIES(../blender/python)
ELSE(WITH_PYTHON)
- ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ ADD_DEFINITIONS(-DDISABLE_PYTHON)
ENDIF(WITH_PYTHON)
IF(NOT WITH_SDL)
- ADD_DEFINITIONS(-DDISABLE_SDL)
+ ADD_DEFINITIONS(-DDISABLE_SDL)
ENDIF(NOT WITH_SDL)
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
- ADD_DEFINITIONS(-DWITH_BINRELOC)
- INCLUDE_DIRECTORIES(${BINRELOC_INC})
+ ADD_DEFINITIONS(-DWITH_BINRELOC)
+ INCLUDE_DIRECTORIES(${BINRELOC_INC})
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
MESSAGE(STATUS "Configuring blender")
IF(WIN32)
- ADD_EXECUTABLE(blender ${EXETYPE} creator.c ../icons/winblender.rc)
+ ADD_EXECUTABLE(blender ${EXETYPE} creator.c ../icons/winblender.rc)
ELSE(WIN32)
- ADD_EXECUTABLE(blender ${EXETYPE} creator.c)
+ ADD_EXECUTABLE(blender ${EXETYPE} creator.c)
ENDIF(WIN32)
@@ -86,210 +86,182 @@ SET(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
IF(WITH_INSTALL)
- IF(UNIX)
- ADD_CUSTOM_COMMAND(TARGET blender
- POST_BUILD
- MAIN_DEPENDENCY blender
- #COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/plugins ${TARGETDIR}/
- #COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/text/* ${TARGETDIR}/
- )
- ENDIF(UNIX)
-
- IF(UNIX AND NOT APPLE)
- ADD_CUSTOM_COMMAND(
- TARGET blender POST_BUILD MAIN_DEPENDENCY blender
- COMMAND rm -Rf ${TARGETDIR}/.blender
- COMMAND mkdir ${TARGETDIR}/.blender/
- COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.bfont.ttf ${TARGETDIR}/.blender/
- )
+ IF(UNIX)
+ ADD_CUSTOM_COMMAND(TARGET blender
+ POST_BUILD
+ MAIN_DEPENDENCY blender
+ #COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/plugins ${TARGETDIR}/
+ #COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/text/* ${TARGETDIR}/
+ )
+ ENDIF(UNIX)
+
+ IF(UNIX AND NOT APPLE)
+ ADD_CUSTOM_COMMAND(
+ TARGET blender POST_BUILD MAIN_DEPENDENCY blender
+ COMMAND rm -Rf ${TARGETDIR}/.blender
+ COMMAND mkdir ${TARGETDIR}/.blender/
+ COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.bfont.ttf ${TARGETDIR}/.blender/
+ )
- IF(WITH_INTERNATIONAL)
- ADD_CUSTOM_COMMAND(
- TARGET blender POST_BUILD MAIN_DEPENDENCY blender
- COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/.blender/
- COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/.blender/
- )
- ENDIF(WITH_INTERNATIONAL)
+ IF(WITH_INTERNATIONAL)
+ ADD_CUSTOM_COMMAND(
+ TARGET blender POST_BUILD MAIN_DEPENDENCY blender
+ COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/.blender/
+ COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/.blender/
+ )
+ ENDIF(WITH_INTERNATIONAL)
- IF(WITH_PYTHON)
- ADD_CUSTOM_COMMAND(
- TARGET blender POST_BUILD MAIN_DEPENDENCY blender
- COMMENT "copying blender scripts..."
- COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/ui ${TARGETDIR}/.blender/
- COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/io ${TARGETDIR}/.blender/
- COMMAND find ${TARGETDIR} -name "*.py?" -prune -exec rm -rf {} "\;"
- )
+ IF(WITH_PYTHON)
+ ADD_CUSTOM_COMMAND(
+ TARGET blender POST_BUILD MAIN_DEPENDENCY blender
+ COMMENT "copying blender scripts..."
+ COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/ui ${TARGETDIR}/.blender/
+ COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/io ${TARGETDIR}/.blender/
+ COMMAND find ${TARGETDIR} -name "*.py?" -prune -exec rm -rf {} "\;"
+ )
- # Copy the systems python into the install directory
- # Scons copy in tools/Blender.py
- ADD_CUSTOM_COMMAND(
- TARGET blender POST_BUILD MAIN_DEPENDENCY blender
- COMMENT "copying a subset of the systems python..."
+ # Copy the systems python into the install directory
+ # Scons copy in tools/Blender.py
+ ADD_CUSTOM_COMMAND(
+ TARGET blender POST_BUILD MAIN_DEPENDENCY blender
+ COMMENT "copying a subset of the systems python..."
- COMMAND mkdir ${TARGETDIR}/.blender/python # PYTHONPATH and PYTHONHOME is set here
- COMMAND mkdir ${TARGETDIR}/.blender/python/lib/
- COMMAND cp -R ${PYTHON_LIBPATH}/python${PYTHON_VERSION} ${TARGETDIR}/.blender/python/lib/
+ COMMAND mkdir ${TARGETDIR}/.blender/python # PYTHONPATH and PYTHONHOME is set here
+ COMMAND mkdir ${TARGETDIR}/.blender/python/lib/
+ COMMAND cp -R ${PYTHON_LIBPATH}/python${PYTHON_VERSION} ${TARGETDIR}/.blender/python/lib/
- COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/distutils
- COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/lib2to3
- COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/idlelib
- COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/tkinter
- COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/config
+ COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/distutils
+ COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/lib2to3
+ COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/idlelib
+ COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/tkinter
+ COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/config
- COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/site-packages
- COMMAND mkdir ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/site-packages # python needs it.
-
- COMMAND rm -f ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/lib-dynload/_tkinter.so
- COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "test" -prune -exec rm -rf {} "\;"
- COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "*.py?" -exec rm -rf {} "\;"
- COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "*.so"-exec strip -s {} "\;"
- )
+ COMMAND rm -rf ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/site-packages
+ COMMAND mkdir ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/site-packages # python needs it.
+
+ COMMAND rm ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION}/lib-dynload/_tkinter.so
+ COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "test" -prune -exec rm -rf {} "\;"
+ COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "*.py?" -exec rm -rf {} "\;"
+ COMMAND find ${TARGETDIR}/.blender/python/lib/python${PYTHON_VERSION} -name "*.so"-exec strip -s {} "\;"
+ )
- ENDIF(WITH_PYTHON)
+ ENDIF(WITH_PYTHON)
- ADD_CUSTOM_COMMAND(
- TARGET blender POST_BUILD MAIN_DEPENDENCY blender
- COMMAND find ${TARGETDIR} -name .svn -prune -exec rm -rf {} "\;"
- )
+ ADD_CUSTOM_COMMAND(
+ TARGET blender POST_BUILD MAIN_DEPENDENCY blender
+ COMMAND find ${TARGETDIR} -name .svn -prune -exec rm -rf {} "\;"
+ )
- ENDIF(UNIX AND NOT APPLE)
-
- IF(APPLE)
- SET(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blender.app)
- SET(SOURCEINFO ${SOURCEDIR}/Contents/Info.plist)
- SET(TARGETINFO ${TARGETDIR}/blender.app/Contents/Info.plist)
-
- ADD_CUSTOM_COMMAND(
- TARGET blender POST_BUILD MAIN_DEPENDENCY blender
- COMMAND cp -R ${SOURCEINFO} ${TARGETDIR}/blender.app/Contents/
- COMMAND cp -R ${SOURCEDIR}/Contents/PkgInfo ${TARGETDIR}/blender.app/Contents/
- COMMAND cp -R ${SOURCEDIR}/Contents/Resources ${TARGETDIR}/blender.app/Contents/
- COMMAND cat ${SOURCEINFO} | sed s/VERSION/`cat ${CMAKE_SOURCE_DIR}/release/VERSION`/ | sed s/DATE/`date +'%Y-%b-%d'`/ > ${TARGETINFO}
- COMMAND rm -Rf ${TARGETDIR}/blender.app/Contents/MacOS/.blender
- COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
- COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.bfont.ttf ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
- )
+ ENDIF(UNIX AND NOT APPLE)
+
+ IF(APPLE)
+ SET(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blender.app)
+ SET(SOURCEINFO ${SOURCEDIR}/Contents/Info.plist)
+ SET(TARGETINFO ${TARGETDIR}/blender.app/Contents/Info.plist)
+
+ ADD_CUSTOM_COMMAND(
+ TARGET blender POST_BUILD MAIN_DEPENDENCY blender
+ COMMAND cp -R ${SOURCEINFO} ${TARGETDIR}/blender.app/Contents/
+ COMMAND cp -R ${SOURCEDIR}/Contents/PkgInfo ${TARGETDIR}/blender.app/Contents/
+ COMMAND cp -R ${SOURCEDIR}/Contents/Resources ${TARGETDIR}/blender.app/Contents/
+ COMMAND cat ${SOURCEINFO} | sed s/VERSION/`cat ${CMAKE_SOURCE_DIR}/release/VERSION`/ | sed s/DATE/`date +'%Y-%b-%d'`/ > ${TARGETINFO}
+ COMMAND rm -Rf ${TARGETDIR}/blender.app/Contents/MacOS/.blender
+ COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
+ COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.bfont.ttf ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
+ )
- IF(WITH_INTERNATIONAL)
- ADD_CUSTOM_COMMAND(
- TARGET blender POST_BUILD MAIN_DEPENDENCY blender
- COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
- COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/Resources/
- COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
- COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/blender.app/Contents/Resources/
- )
- ENDIF(WITH_INTERNATIONAL)
+ IF(WITH_INTERNATIONAL)
+ ADD_CUSTOM_COMMAND(
+ TARGET blender POST_BUILD MAIN_DEPENDENCY blender
+ COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
+ COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/Resources/
+ COMMAND cp -R ${CMAKE_SOURCE_DIR}/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
+ COMMAND cp ${CMAKE_SOURCE_DIR}/bin/.blender/.Blanguages ${TARGETDIR}/blender.app/Contents/Resources/
+ )
+ ENDIF(WITH_INTERNATIONAL)
- IF(WITH_PYTHON)
- ADD_CUSTOM_COMMAND(
- TARGET blender POST_BUILD MAIN_DEPENDENCY blender
- COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/ui ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
- COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/io ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
- COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/.blender/python/
- COMMAND unzip -q ${LIBDIR}/release/python.zip -d ${TARGETDIR}/blender.app/Contents/MacOS/.blender/python/
- COMMAND find ${TARGETDIR}/blender.app -name "*.py?" -prune -exec rm -rf {} "\;"
- )
- ENDIF(WITH_PYTHON)
+ IF(WITH_PYTHON)
+ ADD_CUSTOM_COMMAND(
+ TARGET blender POST_BUILD MAIN_DEPENDENCY blender
+ COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/ui ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
+ COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/io ${TARGETDIR}/blender.app/Contents/MacOS/.blender/
+ COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/.blender/python/
+ COMMAND unzip -q ${LIBDIR}/release/python.zip -d ${TARGETDIR}/blender.app/Contents/MacOS/.blender/python/
+ COMMAND find ${TARGETDIR}/blender.app -name "*.py?" -prune -exec rm -rf {} "\;"
+ )
+ ENDIF(WITH_PYTHON)
- ADD_CUSTOM_COMMAND(
- TARGET blender POST_BUILD MAIN_DEPENDENCY blender
- COMMAND find ${TARGETDIR}/blender.app -name .DS_Store -prune -exec rm -rf {} "\;"
- COMMAND find ${TARGETDIR}/blender.app -name .svn -prune -exec rm -rf {} "\;"
- )
- ENDIF(APPLE)
-
- IF(WIN32)
- FILE(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} WIN_SOURCE_DIR)
+ ADD_CUSTOM_COMMAND(
+ TARGET blender POST_BUILD MAIN_DEPENDENCY blender
+ COMMAND find ${TARGETDIR}/blender.app -name .DS_Store -prune -exec rm -rf {} "\;"
+ COMMAND find ${TARGETDIR}/blender.app -name .svn -prune -exec rm -rf {} "\;"
+ )
+ ENDIF(APPLE)
+
+ IF(WIN32)
+ FILE(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} WIN_SOURCE_DIR)
- ADD_CUSTOM_COMMAND(TARGET blender
- POST_BUILD
- MAIN_DEPENDENCY blender
- COMMAND if not exist \"${TARGETDIR}\\.blender\" mkdir \"${TARGETDIR}\\.blender\"
- COMMAND if not exist \"${TARGETDIR}\\.blender\\locale\" mkdir \"${TARGETDIR}\\.blender\\locale\"
- COMMAND if not exist \"${TARGETDIR}\\.blender\\ui\" mkdir \"${TARGETDIR}\\.blender\\ui\"
- COMMAND if not exist \"${TARGETDIR}\\.blender\\io\" mkdir \"${TARGETDIR}\\.blender\\io\"
- COMMAND if not exist \"${TARGETDIR}\\plugins\" mkdir \"${TARGETDIR}\\plugins\"
- COMMAND copy /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\.Blanguages\" \"${TARGETDIR}\\.blender\\\"
- COMMAND copy /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\.bfont.ttf\" \"${TARGETDIR}\\.blender\\\"
- COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\locale\\*.*\" \"${TARGETDIR}\\.blender\\locale\"
- COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\scripts\\*.*\" \"${TARGETDIR}\\.blender\\scripts\"
- COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\ui\\*.*\" \"${TARGETDIR}\\.blender\\ui\"
- COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\io\\*.*\" \"${TARGETDIR}\\.blender\\io\"
- COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\plugins\\*.*\" \"${TARGETDIR}\\plugins\"
- COMMAND copy /Y \"${WIN_SOURCE_DIR}\\release\\text\\*.*\" \"${TARGETDIR}\"
- COMMAND copy /Y \"${WIN_SOURCE_DIR}\\release\\windows\\extra\\python26.zip\" \"${TARGETDIR}\\\"
- )
+ ADD_CUSTOM_COMMAND(TARGET blender
+ POST_BUILD
+ MAIN_DEPENDENCY blender
+ COMMAND if not exist \"${TARGETDIR}\\.blender\" mkdir \"${TARGETDIR}\\.blender\"
+ COMMAND if not exist \"${TARGETDIR}\\.blender\\locale\" mkdir \"${TARGETDIR}\\.blender\\locale\"
+ COMMAND if not exist \"${TARGETDIR}\\.blender\\ui\" mkdir \"${TARGETDIR}\\.blender\\ui\"
+ COMMAND if not exist \"${TARGETDIR}\\.blender\\io\" mkdir \"${TARGETDIR}\\.blender\\io\"
+ COMMAND if not exist \"${TARGETDIR}\\plugins\" mkdir \"${TARGETDIR}\\plugins\"
+ COMMAND copy /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\.Blanguages\" \"${TARGETDIR}\\.blender\\\"
+ COMMAND copy /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\.bfont.ttf\" \"${TARGETDIR}\\.blender\\\"
+ COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\locale\\*.*\" \"${TARGETDIR}\\.blender\\locale\"
+ COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\scripts\\*.*\" \"${TARGETDIR}\\.blender\\scripts\"
+ COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\ui\\*.*\" \"${TARGETDIR}\\.blender\\ui\"
+ COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\io\\*.*\" \"${TARGETDIR}\\.blender\\io\"
+ COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\plugins\\*.*\" \"${TARGETDIR}\\plugins\"
+ COMMAND copy /Y \"${WIN_SOURCE_DIR}\\release\\text\\*.*\" \"${TARGETDIR}\"
+ COMMAND copy /Y \"${WIN_SOURCE_DIR}\\release\\windows\\extra\\python26.zip\" \"${TARGETDIR}\\\"
+ )
- FILE(TO_NATIVE_PATH "${LIBDIR}" WIN_LIBDIR)
+ FILE(TO_NATIVE_PATH "${LIBDIR}" WIN_LIBDIR)
- ADD_CUSTOM_COMMAND(TARGET blender
- POST_BUILD
- MAIN_DEPENDENCY blender
- COMMAND copy /Y \"${WIN_LIBDIR}\\release\\python31.zip\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\gettext\\lib\\gnu_gettext.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\png\\lib\\libpng.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\sdl\\lib\\SDL.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\zlib\\lib\\zlib.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\tiff\\lib\\libtiff.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\python\\lib\\python31.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\python\\lib\\python31_d.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\pthreads\\lib\\pthreadVC2.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\samplerate\\lib\\libsamplerate-0.dll\" \"${TARGETDIR}\\\"
- )
-
- IF(WITH_INTERNATIONAL)
- ADD_CUSTOM_COMMAND(TARGET blender
- POST_BUILD
- MAIN_DEPENDENCY blender
- COMMAND copy /Y \"${WIN_LIBDIR}\\iconv\\lib\\iconv.dll\" \"${TARGETDIR}\\\"
- )
- ENDIF(WITH_INTERNATIONAL)
-
- IF(WITH_FFMPEG)
- ADD_CUSTOM_COMMAND(TARGET blender
- POST_BUILD
- MAIN_DEPENDENCY blender
- COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avcodec-52.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avformat-52.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avdevice-52.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avutil-50.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libfaac-0.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libfaad-2.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libmp3lame-0.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libx264-67.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\swscale-0.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\xvidcore.dll\" \"${TARGETDIR}\\\"
- )
- ENDIF(WITH_FFMPEG)
-
- IF(WITH_SNDFILE)
- ADD_CUSTOM_COMMAND(TARGET blender
- POST_BUILD
- MAIN_DEPENDENCY blender
- COMMAND copy /Y \"${WIN_LIBDIR}\\sndfile\\lib\\libsndfile-1.dll\" \"${TARGETDIR}\\\"
- )
- ENDIF(WITH_SNDFILE)
-
- IF(WITH_JACK)
- ADD_CUSTOM_COMMAND(TARGET blender
- POST_BUILD
- MAIN_DEPENDENCY blender
- COMMAND copy /Y \"${WIN_LIBDIR}\\jack\\lib\\libjack.dll\" \"${TARGETDIR}\\\"
- )
- ENDIF(WITH_JACK)
-
- IF(WITH_OPENAL)
- ADD_CUSTOM_COMMAND(TARGET blender
- POST_BUILD
- MAIN_DEPENDENCY blender
- COMMAND copy /Y \"${WIN_LIBDIR}\\openal\\lib\\OpenAL32.dll\" \"${TARGETDIR}\\\"
- COMMAND copy /Y \"${WIN_LIBDIR}\\openal\\lib\\wrap_oal.dll\" \"${TARGETDIR}\\\"
-
- )
- ENDIF(WITH_OPENAL)
-
-
- ENDIF(WIN32)
+ ADD_CUSTOM_COMMAND(TARGET blender
+ POST_BUILD
+ MAIN_DEPENDENCY blender
+ COMMAND copy /Y \"${WIN_LIBDIR}\\release\\python31.zip\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\gettext\\lib\\gnu_gettext.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\png\\lib\\libpng.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\sdl\\lib\\SDL.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\zlib\\lib\\zlib.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\tiff\\lib\\libtiff.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\python\\lib\\python31.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\python\\lib\\python31_d.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\pthreads\\lib\\pthreadVC2.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\samplerate\\lib\\libsamplerate-0.dll\" \"${TARGETDIR}\\\"
+ )
+
+ IF(WITH_INTERNATIONAL)
+ ADD_CUSTOM_COMMAND(TARGET blender
+ POST_BUILD
+ MAIN_DEPENDENCY blender
+ COMMAND copy /Y \"${WIN_LIBDIR}\\iconv\\lib\\iconv.dll\" \"${TARGETDIR}\\\"
+ )
+ ENDIF(WITH_INTERNATIONAL)
+
+ IF(WITH_FFMPEG)
+ ADD_CUSTOM_COMMAND(TARGET blender
+ POST_BUILD
+ MAIN_DEPENDENCY blender
+ COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avcodec-52.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avformat-52.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avdevice-52.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avutil-50.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libfaac-0.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libfaad-2.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libmp3lame-0.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\libx264-67.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\swscale-0.dll\" \"${TARGETDIR}\\\"
+ COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\xvidcore.dll\" \"${TARGETDIR}\\\"
+ )
+ ENDIF(WITH_FFMPEG)
+ ENDIF(WIN32)
ENDIF(WITH_INSTALL)
ADD_DEPENDENCIES(blender makesdna)
@@ -299,108 +271,102 @@ FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} bf_windowmanager bf_editors blender_render)
IF(WITH_ELBEEM)
- SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} bf_elbeem)
+ SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} bf_elbeem)
ENDIF(WITH_ELBEEM)
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
- SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc)
+ SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
IF(UNIX)
- # Sort libraries
- SET(BLENDER_SORTED_LIBS
- bf_windowmanager
- bf_editors
- bf_decimation
- blender_BSP
- bf_ghost
- bf_string
- blender_render
- blender_ONL
- bf_python
- bf_gen_python
- bf_blenkernel
- bf_nodes
- bf_gpu
- bf_blenloader
- bf_blenpluginapi
- bf_imbuf
- bf_blenlib
- bf_avi
- bf_cineon
- bf_openexr
- bf_dds
- bf_readblenfile
- blender_bop
- bf_kernel
- bf_decimation
- bf_elbeem
- bf_IK
- bf_memutil
- bf_guardedalloc
- blender_CTR
- bf_moto
- bf_windowmanager
- bf_editors
- bf_blroutines
- bf_converter
- bf_dummy
- bf_bullet
- bf_smoke
- bf_minilzo
- bf_lzma
- bf_common
- bf_ketsji
- bf_logic
- bf_rasterizer
- bf_oglrasterizer
- bf_expressions
- bf_scenegraph
- bf_moto
- bf_blroutines
- kx_network
- bf_kernel
- bf_ngnetwork
- extern_bullet
- bf_loopbacknetwork
- bf_common
- bf_moto
- bf_python
- bf_gen_python
- extern_binreloc
- extern_glew
- extern_libopenjpeg
- bf_videotex
- bf_rna
- bf_dna
- bf_blenfont
- bf_audaspace
- )
-
- IF(WITH_CXX_GUARDEDALLOC)
- SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_guardedalloc_cpp)
- ENDIF(WITH_CXX_GUARDEDALLOC)
-
- IF(WITH_QUICKTIME)
- SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_quicktime)
- ENDIF(WITH_QUICKTIME)
-
-
- FOREACH(SORTLIB ${BLENDER_SORTED_LIBS})
- SET(REMLIB ${SORTLIB})
- FOREACH(SEARCHLIB ${BLENDER_LINK_LIBS})
- IF(${SEARCHLIB} STREQUAL ${SORTLIB})
- SET(REMLIB "")
- ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB})
- ENDFOREACH(SEARCHLIB)
- IF(REMLIB)
- MESSAGE(STATUS "Removing library ${REMLIB} from blender linking because: not configured")
- LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
- ENDIF(REMLIB)
- ENDFOREACH(SORTLIB)
- TARGET_LINK_LIBRARIES(blender ${BLENDER_SORTED_LIBS})
+ # Sort libraries
+ SET(BLENDER_SORTED_LIBS
+ bf_windowmanager
+ bf_editors
+ bf_decimation
+ blender_BSP
+ bf_ghost
+ bf_string
+ blender_render
+ blender_ONL
+ bf_python
+ bf_gen_python
+ bf_blenkernel
+ bf_nodes
+ bf_gpu
+ bf_blenloader
+ bf_blenpluginapi
+ bf_imbuf
+ bf_blenlib
+ bf_avi
+ bf_cineon
+ bf_openexr
+ bf_dds
+ bf_readblenfile
+ blender_bop
+ bf_kernel
+ bf_decimation
+ bf_elbeem
+ bf_IK
+ bf_memutil
+ bf_guardedalloc
+ blender_CTR
+ bf_moto
+ bf_windowmanager
+ bf_editors
+ bf_blroutines
+ bf_converter
+ bf_dummy
+ bf_bullet
+ bf_smoke
+ bf_common
+ bf_ketsji
+ bf_logic
+ bf_rasterizer
+ bf_oglrasterizer
+ bf_expressions
+ bf_scenegraph
+ bf_moto
+ bf_blroutines
+ kx_network
+ bf_kernel
+ bf_ngnetwork
+ extern_bullet
+ bf_loopbacknetwork
+ bf_common
+ bf_moto
+ bf_python
+ bf_gen_python
+ bf_quicktime
+ extern_binreloc
+ extern_glew
+ extern_libopenjpeg
+ bf_videotex
+ bf_rna
+ bf_dna
+ bf_blenfont
+ bf_audaspace
+ )
+
+ IF(WITH_CXX_GUARDEDALLOC)
+ SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_guardedalloc_cpp)
+ ENDIF(WITH_CXX_GUARDEDALLOC)
+
+ FOREACH(SORTLIB ${BLENDER_SORTED_LIBS})
+ SET(REMLIB ${SORTLIB})
+ FOREACH(SEARCHLIB ${BLENDER_LINK_LIBS})
+ IF(${SEARCHLIB} STREQUAL ${SORTLIB})
+ SET(REMLIB "")
+ ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB})
+ ENDFOREACH(SEARCHLIB)
+ IF(REMLIB)
+ MESSAGE(STATUS "Removing library ${REMLIB} from blender linking because: not configured")
+ LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
+ ENDIF(REMLIB)
+ ENDFOREACH(SORTLIB)
+ TARGET_LINK_LIBRARIES(blender ${BLENDER_SORTED_LIBS})
ELSE(UNIX)
- TARGET_LINK_LIBRARIES(blender ${BLENDER_LINK_LIBS})
+ TARGET_LINK_LIBRARIES(blender ${BLENDER_LINK_LIBS})
ENDIF(UNIX)
SETUP_LIBLINKS(blender)
diff --git a/source/creator/Makefile b/source/creator/Makefile
index 592cf913dfa..fbe5d252a77 100644
--- a/source/creator/Makefile
+++ b/source/creator/Makefile
@@ -40,6 +40,7 @@ include nan_compile.mk
CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I../blender/render/extern/include
+CPPFLAGS += -I../blender/radiosity/extern/include
# two needed for the kernel
CPPFLAGS += -I../blender/imbuf
diff --git a/source/creator/SConscript b/source/creator/SConscript
index 276070803ea..82059c846e6 100644
--- a/source/creator/SConscript
+++ b/source/creator/SConscript
@@ -3,8 +3,8 @@ Import ('env')
sources = ['creator.c']
-# if env['BF_UNIT_TEST']:
-# sources += env.Glob('tests/*.c')
+if env['WITH_BF_UNIT_TEST']:
+ sources += env.Glob('tests/*.c')
incs = '#/intern/guardedalloc ../blender/blenlib ../blender/blenkernel'
incs += ' ../blender/editors/include ../blender/blenloader ../blender/imbuf'
@@ -15,6 +15,9 @@ incs += ' ' + env['BF_OPENGL_INC']
defs = []
+if env['WITH_BF_UNIT_TEST']:
+ defs.append('WITH_UNIT_TEST')
+
if env['WITH_BF_QUICKTIME']:
incs += ' ' + env['BF_QUICKTIME_INC']
defs.append('WITH_QUICKTIME')
@@ -36,7 +39,4 @@ if env['WITH_BF_PYTHON']:
else:
defs.append('DISABLE_PYTHON')
-# if env['BF_UNIT_TEST']:
-# defs.append('UNIT_TEST')
-
env.BlenderLib ( libname = 'bf_creator', sources = sources, includes = Split(incs), defines = defs, libtype='core', priority = 0 )
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 5ada9503795..6ecde9e5546 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -831,6 +831,7 @@ int main(int argc, char **argv)
if (G.background) {
int retval = BKE_read_file(C, argv[a], NULL, NULL);
+// XXX sound_initialize_sounds();
/*we successfully loaded a blend file, get sure that
pointcache works */
diff --git a/source/gameengine/BlenderRoutines/CMakeLists.txt b/source/gameengine/BlenderRoutines/CMakeLists.txt
index ee15fd99ed5..704e3cef6cd 100644
--- a/source/gameengine/BlenderRoutines/CMakeLists.txt
+++ b/source/gameengine/BlenderRoutines/CMakeLists.txt
@@ -2,43 +2,46 @@
FILE(GLOB SRC *.cpp)
SET(INC
- .
- ../../../source/kernel/gen_system
- ../../../intern/string
- ../../../intern/guardedalloc
- ../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
- ../../../source/gameengine/Converter
- ../../../source/blender/imbuf
- ../../../intern/ghost/include
- ../../../intern/moto/include
- ../../../source/gameengine/Ketsji
- ../../../source/blender/blenlib
- ../../../source/blender/blenkernel
- ../../../source/blender/blenfont
- ../../../source/blender/editors/include
- ../../../source/blender/windowmanager
- ../../../source/blender
- ../../../source/blender/include
- ../../../source/blender/makesdna
- ../../../source/blender/makesrna
- ../../../source/gameengine/Rasterizer
- ../../../source/gameengine/GameLogic
- ../../../source/gameengine/Expressions
- ../../../source/gameengine/Network
- ../../../source/gameengine/SceneGraph
- ../../../source/gameengine/Physics/common
- ../../../source/gameengine/Physics/Bullet
- ../../../source/gameengine/Network/LoopBackNetwork
- ../../../source/blender/misc
- ../../../source/blender/blenloader
- ../../../source/blender/gpu
- ../../../extern/bullet2/src
- ../../../extern/glew/include
- ${PYTHON_INC}
+ .
+ ../../../source/kernel/gen_system
+ ../../../intern/string
+ ../../../intern/guardedalloc
+ ../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
+ ../../../source/gameengine/Converter
+ ../../../source/blender/imbuf
+ ../../../intern/ghost/include
+ ../../../intern/moto/include
+ ../../../source/gameengine/Ketsji
+ ../../../source/blender/blenlib
+ ../../../source/blender/blenkernel
+ ../../../source/blender/blenfont
+ ../../../source/blender/editors/include
+ ../../../source/blender/windowmanager
+ ../../../source/blender
+ ../../../source/blender/include
+ ../../../source/blender/makesdna
+ ../../../source/blender/makesrna
+ ../../../source/gameengine/Rasterizer
+ ../../../source/gameengine/GameLogic
+ ../../../source/gameengine/Expressions
+ ../../../source/gameengine/Network
+ ../../../source/gameengine/SceneGraph
+ ../../../source/gameengine/Physics/common
+ ../../../source/gameengine/Physics/Bullet
+ ../../../source/gameengine/Physics/Sumo
+ ../../../source/gameengine/Physics/Sumo/Fuzzics/include
+ ../../../source/gameengine/Network/LoopBackNetwork
+ ../../../source/blender/misc
+ ../../../source/blender/blenloader
+ ../../../source/blender/gpu
+ ../../../extern/bullet2/src
+ ../../../extern/solid
+ ../../../extern/glew/include
+ ${PYTHON_INC}
)
IF(WITH_FFMPEG)
- ADD_DEFINITIONS(-DWITH_FFMPEG)
+ ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
BLENDERLIB(bf_blroutines "${SRC}" "${INC}")
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
index dba6d1113c9..5cf696fe146 100644
--- a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
+++ b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
@@ -103,8 +103,6 @@ void BL_SwapBuffers(wmWindow *win)
void DisableForText()
{
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); /* needed for texture fonts otherwise they render as wireframe */
-
if(glIsEnabled(GL_BLEND)) glDisable(GL_BLEND);
if(glIsEnabled(GL_ALPHA_TEST)) glDisable(GL_ALPHA_TEST);
@@ -137,25 +135,32 @@ void DisableForText()
}
}
-void BL_print_gamedebug_line(const char* text, int xco, int yco, int width, int height)
+void BL_print_gamedebug_line(char* text, int xco, int yco, int width, int height)
{
/* gl prepping */
DisableForText();
+ //glDisable(GL_TEXTURE_2D);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
-
- glOrtho(0, width, 0, height, -100, 100);
-
+
+ glOrtho(0, width,
+ 0, height, 0, 1);
+
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
+ glMatrixMode(GL_TEXTURE);
+ glPushMatrix();
+ glLoadIdentity();
/* the actual drawing */
glColor3ub(255, 255, 255);
- BLF_draw_default(xco, height-yco, 0.0f, (char *)text);
+ BLF_draw_default(xco, height-yco, 0.0f, text);
+ glMatrixMode(GL_TEXTURE);
+ glPopMatrix();
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
@@ -163,29 +168,36 @@ void BL_print_gamedebug_line(const char* text, int xco, int yco, int width, int
glEnable(GL_DEPTH_TEST);
}
-void BL_print_gamedebug_line_padded(const char* text, int xco, int yco, int width, int height)
+void BL_print_gamedebug_line_padded(char* text, int xco, int yco, int width, int height)
{
/* This is a rather important line :( The gl-mode hasn't been left
* behind quite as neatly as we'd have wanted to. I don't know
* what cause it, though :/ .*/
DisableForText();
+ //glDisable(GL_TEXTURE_2D);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
- glOrtho(0, width, 0, height, -100, 100);
+ glOrtho(0, width,
+ 0, height, 0, 1);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
+ glMatrixMode(GL_TEXTURE);
+ glPushMatrix();
+ glLoadIdentity();
/* draw in black first*/
glColor3ub(0, 0, 0);
- BLF_draw_default(xco+2, height-yco-2, 0.0f, (char *)text);
+ BLF_draw_default(xco+1, height-yco-1, 0.0f, text);
glColor3ub(255, 255, 255);
- BLF_draw_default(xco, height-yco, 0.0f, (char *)text);
+ BLF_draw_default(xco, height-yco, 0.0f, text);
+ glMatrixMode(GL_TEXTURE);
+ glPopMatrix();
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderGL.h b/source/gameengine/BlenderRoutines/KX_BlenderGL.h
index 5c947ff630e..1e65f29d87c 100644
--- a/source/gameengine/BlenderRoutines/KX_BlenderGL.h
+++ b/source/gameengine/BlenderRoutines/KX_BlenderGL.h
@@ -47,8 +47,8 @@ void BL_HideMouse();
void BL_NormalMouse();
void BL_WaitMouse();
-void BL_print_gamedebug_line(const char* text, int xco, int yco, int width, int height);
-void BL_print_gamedebug_line_padded(const char* text, int xco, int yco, int width, int height);
+void BL_print_gamedebug_line(char* text, int xco, int yco, int width, int height);
+void BL_print_gamedebug_line_padded(char* text, int xco, int yco, int width, int height);
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
index ee9dae14b9b..8ed36e860b4 100644
--- a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
+++ b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
@@ -284,10 +284,12 @@ void KX_BlenderRenderTools::RenderText2D(RAS_TEXT_RENDER_MODE mode,
int width,
int height)
{
+ STR_String tmpstr(text);
+
if(mode == RAS_IRenderTools::RAS_TEXT_PADDED)
- BL_print_gamedebug_line_padded(text, xco, yco, width, height);
+ BL_print_gamedebug_line_padded(tmpstr.Ptr(), xco, yco, width, height);
else
- BL_print_gamedebug_line(text, xco, yco, width, height);
+ BL_print_gamedebug_line(tmpstr.Ptr(), xco, yco, width, height);
}
/* Render Text renders text into a (series of) polygon, using a texture font,
@@ -388,4 +390,4 @@ void KX_BlenderRenderTools::Update2DFilter(vector<STR_String>& propNames, void*
void KX_BlenderRenderTools::Render2DFilters(RAS_ICanvas* canvas)
{
m_filtermanager.RenderFilters(canvas);
-}
+} \ No newline at end of file
diff --git a/source/gameengine/BlenderRoutines/SConscript b/source/gameengine/BlenderRoutines/SConscript
index ad6f9f23fce..eb5f2a76e10 100644
--- a/source/gameengine/BlenderRoutines/SConscript
+++ b/source/gameengine/BlenderRoutines/SConscript
@@ -28,4 +28,10 @@ incs += ' ' + env['BF_PYTHON_INC']
incs += ' ' + env['BF_BULLET_INC']
incs += ' ' + env['BF_OPENGL_INC']
-env.BlenderLib ( 'bf_bloutines', sources, Split(incs), defs, libtype=['core','player'], priority=[300,35] , cxx_compileflags=env['BGE_CXXFLAGS'])
+cxxflags = []
+if env['OURPLATFORM'] in ('win32-vc','win64-vc'):
+ cxxflags.append ('/GR')
+ cxxflags.append ('/O2')
+ cxxflags.append ('/EHsc')
+
+env.BlenderLib ( 'bf_bloutines', sources, Split(incs), defs, libtype=['core', 'player'], priority=[300, 45] , cxx_compileflags=cxxflags)
diff --git a/source/gameengine/CMakeLists.txt b/source/gameengine/CMakeLists.txt
index 5a1887bd6c3..f546a31fb2e 100644
--- a/source/gameengine/CMakeLists.txt
+++ b/source/gameengine/CMakeLists.txt
@@ -41,5 +41,5 @@ ADD_SUBDIRECTORY(Physics/Bullet)
ADD_SUBDIRECTORY(VideoTexture)
IF(WITH_PLAYER)
- ADD_SUBDIRECTORY(GamePlayer)
+ ADD_SUBDIRECTORY(GamePlayer)
ENDIF(WITH_PLAYER)
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp
index ca4290703e1..5a3629cfcd3 100644
--- a/source/gameengine/Converter/BL_ActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ActionActuator.cpp
@@ -436,6 +436,365 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
/* Python functions */
/* ------------------------------------------------------------------------- */
+/* setStart */
+const char BL_ActionActuator::GetAction_doc[] =
+"getAction()\n"
+"\tReturns a string containing the name of the current action.\n";
+
+PyObject* BL_ActionActuator::PyGetAction(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("getAction()", "the action property");
+
+ if (m_action){
+ return PyUnicode_FromString(m_action->id.name+2);
+ }
+ Py_RETURN_NONE;
+}
+
+/* getProperty */
+const char BL_ActionActuator::GetProperty_doc[] =
+"getProperty()\n"
+"\tReturns the name of the property to be used in FromProp mode.\n";
+
+PyObject* BL_ActionActuator::PyGetProperty(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("getProperty()", "the property property");
+
+ PyObject *result;
+
+ result = Py_BuildValue("s", (const char *)m_propname);
+
+ return result;
+}
+
+/* getProperty */
+const char BL_ActionActuator::GetFrameProperty_doc[] =
+"getFrameProperty()\n"
+"\tReturns the name of the property, that is set to the current frame number.\n";
+
+PyObject* BL_ActionActuator::PyGetFrameProperty(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("getFrameProperty()", "the frameProperty property");
+
+ PyObject *result;
+
+ result = Py_BuildValue("s", (const char *)m_framepropname);
+
+ return result;
+}
+
+/* getFrame */
+const char BL_ActionActuator::GetFrame_doc[] =
+"getFrame()\n"
+"\tReturns the current frame number.\n";
+
+PyObject* BL_ActionActuator::PyGetFrame(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("getFrame()", "the frame property");
+
+ PyObject *result;
+
+ result = Py_BuildValue("f", m_localtime);
+
+ return result;
+}
+
+/* getEnd */
+const char BL_ActionActuator::GetEnd_doc[] =
+"getEnd()\n"
+"\tReturns the last frame of the action.\n";
+
+PyObject* BL_ActionActuator::PyGetEnd(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("getEnd()", "the end property");
+
+ PyObject *result;
+
+ result = Py_BuildValue("f", m_endframe);
+
+ return result;
+}
+
+/* getStart */
+const char BL_ActionActuator::GetStart_doc[] =
+"getStart()\n"
+"\tReturns the starting frame of the action.\n";
+
+PyObject* BL_ActionActuator::PyGetStart(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("getStart()", "the start property");
+
+ PyObject *result;
+
+ result = Py_BuildValue("f", m_startframe);
+
+ return result;
+}
+
+/* getBlendin */
+const char BL_ActionActuator::GetBlendin_doc[] =
+"getBlendin()\n"
+"\tReturns the number of interpolation animation frames to be\n"
+"\tgenerated when this actuator is triggered.\n";
+
+PyObject* BL_ActionActuator::PyGetBlendin(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("getBlendin()", "the blendin property");
+
+ PyObject *result;
+
+ result = Py_BuildValue("f", m_blendin);
+
+ return result;
+}
+
+/* getPriority */
+const char BL_ActionActuator::GetPriority_doc[] =
+"getPriority()\n"
+"\tReturns the priority for this actuator. Actuators with lower\n"
+"\tPriority numbers will override actuators with higher numbers.\n";
+
+PyObject* BL_ActionActuator::PyGetPriority(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("getPriority()", "the priority property");
+
+ PyObject *result;
+
+ result = Py_BuildValue("i", m_priority);
+
+ return result;
+}
+
+/* setAction */
+const char BL_ActionActuator::SetAction_doc[] =
+"setAction(action, (reset))\n"
+"\t - action : The name of the action to set as the current action.\n"
+"\t - reset : Optional parameter indicating whether to reset the\n"
+"\t blend timer or not. A value of 1 indicates that the\n"
+"\t timer should be reset. A value of 0 will leave it\n"
+"\t unchanged. If reset is not specified, the timer will"
+"\t be reset.\n";
+
+PyObject* BL_ActionActuator::PySetAction(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("setAction()", "the action property");
+
+ char *string;
+ int reset = 1;
+
+ if (PyArg_ParseTuple(args,"s|i:setAction",&string, &reset))
+ {
+ bAction *action;
+
+ action = (bAction*)SCA_ILogicBrick::m_sCurrentLogicManager->GetActionByName(STR_String(string));
+
+ if (!action){
+ /* NOTE! Throw an exception or something */
+ // printf ("setAction failed: Action not found\n", string);
+ }
+ else{
+ m_action=action;
+ if (reset)
+ m_blendframe = 0;
+ }
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* setStart */
+const char BL_ActionActuator::SetStart_doc[] =
+"setStart(start)\n"
+"\t - start : Specifies the starting frame of the animation.\n";
+
+PyObject* BL_ActionActuator::PySetStart(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("setStart()", "the start property");
+
+ float start;
+
+ if (PyArg_ParseTuple(args,"f:setStart",&start))
+ {
+ m_startframe = start;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* setEnd */
+const char BL_ActionActuator::SetEnd_doc[] =
+"setEnd(end)\n"
+"\t - end : Specifies the ending frame of the animation.\n";
+
+PyObject* BL_ActionActuator::PySetEnd(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("setEnd()", "the end property");
+
+ float end;
+
+ if (PyArg_ParseTuple(args,"f:setEnd",&end))
+ {
+ m_endframe = end;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* setBlendin */
+const char BL_ActionActuator::SetBlendin_doc[] =
+"setBlendin(blendin)\n"
+"\t - blendin : Specifies the number of frames of animation to generate\n"
+"\t when making transitions between actions.\n";
+
+PyObject* BL_ActionActuator::PySetBlendin(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("setBlendin()", "the blendin property");
+
+ float blendin;
+
+ if (PyArg_ParseTuple(args,"f:setBlendin",&blendin))
+ {
+ m_blendin = blendin;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* setBlendtime */
+const char BL_ActionActuator::SetBlendtime_doc[] =
+"setBlendtime(blendtime)\n"
+"\t - blendtime : Allows the script to directly modify the internal timer\n"
+"\t used when generating transitions between actions. This\n"
+"\t parameter must be in the range from 0.0 to 1.0.\n";
+
+PyObject* BL_ActionActuator::PySetBlendtime(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("setBlendtime()", "the blendtime property");
+
+ float blendframe;
+
+ if (PyArg_ParseTuple(args,"f:setBlendtime",&blendframe))
+ {
+ m_blendframe = blendframe * m_blendin;
+ if (m_blendframe<0)
+ m_blendframe = 0;
+ if (m_blendframe>m_blendin)
+ m_blendframe = m_blendin;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* setPriority */
+const char BL_ActionActuator::SetPriority_doc[] =
+"setPriority(priority)\n"
+"\t - priority : Specifies the new priority. Actuators will lower\n"
+"\t priority numbers will override actuators with higher\n"
+"\t numbers.\n";
+
+PyObject* BL_ActionActuator::PySetPriority(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("setPriority()", "the priority property");
+
+ int priority;
+
+ if (PyArg_ParseTuple(args,"i:setPriority",&priority))
+ {
+ m_priority = priority;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* setFrame */
+const char BL_ActionActuator::SetFrame_doc[] =
+"setFrame(frame)\n"
+"\t - frame : Specifies the new current frame for the animation\n";
+
+PyObject* BL_ActionActuator::PySetFrame(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("setFrame()", "the frame property");
+
+ float frame;
+
+ if (PyArg_ParseTuple(args,"f:setFrame",&frame))
+ {
+ m_localtime = frame;
+ if (m_localtime<m_startframe)
+ m_localtime=m_startframe;
+ else if (m_localtime>m_endframe)
+ m_localtime=m_endframe;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* setProperty */
+const char BL_ActionActuator::SetProperty_doc[] =
+"setProperty(prop)\n"
+"\t - prop : A string specifying the property name to be used in\n"
+"\t FromProp playback mode.\n";
+
+PyObject* BL_ActionActuator::PySetProperty(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("setProperty()", "the property property");
+
+ char *string;
+
+ if (PyArg_ParseTuple(args,"s:setProperty",&string))
+ {
+ m_propname = string;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* setFrameProperty */
+const char BL_ActionActuator::SetFrameProperty_doc[] =
+"setFrameProperty(prop)\n"
+"\t - prop : A string specifying the property of the frame set up update.\n";
+
+PyObject* BL_ActionActuator::PySetFrameProperty(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("setFrameProperty()", "the frameProperty property");
+
+ char *string;
+
+ if (PyArg_ParseTuple(args,"s:setFrameProperty",&string))
+ {
+ m_framepropname = string;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
PyObject* BL_ActionActuator::PyGetChannel(PyObject* value) {
char *string= _PyUnicode_AsString(value);
@@ -490,6 +849,72 @@ PyObject* BL_ActionActuator::PyGetChannel(PyObject* value) {
*/
}
+/* getType */
+const char BL_ActionActuator::GetType_doc[] =
+"getType()\n"
+"\tReturns the operation mode of the actuator.\n";
+PyObject* BL_ActionActuator::PyGetType(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("getType()", "the type property");
+
+ return Py_BuildValue("h", m_playtype);
+}
+
+/* setType */
+const char BL_ActionActuator::SetType_doc[] =
+"setType(mode)\n"
+"\t - mode: Play (0), Flipper (2), LoopStop (3), LoopEnd (4) or Property (6)\n"
+"\tSet the operation mode of the actuator.\n";
+PyObject* BL_ActionActuator::PySetType(PyObject* args,
+ PyObject* kwds) {
+ ShowDeprecationWarning("setType()", "the type property");
+
+ short typeArg;
+
+ if (!PyArg_ParseTuple(args, "h:setType", &typeArg)) {
+ return NULL;
+ }
+
+ switch (typeArg) {
+ case ACT_ACTION_PLAY:
+ case ACT_ACTION_FLIPPER:
+ case ACT_ACTION_LOOP_STOP:
+ case ACT_ACTION_LOOP_END:
+ case ACT_ACTION_FROM_PROP:
+ m_playtype = typeArg;
+ break;
+ default:
+ printf("Invalid type for action actuator: %d\n", typeArg); /* error */
+ }
+ Py_RETURN_NONE;
+}
+
+PyObject* BL_ActionActuator::PyGetContinue() {
+ ShowDeprecationWarning("getContinue()", "the continue property");
+
+ return PyLong_FromSsize_t((long)(m_end_reset==0));
+}
+
+PyObject* BL_ActionActuator::PySetContinue(PyObject* value) {
+ ShowDeprecationWarning("setContinue()", "the continue property");
+
+ int param = PyObject_IsTrue( value );
+
+ if( param == -1 ) {
+ PyErr_SetString( PyExc_TypeError, "expected True/False or 0/1" );
+ return NULL;
+ }
+
+ if (param) {
+ m_end_reset = 0;
+ } else {
+ m_end_reset = 1;
+ }
+ Py_RETURN_NONE;
+}
+
+//<-----Deprecated
+
/* setChannel */
KX_PYMETHODDEF_DOC(BL_ActionActuator, setChannel,
"setChannel(channel, matrix)\n"
@@ -603,7 +1028,31 @@ PyTypeObject BL_ActionActuator::Type = {
};
PyMethodDef BL_ActionActuator::Methods[] = {
+ //Deprecated ----->
+ {"setAction", (PyCFunction) BL_ActionActuator::sPySetAction, METH_VARARGS, (const char *)SetAction_doc},
+ {"setStart", (PyCFunction) BL_ActionActuator::sPySetStart, METH_VARARGS, (const char *)SetStart_doc},
+ {"setEnd", (PyCFunction) BL_ActionActuator::sPySetEnd, METH_VARARGS, (const char *)SetEnd_doc},
+ {"setBlendin", (PyCFunction) BL_ActionActuator::sPySetBlendin, METH_VARARGS, (const char *)SetBlendin_doc},
+ {"setPriority", (PyCFunction) BL_ActionActuator::sPySetPriority, METH_VARARGS, (const char *)SetPriority_doc},
+ {"setFrame", (PyCFunction) BL_ActionActuator::sPySetFrame, METH_VARARGS, (const char *)SetFrame_doc},
+ {"setProperty", (PyCFunction) BL_ActionActuator::sPySetProperty, METH_VARARGS, (const char *)SetProperty_doc},
+ {"setFrameProperty", (PyCFunction) BL_ActionActuator::sPySetFrameProperty, METH_VARARGS, (const char *)SetFrameProperty_doc},
+ {"setBlendtime", (PyCFunction) BL_ActionActuator::sPySetBlendtime, METH_VARARGS, (const char *)SetBlendtime_doc},
+
+ {"getAction", (PyCFunction) BL_ActionActuator::sPyGetAction, METH_VARARGS, (const char *)GetAction_doc},
+ {"getStart", (PyCFunction) BL_ActionActuator::sPyGetStart, METH_VARARGS, (const char *)GetStart_doc},
+ {"getEnd", (PyCFunction) BL_ActionActuator::sPyGetEnd, METH_VARARGS, (const char *)GetEnd_doc},
+ {"getBlendin", (PyCFunction) BL_ActionActuator::sPyGetBlendin, METH_VARARGS, (const char *)GetBlendin_doc},
+ {"getPriority", (PyCFunction) BL_ActionActuator::sPyGetPriority, METH_VARARGS, (const char *)GetPriority_doc},
+ {"getFrame", (PyCFunction) BL_ActionActuator::sPyGetFrame, METH_VARARGS, (const char *)GetFrame_doc},
+ {"getProperty", (PyCFunction) BL_ActionActuator::sPyGetProperty, METH_VARARGS, (const char *)GetProperty_doc},
+ {"getFrameProperty", (PyCFunction) BL_ActionActuator::sPyGetFrameProperty, METH_VARARGS, (const char *)GetFrameProperty_doc},
{"getChannel", (PyCFunction) BL_ActionActuator::sPyGetChannel, METH_O},
+ {"getType", (PyCFunction) BL_ActionActuator::sPyGetType, METH_VARARGS, (const char *)GetType_doc},
+ {"setType", (PyCFunction) BL_ActionActuator::sPySetType, METH_VARARGS, (const char *)SetType_doc},
+ {"getContinue", (PyCFunction) BL_ActionActuator::sPyGetContinue, METH_NOARGS, 0},
+ {"setContinue", (PyCFunction) BL_ActionActuator::sPySetContinue, METH_O, 0},
+ //<------
KX_PYMETHODTABLE(BL_ActionActuator, setChannel),
{NULL,NULL} //Sentinel
};
diff --git a/source/gameengine/Converter/BL_ActionActuator.h b/source/gameengine/Converter/BL_ActionActuator.h
index a6b4c4a055d..6003e23e315 100644
--- a/source/gameengine/Converter/BL_ActionActuator.h
+++ b/source/gameengine/Converter/BL_ActionActuator.h
@@ -84,7 +84,32 @@ public:
bAction* GetAction() { return m_action; }
void SetAction(bAction* act) { m_action= act; }
+ //Deprecated ----->
+ KX_PYMETHOD_DOC(BL_ActionActuator,SetAction);
+ KX_PYMETHOD_DOC(BL_ActionActuator,SetBlendin);
+ KX_PYMETHOD_DOC(BL_ActionActuator,SetPriority);
+ KX_PYMETHOD_DOC(BL_ActionActuator,SetStart);
+ KX_PYMETHOD_DOC(BL_ActionActuator,SetEnd);
+ KX_PYMETHOD_DOC(BL_ActionActuator,SetFrame);
+ KX_PYMETHOD_DOC(BL_ActionActuator,SetProperty);
+ KX_PYMETHOD_DOC(BL_ActionActuator,SetFrameProperty);
+ KX_PYMETHOD_DOC(BL_ActionActuator,SetBlendtime);
+
+ KX_PYMETHOD_DOC(BL_ActionActuator,GetAction);
+ KX_PYMETHOD_DOC(BL_ActionActuator,GetBlendin);
+ KX_PYMETHOD_DOC(BL_ActionActuator,GetPriority);
+ KX_PYMETHOD_DOC(BL_ActionActuator,GetStart);
+ KX_PYMETHOD_DOC(BL_ActionActuator,GetEnd);
+ KX_PYMETHOD_DOC(BL_ActionActuator,GetFrame);
+ KX_PYMETHOD_DOC(BL_ActionActuator,GetProperty);
+ KX_PYMETHOD_DOC(BL_ActionActuator,GetFrameProperty);
KX_PYMETHOD_O(BL_ActionActuator,GetChannel);
+ KX_PYMETHOD_DOC(BL_ActionActuator,GetType);
+ KX_PYMETHOD_DOC(BL_ActionActuator,SetType);
+ KX_PYMETHOD_NOARGS(BL_ActionActuator,GetContinue);
+ KX_PYMETHOD_O(BL_ActionActuator,SetContinue);
+ //<-----
+
KX_PYMETHOD_DOC(BL_ActionActuator,setChannel);
static PyObject* pyattr_get_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp
index cfd90813a16..f8a9b1b637f 100644
--- a/source/gameengine/Converter/BL_ArmatureObject.cpp
+++ b/source/gameengine/Converter/BL_ArmatureObject.cpp
@@ -54,8 +54,8 @@ BL_ArmatureObject::BL_ArmatureObject(
: KX_GameObject(sgReplicationInfo,callbacks),
m_objArma(armature),
- m_framePose(NULL),
m_scene(scene), // maybe remove later. needed for where_is_pose
+ m_framePose(NULL),
m_lastframe(0.0),
m_activeAct(NULL),
m_activePriority(999),
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 230820719aa..3d38759d951 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -1377,9 +1377,7 @@ void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj,
bool isCompoundChild = false;
bool hasCompoundChildren = !parent && (blenderobject->gameflag & OB_CHILD);
- /* When the parent is not OB_DYNAMIC and has no OB_COLLISION then it gets no bullet controller
- * and cant be apart of the parents compound shape */
- if (parent && (parent->gameflag & (OB_DYNAMIC | OB_COLLISION))) {
+ if (parent/* && (parent->gameflag & OB_DYNAMIC)*/) {
if ((parent->gameflag & OB_CHILD) != 0 && (blenderobject->gameflag & OB_CHILD))
{
@@ -2406,11 +2404,8 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
obj->Release();
}
childrenlist->Release();
-
// now destroy recursively
- converter->UnregisterGameObject(childobj); // removing objects during conversion make sure this runs too
kxscene->RemoveObject(childobj);
-
continue;
}
@@ -2487,10 +2482,10 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
}
}
if (occlusion)
- kxscene->SetDbvtOcclusionRes(blenderscene->gm.occlusionRes);
+ kxscene->SetDbvtOcclusionRes(blenderscene->world->occlusionRes);
}
if (blenderscene->world)
- kxscene->GetPhysicsEnvironment()->setNumTimeSubSteps(blenderscene->gm.physubstep);
+ kxscene->GetPhysicsEnvironment()->setNumTimeSubSteps(blenderscene->world->physubstep);
// now that the scenegraph is complete, let's instantiate the deformers.
// We need that to create reusable derived mesh and physic shapes
diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
index 81ce9ff6154..4af9a6c83a9 100644
--- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
@@ -40,7 +40,6 @@
#include "STR_HashedString.h"
#include "DNA_nla_types.h"
#include "DNA_action_types.h"
-#include "DNA_anim_types.h"
#include "DNA_scene_types.h"
#include "BKE_action.h"
#include "DNA_armature_types.h"
@@ -52,10 +51,6 @@
#include "FloatValue.h"
#include "PyObjectPlus.h"
-extern "C" {
- #include "BKE_animsys.h"
-}
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -375,11 +370,8 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
m_blendstart = curtime;
}
// only interested in shape channel
-
- // in 2.4x was // extract_ipochannels_from_action(&tchanbase, &key->id, m_action, "Shape", m_localtime);
- BKE_animsys_evaluate_animdata(&key->id, key->adt, m_localtime, ADT_RECALC_ANIM);
-
- // XXX - in 2.5 theres no way to do this. possibly not that important to support - Campbell
+ // XXX extract_ipochannels_from_action(&tchanbase, &key->id, m_action, "Shape", m_localtime);
+
if (0) { // XXX !execute_ipochannels(&tchanbase)) {
// no update, this is possible if action does not match the keys, stop the action
keepgoing = false;
@@ -442,6 +434,26 @@ PyTypeObject BL_ShapeActionActuator::Type = {
PyMethodDef BL_ShapeActionActuator::Methods[] = {
+ {"setAction", (PyCFunction) BL_ShapeActionActuator::sPySetAction, METH_VARARGS, (const char *)SetAction_doc},
+ {"setStart", (PyCFunction) BL_ShapeActionActuator::sPySetStart, METH_VARARGS, (const char *)SetStart_doc},
+ {"setEnd", (PyCFunction) BL_ShapeActionActuator::sPySetEnd, METH_VARARGS, (const char *)SetEnd_doc},
+ {"setBlendin", (PyCFunction) BL_ShapeActionActuator::sPySetBlendin, METH_VARARGS, (const char *)SetBlendin_doc},
+ {"setPriority", (PyCFunction) BL_ShapeActionActuator::sPySetPriority, METH_VARARGS, (const char *)SetPriority_doc},
+ {"setFrame", (PyCFunction) BL_ShapeActionActuator::sPySetFrame, METH_VARARGS, (const char *)SetFrame_doc},
+ {"setProperty", (PyCFunction) BL_ShapeActionActuator::sPySetProperty, METH_VARARGS, (const char *)SetProperty_doc},
+ {"setFrameProperty", (PyCFunction) BL_ShapeActionActuator::sPySetFrameProperty, METH_VARARGS, (const char *)SetFrameProperty_doc},
+ {"setBlendtime", (PyCFunction) BL_ShapeActionActuator::sPySetBlendtime, METH_VARARGS, (const char *)SetBlendtime_doc},
+
+ {"getAction", (PyCFunction) BL_ShapeActionActuator::sPyGetAction, METH_NOARGS, (const char *)GetAction_doc},
+ {"getStart", (PyCFunction) BL_ShapeActionActuator::sPyGetStart, METH_NOARGS, (const char *)GetStart_doc},
+ {"getEnd", (PyCFunction) BL_ShapeActionActuator::sPyGetEnd, METH_NOARGS, (const char *)GetEnd_doc},
+ {"getBlendin", (PyCFunction) BL_ShapeActionActuator::sPyGetBlendin, METH_NOARGS, (const char *)GetBlendin_doc},
+ {"getPriority", (PyCFunction) BL_ShapeActionActuator::sPyGetPriority, METH_NOARGS, (const char *)GetPriority_doc},
+ {"getFrame", (PyCFunction) BL_ShapeActionActuator::sPyGetFrame, METH_NOARGS, (const char *)GetFrame_doc},
+ {"getProperty", (PyCFunction) BL_ShapeActionActuator::sPyGetProperty, METH_NOARGS, (const char *)GetProperty_doc},
+ {"getFrameProperty", (PyCFunction) BL_ShapeActionActuator::sPyGetFrameProperty, METH_NOARGS, (const char *)GetFrameProperty_doc},
+ {"getType", (PyCFunction) BL_ShapeActionActuator::sPyGetType, METH_NOARGS, (const char *)GetType_doc},
+ {"setType", (PyCFunction) BL_ShapeActionActuator::sPySetType, METH_NOARGS, (const char *)SetType_doc},
{NULL,NULL} //Sentinel
};
@@ -459,6 +471,370 @@ PyAttributeDef BL_ShapeActionActuator::Attributes[] = {
{ NULL } //Sentinel
};
+/* setStart */
+const char BL_ShapeActionActuator::GetAction_doc[] =
+"getAction()\n"
+"\tReturns a string containing the name of the current action.\n";
+
+PyObject* BL_ShapeActionActuator::PyGetAction() {
+ ShowDeprecationWarning("getAction()", "the action property");
+ if (m_action){
+ return PyUnicode_FromString(m_action->id.name+2);
+ }
+ Py_RETURN_NONE;
+}
+
+/* getProperty */
+const char BL_ShapeActionActuator::GetProperty_doc[] =
+"getProperty()\n"
+"\tReturns the name of the property to be used in FromProp mode.\n";
+
+PyObject* BL_ShapeActionActuator::PyGetProperty() {
+ ShowDeprecationWarning("getProperty()", "the property property");
+ PyObject *result;
+
+ result = Py_BuildValue("s", (const char *)m_propname);
+
+ return result;
+}
+
+/* getFrame */
+const char BL_ShapeActionActuator::GetFrame_doc[] =
+"getFrame()\n"
+"\tReturns the current frame number.\n";
+
+PyObject* BL_ShapeActionActuator::PyGetFrame() {
+ ShowDeprecationWarning("getFrame()", "the frame property");
+ PyObject *result;
+
+ result = Py_BuildValue("f", m_localtime);
+
+ return result;
+}
+
+/* getEnd */
+const char BL_ShapeActionActuator::GetEnd_doc[] =
+"getEnd()\n"
+"\tReturns the last frame of the action.\n";
+
+PyObject* BL_ShapeActionActuator::PyGetEnd() {
+ ShowDeprecationWarning("getEnd()", "the end property");
+ PyObject *result;
+
+ result = Py_BuildValue("f", m_endframe);
+
+ return result;
+}
+
+/* getStart */
+const char BL_ShapeActionActuator::GetStart_doc[] =
+"getStart()\n"
+"\tReturns the starting frame of the action.\n";
+
+PyObject* BL_ShapeActionActuator::PyGetStart() {
+ ShowDeprecationWarning("getStart()", "the start property");
+ PyObject *result;
+
+ result = Py_BuildValue("f", m_startframe);
+
+ return result;
+}
+
+/* getBlendin */
+const char BL_ShapeActionActuator::GetBlendin_doc[] =
+"getBlendin()\n"
+"\tReturns the number of interpolation animation frames to be\n"
+"\tgenerated when this actuator is triggered.\n";
+
+PyObject* BL_ShapeActionActuator::PyGetBlendin() {
+ ShowDeprecationWarning("getBlendin()", "the blendin property");
+ PyObject *result;
+
+ result = Py_BuildValue("f", m_blendin);
+
+ return result;
+}
+
+/* getPriority */
+const char BL_ShapeActionActuator::GetPriority_doc[] =
+"getPriority()\n"
+"\tReturns the priority for this actuator. Actuators with lower\n"
+"\tPriority numbers will override actuators with higher numbers.\n";
+
+PyObject* BL_ShapeActionActuator::PyGetPriority() {
+ ShowDeprecationWarning("getPriority()", "the priority property");
+ PyObject *result;
+
+ result = Py_BuildValue("i", m_priority);
+
+ return result;
+}
+
+/* setAction */
+const char BL_ShapeActionActuator::SetAction_doc[] =
+"setAction(action, (reset))\n"
+"\t - action : The name of the action to set as the current action.\n"
+"\t Should be an action with Shape channels.\n"
+"\t - reset : Optional parameter indicating whether to reset the\n"
+"\t blend timer or not. A value of 1 indicates that the\n"
+"\t timer should be reset. A value of 0 will leave it\n"
+"\t unchanged. If reset is not specified, the timer will"
+"\t be reset.\n";
+
+PyObject* BL_ShapeActionActuator::PySetAction(PyObject* args) {
+ ShowDeprecationWarning("setAction()", "the action property");
+ char *string;
+ int reset = 1;
+
+ if (PyArg_ParseTuple(args,"s|i:setAction",&string, &reset))
+ {
+ bAction *action;
+
+ action = (bAction*)SCA_ILogicBrick::m_sCurrentLogicManager->GetActionByName(STR_String(string));
+
+ if (!action){
+ /* NOTE! Throw an exception or something */
+ // printf ("setAction failed: Action not found\n", string);
+ }
+ else{
+ m_action=action;
+ if (reset)
+ m_blendframe = 0.f;
+ }
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* setStart */
+const char BL_ShapeActionActuator::SetStart_doc[] =
+"setStart(start)\n"
+"\t - start : Specifies the starting frame of the animation.\n";
+
+PyObject* BL_ShapeActionActuator::PySetStart(PyObject* args) {
+ ShowDeprecationWarning("setStart()", "the start property");
+ float start;
+
+ if (PyArg_ParseTuple(args,"f:setStart",&start))
+ {
+ m_startframe = start;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* setEnd */
+const char BL_ShapeActionActuator::SetEnd_doc[] =
+"setEnd(end)\n"
+"\t - end : Specifies the ending frame of the animation.\n";
+
+PyObject* BL_ShapeActionActuator::PySetEnd(PyObject* args) {
+ ShowDeprecationWarning("setEnd()", "the end property");
+ float end;
+
+ if (PyArg_ParseTuple(args,"f:setEnd",&end))
+ {
+ m_endframe = end;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* setBlendin */
+const char BL_ShapeActionActuator::SetBlendin_doc[] =
+"setBlendin(blendin)\n"
+"\t - blendin : Specifies the number of frames of animation to generate\n"
+"\t when making transitions between actions.\n";
+
+PyObject* BL_ShapeActionActuator::PySetBlendin(PyObject* args) {
+ ShowDeprecationWarning("setBlendin()", "the blendin property");
+ float blendin;
+
+ if (PyArg_ParseTuple(args,"f:setBlendin",&blendin))
+ {
+ m_blendin = blendin;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* setBlendtime */
+const char BL_ShapeActionActuator::SetBlendtime_doc[] =
+"setBlendtime(blendtime)\n"
+"\t - blendtime : Allows the script to directly modify the internal timer\n"
+"\t used when generating transitions between actions. This\n"
+"\t parameter must be in the range from 0.0 to 1.0.\n";
+
+PyObject* BL_ShapeActionActuator::PySetBlendtime(PyObject* args) {
+ ShowDeprecationWarning("setBlendtime()", "the blendTime property");
+ float blendframe;
+
+ if (PyArg_ParseTuple(args,"f:setBlendtime",&blendframe))
+ {
+ m_blendframe = blendframe * m_blendin;
+ if (m_blendframe<0.f)
+ m_blendframe = 0.f;
+ if (m_blendframe>m_blendin)
+ m_blendframe = m_blendin;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* setPriority */
+const char BL_ShapeActionActuator::SetPriority_doc[] =
+"setPriority(priority)\n"
+"\t - priority : Specifies the new priority. Actuators will lower\n"
+"\t priority numbers will override actuators with higher\n"
+"\t numbers.\n";
+
+PyObject* BL_ShapeActionActuator::PySetPriority(PyObject* args) {
+ ShowDeprecationWarning("setPriority()", "the priority property");
+ int priority;
+
+ if (PyArg_ParseTuple(args,"i:setPriority",&priority))
+ {
+ m_priority = priority;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* getProperty */
+const char BL_ShapeActionActuator::GetFrameProperty_doc[] =
+"getFrameProperty()\n"
+"\tReturns the name of the property, that is set to the current frame number.\n";
+
+PyObject* BL_ShapeActionActuator::PyGetFrameProperty() {
+ ShowDeprecationWarning("getFrameProperty()", "the frameProperty property");
+ PyObject *result;
+
+ result = Py_BuildValue("s", (const char *)m_framepropname);
+
+ return result;
+}
+
+
+/* setFrame */
+const char BL_ShapeActionActuator::SetFrame_doc[] =
+"setFrame(frame)\n"
+"\t - frame : Specifies the new current frame for the animation\n";
+
+PyObject* BL_ShapeActionActuator::PySetFrame(PyObject* args) {
+ ShowDeprecationWarning("setFrame()", "the frame property");
+ float frame;
+
+ if (PyArg_ParseTuple(args,"f:setFrame",&frame))
+ {
+ m_localtime = frame;
+ if (m_localtime<m_startframe)
+ m_localtime=m_startframe;
+ else if (m_localtime>m_endframe)
+ m_localtime=m_endframe;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* setProperty */
+const char BL_ShapeActionActuator::SetProperty_doc[] =
+"setProperty(prop)\n"
+"\t - prop : A string specifying the property name to be used in\n"
+"\t FromProp playback mode.\n";
+
+PyObject* BL_ShapeActionActuator::PySetProperty(PyObject* args) {
+ ShowDeprecationWarning("setProperty()", "the property property");
+ char *string;
+
+ if (PyArg_ParseTuple(args,"s:setProperty",&string))
+ {
+ m_propname = string;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* setFrameProperty */
+const char BL_ShapeActionActuator::SetFrameProperty_doc[] =
+"setFrameProperty(prop)\n"
+"\t - prop : A string specifying the property of the frame set up update.\n";
+
+PyObject* BL_ShapeActionActuator::PySetFrameProperty(PyObject* args) {
+ ShowDeprecationWarning("setFrameProperty()", "the frameProperty property");
+ char *string;
+
+ if (PyArg_ParseTuple(args,"s:setFrameProperty",&string))
+ {
+ m_framepropname = string;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* getType */
+const char BL_ShapeActionActuator::GetType_doc[] =
+"getType()\n"
+"\tReturns the operation mode of the actuator.\n";
+PyObject* BL_ShapeActionActuator::PyGetType() {
+ ShowDeprecationWarning("getType()", "the type property");
+ return Py_BuildValue("h", m_playtype);
+}
+
+/* setType */
+const char BL_ShapeActionActuator::SetType_doc[] =
+"setType(mode)\n"
+"\t - mode: Play (0), Flipper (2), LoopStop (3), LoopEnd (4) or Property (6)\n"
+"\tSet the operation mode of the actuator.\n";
+PyObject* BL_ShapeActionActuator::PySetType(PyObject* args) {
+ ShowDeprecationWarning("setType()", "the type property");
+ short typeArg;
+
+ if (!PyArg_ParseTuple(args, "h:setType", &typeArg)) {
+ return NULL;
+ }
+
+ switch (typeArg) {
+ case ACT_ACTION_PLAY:
+ case ACT_ACTION_FLIPPER:
+ case ACT_ACTION_LOOP_STOP:
+ case ACT_ACTION_LOOP_END:
+ case ACT_ACTION_FROM_PROP:
+ m_playtype = typeArg;
+ break;
+ default:
+ printf("Invalid type for action actuator: %d\n", typeArg); /* error */
+ }
+
+ Py_RETURN_NONE;
+}
+
PyObject* BL_ShapeActionActuator::pyattr_get_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
BL_ShapeActionActuator* self= static_cast<BL_ShapeActionActuator*>(self_v);
diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.h b/source/gameengine/Converter/BL_ShapeActionActuator.h
index 28a6d90abdf..890fe3f9de9 100644
--- a/source/gameengine/Converter/BL_ShapeActionActuator.h
+++ b/source/gameengine/Converter/BL_ShapeActionActuator.h
@@ -82,6 +82,29 @@ public:
bAction* GetAction() { return m_action; }
void SetAction(bAction* act) { m_action= act; }
+ KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetAction);
+ KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetBlendin);
+ KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetPriority);
+ KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetStart);
+ KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetEnd);
+ KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetFrame);
+ KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetProperty);
+ KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetFrameProperty);
+ KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetBlendtime);
+ KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetChannel);
+
+ KX_PYMETHOD_DOC_NOARGS(BL_ShapeActionActuator,GetAction);
+ KX_PYMETHOD_DOC_NOARGS(BL_ShapeActionActuator,GetBlendin);
+ KX_PYMETHOD_DOC_NOARGS(BL_ShapeActionActuator,GetPriority);
+ KX_PYMETHOD_DOC_NOARGS(BL_ShapeActionActuator,GetStart);
+ KX_PYMETHOD_DOC_NOARGS(BL_ShapeActionActuator,GetEnd);
+ KX_PYMETHOD_DOC_NOARGS(BL_ShapeActionActuator,GetFrame);
+ KX_PYMETHOD_DOC_NOARGS(BL_ShapeActionActuator,GetProperty);
+ KX_PYMETHOD_DOC_NOARGS(BL_ShapeActionActuator,GetFrameProperty);
+// KX_PYMETHOD(BL_ActionActuator,GetChannel);
+ KX_PYMETHOD_DOC_NOARGS(BL_ShapeActionActuator,GetType);
+ KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetType);
+
static PyObject* pyattr_get_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_action(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
diff --git a/source/gameengine/Converter/BL_ShapeDeformer.cpp b/source/gameengine/Converter/BL_ShapeDeformer.cpp
index 20ca7f07f2b..d39917b0e5c 100644
--- a/source/gameengine/Converter/BL_ShapeDeformer.cpp
+++ b/source/gameengine/Converter/BL_ShapeDeformer.cpp
@@ -109,8 +109,8 @@ bool BL_ShapeDeformer::ExecuteShapeDrivers(void)
{
if (!m_shapeDrivers.empty() && PoseUpdated()) {
vector<IpoCurve*>::iterator it;
-// void *poin;
-// int type;
+ void *poin;
+ int type;
// the shape drivers use the bone matrix as input. Must
// update the matrix now
diff --git a/source/gameengine/Converter/CMakeLists.txt b/source/gameengine/Converter/CMakeLists.txt
index 257ca856b2c..6732a62a5cb 100644
--- a/source/gameengine/Converter/CMakeLists.txt
+++ b/source/gameengine/Converter/CMakeLists.txt
@@ -27,40 +27,44 @@
FILE(GLOB SRC *.cpp)
SET(INC
- .
- ../../../source/kernel/gen_system
- ../../../intern/string
- ../../../intern/guardedalloc
- ../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
- ../../../intern/audaspace/intern
- ../../../source/gameengine/Converter
- ../../../source/gameengine/BlenderRoutines
- ../../../source/blender/imbuf
- ../../../intern/moto/include
- ../../../source/gameengine/Ketsji
- ../../../source/gameengine/Ketsji/KXNetwork
- ../../../source/blender/blenlib
- ../../../source/blender/blenkernel
- ../../../source/blender/windowmanager
- ../../../source/blender
- ../../../source/blender/include
- ../../../source/blender/makesdna
- ../../../source/blender/makesrna
- ../../../source/gameengine/Rasterizer
- ../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
- ../../../source/gameengine/GameLogic
- ../../../source/gameengine/Expressions
- ../../../source/gameengine/Network
- ../../../source/gameengine/SceneGraph
- ../../../source/gameengine/Physics/common
- ../../../source/gameengine/Physics/Bullet
- ../../../source/gameengine/Physics/Dummy
- ../../../source/gameengine/Network/LoopBackNetwork
- ../../../source/blender/misc
- ../../../source/blender/blenloader
- ../../../source/blender/gpu
- ../../../extern/bullet2/src
- ${PYTHON_INC}
+ .
+ ../../../source/kernel/gen_system
+ ../../../intern/string
+ ../../../intern/guardedalloc
+ ../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
+ ../../../intern/audaspace/intern
+ ../../../source/gameengine/Converter
+ ../../../source/gameengine/BlenderRoutines
+ ../../../source/blender/imbuf
+ ../../../intern/moto/include
+ ../../../source/gameengine/Ketsji
+ ../../../source/gameengine/Ketsji/KXNetwork
+ ../../../source/blender/blenlib
+ ../../../source/blender/blenkernel
+ ../../../source/blender/windowmanager
+ ../../../source/blender
+ ../../../source/blender/include
+ ../../../source/blender/makesdna
+ ../../../source/blender/makesrna
+ ../../../source/gameengine/Rasterizer
+ ../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
+ ../../../source/gameengine/GameLogic
+ ../../../source/gameengine/Expressions
+ ../../../source/gameengine/Network
+ ../../../source/gameengine/SceneGraph
+ ../../../source/gameengine/Physics/common
+ ../../../source/gameengine/Physics/Bullet
+ ../../../source/gameengine/Physics/BlOde
+ ../../../source/gameengine/Physics/Dummy
+ ../../../source/gameengine/Physics/Sumo
+ ../../../source/gameengine/Physics/Sumo/Fuzzics/include
+ ../../../source/gameengine/Network/LoopBackNetwork
+ ../../../source/blender/misc
+ ../../../source/blender/blenloader
+ ../../../source/blender/gpu
+ ../../../extern/bullet2/src
+ ../../../extern/solid
+ ${PYTHON_INC}
)
BLENDERLIB(bf_converter "${SRC}" "${INC}")
diff --git a/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp b/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp
index 24910422176..c3264a2bc37 100644
--- a/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp
+++ b/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp
@@ -62,7 +62,7 @@ BL_InterpolatorList::~BL_InterpolatorList() {
}
}
-KX_IScalarInterpolator *BL_InterpolatorList::GetScalarInterpolator(const char *rna_path, int array_index) {
+KX_IScalarInterpolator *BL_InterpolatorList::GetScalarInterpolator(char *rna_path, int array_index) {
for(BL_InterpolatorList::iterator i = begin(); (i != end()) ; i++ )
{
FCurve *fcu= (static_cast<BL_ScalarInterpolator *>(*i))->GetFCurve();
diff --git a/source/gameengine/Converter/KX_BlenderScalarInterpolator.h b/source/gameengine/Converter/KX_BlenderScalarInterpolator.h
index e7fbb8083e4..eb15cee8ff9 100644
--- a/source/gameengine/Converter/KX_BlenderScalarInterpolator.h
+++ b/source/gameengine/Converter/KX_BlenderScalarInterpolator.h
@@ -64,7 +64,7 @@ public:
BL_InterpolatorList(struct AnimData *adt);
~BL_InterpolatorList();
- KX_IScalarInterpolator *GetScalarInterpolator(const char *rna_path, int array_index);
+ KX_IScalarInterpolator *GetScalarInterpolator(char *rna_path, int array_index);
#ifdef WITH_CXX_GUARDEDALLOC
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
index 151564391f3..ebabaa55e21 100644
--- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
+++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
@@ -462,11 +462,10 @@ void KX_BlenderSceneConverter::RegisterGameObject(
m_map_blender_to_gameobject.insert(CHashedPtr(for_blenderobject),gameobject);
}
-/* only need to run this during conversion since
- * m_map_blender_to_gameobject is freed after conversion */
void KX_BlenderSceneConverter::UnregisterGameObject(
KX_GameObject *gameobject)
{
+#if 0
struct Object *bobp= gameobject->GetBlenderObject();
if (bobp) {
CHashedPtr bptr(bobp);
@@ -478,6 +477,7 @@ void KX_BlenderSceneConverter::UnregisterGameObject(
m_map_blender_to_gameobject.remove(bptr);
}
}
+#endif
}
KX_GameObject *KX_BlenderSceneConverter::FindGameObject(
@@ -795,7 +795,6 @@ void KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo(int frameNumber)
Object* blenderObject = gameObj->GetBlenderObject();
if (blenderObject && blenderObject->ipo)
{
-#if 0
const MT_Point3& position = gameObj->NodeGetWorldPosition();
//const MT_Vector3& scale = gameObj->NodeGetWorldScaling();
const MT_Matrix3x3& orn = gameObj->NodeGetWorldOrientation();
@@ -805,6 +804,7 @@ void KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo(int frameNumber)
float tmat[3][3];
// XXX animato
+#if 0
Ipo* ipo = blenderObject->ipo;
//create the curves, if not existing, set linear if new
diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp
index 91a39bd7686..07f6f628e06 100644
--- a/source/gameengine/Converter/KX_ConvertActuators.cpp
+++ b/source/gameengine/Converter/KX_ConvertActuators.cpp
@@ -396,7 +396,7 @@ void BL_ConvertActuators(char* maggiename,
"\" has no sound datablock." << std::endl;
}
else
- snd_sound = sound->cache ? sound->cache : sound->handle;
+ snd_sound = sound->cache ? sound->cache : sound->snd_sound;
KX_SoundActuator* tmpsoundact =
new KX_SoundActuator(gameobj,
snd_sound,
diff --git a/source/gameengine/Converter/KX_ConvertProperties.cpp b/source/gameengine/Converter/KX_ConvertProperties.cpp
index 1c22d2a0600..5e8d6f3cbf0 100644
--- a/source/gameengine/Converter/KX_ConvertProperties.cpp
+++ b/source/gameengine/Converter/KX_ConvertProperties.cpp
@@ -32,26 +32,26 @@
#include <config.h>
#endif
+/* This little block needed for linking to Blender... */
+#ifdef WIN32
+#include "BLI_winstuff.h"
+#endif
#include "DNA_object_types.h"
#include "DNA_property_types.h"
/* end of blender include block */
-
#include "Value.h"
#include "VectorValue.h"
#include "BoolValue.h"
#include "StringValue.h"
#include "FloatValue.h"
#include "KX_GameObject.h"
+//#include "ListValue.h"
#include "IntValue.h"
#include "SCA_TimeEventManager.h"
#include "SCA_IScene.h"
-/* This little block needed for linking to Blender... */
-#ifdef WIN32
-#include "BLI_winstuff.h"
-#endif
void BL_ConvertProperties(Object* object,KX_GameObject* gameobj,SCA_TimeEventManager* timemgr,SCA_IScene* scene, bool isInActiveLayer)
{
diff --git a/source/gameengine/Converter/KX_ConvertSensors.cpp b/source/gameengine/Converter/KX_ConvertSensors.cpp
index 09027f18844..eb77e087de5 100644
--- a/source/gameengine/Converter/KX_ConvertSensors.cpp
+++ b/source/gameengine/Converter/KX_ConvertSensors.cpp
@@ -536,7 +536,6 @@ void BL_ConvertSensors(struct Object* blenderobject,
starty,
keytype,
trackfocus,
- (bmouse->flag & SENS_MOUSE_FOCUS_PULSE) ? true:false,
kxscene,
kxengine,
gameobj);
diff --git a/source/gameengine/Converter/KX_IpoConvert.cpp b/source/gameengine/Converter/KX_IpoConvert.cpp
index 848fcfcdaa0..d3a2e1a9ba4 100644
--- a/source/gameengine/Converter/KX_IpoConvert.cpp
+++ b/source/gameengine/Converter/KX_IpoConvert.cpp
@@ -175,7 +175,7 @@ void BL_ConvertIpos(struct Object* blenderobject,KX_GameObject* gameobj,KX_Blend
KX_ObColorIpoSGController* ipocontr_obcol=NULL;
for(int i=0; i<4; i++) {
- if ((interp = adtList->GetScalarInterpolator("color", i))) {
+ if (interp = adtList->GetScalarInterpolator("color", i)) {
if (!ipocontr_obcol) {
ipocontr_obcol = new KX_ObColorIpoSGController();
gameobj->GetSGNode()->AddSGController(ipocontr_obcol);
diff --git a/source/gameengine/Converter/SConscript b/source/gameengine/Converter/SConscript
index 2d126310475..7d3185605d5 100644
--- a/source/gameengine/Converter/SConscript
+++ b/source/gameengine/Converter/SConscript
@@ -23,4 +23,4 @@ incs += ' #source/blender/makesrna'
incs += ' ' + env['BF_PYTHON_INC']
incs += ' ' + env['BF_BULLET_INC']
-env.BlenderLib ( 'bf_converter', sources, Split(incs), defs, libtype=['core','player'], priority=[305,40], cxx_compileflags=env['BGE_CXXFLAGS'])
+env.BlenderLib ( 'bf_converter', sources, Split(incs), defs, libtype=['core','player'], priority=[305,50] )
diff --git a/source/gameengine/Expressions/CMakeLists.txt b/source/gameengine/Expressions/CMakeLists.txt
index 439a50852a7..dffd13f64ff 100644
--- a/source/gameengine/Expressions/CMakeLists.txt
+++ b/source/gameengine/Expressions/CMakeLists.txt
@@ -27,13 +27,13 @@
FILE(GLOB SRC *.cpp)
SET(INC
- .
- ../../../source/kernel/gen_system
- ../../../intern/string
- ../../../intern/moto/include
- ../../../source/gameengine/SceneGraph
- ../../../source/blender/blenloader
- ${PYTHON_INC}
+ .
+ ../../../source/kernel/gen_system
+ ../../../intern/string
+ ../../../intern/moto/include
+ ../../../source/gameengine/SceneGraph
+ ../../../source/blender/blenloader
+ ${PYTHON_INC}
)
BLENDERLIB(bf_expressions "${SRC}" "${INC}")
diff --git a/source/gameengine/Expressions/ListValue.cpp b/source/gameengine/Expressions/ListValue.cpp
index 002674450d1..5f45cdc48a2 100644
--- a/source/gameengine/Expressions/ListValue.cpp
+++ b/source/gameengine/Expressions/ListValue.cpp
@@ -300,6 +300,7 @@ PyMethodDef CListValue::Methods[] = {
/* Dict style access */
{"get", (PyCFunction)CListValue::sPyget,METH_VARARGS},
+ {"has_key", (PyCFunction)CListValue::sPyhas_key,METH_O},
/* Own cvalue funcs */
{"from_id", (PyCFunction)CListValue::sPyfrom_id,METH_O},
@@ -593,6 +594,14 @@ PyObject* CListValue::Pyget(PyObject *args)
return def;
}
+/* Matches python dict.has_key() */
+PyObject* CListValue::Pyhas_key(PyObject* value)
+{
+ if (PyUnicode_Check(value) && FindValue((const char *)_PyUnicode_AsString(value)))
+ Py_RETURN_TRUE;
+
+ Py_RETURN_FALSE;
+}
PyObject* CListValue::Pyfrom_id(PyObject* value)
{
diff --git a/source/gameengine/Expressions/ListValue.h b/source/gameengine/Expressions/ListValue.h
index 2dc458e0148..98e6f216f11 100644
--- a/source/gameengine/Expressions/ListValue.h
+++ b/source/gameengine/Expressions/ListValue.h
@@ -74,6 +74,7 @@ public:
KX_PYMETHOD_O(CListValue,index);
KX_PYMETHOD_O(CListValue,count);
KX_PYMETHOD_VARARGS(CListValue,get);
+ KX_PYMETHOD_O(CListValue,has_key);
KX_PYMETHOD_O(CListValue,from_id);
diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp
index 1d1d9e6103b..5be703f0fa4 100644
--- a/source/gameengine/Expressions/PyObjectPlus.cpp
+++ b/source/gameengine/Expressions/PyObjectPlus.cpp
@@ -751,17 +751,16 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
STR_String *var = reinterpret_cast<STR_String*>(ptr);
if (PyUnicode_Check(value))
{
- Py_ssize_t val_len;
- char *val = _PyUnicode_AsStringAndSize(value, &val_len);
+ char *val = _PyUnicode_AsString(value);
if (attrdef->m_clamp)
{
- if (val_len < attrdef->m_imin)
+ if (strlen(val) < attrdef->m_imin)
{
// can't increase the length of the string
PyErr_Format(PyExc_ValueError, "string length too short for attribute \"%s\"", attrdef->m_name);
goto FREE_AND_ERROR;
}
- else if (val_len > attrdef->m_imax)
+ else if (strlen(val) > attrdef->m_imax)
{
// trim the string
char c = val[attrdef->m_imax];
@@ -770,7 +769,7 @@ int PyObjectPlus::py_set_attrdef(PyObject *self_py, PyObject *value, const PyAtt
val[attrdef->m_imax] = c;
break;
}
- } else if (val_len < attrdef->m_imin || val_len > attrdef->m_imax)
+ } else if (strlen(val) < attrdef->m_imin || strlen(val) > attrdef->m_imax)
{
PyErr_Format(PyExc_ValueError, "string length out of range for attribute \"%s\"", attrdef->m_name);
goto FREE_AND_ERROR;
@@ -907,47 +906,45 @@ void PyObjectPlus::SetDeprecationWarnings(bool ignoreDeprecationWarnings)
m_ignore_deprecation_warnings = ignoreDeprecationWarnings;
}
-void PyDebugLine()
+void PyObjectPlus::ShowDeprecationWarning_func(const char* old_way,const char* new_way)
{
- // import sys; print '\t%s:%d' % (sys._getframe(0).f_code.co_filename, sys._getframe(0).f_lineno)
-
- PyObject *getframe, *frame;
- PyObject *f_lineno, *f_code, *co_filename;
-
- getframe = PySys_GetObject((char *)"_getframe"); // borrowed
- if (getframe) {
- frame = PyObject_CallObject(getframe, NULL);
- if (frame) {
- f_lineno= PyObject_GetAttrString(frame, "f_lineno");
- f_code= PyObject_GetAttrString(frame, "f_code");
- if (f_lineno && f_code) {
- co_filename= PyObject_GetAttrString(f_code, "co_filename");
- if (co_filename) {
-
- printf("\t%s:%d\n", _PyUnicode_AsString(co_filename), (int)PyLong_AsSsize_t(f_lineno));
-
- Py_DECREF(f_lineno);
- Py_DECREF(f_code);
- Py_DECREF(co_filename);
- Py_DECREF(frame);
- return;
+ {
+ printf("Method %s is deprecated, please use %s instead.\n", old_way, new_way);
+
+ // import sys; print '\t%s:%d' % (sys._getframe(0).f_code.co_filename, sys._getframe(0).f_lineno)
+
+ PyObject *getframe, *frame;
+ PyObject *f_lineno, *f_code, *co_filename;
+
+ getframe = PySys_GetObject((char *)"_getframe"); // borrowed
+ if (getframe) {
+ frame = PyObject_CallObject(getframe, NULL);
+ if (frame) {
+ f_lineno= PyObject_GetAttrString(frame, "f_lineno");
+ f_code= PyObject_GetAttrString(frame, "f_code");
+ if (f_lineno && f_code) {
+ co_filename= PyObject_GetAttrString(f_code, "co_filename");
+ if (co_filename) {
+
+ printf("\t%s:%d\n", _PyUnicode_AsString(co_filename), (int)PyLong_AsSsize_t(f_lineno));
+
+ Py_DECREF(f_lineno);
+ Py_DECREF(f_code);
+ Py_DECREF(co_filename);
+ Py_DECREF(frame);
+ return;
+ }
}
+
+ Py_XDECREF(f_lineno);
+ Py_XDECREF(f_code);
+ Py_DECREF(frame);
}
- Py_XDECREF(f_lineno);
- Py_XDECREF(f_code);
- Py_DECREF(frame);
}
-
+ PyErr_Clear();
+ printf("\tERROR - Could not access sys._getframe(0).f_lineno or sys._getframe().f_code.co_filename\n");
}
- PyErr_Clear();
- printf("\tERROR - Could not access sys._getframe(0).f_lineno or sys._getframe().f_code.co_filename\n");
-}
-
-void PyObjectPlus::ShowDeprecationWarning_func(const char* old_way,const char* new_way)
-{
- printf("Method %s is deprecated, please use %s instead.\n", old_way, new_way);
- PyDebugLine();
}
void PyObjectPlus::ClearDeprecationWarning()
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h
index f9edb7877b0..e9e81dddaaa 100644
--- a/source/gameengine/Expressions/PyObjectPlus.h
+++ b/source/gameengine/Expressions/PyObjectPlus.h
@@ -86,7 +86,7 @@ typedef struct {
-typedef struct PyObjectPlus_Proxy {
+typedef struct {
PyObject_HEAD /* required python macro */
class PyObjectPlus *ref;
bool py_owns;
@@ -99,9 +99,6 @@ typedef struct PyObjectPlus_Proxy {
/* Note, sometimes we dont care what BGE type this is as long as its a proxy */
#define BGE_PROXY_CHECK_TYPE(_type) ((_type)->tp_dealloc == PyObjectPlus::py_base_dealloc)
-/* Opposite of BGE_PROXY_REF */
-#define BGE_PROXY_FROM_REF(_self) (((PyObjectPlus *)_self)->GetProxy())
-
// This must be the first line of each
// PyC++ class
diff --git a/source/gameengine/Expressions/SConscript b/source/gameengine/Expressions/SConscript
index c819bfb0d3e..69f87ffbb90 100644
--- a/source/gameengine/Expressions/SConscript
+++ b/source/gameengine/Expressions/SConscript
@@ -6,4 +6,10 @@ sources = env.Glob('*.cpp')
incs ='. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/SceneGraph #source/blender/blenloader'
incs += ' ' + env['BF_PYTHON_INC']
-env.BlenderLib ( 'bf_expressions', sources, Split(incs), [], libtype=['core','player'], priority = [360,80], cxx_compileflags=env['BGE_CXXFLAGS'])
+cxxflags = []
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ cxxflags.append ('/GR')
+ cxxflags.append ('/O2')
+ cxxflags.append ('/EHsc')
+
+env.BlenderLib ( 'bf_expressions', sources, Split(incs), [], libtype=['core','player'], priority = [360,120], cxx_compileflags=cxxflags)
diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp
index 130317d77e2..04bcc3a5561 100644
--- a/source/gameengine/Expressions/Value.cpp
+++ b/source/gameengine/Expressions/Value.cpp
@@ -62,9 +62,17 @@ PyTypeObject CValue::Type = {
};
PyMethodDef CValue::Methods[] = {
+ { "getName", (PyCFunction) CValue::sPyGetName, METH_NOARGS},
{NULL,NULL} //Sentinel
};
+PyObject* CValue::PyGetName()
+{
+ ShowDeprecationWarning("getName()", "the name property");
+
+ return PyUnicode_FromString(this->GetName());
+}
+
/*#define CVALUE_DEBUG*/
#ifdef CVALUE_DEBUG
int gRefCount;
diff --git a/source/gameengine/Expressions/Value.h b/source/gameengine/Expressions/Value.h
index 7d4adcdb64f..5f08736afde 100644
--- a/source/gameengine/Expressions/Value.h
+++ b/source/gameengine/Expressions/Value.h
@@ -242,6 +242,8 @@ public:
static PyObject * pyattr_get_name(void * self, const KX_PYATTRIBUTE_DEF * attrdef);
virtual PyObject* ConvertKeysToPython( void );
+
+ KX_PYMETHOD_NOARGS(CValue,GetName);
#else
CValue();
diff --git a/source/gameengine/GameLogic/CMakeLists.txt b/source/gameengine/GameLogic/CMakeLists.txt
index 601585f79d6..a1dce49e14b 100644
--- a/source/gameengine/GameLogic/CMakeLists.txt
+++ b/source/gameengine/GameLogic/CMakeLists.txt
@@ -27,20 +27,20 @@
FILE(GLOB SRC *.cpp Joystick/*.cpp)
SET(INC
- .
- ../../../source/kernel/gen_system
- ../../../intern/string
- ../../../source/gameengine/Expressions
- ../../../source/gameengine/SceneGraph
- ../../../intern/moto/include
- ../../../source/gameengine/Rasterizer
- ${PYTHON_INC}
+ .
+ ../../../source/kernel/gen_system
+ ../../../intern/string
+ ../../../source/gameengine/Expressions
+ ../../../source/gameengine/SceneGraph
+ ../../../intern/moto/include
+ ../../../source/gameengine/Rasterizer
+ ${PYTHON_INC}
)
IF(WITH_SDL)
- SET(INC ${INC} ${SDL_INCLUDE_DIR})
+ SET(INC ${INC} ${SDL_INCLUDE_DIR})
ELSE(WITH_SDL)
- ADD_DEFINITIONS(-DDISABLE_SDL)
+ ADD_DEFINITIONS(-DDISABLE_SDL)
ENDIF(WITH_SDL)
BLENDERLIB(bf_logic "${SRC}" "${INC}")
diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
index 428362a0a24..11ea089270a 100644
--- a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
@@ -143,6 +143,10 @@ PyTypeObject SCA_ActuatorSensor::Type = {
};
PyMethodDef SCA_ActuatorSensor::Methods[] = {
+ //Deprecated functions ------>
+ {"getActuator", (PyCFunction) SCA_ActuatorSensor::sPyGetActuator, METH_NOARGS, (const char *)GetActuator_doc},
+ {"setActuator", (PyCFunction) SCA_ActuatorSensor::sPySetActuator, METH_VARARGS, (const char *)SetActuator_doc},
+ //<----- Deprecated
{NULL,NULL} //Sentinel
};
@@ -163,4 +167,41 @@ int SCA_ActuatorSensor::CheckActuator(void *self, const PyAttributeDef*)
return 1;
}
+/* 3. getActuator */
+const char SCA_ActuatorSensor::GetActuator_doc[] =
+"getActuator()\n"
+"\tReturn the Actuator with which the sensor operates.\n";
+PyObject* SCA_ActuatorSensor::PyGetActuator()
+{
+ ShowDeprecationWarning("getActuator()", "the actuator property");
+ return PyUnicode_FromString(m_checkactname);
+}
+
+/* 4. setActuator */
+const char SCA_ActuatorSensor::SetActuator_doc[] =
+"setActuator(name)\n"
+"\t- name: string\n"
+"\tSets the Actuator with which to operate. If there is no Actuator\n"
+"\tof this name, the call is ignored.\n";
+PyObject* SCA_ActuatorSensor::PySetActuator(PyObject* args)
+{
+ ShowDeprecationWarning("setActuator()", "the actuator property");
+ /* We should query whether the name exists. Or should we create a prop */
+ /* on the fly? */
+ char *actNameArg = NULL;
+
+ if (!PyArg_ParseTuple(args, "s:setActuator", &actNameArg)) {
+ return NULL;
+ }
+
+ SCA_IActuator* act = GetParent()->FindActuator(STR_String(actNameArg));
+ if (act) {
+ m_checkactname = actNameArg;
+ m_actuator = act;
+ } else {
+ ; /* error: bad actuator name */
+ }
+ Py_RETURN_NONE;
+}
+
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.h b/source/gameengine/GameLogic/SCA_ActuatorSensor.h
index 1a095148500..cf8e735cad4 100644
--- a/source/gameengine/GameLogic/SCA_ActuatorSensor.h
+++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.h
@@ -59,6 +59,11 @@ public:
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
+
+ /* 3. setProperty */
+ KX_PYMETHOD_DOC_VARARGS(SCA_ActuatorSensor,SetActuator);
+ /* 4. getProperty */
+ KX_PYMETHOD_DOC_NOARGS(SCA_ActuatorSensor,GetActuator);
static int CheckActuator(void *self, const PyAttributeDef*);
};
diff --git a/source/gameengine/GameLogic/SCA_DelaySensor.cpp b/source/gameengine/GameLogic/SCA_DelaySensor.cpp
index 0f67ddd56a5..0d563db910e 100644
--- a/source/gameengine/GameLogic/SCA_DelaySensor.cpp
+++ b/source/gameengine/GameLogic/SCA_DelaySensor.cpp
@@ -152,6 +152,16 @@ PyTypeObject SCA_DelaySensor::Type = {
};
PyMethodDef SCA_DelaySensor::Methods[] = {
+ //Deprecated functions ------>
+ /* setProperty */
+ {"setDelay", (PyCFunction) SCA_DelaySensor::sPySetDelay, METH_VARARGS, (const char *)SetDelay_doc},
+ {"setDuration", (PyCFunction) SCA_DelaySensor::sPySetDuration, METH_VARARGS, (const char *)SetDuration_doc},
+ {"setRepeat", (PyCFunction) SCA_DelaySensor::sPySetRepeat, METH_VARARGS, (const char *)SetRepeat_doc},
+ /* getProperty */
+ {"getDelay", (PyCFunction) SCA_DelaySensor::sPyGetDelay, METH_NOARGS, (const char *)GetDelay_doc},
+ {"getDuration", (PyCFunction) SCA_DelaySensor::sPyGetDuration, METH_NOARGS, (const char *)GetDuration_doc},
+ {"getRepeat", (PyCFunction) SCA_DelaySensor::sPyGetRepeat, METH_NOARGS, (const char *)GetRepeat_doc},
+ //<----- Deprecated
{NULL,NULL} //Sentinel
};
@@ -162,4 +172,91 @@ PyAttributeDef SCA_DelaySensor::Attributes[] = {
{ NULL } //Sentinel
};
+const char SCA_DelaySensor::SetDelay_doc[] =
+"setDelay(delay)\n"
+"\t- delay: length of the initial OFF period as number of frame\n"
+"\t 0 for immediate trigger\n"
+"\tSet the initial delay before the positive trigger\n";
+PyObject* SCA_DelaySensor::PySetDelay(PyObject* args)
+{
+ ShowDeprecationWarning("setDelay()", "the delay property");
+ int delay;
+
+ if(!PyArg_ParseTuple(args, "i:setDelay", &delay)) {
+ return NULL;
+ }
+ if (delay < 0) {
+ PyErr_SetString(PyExc_ValueError, "Delay cannot be negative");
+ return NULL;
+ }
+ m_delay = delay;
+ Py_RETURN_NONE;
+}
+
+const char SCA_DelaySensor::SetDuration_doc[] =
+"setDuration(duration)\n"
+"\t- duration: length of the ON period in number of frame after the initial off period\n"
+"\t 0 for no ON period\n"
+"\tSet the duration of the ON pulse after initial delay.\n"
+"\tIf > 0, a negative trigger is fired at the end of the ON pulse.\n";
+PyObject* SCA_DelaySensor::PySetDuration(PyObject* args)
+{
+ ShowDeprecationWarning("setDuration()", "the duration property");
+ int duration;
+
+ if(!PyArg_ParseTuple(args, "i:setDuration", &duration)) {
+ return NULL;
+ }
+ if (duration < 0) {
+ PyErr_SetString(PyExc_ValueError, "Duration cannot be negative");
+ return NULL;
+ }
+ m_duration = duration;
+ Py_RETURN_NONE;
+}
+
+const char SCA_DelaySensor::SetRepeat_doc[] =
+"setRepeat(repeat)\n"
+"\t- repeat: 1 if the initial OFF-ON cycle should be repeated indefinately\n"
+"\t 0 if the initial OFF-ON cycle should run only once\n"
+"\tSet the sensor repeat mode\n";
+PyObject* SCA_DelaySensor::PySetRepeat(PyObject* args)
+{
+ ShowDeprecationWarning("setRepeat()", "the repeat property");
+ int repeat;
+
+ if(!PyArg_ParseTuple(args, "i:setRepeat", &repeat)) {
+ return NULL;
+ }
+ m_repeat = (repeat != 0);
+ Py_RETURN_NONE;
+}
+
+const char SCA_DelaySensor::GetDelay_doc[] =
+"getDelay()\n"
+"\tReturn the delay parameter value\n";
+PyObject* SCA_DelaySensor::PyGetDelay()
+{
+ ShowDeprecationWarning("getDelay()", "the delay property");
+ return PyLong_FromSsize_t(m_delay);
+}
+
+const char SCA_DelaySensor::GetDuration_doc[] =
+"getDuration()\n"
+"\tReturn the duration parameter value\n";
+PyObject* SCA_DelaySensor::PyGetDuration()
+{
+ ShowDeprecationWarning("getDuration()", "the duration property");
+ return PyLong_FromSsize_t(m_duration);
+}
+
+const char SCA_DelaySensor::GetRepeat_doc[] =
+"getRepeat()\n"
+"\tReturn the repeat parameter value\n";
+PyObject* SCA_DelaySensor::PyGetRepeat()
+{
+ ShowDeprecationWarning("getRepeat()", "the repeat property");
+ return BoolToPyArg(m_repeat);
+}
+
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_DelaySensor.h b/source/gameengine/GameLogic/SCA_DelaySensor.h
index 187a9179b5d..8270e8959b7 100644
--- a/source/gameengine/GameLogic/SCA_DelaySensor.h
+++ b/source/gameengine/GameLogic/SCA_DelaySensor.h
@@ -59,6 +59,14 @@ public:
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
+ /* setProperty */
+ KX_PYMETHOD_DOC_VARARGS(SCA_DelaySensor,SetDelay);
+ KX_PYMETHOD_DOC_VARARGS(SCA_DelaySensor,SetDuration);
+ KX_PYMETHOD_DOC_VARARGS(SCA_DelaySensor,SetRepeat);
+ /* getProperty */
+ KX_PYMETHOD_DOC_NOARGS(SCA_DelaySensor,GetDelay);
+ KX_PYMETHOD_DOC_NOARGS(SCA_DelaySensor,GetDuration);
+ KX_PYMETHOD_DOC_NOARGS(SCA_DelaySensor,GetRepeat);
};
diff --git a/source/gameengine/GameLogic/SCA_IController.cpp b/source/gameengine/GameLogic/SCA_IController.cpp
index 7cfd2adc1d0..24c39563c28 100644
--- a/source/gameengine/GameLogic/SCA_IController.cpp
+++ b/source/gameengine/GameLogic/SCA_IController.cpp
@@ -221,6 +221,13 @@ PyTypeObject SCA_IController::Type = {
};
PyMethodDef SCA_IController::Methods[] = {
+ //Deprecated functions ------>
+ {"getSensor", (PyCFunction) SCA_IController::sPyGetSensor, METH_O},
+ {"getActuator", (PyCFunction) SCA_IController::sPyGetActuator, METH_O},
+ {"getSensors", (PyCFunction) SCA_IController::sPyGetSensors, METH_NOARGS},
+ {"getActuators", (PyCFunction) SCA_IController::sPyGetActuators, METH_NOARGS},
+ {"getState", (PyCFunction) SCA_IController::sPyGetState, METH_NOARGS},
+ //<----- Deprecated
{NULL,NULL} //Sentinel
};
@@ -232,6 +239,85 @@ PyAttributeDef SCA_IController::Attributes[] = {
{ NULL } //Sentinel
};
+PyObject* SCA_IController::PyGetActuators()
+{
+ ShowDeprecationWarning("getActuators()", "the actuators property");
+
+ PyObject* resultlist = PyList_New(m_linkedactuators.size());
+ for (unsigned int index=0;index<m_linkedactuators.size();index++)
+ {
+ PyList_SET_ITEM(resultlist,index, m_linkedactuators[index]->GetProxy());
+ }
+
+ return resultlist;
+}
+
+PyObject* SCA_IController::PyGetSensor(PyObject* value)
+{
+ ShowDeprecationWarning("getSensor(string)", "the sensors[string] property");
+
+ char *scriptArg = _PyUnicode_AsString(value);
+ if (scriptArg==NULL) {
+ PyErr_SetString(PyExc_TypeError, "controller.getSensor(string): Python Controller, expected a string (sensor name)");
+ return NULL;
+ }
+
+ for (unsigned int index=0;index<m_linkedsensors.size();index++)
+ {
+ SCA_ISensor* sensor = m_linkedsensors[index];
+ STR_String& realname = sensor->GetName();
+ if (realname == scriptArg)
+ {
+ return sensor->GetProxy();
+ }
+ }
+
+ PyErr_Format(PyExc_AttributeError, "controller.getSensor(string): Python Controller, unable to find requested sensor \"%s\"", scriptArg);
+ return NULL;
+}
+
+PyObject* SCA_IController::PyGetActuator(PyObject* value)
+{
+ ShowDeprecationWarning("getActuator(string)", "the actuators[string] property");
+
+ char *scriptArg = _PyUnicode_AsString(value);
+ if (scriptArg==NULL) {
+ PyErr_SetString(PyExc_TypeError, "controller.getActuator(string): Python Controller, expected a string (actuator name)");
+ return NULL;
+ }
+
+ for (unsigned int index=0;index<m_linkedactuators.size();index++)
+ {
+ SCA_IActuator* actua = m_linkedactuators[index];
+ if (actua->GetName() == scriptArg)
+ {
+ return actua->GetProxy();
+ }
+ }
+
+ PyErr_Format(PyExc_AttributeError, "controller.getActuator(string): Python Controller, unable to find requested actuator \"%s\"", scriptArg);
+ return NULL;
+}
+
+PyObject* SCA_IController::PyGetSensors()
+{
+ ShowDeprecationWarning("getSensors()", "the sensors property");
+
+ PyObject* resultlist = PyList_New(m_linkedsensors.size());
+ for (unsigned int index=0;index<m_linkedsensors.size();index++)
+ {
+ PyList_SET_ITEM(resultlist,index, m_linkedsensors[index]->GetProxy());
+ }
+
+ return resultlist;
+}
+
+PyObject* SCA_IController::PyGetState()
+{
+ ShowDeprecationWarning("getState()", "the state property");
+ return PyLong_FromSsize_t(m_statemask);
+}
+
PyObject* SCA_IController::pyattr_get_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
SCA_IController* self= static_cast<SCA_IController*>(self_v);
diff --git a/source/gameengine/GameLogic/SCA_IController.h b/source/gameengine/GameLogic/SCA_IController.h
index 202921c6986..523878bee26 100644
--- a/source/gameengine/GameLogic/SCA_IController.h
+++ b/source/gameengine/GameLogic/SCA_IController.h
@@ -97,6 +97,12 @@ public:
}
}
}
+
+ KX_PYMETHOD_NOARGS(SCA_IController,GetSensors);
+ KX_PYMETHOD_NOARGS(SCA_IController,GetActuators);
+ KX_PYMETHOD_O(SCA_IController,GetSensor);
+ KX_PYMETHOD_O(SCA_IController,GetActuator);
+ KX_PYMETHOD_NOARGS(SCA_IController,GetState);
static PyObject* pyattr_get_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_sensors(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
index f679d0ee487..2c64e02913d 100644
--- a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
+++ b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
@@ -199,6 +199,11 @@ PyTypeObject SCA_ILogicBrick::Type = {
};
PyMethodDef SCA_ILogicBrick::Methods[] = {
+ // --> Deprecated
+ {"getOwner", (PyCFunction) SCA_ILogicBrick::sPyGetOwner, METH_NOARGS},
+ {"getExecutePriority", (PyCFunction) SCA_ILogicBrick::sPyGetExecutePriority, METH_NOARGS},
+ {"setExecutePriority", (PyCFunction) SCA_ILogicBrick::sPySetExecutePriority, METH_VARARGS},
+ // <-- Deprecated
{NULL,NULL} //Sentinel
};
@@ -227,6 +232,46 @@ int SCA_ILogicBrick::CheckProperty(void *self, const PyAttributeDef *attrdef)
return 0;
}
+PyObject* SCA_ILogicBrick::PyGetOwner()
+{
+ ShowDeprecationWarning("getOwner()", "the owner property");
+
+ CValue* parent = GetParent();
+ if (parent)
+ {
+ return parent->GetProxy();
+ }
+
+ printf("ERROR: Python scriptblock without owner\n");
+ Py_RETURN_NONE; //Int_FromLong(IsPositiveTrigger());
+}
+
+
+
+PyObject* SCA_ILogicBrick::PySetExecutePriority(PyObject* args)
+{
+ ShowDeprecationWarning("setExecutePriority()", "the executePriority property");
+
+ int priority=0;
+
+ if (!PyArg_ParseTuple(args, "i:setExecutePriority", &priority)) {
+ return NULL;
+ }
+
+ m_Execute_Priority = priority;
+
+ Py_RETURN_NONE;
+}
+
+
+
+PyObject* SCA_ILogicBrick::PyGetExecutePriority()
+{
+ ShowDeprecationWarning("getExecutePriority()", "the executePriority property");
+ return PyLong_FromSsize_t(m_Execute_Priority);
+}
+
+
/*Attribute functions */
PyObject* SCA_ILogicBrick::pyattr_get_owner(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.h b/source/gameengine/GameLogic/SCA_ILogicBrick.h
index ac533335f0b..50679856802 100644
--- a/source/gameengine/GameLogic/SCA_ILogicBrick.h
+++ b/source/gameengine/GameLogic/SCA_ILogicBrick.h
@@ -126,6 +126,10 @@ public:
// python methods
+
+ KX_PYMETHOD_NOARGS(SCA_ILogicBrick,GetOwner);
+ KX_PYMETHOD_VARARGS(SCA_ILogicBrick,SetExecutePriority);
+ KX_PYMETHOD_NOARGS(SCA_ILogicBrick,GetExecutePriority);
static PyObject* pyattr_get_owner(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/GameLogic/SCA_ISensor.cpp b/source/gameengine/GameLogic/SCA_ISensor.cpp
index 497a5d1095a..b018124dcca 100644
--- a/source/gameengine/GameLogic/SCA_ISensor.cpp
+++ b/source/gameengine/GameLogic/SCA_ISensor.cpp
@@ -292,6 +292,171 @@ void SCA_ISensor::Activate(class SCA_LogicManager* logicmgr)
/* Python Functions */
/* ----------------------------------------------- */
+//Deprecated Functions ------>
+const char SCA_ISensor::IsPositive_doc[] =
+"isPositive()\n"
+"\tReturns whether the sensor is in an active state.\n";
+PyObject* SCA_ISensor::PyIsPositive()
+{
+ ShowDeprecationWarning("isPositive()", "the read-only positive property");
+ int retval = GetState();
+ return PyLong_FromSsize_t(retval);
+}
+
+const char SCA_ISensor::IsTriggered_doc[] =
+"isTriggered()\n"
+"\tReturns whether the sensor has triggered the current controller.\n";
+PyObject* SCA_ISensor::PyIsTriggered()
+{
+ ShowDeprecationWarning("isTriggered()", "the read-only triggered property");
+ // check with the current controller
+ int retval = 0;
+ if (SCA_PythonController::m_sCurrentController)
+ retval = SCA_PythonController::m_sCurrentController->IsTriggered(this);
+ return PyLong_FromSsize_t(retval);
+}
+
+/**
+ * getUsePulseMode: getter for the pulse mode (KX_TRUE = on)
+ */
+const char SCA_ISensor::GetUsePosPulseMode_doc[] =
+"getUsePosPulseMode()\n"
+"\tReturns whether positive pulse mode is active.\n";
+PyObject* SCA_ISensor::PyGetUsePosPulseMode()
+{
+ ShowDeprecationWarning("getUsePosPulseMode()", "the usePosPulseMode property");
+ return BoolToPyArg(m_pos_pulsemode);
+}
+
+/**
+ * setUsePulseMode: setter for the pulse mode (KX_TRUE = on)
+ */
+const char SCA_ISensor::SetUsePosPulseMode_doc[] =
+"setUsePosPulseMode(pulse?)\n"
+"\t - pulse? : Pulse when a positive event occurs?\n"
+"\t (KX_TRUE, KX_FALSE)\n"
+"\tSet whether to do pulsing when positive pulses occur.\n";
+PyObject* SCA_ISensor::PySetUsePosPulseMode(PyObject* args)
+{
+ ShowDeprecationWarning("setUsePosPulseMode()", "the usePosPulseMode property");
+ int pyarg = 0;
+ if(!PyArg_ParseTuple(args, "i:setUsePosPulseMode", &pyarg)) { return NULL; }
+ m_pos_pulsemode = PyArgToBool(pyarg);
+ Py_RETURN_NONE;
+}
+
+/**
+ * getFrequency: getter for the pulse mode interval
+ */
+const char SCA_ISensor::GetFrequency_doc[] =
+"getFrequency()\n"
+"\tReturns the frequency of the updates in pulse mode.\n" ;
+PyObject* SCA_ISensor::PyGetFrequency()
+{
+ ShowDeprecationWarning("getFrequency()", "the frequency property");
+ return PyLong_FromSsize_t(m_pulse_frequency);
+}
+
+/**
+ * setFrequency: setter for the pulse mode (KX_TRUE = on)
+ */
+const char SCA_ISensor::SetFrequency_doc[] =
+"setFrequency(pulse_frequency)\n"
+"\t- pulse_frequency: The frequency of the updates in pulse mode (integer)"
+"\tSet the frequency of the updates in pulse mode.\n"
+"\tIf the frequency is negative, it is set to 0.\n" ;
+PyObject* SCA_ISensor::PySetFrequency(PyObject* args)
+{
+ ShowDeprecationWarning("setFrequency()", "the frequency property");
+ int pulse_frequencyArg = 0;
+
+ if(!PyArg_ParseTuple(args, "i:setFrequency", &pulse_frequencyArg)) {
+ return NULL;
+ }
+
+ /* We can do three things here: clip, ignore and raise an exception. */
+ /* Exceptions don't work yet, ignoring is not desirable now... */
+ if (pulse_frequencyArg < 0) {
+ pulse_frequencyArg = 0;
+ };
+ m_pulse_frequency = pulse_frequencyArg;
+
+ Py_RETURN_NONE;
+}
+
+
+const char SCA_ISensor::GetInvert_doc[] =
+"getInvert()\n"
+"\tReturns whether or not pulses from this sensor are inverted.\n" ;
+PyObject* SCA_ISensor::PyGetInvert()
+{
+ ShowDeprecationWarning("getInvert()", "the invert property");
+ return BoolToPyArg(m_invert);
+}
+
+const char SCA_ISensor::SetInvert_doc[] =
+"setInvert(invert?)\n"
+"\t- invert?: Invert the event-values? (KX_TRUE, KX_FALSE)\n"
+"\tSet whether to invert pulses.\n";
+PyObject* SCA_ISensor::PySetInvert(PyObject* args)
+{
+ ShowDeprecationWarning("setInvert()", "the invert property");
+ int pyarg = 0;
+ if(!PyArg_ParseTuple(args, "i:setInvert", &pyarg)) { return NULL; }
+ m_invert = PyArgToBool(pyarg);
+ Py_RETURN_NONE;
+}
+
+const char SCA_ISensor::GetLevel_doc[] =
+"getLevel()\n"
+"\tReturns whether this sensor is a level detector or a edge detector.\n"
+"\tIt makes a difference only in case of logic state transition (state actuator).\n"
+"\tA level detector will immediately generate a pulse, negative or positive\n"
+"\tdepending on the sensor condition, as soon as the state is activated.\n"
+"\tA edge detector will wait for a state change before generating a pulse.\n";
+PyObject* SCA_ISensor::PyGetLevel()
+{
+ ShowDeprecationWarning("getLevel()", "the level property");
+ return BoolToPyArg(m_level);
+}
+
+const char SCA_ISensor::SetLevel_doc[] =
+"setLevel(level?)\n"
+"\t- level?: Detect level instead of edge? (KX_TRUE, KX_FALSE)\n"
+"\tSet whether to detect level or edge transition when entering a state.\n";
+PyObject* SCA_ISensor::PySetLevel(PyObject* args)
+{
+ ShowDeprecationWarning("setLevel()", "the level property");
+ int pyarg = 0;
+ if(!PyArg_ParseTuple(args, "i:setLevel", &pyarg)) { return NULL; }
+ m_level = PyArgToBool(pyarg);
+ Py_RETURN_NONE;
+}
+
+const char SCA_ISensor::GetUseNegPulseMode_doc[] =
+"getUseNegPulseMode()\n"
+"\tReturns whether negative pulse mode is active.\n";
+PyObject* SCA_ISensor::PyGetUseNegPulseMode()
+{
+ ShowDeprecationWarning("getUseNegPulseMode()", "the useNegPulseMode property");
+ return BoolToPyArg(m_neg_pulsemode);
+}
+
+const char SCA_ISensor::SetUseNegPulseMode_doc[] =
+"setUseNegPulseMode(pulse?)\n"
+"\t - pulse? : Pulse when a negative event occurs?\n"
+"\t (KX_TRUE, KX_FALSE)\n"
+"\tSet whether to do pulsing when negative pulses occur.\n";
+PyObject* SCA_ISensor::PySetUseNegPulseMode(PyObject* args)
+{
+ ShowDeprecationWarning("setUseNegPulseMode()", "the useNegPulseMode property");
+ int pyarg = 0;
+ if(!PyArg_ParseTuple(args, "i:setUseNegPulseMode", &pyarg)) { return NULL; }
+ m_neg_pulsemode = PyArgToBool(pyarg);
+ Py_RETURN_NONE;
+}
+//<------Deprecated
+
KX_PYMETHODDEF_DOC_NOARGS(SCA_ISensor, reset,
"reset()\n"
"\tReset sensor internal state, effect depends on the type of sensor and settings.\n"
@@ -329,6 +494,32 @@ PyTypeObject SCA_ISensor::Type = {
};
PyMethodDef SCA_ISensor::Methods[] = {
+ //Deprecated functions ----->
+ {"isPositive", (PyCFunction) SCA_ISensor::sPyIsPositive,
+ METH_NOARGS, (const char *)IsPositive_doc},
+ {"isTriggered", (PyCFunction) SCA_ISensor::sPyIsTriggered,
+ METH_VARARGS, (const char *)IsTriggered_doc},
+ {"getUsePosPulseMode", (PyCFunction) SCA_ISensor::sPyGetUsePosPulseMode,
+ METH_NOARGS, (const char *)GetUsePosPulseMode_doc},
+ {"setUsePosPulseMode", (PyCFunction) SCA_ISensor::sPySetUsePosPulseMode,
+ METH_VARARGS, (const char *)SetUsePosPulseMode_doc},
+ {"getFrequency", (PyCFunction) SCA_ISensor::sPyGetFrequency,
+ METH_NOARGS, (const char *)GetFrequency_doc},
+ {"setFrequency", (PyCFunction) SCA_ISensor::sPySetFrequency,
+ METH_VARARGS, (const char *)SetFrequency_doc},
+ {"getUseNegPulseMode", (PyCFunction) SCA_ISensor::sPyGetUseNegPulseMode,
+ METH_NOARGS, (const char *)GetUseNegPulseMode_doc},
+ {"setUseNegPulseMode", (PyCFunction) SCA_ISensor::sPySetUseNegPulseMode,
+ METH_VARARGS, (const char *)SetUseNegPulseMode_doc},
+ {"getInvert", (PyCFunction) SCA_ISensor::sPyGetInvert,
+ METH_NOARGS, (const char *)GetInvert_doc},
+ {"setInvert", (PyCFunction) SCA_ISensor::sPySetInvert,
+ METH_VARARGS, (const char *)SetInvert_doc},
+ {"getLevel", (PyCFunction) SCA_ISensor::sPyGetLevel,
+ METH_NOARGS, (const char *)GetLevel_doc},
+ {"setLevel", (PyCFunction) SCA_ISensor::sPySetLevel,
+ METH_VARARGS, (const char *)SetLevel_doc},
+ //<----- Deprecated
KX_PYMETHODTABLE_NOARGS(SCA_ISensor, reset),
{NULL,NULL} //Sentinel
};
diff --git a/source/gameengine/GameLogic/SCA_ISensor.h b/source/gameengine/GameLogic/SCA_ISensor.h
index 742b05bd88b..81864ab6a34 100644
--- a/source/gameengine/GameLogic/SCA_ISensor.h
+++ b/source/gameengine/GameLogic/SCA_ISensor.h
@@ -172,6 +172,21 @@ public:
{ return !m_links; }
/* Python functions: */
+
+ //Deprecated functions ----->
+ KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,IsPositive);
+ KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,IsTriggered);
+ KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,GetUsePosPulseMode);
+ KX_PYMETHOD_DOC_VARARGS(SCA_ISensor,SetUsePosPulseMode);
+ KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,GetFrequency);
+ KX_PYMETHOD_DOC_VARARGS(SCA_ISensor,SetFrequency);
+ KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,GetUseNegPulseMode);
+ KX_PYMETHOD_DOC_VARARGS(SCA_ISensor,SetUseNegPulseMode);
+ KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,GetInvert);
+ KX_PYMETHOD_DOC_VARARGS(SCA_ISensor,SetInvert);
+ KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,GetLevel);
+ KX_PYMETHOD_DOC_VARARGS(SCA_ISensor,SetLevel);
+ //<------
KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,reset);
static PyObject* pyattr_get_triggered(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
index 4936b380352..02be7cd6a08 100644
--- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
@@ -48,6 +48,7 @@ SCA_JoystickSensor::SCA_JoystickSensor(class SCA_JoystickManager* eventmgr,
int button,
int hat, int hatf, bool allevents)
:SCA_ISensor(gameobj,eventmgr),
+ m_pJoystickMgr(eventmgr),
m_axis(axis),
m_axisf(axisf),
m_button(button),
@@ -102,7 +103,7 @@ bool SCA_JoystickSensor::IsPositiveTrigger()
bool SCA_JoystickSensor::Evaluate()
{
- SCA_Joystick *js = ((SCA_JoystickManager *)m_eventmgr)->GetJoystickDevice(m_joyindex);
+ SCA_Joystick *js = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
bool result = false;
bool reset = m_reset && m_level;
@@ -273,6 +274,24 @@ PyTypeObject SCA_JoystickSensor::Type = {
};
PyMethodDef SCA_JoystickSensor::Methods[] = {
+ //Deprecated functions ------>
+ {"getIndex", (PyCFunction) SCA_JoystickSensor::sPyGetIndex, METH_NOARGS, (const char *)GetIndex_doc},
+ {"setIndex", (PyCFunction) SCA_JoystickSensor::sPySetIndex, METH_O, (const char *)SetIndex_doc},
+ {"getAxis", (PyCFunction) SCA_JoystickSensor::sPyGetAxis, METH_NOARGS, (const char *)GetAxis_doc},
+ {"setAxis", (PyCFunction) SCA_JoystickSensor::sPySetAxis, METH_VARARGS, (const char *)SetAxis_doc},
+ {"getAxisValue", (PyCFunction) SCA_JoystickSensor::sPyGetAxisValue, METH_NOARGS, (const char *)GetAxisValue_doc},
+ {"getThreshold", (PyCFunction) SCA_JoystickSensor::sPyGetThreshold, METH_NOARGS, (const char *)GetThreshold_doc},
+ {"setThreshold", (PyCFunction) SCA_JoystickSensor::sPySetThreshold, METH_VARARGS, (const char *)SetThreshold_doc},
+ {"getButton", (PyCFunction) SCA_JoystickSensor::sPyGetButton, METH_NOARGS, (const char *)GetButton_doc},
+ {"setButton", (PyCFunction) SCA_JoystickSensor::sPySetButton, METH_O, (const char *)SetButton_doc},
+ {"getHat", (PyCFunction) SCA_JoystickSensor::sPyGetHat, METH_NOARGS, (const char *)GetHat_doc},
+ {"setHat", (PyCFunction) SCA_JoystickSensor::sPySetHat, METH_VARARGS, (const char *)SetHat_doc},
+ {"getNumAxes", (PyCFunction) SCA_JoystickSensor::sPyNumberOfAxes, METH_NOARGS, (const char *)NumberOfAxes_doc},
+ {"getNumButtons",(PyCFunction) SCA_JoystickSensor::sPyNumberOfButtons,METH_NOARGS, (const char *)NumberOfButtons_doc},
+ {"getNumHats", (PyCFunction) SCA_JoystickSensor::sPyNumberOfHats, METH_NOARGS, (const char *)NumberOfHats_doc},
+ {"isConnected", (PyCFunction) SCA_JoystickSensor::sPyConnected, METH_NOARGS, (const char *)Connected_doc},
+ {"getButtonValue",(PyCFunction) SCA_JoystickSensor::sPyGetButtonValue, METH_NOARGS,(const char *)GetButtonValue_doc},
+ //<----- Deprecated
{"getButtonActiveList",(PyCFunction) SCA_JoystickSensor::sPyGetButtonActiveList, METH_NOARGS,(const char *)GetButtonActiveList_doc},
{"getButtonStatus",(PyCFunction) SCA_JoystickSensor::sPyGetButtonStatus, METH_VARARGS,(const char *)GetButtonStatus_doc},
{NULL,NULL} //Sentinel
@@ -296,12 +315,144 @@ PyAttributeDef SCA_JoystickSensor::Attributes[] = {
{ NULL } //Sentinel
};
+
+/* get index ---------------------------------------------------------- */
+const char SCA_JoystickSensor::GetIndex_doc[] =
+"getIndex\n"
+"\tReturns the joystick index to use.\n";
+PyObject* SCA_JoystickSensor::PyGetIndex( ) {
+ ShowDeprecationWarning("getIndex()", "the index property");
+ return PyLong_FromSsize_t(m_joyindex);
+}
+
+
+/* set index ---------------------------------------------------------- */
+const char SCA_JoystickSensor::SetIndex_doc[] =
+"setIndex\n"
+"\tSets the joystick index to use.\n";
+PyObject* SCA_JoystickSensor::PySetIndex( PyObject* value ) {
+ ShowDeprecationWarning("setIndex()", "the index property");
+ int index = PyLong_AsSsize_t( value ); /* -1 on error, will raise an error in this case */
+ if (index < 0 || index >= JOYINDEX_MAX) {
+ PyErr_SetString(PyExc_ValueError, "joystick index out of range or not an int");
+ return NULL;
+ }
+
+ m_joyindex = index;
+ Py_RETURN_NONE;
+}
+
+/* get axis ---------------------------------------------------------- */
+const char SCA_JoystickSensor::GetAxis_doc[] =
+"getAxis\n"
+"\tReturns the current axis this sensor reacts to.\n";
+PyObject* SCA_JoystickSensor::PyGetAxis( ) {
+ ShowDeprecationWarning("getAxis()", "the axis property");
+ return Py_BuildValue("[ii]",m_axis, m_axisf);
+}
+
+
+/* set axis ---------------------------------------------------------- */
+const char SCA_JoystickSensor::SetAxis_doc[] =
+"setAxis\n"
+"\tSets the current axis this sensor reacts to.\n";
+PyObject* SCA_JoystickSensor::PySetAxis( PyObject* args ) {
+ ShowDeprecationWarning("setAxis()", "the axis property");
+
+ int axis,axisflag;
+ if(!PyArg_ParseTuple(args, "ii:setAxis", &axis, &axisflag)){
+ return NULL;
+ }
+ m_axis = axis;
+ m_axisf = axisflag;
+
+ CheckAxis((void *)this, NULL); /* clamp values */
+ Py_RETURN_NONE;
+}
+
+
+/* get axis value ----------------------------------------------------- */
+const char SCA_JoystickSensor::GetAxisValue_doc[] =
+"getAxisValue\n"
+"\tReturns a list of the values for the current state of each axis.\n";
+PyObject* SCA_JoystickSensor::PyGetAxisValue( ) {
+ ShowDeprecationWarning("getAxisValue()", "the axisPosition property");
+ SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
+
+ int axis_index= joy->GetNumberOfAxes();
+ PyObject *list= PyList_New(axis_index);
+
+ while(axis_index--) {
+ PyList_SET_ITEM(list, axis_index, PyLong_FromSsize_t(joy->GetAxisPosition(axis_index)));
+ }
+
+ return list;
+}
+
+
+/* get threshold ----------------------------------------------------- */
+const char SCA_JoystickSensor::GetThreshold_doc[] =
+"getThreshold\n"
+"\tReturns the threshold of the axis.\n";
+PyObject* SCA_JoystickSensor::PyGetThreshold( ) {
+ ShowDeprecationWarning("getThreshold()", "the threshold property");
+ return PyLong_FromSsize_t(m_precision);
+}
+
+
+/* set threshold ----------------------------------------------------- */
+const char SCA_JoystickSensor::SetThreshold_doc[] =
+"setThreshold\n"
+"\tSets the threshold of the axis.\n";
+PyObject* SCA_JoystickSensor::PySetThreshold( PyObject* args ) {
+ ShowDeprecationWarning("setThreshold()", "the threshold property");
+ int thresh;
+ if(!PyArg_ParseTuple(args, "i:setThreshold", &thresh)){
+ return NULL;
+ }
+ m_precision = thresh;
+ Py_RETURN_NONE;
+}
+
+/* get button -------------------------------------------------------- */
+const char SCA_JoystickSensor::GetButton_doc[] =
+"getButton\n"
+"\tReturns the current button this sensor is checking.\n";
+PyObject* SCA_JoystickSensor::PyGetButton( ) {
+ ShowDeprecationWarning("getButton()", "the button property");
+ return PyLong_FromSsize_t(m_button);
+}
+
+/* set button -------------------------------------------------------- */
+const char SCA_JoystickSensor::SetButton_doc[] =
+"setButton\n"
+"\tSets the button the sensor reacts to.\n";
+PyObject* SCA_JoystickSensor::PySetButton( PyObject* value ) {
+ ShowDeprecationWarning("setButton()", "the button property");
+ int button = PyLong_AsSsize_t(value);
+ if(button==-1 && PyErr_Occurred()) {
+ PyErr_SetString(PyExc_ValueError, "expected an int");
+ return NULL;
+ }
+ m_button = button;
+ Py_RETURN_NONE;
+}
+
+/* get button value -------------------------------------------------- */
+const char SCA_JoystickSensor::GetButtonValue_doc[] =
+"getButtonValue\n"
+"\tReturns a list containing the indicies of the current pressed state of each button.\n";
+PyObject* SCA_JoystickSensor::PyGetButtonValue( ) {
+ ShowDeprecationWarning("getButtonValue()", "getButtonActiveList");
+ return PyGetButtonActiveList( );
+}
+
/* get button active list -------------------------------------------------- */
const char SCA_JoystickSensor::GetButtonActiveList_doc[] =
"getButtonActiveList\n"
"\tReturns a list containing the indicies of the button currently pressed.\n";
PyObject* SCA_JoystickSensor::PyGetButtonActiveList( ) {
- SCA_Joystick *joy = ((SCA_JoystickManager *)m_eventmgr)->GetJoystickDevice(m_joyindex);
+ SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
PyObject *ls = PyList_New(0);
PyObject *value;
int i;
@@ -323,7 +474,7 @@ const char SCA_JoystickSensor::GetButtonStatus_doc[] =
"getButtonStatus(buttonIndex)\n"
"\tReturns a bool of the current pressed state of the specified button.\n";
PyObject* SCA_JoystickSensor::PyGetButtonStatus( PyObject* args ) {
- SCA_Joystick *joy = ((SCA_JoystickManager *)m_eventmgr)->GetJoystickDevice(m_joyindex);
+ SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
int index;
if(!PyArg_ParseTuple(args, "i:getButtonStatus", &index)){
@@ -335,10 +486,79 @@ PyObject* SCA_JoystickSensor::PyGetButtonStatus( PyObject* args ) {
return PyBool_FromLong(0);
}
+/* get hat ----------------------------------------------------------- */
+const char SCA_JoystickSensor::GetHat_doc[] =
+"getHat\n"
+"\tReturns the current direction of the hat.\n";
+PyObject* SCA_JoystickSensor::PyGetHat( ) {
+ ShowDeprecationWarning("getHat()", "the hat property");
+ return Py_BuildValue("[ii]",m_hat, m_hatf);
+}
+
+
+/* set hat ----------------------------------------------------------- */
+const char SCA_JoystickSensor::SetHat_doc[] =
+"setHat\n"
+"\tSets the hat the sensor reacts to.\n";
+PyObject* SCA_JoystickSensor::PySetHat( PyObject* args ) {
+ ShowDeprecationWarning("setHat()", "the hat property");
+ int hat,hatflag;
+ if(!PyArg_ParseTuple(args, "ii:setHat", &hat, &hatflag)){
+ return NULL;
+ }
+ m_hat = hat;
+ m_hatf = hatflag;
+
+ CheckHat((void *)this, NULL); /* clamp values */
+ Py_RETURN_NONE;
+}
+
+
+/* get # of ----------------------------------------------------- */
+const char SCA_JoystickSensor::NumberOfAxes_doc[] =
+"getNumAxes\n"
+"\tReturns the number of axes .\n";
+PyObject* SCA_JoystickSensor::PyNumberOfAxes( ) {
+ ShowDeprecationWarning("getNumAxes()", "the numAxis property");
+ SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
+ // when the joystick is null their is 0 exis still. dumb but scripters should use isConnected()
+ return PyLong_FromSsize_t( joy ? joy->GetNumberOfAxes() : 0 );
+}
+
+
+const char SCA_JoystickSensor::NumberOfButtons_doc[] =
+"getNumButtons\n"
+"\tReturns the number of buttons .\n";
+PyObject* SCA_JoystickSensor::PyNumberOfButtons( ) {
+ ShowDeprecationWarning("getNumButtons()", "the numButtons property");
+ SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
+ return PyLong_FromSsize_t( joy ? joy->GetNumberOfButtons() : 0 );
+}
+
+
+const char SCA_JoystickSensor::NumberOfHats_doc[] =
+"getNumHats\n"
+"\tReturns the number of hats .\n";
+PyObject* SCA_JoystickSensor::PyNumberOfHats( ) {
+ ShowDeprecationWarning("getNumHats()", "the numHats property");
+ SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
+ return PyLong_FromSsize_t( joy ? joy->GetNumberOfHats() : 0 );
+}
+
+const char SCA_JoystickSensor::Connected_doc[] =
+"getConnected\n"
+"\tReturns True if a joystick is connected at this joysticks index.\n";
+PyObject* SCA_JoystickSensor::PyConnected( ) {
+ ShowDeprecationWarning("getConnected()", "the connected property");
+ SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex);
+ return PyBool_FromLong( joy ? joy->Connected() : 0 );
+}
+
+
PyObject* SCA_JoystickSensor::pyattr_get_axis_values(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v);
- SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex);
+ SCA_Joystick *joy = self->m_pJoystickMgr->GetJoystickDevice(self->m_joyindex);
int axis_index= joy->GetNumberOfAxes();
PyObject *list= PyList_New(axis_index);
@@ -353,7 +573,7 @@ PyObject* SCA_JoystickSensor::pyattr_get_axis_values(void *self_v, const KX_PYAT
PyObject* SCA_JoystickSensor::pyattr_get_axis_single(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v);
- SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex);
+ SCA_Joystick *joy = self->m_pJoystickMgr->GetJoystickDevice(self->m_joyindex);
if(self->m_joymode != KX_JOYSENSORMODE_AXIS_SINGLE) {
PyErr_SetString(PyExc_TypeError, "val = sensor.axisSingle: Joystick Sensor, not 'Single Axis' type");
@@ -366,7 +586,7 @@ PyObject* SCA_JoystickSensor::pyattr_get_axis_single(void *self_v, const KX_PYAT
PyObject* SCA_JoystickSensor::pyattr_get_hat_values(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v);
- SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex);
+ SCA_Joystick *joy = self->m_pJoystickMgr->GetJoystickDevice(self->m_joyindex);
int hat_index= joy->GetNumberOfHats();
PyObject *list= PyList_New(hat_index);
@@ -381,7 +601,7 @@ PyObject* SCA_JoystickSensor::pyattr_get_hat_values(void *self_v, const KX_PYATT
PyObject* SCA_JoystickSensor::pyattr_get_hat_single(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v);
- SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex);
+ SCA_Joystick *joy = self->m_pJoystickMgr->GetJoystickDevice(self->m_joyindex);
return PyLong_FromSsize_t(joy->GetHat(self->m_hat-1));
}
@@ -389,27 +609,27 @@ PyObject* SCA_JoystickSensor::pyattr_get_hat_single(void *self_v, const KX_PYATT
PyObject* SCA_JoystickSensor::pyattr_get_num_axis(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v);
- SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex);
+ SCA_Joystick *joy = self->m_pJoystickMgr->GetJoystickDevice(self->m_joyindex);
return PyLong_FromSsize_t( joy ? joy->GetNumberOfAxes() : 0 );
}
PyObject* SCA_JoystickSensor::pyattr_get_num_buttons(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v);
- SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex);
+ SCA_Joystick *joy = self->m_pJoystickMgr->GetJoystickDevice(self->m_joyindex);
return PyLong_FromSsize_t( joy ? joy->GetNumberOfButtons() : 0 );
}
PyObject* SCA_JoystickSensor::pyattr_get_num_hats(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v);
- SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex);
+ SCA_Joystick *joy = self->m_pJoystickMgr->GetJoystickDevice(self->m_joyindex);
return PyLong_FromSsize_t( joy ? joy->GetNumberOfHats() : 0 );
}
PyObject* SCA_JoystickSensor::pyattr_get_connected(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
SCA_JoystickSensor* self= static_cast<SCA_JoystickSensor*>(self_v);
- SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex);
+ SCA_Joystick *joy = self->m_pJoystickMgr->GetJoystickDevice(self->m_joyindex);
return PyBool_FromLong( joy ? joy->Connected() : 0 );
}
diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.h b/source/gameengine/GameLogic/SCA_JoystickSensor.h
index b793c591ac1..32f8ce567d2 100644
--- a/source/gameengine/GameLogic/SCA_JoystickSensor.h
+++ b/source/gameengine/GameLogic/SCA_JoystickSensor.h
@@ -35,6 +35,7 @@
class SCA_JoystickSensor :public SCA_ISensor
{
Py_Header;
+ class SCA_JoystickManager* m_pJoystickMgr;
/**
* Axis 1-JOYAXIS_MAX, MUST be followed by m_axisf
@@ -122,8 +123,28 @@ public:
/* --------------------------------------------------------------------- */
/* Joystick Index */
+ KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,GetIndex);
+ KX_PYMETHOD_DOC_O(SCA_JoystickSensor,SetIndex);
+ /* Axes*/
+ KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,GetAxis);
+ KX_PYMETHOD_DOC_VARARGS(SCA_JoystickSensor,SetAxis);
+ KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,GetAxisValue);
+ KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,GetThreshold);
+ KX_PYMETHOD_DOC_VARARGS(SCA_JoystickSensor,SetThreshold);
+ /* Buttons */
+ KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,GetButton);
+ KX_PYMETHOD_DOC_O(SCA_JoystickSensor,SetButton);
+ KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,GetButtonValue);
KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,GetButtonActiveList);
KX_PYMETHOD_DOC_VARARGS(SCA_JoystickSensor,GetButtonStatus);
+ /* Hats */
+ KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,GetHat);
+ KX_PYMETHOD_DOC_VARARGS(SCA_JoystickSensor,SetHat);
+ /* number of */
+ KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,NumberOfAxes);
+ KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,NumberOfButtons);
+ KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,NumberOfHats);
+ KX_PYMETHOD_DOC_NOARGS(SCA_JoystickSensor,Connected);
static PyObject* pyattr_get_axis_values(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_axis_single(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
index d2e3871fec2..f065452f8c6 100644
--- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
@@ -50,6 +50,7 @@ SCA_KeyboardSensor::SCA_KeyboardSensor(SCA_KeyboardManager* keybdmgr,
const STR_String& toggleProp,
SCA_IObject* gameobj)
:SCA_ISensor(gameobj,keybdmgr),
+ m_pKeyboardMgr(keybdmgr),
m_hotkey(hotkey),
m_qual(qual),
m_qual2(qual2),
@@ -124,7 +125,7 @@ bool SCA_KeyboardSensor::Evaluate()
bool qual_change = false;
short int m_val_orig = m_val;
- SCA_IInputDevice* inputdev = ((SCA_KeyboardManager *)m_eventmgr)->GetInputDevice();
+ SCA_IInputDevice* inputdev = m_pKeyboardMgr->GetInputDevice();
// cerr << "SCA_KeyboardSensor::Eval event, sensing for "<< m_hotkey << " at device " << inputdev << "\n";
/* See if we need to do logging: togPropState exists and is
@@ -359,7 +360,7 @@ void SCA_KeyboardSensor::AddToTargetProp(int keyIndex)
*/
bool SCA_KeyboardSensor::IsShifted(void)
{
- SCA_IInputDevice* inputdev = ((SCA_KeyboardManager *)m_eventmgr)->GetInputDevice();
+ SCA_IInputDevice* inputdev = m_pKeyboardMgr->GetInputDevice();
if ( (inputdev->GetEventValue(SCA_IInputDevice::KX_RIGHTSHIFTKEY).m_status
== SCA_InputEvent::KX_ACTIVE)
@@ -378,7 +379,7 @@ bool SCA_KeyboardSensor::IsShifted(void)
void SCA_KeyboardSensor::LogKeystrokes(void)
{
- SCA_IInputDevice* inputdev = ((SCA_KeyboardManager *)m_eventmgr)->GetInputDevice();
+ SCA_IInputDevice* inputdev = m_pKeyboardMgr->GetInputDevice();
int num = inputdev->GetNumActiveEvents();
/* weird loop, this one... */
@@ -408,6 +409,184 @@ void SCA_KeyboardSensor::LogKeystrokes(void)
/* Python Functions */
/* ------------------------------------------------------------------------- */
+//Deprecated ----->
+/** 1. GetKey : check which key this sensor looks at */
+const char SCA_KeyboardSensor::GetKey_doc[] =
+"getKey()\n"
+"\tReturn the code of the key this sensor is listening to.\n" ;
+PyObject* SCA_KeyboardSensor::PyGetKey()
+{
+ ShowDeprecationWarning("getKey()", "the key property");
+ return PyLong_FromSsize_t(m_hotkey);
+}
+
+/** 2. SetKey: change the key to look at */
+const char SCA_KeyboardSensor::SetKey_doc[] =
+"setKey(keycode)\n"
+"\t- keycode: any code from GameKeys\n"
+"\tSet the key this sensor should listen to.\n" ;
+PyObject* SCA_KeyboardSensor::PySetKey(PyObject* args)
+{
+ ShowDeprecationWarning("setKey()", "the key property");
+ int keyCode;
+
+ if(!PyArg_ParseTuple(args, "i:setKey", &keyCode)) {
+ return NULL;
+ }
+
+ /* Since we have symbolic constants for this in Python, we don't guard */
+ /* anything. It's up to the user to provide a sensible number. */
+ m_hotkey = keyCode;
+
+ Py_RETURN_NONE;
+}
+
+/** 3. GetHold1 : set the first bucky bit */
+const char SCA_KeyboardSensor::GetHold1_doc[] =
+"getHold1()\n"
+"\tReturn the code of the first key modifier to the key this \n"
+"\tsensor is listening to.\n" ;
+PyObject* SCA_KeyboardSensor::PyGetHold1()
+{
+ ShowDeprecationWarning("getHold1()", "the hold1 property");
+ return PyLong_FromSsize_t(m_qual);
+}
+
+/** 4. SetHold1: change the first bucky bit */
+const char SCA_KeyboardSensor::SetHold1_doc[] =
+"setHold1(keycode)\n"
+"\t- keycode: any code from GameKeys\n"
+"\tSet the first modifier to the key this sensor should listen to.\n" ;
+PyObject* SCA_KeyboardSensor::PySetHold1(PyObject* args)
+{
+ ShowDeprecationWarning("setHold1()", "the hold1 property");
+ int keyCode;
+
+ if(!PyArg_ParseTuple(args, "i:setHold1", &keyCode)) {
+ return NULL;
+ }
+
+ /* Since we have symbolic constants for this in Python, we don't guard */
+ /* anything. It's up to the user to provide a sensible number. */
+ m_qual = keyCode;
+
+ Py_RETURN_NONE;
+}
+
+/** 5. GetHold2 : get the second bucky bit */
+const char SCA_KeyboardSensor::GetHold2_doc[] =
+"getHold2()\n"
+"\tReturn the code of the second key modifier to the key this \n"
+"\tsensor is listening to.\n" ;
+PyObject* SCA_KeyboardSensor::PyGetHold2()
+{
+ ShowDeprecationWarning("getHold2()", "the hold2 property");
+ return PyLong_FromSsize_t(m_qual2);
+}
+
+/** 6. SetHold2: change the second bucky bit */
+const char SCA_KeyboardSensor::SetHold2_doc[] =
+"setHold2(keycode)\n"
+"\t- keycode: any code from GameKeys\n"
+"\tSet the first modifier to the key this sensor should listen to.\n" ;
+PyObject* SCA_KeyboardSensor::PySetHold2(PyObject* args)
+{
+ ShowDeprecationWarning("setHold2()", "the hold2 property");
+ int keyCode;
+
+ if(!PyArg_ParseTuple(args, "i:setHold2", &keyCode)) {
+ return NULL;
+ }
+
+ /* Since we have symbolic constants for this in Python, we don't guard */
+ /* anything. It's up to the user to provide a sensible number. */
+ m_qual2 = keyCode;
+
+ Py_RETURN_NONE;
+}
+
+
+const char SCA_KeyboardSensor::GetPressedKeys_doc[] =
+"getPressedKeys()\n"
+"\tGet a list of pressed keys that have either been pressed, or just released this frame.\n" ;
+
+PyObject* SCA_KeyboardSensor::PyGetPressedKeys()
+{
+ ShowDeprecationWarning("getPressedKeys()", "events");
+
+ SCA_IInputDevice* inputdev = m_pKeyboardMgr->GetInputDevice();
+
+ int num = inputdev->GetNumJustEvents();
+ PyObject* resultlist = PyList_New(num);
+
+ if (num > 0)
+ {
+
+ int index = 0;
+
+ for (int i=SCA_IInputDevice::KX_BEGINKEY ; i<= SCA_IInputDevice::KX_ENDKEY;i++)
+ {
+ const SCA_InputEvent & inevent = inputdev->GetEventValue((SCA_IInputDevice::KX_EnumInputs) i);
+ if ((inevent.m_status == SCA_InputEvent::KX_JUSTACTIVATED)
+ || (inevent.m_status == SCA_InputEvent::KX_JUSTRELEASED))
+ {
+ PyObject* keypair = PyList_New(2);
+ PyList_SET_ITEM(keypair,0,PyLong_FromSsize_t(i));
+ PyList_SET_ITEM(keypair,1,PyLong_FromSsize_t(inevent.m_status));
+ PyList_SET_ITEM(resultlist,index,keypair);
+ index++;
+
+ if (index >= num) /* should not happen */
+ break;
+ }
+ }
+ }
+
+ return resultlist;
+}
+
+
+
+const char SCA_KeyboardSensor::GetCurrentlyPressedKeys_doc[] =
+"getCurrentlyPressedKeys()\n"
+"\tGet a list of keys that are currently pressed.\n" ;
+
+PyObject* SCA_KeyboardSensor::PyGetCurrentlyPressedKeys()
+{
+ ShowDeprecationWarning("getCurrentlyPressedKeys()", "events");
+
+ SCA_IInputDevice* inputdev = m_pKeyboardMgr->GetInputDevice();
+
+ int num = inputdev->GetNumActiveEvents();
+ PyObject* resultlist = PyList_New(num);
+
+ if (num > 0)
+ {
+ int index = 0;
+
+ for (int i=SCA_IInputDevice::KX_BEGINKEY ; i<= SCA_IInputDevice::KX_ENDKEY;i++)
+ {
+ const SCA_InputEvent & inevent = inputdev->GetEventValue((SCA_IInputDevice::KX_EnumInputs) i);
+ if ( (inevent.m_status == SCA_InputEvent::KX_ACTIVE)
+ || (inevent.m_status == SCA_InputEvent::KX_JUSTACTIVATED))
+ {
+ PyObject* keypair = PyList_New(2);
+ PyList_SET_ITEM(keypair,0,PyLong_FromSsize_t(i));
+ PyList_SET_ITEM(keypair,1,PyLong_FromSsize_t(inevent.m_status));
+ PyList_SET_ITEM(resultlist,index,keypair);
+ index++;
+
+ if (index >= num) /* should never happen */
+ break;
+ }
+ }
+ }
+
+ return resultlist;
+}
+
+//<---- Deprecated
+
KX_PYMETHODDEF_DOC_O(SCA_KeyboardSensor, getKeyStatus,
"getKeyStatus(keycode)\n"
"\tGet the given key's status (KX_NO_INPUTSTATUS, KX_JUSTACTIVATED, KX_ACTIVE or KX_JUSTRELEASED).\n")
@@ -425,7 +604,7 @@ KX_PYMETHODDEF_DOC_O(SCA_KeyboardSensor, getKeyStatus,
return NULL;
}
- SCA_IInputDevice* inputdev = ((SCA_KeyboardManager *)m_eventmgr)->GetInputDevice();
+ SCA_IInputDevice* inputdev = m_pKeyboardMgr->GetInputDevice();
const SCA_InputEvent & inevent = inputdev->GetEventValue((SCA_IInputDevice::KX_EnumInputs) keycode);
return PyLong_FromSsize_t(inevent.m_status);
}
@@ -457,6 +636,16 @@ PyTypeObject SCA_KeyboardSensor::Type = {
};
PyMethodDef SCA_KeyboardSensor::Methods[] = {
+ //Deprecated functions ------>
+ {"getKey", (PyCFunction) SCA_KeyboardSensor::sPyGetKey, METH_NOARGS, (const char *)GetKey_doc},
+ {"setKey", (PyCFunction) SCA_KeyboardSensor::sPySetKey, METH_VARARGS, (const char *)SetKey_doc},
+ {"getHold1", (PyCFunction) SCA_KeyboardSensor::sPyGetHold1, METH_NOARGS, (const char *)GetHold1_doc},
+ {"setHold1", (PyCFunction) SCA_KeyboardSensor::sPySetHold1, METH_VARARGS, (const char *)SetHold1_doc},
+ {"getHold2", (PyCFunction) SCA_KeyboardSensor::sPyGetHold2, METH_NOARGS, (const char *)GetHold2_doc},
+ {"setHold2", (PyCFunction) SCA_KeyboardSensor::sPySetHold2, METH_VARARGS, (const char *)SetHold2_doc},
+ {"getPressedKeys", (PyCFunction) SCA_KeyboardSensor::sPyGetPressedKeys, METH_NOARGS, (const char *)GetPressedKeys_doc},
+ {"getCurrentlyPressedKeys", (PyCFunction) SCA_KeyboardSensor::sPyGetCurrentlyPressedKeys, METH_NOARGS, (const char *)GetCurrentlyPressedKeys_doc},
+ //<----- Deprecated
KX_PYMETHODTABLE_O(SCA_KeyboardSensor, getKeyStatus),
{NULL,NULL} //Sentinel
};
@@ -477,7 +666,7 @@ PyObject* SCA_KeyboardSensor::pyattr_get_events(void *self_v, const KX_PYATTRIBU
{
SCA_KeyboardSensor* self= static_cast<SCA_KeyboardSensor*>(self_v);
- SCA_IInputDevice* inputdev = ((SCA_KeyboardManager *)self->m_eventmgr)->GetInputDevice();
+ SCA_IInputDevice* inputdev = self->m_pKeyboardMgr->GetInputDevice();
PyObject* resultlist = PyList_New(0);
diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.h b/source/gameengine/GameLogic/SCA_KeyboardSensor.h
index d7e0f301a9d..3185b386d41 100644
--- a/source/gameengine/GameLogic/SCA_KeyboardSensor.h
+++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.h
@@ -43,6 +43,8 @@
class SCA_KeyboardSensor : public SCA_ISensor
{
Py_Header;
+ class SCA_KeyboardManager* m_pKeyboardMgr;
+
/**
* the key this sensor is sensing for
@@ -107,6 +109,25 @@ public:
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
+ //Deprecated functions ----->
+ /** 1. GetKey : check which key this sensor looks at */
+ KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetKey);
+ /** 2. SetKey: change the key to look at */
+ KX_PYMETHOD_DOC_VARARGS(SCA_KeyboardSensor,SetKey);
+ /** 3. GetHold1 : set the first bucky bit */
+ KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetHold1);
+ /** 4. SetHold1: change the first bucky bit */
+ KX_PYMETHOD_DOC_VARARGS(SCA_KeyboardSensor,SetHold1);
+ /** 5. GetHold2 : set the second bucky bit */
+ KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetHold2);
+ /** 6. SetHold2: change the second bucky bit */
+ KX_PYMETHOD_DOC_VARARGS(SCA_KeyboardSensor,SetHold2);
+ /** 9. GetPressedKeys: */
+ KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetPressedKeys);
+ /** 9. GetCurrrentlyPressedKeys: */
+ KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetCurrentlyPressedKeys);
+ // <------
+
// KeyEvents:
KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,getEventList);
// KeyStatus:
diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.cpp b/source/gameengine/GameLogic/SCA_MouseSensor.cpp
index 9d32682eaa9..c6703452337 100644
--- a/source/gameengine/GameLogic/SCA_MouseSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_MouseSensor.cpp
@@ -51,6 +51,7 @@ SCA_MouseSensor::SCA_MouseSensor(SCA_MouseManager* eventmgr,
short int mousemode,
SCA_IObject* gameobj)
: SCA_ISensor(gameobj,eventmgr),
+ m_pMouseMgr(eventmgr),
m_x(startx),
m_y(starty)
{
@@ -146,7 +147,7 @@ bool SCA_MouseSensor::Evaluate()
{
bool result = false;
bool reset = m_reset && m_level;
- SCA_IInputDevice* mousedev = ((SCA_MouseManager *)m_eventmgr)->GetInputDevice();
+ SCA_IInputDevice* mousedev = m_pMouseMgr->GetInputDevice();
m_reset = false;
switch (m_mousemode) {
@@ -243,6 +244,30 @@ bool SCA_MouseSensor::isValid(SCA_MouseSensor::KX_MOUSESENSORMODE m)
/* Python functions */
/* ------------------------------------------------------------------------- */
+//Deprecated functions ------>
+/* get x position ---------------------------------------------------------- */
+const char SCA_MouseSensor::GetXPosition_doc[] =
+"getXPosition\n"
+"\tReturns the x-coordinate of the mouse sensor, in frame coordinates.\n"
+"\tThe lower-left corner is the origin. The coordinate is given in\n"
+"\tpixels\n";
+PyObject* SCA_MouseSensor::PyGetXPosition() {
+ ShowDeprecationWarning("getXPosition()", "the position property");
+ return PyLong_FromSsize_t(m_x);
+}
+
+/* get y position ---------------------------------------------------------- */
+const char SCA_MouseSensor::GetYPosition_doc[] =
+"getYPosition\n"
+"\tReturns the y-coordinate of the mouse sensor, in frame coordinates.\n"
+"\tThe lower-left corner is the origin. The coordinate is given in\n"
+"\tpixels\n";
+PyObject* SCA_MouseSensor::PyGetYPosition() {
+ ShowDeprecationWarning("getYPosition()", "the position property");
+ return PyLong_FromSsize_t(m_y);
+}
+//<----- Deprecated
+
KX_PYMETHODDEF_DOC_O(SCA_MouseSensor, getButtonStatus,
"getButtonStatus(button)\n"
"\tGet the given button's status (KX_INPUT_NONE, KX_INPUT_NONE, KX_INPUT_JUST_ACTIVATED, KX_INPUT_ACTIVE, KX_INPUT_JUST_RELEASED).\n")
@@ -257,7 +282,7 @@ KX_PYMETHODDEF_DOC_O(SCA_MouseSensor, getButtonStatus,
return NULL;
}
- SCA_IInputDevice* mousedev = ((SCA_MouseManager *)m_eventmgr)->GetInputDevice();
+ SCA_IInputDevice* mousedev = m_pMouseMgr->GetInputDevice();
const SCA_InputEvent& event = mousedev->GetEventValue((SCA_IInputDevice::KX_EnumInputs) button);
return PyLong_FromSsize_t(event.m_status);
}
@@ -292,6 +317,10 @@ PyTypeObject SCA_MouseSensor::Type = {
};
PyMethodDef SCA_MouseSensor::Methods[] = {
+ //Deprecated functions ------>
+ {"getXPosition", (PyCFunction) SCA_MouseSensor::sPyGetXPosition, METH_VARARGS, (const char *)GetXPosition_doc},
+ {"getYPosition", (PyCFunction) SCA_MouseSensor::sPyGetYPosition, METH_VARARGS, (const char *)GetYPosition_doc},
+ //<----- Deprecated
KX_PYMETHODTABLE_O(SCA_MouseSensor, getButtonStatus),
{NULL,NULL} //Sentinel
};
diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.h b/source/gameengine/GameLogic/SCA_MouseSensor.h
index a679e605428..47f0378bf69 100644
--- a/source/gameengine/GameLogic/SCA_MouseSensor.h
+++ b/source/gameengine/GameLogic/SCA_MouseSensor.h
@@ -39,6 +39,7 @@
class SCA_MouseSensor : public SCA_ISensor
{
Py_Header;
+ class SCA_MouseManager* m_pMouseMgr;
/**
* Use SCA_IInputDevice values to encode the mouse mode for now.
@@ -106,6 +107,13 @@ class SCA_MouseSensor : public SCA_ISensor
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
+
+ //Deprecated functions ----->
+ /* read x-coordinate */
+ KX_PYMETHOD_DOC_NOARGS(SCA_MouseSensor,GetXPosition);
+ /* read y-coordinate */
+ KX_PYMETHOD_DOC_NOARGS(SCA_MouseSensor,GetYPosition);
+ //<----- deprecated
// get button status
KX_PYMETHOD_DOC_O(SCA_MouseSensor,getButtonStatus);
diff --git a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
index 9446487cdb7..5afb537c28a 100644
--- a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
@@ -250,6 +250,12 @@ PyTypeObject SCA_PropertyActuator::Type = {
};
PyMethodDef SCA_PropertyActuator::Methods[] = {
+ //Deprecated functions ------>
+ {"setProperty", (PyCFunction) SCA_PropertyActuator::sPySetProperty, METH_VARARGS, (const char *)SetProperty_doc},
+ {"getProperty", (PyCFunction) SCA_PropertyActuator::sPyGetProperty, METH_VARARGS, (const char *)GetProperty_doc},
+ {"setValue", (PyCFunction) SCA_PropertyActuator::sPySetValue, METH_VARARGS, (const char *)SetValue_doc},
+ {"getValue", (PyCFunction) SCA_PropertyActuator::sPyGetValue, METH_VARARGS, (const char *)GetValue_doc},
+ //<----- Deprecated
{NULL,NULL} //Sentinel
};
@@ -260,4 +266,71 @@ PyAttributeDef SCA_PropertyActuator::Attributes[] = {
{ NULL } //Sentinel
};
+/* 1. setProperty */
+const char SCA_PropertyActuator::SetProperty_doc[] =
+"setProperty(name)\n"
+"\t- name: string\n"
+"\tSet the property on which to operate. If there is no property\n"
+"\tof this name, the call is ignored.\n";
+PyObject* SCA_PropertyActuator::PySetProperty(PyObject* args, PyObject* kwds)
+{
+ ShowDeprecationWarning("setProperty()", "the 'propName' property");
+ /* Check whether the name exists first ! */
+ char *nameArg;
+ if (!PyArg_ParseTuple(args, "s:setProperty", &nameArg)) {
+ return NULL;
+ }
+
+ CValue* prop = GetParent()->FindIdentifier(nameArg);
+
+ if (!prop->IsError()) {
+ m_propname = nameArg;
+ } else {
+ ; /* not found ... */
+ }
+ prop->Release();
+
+ Py_RETURN_NONE;
+}
+
+/* 2. getProperty */
+const char SCA_PropertyActuator::GetProperty_doc[] =
+"getProperty(name)\n"
+"\tReturn the property on which the actuator operates.\n";
+PyObject* SCA_PropertyActuator::PyGetProperty(PyObject* args, PyObject* kwds)
+{
+ ShowDeprecationWarning("getProperty()", "the 'propName' property");
+ return PyUnicode_FromString(m_propname);
+}
+
+/* 3. setValue */
+const char SCA_PropertyActuator::SetValue_doc[] =
+"setValue(value)\n"
+"\t- value: string\n"
+"\tSet the value with which the actuator operates. If the value\n"
+"\tis not compatible with the type of the property, the subsequent\n"
+"\t action is ignored.\n";
+PyObject* SCA_PropertyActuator::PySetValue(PyObject* args, PyObject* kwds)
+{
+ ShowDeprecationWarning("setValue()", "the value property");
+ char *valArg;
+ if(!PyArg_ParseTuple(args, "s:setValue", &valArg)) {
+ return NULL;
+ }
+
+ if (valArg) m_exprtxt = valArg;
+
+ Py_RETURN_NONE;
+}
+
+/* 4. getValue */
+const char SCA_PropertyActuator::GetValue_doc[] =
+"getValue()\n"
+"\tReturns the value with which the actuator operates.\n";
+PyObject* SCA_PropertyActuator::PyGetValue(PyObject* args, PyObject* kwds)
+{
+ ShowDeprecationWarning("getValue()", "the value property");
+ return PyUnicode_FromString(m_exprtxt);
+}
+
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_PropertyActuator.h b/source/gameengine/GameLogic/SCA_PropertyActuator.h
index 833547a5cd3..8fb2e7a7bc5 100644
--- a/source/gameengine/GameLogic/SCA_PropertyActuator.h
+++ b/source/gameengine/GameLogic/SCA_PropertyActuator.h
@@ -83,6 +83,14 @@ public:
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
+
+ // python wrapped methods
+ KX_PYMETHOD_DOC(SCA_PropertyActuator,SetProperty);
+ KX_PYMETHOD_DOC(SCA_PropertyActuator,GetProperty);
+ KX_PYMETHOD_DOC(SCA_PropertyActuator,SetValue);
+ KX_PYMETHOD_DOC(SCA_PropertyActuator,GetValue);
+
+ /* 5. - ... setObject, getObject, setProp2, getProp2, setMode, getMode*/
};
diff --git a/source/gameengine/GameLogic/SCA_PropertyEventManager.h b/source/gameengine/GameLogic/SCA_PropertyEventManager.h
index a9692377df8..011f3285f63 100644
--- a/source/gameengine/GameLogic/SCA_PropertyEventManager.h
+++ b/source/gameengine/GameLogic/SCA_PropertyEventManager.h
@@ -40,17 +40,16 @@ class SCA_PropertyEventManager : public SCA_EventManager
class SCA_LogicManager* m_logicmgr;
public:
- SCA_PropertyEventManager(class SCA_LogicManager* logicmgr);
- virtual ~SCA_PropertyEventManager();
- virtual void NextFrame();
- //SCA_LogicManager* GetLogicManager() { return m_logicmgr;}
-
#ifdef WITH_CXX_GUARDEDALLOC
-public:
void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_PropertyEventManager"); }
void operator delete( void *mem ) { MEM_freeN(mem); }
#endif
+
+ SCA_PropertyEventManager(class SCA_LogicManager* logicmgr);
+ virtual ~SCA_PropertyEventManager();
+ virtual void NextFrame();
+ //SCA_LogicManager* GetLogicManager() { return m_logicmgr;}
};
#endif //__KX_PROPERTYEVENTMANAGER
diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
index 9c09c8410fb..96c769bd3d3 100644
--- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp
+++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
@@ -324,6 +324,14 @@ PyTypeObject SCA_PropertySensor::Type = {
};
PyMethodDef SCA_PropertySensor::Methods[] = {
+ //Deprecated functions ------>
+ {"getType", (PyCFunction) SCA_PropertySensor::sPyGetType, METH_NOARGS, (const char *)GetType_doc},
+ {"setType", (PyCFunction) SCA_PropertySensor::sPySetType, METH_VARARGS, (const char *)SetType_doc},
+ {"getProperty", (PyCFunction) SCA_PropertySensor::sPyGetProperty, METH_NOARGS, (const char *)GetProperty_doc},
+ {"setProperty", (PyCFunction) SCA_PropertySensor::sPySetProperty, METH_VARARGS, (const char *)SetProperty_doc},
+ {"getValue", (PyCFunction) SCA_PropertySensor::sPyGetValue, METH_NOARGS, (const char *)GetValue_doc},
+ {"setValue", (PyCFunction) SCA_PropertySensor::sPySetValue, METH_VARARGS, (const char *)SetValue_doc},
+ //<----- Deprecated
{NULL,NULL} //Sentinel
};
@@ -334,4 +342,111 @@ PyAttributeDef SCA_PropertySensor::Attributes[] = {
{ NULL } //Sentinel
};
+/* 1. getType */
+const char SCA_PropertySensor::GetType_doc[] =
+"getType()\n"
+"\tReturns the type of check this sensor performs.\n";
+PyObject* SCA_PropertySensor::PyGetType()
+{
+ ShowDeprecationWarning("getType()", "the mode property");
+ return PyLong_FromSsize_t(m_checktype);
+}
+
+/* 2. setType */
+const char SCA_PropertySensor::SetType_doc[] =
+"setType(type)\n"
+"\t- type: KX_PROPSENSOR_EQUAL, KX_PROPSENSOR_NOTEQUAL,\n"
+"\t KX_PROPSENSOR_INTERVAL, KX_PROPSENSOR_CHANGED,\n"
+"\t or KX_PROPSENSOR_EXPRESSION.\n"
+"\tSet the type of check to perform.\n";
+PyObject* SCA_PropertySensor::PySetType(PyObject* args)
+{
+ ShowDeprecationWarning("setType()", "the mode property");
+ int typeArg;
+
+ if (!PyArg_ParseTuple(args, "i:setType", &typeArg)) {
+ return NULL;
+ }
+
+ if ( (typeArg > KX_PROPSENSOR_NODEF)
+ && (typeArg < KX_PROPSENSOR_MAX) ) {
+ m_checktype = typeArg;
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* 3. getProperty */
+const char SCA_PropertySensor::GetProperty_doc[] =
+"getProperty()\n"
+"\tReturn the property with which the sensor operates.\n";
+PyObject* SCA_PropertySensor::PyGetProperty()
+{
+ ShowDeprecationWarning("getProperty()", "the 'propName' property");
+ return PyUnicode_FromString(m_checkpropname);
+}
+
+/* 4. setProperty */
+const char SCA_PropertySensor::SetProperty_doc[] =
+"setProperty(name)\n"
+"\t- name: string\n"
+"\tSets the property with which to operate. If there is no property\n"
+"\tof this name, the call is ignored.\n";
+PyObject* SCA_PropertySensor::PySetProperty(PyObject* args)
+{
+ ShowDeprecationWarning("setProperty()", "the 'propName' property");
+ /* We should query whether the name exists. Or should we create a prop */
+ /* on the fly? */
+ char *propNameArg = NULL;
+
+ if (!PyArg_ParseTuple(args, "s:setProperty", &propNameArg)) {
+ return NULL;
+ }
+
+ CValue *prop = FindIdentifier(STR_String(propNameArg));
+ if (!prop->IsError()) {
+ m_checkpropname = propNameArg;
+ } else {
+ ; /* error: bad property name */
+ }
+ prop->Release();
+ Py_RETURN_NONE;
+}
+
+/* 5. getValue */
+const char SCA_PropertySensor::GetValue_doc[] =
+"getValue()\n"
+"\tReturns the value with which the sensor operates.\n";
+PyObject* SCA_PropertySensor::PyGetValue()
+{
+ ShowDeprecationWarning("getValue()", "the value property");
+ return PyUnicode_FromString(m_checkpropval);
+}
+
+/* 6. setValue */
+const char SCA_PropertySensor::SetValue_doc[] =
+"setValue(value)\n"
+"\t- value: string\n"
+"\tSet the value with which the sensor operates. If the value\n"
+"\tis not compatible with the type of the property, the subsequent\n"
+"\t action is ignored.\n";
+PyObject* SCA_PropertySensor::PySetValue(PyObject* args)
+{
+ ShowDeprecationWarning("setValue()", "the value property");
+ /* Here, we need to check whether the value is 'valid' for this property.*/
+ /* We know that the property exists, or is NULL. */
+ char *propValArg = NULL;
+
+ if(!PyArg_ParseTuple(args, "s:setValue", &propValArg)) {
+ return NULL;
+ }
+ STR_String oldval = m_checkpropval;
+ m_checkpropval = propValArg;
+ if (validValueForProperty(m_proxy, NULL)) {
+ m_checkpropval = oldval;
+ return NULL;
+ }
+ Py_RETURN_NONE;
+}
+
/* eof */
diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.h b/source/gameengine/GameLogic/SCA_PropertySensor.h
index a5bbfc8438b..3513fcdf5ae 100644
--- a/source/gameengine/GameLogic/SCA_PropertySensor.h
+++ b/source/gameengine/GameLogic/SCA_PropertySensor.h
@@ -88,6 +88,18 @@ public:
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
+ /* 1. getType */
+ KX_PYMETHOD_DOC_NOARGS(SCA_PropertySensor,GetType);
+ /* 2. setType */
+ KX_PYMETHOD_DOC_VARARGS(SCA_PropertySensor,SetType);
+ /* 3. setProperty */
+ KX_PYMETHOD_DOC_VARARGS(SCA_PropertySensor,SetProperty);
+ /* 4. getProperty */
+ KX_PYMETHOD_DOC_NOARGS(SCA_PropertySensor,GetProperty);
+ /* 5. getValue */
+ KX_PYMETHOD_DOC_NOARGS(SCA_PropertySensor,GetValue);
+ /* 6. setValue */
+ KX_PYMETHOD_DOC_VARARGS(SCA_PropertySensor,SetValue);
/**
* Test whether this is a sensible value (type check)
*/
diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp
index ecaa8c508db..8ece7fb4ae1 100644
--- a/source/gameengine/GameLogic/SCA_PythonController.cpp
+++ b/source/gameengine/GameLogic/SCA_PythonController.cpp
@@ -204,7 +204,27 @@ SCA_IActuator* SCA_PythonController::LinkedActuatorFromPy(PyObject *value)
return false;
}
+/* warning, self is not the SCA_PythonController, its a PyObjectPlus_Proxy */
+PyObject* SCA_PythonController::sPyAddActiveActuator(PyObject* self, PyObject* args)
+{
+ ShowDeprecationWarning("GameLogic.addActiveActuator(act, bool)", "controller.activate(act) or controller.deactivate(act)");
+
+ PyObject* ob1;
+ int activate;
+ if (!PyArg_ParseTuple(args, "Oi:addActiveActuator", &ob1,&activate))
+ return NULL;
+
+ SCA_IActuator* actu = LinkedActuatorFromPy(ob1);
+ if(actu==NULL)
+ return NULL;
+
+ bool boolval = (activate!=0);
+ m_sCurrentLogicManager->AddActiveActuator((SCA_IActuator*)actu,boolval);
+ Py_RETURN_NONE;
+}
+
const char* SCA_PythonController::sPyGetCurrentController__doc__ = "getCurrentController()";
+const char* SCA_PythonController::sPyAddActiveActuator__doc__= "addActiveActuator(actuator,bool)";
PyTypeObject SCA_PythonController::Type = {
PyVarObject_HEAD_INIT(NULL, 0)
@@ -231,6 +251,11 @@ PyTypeObject SCA_PythonController::Type = {
PyMethodDef SCA_PythonController::Methods[] = {
{"activate", (PyCFunction) SCA_PythonController::sPyActivate, METH_O},
{"deactivate", (PyCFunction) SCA_PythonController::sPyDeActivate, METH_O},
+
+ //Deprecated functions ------>
+ {"setScript", (PyCFunction) SCA_PythonController::sPySetScript, METH_O},
+ {"getScript", (PyCFunction) SCA_PythonController::sPyGetScript, METH_NOARGS},
+ //<----- Deprecated
{NULL,NULL} //Sentinel
};
@@ -485,6 +510,33 @@ PyObject* SCA_PythonController::PyDeActivate(PyObject *value)
Py_RETURN_NONE;
}
+/* 1. getScript */
+PyObject* SCA_PythonController::PyGetScript()
+{
+ ShowDeprecationWarning("getScript()", "the script property");
+ return PyUnicode_FromString(m_scriptText);
+}
+
+/* 2. setScript */
+PyObject* SCA_PythonController::PySetScript(PyObject* value)
+{
+ char *scriptArg = _PyUnicode_AsString(value);
+
+ ShowDeprecationWarning("setScript()", "the script property");
+
+ if (scriptArg==NULL) {
+ PyErr_SetString(PyExc_TypeError, "expected a string (script name)");
+ return NULL;
+ }
+
+ /* set scripttext sets m_bModified to true,
+ so next time the script is needed, a reparse into byte code is done */
+
+ this->SetScriptText(scriptArg);
+
+ Py_RETURN_NONE;
+}
+
PyObject* SCA_PythonController::pyattr_get_script(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
//SCA_PythonController* self= static_cast<SCA_PythonController*>(static_cast<SCA_IController*>(static_cast<SCA_ILogicBrick*>(static_cast<CValue*>(static_cast<PyObjectPlus*>(self_v)))));
diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.cpp b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
index a3a5cc2303e..2b10f491378 100644
--- a/source/gameengine/GameLogic/SCA_RandomActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
@@ -337,6 +337,15 @@ PyTypeObject SCA_RandomActuator::Type = {
};
PyMethodDef SCA_RandomActuator::Methods[] = {
+ //Deprecated functions ------>
+ {"setSeed", (PyCFunction) SCA_RandomActuator::sPySetSeed, METH_VARARGS, (const char *)SetSeed_doc},
+ {"getSeed", (PyCFunction) SCA_RandomActuator::sPyGetSeed, METH_NOARGS, (const char *)GetSeed_doc},
+ {"getPara1", (PyCFunction) SCA_RandomActuator::sPyGetPara1, METH_NOARGS, (const char *)GetPara1_doc},
+ {"getPara2", (PyCFunction) SCA_RandomActuator::sPyGetPara2, METH_NOARGS, (const char *)GetPara2_doc},
+ {"getDistribution", (PyCFunction) SCA_RandomActuator::sPyGetDistribution, METH_NOARGS, (const char *)GetDistribution_doc},
+ {"setProperty", (PyCFunction) SCA_RandomActuator::sPySetProperty, METH_VARARGS, (const char *)SetProperty_doc},
+ {"getProperty", (PyCFunction) SCA_RandomActuator::sPyGetProperty, METH_NOARGS, (const char *)GetProperty_doc},
+ //<----- Deprecated
KX_PYMETHODTABLE(SCA_RandomActuator, setBoolConst),
KX_PYMETHODTABLE_NOARGS(SCA_RandomActuator, setBoolUniform),
KX_PYMETHODTABLE(SCA_RandomActuator, setBoolBernouilli),
@@ -380,6 +389,104 @@ int SCA_RandomActuator::pyattr_set_seed(void *self, const struct KX_PYATTRIBUTE_
}
}
+/* 1. setSeed */
+const char SCA_RandomActuator::SetSeed_doc[] =
+"setSeed(seed)\n"
+"\t- seed: integer\n"
+"\tSet the initial seed of the generator. Equal seeds produce\n"
+"\tequal series. If the seed is 0, the generator will produce\n"
+"\tthe same value on every call.\n";
+PyObject* SCA_RandomActuator::PySetSeed(PyObject* args) {
+ ShowDeprecationWarning("setSeed()", "the seed property");
+ long seedArg;
+ if(!PyArg_ParseTuple(args, "i:setSeed", &seedArg)) {
+ return NULL;
+ }
+
+ m_base->SetSeed(seedArg);
+
+ Py_RETURN_NONE;
+}
+/* 2. getSeed */
+const char SCA_RandomActuator::GetSeed_doc[] =
+"getSeed()\n"
+"\tReturns the initial seed of the generator. Equal seeds produce\n"
+"\tequal series.\n";
+PyObject* SCA_RandomActuator::PyGetSeed()
+{
+ ShowDeprecationWarning("getSeed()", "the seed property");
+ return PyLong_FromSsize_t(m_base->GetSeed());
+}
+
+/* 4. getPara1 */
+const char SCA_RandomActuator::GetPara1_doc[] =
+"getPara1()\n"
+"\tReturns the first parameter of the active distribution. Refer\n"
+"\tto the documentation of the generator types for the meaning\n"
+"\tof this value.";
+PyObject* SCA_RandomActuator::PyGetPara1()
+{
+ ShowDeprecationWarning("getPara1()", "the para1 property");
+ return PyFloat_FromDouble(m_parameter1);
+}
+
+/* 6. getPara2 */
+const char SCA_RandomActuator::GetPara2_doc[] =
+"getPara2()\n"
+"\tReturns the first parameter of the active distribution. Refer\n"
+"\tto the documentation of the generator types for the meaning\n"
+"\tof this value.";
+PyObject* SCA_RandomActuator::PyGetPara2()
+{
+ ShowDeprecationWarning("getPara2()", "the para2 property");
+ return PyFloat_FromDouble(m_parameter2);
+}
+
+/* 8. getDistribution */
+const char SCA_RandomActuator::GetDistribution_doc[] =
+"getDistribution()\n"
+"\tReturns the type of the active distribution.\n";
+PyObject* SCA_RandomActuator::PyGetDistribution()
+{
+ ShowDeprecationWarning("getDistribution()", "the distribution property");
+ return PyLong_FromSsize_t(m_distribution);
+}
+
+/* 9. setProperty */
+const char SCA_RandomActuator::SetProperty_doc[] =
+"setProperty(name)\n"
+"\t- name: string\n"
+"\tSet the property to which the random value is assigned. If the \n"
+"\tgenerator and property types do not match, the assignment is ignored.\n";
+PyObject* SCA_RandomActuator::PySetProperty(PyObject* args) {
+ ShowDeprecationWarning("setProperty()", "the 'propName' property");
+ char *nameArg;
+ if (!PyArg_ParseTuple(args, "s:setProperty", &nameArg)) {
+ return NULL;
+ }
+
+ CValue* prop = GetParent()->FindIdentifier(nameArg);
+
+ if (!prop->IsError()) {
+ m_propname = nameArg;
+ } else {
+ ; /* not found ... */
+ }
+ prop->Release();
+
+ Py_RETURN_NONE;
+}
+/* 10. getProperty */
+const char SCA_RandomActuator::GetProperty_doc[] =
+"getProperty(name)\n"
+"\tReturn the property to which the random value is assigned. If the \n"
+"\tgenerator and property types do not match, the assignment is ignored.\n";
+PyObject* SCA_RandomActuator::PyGetProperty()
+{
+ ShowDeprecationWarning("getProperty()", "the 'propName' property");
+ return PyUnicode_FromString(m_propname);
+}
+
/* 11. setBoolConst */
KX_PYMETHODDEF_DOC_VARARGS(SCA_RandomActuator, setBoolConst,
"setBoolConst(value)\n"
diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.h b/source/gameengine/GameLogic/SCA_RandomActuator.h
index f84c44b43c9..c7d3fe21217 100644
--- a/source/gameengine/GameLogic/SCA_RandomActuator.h
+++ b/source/gameengine/GameLogic/SCA_RandomActuator.h
@@ -99,6 +99,16 @@ class SCA_RandomActuator : public SCA_IActuator
static PyObject* pyattr_get_seed(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_seed(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+ // Deprecated methods ----->
+ KX_PYMETHOD_DOC_VARARGS(SCA_RandomActuator,SetSeed);
+ KX_PYMETHOD_DOC_NOARGS(SCA_RandomActuator,GetSeed);
+ KX_PYMETHOD_DOC_NOARGS(SCA_RandomActuator,GetPara1);
+ KX_PYMETHOD_DOC_NOARGS(SCA_RandomActuator,GetPara2);
+ KX_PYMETHOD_DOC_NOARGS(SCA_RandomActuator,GetDistribution);
+ KX_PYMETHOD_DOC_VARARGS(SCA_RandomActuator,SetProperty);
+ KX_PYMETHOD_DOC_NOARGS(SCA_RandomActuator,GetProperty);
+ // <-----
+
KX_PYMETHOD_DOC_VARARGS(SCA_RandomActuator, setBoolConst);
KX_PYMETHOD_DOC_NOARGS(SCA_RandomActuator, setBoolUniform);
KX_PYMETHOD_DOC_VARARGS(SCA_RandomActuator, setBoolBernouilli);
diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.cpp b/source/gameengine/GameLogic/SCA_RandomSensor.cpp
index 890875e61c6..a09d8328906 100644
--- a/source/gameengine/GameLogic/SCA_RandomSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomSensor.cpp
@@ -152,6 +152,11 @@ PyTypeObject SCA_RandomSensor::Type = {
};
PyMethodDef SCA_RandomSensor::Methods[] = {
+ //Deprecated functions ----->
+ {"setSeed", (PyCFunction) SCA_RandomSensor::sPySetSeed, METH_VARARGS, (const char *)SetSeed_doc},
+ {"getSeed", (PyCFunction) SCA_RandomSensor::sPyGetSeed, METH_NOARGS, (const char *)GetSeed_doc},
+ {"getLastDraw", (PyCFunction) SCA_RandomSensor::sPyGetLastDraw, METH_NOARGS, (const char *)GetLastDraw_doc},
+ //<----- Deprecated
{NULL,NULL} //Sentinel
};
@@ -161,6 +166,45 @@ PyAttributeDef SCA_RandomSensor::Attributes[] = {
{NULL} //Sentinel
};
+/* 1. setSeed */
+const char SCA_RandomSensor::SetSeed_doc[] =
+"setSeed(seed)\n"
+"\t- seed: integer\n"
+"\tSet the initial seed of the generator. Equal seeds produce\n"
+"\tequal series. If the seed is 0, the generator will produce\n"
+"\tthe same value on every call.\n";
+PyObject* SCA_RandomSensor::PySetSeed(PyObject* args) {
+ ShowDeprecationWarning("setSeed()", "the seed property");
+ long seedArg;
+ if(!PyArg_ParseTuple(args, "i:setSeed", &seedArg)) {
+ return NULL;
+ }
+
+ m_basegenerator->SetSeed(seedArg);
+
+ Py_RETURN_NONE;
+}
+
+/* 2. getSeed */
+const char SCA_RandomSensor::GetSeed_doc[] =
+"getSeed()\n"
+"\tReturns the initial seed of the generator. Equal seeds produce\n"
+"\tequal series.\n";
+PyObject* SCA_RandomSensor::PyGetSeed() {
+ ShowDeprecationWarning("getSeed()", "the seed property");
+ return PyLong_FromSsize_t(m_basegenerator->GetSeed());
+}
+
+/* 3. getLastDraw */
+const char SCA_RandomSensor::GetLastDraw_doc[] =
+"getLastDraw()\n"
+"\tReturn the last value that was drawn.\n";
+PyObject* SCA_RandomSensor::PyGetLastDraw() {
+ ShowDeprecationWarning("getLastDraw()", "the lastDraw property");
+ return PyLong_FromSsize_t(m_lastdraw);
+}
+
+
PyObject* SCA_RandomSensor::pyattr_get_seed(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
SCA_RandomSensor* self= static_cast<SCA_RandomSensor*>(self_v);
diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.h b/source/gameengine/GameLogic/SCA_RandomSensor.h
index f93cf57370e..5e66c36cccf 100644
--- a/source/gameengine/GameLogic/SCA_RandomSensor.h
+++ b/source/gameengine/GameLogic/SCA_RandomSensor.h
@@ -59,6 +59,13 @@ public:
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
+
+ /* 1. setSeed */
+ KX_PYMETHOD_DOC_VARARGS(SCA_RandomSensor,SetSeed);
+ /* 2. getSeed */
+ KX_PYMETHOD_DOC_NOARGS(SCA_RandomSensor,GetSeed);
+ /* 3. getLastDraw */
+ KX_PYMETHOD_DOC_NOARGS(SCA_RandomSensor,GetLastDraw);
static PyObject* pyattr_get_seed(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_seed(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
diff --git a/source/gameengine/GameLogic/SConscript b/source/gameengine/GameLogic/SConscript
index 1530c71c7f3..837769e5e78 100644
--- a/source/gameengine/GameLogic/SConscript
+++ b/source/gameengine/GameLogic/SConscript
@@ -17,8 +17,12 @@ if env['WITH_BF_SDL']:
else:
defs.append('DISABLE_SDL')
+cxxflags = []
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ cxxflags.append ('/GR')
+ cxxflags.append ('/O2')
+ cxxflags.append ('/EHsc')
if env['BF_DEBUG']:
defs.append('_DEBUG')
-env.BlenderLib ( 'bf_logic', sources, Split(incs), defs, libtype=['core','player'], priority=[330,65], cxx_compileflags=env['BGE_CXXFLAGS'])
+env.BlenderLib ( 'bf_logic', sources, Split(incs), defs, libtype=['core','player'], priority=[330, 100], cxx_compileflags=cxxflags )
diff --git a/source/gameengine/GamePlayer/CMakeLists.txt b/source/gameengine/GamePlayer/CMakeLists.txt
index 7b4fa4892df..134f8fce3b2 100644
--- a/source/gameengine/GamePlayer/CMakeLists.txt
+++ b/source/gameengine/GamePlayer/CMakeLists.txt
@@ -28,5 +28,5 @@ ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(ghost)
IF(WITH_WEBPLUGIN)
- ADD_SUBDIRECTORY(xembed)
+ ADD_SUBDIRECTORY(xembed)
ENDIF(WITH_WEBPLUGIN)
diff --git a/source/gameengine/GamePlayer/common/CMakeLists.txt b/source/gameengine/GamePlayer/common/CMakeLists.txt
index c865cf5ce25..af25f4b884e 100644
--- a/source/gameengine/GamePlayer/common/CMakeLists.txt
+++ b/source/gameengine/GamePlayer/common/CMakeLists.txt
@@ -25,50 +25,52 @@
# ***** END GPL LICENSE BLOCK *****
SET(SRC
- bmfont.cpp
- GPC_Canvas.cpp
- GPC_Engine.cpp
- GPC_KeyboardDevice.cpp
- GPC_MouseDevice.cpp
- GPC_RawImage.cpp
- GPC_RawLoadDotBlendArray.cpp
- GPC_RawLogoArrays.cpp
- GPC_RenderTools.cpp
- GPC_System.cpp
+ bmfont.cpp
+ GPC_Canvas.cpp
+ GPC_Engine.cpp
+ GPC_KeyboardDevice.cpp
+ GPC_MouseDevice.cpp
+ GPC_RawImage.cpp
+ GPC_RawLoadDotBlendArray.cpp
+ GPC_RawLogoArrays.cpp
+ GPC_RenderTools.cpp
+ GPC_System.cpp
)
SET(INC
- .
- ../../../../intern/string
- ../../../../intern/ghost
- ../../../../intern/guardedalloc
- ../../../../intern/moto/include
- ../../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
- ../../../../source/kernel/gen_system
- ../../../../source/kernel/gen_messaging
- ../../../../source/gameengine/Converter
- ../../../../source/blender/imbuf
- ../../../../source/gameengine/Ketsji
- ../../../../source/blender/blenlib
- ../../../../source/blender/blenkernel
- ../../../../source/blender
- ../../../../source/blender/include
- ../../../../source/blender/makesdna
- ../../../../source/gameengine/Rasterizer
- ../../../../source/gameengine/GameLogic
- ../../../../source/gameengine/Expressions
- ../../../../source/gameengine/Network
- ../../../../source/gameengine/SceneGraph
- ../../../../source/gameengine/Physics/common
- ../../../../source/gameengine/Network/LoopBackNetwork
- ../../../../source/gameengine/GamePlayer/ghost
- ../../../../source/blender/misc
- ../../../../source/blender/blenloader
- ../../../../source/blender/gpu
- ../../../../extern/glew/include
- ${PYTHON_INC}
- ${PNG_INC}
- ${ZLIB_INC}
+ .
+ ../../../../intern/string
+ ../../../../intern/ghost
+ ../../../../intern/guardedalloc
+ ../../../../intern/moto/include
+ ../../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
+ ../../../../source/kernel/gen_system
+ ../../../../source/kernel/gen_messaging
+ ../../../../source/gameengine/Converter
+ ../../../../source/blender/imbuf
+ ../../../../source/gameengine/Ketsji
+ ../../../../source/blender/blenlib
+ ../../../../source/blender/blenkernel
+ ../../../../source/blender
+ ../../../../source/blender/include
+ ../../../../source/blender/makesdna
+ ../../../../source/gameengine/Rasterizer
+ ../../../../source/gameengine/GameLogic
+ ../../../../source/gameengine/Expressions
+ ../../../../source/gameengine/Network
+ ../../../../source/gameengine/SceneGraph
+ ../../../../source/gameengine/Physics/common
+ ../../../../source/gameengine/Physics/Sumo
+ ../../../../source/gameengine/Physics/Sumo/Fuzzics/include
+ ../../../../source/gameengine/Network/LoopBackNetwork
+ ../../../../source/gameengine/GamePlayer/ghost
+ ../../../../source/blender/misc
+ ../../../../source/blender/blenloader
+ ../../../../source/blender/gpu
+ ../../../../extern/glew/include
+ ${PYTHON_INC}
+ ${PNG_INC}
+ ${ZLIB_INC}
)
BLENDERLIB_NOLIST(gp_common "${SRC}" "${INC}")
diff --git a/source/gameengine/GamePlayer/common/GPC_Engine.cpp b/source/gameengine/GamePlayer/common/GPC_Engine.cpp
index 85a362d042a..a46f30c1209 100644
--- a/source/gameengine/GamePlayer/common/GPC_Engine.cpp
+++ b/source/gameengine/GamePlayer/common/GPC_Engine.cpp
@@ -58,6 +58,7 @@
#include "NG_LoopBackNetworkDeviceInterface.h"
#include "RAS_IRenderTools.h"
+#include "SND_DeviceManager.h"
#include "GPC_Engine.h"
#include "GPC_KeyboardDevice.h"
@@ -74,7 +75,8 @@ GPC_Engine::GPC_Engine(char *customLoadingAnimationURL,
m_system(NULL), m_keyboarddev(NULL),
m_mousedev(NULL), m_canvas(NULL), m_rendertools(NULL),
m_portal(NULL), m_sceneconverter(NULL), m_networkdev(NULL),
- m_curarea(NULL), m_customLoadingAnimationURL(NULL),
+ m_audiodevice(NULL), m_curarea(NULL),
+ m_customLoadingAnimationURL(NULL),
m_foregroundColor(foregroundColor), m_backgroundColor(backgroundColor),
m_frameRate(frameRate),
m_BlenderLogo(0), m_Blender3DLogo(0)/*, m_NaNLogo(0)*/
@@ -199,6 +201,7 @@ bool GPC_Engine::StartKetsji(void)
m_keyboarddev,
m_mousedev,
m_networkdev,
+ m_audiodevice,
m_system);
m_system->SetMainLoop(m_portal->m_ketsjieng);
@@ -334,6 +337,12 @@ void GPC_Engine::Exit()
m_networkdev = 0;
}
+ if (m_audiodevice)
+ {
+ SND_DeviceManager::Unsubscribe();
+ m_audiodevice = 0;
+ }
+
m_initialized = false;
}
diff --git a/source/gameengine/GamePlayer/common/GPC_Engine.h b/source/gameengine/GamePlayer/common/GPC_Engine.h
index 42234bcbcd6..b7121599c6e 100644
--- a/source/gameengine/GamePlayer/common/GPC_Engine.h
+++ b/source/gameengine/GamePlayer/common/GPC_Engine.h
@@ -40,6 +40,7 @@ class RAS_IRenderTools;
class KetsjiPortal;
class KX_ISceneConverter;
class NG_LoopBackNetworkDeviceInterface;
+class SND_IAudioDevice;
class GPC_RawImage;
@@ -76,6 +77,8 @@ public:
KX_ISceneConverter* m_sceneconverter;
/** Network interface. */
NG_LoopBackNetworkDeviceInterface* m_networkdev;
+ /** Audiodevice interface */
+ SND_IAudioDevice* m_audiodevice;
struct ScrArea *m_curarea; // for future use, not used yet
diff --git a/source/gameengine/GamePlayer/common/SConscript b/source/gameengine/GamePlayer/common/SConscript
index dd5a48c2b55..1942cde2531 100644
--- a/source/gameengine/GamePlayer/common/SConscript
+++ b/source/gameengine/GamePlayer/common/SConscript
@@ -62,4 +62,10 @@ incs += Split(env['BF_PYTHON_INC'])
incs += Split(env['BF_PNG_INC'])
incs += Split(env['BF_ZLIB_INC'])
-env.BlenderLib (libname='gp_common', sources=source_files, includes=incs, defines = [], libtype=['player'], priority=[5], cxx_compileflags=env['BGE_CXXFLAGS'])
+cxxflags = []
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ cxxflags.append ('/GR')
+ cxxflags.append ('/O2')
+ cxxflags.append ('/EHsc')
+
+env.BlenderLib (libname='gp_common', sources=source_files, includes=incs, defines = [], libtype='player', priority=5, cxx_compileflags=cxxflags)
diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
index d50784cb967..e07a7fb26ad 100644
--- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt
+++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
@@ -25,49 +25,52 @@
# ***** END GPL LICENSE BLOCK *****
SET(SRC
- GPG_Application.cpp
- GPG_Canvas.cpp
- GPG_ghost.cpp
- GPG_KeyboardDevice.cpp
- GPG_System.cpp
+ GPG_Application.cpp
+ GPG_Canvas.cpp
+ GPG_ghost.cpp
+ GPG_KeyboardDevice.cpp
+ GPG_System.cpp
)
SET(INC
- .
- ../../../../intern/string
- ../../../../intern/ghost
- ../../../../intern/guardedalloc
- ../../../../intern/moto/include
- ../../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
- ../../../../source/kernel/gen_system
- ../../../../source/kernel/gen_messaging
- ../../../../source/gameengine/Converter
- ../../../../source/blender/imbuf
- ../../../../source/gameengine/Ketsji
- ../../../../source/blender/blenlib
- ../../../../source/blender/blenkernel
- ../../../../source/blender/readblenfile
- ../../../../source/blender
- ../../../../source/blender/include
- ../../../../source/blender/makesdna
- ../../../../source/blender/makesrna
- ../../../../source/gameengine/Rasterizer
- ../../../../source/gameengine/GameLogic
- ../../../../source/gameengine/Expressions
- ../../../../source/gameengine/Network
- ../../../../source/gameengine/SceneGraph
- ../../../../source/gameengine/Physics/common
- ../../../../source/gameengine/Network/LoopBackNetwork
- ../../../../source/gameengine/GamePlayer/common
- ../../../../source/blender/misc
- ../../../../source/blender/blenloader
- ../../../../source/blender/gpu
- ../../../../extern/glew/include
- ${PYTHON_INC}
+ .
+ ../../../../intern/string
+ ../../../../intern/ghost
+ ../../../../intern/guardedalloc
+ ../../../../intern/moto/include
+ ../../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
+ ../../../../source/kernel/gen_system
+ ../../../../source/kernel/gen_messaging
+ ../../../../source/gameengine/Converter
+ ../../../../source/blender/imbuf
+ ../../../../source/gameengine/Ketsji
+ ../../../../source/blender/blenlib
+ ../../../../source/blender/blenkernel
+ ../../../../source/blender/readblenfile
+ ../../../../source/blender
+ ../../../../source/blender/include
+ ../../../../source/blender/makesdna
+ ../../../../source/blender/makesrna
+ ../../../../source/gameengine/Rasterizer
+ ../../../../source/gameengine/GameLogic
+ ../../../../source/gameengine/Expressions
+ ../../../../source/gameengine/Network
+ ../../../../source/gameengine/SceneGraph
+ ../../../../source/gameengine/Physics/common
+ ../../../../source/gameengine/Physics/Sumo
+ ../../../../source/gameengine/Physics/Sumo/Fuzzics/include
+ ../../../../source/gameengine/Network/LoopBackNetwork
+ ../../../../source/gameengine/GamePlayer/common
+ ../../../../source/blender/misc
+ ../../../../source/blender/blenloader
+ ../../../../source/blender/gpu
+ ../../../../extern/solid
+ ../../../../extern/glew/include
+ ${PYTHON_INC}
)
IF(WITH_FFMPEG)
- ADD_DEFINITIONS(-DWITH_FFMPEG)
+ ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
BLENDERLIB_NOLIST(gp_ghost "${SRC}" "${INC}")
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index 8ec41968042..c9a2e81bdae 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -57,7 +57,6 @@ extern "C"
#include "BLO_readfile.h"
#include "BKE_global.h"
#include "BKE_main.h"
-#include "BKE_sound.h"
#include "IMB_imbuf.h"
#include "DNA_scene_types.h"
#ifdef __cplusplus
@@ -85,6 +84,7 @@ extern "C"
#include "KX_BlenderSceneConverter.h"
#include "NG_LoopBackNetworkDeviceInterface.h"
+#include "SND_DeviceManager.h"
#include "GPC_MouseDevice.h"
#include "GPC_RenderTools.h"
@@ -125,7 +125,8 @@ GPG_Application::GPG_Application(GHOST_ISystem* system)
m_rendertools(0),
m_rasterizer(0),
m_sceneconverter(0),
- m_networkdevice(0),
+ m_networkdevice(0),
+ m_audiodevice(0),
m_blendermat(0),
m_blenderglslmat(0),
m_pyGlobalDictString(0),
@@ -583,8 +584,13 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
if (!m_networkdevice)
goto initFailed;
- sound_init();
-
+ // get an audiodevice
+ SND_DeviceManager::Subscribe();
+ m_audiodevice = SND_DeviceManager::Instance();
+ if (!m_audiodevice)
+ goto initFailed;
+ m_audiodevice->UseCD();
+
// create a ketsjisystem (only needed for timing and stuff)
m_kxsystem = new GPG_System (m_system);
if (!m_kxsystem)
@@ -601,7 +607,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
m_ketsjiengine->SetRenderTools(m_rendertools);
m_ketsjiengine->SetRasterizer(m_rasterizer);
m_ketsjiengine->SetNetworkDevice(m_networkdevice);
-
+ m_ketsjiengine->SetAudioDevice(m_audiodevice);
m_ketsjiengine->SetTimingDisplay(frameRate, false, false);
CValue::SetDeprecationWarnings(nodepwarnings);
@@ -614,8 +620,8 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
return m_engineInitialized;
initFailed:
- sound_exit();
delete m_kxsystem;
+ delete m_audiodevice;
delete m_networkdevice;
delete m_mouse;
delete m_keyboard;
@@ -628,6 +634,7 @@ initFailed:
m_keyboard = NULL;
m_mouse = NULL;
m_networkdevice = NULL;
+ m_audiodevice = NULL;
m_kxsystem = NULL;
return false;
}
@@ -673,6 +680,7 @@ bool GPG_Application::startEngine(void)
KX_Scene* startscene = new KX_Scene(m_keyboard,
m_mouse,
m_networkdevice,
+ m_audiodevice,
startscenename,
m_startScene);
@@ -762,7 +770,6 @@ void GPG_Application::stopEngine()
void GPG_Application::exitEngine()
{
- sound_exit();
if (m_ketsjiengine)
{
stopEngine();
@@ -774,6 +781,11 @@ void GPG_Application::exitEngine()
delete m_kxsystem;
m_kxsystem = 0;
}
+ if (m_audiodevice)
+ {
+ SND_DeviceManager::Unsubscribe();
+ m_audiodevice = 0;
+ }
if (m_networkdevice)
{
delete m_networkdevice;
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.h b/source/gameengine/GamePlayer/ghost/GPG_Application.h
index 73430213078..845686f5770 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.h
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.h
@@ -38,6 +38,7 @@
class KX_KetsjiEngine;
class KX_ISceneConverter;
class NG_LoopBackNetworkDeviceInterface;
+class SND_IAudioDevice;
class RAS_IRasterizer;
class GHOST_IEvent;
class GHOST_ISystem;
@@ -141,6 +142,8 @@ protected:
KX_ISceneConverter* m_sceneconverter;
/** Network interface. */
NG_LoopBackNetworkDeviceInterface* m_networkdevice;
+ /** Sound device. */
+ SND_IAudioDevice* m_audiodevice;
bool m_blendermat;
bool m_blenderglslmat;
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index fb2e1c72a85..2433c587179 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -61,16 +61,12 @@ extern "C"
#include "BKE_report.h"
#include "BLI_blenlib.h"
#include "DNA_scene_types.h"
-#include "DNA_userdef_types.h"
#include "BLO_readfile.h"
#include "BLO_readblenfile.h"
#include "IMB_imbuf.h"
int GHOST_HACK_getFirstFile(char buf[]);
-extern char bprogname[]; /* holds a copy of argv[0], from creator.c */
-extern char btempdir[]; /* use this to store a valid temp directory */
-
#ifdef __cplusplus
}
#endif // __cplusplus
@@ -391,13 +387,6 @@ int main(int argc, char** argv)
}
}
#endif
- // XXX add the ability to change this values to the command line parsing.
- U.mixbufsize = 2048;
- U.audiodevice = 2;
- U.audiorate = 44100;
- U.audioformat = 0x24;
- U.audiochannels = 2;
-
for (i = 1; (i < argc) && !error
#ifdef WIN32
&& scr_saver_mode == SCREEN_SAVER_MODE_NONE
diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript
index fdd7792b72a..83bc61381c0 100644
--- a/source/gameengine/GamePlayer/ghost/SConscript
+++ b/source/gameengine/GamePlayer/ghost/SConscript
@@ -42,8 +42,14 @@ incs = ['.',
incs += Split(env['BF_PYTHON_INC'])
-defs = []
+cxxflags = []
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ cxxflags.append ('/GR')
+ cxxflags.append ('/O2')
+ cxxflags.append ('/EHsc')
+
+defs = ''
if env['WITH_BF_FFMPEG']:
- defs.append('WITH_FFMPEG')
+ defs += ' WITH_FFMPEG'
-env.BlenderLib (libname='gp_ghost', sources=source_files, includes = incs, defines = defs, libtype=['player'],priority=[0], cxx_compileflags=env['BGE_CXXFLAGS'])
+env.BlenderLib (libname='gp_ghost', sources=source_files, includes = incs, defines = Split(defs), libtype='player',priority=5, cxx_compileflags=cxxflags)
diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt
index 01d369bc7a9..77bdd80721f 100644
--- a/source/gameengine/Ketsji/CMakeLists.txt
+++ b/source/gameengine/Ketsji/CMakeLists.txt
@@ -27,45 +27,48 @@
FILE(GLOB SRC *.cpp)
SET(INC
- .
- ../../../source/kernel/gen_system
- ../../../intern/string
- ../../../intern/guardedalloc
- ../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
- ../../../source/gameengine/Converter
- ../../../source/blender/imbuf
- ../../../intern/ghost/include
- ../../../intern/moto/include
- ../../../source/gameengine/Ketsji
- ../../../source/blender/blenlib
- ../../../source/blender/blenkernel
- ../../../source/blender/python
- ../../../source/blender/python/generic
- ../../../source/blender
- ../../../source/blender/include
- ../../../source/blender/makesdna
- ../../../source/gameengine/Rasterizer
- ../../../source/gameengine/GameLogic
- ../../../source/gameengine/Expressions
- ../../../source/gameengine/Ketsji/KXNetwork
- ../../../source/gameengine/Network
- ../../../source/gameengine/SceneGraph
- ../../../source/gameengine/Physics/common
- ../../../source/gameengine/Physics/Bullet
- ../../../source/gameengine/Network/LoopBackNetwork
- ../../../intern/audaspace/intern
- ../../../source/blender/misc
- ../../../source/blender/blenloader
- ../../../source/blender/gpu
- ../../../extern/bullet2/src
- ../../../extern/glew/include
- ${PYTHON_INC}
+ .
+ ../../../source/kernel/gen_system
+ ../../../intern/string
+ ../../../intern/guardedalloc
+ ../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
+ ../../../source/gameengine/Converter
+ ../../../source/blender/imbuf
+ ../../../intern/ghost/include
+ ../../../intern/moto/include
+ ../../../source/gameengine/Ketsji
+ ../../../source/blender/blenlib
+ ../../../source/blender/blenkernel
+ ../../../source/blender/python
+ ../../../source/blender/python/generic
+ ../../../source/blender
+ ../../../source/blender/include
+ ../../../source/blender/makesdna
+ ../../../source/gameengine/Rasterizer
+ ../../../source/gameengine/GameLogic
+ ../../../source/gameengine/Expressions
+ ../../../source/gameengine/Ketsji/KXNetwork
+ ../../../source/gameengine/Network
+ ../../../source/gameengine/SceneGraph
+ ../../../source/gameengine/Physics/common
+ ../../../source/gameengine/Physics/Bullet
+ ../../../source/gameengine/Physics/Sumo
+ ../../../source/gameengine/Physics/Sumo/Fuzzics/include
+ ../../../source/gameengine/Network/LoopBackNetwork
+ ../../../intern/audaspace/intern
+ ../../../source/blender/misc
+ ../../../source/blender/blenloader
+ ../../../source/blender/gpu
+ ../../../extern/bullet2/src
+ ../../../extern/solid
+ ../../../extern/glew/include
+ ${PYTHON_INC}
)
IF(WITH_SDL)
- SET(INC ${INC} ${SDL_INCLUDE_DIR})
+ SET(INC ${INC} ${SDL_INCLUDE_DIR})
ELSE(WITH_SDL)
- ADD_DEFINITIONS(-DDISABLE_SDL)
+ ADD_DEFINITIONS(-DDISABLE_SDL)
ENDIF(WITH_SDL)
BLENDERLIB(bf_ketsji "${SRC}" "${INC}")
diff --git a/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt b/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
index b89b0dcff9f..d9a9fc54f4b 100644
--- a/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
+++ b/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
@@ -27,16 +27,16 @@
FILE(GLOB SRC *.cpp)
SET(INC
- .
- ../../../../source/kernel/gen_system
- ../../../../intern/string
- ../../../../intern/moto/include
- ../../../../source/gameengine/Ketsji
- ../../../../source/gameengine/GameLogic
- ../../../../source/gameengine/Expressions
- ../../../../source/gameengine/SceneGraph
- ../../../../source/gameengine/Network
- ${PYTHON_INC}
+ .
+ ../../../../source/kernel/gen_system
+ ../../../../intern/string
+ ../../../../intern/moto/include
+ ../../../../source/gameengine/Ketsji
+ ../../../../source/gameengine/GameLogic
+ ../../../../source/gameengine/Expressions
+ ../../../../source/gameengine/SceneGraph
+ ../../../../source/gameengine/Network
+ ${PYTHON_INC}
)
BLENDERLIB(kx_network "${SRC}" "${INC}")
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
index 3af8f765251..410cf308217 100644
--- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
+++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
@@ -123,6 +123,16 @@ PyTypeObject KX_NetworkMessageActuator::Type = {
};
PyMethodDef KX_NetworkMessageActuator::Methods[] = {
+ // Deprecated ----->
+ {"setToPropName", (PyCFunction)
+ KX_NetworkMessageActuator::sPySetToPropName, METH_VARARGS},
+ {"setSubject", (PyCFunction)
+ KX_NetworkMessageActuator::sPySetSubject, METH_VARARGS},
+ {"setBodyType", (PyCFunction)
+ KX_NetworkMessageActuator::sPySetBodyType, METH_VARARGS},
+ {"setBody", (PyCFunction)
+ KX_NetworkMessageActuator::sPySetBody, METH_VARARGS},
+ // <-----
{NULL,NULL} // Sentinel
};
@@ -133,3 +143,78 @@ PyAttributeDef KX_NetworkMessageActuator::Attributes[] = {
KX_PYATTRIBUTE_STRING_RW("body", 0, 16384, false, KX_NetworkMessageActuator, m_body),
{ NULL } //Sentinel
};
+
+// Deprecated ----->
+// 1. SetToPropName
+PyObject* KX_NetworkMessageActuator::PySetToPropName(
+ PyObject* args,
+ PyObject* kwds)
+{
+ ShowDeprecationWarning("setToProp()", "the propName property");
+ char* ToPropName;
+
+ if (PyArg_ParseTuple(args, "s:setToPropName", &ToPropName)) {
+ m_toPropName = ToPropName;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+// 2. SetSubject
+PyObject* KX_NetworkMessageActuator::PySetSubject(
+ PyObject* args,
+ PyObject* kwds)
+{
+ ShowDeprecationWarning("setSubject()", "the subject property");
+ char* Subject;
+
+ if (PyArg_ParseTuple(args, "s:setSubject", &Subject)) {
+ m_subject = Subject;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+// 3. SetBodyType
+PyObject* KX_NetworkMessageActuator::PySetBodyType(
+ PyObject* args,
+ PyObject* kwds)
+{
+ ShowDeprecationWarning("setBodyType()", "the usePropBody property");
+ int BodyType;
+
+ if (PyArg_ParseTuple(args, "i:setBodyType", &BodyType)) {
+ m_bPropBody = (BodyType != 0);
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+// 4. SetBody
+PyObject* KX_NetworkMessageActuator::PySetBody(
+ PyObject* args,
+ PyObject* kwds)
+{
+ ShowDeprecationWarning("setBody()", "the body property");
+ char* Body;
+
+ if (PyArg_ParseTuple(args, "s:setBody", &Body)) {
+ m_body = Body;
+ }
+ else {
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
+
+// <----- Deprecated
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h
index fa7a674c250..b4f55f2a466 100644
--- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h
+++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h
@@ -60,6 +60,13 @@ public:
/* Python interface ------------------------------------------- */
/* ------------------------------------------------------------ */
+ // Deprecated ----->
+ KX_PYMETHOD(KX_NetworkMessageActuator, SetToPropName);
+ KX_PYMETHOD(KX_NetworkMessageActuator, SetSubject);
+ KX_PYMETHOD(KX_NetworkMessageActuator, SetBodyType);
+ KX_PYMETHOD(KX_NetworkMessageActuator, SetBody);
+ // <-----
+
};
#endif //__KX_NETWORKMESSAGEACTUATOR_H
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
index 392e9dd9d1b..7123277d4ef 100644
--- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
+++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
@@ -53,6 +53,7 @@ KX_NetworkMessageSensor::KX_NetworkMessageSensor(
const STR_String &subject
) :
SCA_ISensor(gameobj,eventmgr),
+ m_Networkeventmgr(eventmgr),
m_NetworkScene(NetworkScene),
m_subject(subject),
m_frame_message_count (0),
@@ -186,6 +187,23 @@ PyTypeObject KX_NetworkMessageSensor::Type = {
};
PyMethodDef KX_NetworkMessageSensor::Methods[] = {
+ // Deprecated ----->
+ {"setSubjectFilterText", (PyCFunction)
+ KX_NetworkMessageSensor::sPySetSubjectFilterText, METH_O,
+ (const char *)SetSubjectFilterText_doc},
+ {"getFrameMessageCount", (PyCFunction)
+ KX_NetworkMessageSensor::sPyGetFrameMessageCount, METH_NOARGS,
+ (const char *)GetFrameMessageCount_doc},
+ {"getBodies", (PyCFunction)
+ KX_NetworkMessageSensor::sPyGetBodies, METH_NOARGS,
+ (const char *)GetBodies_doc},
+ {"getSubject", (PyCFunction)
+ KX_NetworkMessageSensor::sPyGetSubject, METH_NOARGS,
+ (const char *)GetSubject_doc},
+ {"getSubjects", (PyCFunction)
+ KX_NetworkMessageSensor::sPyGetSubjects, METH_NOARGS,
+ (const char *)GetSubjects_doc},
+ // <-----
{NULL,NULL} //Sentinel
};
@@ -216,3 +234,75 @@ PyObject* KX_NetworkMessageSensor::pyattr_get_subjects(void *self_v, const KX_PY
return (new CListValue())->NewProxy(true);
}
}
+
+// Deprecated ----->
+// 1. Set the message subject that this sensor listens for
+const char KX_NetworkMessageSensor::SetSubjectFilterText_doc[] =
+"\tsetSubjectFilterText(value)\n"
+"\tChange the message subject text that this sensor is listening to.\n";
+
+PyObject* KX_NetworkMessageSensor::PySetSubjectFilterText(PyObject* value)
+{
+ ShowDeprecationWarning("setSubjectFilterText()", "subject");
+ char* Subject = _PyUnicode_AsString(value);
+ if (Subject==NULL) {
+ PyErr_SetString(PyExc_TypeError, "sensor.tsetSubjectFilterText(string): KX_NetworkMessageSensor, expected a string message");
+ return NULL;
+ }
+
+ m_subject = Subject;
+ Py_RETURN_NONE;
+}
+
+// 2. Get the number of messages received since the last frame
+const char KX_NetworkMessageSensor::GetFrameMessageCount_doc[] =
+"\tgetFrameMessageCount()\n"
+"\tGet the number of messages received since the last frame.\n";
+
+PyObject* KX_NetworkMessageSensor::PyGetFrameMessageCount()
+{
+ ShowDeprecationWarning("getFrameMessageCount()", "frameMessageCount");
+ return PyLong_FromSsize_t(long(m_frame_message_count));
+}
+
+// 3. Get the message bodies
+const char KX_NetworkMessageSensor::GetBodies_doc[] =
+"\tgetBodies()\n"
+"\tGet the list of message bodies.\n";
+
+PyObject* KX_NetworkMessageSensor::PyGetBodies()
+{
+ ShowDeprecationWarning("getBodies()", "bodies");
+ if (m_BodyList) {
+ return m_BodyList->GetProxy();
+ } else {
+ return (new CListValue())->NewProxy(true);
+ }
+}
+
+// 4. Get the message subject: field of the message sensor
+const char KX_NetworkMessageSensor::GetSubject_doc[] =
+"\tgetSubject()\n"
+"\tGet the subject: field of the message sensor.\n";
+
+PyObject* KX_NetworkMessageSensor::PyGetSubject()
+{
+ ShowDeprecationWarning("getSubject()", "subject");
+ return PyUnicode_FromString(m_subject ? m_subject : "");
+}
+
+// 5. Get the message subjects
+const char KX_NetworkMessageSensor::GetSubjects_doc[] =
+"\tgetSubjects()\n"
+"\tGet list of message subjects.\n";
+
+PyObject* KX_NetworkMessageSensor::PyGetSubjects()
+{
+ ShowDeprecationWarning("getSubjects()", "subjects");
+ if (m_SubjectList) {
+ return m_SubjectList->GetProxy();
+ } else {
+ return (new CListValue())->NewProxy(true);
+ }
+}
+// <----- Deprecated
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
index d8a0651d2f1..ade87697303 100644
--- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
+++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
@@ -39,6 +39,7 @@ class KX_NetworkMessageSensor : public SCA_ISensor
{
// note: Py_Header MUST BE the first listed here
Py_Header;
+ KX_NetworkEventManager *m_Networkeventmgr;
NG_NetworkScene *m_NetworkScene;
// The subject we filter on.
@@ -70,6 +71,14 @@ public:
/* Python interface -------------------------------------------- */
/* ------------------------------------------------------------- */
+ // Deprecated ----->
+ KX_PYMETHOD_DOC_O(KX_NetworkMessageSensor, SetSubjectFilterText);
+ KX_PYMETHOD_DOC_NOARGS(KX_NetworkMessageSensor, GetFrameMessageCount);
+ KX_PYMETHOD_DOC_NOARGS(KX_NetworkMessageSensor, GetBodies);
+ KX_PYMETHOD_DOC_NOARGS(KX_NetworkMessageSensor, GetSubject);
+ KX_PYMETHOD_DOC_NOARGS(KX_NetworkMessageSensor, GetSubjects);
+ // <-----
+
/* attributes */
static PyObject* pyattr_get_bodies(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_subjects(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/Ketsji/KXNetwork/SConscript b/source/gameengine/Ketsji/KXNetwork/SConscript
index 8f88511acca..e6584b55ed2 100644
--- a/source/gameengine/Ketsji/KXNetwork/SConscript
+++ b/source/gameengine/Ketsji/KXNetwork/SConscript
@@ -9,4 +9,11 @@ incs += ' #source/gameengine/Network #source/gameengine/SceneGraph'
incs += ' ' + env['BF_PYTHON_INC']
-env.BlenderLib ( 'bf_network', Split(sources), Split(incs), defines=[],libtype=['core','player'], priority=[400,125], cxx_compileflags=env['BGE_CXXFLAGS'])
+cxxflags = []
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ cxxflags.append ('/GR')
+ cxxflags.append ('/O2')
+ cxxflags.append ('/EHsc')
+
+
+env.BlenderLib ( 'kx_network', Split(sources), Split(incs), defines=[],libtype=['core', 'player'], priority=[400, 145], cxx_compileflags=cxxflags )
diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp
index 0832809772d..fd289a0b55e 100644
--- a/source/gameengine/Ketsji/KX_Camera.cpp
+++ b/source/gameengine/Ketsji/KX_Camera.cpp
@@ -496,6 +496,12 @@ PyMethodDef KX_Camera::Methods[] = {
KX_PYMETHODTABLE_O(KX_Camera, getScreenPosition),
KX_PYMETHODTABLE(KX_Camera, getScreenVect),
KX_PYMETHODTABLE(KX_Camera, getScreenRay),
+
+ // DEPRECATED
+ KX_PYMETHODTABLE_O(KX_Camera, enableViewport),
+ KX_PYMETHODTABLE_NOARGS(KX_Camera, getProjectionMatrix),
+ KX_PYMETHODTABLE_O(KX_Camera, setProjectionMatrix),
+
{NULL,NULL} //Sentinel
};
@@ -674,6 +680,92 @@ KX_PYMETHODDEF_DOC_NOARGS(KX_Camera, getWorldToCamera,
return PyObjectFrom(GetWorldToCamera()); /* new ref */
}
+KX_PYMETHODDEF_DOC_NOARGS(KX_Camera, getProjectionMatrix,
+"getProjectionMatrix() -> Matrix4x4\n"
+"\treturns this camera's projection matrix, as a list of four lists of four values.\n\n"
+"\tie: [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]])\n"
+)
+{
+ ShowDeprecationWarning("getProjectionMatrix()", "the projection_matrix property");
+ return PyObjectFrom(GetProjectionMatrix()); /* new ref */
+}
+
+KX_PYMETHODDEF_DOC_O(KX_Camera, setProjectionMatrix,
+"setProjectionMatrix(MT_Matrix4x4 m) -> None\n"
+"\tSets this camera's projection matrix\n"
+"\n"
+"\tExample:\n"
+"\timport GameLogic\n"
+"\t# Set a perspective projection matrix\n"
+"\tdef Perspective(left, right, bottom, top, near, far):\n"
+"\t\tm = MT_Matrix4x4()\n"
+"\t\tm[0][0] = m[0][2] = right - left\n"
+"\t\tm[1][1] = m[1][2] = top - bottom\n"
+"\t\tm[2][2] = m[2][3] = -far - near\n"
+"\t\tm[3][2] = -1\n"
+"\t\tm[3][3] = 0\n"
+"\t\treturn m\n"
+"\n"
+"\t# Set an orthographic projection matrix\n"
+"\tdef Orthographic(left, right, bottom, top, near, far):\n"
+"\t\tm = MT_Matrix4x4()\n"
+"\t\tm[0][0] = right - left\n"
+"\t\tm[0][3] = -right - left\n"
+"\t\tm[1][1] = top - bottom\n"
+"\t\tm[1][3] = -top - bottom\n"
+"\t\tm[2][2] = far - near\n"
+"\t\tm[2][3] = -far - near\n"
+"\t\tm[3][3] = 1\n"
+"\t\treturn m\n"
+"\n"
+"\t# Set an isometric projection matrix\n"
+"\tdef Isometric(left, right, bottom, top, near, far):\n"
+"\t\tm = MT_Matrix4x4()\n"
+"\t\tm[0][0] = m[0][2] = m[1][1] = 0.8660254037844386\n"
+"\t\tm[1][0] = 0.25\n"
+"\t\tm[1][2] = -0.25\n"
+"\t\tm[3][3] = 1\n"
+"\t\treturn m\n"
+"\n"
+"\t"
+"\tco = GameLogic.getCurrentController()\n"
+"\tcam = co.getOwner()\n"
+"\tcam.setProjectionMatrix(Perspective(-1.0, 1.0, -1.0, 1.0, 0.1, 1))\n")
+{
+ ShowDeprecationWarning("setProjectionMatrix(mat)", "the projection_matrix property");
+
+ MT_Matrix4x4 mat;
+ if (!PyMatTo(value, mat))
+ {
+ PyErr_SetString(PyExc_TypeError, "camera.setProjectionMatrix(matrix): KX_Camera, expected 4x4 list as matrix argument.");
+ return NULL;
+ }
+
+ SetProjectionMatrix(mat);
+ Py_RETURN_NONE;
+}
+
+KX_PYMETHODDEF_DOC_O(KX_Camera, enableViewport,
+"enableViewport(viewport)\n"
+"Sets this camera's viewport status\n"
+)
+{
+ ShowDeprecationWarning("enableViewport(bool)", "the useViewport property");
+
+ int viewport = PyObject_IsTrue(value);
+ if (viewport == -1) {
+ PyErr_SetString(PyExc_ValueError, "camera.enableViewport(bool): KX_Camera, expected True/False or 0/1");
+ return NULL;
+ }
+
+ if(viewport)
+ EnableViewport(true);
+ else
+ EnableViewport(false);
+
+ Py_RETURN_NONE;
+}
+
KX_PYMETHODDEF_DOC_VARARGS(KX_Camera, setViewport,
"setViewport(left, bottom, right, top)\n"
"Sets this camera's viewport\n")
diff --git a/source/gameengine/Ketsji/KX_Camera.h b/source/gameengine/Ketsji/KX_Camera.h
index bf7a39d93c8..74c8e6d4e4f 100644
--- a/source/gameengine/Ketsji/KX_Camera.h
+++ b/source/gameengine/Ketsji/KX_Camera.h
@@ -273,7 +273,10 @@ public:
KX_PYMETHOD_DOC_NOARGS(KX_Camera, getCameraToWorld);
KX_PYMETHOD_DOC_NOARGS(KX_Camera, getWorldToCamera);
+ KX_PYMETHOD_DOC_NOARGS(KX_Camera, getProjectionMatrix);
+ KX_PYMETHOD_DOC_O(KX_Camera, setProjectionMatrix);
+ KX_PYMETHOD_DOC_O(KX_Camera, enableViewport);
KX_PYMETHOD_DOC_VARARGS(KX_Camera, setViewport);
KX_PYMETHOD_DOC_NOARGS(KX_Camera, setOnTop);
diff --git a/source/gameengine/Ketsji/KX_CameraActuator.cpp b/source/gameengine/Ketsji/KX_CameraActuator.cpp
index 9c00b5991af..faf0ca50407 100644
--- a/source/gameengine/Ketsji/KX_CameraActuator.cpp
+++ b/source/gameengine/Ketsji/KX_CameraActuator.cpp
@@ -38,6 +38,9 @@
#include "PyObjectPlus.h"
+STR_String KX_CameraActuator::X_AXIS_STRING = "x";
+STR_String KX_CameraActuator::Y_AXIS_STRING = "y";
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -350,6 +353,15 @@ CValue *KX_CameraActuator::findObject(char *obName)
return NULL;
}
+bool KX_CameraActuator::string2axischoice(const char *axisString)
+{
+ bool res = true;
+
+ res = !(axisString == Y_AXIS_STRING);
+
+ return res;
+}
+
/* ------------------------------------------------------------------------- */
/* Python functions */
/* ------------------------------------------------------------------------- */
@@ -378,6 +390,17 @@ PyTypeObject KX_CameraActuator::Type = {
};
PyMethodDef KX_CameraActuator::Methods[] = {
+ // ---> deprecated (all)
+ {"setObject",(PyCFunction) KX_CameraActuator::sPySetObject, METH_O, (const char *)SetObject_doc},
+ {"getObject",(PyCFunction) KX_CameraActuator::sPyGetObject, METH_VARARGS, (const char *)GetObject_doc},
+ {"setMin" ,(PyCFunction) KX_CameraActuator::sPySetMin, METH_VARARGS, (const char *)SetMin_doc},
+ {"getMin" ,(PyCFunction) KX_CameraActuator::sPyGetMin, METH_NOARGS, (const char *)GetMin_doc},
+ {"setMax" ,(PyCFunction) KX_CameraActuator::sPySetMax, METH_VARARGS, (const char *)SetMax_doc},
+ {"getMax" ,(PyCFunction) KX_CameraActuator::sPyGetMax, METH_NOARGS, (const char *)GetMax_doc},
+ {"setHeight",(PyCFunction) KX_CameraActuator::sPySetHeight, METH_VARARGS, (const char *)SetHeight_doc},
+ {"getHeight",(PyCFunction) KX_CameraActuator::sPyGetHeight, METH_NOARGS, (const char *)GetHeight_doc},
+ {"setXY" ,(PyCFunction) KX_CameraActuator::sPySetXY, METH_VARARGS, (const char *)SetXY_doc},
+ {"getXY" ,(PyCFunction) KX_CameraActuator::sPyGetXY, METH_NOARGS, (const char *)GetXY_doc},
{NULL,NULL,NULL,NULL} //Sentinel
};
@@ -390,6 +413,152 @@ PyAttributeDef KX_CameraActuator::Attributes[] = {
{NULL}
};
+/* get obj ---------------------------------------------------------- */
+const char KX_CameraActuator::GetObject_doc[] =
+"getObject(name_only = 1)\n"
+"name_only - optional arg, when true will return the KX_GameObject rather then its name\n"
+"\tReturns the object this sensor reacts to.\n";
+PyObject* KX_CameraActuator::PyGetObject(PyObject* args)
+{
+ int ret_name_only = 1;
+
+ ShowDeprecationWarning("getObject()", "the object property");
+
+ if (!PyArg_ParseTuple(args, "|i:getObject", &ret_name_only))
+ return NULL;
+
+ if (!m_ob)
+ Py_RETURN_NONE;
+
+ if (ret_name_only)
+ return PyUnicode_FromString(m_ob->GetName().ReadPtr());
+ else
+ return m_ob->GetProxy();
+}
+/* set obj ---------------------------------------------------------- */
+const char KX_CameraActuator::SetObject_doc[] =
+"setObject(object)\n"
+"\t- object: KX_GameObject, string or None\n"
+"\tSets the object this sensor reacts to.\n";
+PyObject* KX_CameraActuator::PySetObject(PyObject* value)
+{
+ KX_GameObject *gameobj;
+
+ ShowDeprecationWarning("setObject()", "the object property");
+
+ if (!ConvertPythonToGameObject(value, &gameobj, true, "actuator.setObject(value): KX_CameraActuator"))
+ return NULL; // ConvertPythonToGameObject sets the error
+
+ if (m_ob != NULL)
+ m_ob->UnregisterActuator(this);
+
+ m_ob = (SCA_IObject*)gameobj;
+ if (m_ob)
+ m_ob->RegisterActuator(this);
+
+ Py_RETURN_NONE;
+}
+
+/* get min ---------------------------------------------------------- */
+const char KX_CameraActuator::GetMin_doc[] =
+"getMin\n"
+"\tReturns the minimum value set in the Min: field.\n";
+PyObject* KX_CameraActuator::PyGetMin()
+{
+ ShowDeprecationWarning("getMin()", "the min property");
+ return PyFloat_FromDouble(m_minHeight);
+}
+/* set min ---------------------------------------------------------- */
+const char KX_CameraActuator::SetMin_doc[] =
+"setMin\n"
+"\tSets the minimum value.\n";
+PyObject* KX_CameraActuator::PySetMin(PyObject* args)
+{
+ ShowDeprecationWarning("setMin()", "the min property");
+ float min;
+ if(PyArg_ParseTuple(args,"f:setMin", &min))
+ {
+ m_minHeight = min;
+ Py_RETURN_NONE;
+ }
+ return NULL;
+}
+/* get min ---------------------------------------------------------- */
+const char KX_CameraActuator::GetMax_doc[] =
+"getMax\n"
+"\tReturns the maximum value set in the Max: field.\n";
+PyObject* KX_CameraActuator::PyGetMax()
+{
+ ShowDeprecationWarning("getMax()", "the max property");
+ return PyFloat_FromDouble(m_maxHeight);
+}
+/* set min ---------------------------------------------------------- */
+const char KX_CameraActuator::SetMax_doc[] =
+"setMax\n"
+"\tSets the maximum value.\n";
+PyObject* KX_CameraActuator::PySetMax(PyObject* args)
+{
+ ShowDeprecationWarning("getMax()", "the max property");
+ float max;
+ if(PyArg_ParseTuple(args,"f:setMax", &max))
+ {
+ m_maxHeight = max;
+ Py_RETURN_NONE;
+ }
+ return NULL;
+}
+/* get height ---------------------------------------------------------- */
+const char KX_CameraActuator::GetHeight_doc[] =
+"getHeight\n"
+"\tReturns the height value set in the height: field.\n";
+PyObject* KX_CameraActuator::PyGetHeight()
+{
+ ShowDeprecationWarning("getHeight()", "the height property");
+ return PyFloat_FromDouble(m_height);
+}
+/* set height ---------------------------------------------------------- */
+const char KX_CameraActuator::SetHeight_doc[] =
+"setHeight\n"
+"\tSets the height value.\n";
+PyObject* KX_CameraActuator::PySetHeight(PyObject* args)
+{
+ ShowDeprecationWarning("getHeight()", "the height property");
+ float height;
+ if(PyArg_ParseTuple(args,"f:setHeight", &height))
+ {
+ m_height = height;
+ Py_RETURN_NONE;
+ }
+ return NULL;
+}
+/* set XY ---------------------------------------------------------- */
+const char KX_CameraActuator::SetXY_doc[] =
+"setXY\n"
+"\tSets axis the camera tries to get behind.\n"
+"\t1=x, 0=y\n";
+PyObject* KX_CameraActuator::PySetXY(PyObject* args)
+{
+ ShowDeprecationWarning("setXY()", "the useXY property");
+ int value;
+ if(PyArg_ParseTuple(args,"i:setXY", &value))
+ {
+ m_x = value != 0;
+ Py_RETURN_NONE;
+ }
+ return NULL;
+}
+
+/* get XY -------------------------------------------------------------*/
+const char KX_CameraActuator::GetXY_doc[] =
+"getXY\n"
+"\tGets the axis the camera tries to get behind.\n"
+"\tTrue = X, False = Y\n";
+PyObject* KX_CameraActuator::PyGetXY()
+{
+ ShowDeprecationWarning("getXY()", "the xy property");
+ return PyLong_FromSsize_t(m_x);
+}
+
PyObject* KX_CameraActuator::pyattr_get_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
KX_CameraActuator* self= static_cast<KX_CameraActuator*>(self_v);
diff --git a/source/gameengine/Ketsji/KX_CameraActuator.h b/source/gameengine/Ketsji/KX_CameraActuator.h
index e047e3724ea..057c6fed770 100644
--- a/source/gameengine/Ketsji/KX_CameraActuator.h
+++ b/source/gameengine/Ketsji/KX_CameraActuator.h
@@ -119,6 +119,18 @@ private :
/* --------------------------------------------------------------------- */
/* set object to look at */
+ KX_PYMETHOD_DOC_O(KX_CameraActuator,SetObject);
+ /* get current object */
+ KX_PYMETHOD_DOC_VARARGS(KX_CameraActuator,GetObject);
+ KX_PYMETHOD_DOC_VARARGS(KX_CameraActuator,SetMin);
+ KX_PYMETHOD_DOC_NOARGS(KX_CameraActuator,GetMin);
+ KX_PYMETHOD_DOC_VARARGS(KX_CameraActuator,SetMax);
+ KX_PYMETHOD_DOC_NOARGS(KX_CameraActuator,GetMax);
+ KX_PYMETHOD_DOC_VARARGS(KX_CameraActuator,SetHeight);
+ KX_PYMETHOD_DOC_NOARGS(KX_CameraActuator,GetHeight);
+ KX_PYMETHOD_DOC_VARARGS(KX_CameraActuator,SetXY);
+ KX_PYMETHOD_DOC_NOARGS(KX_CameraActuator,GetXY);
+
static PyObject* pyattr_get_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
index 7f1d2c7d53c..5f6244c3ab6 100644
--- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
+++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
@@ -587,6 +587,30 @@ PyTypeObject KX_ConstraintActuator::Type = {
};
PyMethodDef KX_ConstraintActuator::Methods[] = {
+ // Deprecated -->
+ {"setDamp", (PyCFunction) KX_ConstraintActuator::sPySetDamp, METH_VARARGS, (const char *)SetDamp_doc},
+ {"getDamp", (PyCFunction) KX_ConstraintActuator::sPyGetDamp, METH_NOARGS, (const char *)GetDamp_doc},
+ {"setRotDamp", (PyCFunction) KX_ConstraintActuator::sPySetRotDamp, METH_VARARGS, (const char *)SetRotDamp_doc},
+ {"getRotDamp", (PyCFunction) KX_ConstraintActuator::sPyGetRotDamp, METH_NOARGS, (const char *)GetRotDamp_doc},
+ {"setDirection", (PyCFunction) KX_ConstraintActuator::sPySetDirection, METH_VARARGS, (const char *)SetDirection_doc},
+ {"getDirection", (PyCFunction) KX_ConstraintActuator::sPyGetDirection, METH_NOARGS, (const char *)GetDirection_doc},
+ {"setOption", (PyCFunction) KX_ConstraintActuator::sPySetOption, METH_VARARGS, (const char *)SetOption_doc},
+ {"getOption", (PyCFunction) KX_ConstraintActuator::sPyGetOption, METH_NOARGS, (const char *)GetOption_doc},
+ {"setTime", (PyCFunction) KX_ConstraintActuator::sPySetTime, METH_VARARGS, (const char *)SetTime_doc},
+ {"getTime", (PyCFunction) KX_ConstraintActuator::sPyGetTime, METH_NOARGS, (const char *)GetTime_doc},
+ {"setProperty", (PyCFunction) KX_ConstraintActuator::sPySetProperty, METH_VARARGS, (const char *)SetProperty_doc},
+ {"getProperty", (PyCFunction) KX_ConstraintActuator::sPyGetProperty, METH_NOARGS, (const char *)GetProperty_doc},
+ {"setMin", (PyCFunction) KX_ConstraintActuator::sPySetMin, METH_VARARGS, (const char *)SetMin_doc},
+ {"getMin", (PyCFunction) KX_ConstraintActuator::sPyGetMin, METH_NOARGS, (const char *)GetMin_doc},
+ {"setDistance", (PyCFunction) KX_ConstraintActuator::sPySetMin, METH_VARARGS, (const char *)SetDistance_doc},
+ {"getDistance", (PyCFunction) KX_ConstraintActuator::sPyGetMin, METH_NOARGS, (const char *)GetDistance_doc},
+ {"setMax", (PyCFunction) KX_ConstraintActuator::sPySetMax, METH_VARARGS, (const char *)SetMax_doc},
+ {"getMax", (PyCFunction) KX_ConstraintActuator::sPyGetMax, METH_NOARGS, (const char *)GetMax_doc},
+ {"setRayLength", (PyCFunction) KX_ConstraintActuator::sPySetMax, METH_VARARGS, (const char *)SetRayLength_doc},
+ {"getRayLength", (PyCFunction) KX_ConstraintActuator::sPyGetMax, METH_NOARGS, (const char *)GetRayLength_doc},
+ {"setLimit", (PyCFunction) KX_ConstraintActuator::sPySetLimit, METH_VARARGS, (const char *)SetLimit_doc},
+ {"getLimit", (PyCFunction) KX_ConstraintActuator::sPyGetLimit, METH_NOARGS, (const char *)GetLimit_doc},
+ // <--
{NULL,NULL} //Sentinel
};
@@ -618,4 +642,318 @@ int KX_ConstraintActuator::pyattr_check_direction(void *self, const struct KX_PY
return 0;
}
+/* 2. setDamp */
+const char KX_ConstraintActuator::SetDamp_doc[] =
+"setDamp(duration)\n"
+"\t- duration: integer\n"
+"\tSets the time constant of the orientation and distance constraint.\n"
+"\tIf the duration is negative, it is set to 0.\n";
+PyObject* KX_ConstraintActuator::PySetDamp(PyObject* args) {
+ ShowDeprecationWarning("setDamp()", "the damp property");
+ int dampArg;
+ if(!PyArg_ParseTuple(args, "i:setDamp", &dampArg)) {
+ return NULL;
+ }
+
+ m_posDampTime = dampArg;
+ if (m_posDampTime < 0) m_posDampTime = 0;
+
+ Py_RETURN_NONE;
+}
+/* 3. getDamp */
+const char KX_ConstraintActuator::GetDamp_doc[] =
+"getDamp()\n"
+"\tReturns the damping parameter.\n";
+PyObject* KX_ConstraintActuator::PyGetDamp(){
+ ShowDeprecationWarning("getDamp()", "the damp property");
+ return PyLong_FromSsize_t(m_posDampTime);
+}
+
+/* 2. setRotDamp */
+const char KX_ConstraintActuator::SetRotDamp_doc[] =
+"setRotDamp(duration)\n"
+"\t- duration: integer\n"
+"\tSets the time constant of the orientation constraint.\n"
+"\tIf the duration is negative, it is set to 0.\n";
+PyObject* KX_ConstraintActuator::PySetRotDamp(PyObject* args) {
+ ShowDeprecationWarning("setRotDamp()", "the rotDamp property");
+ int dampArg;
+ if(!PyArg_ParseTuple(args, "i:setRotDamp", &dampArg)) {
+ return NULL;
+ }
+
+ m_rotDampTime = dampArg;
+ if (m_rotDampTime < 0) m_rotDampTime = 0;
+
+ Py_RETURN_NONE;
+}
+/* 3. getRotDamp */
+const char KX_ConstraintActuator::GetRotDamp_doc[] =
+"getRotDamp()\n"
+"\tReturns the damping time for application of the constraint.\n";
+PyObject* KX_ConstraintActuator::PyGetRotDamp(){
+ ShowDeprecationWarning("getRotDamp()", "the rotDamp property");
+ return PyLong_FromSsize_t(m_rotDampTime);
+}
+
+/* 2. setDirection */
+const char KX_ConstraintActuator::SetDirection_doc[] =
+"setDirection(vector)\n"
+"\t- vector: 3-tuple\n"
+"\tSets the reference direction in world coordinate for the orientation constraint.\n";
+PyObject* KX_ConstraintActuator::PySetDirection(PyObject* args) {
+ ShowDeprecationWarning("setDirection()", "the direction property");
+ float x, y, z;
+ MT_Scalar len;
+ MT_Vector3 dir;
+
+ if(!PyArg_ParseTuple(args, "(fff):setDirection", &x, &y, &z)) {
+ return NULL;
+ }
+ dir[0] = x;
+ dir[1] = y;
+ dir[2] = z;
+ len = dir.length();
+ if (MT_fuzzyZero(len)) {
+ std::cout << "Invalid direction" << std::endl;
+ return NULL;
+ }
+ m_refDirVector = dir/len;
+ m_refDirection[0] = x/len;
+ m_refDirection[1] = y/len;
+ m_refDirection[2] = z/len;
+
+ Py_RETURN_NONE;
+}
+/* 3. getDirection */
+const char KX_ConstraintActuator::GetDirection_doc[] =
+"getDirection()\n"
+"\tReturns the reference direction of the orientation constraint as a 3-tuple.\n";
+PyObject* KX_ConstraintActuator::PyGetDirection(){
+ ShowDeprecationWarning("getDirection()", "the direction property");
+ PyObject *retVal = PyList_New(3);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_refDirection[0]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_refDirection[1]));
+ PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_refDirection[2]));
+ return retVal;
+}
+
+/* 2. setOption */
+const char KX_ConstraintActuator::SetOption_doc[] =
+"setOption(option)\n"
+"\t- option: integer\n"
+"\tSets several options of the distance constraint.\n"
+"\tBinary combination of the following values:\n"
+"\t\t 64 : Activate alignment to surface\n"
+"\t\t128 : Detect material rather than property\n"
+"\t\t256 : No deactivation if ray does not hit target\n"
+"\t\t512 : Activate distance control\n";
+PyObject* KX_ConstraintActuator::PySetOption(PyObject* args) {
+ ShowDeprecationWarning("setOption()", "the option property");
+ int option;
+ if(!PyArg_ParseTuple(args, "i:setOption", &option)) {
+ return NULL;
+ }
+
+ m_option = option;
+
+ Py_RETURN_NONE;
+}
+/* 3. getOption */
+const char KX_ConstraintActuator::GetOption_doc[] =
+"getOption()\n"
+"\tReturns the option parameter.\n";
+PyObject* KX_ConstraintActuator::PyGetOption(){
+ ShowDeprecationWarning("getOption()", "the option property");
+ return PyLong_FromSsize_t(m_option);
+}
+
+/* 2. setTime */
+const char KX_ConstraintActuator::SetTime_doc[] =
+"setTime(duration)\n"
+"\t- duration: integer\n"
+"\tSets the activation time of the actuator.\n"
+"\tThe actuator disables itself after this many frame.\n"
+"\tIf set to 0 or negative, the actuator is not limited in time.\n";
+PyObject* KX_ConstraintActuator::PySetTime(PyObject* args) {
+ ShowDeprecationWarning("setTime()", "the time property");
+ int t;
+ if(!PyArg_ParseTuple(args, "i:setTime", &t)) {
+ return NULL;
+ }
+
+ if (t < 0)
+ t = 0;
+ m_activeTime = t;
+
+ Py_RETURN_NONE;
+}
+/* 3. getTime */
+const char KX_ConstraintActuator::GetTime_doc[] =
+"getTime()\n"
+"\tReturns the time parameter.\n";
+PyObject* KX_ConstraintActuator::PyGetTime(){
+ ShowDeprecationWarning("getTime()", "the time property");
+ return PyLong_FromSsize_t(m_activeTime);
+}
+
+/* 2. setProperty */
+const char KX_ConstraintActuator::SetProperty_doc[] =
+"setProperty(property)\n"
+"\t- property: string\n"
+"\tSets the name of the property or material for the ray detection of the distance constraint.\n"
+"\tIf empty, the ray will detect any collisioning object.\n";
+PyObject* KX_ConstraintActuator::PySetProperty(PyObject* args) {
+ ShowDeprecationWarning("setProperty()", "the 'property' property");
+ char *property;
+ if (!PyArg_ParseTuple(args, "s:setProperty", &property)) {
+ return NULL;
+ }
+ if (property == NULL) {
+ m_property = "";
+ } else {
+ m_property = property;
+ }
+
+ Py_RETURN_NONE;
+}
+/* 3. getProperty */
+const char KX_ConstraintActuator::GetProperty_doc[] =
+"getProperty()\n"
+"\tReturns the property parameter.\n";
+PyObject* KX_ConstraintActuator::PyGetProperty(){
+ ShowDeprecationWarning("getProperty()", "the 'property' property");
+ return PyUnicode_FromString(m_property.Ptr());
+}
+
+/* 4. setDistance */
+const char KX_ConstraintActuator::SetDistance_doc[] =
+"setDistance(distance)\n"
+"\t- distance: float\n"
+"\tSets the target distance in distance constraint\n";
+/* 4. setMin */
+const char KX_ConstraintActuator::SetMin_doc[] =
+"setMin(lower_bound)\n"
+"\t- lower_bound: float\n"
+"\tSets the lower value of the interval to which the value\n"
+"\tis clipped.\n";
+PyObject* KX_ConstraintActuator::PySetMin(PyObject* args) {
+ ShowDeprecationWarning("setMin() or setDistance()", "the min or distance property");
+ float minArg;
+ if(!PyArg_ParseTuple(args, "f:setMin", &minArg)) {
+ return NULL;
+ }
+
+ switch (m_locrot) {
+ default:
+ m_minimumBound = minArg;
+ break;
+ case KX_ACT_CONSTRAINT_ROTX:
+ case KX_ACT_CONSTRAINT_ROTY:
+ case KX_ACT_CONSTRAINT_ROTZ:
+ m_minimumBound = MT_radians(minArg);
+ break;
+ }
+
+ Py_RETURN_NONE;
+}
+/* 5. getDistance */
+const char KX_ConstraintActuator::GetDistance_doc[] =
+"getDistance()\n"
+"\tReturns the distance parameter \n";
+/* 5. getMin */
+const char KX_ConstraintActuator::GetMin_doc[] =
+"getMin()\n"
+"\tReturns the lower value of the interval to which the value\n"
+"\tis clipped.\n";
+PyObject* KX_ConstraintActuator::PyGetMin() {
+ ShowDeprecationWarning("getMin() or getDistance()", "the min or distance property");
+ return PyFloat_FromDouble(m_minimumBound);
+}
+
+/* 6. setRayLength */
+const char KX_ConstraintActuator::SetRayLength_doc[] =
+"setRayLength(length)\n"
+"\t- length: float\n"
+"\tSets the maximum ray length of the distance constraint\n";
+/* 6. setMax */
+const char KX_ConstraintActuator::SetMax_doc[] =
+"setMax(upper_bound)\n"
+"\t- upper_bound: float\n"
+"\tSets the upper value of the interval to which the value\n"
+"\tis clipped.\n";
+PyObject* KX_ConstraintActuator::PySetMax(PyObject* args){
+ ShowDeprecationWarning("setMax() or setRayLength()", "the max or rayLength property");
+ float maxArg;
+ if(!PyArg_ParseTuple(args, "f:setMax", &maxArg)) {
+ return NULL;
+ }
+
+ switch (m_locrot) {
+ default:
+ m_maximumBound = maxArg;
+ break;
+ case KX_ACT_CONSTRAINT_ROTX:
+ case KX_ACT_CONSTRAINT_ROTY:
+ case KX_ACT_CONSTRAINT_ROTZ:
+ m_maximumBound = MT_radians(maxArg);
+ break;
+ }
+
+ Py_RETURN_NONE;
+}
+/* 7. getRayLength */
+const char KX_ConstraintActuator::GetRayLength_doc[] =
+"getRayLength()\n"
+"\tReturns the length of the ray\n";
+/* 7. getMax */
+const char KX_ConstraintActuator::GetMax_doc[] =
+"getMax()\n"
+"\tReturns the upper value of the interval to which the value\n"
+"\tis clipped.\n";
+PyObject* KX_ConstraintActuator::PyGetMax() {
+ ShowDeprecationWarning("getMax() or getRayLength()", "the max or rayLength property");
+ return PyFloat_FromDouble(m_maximumBound);
+}
+
+
+/* This setter/getter probably for the constraint type */
+/* 8. setLimit */
+const char KX_ConstraintActuator::SetLimit_doc[] =
+"setLimit(type)\n"
+"\t- type: integer\n"
+"\t 1 : LocX\n"
+"\t 2 : LocY\n"
+"\t 3 : LocZ\n"
+"\t 7 : Distance along +X axis\n"
+"\t 8 : Distance along +Y axis\n"
+"\t 9 : Distance along +Z axis\n"
+"\t 10 : Distance along -X axis\n"
+"\t 11 : Distance along -Y axis\n"
+"\t 12 : Distance along -Z axis\n"
+"\t 13 : Align X axis\n"
+"\t 14 : Align Y axis\n"
+"\t 15 : Align Z axis\n"
+"\tSets the type of constraint.\n";
+PyObject* KX_ConstraintActuator::PySetLimit(PyObject* args) {
+ ShowDeprecationWarning("setLimit()", "the limit property");
+ int locrotArg;
+ if(!PyArg_ParseTuple(args, "i:setLimit", &locrotArg)) {
+ return NULL;
+ }
+
+ if (IsValidMode((KX_CONSTRAINTTYPE)locrotArg)) m_locrot = locrotArg;
+
+ Py_RETURN_NONE;
+}
+/* 9. getLimit */
+const char KX_ConstraintActuator::GetLimit_doc[] =
+"getLimit()\n"
+"\tReturns the type of constraint.\n";
+PyObject* KX_ConstraintActuator::PyGetLimit() {
+ ShowDeprecationWarning("setLimit()", "the limit property");
+ return PyLong_FromSsize_t(m_locrot);
+}
+
/* eof */
diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.h b/source/gameengine/Ketsji/KX_ConstraintActuator.h
index 9b6ed59e75c..677904aedc9 100644
--- a/source/gameengine/Ketsji/KX_ConstraintActuator.h
+++ b/source/gameengine/Ketsji/KX_ConstraintActuator.h
@@ -143,6 +143,28 @@ protected:
static int pyattr_check_direction(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_check_min(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
+ KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetDamp);
+ KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetDamp);
+ KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetRotDamp);
+ KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetRotDamp);
+ KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetDirection);
+ KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetDirection);
+ KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetOption);
+ KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetOption);
+ KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetTime);
+ KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetTime);
+ KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetProperty);
+ KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetProperty);
+ KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetMin);
+ KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetMin);
+ static const char SetDistance_doc[];
+ static const char GetDistance_doc[];
+ KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetMax);
+ KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetMax);
+ static const char SetRayLength_doc[];
+ static const char GetRayLength_doc[];
+ KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetLimit);
+ KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetLimit);
};
#endif //__KX_CONSTRAINTACTUATOR
diff --git a/source/gameengine/Ketsji/KX_GameActuator.cpp b/source/gameengine/Ketsji/KX_GameActuator.cpp
index 42dc4d8fd24..3f67de1e9a9 100644
--- a/source/gameengine/Ketsji/KX_GameActuator.cpp
+++ b/source/gameengine/Ketsji/KX_GameActuator.cpp
@@ -230,6 +230,10 @@ PyTypeObject KX_GameActuator::Type = {
PyMethodDef KX_GameActuator::Methods[] =
{
+ // Deprecated ----->
+ {"getFile", (PyCFunction) KX_GameActuator::sPyGetFile, METH_VARARGS, (const char *)GetFile_doc},
+ {"setFile", (PyCFunction) KX_GameActuator::sPySetFile, METH_VARARGS, (const char *)SetFile_doc},
+ // <-----
{NULL,NULL} //Sentinel
};
@@ -238,3 +242,36 @@ PyAttributeDef KX_GameActuator::Attributes[] = {
KX_PYATTRIBUTE_INT_RW("mode", KX_GAME_NODEF+1, KX_GAME_MAX-1, true, KX_GameActuator, m_mode),
{ NULL } //Sentinel
};
+
+// Deprecated ----->
+/* getFile */
+const char KX_GameActuator::GetFile_doc[] =
+"getFile()\n"
+"get the name of the file to start.\n";
+PyObject* KX_GameActuator::PyGetFile(PyObject* args, PyObject* kwds)
+{
+ ShowDeprecationWarning("getFile()", "the fileName property");
+ return PyUnicode_FromString(m_filename);
+}
+
+/* setFile */
+const char KX_GameActuator::SetFile_doc[] =
+"setFile(name)\n"
+"set the name of the file to start.\n";
+PyObject* KX_GameActuator::PySetFile(PyObject* args, PyObject* kwds)
+{
+ char* new_file;
+
+ ShowDeprecationWarning("setFile()", "the fileName property");
+
+ if (!PyArg_ParseTuple(args, "s:setFile", &new_file))
+ {
+ return NULL;
+ }
+
+ m_filename = STR_String(new_file);
+
+ Py_RETURN_NONE;
+
+}
+// <-----
diff --git a/source/gameengine/Ketsji/KX_GameActuator.h b/source/gameengine/Ketsji/KX_GameActuator.h
index 37d09a5a9fb..cabbf827b40 100644
--- a/source/gameengine/Ketsji/KX_GameActuator.h
+++ b/source/gameengine/Ketsji/KX_GameActuator.h
@@ -75,6 +75,11 @@ protected:
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
+
+ // Deprecated functions ----->
+ KX_PYMETHOD_DOC(KX_GameActuator,GetFile);
+ KX_PYMETHOD_DOC(KX_GameActuator,SetFile);
+ // <-----
}; /* end of class KX_GameActuator */
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 8193aa8c37b..146b83abd17 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -464,7 +464,7 @@ void KX_GameObject::AddMeshUser()
double* fl = GetOpenGLMatrixPtr()->getPointer();
SG_QList::iterator<RAS_MeshSlot> mit(m_meshSlots);
-// RAS_MeshSlot* ms;
+ RAS_MeshSlot* ms;
for(mit.begin(); !mit.end(); ++mit)
{
(*mit)->m_OpenGLMatrix = fl;
@@ -1383,8 +1383,8 @@ PyMethodDef KX_GameObject::Methods[] = {
{"setVisible",(PyCFunction) KX_GameObject::sPySetVisible, METH_VARARGS},
{"setOcclusion",(PyCFunction) KX_GameObject::sPySetOcclusion, METH_VARARGS},
{"removeParent", (PyCFunction)KX_GameObject::sPyRemoveParent,METH_NOARGS},
-
-
+ {"getChildren", (PyCFunction)KX_GameObject::sPyGetChildren,METH_NOARGS},
+ {"getChildrenRecursive", (PyCFunction)KX_GameObject::sPyGetChildrenRecursive,METH_NOARGS},
{"getPhysicsId", (PyCFunction)KX_GameObject::sPyGetPhysicsId,METH_NOARGS},
{"getPropertyNames", (PyCFunction)KX_GameObject::sPyGetPropertyNames,METH_NOARGS},
{"replaceMesh",(PyCFunction) KX_GameObject::sPyReplaceMesh, METH_VARARGS},
@@ -1398,8 +1398,21 @@ PyMethodDef KX_GameObject::Methods[] = {
KX_PYMETHODTABLE(KX_GameObject, sendMessage),
// dict style access for props
+ {"has_key",(PyCFunction) KX_GameObject::sPyhas_key, METH_O},
{"get",(PyCFunction) KX_GameObject::sPyget, METH_VARARGS},
+ // deprecated
+ {"getPosition", (PyCFunction) KX_GameObject::sPyGetPosition, METH_NOARGS},
+ {"setPosition", (PyCFunction) KX_GameObject::sPySetPosition, METH_O},
+ {"setWorldPosition", (PyCFunction) KX_GameObject::sPySetWorldPosition, METH_O},
+ {"getOrientation", (PyCFunction) KX_GameObject::sPyGetOrientation, METH_NOARGS},
+ {"setOrientation", (PyCFunction) KX_GameObject::sPySetOrientation, METH_O},
+ {"getState",(PyCFunction) KX_GameObject::sPyGetState, METH_NOARGS},
+ {"setState",(PyCFunction) KX_GameObject::sPySetState, METH_O},
+ {"getParent", (PyCFunction)KX_GameObject::sPyGetParent,METH_NOARGS},
+ {"getVisible",(PyCFunction) KX_GameObject::sPyGetVisible, METH_NOARGS},
+ {"getMass", (PyCFunction) KX_GameObject::sPyGetMass, METH_NOARGS},
+ {"getMesh", (PyCFunction)KX_GameObject::sPyGetMesh,METH_VARARGS},
{NULL,NULL} //Sentinel
};
@@ -1502,6 +1515,13 @@ PyObject* KX_GameObject::PyReinstancePhysicsMesh(PyObject* args)
Py_RETURN_FALSE;
}
+
+PyObject* KX_GameObject::PyGetPosition()
+{
+ ShowDeprecationWarning("getPosition()", "the position property");
+ return PyObjectFrom(NodeGetWorldPosition());
+}
+
static PyObject *Map_GetItem(PyObject *self_v, PyObject *item)
{
KX_GameObject* self= static_cast<KX_GameObject*>BGE_PROXY_REF(self_v);
@@ -1797,10 +1817,10 @@ int KX_GameObject::pyattr_set_visible(void *self_v, const KX_PYATTRIBUTE_DEF *at
PyObject* KX_GameObject::pyattr_get_worldPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
+ KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
#ifdef USE_MATHUTILS
- return newVectorObject_cb(BGE_PROXY_FROM_REF(self_v), 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_POS_GLOBAL);
+ return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_POS_GLOBAL);
#else
- KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
return PyObjectFrom(self->NodeGetWorldPosition());
#endif
}
@@ -1819,10 +1839,10 @@ int KX_GameObject::pyattr_set_worldPosition(void *self_v, const KX_PYATTRIBUTE_D
PyObject* KX_GameObject::pyattr_get_localPosition(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
+ KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
#ifdef USE_MATHUTILS
- return newVectorObject_cb(BGE_PROXY_FROM_REF(self_v), 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_POS_LOCAL);
+ return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_POS_LOCAL);
#else
- KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
return PyObjectFrom(self->NodeGetLocalPosition());
#endif
}
@@ -1841,10 +1861,10 @@ int KX_GameObject::pyattr_set_localPosition(void *self_v, const KX_PYATTRIBUTE_D
PyObject* KX_GameObject::pyattr_get_localInertia(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
+ KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
#ifdef USE_MATHUTILS
- return newVectorObject_cb(BGE_PROXY_FROM_REF(self_v), 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_INERTIA_LOCAL);
+ return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_INERTIA_LOCAL);
#else
- KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
if (self->GetPhysicsController())
return PyObjectFrom(self->GetPhysicsController()->GetLocalInertia());
return Py_BuildValue("fff", 0.0f, 0.0f, 0.0f);
@@ -1854,7 +1874,7 @@ PyObject* KX_GameObject::pyattr_get_localInertia(void *self_v, const KX_PYATTRIB
PyObject* KX_GameObject::pyattr_get_worldOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
#ifdef USE_MATHUTILS
- return newMatrixObject_cb(BGE_PROXY_FROM_REF(self_v), 3, 3, mathutils_kxgameob_matrix_cb_index, MATHUTILS_MAT_CB_ORI_GLOBAL);
+ return newMatrixObject_cb((PyObject *)self_v, 3, 3, mathutils_kxgameob_matrix_cb_index, MATHUTILS_MAT_CB_ORI_GLOBAL);
#else
KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
return PyObjectFrom(self->NodeGetWorldOrientation());
@@ -1879,7 +1899,7 @@ int KX_GameObject::pyattr_set_worldOrientation(void *self_v, const KX_PYATTRIBUT
PyObject* KX_GameObject::pyattr_get_localOrientation(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
#ifdef USE_MATHUTILS
- return newMatrixObject_cb(BGE_PROXY_FROM_REF(self_v), 3, 3, mathutils_kxgameob_matrix_cb_index, MATHUTILS_MAT_CB_ORI_LOCAL);
+ return newMatrixObject_cb((PyObject *)self_v, 3, 3, mathutils_kxgameob_matrix_cb_index, MATHUTILS_MAT_CB_ORI_LOCAL);
#else
KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
return PyObjectFrom(self->NodeGetLocalOrientation());
@@ -1902,20 +1922,20 @@ int KX_GameObject::pyattr_set_localOrientation(void *self_v, const KX_PYATTRIBUT
PyObject* KX_GameObject::pyattr_get_worldScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
+ KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
#ifdef USE_MATHUTILS
- return newVectorObject_cb(BGE_PROXY_FROM_REF(self_v), 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_SCALE_GLOBAL);
+ return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_SCALE_GLOBAL);
#else
- KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
return PyObjectFrom(self->NodeGetWorldScaling());
#endif
}
PyObject* KX_GameObject::pyattr_get_localScaling(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
+ KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
#ifdef USE_MATHUTILS
- return newVectorObject_cb(BGE_PROXY_FROM_REF(self_v), 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_SCALE_LOCAL);
+ return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxgameob_vector_cb_index, MATHUTILS_VEC_CB_SCALE_LOCAL);
#else
- KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
return PyObjectFrom(self->NodeGetLocalScaling());
#endif
}
@@ -2181,6 +2201,41 @@ PyObject* KX_GameObject::PySetOcclusion(PyObject* args)
Py_RETURN_NONE;
}
+PyObject* KX_GameObject::PyGetVisible()
+{
+ ShowDeprecationWarning("getVisible()", "the visible property");
+ return PyLong_FromSsize_t(m_bVisible);
+}
+
+PyObject* KX_GameObject::PyGetState()
+{
+ ShowDeprecationWarning("getState()", "the state property");
+ int state = 0;
+ state |= GetState();
+ return PyLong_FromSsize_t(state);
+}
+
+PyObject* KX_GameObject::PySetState(PyObject* value)
+{
+ ShowDeprecationWarning("setState()", "the state property");
+ int state_i = PyLong_AsSsize_t(value);
+ unsigned int state = 0;
+
+ if (state_i == -1 && PyErr_Occurred()) {
+ PyErr_SetString(PyExc_TypeError, "expected an int bit field");
+ return NULL;
+ }
+
+ state |= state_i;
+ if ((state & ((1<<30)-1)) == 0) {
+ PyErr_SetString(PyExc_AttributeError, "The state bitfield was not between 0 and 30 (1<<0 and 1<<29)");
+ return NULL;
+ }
+ SetState(state);
+
+ Py_RETURN_NONE;
+}
+
PyObject* KX_GameObject::PyGetVelocity(PyObject* args)
{
// only can get the velocity if we have a physics object connected to us...
@@ -2199,6 +2254,14 @@ PyObject* KX_GameObject::PyGetVelocity(PyObject* args)
}
}
+
+
+PyObject* KX_GameObject::PyGetMass()
+{
+ ShowDeprecationWarning("getMass()", "the mass property");
+ return PyFloat_FromDouble((GetPhysicsController() != NULL) ? GetPhysicsController()->GetMass() : 0.0f);
+}
+
PyObject* KX_GameObject::PyGetReactionForce()
{
// only can get the velocity if we have a physics object connected to us...
@@ -2235,6 +2298,18 @@ PyObject* KX_GameObject::PyDisableRigidBody()
}
+
+PyObject* KX_GameObject::PyGetParent()
+{
+ ShowDeprecationWarning("getParent()", "the parent property");
+ KX_GameObject* parent = this->GetParent();
+ if (parent) {
+ parent->Release(); /* self->GetParent() AddRef's */
+ return parent->GetProxy();
+ }
+ Py_RETURN_NONE;
+}
+
PyObject* KX_GameObject::PySetParent(PyObject* args)
{
KX_Scene *scene = KX_GetActiveScene();
@@ -2260,6 +2335,41 @@ PyObject* KX_GameObject::PyRemoveParent()
Py_RETURN_NONE;
}
+PyObject* KX_GameObject::PyGetChildren()
+{
+ ShowDeprecationWarning("getChildren()", "the children property");
+
+ return GetChildren()->NewProxy(true);
+}
+
+PyObject* KX_GameObject::PyGetChildrenRecursive()
+{
+ ShowDeprecationWarning("getChildrenRecursive()", "the childrenRecursive property");
+
+ return GetChildrenRecursive()->NewProxy(true);
+}
+
+PyObject* KX_GameObject::PyGetMesh(PyObject* args)
+{
+ ShowDeprecationWarning("getMesh()", "the meshes property (now a list of meshes)");
+
+ int mesh = 0;
+
+ if (!PyArg_ParseTuple(args, "|i:getMesh", &mesh))
+ return NULL; // python sets a simple error
+
+ if (((unsigned int)mesh < m_meshes.size()) && mesh >= 0)
+ {
+ KX_MeshProxy* meshproxy = new KX_MeshProxy(m_meshes[mesh]);
+ return meshproxy->NewProxy(true); // XXX Todo Python own.
+ }
+
+ Py_RETURN_NONE;
+}
+
+
+
+
PyObject* KX_GameObject::PySetCollisionMargin(PyObject* value)
{
@@ -2323,6 +2433,29 @@ PyObject* KX_GameObject::PyRestoreDynamics()
}
+
+PyObject* KX_GameObject::PyGetOrientation() //keywords
+{
+ ShowDeprecationWarning("getOrientation()", "the orientation property");
+ return PyObjectFrom(NodeGetWorldOrientation());
+}
+
+
+
+PyObject* KX_GameObject::PySetOrientation(PyObject* value)
+{
+ ShowDeprecationWarning("setOrientation()", "the orientation property");
+ MT_Matrix3x3 rot;
+
+ /* if value is not a sequence PyOrientationTo makes an error */
+ if (!PyOrientationTo(value, rot, "gameOb.setOrientation(sequence): KX_GameObject, "))
+ return NULL;
+
+ NodeSetLocalOrientation(rot);
+ NodeUpdateGS(0.f);
+ Py_RETURN_NONE;
+}
+
PyObject* KX_GameObject::PyAlignAxisToVect(PyObject* args)
{
PyObject* pyvect;
@@ -2355,6 +2488,33 @@ PyObject* KX_GameObject::PyGetAxisVect(PyObject* value)
return NULL;
}
+PyObject* KX_GameObject::PySetPosition(PyObject* value)
+{
+ ShowDeprecationWarning("setPosition()", "the localPosition property");
+ MT_Point3 pos;
+ if (PyVecTo(value, pos))
+ {
+ NodeSetLocalPosition(pos);
+ NodeUpdateGS(0.f);
+ Py_RETURN_NONE;
+ }
+
+ return NULL;
+}
+
+PyObject* KX_GameObject::PySetWorldPosition(PyObject* value)
+{
+ ShowDeprecationWarning("setWorldPosition()", "the worldPosition property");
+ MT_Point3 pos;
+ if (PyVecTo(value, pos))
+ {
+ NodeSetWorldPosition(pos);
+ NodeUpdateGS(0.f);
+ Py_RETURN_NONE;
+ }
+
+ return NULL;
+}
PyObject* KX_GameObject::PyGetPhysicsId()
{
@@ -2520,10 +2680,12 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCastTo,
}
}
MT_Point3 fromPoint = NodeGetWorldPosition();
-
if (dist != 0.0f)
- toPoint = fromPoint + dist * (toPoint-fromPoint).safe_normalized();
-
+ {
+ MT_Vector3 toDir = toPoint-fromPoint;
+ toDir.normalize();
+ toPoint = fromPoint + (dist) * toDir;
+ }
PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment();
KX_IPhysicsController *spc = GetPhysicsController();
KX_GameObject *parent = GetParent();
@@ -2716,7 +2878,7 @@ KX_PYMETHODDEF_DOC_VARARGS(KX_GameObject, sendMessage,
char* to = (char *)"";
const STR_String& from = GetName();
- if (!PyArg_ParseTuple(args, "s|ss:sendMessage", &subject, &body, &to))
+ if (!PyArg_ParseTuple(args, "s|sss:sendMessage", &subject, &body, &to))
return NULL;
scene->GetNetworkScene()->SendMessage(to, from, subject, body);
@@ -2757,6 +2919,14 @@ PyObject* KX_GameObject::Pyget(PyObject *args)
return def;
}
+/* Matches python dict.has_key() */
+PyObject* KX_GameObject::Pyhas_key(PyObject* value)
+{
+ // the ONLY error case is invalid data, this is checked by the macro'd static function
+ // that calls this one. but make sure Seq_Contains doesnt add extra errors later on.
+ return PyBool_FromLong(Seq_Contains((PyObject *)this, value));
+}
+
/* ---------------------------------------------------------------------
* Some stuff taken from the header
* --------------------------------------------------------------------- */
diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h
index 845cead1cdb..ba7451fdeef 100644
--- a/source/gameengine/Ketsji/KX_GameObject.h
+++ b/source/gameengine/Ketsji/KX_GameObject.h
@@ -795,7 +795,9 @@ public:
{
return PyUnicode_FromString(GetName().ReadPtr());
}
-
+
+ KX_PYMETHOD_NOARGS(KX_GameObject,GetPosition);
+ KX_PYMETHOD_O(KX_GameObject,SetPosition);
KX_PYMETHOD_O(KX_GameObject,SetWorldPosition);
KX_PYMETHOD_VARARGS(KX_GameObject, ApplyForce);
KX_PYMETHOD_VARARGS(KX_GameObject, ApplyTorque);
@@ -806,10 +808,10 @@ public:
KX_PYMETHOD_VARARGS(KX_GameObject,GetAngularVelocity);
KX_PYMETHOD_VARARGS(KX_GameObject,SetAngularVelocity);
KX_PYMETHOD_VARARGS(KX_GameObject,GetVelocity);
-
+ KX_PYMETHOD_NOARGS(KX_GameObject,GetMass);
KX_PYMETHOD_NOARGS(KX_GameObject,GetReactionForce);
-
-
+ KX_PYMETHOD_NOARGS(KX_GameObject,GetOrientation);
+ KX_PYMETHOD_O(KX_GameObject,SetOrientation);
KX_PYMETHOD_NOARGS(KX_GameObject,GetVisible);
KX_PYMETHOD_VARARGS(KX_GameObject,SetVisible);
KX_PYMETHOD_VARARGS(KX_GameObject,SetOcclusion);
@@ -826,7 +828,7 @@ public:
KX_PYMETHOD_NOARGS(KX_GameObject,GetParent);
KX_PYMETHOD_VARARGS(KX_GameObject,SetParent);
KX_PYMETHOD_NOARGS(KX_GameObject,RemoveParent);
- KX_PYMETHOD_NOARGS(KX_GameObject,GetChildren);
+ KX_PYMETHOD_NOARGS(KX_GameObject,GetChildren);
KX_PYMETHOD_NOARGS(KX_GameObject,GetChildrenRecursive);
KX_PYMETHOD_VARARGS(KX_GameObject,GetMesh);
KX_PYMETHOD_NOARGS(KX_GameObject,GetPhysicsId);
@@ -842,6 +844,7 @@ public:
/* Dict access */
KX_PYMETHOD_VARARGS(KX_GameObject,get);
+ KX_PYMETHOD_O(KX_GameObject,has_key);
/* attributes */
static PyObject* pyattr_get_name(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp
index b71907be961..e4eaff4f401 100644
--- a/source/gameengine/Ketsji/KX_IpoActuator.cpp
+++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp
@@ -49,13 +49,13 @@
/* Type strings */
/* ------------------------------------------------------------------------- */
-const char *KX_IpoActuator::S_KX_ACT_IPO_PLAY_STRING = "Play";
-const char *KX_IpoActuator::S_KX_ACT_IPO_PINGPONG_STRING = "PingPong";
-const char *KX_IpoActuator::S_KX_ACT_IPO_FLIPPER_STRING = "Flipper";
-const char *KX_IpoActuator::S_KX_ACT_IPO_LOOPSTOP_STRING = "LoopStop";
-const char *KX_IpoActuator::S_KX_ACT_IPO_LOOPEND_STRING = "LoopEnd";
-const char *KX_IpoActuator::S_KX_ACT_IPO_KEY2KEY_STRING = "Key2key";
-const char *KX_IpoActuator::S_KX_ACT_IPO_FROM_PROP_STRING = "FromProp";
+STR_String KX_IpoActuator::S_KX_ACT_IPO_PLAY_STRING = "Play";
+STR_String KX_IpoActuator::S_KX_ACT_IPO_PINGPONG_STRING = "PingPong";
+STR_String KX_IpoActuator::S_KX_ACT_IPO_FLIPPER_STRING = "Flipper";
+STR_String KX_IpoActuator::S_KX_ACT_IPO_LOOPSTOP_STRING = "LoopStop";
+STR_String KX_IpoActuator::S_KX_ACT_IPO_LOOPEND_STRING = "LoopEnd";
+STR_String KX_IpoActuator::S_KX_ACT_IPO_KEY2KEY_STRING = "Key2key";
+STR_String KX_IpoActuator::S_KX_ACT_IPO_FROM_PROP_STRING = "FromProp";
/* ------------------------------------------------------------------------- */
/* Native functions */
@@ -385,19 +385,19 @@ bool KX_IpoActuator::Update(double curtime, bool frame)
int KX_IpoActuator::string2mode(char* modename) {
IpoActType res = KX_ACT_IPO_NODEF;
- if (strcmp(modename, S_KX_ACT_IPO_PLAY_STRING)==0) {
+ if (modename == S_KX_ACT_IPO_PLAY_STRING) {
res = KX_ACT_IPO_PLAY;
- } else if (strcmp(modename, S_KX_ACT_IPO_PINGPONG_STRING)==0) {
+ } else if (modename == S_KX_ACT_IPO_PINGPONG_STRING) {
res = KX_ACT_IPO_PINGPONG;
- } else if (strcmp(modename, S_KX_ACT_IPO_FLIPPER_STRING)==0) {
+ } else if (modename == S_KX_ACT_IPO_FLIPPER_STRING) {
res = KX_ACT_IPO_FLIPPER;
- } else if (strcmp(modename, S_KX_ACT_IPO_LOOPSTOP_STRING)==0) {
+ } else if (modename == S_KX_ACT_IPO_LOOPSTOP_STRING) {
res = KX_ACT_IPO_LOOPSTOP;
- } else if (strcmp(modename, S_KX_ACT_IPO_LOOPEND_STRING)==0) {
+ } else if (modename == S_KX_ACT_IPO_LOOPEND_STRING) {
res = KX_ACT_IPO_LOOPEND;
- } else if (strcmp(modename, S_KX_ACT_IPO_KEY2KEY_STRING)==0) {
+ } else if (modename == S_KX_ACT_IPO_KEY2KEY_STRING) {
res = KX_ACT_IPO_KEY2KEY;
- } else if (strcmp(modename, S_KX_ACT_IPO_FROM_PROP_STRING)==0) {
+ } else if (modename == S_KX_ACT_IPO_FROM_PROP_STRING) {
res = KX_ACT_IPO_FROM_PROP;
}
@@ -434,6 +434,21 @@ PyTypeObject KX_IpoActuator::Type = {
};
PyMethodDef KX_IpoActuator::Methods[] = {
+ // deprecated
+ {"set", (PyCFunction) KX_IpoActuator::sPySet, METH_VARARGS, (const char *)Set_doc},
+ {"setProperty", (PyCFunction) KX_IpoActuator::sPySetProperty, METH_VARARGS, (const char *)SetProperty_doc},
+ {"setStart", (PyCFunction) KX_IpoActuator::sPySetStart, METH_VARARGS, (const char *)SetStart_doc},
+ {"getStart", (PyCFunction) KX_IpoActuator::sPyGetStart, METH_NOARGS, (const char *)GetStart_doc},
+ {"setEnd", (PyCFunction) KX_IpoActuator::sPySetEnd, METH_VARARGS, (const char *)SetEnd_doc},
+ {"getEnd", (PyCFunction) KX_IpoActuator::sPyGetEnd, METH_NOARGS, (const char *)GetEnd_doc},
+ {"setIpoAsForce", (PyCFunction) KX_IpoActuator::sPySetIpoAsForce, METH_VARARGS, (const char *)SetIpoAsForce_doc},
+ {"getIpoAsForce", (PyCFunction) KX_IpoActuator::sPyGetIpoAsForce, METH_NOARGS, (const char *)GetIpoAsForce_doc},
+ {"setIpoAdd", (PyCFunction) KX_IpoActuator::sPySetIpoAdd, METH_VARARGS, (const char *)SetIpoAdd_doc},
+ {"getIpoAdd", (PyCFunction) KX_IpoActuator::sPyGetIpoAdd, METH_NOARGS, (const char *)GetIpoAdd_doc},
+ {"setForceIpoActsLocal", (PyCFunction) KX_IpoActuator::sPySetForceIpoActsLocal, METH_VARARGS, (const char *)SetForceIpoActsLocal_doc},
+ {"getForceIpoActsLocal", (PyCFunction) KX_IpoActuator::sPyGetForceIpoActsLocal, METH_NOARGS, (const char *)GetForceIpoActsLocal_doc},
+ {"setType", (PyCFunction) KX_IpoActuator::sPySetType, METH_VARARGS, (const char *)SetType_doc},
+ {"getType", (PyCFunction) KX_IpoActuator::sPyGetType, METH_NOARGS, (const char *)GetType_doc},
{NULL,NULL} //Sentinel
};
@@ -451,4 +466,237 @@ PyAttributeDef KX_IpoActuator::Attributes[] = {
{ NULL } //Sentinel
};
+
+/* set --------------------------------------------------------------------- */
+const char KX_IpoActuator::Set_doc[] =
+"set(type, startframe, endframe, mode?)\n"
+"\t - type: Play, PingPong, Flipper, LoopStop, LoopEnd or FromProp (string)\n"
+"\t - startframe: first frame to use (int)\n"
+"\t - endframe : last frame to use (int)\n"
+"\t - mode? : special mode (0=normal, 1=interpret location as force, 2=additive)"
+"\tSet the properties of the actuator.\n";
+PyObject* KX_IpoActuator::PySet(PyObject* args) {
+
+ ShowDeprecationWarning("set()", "a range properties");
+
+ /* sets modes PLAY, PINGPONG, FLIPPER, LOOPSTOP, LOOPEND */
+ /* arg 1 = mode string, arg 2 = startframe, arg3 = stopframe, */
+ /* arg4 = force toggle */
+ char* mode;
+ int forceToggle;
+ int modenum;
+ int startFrame, stopFrame;
+ if(!PyArg_ParseTuple(args, "siii:set", &mode, &startFrame,
+ &stopFrame, &forceToggle)) {
+ return NULL;
+ }
+ modenum = string2mode(mode);
+
+ switch (modenum) {
+ case KX_ACT_IPO_PLAY:
+ case KX_ACT_IPO_PINGPONG:
+ case KX_ACT_IPO_FLIPPER:
+ case KX_ACT_IPO_LOOPSTOP:
+ case KX_ACT_IPO_LOOPEND:
+ m_type = modenum;
+ m_startframe = startFrame;
+ m_endframe = stopFrame;
+ m_ipo_as_force = forceToggle == 1;
+ m_ipo_add = forceToggle == 2;
+ break;
+ default:
+ ; /* error */
+ }
+
+ Py_RETURN_NONE;
+}
+
+/* set property ----------------------------------------------------------- */
+const char KX_IpoActuator::SetProperty_doc[] =
+"setProperty(propname)\n"
+"\t - propname: name of the property (string)\n"
+"\tSet the property to be used in FromProp mode.\n";
+PyObject* KX_IpoActuator::PySetProperty(PyObject* args) {
+
+ ShowDeprecationWarning("setProperty()", "the propName property");
+
+ /* mode is implicit here, but not supported yet... */
+ /* args: property */
+ char *propertyName;
+ if(!PyArg_ParseTuple(args, "s:setProperty", &propertyName)) {
+ return NULL;
+ }
+
+ m_propname = propertyName;
+
+ Py_RETURN_NONE;
+}
+
+/* 4. setStart: */
+const char KX_IpoActuator::SetStart_doc[] =
+"setStart(frame)\n"
+"\t - frame: first frame to use (int)\n"
+"\tSet the frame from which the ipo starts playing.\n";
+PyObject* KX_IpoActuator::PySetStart(PyObject* args) {
+
+ ShowDeprecationWarning("setStart()", "the frameStart property");
+
+ float startArg;
+ if(!PyArg_ParseTuple(args, "f:setStart", &startArg)) {
+ return NULL;
+ }
+
+ m_startframe = startArg;
+
+ Py_RETURN_NONE;
+}
+/* 5. getStart: */
+const char KX_IpoActuator::GetStart_doc[] =
+"getStart()\n"
+"\tReturns the frame from which the ipo starts playing.\n";
+PyObject* KX_IpoActuator::PyGetStart() {
+ ShowDeprecationWarning("getStart()", "the frameStart property");
+ return PyFloat_FromDouble(m_startframe);
+}
+
+/* 6. setEnd: */
+const char KX_IpoActuator::SetEnd_doc[] =
+"setEnd(frame)\n"
+"\t - frame: last frame to use (int)\n"
+"\tSet the frame at which the ipo stops playing.\n";
+PyObject* KX_IpoActuator::PySetEnd(PyObject* args) {
+ ShowDeprecationWarning("setEnd()", "the frameEnd property");
+ float endArg;
+ if(!PyArg_ParseTuple(args, "f:setEnd", &endArg)) {
+ return NULL;
+ }
+
+ m_endframe = endArg;
+
+ Py_RETURN_NONE;
+}
+/* 7. getEnd: */
+const char KX_IpoActuator::GetEnd_doc[] =
+"getEnd()\n"
+"\tReturns the frame at which the ipo stops playing.\n";
+PyObject* KX_IpoActuator::PyGetEnd() {
+ ShowDeprecationWarning("getEnd()", "the frameEnd property");
+ return PyFloat_FromDouble(m_endframe);
+}
+
+/* 6. setIpoAsForce: */
+const char KX_IpoActuator::SetIpoAsForce_doc[] =
+"setIpoAsForce(force?)\n"
+"\t - force? : interpret this ipo as a force? (KX_TRUE, KX_FALSE)\n"
+"\tSet whether to interpret the ipo as a force rather than a displacement.\n";
+PyObject* KX_IpoActuator::PySetIpoAsForce(PyObject* args) {
+ ShowDeprecationWarning("setIpoAsForce()", "the useIpoAsForce property");
+ int boolArg;
+
+ if (!PyArg_ParseTuple(args, "i:setIpoAsForce", &boolArg)) {
+ return NULL;
+ }
+
+ m_ipo_as_force = PyArgToBool(boolArg);
+ if (m_ipo_as_force)
+ m_ipo_add = false;
+
+ Py_RETURN_NONE;
+}
+/* 7. getIpoAsForce: */
+const char KX_IpoActuator::GetIpoAsForce_doc[] =
+"getIpoAsForce()\n"
+"\tReturns whether to interpret the ipo as a force rather than a displacement.\n";
+PyObject* KX_IpoActuator::PyGetIpoAsForce() {
+ ShowDeprecationWarning("getIpoAsForce()", "the useIpoAsForce property");
+ return BoolToPyArg(m_ipo_as_force);
+}
+
+/* 6. setIpoAsForce: */
+const char KX_IpoActuator::SetIpoAdd_doc[] =
+"setIpoAdd(add?)\n"
+"\t - add? : add flag (KX_TRUE, KX_FALSE)\n"
+"\tSet whether to interpret the ipo as additive rather than absolute.\n";
+PyObject* KX_IpoActuator::PySetIpoAdd(PyObject* args) {
+ ShowDeprecationWarning("setIpoAdd()", "the useIpoAdd property");
+ int boolArg;
+
+ if (!PyArg_ParseTuple(args, "i:setIpoAdd", &boolArg)) {
+ return NULL;
+ }
+
+ m_ipo_add = PyArgToBool(boolArg);
+ if (m_ipo_add)
+ m_ipo_as_force = false;
+
+ Py_RETURN_NONE;
+}
+/* 7. getIpoAsForce: */
+const char KX_IpoActuator::GetIpoAdd_doc[] =
+"getIpoAsAdd()\n"
+"\tReturns whether to interpret the ipo as additive rather than absolute.\n";
+PyObject* KX_IpoActuator::PyGetIpoAdd() {
+ ShowDeprecationWarning("getIpoAdd()", "the useIpoAdd property");
+ return BoolToPyArg(m_ipo_add);
+}
+
+/* 8. setType: */
+const char KX_IpoActuator::SetType_doc[] =
+"setType(mode)\n"
+"\t - mode: Play, PingPong, Flipper, LoopStop, LoopEnd or FromProp (string)\n"
+"\tSet the operation mode of the actuator.\n";
+PyObject* KX_IpoActuator::PySetType(PyObject* args) {
+ ShowDeprecationWarning("setType()", "the mode property");
+ int typeArg;
+
+ if (!PyArg_ParseTuple(args, "i:setType", &typeArg)) {
+ return NULL;
+ }
+
+ if ( (typeArg > KX_ACT_IPO_NODEF)
+ && (typeArg < KX_ACT_IPO_MAX) ) {
+ m_type = typeArg;
+ }
+
+ Py_RETURN_NONE;
+}
+/* 9. getType: */
+const char KX_IpoActuator::GetType_doc[] =
+"getType()\n"
+"\tReturns the operation mode of the actuator.\n";
+PyObject* KX_IpoActuator::PyGetType() {
+ ShowDeprecationWarning("getType()", "the mode property");
+ return PyLong_FromSsize_t(m_type);
+}
+
+/* 10. setForceIpoActsLocal: */
+const char KX_IpoActuator::SetForceIpoActsLocal_doc[] =
+"setForceIpoActsLocal(local?)\n"
+"\t - local? : Apply the ipo-as-force in the object's local\n"
+"\t coordinates? (KX_TRUE, KX_FALSE)\n"
+"\tSet whether to apply the force in the object's local\n"
+"\tcoordinates rather than the world global coordinates.\n";
+PyObject* KX_IpoActuator::PySetForceIpoActsLocal(PyObject* args) {
+ ShowDeprecationWarning("setForceIpoActsLocal()", "the useIpoLocal property");
+ int boolArg;
+
+ if (!PyArg_ParseTuple(args, "i:setForceIpoActsLocal", &boolArg)) {
+ return NULL;
+ }
+
+ m_ipo_local = PyArgToBool(boolArg);
+
+ Py_RETURN_NONE;
+}
+/* 11. getForceIpoActsLocal: */
+const char KX_IpoActuator::GetForceIpoActsLocal_doc[] =
+"getForceIpoActsLocal()\n"
+"\tReturn whether to apply the force in the object's local\n"
+"\tcoordinates rather than the world global coordinates.\n";
+PyObject* KX_IpoActuator::PyGetForceIpoActsLocal() {
+ ShowDeprecationWarning("getForceIpoActsLocal()", "the useIpoLocal property");
+ return BoolToPyArg(m_ipo_local);
+}
+
+
/* eof */
diff --git a/source/gameengine/Ketsji/KX_IpoActuator.h b/source/gameengine/Ketsji/KX_IpoActuator.h
index 72fe812f98e..01051ca82dc 100644
--- a/source/gameengine/Ketsji/KX_IpoActuator.h
+++ b/source/gameengine/Ketsji/KX_IpoActuator.h
@@ -100,13 +100,13 @@ public:
KX_ACT_IPO_MAX
};
- static const char *S_KX_ACT_IPO_PLAY_STRING;
- static const char *S_KX_ACT_IPO_PINGPONG_STRING;
- static const char *S_KX_ACT_IPO_FLIPPER_STRING;
- static const char *S_KX_ACT_IPO_LOOPSTOP_STRING;
- static const char *S_KX_ACT_IPO_LOOPEND_STRING;
- static const char *S_KX_ACT_IPO_KEY2KEY_STRING;
- static const char *S_KX_ACT_IPO_FROM_PROP_STRING;
+ static STR_String S_KX_ACT_IPO_PLAY_STRING;
+ static STR_String S_KX_ACT_IPO_PINGPONG_STRING;
+ static STR_String S_KX_ACT_IPO_FLIPPER_STRING;
+ static STR_String S_KX_ACT_IPO_LOOPSTOP_STRING;
+ static STR_String S_KX_ACT_IPO_LOOPEND_STRING;
+ static STR_String S_KX_ACT_IPO_KEY2KEY_STRING;
+ static STR_String S_KX_ACT_IPO_FROM_PROP_STRING;
int string2mode(char* modename);
@@ -138,6 +138,23 @@ public:
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
+ //KX_PYMETHOD_DOC
+ KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,Set);
+ KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,SetProperty);
+/* KX_PYMETHOD_DOC(KX_IpoActuator,SetKey2Key); */
+ KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,SetStart);
+ KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetStart);
+ KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,SetEnd);
+ KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetEnd);
+ KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,SetIpoAsForce);
+ KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetIpoAsForce);
+ KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,SetIpoAdd);
+ KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetIpoAdd);
+ KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,SetType);
+ KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetType);
+ KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,SetForceIpoActsLocal);
+ KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetForceIpoActsLocal);
+
};
#endif //__KX_IPOACTUATOR
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index 4117e493322..13643e3a1ac 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -382,12 +382,12 @@ void KX_KetsjiEngine::StartEngine(bool clearIpo)
m_firstframe = true;
m_bInitialized = true;
// there is always one scene enabled at startup
- Scene* scene = m_scenes[0]->GetBlenderScene();
- if (scene)
+ World* world = m_scenes[0]->GetBlenderScene()->world;
+ if (world)
{
- m_ticrate = scene->gm.ticrate ? scene->gm.ticrate : DEFAULT_LOGIC_TIC_RATE;
- m_maxLogicFrame = scene->gm.maxlogicstep ? scene->gm.maxlogicstep : 5;
- m_maxPhysicsFrame = scene->gm.maxphystep ? scene->gm.maxlogicstep : 5;
+ m_ticrate = world->ticrate ? world->ticrate : DEFAULT_LOGIC_TIC_RATE;
+ m_maxLogicFrame = world->maxlogicstep ? world->maxlogicstep : 5;
+ m_maxPhysicsFrame = world->maxphystep ? world->maxlogicstep : 5;
}
else
{
diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp
index 744fdb75796..e15847fe6c6 100644
--- a/source/gameengine/Ketsji/KX_MeshProxy.cpp
+++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp
@@ -68,12 +68,18 @@ PyTypeObject KX_MeshProxy::Type = {
};
PyMethodDef KX_MeshProxy::Methods[] = {
+// Deprecated ----->
+{"getNumMaterials", (PyCFunction)KX_MeshProxy::sPyGetNumMaterials,METH_VARARGS},
+{"getNumPolygons", (PyCFunction)KX_MeshProxy::sPyGetNumPolygons,METH_NOARGS},
+// <-----
+
{"getMaterialName", (PyCFunction)KX_MeshProxy::sPyGetMaterialName,METH_VARARGS},
{"getTextureName", (PyCFunction)KX_MeshProxy::sPyGetTextureName,METH_VARARGS},
{"getVertexArrayLength", (PyCFunction)KX_MeshProxy::sPyGetVertexArrayLength,METH_VARARGS},
{"getVertex", (PyCFunction)KX_MeshProxy::sPyGetVertex,METH_VARARGS},
{"getPolygon", (PyCFunction)KX_MeshProxy::sPyGetPolygon,METH_VARARGS},
//{"getIndexArrayLength", (PyCFunction)KX_MeshProxy::sPyGetIndexArrayLength,METH_VARARGS},
+
{NULL,NULL} //Sentinel
};
@@ -113,6 +119,20 @@ CValue* KX_MeshProxy::GetReplica() { return NULL;}
// stuff for python integration
+
+PyObject* KX_MeshProxy::PyGetNumMaterials(PyObject* args, PyObject* kwds)
+{
+ int num = m_meshobj->NumMaterials();
+ ShowDeprecationWarning("getNumMaterials()", "the numMaterials property");
+ return PyLong_FromSsize_t(num);
+}
+
+PyObject* KX_MeshProxy::PyGetNumPolygons()
+{
+ int num = m_meshobj->NumPolygons();
+ ShowDeprecationWarning("getNumPolygons()", "the numPolygons property");
+ return PyLong_FromSsize_t(num);
+}
PyObject* KX_MeshProxy::PyGetMaterialName(PyObject* args, PyObject* kwds)
{
diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
index 8abc4f6b897..58053e1038d 100644
--- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
+++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
@@ -61,13 +61,11 @@ KX_MouseFocusSensor::KX_MouseFocusSensor(SCA_MouseManager* eventmgr,
int starty,
short int mousemode,
int focusmode,
- bool bTouchPulse,
KX_Scene* kxscene,
KX_KetsjiEngine *kxengine,
SCA_IObject* gameobj)
: SCA_MouseSensor(eventmgr, startx, starty, mousemode, gameobj),
m_focusmode(focusmode),
- m_bTouchPulse(bTouchPulse),
m_kxscene(kxscene),
m_kxengine(kxengine)
{
@@ -79,7 +77,6 @@ void KX_MouseFocusSensor::Init()
m_mouse_over_in_previous_frame = (m_invert)?true:false;
m_positive_event = false;
m_hitObject = 0;
- m_hitObject_Last = NULL;
m_reset = true;
m_hitPosition.setValue(0,0,0);
@@ -110,10 +107,7 @@ bool KX_MouseFocusSensor::Evaluate()
m_positive_event = true;
if (!m_mouse_over_in_previous_frame) {
result = true;
- }
- else if(m_bTouchPulse && (m_hitObject != m_hitObject_Last)) {
- result = true;
- }
+ }
}
if (reset) {
// force an event
@@ -129,8 +123,7 @@ bool KX_MouseFocusSensor::Evaluate()
}
m_mouse_over_in_previous_frame = obHasFocus;
- m_hitObject_Last = (void *)m_hitObject;
-
+
return result;
}
@@ -368,6 +361,13 @@ PyTypeObject KX_MouseFocusSensor::Type = {
};
PyMethodDef KX_MouseFocusSensor::Methods[] = {
+ {"getRayTarget", (PyCFunction) KX_MouseFocusSensor::sPyGetRayTarget, METH_NOARGS, (const char *)GetRayTarget_doc},
+ {"getRaySource", (PyCFunction) KX_MouseFocusSensor::sPyGetRaySource, METH_NOARGS, (const char *)GetRaySource_doc},
+ {"getHitObject",(PyCFunction) KX_MouseFocusSensor::sPyGetHitObject,METH_NOARGS, (const char *)GetHitObject_doc},
+ {"getHitPosition",(PyCFunction) KX_MouseFocusSensor::sPyGetHitPosition,METH_NOARGS, (const char *)GetHitPosition_doc},
+ {"getHitNormal",(PyCFunction) KX_MouseFocusSensor::sPyGetHitNormal,METH_NOARGS, (const char *)GetHitNormal_doc},
+ {"getRayDirection",(PyCFunction) KX_MouseFocusSensor::sPyGetRayDirection,METH_NOARGS, (const char *)GetRayDirection_doc},
+
{NULL,NULL} //Sentinel
};
@@ -378,10 +378,81 @@ PyAttributeDef KX_MouseFocusSensor::Attributes[] = {
KX_PYATTRIBUTE_RO_FUNCTION("hitObject", KX_MouseFocusSensor, pyattr_get_hit_object),
KX_PYATTRIBUTE_RO_FUNCTION("hitPosition", KX_MouseFocusSensor, pyattr_get_hit_position),
KX_PYATTRIBUTE_RO_FUNCTION("hitNormal", KX_MouseFocusSensor, pyattr_get_hit_normal),
- KX_PYATTRIBUTE_BOOL_RW("usePulseFocus", KX_MouseFocusSensor,m_bTouchPulse),
{ NULL } //Sentinel
};
+const char KX_MouseFocusSensor::GetHitObject_doc[] =
+"getHitObject()\n"
+"\tReturns the object that was hit by this ray.\n";
+PyObject* KX_MouseFocusSensor::PyGetHitObject()
+{
+ ShowDeprecationWarning("GetHitObject()", "the hitObject property");
+
+ if (m_hitObject)
+ return m_hitObject->GetProxy();
+
+ Py_RETURN_NONE;
+}
+
+
+const char KX_MouseFocusSensor::GetHitPosition_doc[] =
+"getHitPosition()\n"
+"\tReturns the position (in worldcoordinates) where the object was hit by this ray.\n";
+PyObject* KX_MouseFocusSensor::PyGetHitPosition()
+{
+ ShowDeprecationWarning("getHitPosition()", "the hitPosition property");
+
+ return PyObjectFrom(m_hitPosition);
+}
+
+const char KX_MouseFocusSensor::GetRayDirection_doc[] =
+"getRayDirection()\n"
+"\tReturns the direction from the ray (in worldcoordinates) .\n";
+PyObject* KX_MouseFocusSensor::PyGetRayDirection()
+{
+ ShowDeprecationWarning("getRayDirection()", "the rayDirection property");
+
+ MT_Vector3 dir = m_prevTargetPoint - m_prevSourcePoint;
+ if(MT_fuzzyZero(dir)) dir.setValue(0,0,0);
+ else dir.normalize();
+ return PyObjectFrom(dir);
+}
+
+const char KX_MouseFocusSensor::GetHitNormal_doc[] =
+"getHitNormal()\n"
+"\tReturns the normal (in worldcoordinates) at the point of collision where the object was hit by this ray.\n";
+PyObject* KX_MouseFocusSensor::PyGetHitNormal()
+{
+ ShowDeprecationWarning("getHitNormal()", "the hitNormal property");
+
+ return PyObjectFrom(m_hitNormal);
+}
+
+
+/* getRayTarget */
+const char KX_MouseFocusSensor::GetRayTarget_doc[] =
+"getRayTarget()\n"
+"\tReturns the target of the ray that seeks the focus object,\n"
+"\tin worldcoordinates.";
+PyObject* KX_MouseFocusSensor::PyGetRayTarget()
+{
+ ShowDeprecationWarning("getRayTarget()", "the rayTarget property");
+
+ return PyObjectFrom(m_prevTargetPoint);
+}
+
+/* getRayTarget */
+const char KX_MouseFocusSensor::GetRaySource_doc[] =
+"getRaySource()\n"
+"\tReturns the source of the ray that seeks the focus object,\n"
+"\tin worldcoordinates.";
+PyObject* KX_MouseFocusSensor::PyGetRaySource()
+{
+ ShowDeprecationWarning("getRaySource()", "the raySource property");
+
+ return PyObjectFrom(m_prevSourcePoint);
+}
+
/* Attributes */
PyObject* KX_MouseFocusSensor::pyattr_get_ray_source(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.h b/source/gameengine/Ketsji/KX_MouseFocusSensor.h
index 7b53557467f..dfada7a59cc 100644
--- a/source/gameengine/Ketsji/KX_MouseFocusSensor.h
+++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.h
@@ -49,12 +49,11 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
public:
- KX_MouseFocusSensor(class SCA_MouseManager* eventmgr,
+ KX_MouseFocusSensor(class SCA_MouseManager* keybdmgr,
int startx,
int starty,
short int mousemode,
int focusmode,
- bool bTouchPulse,
KX_Scene* kxscene,
KX_KetsjiEngine* kxengine,
SCA_IObject* gameobj);
@@ -90,6 +89,14 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
+ KX_PYMETHOD_DOC_NOARGS(KX_MouseFocusSensor,GetRayTarget);
+ KX_PYMETHOD_DOC_NOARGS(KX_MouseFocusSensor,GetRaySource);
+
+ KX_PYMETHOD_DOC_NOARGS(KX_MouseFocusSensor,GetHitObject);
+ KX_PYMETHOD_DOC_NOARGS(KX_MouseFocusSensor,GetHitPosition);
+ KX_PYMETHOD_DOC_NOARGS(KX_MouseFocusSensor,GetHitNormal);
+ KX_PYMETHOD_DOC_NOARGS(KX_MouseFocusSensor,GetRayDirection);
+
/* attributes */
static PyObject* pyattr_get_ray_source(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_ray_target(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
@@ -100,7 +107,6 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
/* --------------------------------------------------------------------- */
SCA_IObject* m_hitObject;
- void* m_hitObject_Last; /* only use for comparison, never access */
private:
/**
@@ -114,11 +120,6 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
bool m_mouse_over_in_previous_frame;
/**
- * Flags whether changes in hit object should trigger a pulse
- */
- bool m_bTouchPulse;
-
- /**
* Flags whether the previous test evaluated positive.
*/
bool m_positive_event;
diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.cpp b/source/gameengine/Ketsji/KX_ObjectActuator.cpp
index 2601ced9c38..2ee30ee0bfa 100644
--- a/source/gameengine/Ketsji/KX_ObjectActuator.cpp
+++ b/source/gameengine/Ketsji/KX_ObjectActuator.cpp
@@ -347,6 +347,32 @@ PyTypeObject KX_ObjectActuator::Type = {
};
PyMethodDef KX_ObjectActuator::Methods[] = {
+ // Deprecated ----->
+ {"getForce", (PyCFunction) KX_ObjectActuator::sPyGetForce, METH_NOARGS},
+ {"setForce", (PyCFunction) KX_ObjectActuator::sPySetForce, METH_VARARGS},
+ {"getTorque", (PyCFunction) KX_ObjectActuator::sPyGetTorque, METH_NOARGS},
+ {"setTorque", (PyCFunction) KX_ObjectActuator::sPySetTorque, METH_VARARGS},
+ {"getDLoc", (PyCFunction) KX_ObjectActuator::sPyGetDLoc, METH_NOARGS},
+ {"setDLoc", (PyCFunction) KX_ObjectActuator::sPySetDLoc, METH_VARARGS},
+ {"getDRot", (PyCFunction) KX_ObjectActuator::sPyGetDRot, METH_NOARGS},
+ {"setDRot", (PyCFunction) KX_ObjectActuator::sPySetDRot, METH_VARARGS},
+ {"getLinearVelocity", (PyCFunction) KX_ObjectActuator::sPyGetLinearVelocity, METH_NOARGS},
+ {"setLinearVelocity", (PyCFunction) KX_ObjectActuator::sPySetLinearVelocity, METH_VARARGS},
+ {"getAngularVelocity", (PyCFunction) KX_ObjectActuator::sPyGetAngularVelocity, METH_NOARGS},
+ {"setAngularVelocity", (PyCFunction) KX_ObjectActuator::sPySetAngularVelocity, METH_VARARGS},
+ {"setDamping", (PyCFunction) KX_ObjectActuator::sPySetDamping, METH_VARARGS},
+ {"getDamping", (PyCFunction) KX_ObjectActuator::sPyGetDamping, METH_NOARGS},
+ {"setForceLimitX", (PyCFunction) KX_ObjectActuator::sPySetForceLimitX, METH_VARARGS},
+ {"getForceLimitX", (PyCFunction) KX_ObjectActuator::sPyGetForceLimitX, METH_NOARGS},
+ {"setForceLimitY", (PyCFunction) KX_ObjectActuator::sPySetForceLimitY, METH_VARARGS},
+ {"getForceLimitY", (PyCFunction) KX_ObjectActuator::sPyGetForceLimitY, METH_NOARGS},
+ {"setForceLimitZ", (PyCFunction) KX_ObjectActuator::sPySetForceLimitZ, METH_VARARGS},
+ {"getForceLimitZ", (PyCFunction) KX_ObjectActuator::sPyGetForceLimitZ, METH_NOARGS},
+ {"setPID", (PyCFunction) KX_ObjectActuator::sPyGetPID, METH_NOARGS},
+ {"getPID", (PyCFunction) KX_ObjectActuator::sPySetPID, METH_VARARGS},
+
+ // <----- Deprecated
+
{NULL,NULL} //Sentinel
};
@@ -467,7 +493,7 @@ Mathutils_Callback mathutils_obactu_vector_cb = {
PyObject* KX_ObjectActuator::pyattr_get_linV(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
- return newVectorObject_cb(BGE_PROXY_FROM_REF(self_v), 3, mathutils_kxobactu_vector_cb_index, MATHUTILS_VEC_CB_LINV);
+ return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxobactu_vector_cb_index, MATHUTILS_VEC_CB_LINV);
}
int KX_ObjectActuator::pyattr_set_linV(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
@@ -481,7 +507,7 @@ int KX_ObjectActuator::pyattr_set_linV(void *self_v, const KX_PYATTRIBUTE_DEF *a
PyObject* KX_ObjectActuator::pyattr_get_angV(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
- return newVectorObject_cb(BGE_PROXY_FROM_REF(self_v), 3, mathutils_kxobactu_vector_cb_index, MATHUTILS_VEC_CB_ANGV);
+ return newVectorObject_cb((PyObject *)self_v, 3, mathutils_kxobactu_vector_cb_index, MATHUTILS_VEC_CB_ANGV);
}
int KX_ObjectActuator::pyattr_set_angV(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
@@ -641,4 +667,305 @@ int KX_ObjectActuator::pyattr_set_reference(void *self, const struct KX_PYATTRIB
return PY_SET_ATTR_SUCCESS;
}
+
+/* 1. set ------------------------------------------------------------------ */
+/* Removed! */
+
+/* 2. getForce */
+PyObject* KX_ObjectActuator::PyGetForce()
+{
+ ShowDeprecationWarning("getForce()", "the force and the useLocalForce properties");
+ PyObject *retVal = PyList_New(4);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_force[0]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_force[1]));
+ PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_force[2]));
+ PyList_SET_ITEM(retVal, 3, BoolToPyArg(m_bitLocalFlag.Force));
+
+ return retVal;
+}
+/* 3. setForce */
+PyObject* KX_ObjectActuator::PySetForce(PyObject* args)
+{
+ ShowDeprecationWarning("setForce()", "the force and the useLocalForce properties");
+ float vecArg[3];
+ int bToggle = 0;
+ if (!PyArg_ParseTuple(args, "fffi:setForce", &vecArg[0], &vecArg[1],
+ &vecArg[2], &bToggle)) {
+ return NULL;
+ }
+ m_force.setValue(vecArg);
+ m_bitLocalFlag.Force = PyArgToBool(bToggle);
+ UpdateFuzzyFlags();
+ Py_RETURN_NONE;
+}
+
+/* 4. getTorque */
+PyObject* KX_ObjectActuator::PyGetTorque()
+{
+ ShowDeprecationWarning("getTorque()", "the torque and the useLocalTorque properties");
+ PyObject *retVal = PyList_New(4);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_torque[0]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_torque[1]));
+ PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_torque[2]));
+ PyList_SET_ITEM(retVal, 3, BoolToPyArg(m_bitLocalFlag.Torque));
+
+ return retVal;
+}
+/* 5. setTorque */
+PyObject* KX_ObjectActuator::PySetTorque(PyObject* args)
+{
+ ShowDeprecationWarning("setTorque()", "the torque and the useLocalTorque properties");
+ float vecArg[3];
+ int bToggle = 0;
+ if (!PyArg_ParseTuple(args, "fffi:setTorque", &vecArg[0], &vecArg[1],
+ &vecArg[2], &bToggle)) {
+ return NULL;
+ }
+ m_torque.setValue(vecArg);
+ m_bitLocalFlag.Torque = PyArgToBool(bToggle);
+ UpdateFuzzyFlags();
+ Py_RETURN_NONE;
+}
+
+/* 6. getDLoc */
+PyObject* KX_ObjectActuator::PyGetDLoc()
+{
+ ShowDeprecationWarning("getDLoc()", "the dLoc and the useLocalDLoc properties");
+ PyObject *retVal = PyList_New(4);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_dloc[0]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_dloc[1]));
+ PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_dloc[2]));
+ PyList_SET_ITEM(retVal, 3, BoolToPyArg(m_bitLocalFlag.DLoc));
+
+ return retVal;
+}
+/* 7. setDLoc */
+PyObject* KX_ObjectActuator::PySetDLoc(PyObject* args)
+{
+ ShowDeprecationWarning("setDLoc()", "the dLoc and the useLocalDLoc properties");
+ float vecArg[3];
+ int bToggle = 0;
+ if(!PyArg_ParseTuple(args, "fffi:setDLoc", &vecArg[0], &vecArg[1],
+ &vecArg[2], &bToggle)) {
+ return NULL;
+ }
+ m_dloc.setValue(vecArg);
+ m_bitLocalFlag.DLoc = PyArgToBool(bToggle);
+ UpdateFuzzyFlags();
+ Py_RETURN_NONE;
+}
+
+/* 8. getDRot */
+PyObject* KX_ObjectActuator::PyGetDRot()
+{
+ ShowDeprecationWarning("getDRot()", "the dRot and the useLocalDRot properties");
+ PyObject *retVal = PyList_New(4);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_drot[0]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_drot[1]));
+ PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_drot[2]));
+ PyList_SET_ITEM(retVal, 3, BoolToPyArg(m_bitLocalFlag.DRot));
+
+ return retVal;
+}
+/* 9. setDRot */
+PyObject* KX_ObjectActuator::PySetDRot(PyObject* args)
+{
+ ShowDeprecationWarning("setDRot()", "the dRot and the useLocalDRot properties");
+ float vecArg[3];
+ int bToggle = 0;
+ if (!PyArg_ParseTuple(args, "fffi:setDRot", &vecArg[0], &vecArg[1],
+ &vecArg[2], &bToggle)) {
+ return NULL;
+ }
+ m_drot.setValue(vecArg);
+ m_bitLocalFlag.DRot = PyArgToBool(bToggle);
+ UpdateFuzzyFlags();
+ Py_RETURN_NONE;
+}
+
+/* 10. getLinearVelocity */
+PyObject* KX_ObjectActuator::PyGetLinearVelocity() {
+ ShowDeprecationWarning("getLinearVelocity()", "the linV and the useLocalLinV properties");
+ PyObject *retVal = PyList_New(4);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_linear_velocity[0]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_linear_velocity[1]));
+ PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_linear_velocity[2]));
+ PyList_SET_ITEM(retVal, 3, BoolToPyArg(m_bitLocalFlag.LinearVelocity));
+
+ return retVal;
+}
+
+/* 11. setLinearVelocity */
+PyObject* KX_ObjectActuator::PySetLinearVelocity(PyObject* args) {
+ ShowDeprecationWarning("setLinearVelocity()", "the linV and the useLocalLinV properties");
+ float vecArg[3];
+ int bToggle = 0;
+ if (!PyArg_ParseTuple(args, "fffi:setLinearVelocity", &vecArg[0], &vecArg[1],
+ &vecArg[2], &bToggle)) {
+ return NULL;
+ }
+ m_linear_velocity.setValue(vecArg);
+ m_bitLocalFlag.LinearVelocity = PyArgToBool(bToggle);
+ UpdateFuzzyFlags();
+ Py_RETURN_NONE;
+}
+
+
+/* 12. getAngularVelocity */
+PyObject* KX_ObjectActuator::PyGetAngularVelocity() {
+ ShowDeprecationWarning("getAngularVelocity()", "the angV and the useLocalAngV properties");
+ PyObject *retVal = PyList_New(4);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_angular_velocity[0]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_angular_velocity[1]));
+ PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_angular_velocity[2]));
+ PyList_SET_ITEM(retVal, 3, BoolToPyArg(m_bitLocalFlag.AngularVelocity));
+
+ return retVal;
+}
+/* 13. setAngularVelocity */
+PyObject* KX_ObjectActuator::PySetAngularVelocity(PyObject* args) {
+ ShowDeprecationWarning("setAngularVelocity()", "the angV and the useLocalAngV properties");
+ float vecArg[3];
+ int bToggle = 0;
+ if (!PyArg_ParseTuple(args, "fffi:setAngularVelocity", &vecArg[0], &vecArg[1],
+ &vecArg[2], &bToggle)) {
+ return NULL;
+ }
+ m_angular_velocity.setValue(vecArg);
+ m_bitLocalFlag.AngularVelocity = PyArgToBool(bToggle);
+ UpdateFuzzyFlags();
+ Py_RETURN_NONE;
+}
+
+/* 13. setDamping */
+PyObject* KX_ObjectActuator::PySetDamping(PyObject* args) {
+ ShowDeprecationWarning("setDamping()", "the damping property");
+ int damping = 0;
+ if (!PyArg_ParseTuple(args, "i:setDamping", &damping) || damping < 0 || damping > 1000) {
+ return NULL;
+ }
+ m_damping = damping;
+ Py_RETURN_NONE;
+}
+
+/* 13. getVelocityDamping */
+PyObject* KX_ObjectActuator::PyGetDamping() {
+ ShowDeprecationWarning("getDamping()", "the damping property");
+ return Py_BuildValue("i",m_damping);
+}
+/* 6. getForceLimitX */
+PyObject* KX_ObjectActuator::PyGetForceLimitX()
+{
+ ShowDeprecationWarning("getForceLimitX()", "the forceLimitX property");
+ PyObject *retVal = PyList_New(3);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_drot[0]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_dloc[0]));
+ PyList_SET_ITEM(retVal, 2, BoolToPyArg(m_bitLocalFlag.Torque));
+
+ return retVal;
+}
+/* 7. setForceLimitX */
+PyObject* KX_ObjectActuator::PySetForceLimitX(PyObject* args)
+{
+ ShowDeprecationWarning("setForceLimitX()", "the forceLimitX property");
+ float vecArg[2];
+ int bToggle = 0;
+ if(!PyArg_ParseTuple(args, "ffi:setForceLimitX", &vecArg[0], &vecArg[1], &bToggle)) {
+ return NULL;
+ }
+ m_drot[0] = vecArg[0];
+ m_dloc[0] = vecArg[1];
+ m_bitLocalFlag.Torque = PyArgToBool(bToggle);
+ Py_RETURN_NONE;
+}
+
+/* 6. getForceLimitY */
+PyObject* KX_ObjectActuator::PyGetForceLimitY()
+{
+ ShowDeprecationWarning("getForceLimitY()", "the forceLimitY property");
+ PyObject *retVal = PyList_New(3);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_drot[1]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_dloc[1]));
+ PyList_SET_ITEM(retVal, 2, BoolToPyArg(m_bitLocalFlag.DLoc));
+
+ return retVal;
+}
+/* 7. setForceLimitY */
+PyObject* KX_ObjectActuator::PySetForceLimitY(PyObject* args)
+{
+ ShowDeprecationWarning("setForceLimitY()", "the forceLimitY property");
+ float vecArg[2];
+ int bToggle = 0;
+ if(!PyArg_ParseTuple(args, "ffi:setForceLimitY", &vecArg[0], &vecArg[1], &bToggle)) {
+ return NULL;
+ }
+ m_drot[1] = vecArg[0];
+ m_dloc[1] = vecArg[1];
+ m_bitLocalFlag.DLoc = PyArgToBool(bToggle);
+ Py_RETURN_NONE;
+}
+
+/* 6. getForceLimitZ */
+PyObject* KX_ObjectActuator::PyGetForceLimitZ()
+{
+ ShowDeprecationWarning("getForceLimitZ()", "the forceLimitZ property");
+ PyObject *retVal = PyList_New(3);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_drot[2]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_dloc[2]));
+ PyList_SET_ITEM(retVal, 2, BoolToPyArg(m_bitLocalFlag.DRot));
+
+ return retVal;
+}
+/* 7. setForceLimitZ */
+PyObject* KX_ObjectActuator::PySetForceLimitZ(PyObject* args)
+{
+ ShowDeprecationWarning("setForceLimitZ()", "the forceLimitZ property");
+ float vecArg[2];
+ int bToggle = 0;
+ if(!PyArg_ParseTuple(args, "ffi:setForceLimitZ", &vecArg[0], &vecArg[1], &bToggle)) {
+ return NULL;
+ }
+ m_drot[2] = vecArg[0];
+ m_dloc[2] = vecArg[1];
+ m_bitLocalFlag.DRot = PyArgToBool(bToggle);
+ Py_RETURN_NONE;
+}
+
+/* 4. getPID */
+PyObject* KX_ObjectActuator::PyGetPID()
+{
+ ShowDeprecationWarning("getPID()", "the pid property");
+ PyObject *retVal = PyList_New(3);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_pid[0]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_pid[1]));
+ PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_pid[2]));
+
+ return retVal;
+}
+/* 5. setPID */
+PyObject* KX_ObjectActuator::PySetPID(PyObject* args)
+{
+ ShowDeprecationWarning("setPID()", "the pid property");
+ float vecArg[3];
+ if (!PyArg_ParseTuple(args, "fff:setPID", &vecArg[0], &vecArg[1], &vecArg[2])) {
+ return NULL;
+ }
+ m_pid.setValue(vecArg);
+ Py_RETURN_NONE;
+}
+
+
+
+
+
/* eof */
diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.h b/source/gameengine/Ketsji/KX_ObjectActuator.h
index 7a8c7de16b1..20aec9e0e86 100644
--- a/source/gameengine/Ketsji/KX_ObjectActuator.h
+++ b/source/gameengine/Ketsji/KX_ObjectActuator.h
@@ -163,6 +163,29 @@ public:
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
+ KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetForce);
+ KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetForce);
+ KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetTorque);
+ KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetTorque);
+ KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetDLoc);
+ KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetDLoc);
+ KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetDRot);
+ KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetDRot);
+ KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetLinearVelocity);
+ KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetLinearVelocity);
+ KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetAngularVelocity);
+ KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetAngularVelocity);
+ KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetDamping);
+ KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetDamping);
+ KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetForceLimitX);
+ KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetForceLimitX);
+ KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetForceLimitY);
+ KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetForceLimitY);
+ KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetForceLimitZ);
+ KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetForceLimitZ);
+ KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetPID);
+ KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetPID);
+
/* Attributes */
static PyObject* pyattr_get_forceLimitX(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_forceLimitX(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
diff --git a/source/gameengine/Ketsji/KX_ParentActuator.cpp b/source/gameengine/Ketsji/KX_ParentActuator.cpp
index 20e982f03e0..621aeea87be 100644
--- a/source/gameengine/Ketsji/KX_ParentActuator.cpp
+++ b/source/gameengine/Ketsji/KX_ParentActuator.cpp
@@ -162,6 +162,10 @@ PyTypeObject KX_ParentActuator::Type = {
};
PyMethodDef KX_ParentActuator::Methods[] = {
+ // Deprecated ----->
+ {"setObject", (PyCFunction) KX_ParentActuator::sPySetObject, METH_O, (const char *)SetObject_doc},
+ {"getObject", (PyCFunction) KX_ParentActuator::sPyGetObject, METH_VARARGS, (const char *)GetObject_doc},
+ // <-----
{NULL,NULL} //Sentinel
};
@@ -201,4 +205,55 @@ int KX_ParentActuator::pyattr_set_object(void *self, const struct KX_PYATTRIBUTE
return PY_SET_ATTR_SUCCESS;
}
+
+/* Deprecated -----> */
+/* 1. setObject */
+const char KX_ParentActuator::SetObject_doc[] =
+"setObject(object)\n"
+"\t- object: KX_GameObject, string or None\n"
+"\tSet the object to set as parent.\n";
+PyObject* KX_ParentActuator::PySetObject(PyObject* value) {
+ KX_GameObject *gameobj;
+
+ ShowDeprecationWarning("setObject()", "the object property");
+
+ if (!ConvertPythonToGameObject(value, &gameobj, true, "actuator.setObject(value): KX_ParentActuator"))
+ return NULL; // ConvertPythonToGameObject sets the error
+
+ if (m_ob != NULL)
+ m_ob->UnregisterActuator(this);
+
+ m_ob = (SCA_IObject*)gameobj;
+ if (m_ob)
+ m_ob->RegisterActuator(this);
+
+ Py_RETURN_NONE;
+}
+
+/* 2. getObject */
+
+/* get obj ---------------------------------------------------------- */
+const char KX_ParentActuator::GetObject_doc[] =
+"getObject(name_only = 1)\n"
+"name_only - optional arg, when true will return the KX_GameObject rather then its name\n"
+"\tReturns the object that is set to.\n";
+PyObject* KX_ParentActuator::PyGetObject(PyObject* args)
+{
+ int ret_name_only = 1;
+
+ ShowDeprecationWarning("getObject()", "the object property");
+
+ if (!PyArg_ParseTuple(args, "|i:getObject", &ret_name_only))
+ return NULL;
+
+ if (!m_ob)
+ Py_RETURN_NONE;
+
+ if (ret_name_only)
+ return PyUnicode_FromString(m_ob->GetName().ReadPtr());
+ else
+ return m_ob->GetProxy();
+}
+/* <----- */
+
/* eof */
diff --git a/source/gameengine/Ketsji/KX_ParentActuator.h b/source/gameengine/Ketsji/KX_ParentActuator.h
index f750affc8a1..aeb39eabf89 100644
--- a/source/gameengine/Ketsji/KX_ParentActuator.h
+++ b/source/gameengine/Ketsji/KX_ParentActuator.h
@@ -84,6 +84,11 @@ class KX_ParentActuator : public SCA_IActuator
/* These are used to get and set m_ob */
static PyObject* pyattr_get_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+
+ // Deprecated ----->
+ KX_PYMETHOD_DOC_O(KX_ParentActuator,SetObject);
+ KX_PYMETHOD_DOC_VARARGS(KX_ParentActuator,GetObject);
+ // <-----
}; /* end of class KX_ParentActuator : public SCA_PropertyActuator */
diff --git a/source/gameengine/Ketsji/KX_PolyProxy.cpp b/source/gameengine/Ketsji/KX_PolyProxy.cpp
index af8e0510a11..eae1894428c 100644
--- a/source/gameengine/Ketsji/KX_PolyProxy.cpp
+++ b/source/gameengine/Ketsji/KX_PolyProxy.cpp
@@ -132,19 +132,19 @@ PyObject* KX_PolyProxy::py_getattro(PyObject *attr)
}
if (!strcmp(attr_str, "v1"))
{
- return PyLong_FromSsize_t(m_polygon->GetVertexOffsetAbs(m_mesh, 0));
+ return PyLong_FromSsize_t(m_polygon->GetVertexOffset(0));
}
if (!strcmp(attr_str, "v2"))
{
- return PyLong_FromSsize_t(m_polygon->GetVertexOffsetAbs(m_mesh, 1));
+ return PyLong_FromSsize_t(m_polygon->GetVertexOffset(1));
}
if (!strcmp(attr_str, "v3"))
{
- return PyLong_FromSsize_t(m_polygon->GetVertexOffsetAbs(m_mesh, 2));
+ return PyLong_FromSsize_t(m_polygon->GetVertexOffset(2));
}
if (!strcmp(attr_str, "v4"))
{
- return PyLong_FromSsize_t(((m_polygon->VertexCount()>3)?m_polygon->GetVertexOffsetAbs(m_mesh, 3):0));
+ return PyLong_FromSsize_t(((m_polygon->VertexCount()>3)?m_polygon->GetVertexOffset(3):0));
}
if (!strcmp(attr_str, "visible"))
{
@@ -244,7 +244,7 @@ KX_PYMETHODDEF_DOC(KX_PolyProxy, getVertexIndex,
}
if (index < m_polygon->VertexCount())
{
- return PyLong_FromSsize_t(m_polygon->GetVertexOffsetAbs(m_mesh, index));
+ return PyLong_FromSsize_t(m_polygon->GetVertexOffset(index));
}
return PyLong_FromSsize_t(0);
}
diff --git a/source/gameengine/Ketsji/KX_PyMath.cpp b/source/gameengine/Ketsji/KX_PyMath.cpp
index a41dab194dd..6d33c38190c 100644
--- a/source/gameengine/Ketsji/KX_PyMath.cpp
+++ b/source/gameengine/Ketsji/KX_PyMath.cpp
@@ -146,7 +146,7 @@ PyObject* PyObjectFrom(const MT_Quaternion &qrot)
{
/* NOTE, were re-ordering here for Mathutils compat */
float fvec[4]= {qrot[3], qrot[0], qrot[1], qrot[2]};
- return newQuaternionObject(fvec, Py_NEW, NULL);
+ return newQuaternionObject(fvec, Py_WRAP, NULL);
}
#endif
@@ -154,7 +154,7 @@ PyObject* PyObjectFrom(const MT_Tuple4 &vec)
{
#ifdef USE_MATHUTILS
float fvec[4]= {vec[0], vec[1], vec[2], vec[3]};
- return newVectorObject(fvec, 4, Py_NEW, NULL);
+ return newVectorObject(fvec, 4, Py_WRAP, NULL);
#else
PyObject *list = PyList_New(4);
PyList_SET_ITEM(list, 0, PyFloat_FromDouble(vec[0]));
@@ -169,7 +169,7 @@ PyObject* PyObjectFrom(const MT_Tuple3 &vec)
{
#ifdef USE_MATHUTILS
float fvec[3]= {vec[0], vec[1], vec[2]};
- return newVectorObject(fvec, 3, Py_NEW, NULL);
+ return newVectorObject(fvec, 3, Py_WRAP, NULL);
#else
PyObject *list = PyList_New(3);
PyList_SET_ITEM(list, 0, PyFloat_FromDouble(vec[0]));
@@ -183,7 +183,7 @@ PyObject* PyObjectFrom(const MT_Tuple2 &vec)
{
#ifdef USE_MATHUTILS
float fvec[2]= {vec[0], vec[1]};
- return newVectorObject(fvec, 2, Py_NEW, NULL);
+ return newVectorObject(fvec, 2, Py_WRAP, NULL);
#else
PyObject *list = PyList_New(2);
PyList_SET_ITEM(list, 0, PyFloat_FromDouble(vec[0]));
diff --git a/source/gameengine/Ketsji/KX_PyMath.h b/source/gameengine/Ketsji/KX_PyMath.h
index 17102905607..9ee11c9e745 100644
--- a/source/gameengine/Ketsji/KX_PyMath.h
+++ b/source/gameengine/Ketsji/KX_PyMath.h
@@ -109,33 +109,30 @@ bool PyVecTo(PyObject* pyval, T& vec)
if(VectorObject_Check(pyval)) {
VectorObject *pyvec= (VectorObject *)pyval;
- BaseMath_ReadCallback(pyvec);
if (pyvec->size != Size(vec)) {
PyErr_Format(PyExc_AttributeError, "error setting vector, %d args, should be %d", pyvec->size, Size(vec));
return false;
}
- vec.setValue((float *) pyvec->vec);
+ vec.getValue((float *) pyvec->vec);
return true;
}
else if(QuaternionObject_Check(pyval)) {
QuaternionObject *pyquat= (QuaternionObject *)pyval;
- BaseMath_ReadCallback(pyquat);
if (4 != Size(vec)) {
PyErr_Format(PyExc_AttributeError, "error setting vector, %d args, should be %d", 4, Size(vec));
return false;
}
/* xyzw -> wxyz reordering is done by PyQuatTo */
- vec.setValue((float *) pyquat->quat);
+ vec.getValue((float *) pyquat->quat);
return true;
}
else if(EulerObject_Check(pyval)) {
EulerObject *pyeul= (EulerObject *)pyval;
- BaseMath_ReadCallback(pyeul);
if (3 != Size(vec)) {
PyErr_Format(PyExc_AttributeError, "error setting vector, %d args, should be %d", 3, Size(vec));
return false;
}
- vec.setValue((float *) pyeul->eul);
+ vec.getValue((float *) pyeul->eul);
return true;
} else
#endif
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index 298d485aaaf..de3dcd0ebf8 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -32,6 +32,11 @@
// directory header for py function getBlendFileList
#include <stdlib.h>
+#ifndef WIN32
+ #include <dirent.h>
+#else
+ #include "BLI_winstuff.h"
+#endif
#ifdef WIN32
#pragma warning (disable : 4786)
@@ -75,6 +80,8 @@ extern "C" {
#include "InputParser.h"
#include "KX_Scene.h"
+#include "NG_NetworkScene.h" //Needed for sendMessage()
+
#include "BL_Shader.h"
#include "KX_PyMath.h"
@@ -104,13 +111,6 @@ extern "C" {
#include "BLI_blenlib.h"
#include "GPU_material.h"
-#ifndef WIN32
- #include <dirent.h>
-#else
- #include "BLI_winstuff.h"
-#endif
-#include "NG_NetworkScene.h" //Needed for sendMessage()
-
static void setSandbox(TPythonSecurityLevel level);
// 'local' copy of canvas ptr, for window height/width python scripts
@@ -142,7 +142,7 @@ void KX_RasterizerDrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,cons
// List of methods defined in the module
static PyObject* ErrorObject;
-static const char *gPyGetRandomFloat_doc="getRandomFloat returns a random floating point value in the range [0..1]";
+STR_String gPyGetRandomFloat_doc="getRandomFloat returns a random floating point value in the range [0..1)";
static PyObject* gPyGetRandomFloat(PyObject*)
{
@@ -346,7 +346,7 @@ static PyObject* gPyGetBlendFileList(PyObject*, PyObject* args)
return list;
}
-static const char *gPyGetCurrentScene_doc =
+static STR_String gPyGetCurrentScene_doc =
"getCurrentScene()\n"
"Gets a reference to the current scene.\n";
static PyObject* gPyGetCurrentScene(PyObject* self)
@@ -354,7 +354,7 @@ static PyObject* gPyGetCurrentScene(PyObject* self)
return gp_KetsjiScene->GetProxy();
}
-static const char *gPyGetSceneList_doc =
+static STR_String gPyGetSceneList_doc =
"getSceneList()\n"
"Return a list of converted scenes.\n";
static PyObject* gPyGetSceneList(PyObject* self)
@@ -448,18 +448,46 @@ static PyObject *pyPrintExt(PyObject *,PyObject *,PyObject *)
}
+static PyObject *gEvalExpression(PyObject*, PyObject* value)
+{
+ char* txt= _PyUnicode_AsString(value);
+
+ if (txt==NULL) {
+ PyErr_SetString(PyExc_TypeError, "Expression.calc(text): expects a single string argument");
+ return NULL;
+ }
+
+ CParser parser;
+ CExpression* expr = parser.ProcessText(txt);
+ CValue* val = expr->Calculate();
+ expr->Release();
+
+ if (val) {
+ PyObject* pyobj = val->ConvertValueToPython();
+ if (pyobj)
+ return pyobj;
+ else
+ return val->GetProxy();
+ }
+
+ Py_RETURN_NONE;
+}
+
+
static struct PyMethodDef game_methods[] = {
{"expandPath", (PyCFunction)gPyExpandPath, METH_VARARGS, (const char *)gPyExpandPath_doc},
{"sendMessage", (PyCFunction)gPySendMessage, METH_VARARGS, (const char *)gPySendMessage_doc},
{"getCurrentController",
(PyCFunction) SCA_PythonController::sPyGetCurrentController,
- METH_NOARGS, SCA_PythonController::sPyGetCurrentController__doc__},
+ METH_NOARGS, (const char *)SCA_PythonController::sPyGetCurrentController__doc__},
{"getCurrentScene", (PyCFunction) gPyGetCurrentScene,
- METH_NOARGS, gPyGetCurrentScene_doc},
+ METH_NOARGS, (const char *)gPyGetCurrentScene_doc.Ptr()},
{"getSceneList", (PyCFunction) gPyGetSceneList,
- METH_NOARGS, (const char *)gPyGetSceneList_doc},
+ METH_NOARGS, (const char *)gPyGetSceneList_doc.Ptr()},
+ {"addActiveActuator",(PyCFunction) SCA_PythonController::sPyAddActiveActuator,
+ METH_VARARGS, (const char *)SCA_PythonController::sPyAddActiveActuator__doc__},
{"getRandomFloat",(PyCFunction) gPyGetRandomFloat,
- METH_NOARGS, (const char *)gPyGetRandomFloat_doc},
+ METH_NOARGS, (const char *)gPyGetRandomFloat_doc.Ptr()},
{"setGravity",(PyCFunction) gPySetGravity, METH_O, (const char *)"set Gravitation"},
{"getSpectrum",(PyCFunction) gPyGetSpectrum, METH_NOARGS, (const char *)"get audio spectrum"},
{"stopDSP",(PyCFunction) gPyStopDSP, METH_VARARGS, (const char *)"stop using the audio dsp (for performance reasons)"},
@@ -474,6 +502,7 @@ static struct PyMethodDef game_methods[] = {
{"getAverageFrameRate", (PyCFunction) gPyGetAverageFrameRate, METH_NOARGS, (const char *)"Gets the estimated average frame rate"},
{"getBlendFileList", (PyCFunction)gPyGetBlendFileList, METH_VARARGS, (const char *)"Gets a list of blend files in the same directory as the current blend file"},
{"PrintGLInfo", (PyCFunction)pyPrintExt, METH_NOARGS, (const char *)"Prints GL Extension Info"},
+ {"EvalExpression", (PyCFunction)gEvalExpression, METH_O, (const char *)"Evaluate a string as a game logic expression"},
{NULL, (PyCFunction) NULL, 0, NULL }
};
@@ -2016,3 +2045,6 @@ void resetGamePythonPath()
{
gp_GamePythonPathOrig[0] = '\0';
}
+
+
+
diff --git a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
index 61e563791c3..5260c0bb01a 100644
--- a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
@@ -123,6 +123,9 @@ static void PyType_Ready_ADD(PyObject *dict, PyTypeObject *tp, PyAttributeDef *a
memset(attr_getset, 0, sizeof(PyGetSetDef));
}
} else {
+
+ PyObject *item;
+
PyType_Ready(tp);
PyDict_SetItemString(dict, tp->tp_name, reinterpret_cast<PyObject *>(tp));
}
diff --git a/source/gameengine/Ketsji/KX_PythonSeq.cpp b/source/gameengine/Ketsji/KX_PythonSeq.cpp
index 75a7c9b8aeb..4fc5252de60 100644
--- a/source/gameengine/Ketsji/KX_PythonSeq.cpp
+++ b/source/gameengine/Ketsji/KX_PythonSeq.cpp
@@ -340,42 +340,11 @@ static PyObject *KX_PythonSeq_nextIter(KX_PythonSeq *self)
}
-static int KX_PythonSeq_compare( KX_PythonSeq * a, KX_PythonSeq * b )
+static int KX_PythonSeq_compare( KX_PythonSeq * a, KX_PythonSeq * b ) /* TODO - python3.x wants richcmp */
{
return ( a->type == b->type && a->base == b->base) ? 0 : -1;
}
-static PyObject *KX_PythonSeq_richcmp(PyObject *a, PyObject *b, int op)
-{
- PyObject *res;
- int ok= -1; /* zero is true */
-
- if(BPy_KX_PythonSeq_Check(a) && BPy_KX_PythonSeq_Check(b))
- ok= KX_PythonSeq_compare((KX_PythonSeq *)a, (KX_PythonSeq *)b);
-
- switch (op) {
- case Py_NE:
- ok = !ok; /* pass through */
- case Py_EQ:
- res = ok ? Py_False : Py_True;
- break;
-
- case Py_LT:
- case Py_LE:
- case Py_GT:
- case Py_GE:
- res = Py_NotImplemented;
- break;
- default:
- PyErr_BadArgument();
- return NULL;
- }
-
- Py_INCREF(res);
- return res;
-}
-
-
/*
* repr function
* convert to a list and get its string value
@@ -405,7 +374,8 @@ PyTypeObject KX_PythonSeq_Type = {
NULL, /* printfunc tp_print; */
NULL, /* getattrfunc tp_getattr; */
NULL, /* setattrfunc tp_setattr; */
- NULL, /* cmpfunc tp_compare; */
+ /* TODO, richcmp */
+ NULL, /* ( cmpfunc ) KX_PythonSeq_compare, /* cmpfunc tp_compare; */
( reprfunc ) KX_PythonSeq_repr, /* reprfunc tp_repr; */
/* Method suites for standard classes */
@@ -431,14 +401,14 @@ PyTypeObject KX_PythonSeq_Type = {
NULL, /* char *tp_doc; Documentation string */
/*** Assigned meaning in release 2.0 ***/
/* call function for all accessible objects */
- NULL, /* traverseproc tp_traverse; */
+ NULL, /* traverseproc tp_traverse; */
/* delete references to contained objects */
NULL, /* inquiry tp_clear; */
/*** Assigned meaning in release 2.1 ***/
/*** rich comparisons ***/
- (richcmpfunc)KX_PythonSeq_richcmp, /* richcmpfunc tp_richcompare; */
+ NULL, /* richcmpfunc tp_richcompare; */
/*** weak reference enabler ***/
0, /* long tp_weaklistoffset; */
diff --git a/source/gameengine/Ketsji/KX_RadarSensor.cpp b/source/gameengine/Ketsji/KX_RadarSensor.cpp
index eb127be8044..d020a2544d2 100644
--- a/source/gameengine/Ketsji/KX_RadarSensor.cpp
+++ b/source/gameengine/Ketsji/KX_RadarSensor.cpp
@@ -176,7 +176,51 @@ void KX_RadarSensor::SynchronizeTransform()
/* Python Functions */
/* ------------------------------------------------------------------------- */
-/* none */
+//Deprecated ----->
+/* getConeOrigin */
+const char KX_RadarSensor::GetConeOrigin_doc[] =
+"getConeOrigin()\n"
+"\tReturns the origin of the cone with which to test. The origin\n"
+"\tis in the middle of the cone.";
+PyObject* KX_RadarSensor::PyGetConeOrigin() {
+ ShowDeprecationWarning("getConeOrigin()", "the coneOrigin property");
+
+ PyObject *retVal = PyList_New(3);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_cone_origin[0]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_cone_origin[1]));
+ PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_cone_origin[2]));
+
+ return retVal;
+}
+
+/* getConeOrigin */
+const char KX_RadarSensor::GetConeTarget_doc[] =
+"getConeTarget()\n"
+"\tReturns the center of the bottom face of the cone with which to test.\n";
+PyObject* KX_RadarSensor::PyGetConeTarget() {
+ ShowDeprecationWarning("getConeTarget()", "the coneTarget property");
+
+ PyObject *retVal = PyList_New(3);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_cone_target[0]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_cone_target[1]));
+ PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_cone_target[2]));
+
+ return retVal;
+}
+
+/* getConeHeight */
+const char KX_RadarSensor::GetConeHeight_doc[] =
+"getConeHeight()\n"
+"\tReturns the height of the cone with which to test.\n";
+PyObject* KX_RadarSensor::PyGetConeHeight() {
+
+ ShowDeprecationWarning("getConeHeight()", "the distance property");
+
+ return PyFloat_FromDouble(m_coneheight);
+}
+//<----- Deprecated
/* ------------------------------------------------------------------------- */
/* Python Integration Hooks */
@@ -204,6 +248,14 @@ PyTypeObject KX_RadarSensor::Type = {
};
PyMethodDef KX_RadarSensor::Methods[] = {
+ //Deprecated ----->
+ {"getConeOrigin", (PyCFunction) KX_RadarSensor::sPyGetConeOrigin,
+ METH_VARARGS, (const char *)GetConeOrigin_doc},
+ {"getConeTarget", (PyCFunction) KX_RadarSensor::sPyGetConeTarget,
+ METH_VARARGS, (const char *)GetConeTarget_doc},
+ {"getConeHeight", (PyCFunction) KX_RadarSensor::sPyGetConeHeight,
+ METH_VARARGS, (const char *)GetConeHeight_doc},
+ //<-----
{NULL} //Sentinel
};
diff --git a/source/gameengine/Ketsji/KX_RadarSensor.h b/source/gameengine/Ketsji/KX_RadarSensor.h
index 487e9f1aaa7..9f38d75abc4 100644
--- a/source/gameengine/Ketsji/KX_RadarSensor.h
+++ b/source/gameengine/Ketsji/KX_RadarSensor.h
@@ -90,6 +90,11 @@ public:
/* python */
virtual sensortype GetSensorType() { return ST_RADAR; }
+ //Deprecated ----->
+ KX_PYMETHOD_DOC_NOARGS(KX_RadarSensor,GetConeOrigin);
+ KX_PYMETHOD_DOC_NOARGS(KX_RadarSensor,GetConeTarget);
+ KX_PYMETHOD_DOC_NOARGS(KX_RadarSensor,GetConeHeight);
+ //<-----
};
#endif //__KX_RADAR_SENSOR_H
diff --git a/source/gameengine/Ketsji/KX_RaySensor.cpp b/source/gameengine/Ketsji/KX_RaySensor.cpp
index 1f36945ccaa..8616145d709 100644
--- a/source/gameengine/Ketsji/KX_RaySensor.cpp
+++ b/source/gameengine/Ketsji/KX_RaySensor.cpp
@@ -342,6 +342,12 @@ PyTypeObject KX_RaySensor::Type = {
};
PyMethodDef KX_RaySensor::Methods[] = {
+ // Deprecated ----->
+ {"getHitObject",(PyCFunction) KX_RaySensor::sPyGetHitObject,METH_NOARGS, (const char *)GetHitObject_doc},
+ {"getHitPosition",(PyCFunction) KX_RaySensor::sPyGetHitPosition,METH_NOARGS, (const char *)GetHitPosition_doc},
+ {"getHitNormal",(PyCFunction) KX_RaySensor::sPyGetHitNormal,METH_NOARGS, (const char *)GetHitNormal_doc},
+ {"getRayDirection",(PyCFunction) KX_RaySensor::sPyGetRayDirection,METH_NOARGS, (const char *)GetRayDirection_doc},
+ // <-----
{NULL,NULL} //Sentinel
};
@@ -366,3 +372,68 @@ PyObject* KX_RaySensor::pyattr_get_hitobject(void *self_v, const KX_PYATTRIBUTE_
Py_RETURN_NONE;
}
+
+// Deprecated ----->
+const char KX_RaySensor::GetHitObject_doc[] =
+"getHitObject()\n"
+"\tReturns the name of the object that was hit by this ray.\n";
+PyObject* KX_RaySensor::PyGetHitObject()
+{
+ ShowDeprecationWarning("getHitObject()", "the hitObject property");
+ if (m_hitObject)
+ {
+ return m_hitObject->GetProxy();
+ }
+ Py_RETURN_NONE;
+}
+
+
+const char KX_RaySensor::GetHitPosition_doc[] =
+"getHitPosition()\n"
+"\tReturns the position (in worldcoordinates) where the object was hit by this ray.\n";
+PyObject* KX_RaySensor::PyGetHitPosition()
+{
+ ShowDeprecationWarning("getHitPosition()", "the hitPosition property");
+
+ PyObject *retVal = PyList_New(3);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_hitPosition[0]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_hitPosition[1]));
+ PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_hitPosition[2]));
+
+ return retVal;
+}
+
+const char KX_RaySensor::GetRayDirection_doc[] =
+"getRayDirection()\n"
+"\tReturns the direction from the ray (in worldcoordinates) .\n";
+PyObject* KX_RaySensor::PyGetRayDirection()
+{
+ ShowDeprecationWarning("getRayDirection()", "the rayDirection property");
+
+ PyObject *retVal = PyList_New(3);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_rayDirection[0]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_rayDirection[1]));
+ PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_rayDirection[2]));
+
+ return retVal;
+}
+
+const char KX_RaySensor::GetHitNormal_doc[] =
+"getHitNormal()\n"
+"\tReturns the normal (in worldcoordinates) of the object at the location where the object was hit by this ray.\n";
+PyObject* KX_RaySensor::PyGetHitNormal()
+{
+ ShowDeprecationWarning("getHitNormal()", "the hitNormal property");
+
+ PyObject *retVal = PyList_New(3);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_hitNormal[0]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_hitNormal[1]));
+ PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_hitNormal[2]));
+
+ return retVal;
+}
+
+// <----- Deprecated
diff --git a/source/gameengine/Ketsji/KX_RaySensor.h b/source/gameengine/Ketsji/KX_RaySensor.h
index d3e92a14214..530c8ce54e5 100644
--- a/source/gameengine/Ketsji/KX_RaySensor.h
+++ b/source/gameengine/Ketsji/KX_RaySensor.h
@@ -84,6 +84,12 @@ public:
KX_RAY_AXIS_NEG_Z
};
+ // Deprecated ----->
+ KX_PYMETHOD_DOC_NOARGS(KX_RaySensor,GetHitObject);
+ KX_PYMETHOD_DOC_NOARGS(KX_RaySensor,GetHitPosition);
+ KX_PYMETHOD_DOC_NOARGS(KX_RaySensor,GetHitNormal);
+ KX_PYMETHOD_DOC_NOARGS(KX_RaySensor,GetRayDirection);
+ // <-----
/* Attributes */
static PyObject* pyattr_get_hitobject(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
index 099403fc28d..fffb0ac1220 100644
--- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
@@ -192,7 +192,18 @@ PyTypeObject KX_SCA_AddObjectActuator::Type = {
};
PyMethodDef KX_SCA_AddObjectActuator::Methods[] = {
+ // ---> deprecated
+ {"setTime", (PyCFunction) KX_SCA_AddObjectActuator::sPySetTime, METH_O, (const char *)SetTime_doc},
+ {"getTime", (PyCFunction) KX_SCA_AddObjectActuator::sPyGetTime, METH_NOARGS, (const char *)GetTime_doc},
+ {"getLinearVelocity", (PyCFunction) KX_SCA_AddObjectActuator::sPyGetLinearVelocity, METH_NOARGS, (const char *)GetLinearVelocity_doc},
+ {"setLinearVelocity", (PyCFunction) KX_SCA_AddObjectActuator::sPySetLinearVelocity, METH_VARARGS, (const char *)SetLinearVelocity_doc},
+ {"getAngularVelocity", (PyCFunction) KX_SCA_AddObjectActuator::sPyGetAngularVelocity, METH_NOARGS, (const char *)GetAngularVelocity_doc},
+ {"setAngularVelocity", (PyCFunction) KX_SCA_AddObjectActuator::sPySetAngularVelocity, METH_VARARGS, (const char *)SetAngularVelocity_doc},
+ {"getLastCreatedObject", (PyCFunction) KX_SCA_AddObjectActuator::sPyGetLastCreatedObject, METH_NOARGS,"getLastCreatedObject() : get the object handle to the last created object\n"},
{"instantAddObject", (PyCFunction) KX_SCA_AddObjectActuator::sPyInstantAddObject, METH_NOARGS,"instantAddObject() : immediately add object without delay\n"},
+ {"setObject", (PyCFunction) KX_SCA_AddObjectActuator::sPySetObject, METH_O, (const char *)SetObject_doc},
+ {"getObject", (PyCFunction) KX_SCA_AddObjectActuator::sPyGetObject, METH_VARARGS, (const char *)GetObject_doc},
+
{NULL,NULL} //Sentinel
};
@@ -242,6 +253,181 @@ PyObject* KX_SCA_AddObjectActuator::pyattr_get_objectLastCreated(void *self, con
return actuator->m_lastCreatedObject->GetProxy();
}
+/* 1. setObject */
+const char KX_SCA_AddObjectActuator::SetObject_doc[] =
+"setObject(object)\n"
+"\t- object: KX_GameObject, string or None\n"
+"\tSets the object that will be added. There has to be an object\n"
+"\tof this name. If not, this function does nothing.\n";
+PyObject* KX_SCA_AddObjectActuator::PySetObject(PyObject* value)
+{
+ KX_GameObject *gameobj;
+
+ ShowDeprecationWarning("setObject()", "the object property");
+
+ if (!ConvertPythonToGameObject(value, &gameobj, true, "actuator.setObject(value): KX_SCA_AddObjectActuator"))
+ return NULL; // ConvertPythonToGameObject sets the error
+
+ if (m_OriginalObject != NULL)
+ m_OriginalObject->UnregisterActuator(this);
+
+ m_OriginalObject = (SCA_IObject*)gameobj;
+ if (m_OriginalObject)
+ m_OriginalObject->RegisterActuator(this);
+
+ Py_RETURN_NONE;
+}
+
+
+
+/* 2. setTime */
+const char KX_SCA_AddObjectActuator::SetTime_doc[] =
+"setTime(duration)\n"
+"\t- duration: integer\n"
+"\tSets the lifetime of the object that will be added, in frames. \n"
+"\tIf the duration is negative, it is set to 0.\n";
+
+
+PyObject* KX_SCA_AddObjectActuator::PySetTime(PyObject* value)
+{
+ ShowDeprecationWarning("setTime()", "the time property");
+ int deltatime = PyLong_AsSsize_t(value);
+ if (deltatime==-1 && PyErr_Occurred()) {
+ PyErr_SetString(PyExc_TypeError, "expected an int");
+ return NULL;
+ }
+
+ m_timeProp = deltatime;
+ if (m_timeProp < 0) m_timeProp = 0;
+
+ Py_RETURN_NONE;
+}
+
+
+
+/* 3. getTime */
+const char KX_SCA_AddObjectActuator::GetTime_doc[] =
+"getTime()\n"
+"\tReturns the lifetime of the object that will be added.\n";
+
+
+PyObject* KX_SCA_AddObjectActuator::PyGetTime()
+{
+ ShowDeprecationWarning("getTime()", "the time property");
+ return PyLong_FromSsize_t(m_timeProp);
+}
+
+
+/* 4. getObject */
+const char KX_SCA_AddObjectActuator::GetObject_doc[] =
+"getObject(name_only = 1)\n"
+"name_only - optional arg, when true will return the KX_GameObject rather then its name\n"
+"\tReturns the name of the object that will be added.\n";
+PyObject* KX_SCA_AddObjectActuator::PyGetObject(PyObject* args)
+{
+ int ret_name_only = 1;
+
+ ShowDeprecationWarning("getObject()", "the object property");
+
+ if (!PyArg_ParseTuple(args, "|i:getObject", &ret_name_only))
+ return NULL;
+
+ if (!m_OriginalObject)
+ Py_RETURN_NONE;
+
+ if (ret_name_only)
+ return PyUnicode_FromString(m_OriginalObject->GetName().ReadPtr());
+ else
+ return m_OriginalObject->GetProxy();
+}
+
+
+
+/* 5. getLinearVelocity */
+const char KX_SCA_AddObjectActuator::GetLinearVelocity_doc[] =
+"GetLinearVelocity()\n"
+"\tReturns the linear velocity that will be assigned to \n"
+"\tthe created object.\n";
+
+PyObject* KX_SCA_AddObjectActuator::PyGetLinearVelocity()
+{
+ ShowDeprecationWarning("getLinearVelocity()", "the linearVelocity property");
+ PyObject *retVal = PyList_New(3);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_linear_velocity[0]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_linear_velocity[1]));
+ PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_linear_velocity[2]));
+
+ return retVal;
+}
+
+
+
+/* 6. setLinearVelocity */
+const char KX_SCA_AddObjectActuator::SetLinearVelocity_doc[] =
+"setLinearVelocity(vx, vy, vz)\n"
+"\t- vx: float\n"
+"\t- vy: float\n"
+"\t- vz: float\n"
+"\t- local: bool\n"
+"\tAssign this velocity to the created object. \n";
+
+PyObject* KX_SCA_AddObjectActuator::PySetLinearVelocity(PyObject* args)
+{
+ ShowDeprecationWarning("setLinearVelocity()", "the linearVelocity property");
+
+ float vecArg[3];
+ if (!PyArg_ParseTuple(args, "fff:setLinearVelocity", &vecArg[0], &vecArg[1], &vecArg[2]))
+ return NULL;
+
+ m_linear_velocity[0] = vecArg[0];
+ m_linear_velocity[1] = vecArg[1];
+ m_linear_velocity[2] = vecArg[2];
+ Py_RETURN_NONE;
+}
+
+/* 7. getAngularVelocity */
+const char KX_SCA_AddObjectActuator::GetAngularVelocity_doc[] =
+"GetAngularVelocity()\n"
+"\tReturns the angular velocity that will be assigned to \n"
+"\tthe created object.\n";
+
+PyObject* KX_SCA_AddObjectActuator::PyGetAngularVelocity()
+{
+ ShowDeprecationWarning("getAngularVelocity()", "the angularVelocity property");
+ PyObject *retVal = PyList_New(3);
+
+ PyList_SET_ITEM(retVal, 0, PyFloat_FromDouble(m_angular_velocity[0]));
+ PyList_SET_ITEM(retVal, 1, PyFloat_FromDouble(m_angular_velocity[1]));
+ PyList_SET_ITEM(retVal, 2, PyFloat_FromDouble(m_angular_velocity[2]));
+
+ return retVal;
+}
+
+
+
+/* 8. setAngularVelocity */
+const char KX_SCA_AddObjectActuator::SetAngularVelocity_doc[] =
+"setAngularVelocity(vx, vy, vz)\n"
+"\t- vx: float\n"
+"\t- vy: float\n"
+"\t- vz: float\n"
+"\t- local: bool\n"
+"\tAssign this angular velocity to the created object. \n";
+
+PyObject* KX_SCA_AddObjectActuator::PySetAngularVelocity(PyObject* args)
+{
+ ShowDeprecationWarning("setAngularVelocity()", "the angularVelocity property");
+
+ float vecArg[3];
+ if (!PyArg_ParseTuple(args, "fff:setAngularVelocity", &vecArg[0], &vecArg[1], &vecArg[2]))
+ return NULL;
+
+ m_angular_velocity[0] = vecArg[0];
+ m_angular_velocity[1] = vecArg[1];
+ m_angular_velocity[2] = vecArg[2];
+ Py_RETURN_NONE;
+}
void KX_SCA_AddObjectActuator::InstantAddObject()
{
@@ -284,3 +470,26 @@ PyObject* KX_SCA_AddObjectActuator::PyInstantAddObject()
Py_RETURN_NONE;
}
+
+
+
+/* 7. GetLastCreatedObject */
+const char KX_SCA_AddObjectActuator::GetLastCreatedObject_doc[] =
+"getLastCreatedObject()\n"
+"\tReturn the last created object. \n";
+
+
+PyObject* KX_SCA_AddObjectActuator::PyGetLastCreatedObject()
+{
+ ShowDeprecationWarning("getLastCreatedObject()", "the objectLastCreated property");
+ SCA_IObject* result = this->GetLastCreatedObject();
+
+ // if result->GetSGNode() is NULL
+ // it means the object has ended, The BGE python api crashes in many places if the object is returned.
+ if (result && (static_cast<KX_GameObject *>(result))->GetSGNode())
+ {
+ return result->GetProxy();
+ }
+ // don't return NULL to python anymore, it gives trouble in the scripts
+ Py_RETURN_NONE;
+}
diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
index 7137ba5209e..3151e7a89ca 100644
--- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
+++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
@@ -115,6 +115,25 @@ public:
void InstantAddObject();
+ /* 1. setObject */
+ KX_PYMETHOD_DOC_O(KX_SCA_AddObjectActuator,SetObject);
+ /* 2. setTime */
+ KX_PYMETHOD_DOC_O(KX_SCA_AddObjectActuator,SetTime);
+ /* 3. getTime */
+ KX_PYMETHOD_DOC_NOARGS(KX_SCA_AddObjectActuator,GetTime);
+ /* 4. getObject */
+ KX_PYMETHOD_DOC_VARARGS(KX_SCA_AddObjectActuator,GetObject);
+ /* 5. getLinearVelocity */
+ KX_PYMETHOD_DOC_NOARGS(KX_SCA_AddObjectActuator,GetLinearVelocity);
+ /* 6. setLinearVelocity */
+ KX_PYMETHOD_DOC_VARARGS(KX_SCA_AddObjectActuator,SetLinearVelocity);
+ /* 7. getAngularVelocity */
+ KX_PYMETHOD_DOC_NOARGS(KX_SCA_AddObjectActuator,GetAngularVelocity);
+ /* 8. setAngularVelocity */
+ KX_PYMETHOD_DOC_VARARGS(KX_SCA_AddObjectActuator,SetAngularVelocity);
+ /* 9. getLastCreatedObject */
+ KX_PYMETHOD_DOC_NOARGS(KX_SCA_AddObjectActuator,GetLastCreatedObject);
+ /* 10. instantAddObject*/
KX_PYMETHOD_DOC_NOARGS(KX_SCA_AddObjectActuator,InstantAddObject);
static PyObject* pyattr_get_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
index 646cfb7219f..196c1915f72 100644
--- a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
@@ -70,6 +70,9 @@ PyTypeObject KX_SCA_DynamicActuator::Type = {
};
PyMethodDef KX_SCA_DynamicActuator::Methods[] = {
+ // ---> deprecated
+ KX_PYMETHODTABLE(KX_SCA_DynamicActuator, setOperation),
+ KX_PYMETHODTABLE(KX_SCA_DynamicActuator, getOperation),
{NULL,NULL} //Sentinel
};
@@ -79,6 +82,42 @@ PyAttributeDef KX_SCA_DynamicActuator::Attributes[] = {
{ NULL } //Sentinel
};
+
+/* 1. setOperation */
+KX_PYMETHODDEF_DOC(KX_SCA_DynamicActuator, setOperation,
+"setOperation(operation?)\n"
+"\t - operation? : type of dynamic operation\n"
+"\t 0 = restore dynamics\n"
+"\t 1 = disable dynamics\n"
+"\t 2 = enable rigid body\n"
+"\t 3 = disable rigid body\n"
+"Change the dynamic status of the parent object.\n")
+{
+ ShowDeprecationWarning("setOperation()", "the mode property");
+ int dyn_operation;
+
+ if (!PyArg_ParseTuple(args, "i:setOperation", &dyn_operation))
+ {
+ return NULL;
+ }
+ if (dyn_operation <0 || dyn_operation>3) {
+ PyErr_SetString(PyExc_IndexError, "Dynamic Actuator's setOperation() range must be between 0 and 3");
+ return NULL;
+ }
+ m_dyn_operation= dyn_operation;
+ Py_RETURN_NONE;
+}
+
+KX_PYMETHODDEF_DOC(KX_SCA_DynamicActuator, getOperation,
+"getOperation() -> integer\n"
+"Returns the operation type of this actuator.\n"
+)
+{
+ ShowDeprecationWarning("getOperation()", "the mode property");
+ return PyLong_FromSsize_t((long)m_dyn_operation);
+}
+
+
/* ------------------------------------------------------------------------- */
/* Native functions */
/* ------------------------------------------------------------------------- */
diff --git a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h
index 58b28654eca..8b598c9ecfa 100644
--- a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h
+++ b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h
@@ -71,6 +71,11 @@ class KX_SCA_DynamicActuator : public SCA_IActuator
KX_DYN_DISABLE_RIGID_BODY,
KX_DYN_SET_MASS,
};
+
+ /* 1. setOperation */
+ KX_PYMETHOD_DOC(KX_SCA_DynamicActuator,setOperation);
+ KX_PYMETHOD_DOC(KX_SCA_DynamicActuator,getOperation);
+
};
#endif
diff --git a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp
index e85b8a32798..0819ad99633 100644
--- a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp
@@ -74,6 +74,9 @@ PyTypeObject KX_SCA_ReplaceMeshActuator::Type = {
PyMethodDef KX_SCA_ReplaceMeshActuator::Methods[] = {
KX_PYMETHODTABLE(KX_SCA_ReplaceMeshActuator, instantReplaceMesh),
+ // Deprecated ----->
+ {"setMesh", (PyCFunction) KX_SCA_ReplaceMeshActuator::sPySetMesh, METH_O, (const char *)SetMesh_doc},
+ KX_PYMETHODTABLE(KX_SCA_ReplaceMeshActuator, getMesh),
{NULL,NULL} //Sentinel
};
@@ -105,6 +108,37 @@ int KX_SCA_ReplaceMeshActuator::pyattr_set_mesh(void *self, const struct KX_PYAT
return PY_SET_ATTR_SUCCESS;
}
+/* 1. setMesh */
+const char KX_SCA_ReplaceMeshActuator::SetMesh_doc[] =
+ "setMesh(name)\n"
+ "\t- name: string or None\n"
+ "\tSet the mesh that will be substituted for the current one.\n";
+
+PyObject* KX_SCA_ReplaceMeshActuator::PySetMesh(PyObject* value)
+{
+ ShowDeprecationWarning("setMesh()", "the mesh property");
+ RAS_MeshObject* new_mesh;
+
+ if (!ConvertPythonToMesh(value, &new_mesh, true, "actuator.mesh = value: KX_SCA_ReplaceMeshActuator"))
+ return NULL;
+
+ m_mesh = new_mesh;
+ Py_RETURN_NONE;
+}
+
+KX_PYMETHODDEF_DOC(KX_SCA_ReplaceMeshActuator, getMesh,
+"getMesh() -> string\n"
+"Returns the name of the mesh to be substituted.\n"
+)
+{
+ ShowDeprecationWarning("getMesh()", "the mesh property");
+ if (!m_mesh)
+ Py_RETURN_NONE;
+
+ return PyUnicode_FromString(const_cast<char *>(m_mesh->GetName().ReadPtr()));
+}
+
+
KX_PYMETHODDEF_DOC(KX_SCA_ReplaceMeshActuator, instantReplaceMesh,
"instantReplaceMesh() : immediately replace mesh without delay\n")
{
diff --git a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h
index e5482c29aa7..ae2c0d2d6ce 100644
--- a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h
+++ b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h
@@ -50,8 +50,8 @@ class KX_SCA_ReplaceMeshActuator : public SCA_IActuator
// mesh reference (mesh to replace)
RAS_MeshObject* m_mesh;
SCA_IScene* m_scene;
- bool m_use_gfx;
bool m_use_phys;
+ bool m_use_gfx;
public:
KX_SCA_ReplaceMeshActuator(
@@ -74,13 +74,12 @@ class KX_SCA_ReplaceMeshActuator : public SCA_IActuator
void InstantReplaceMesh();
- /* --------------------------------------------------------------------- */
- /* Python interface ---------------------------------------------------- */
- /* --------------------------------------------------------------------- */
-
static PyObject* pyattr_get_mesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_mesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+ /* 1. setMesh */
+ KX_PYMETHOD_DOC_O(KX_SCA_ReplaceMeshActuator,SetMesh);
+ KX_PYMETHOD_DOC(KX_SCA_ReplaceMeshActuator,getMesh);
KX_PYMETHOD_DOC(KX_SCA_ReplaceMeshActuator,instantReplaceMesh);
};
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index 3483496c3a6..5c19911fe58 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -1615,10 +1615,7 @@ PyTypeObject KX_Scene::Type = {
0,
0,
py_base_repr,
- 0,
- &Sequence,
- &Mapping,
- 0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
0,0,0,0,0,0,0,
Methods,
@@ -1630,117 +1627,13 @@ PyTypeObject KX_Scene::Type = {
};
PyMethodDef KX_Scene::Methods[] = {
+ KX_PYMETHODTABLE_NOARGS(KX_Scene, getLightList),
+ KX_PYMETHODTABLE_NOARGS(KX_Scene, getObjectList),
+ KX_PYMETHODTABLE_NOARGS(KX_Scene, getName),
KX_PYMETHODTABLE(KX_Scene, addObject),
- /* dict style access */
- KX_PYMETHODTABLE(KX_Scene, get),
-
{NULL,NULL} //Sentinel
};
-static PyObject *Map_GetItem(PyObject *self_v, PyObject *item)
-{
- KX_Scene* self= static_cast<KX_Scene*>BGE_PROXY_REF(self_v);
- const char *attr_str= _PyUnicode_AsString(item);
- PyObject* pyconvert;
-
- if (self==NULL) {
- PyErr_SetString(PyExc_SystemError, "val = scene[key]: KX_Scene, "BGE_PROXY_ERROR_MSG);
- return NULL;
- }
-
- if (self->m_attr_dict && (pyconvert=PyDict_GetItem(self->m_attr_dict, item))) {
-
- if (attr_str)
- PyErr_Clear();
- Py_INCREF(pyconvert);
- return pyconvert;
- }
- else {
- if(attr_str) PyErr_Format(PyExc_KeyError, "value = scene[key]: KX_Scene, key \"%s\" does not exist", attr_str);
- else PyErr_SetString(PyExc_KeyError, "value = scene[key]: KX_Scene, key does not exist");
- return NULL;
- }
-
-}
-
-static int Map_SetItem(PyObject *self_v, PyObject *key, PyObject *val)
-{
- KX_Scene* self= static_cast<KX_Scene*>BGE_PROXY_REF(self_v);
- const char *attr_str= _PyUnicode_AsString(key);
- if(attr_str==NULL)
- PyErr_Clear();
-
- if (self==NULL) {
- PyErr_SetString(PyExc_SystemError, "scene[key] = value: KX_Scene, "BGE_PROXY_ERROR_MSG);
- return -1;
- }
-
- if (val==NULL) { /* del ob["key"] */
- int del= 0;
-
- if(self->m_attr_dict)
- del |= (PyDict_DelItem(self->m_attr_dict, key)==0) ? 1:0;
-
- if (del==0) {
- if(attr_str) PyErr_Format(PyExc_KeyError, "scene[key] = value: KX_Scene, key \"%s\" could not be set", attr_str);
- else PyErr_SetString(PyExc_KeyError, "del scene[key]: KX_Scene, key could not be deleted");
- return -1;
- }
- else if (self->m_attr_dict) {
- PyErr_Clear(); /* PyDict_DelItem sets an error when it fails */
- }
- }
- else { /* ob["key"] = value */
- int set = 0;
-
- if (self->m_attr_dict==NULL) /* lazy init */
- self->m_attr_dict= PyDict_New();
-
-
- if(PyDict_SetItem(self->m_attr_dict, key, val)==0)
- set= 1;
- else
- PyErr_SetString(PyExc_KeyError, "scene[key] = value: KX_Scene, key not be added to internal dictionary");
-
- if(set==0)
- return -1; /* pythons error value */
-
- }
-
- return 0; /* success */
-}
-
-static int Seq_Contains(PyObject *self_v, PyObject *value)
-{
- KX_Scene* self= static_cast<KX_Scene*>BGE_PROXY_REF(self_v);
-
- if (self==NULL) {
- PyErr_SetString(PyExc_SystemError, "val in scene: KX_Scene, "BGE_PROXY_ERROR_MSG);
- return -1;
- }
-
- if (self->m_attr_dict && PyDict_GetItem(self->m_attr_dict, value))
- return 1;
-
- return 0;
-}
-
-PyMappingMethods KX_Scene::Mapping = {
- (lenfunc)NULL , /*inquiry mp_length */
- (binaryfunc)Map_GetItem, /*binaryfunc mp_subscript */
- (objobjargproc)Map_SetItem, /*objobjargproc mp_ass_subscript */
-};
-
-PySequenceMethods KX_Scene::Sequence = {
- NULL, /* Cant set the len otherwise it can evaluate as false */
- NULL, /* sq_concat */
- NULL, /* sq_repeat */
- NULL, /* sq_item */
- NULL, /* sq_slice */
- NULL, /* sq_ass_item */
- NULL, /* sq_ass_slice */
- (objobjproc)Seq_Contains, /* sq_contains */
-};
PyObject* KX_Scene::pyattr_get_name(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
@@ -1821,6 +1714,33 @@ PyAttributeDef KX_Scene::Attributes[] = {
{ NULL } //Sentinel
};
+KX_PYMETHODDEF_DOC_NOARGS(KX_Scene, getLightList,
+"getLightList() -> list [KX_Light]\n"
+"Returns a list of all lights in the scene.\n"
+)
+{
+ ShowDeprecationWarning("getLightList()", "the lights property");
+ return m_lightlist->GetProxy();
+}
+
+KX_PYMETHODDEF_DOC_NOARGS(KX_Scene, getObjectList,
+"getObjectList() -> list [KX_GameObject]\n"
+"Returns a list of all game objects in the scene.\n"
+)
+{
+ ShowDeprecationWarning("getObjectList()", "the objects property");
+ return m_objectlist->GetProxy();
+}
+
+KX_PYMETHODDEF_DOC_NOARGS(KX_Scene, getName,
+"getName() -> string\n"
+"Returns the name of the scene.\n"
+)
+{
+ ShowDeprecationWarning("getName()", "the name property");
+ return PyUnicode_FromString(GetName());
+}
+
KX_PYMETHODDEF_DOC(KX_Scene, addObject,
"addObject(object, other, time=0)\n"
"Returns the added object.\n")
@@ -1845,22 +1765,3 @@ KX_PYMETHODDEF_DOC(KX_Scene, addObject,
replica->Release();
return replica->GetProxy();
}
-
-/* Matches python dict.get(key, [default]) */
-KX_PYMETHODDEF_DOC(KX_Scene, get, "")
-{
- PyObject *key;
- PyObject* def = Py_None;
- PyObject* ret;
-
- if (!PyArg_ParseTuple(args, "O|O:get", &key, &def))
- return NULL;
-
- if (m_attr_dict && (ret=PyDict_GetItem(m_attr_dict, key))) {
- Py_INCREF(ret);
- return ret;
- }
-
- Py_INCREF(def);
- return def;
-}
diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h
index 3e0dc303d72..f48e9520f53 100644
--- a/source/gameengine/Ketsji/KX_Scene.h
+++ b/source/gameengine/Ketsji/KX_Scene.h
@@ -90,7 +90,6 @@ struct KX_ClientObjectInfo;
class KX_Scene : public PyObjectPlus, public SCA_IScene
{
Py_Header;
- PyObject* m_attr_dict;
struct CullingInfo {
int m_layer;
@@ -263,10 +262,15 @@ protected:
double m_suspendedtime;
double m_suspendeddelta;
+
+ /**
+ * This stores anything from python
+ */
+ PyObject* m_attr_dict;
struct Scene* m_blenderScene;
-public:
+public:
KX_Scene(class SCA_IInputDevice* keyboarddevice,
class SCA_IInputDevice* mousedevice,
class NG_NetworkDeviceInterface* ndi,
@@ -517,12 +521,23 @@ public:
*/
void SetNodeTree(SG_Tree* root);
- /* --------------------------------------------------------------------- */
- /* Python interface ---------------------------------------------------- */
- /* --------------------------------------------------------------------- */
-
+ KX_PYMETHOD_DOC_NOARGS(KX_Scene, getLightList);
+ KX_PYMETHOD_DOC_NOARGS(KX_Scene, getObjectList);
+ KX_PYMETHOD_DOC_NOARGS(KX_Scene, getName);
KX_PYMETHOD_DOC(KX_Scene, addObject);
- KX_PYMETHOD_DOC(KX_Scene, get);
+/*
+ KX_PYMETHOD_DOC(KX_Scene, getActiveCamera);
+ KX_PYMETHOD_DOC(KX_Scene, getActiveCamera);
+ KX_PYMETHOD_DOC(KX_Scene, findCamera);
+
+ KX_PYMETHOD_DOC(KX_Scene, getGravity);
+
+ KX_PYMETHOD_DOC(KX_Scene, setActivityCulling);
+ KX_PYMETHOD_DOC(KX_Scene, setActivityCullingRadius);
+
+ KX_PYMETHOD_DOC(KX_Scene, setSceneViewport);
+ KX_PYMETHOD_DOC(KX_Scene, setSceneViewport);
+ */
/* attributes */
static PyObject* pyattr_get_name(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
@@ -534,11 +549,7 @@ public:
static int pyattr_set_active_camera(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
virtual PyObject* py_repr(void) { return PyUnicode_FromString(GetName().ReadPtr()); }
-
- /* getitem/setitem */
- static PyMappingMethods Mapping;
- static PySequenceMethods Sequence;
-
+
/**
* Sets the time the scene was suspended
*/
diff --git a/source/gameengine/Ketsji/KX_SceneActuator.cpp b/source/gameengine/Ketsji/KX_SceneActuator.cpp
index ea1be7bca6c..a0b7664d63a 100644
--- a/source/gameengine/Ketsji/KX_SceneActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SceneActuator.cpp
@@ -245,6 +245,14 @@ PyTypeObject KX_SceneActuator::Type = {
PyMethodDef KX_SceneActuator::Methods[] =
{
+ //Deprecated functions ------>
+ {"setUseRestart", (PyCFunction) KX_SceneActuator::sPySetUseRestart, METH_VARARGS, (const char *)SetUseRestart_doc},
+ {"setScene", (PyCFunction) KX_SceneActuator::sPySetScene, METH_VARARGS, (const char *)SetScene_doc},
+ {"setCamera", (PyCFunction) KX_SceneActuator::sPySetCamera, METH_O, (const char *)SetCamera_doc},
+ {"getUseRestart", (PyCFunction) KX_SceneActuator::sPyGetUseRestart, METH_NOARGS, (const char *)GetUseRestart_doc},
+ {"getScene", (PyCFunction) KX_SceneActuator::sPyGetScene, METH_NOARGS, (const char *)GetScene_doc},
+ {"getCamera", (PyCFunction) KX_SceneActuator::sPyGetCamera, METH_NOARGS, (const char *)GetCamera_doc},
+ //<----- Deprecated
{NULL,NULL} //Sentinel
};
@@ -287,4 +295,117 @@ int KX_SceneActuator::pyattr_set_camera(void *self, const struct KX_PYATTRIBUTE_
return PY_SET_ATTR_SUCCESS;
}
+
+/* 2. setUseRestart--------------------------------------------------------- */
+const char KX_SceneActuator::SetUseRestart_doc[] =
+"setUseRestart(flag)\n"
+"\t- flag: 0 or 1.\n"
+"\tSet flag to 1 to restart the scene.\n" ;
+PyObject* KX_SceneActuator::PySetUseRestart(PyObject* args)
+{
+ ShowDeprecationWarning("setUseRestart()", "the useRestart property");
+ int boolArg;
+
+ if (!PyArg_ParseTuple(args, "i:setUseRestart", &boolArg))
+ {
+ return NULL;
+ }
+
+ m_restart = boolArg != 0;
+
+ Py_RETURN_NONE;
+}
+
+
+
+/* 3. getUseRestart: */
+const char KX_SceneActuator::GetUseRestart_doc[] =
+"getUseRestart()\n"
+"\tReturn whether the scene will be restarted.\n" ;
+PyObject* KX_SceneActuator::PyGetUseRestart()
+{
+ ShowDeprecationWarning("getUseRestart()", "the useRestart property");
+ return PyLong_FromSsize_t(!(m_restart == 0));
+}
+
+
+
+/* 4. set scene------------------------------------------------------------- */
+const char KX_SceneActuator::SetScene_doc[] =
+"setScene(scene)\n"
+"\t- scene: string\n"
+"\tSet the name of scene the actuator will switch to.\n" ;
+PyObject* KX_SceneActuator::PySetScene(PyObject* args)
+{
+ ShowDeprecationWarning("setScene()", "the scene property");
+ /* one argument: a scene, ignore the rest */
+ char *scene_name;
+
+ if(!PyArg_ParseTuple(args, "s:setScene", &scene_name))
+ {
+ return NULL;
+ }
+
+ /* Scene switch is done by name. */
+ m_nextSceneName = scene_name;
+
+ Py_RETURN_NONE;
+}
+
+
+
+/* 5. getScene: */
+const char KX_SceneActuator::GetScene_doc[] =
+"getScene()\n"
+"\tReturn the name of the scene the actuator wants to switch to.\n" ;
+PyObject* KX_SceneActuator::PyGetScene()
+{
+ ShowDeprecationWarning("getScene()", "the scene property");
+ return PyUnicode_FromString(m_nextSceneName);
+}
+
+
+
+/* 6. set camera------------------------------------------------------------ */
+const char KX_SceneActuator::SetCamera_doc[] =
+"setCamera(camera)\n"
+"\t- camera: string\n"
+"\tSet the camera to switch to.\n" ;
+PyObject* KX_SceneActuator::PySetCamera(PyObject* value)
+{
+ ShowDeprecationWarning("setCamera()", "the camera property");
+ KX_Camera *camOb;
+
+ if (!ConvertPythonToCamera(value, &camOb, true, "actu.setCamera(value): KX_SceneActuator"))
+ return NULL;
+
+ if (m_camera)
+ m_camera->UnregisterActuator(this);
+
+ if(camOb==NULL) {
+ m_camera= NULL;
+ }
+ else {
+ m_camera = camOb;
+ m_camera->RegisterActuator(this);
+ }
+ Py_RETURN_NONE;
+}
+
+
+
+/* 7. getCamera: */
+const char KX_SceneActuator::GetCamera_doc[] =
+"getCamera()\n"
+"\tReturn the name of the camera to switch to.\n" ;
+PyObject* KX_SceneActuator::PyGetCamera()
+{
+ ShowDeprecationWarning("getCamera()", "the camera property");
+ if (m_camera) {
+ return PyUnicode_FromString(m_camera->GetName());
+ }
+ else {
+ Py_RETURN_NONE;
+ }
+}
/* eof */
diff --git a/source/gameengine/Ketsji/KX_SceneActuator.h b/source/gameengine/Ketsji/KX_SceneActuator.h
index e979a8ce559..86de3395d1e 100644
--- a/source/gameengine/Ketsji/KX_SceneActuator.h
+++ b/source/gameengine/Ketsji/KX_SceneActuator.h
@@ -90,6 +90,22 @@ class KX_SceneActuator : public SCA_IActuator
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
+
+ /* 1. set */
+ /* Removed */
+
+ /* 2. setUseRestart: */
+ KX_PYMETHOD_DOC_VARARGS(KX_SceneActuator,SetUseRestart);
+ /* 3. getUseRestart: */
+ KX_PYMETHOD_DOC_NOARGS(KX_SceneActuator,GetUseRestart);
+ /* 4. setScene: */
+ KX_PYMETHOD_DOC_VARARGS(KX_SceneActuator,SetScene);
+ /* 5. getScene: */
+ KX_PYMETHOD_DOC_NOARGS(KX_SceneActuator,GetScene);
+ /* 6. setCamera: */
+ KX_PYMETHOD_DOC_O(KX_SceneActuator,SetCamera);
+ /* 7. getCamera: */
+ KX_PYMETHOD_DOC_NOARGS(KX_SceneActuator,GetCamera);
static PyObject* pyattr_get_camera(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_camera(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp
index e2b4022a312..024c51cabc1 100644
--- a/source/gameengine/Ketsji/KX_SoundActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp
@@ -296,6 +296,17 @@ PyTypeObject KX_SoundActuator::Type = {
};
PyMethodDef KX_SoundActuator::Methods[] = {
+ // Deprecated ----->
+ {"setGain",(PyCFunction) KX_SoundActuator::sPySetGain,METH_VARARGS,NULL},
+ {"getGain",(PyCFunction) KX_SoundActuator::sPyGetGain,METH_NOARGS,NULL},
+ {"setPitch",(PyCFunction) KX_SoundActuator::sPySetPitch,METH_VARARGS,NULL},
+ {"getPitch",(PyCFunction) KX_SoundActuator::sPyGetPitch,METH_NOARGS,NULL},
+ {"setRollOffFactor",(PyCFunction) KX_SoundActuator::sPySetRollOffFactor,METH_VARARGS,NULL},
+ {"getRollOffFactor",(PyCFunction) KX_SoundActuator::sPyGetRollOffFactor,METH_NOARGS,NULL},
+ {"setType",(PyCFunction) KX_SoundActuator::sPySetType,METH_VARARGS,NULL},
+ {"getType",(PyCFunction) KX_SoundActuator::sPyGetType,METH_NOARGS,NULL},
+ // <-----
+
KX_PYMETHODTABLE_NOARGS(KX_SoundActuator, startSound),
KX_PYMETHODTABLE_NOARGS(KX_SoundActuator, pauseSound),
KX_PYMETHODTABLE_NOARGS(KX_SoundActuator, stopSound),
@@ -416,3 +427,109 @@ int KX_SoundActuator::pyattr_set_rollOffFactor(void *self, const struct KX_PYATT
return PY_SET_ATTR_SUCCESS;
}
+
+PyObject* KX_SoundActuator::PySetGain(PyObject* args)
+{
+ ShowDeprecationWarning("setGain()", "the volume property");
+ float gain = 1.0;
+ if (!PyArg_ParseTuple(args, "f:setGain", &gain))
+ return NULL;
+
+ m_volume = gain;
+ if(m_handle)
+ AUD_setSoundVolume(m_handle, gain);
+
+ Py_RETURN_NONE;
+}
+
+
+
+PyObject* KX_SoundActuator::PyGetGain()
+{
+ ShowDeprecationWarning("getGain()", "the volume property");
+ float gain = m_volume;
+ PyObject* result = PyFloat_FromDouble(gain);
+
+ return result;
+}
+
+
+
+PyObject* KX_SoundActuator::PySetPitch(PyObject* args)
+{
+ ShowDeprecationWarning("setPitch()", "the pitch property");
+ float pitch = 1.0;
+ if (!PyArg_ParseTuple(args, "f:setPitch", &pitch))
+ return NULL;
+
+ m_pitch = pitch;
+ if(m_handle)
+ AUD_setSoundPitch(m_handle, pitch);
+
+ Py_RETURN_NONE;
+}
+
+
+
+PyObject* KX_SoundActuator::PyGetPitch()
+{
+ ShowDeprecationWarning("getPitch()", "the pitch property");
+ float pitch = m_pitch;
+ PyObject* result = PyFloat_FromDouble(pitch);
+
+ return result;
+}
+
+
+
+PyObject* KX_SoundActuator::PySetRollOffFactor(PyObject* args)
+{
+ ShowDeprecationWarning("setRollOffFactor()", "the rollOffFactor property");
+ float rollofffactor = 1.0;
+ if (!PyArg_ParseTuple(args, "f:setRollOffFactor", &rollofffactor))
+ return NULL;
+
+ m_3d.rolloff_factor = rollofffactor;
+ if(m_handle)
+ AUD_set3DSourceSetting(m_handle, AUD_3DSS_ROLLOFF_FACTOR, rollofffactor);
+
+ Py_RETURN_NONE;
+}
+
+
+
+PyObject* KX_SoundActuator::PyGetRollOffFactor()
+{
+ ShowDeprecationWarning("getRollOffFactor()", "the rollOffFactor property");
+ float rollofffactor = m_3d.rolloff_factor;
+ PyObject* result = PyFloat_FromDouble(rollofffactor);
+
+ return result;
+}
+
+
+
+PyObject* KX_SoundActuator::PySetType(PyObject* args)
+{
+ int typeArg;
+ ShowDeprecationWarning("setType()", "the mode property");
+
+ if (!PyArg_ParseTuple(args, "i:setType", &typeArg)) {
+ return NULL;
+ }
+
+ if ( (typeArg > KX_SOUNDACT_NODEF)
+ && (typeArg < KX_SOUNDACT_MAX) ) {
+ m_type = (KX_SOUNDACT_TYPE) typeArg;
+ }
+
+ Py_RETURN_NONE;
+}
+
+PyObject* KX_SoundActuator::PyGetType()
+{
+ ShowDeprecationWarning("getType()", "the mode property");
+ return PyLong_FromSsize_t(m_type);
+}
+// <-----
+
diff --git a/source/gameengine/Ketsji/KX_SoundActuator.h b/source/gameengine/Ketsji/KX_SoundActuator.h
index 43198f1a253..bc0293ed2b4 100644
--- a/source/gameengine/Ketsji/KX_SoundActuator.h
+++ b/source/gameengine/Ketsji/KX_SoundActuator.h
@@ -110,6 +110,18 @@ public:
static PyObject* pyattr_get_pitch(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_rollOffFactor(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_type(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
+
+ // Deprecated ----->
+ KX_PYMETHOD_VARARGS(KX_SoundActuator,SetGain);
+ KX_PYMETHOD_NOARGS(KX_SoundActuator,GetGain);
+ KX_PYMETHOD_VARARGS(KX_SoundActuator,SetPitch);
+ KX_PYMETHOD_NOARGS(KX_SoundActuator,GetPitch);
+ KX_PYMETHOD_VARARGS(KX_SoundActuator,SetRollOffFactor);
+ KX_PYMETHOD_NOARGS(KX_SoundActuator,GetRollOffFactor);
+ KX_PYMETHOD_VARARGS(KX_SoundActuator,SetType);
+ KX_PYMETHOD_NOARGS(KX_SoundActuator,GetType);
+ // <-----
+
};
#endif //__KX_SOUNDACTUATOR
diff --git a/source/gameengine/Ketsji/KX_StateActuator.cpp b/source/gameengine/Ketsji/KX_StateActuator.cpp
index 4159e9c373d..09d95612cbb 100644
--- a/source/gameengine/Ketsji/KX_StateActuator.cpp
+++ b/source/gameengine/Ketsji/KX_StateActuator.cpp
@@ -159,6 +159,12 @@ PyTypeObject KX_StateActuator::Type = {
};
PyMethodDef KX_StateActuator::Methods[] = {
+ // deprecated -->
+ {"setOperation", (PyCFunction) KX_StateActuator::sPySetOperation,
+ METH_VARARGS, (const char *)SetOperation_doc},
+ {"setMask", (PyCFunction) KX_StateActuator::sPySetMask,
+ METH_VARARGS, (const char *)SetMask_doc},
+ // <--
{NULL,NULL} //Sentinel
};
@@ -167,3 +173,52 @@ PyAttributeDef KX_StateActuator::Attributes[] = {
KX_PYATTRIBUTE_INT_RW("mask",0,0x3FFFFFFF,false,KX_StateActuator,m_mask),
{ NULL } //Sentinel
};
+
+
+/* set operation ---------------------------------------------------------- */
+const char
+KX_StateActuator::SetOperation_doc[] =
+"setOperation(op)\n"
+"\t - op : bit operation (0=Copy, 1=Set, 2=Clear, 3=Negate)"
+"\tSet the type of bit operation to be applied on object state mask.\n"
+"\tUse setMask() to specify the bits that will be modified.\n";
+PyObject*
+
+KX_StateActuator::PySetOperation(PyObject* args) {
+ ShowDeprecationWarning("setOperation()", "the operation property");
+ int oper;
+
+ if(!PyArg_ParseTuple(args, "i:setOperation", &oper)) {
+ return NULL;
+ }
+
+ m_operation = oper;
+
+ Py_RETURN_NONE;
+}
+
+/* set mask ---------------------------------------------------------- */
+const char
+KX_StateActuator::SetMask_doc[] =
+"setMask(mask)\n"
+"\t - mask : bits that will be modified"
+"\tSet the value that defines the bits that will be modified by the operation.\n"
+"\tThe bits that are 1 in the value will be updated in the object state,\n"
+"\tthe bits that are 0 are will be left unmodified expect for the Copy operation\n"
+"\twhich copies the value to the object state.\n";
+PyObject*
+
+KX_StateActuator::PySetMask(PyObject* args) {
+ ShowDeprecationWarning("setMask()", "the mask property");
+ int mask;
+
+ if(!PyArg_ParseTuple(args, "i:setMask", &mask)) {
+ return NULL;
+ }
+
+ m_mask = mask;
+
+ Py_RETURN_NONE;
+}
+
+
diff --git a/source/gameengine/Ketsji/KX_StateActuator.h b/source/gameengine/Ketsji/KX_StateActuator.h
index 4cf84f74287..ce86c4b44fe 100644
--- a/source/gameengine/Ketsji/KX_StateActuator.h
+++ b/source/gameengine/Ketsji/KX_StateActuator.h
@@ -88,7 +88,9 @@ class KX_StateActuator : public SCA_IActuator
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
-
+ //KX_PYMETHOD_DOC
+ KX_PYMETHOD_DOC_VARARGS(KX_StateActuator,SetOperation);
+ KX_PYMETHOD_DOC_VARARGS(KX_StateActuator,SetMask);
};
#endif
diff --git a/source/gameengine/Ketsji/KX_TouchSensor.cpp b/source/gameengine/Ketsji/KX_TouchSensor.cpp
index cde67787e2f..bf8469f1ec9 100644
--- a/source/gameengine/Ketsji/KX_TouchSensor.cpp
+++ b/source/gameengine/Ketsji/KX_TouchSensor.cpp
@@ -101,7 +101,8 @@ KX_TouchSensor::KX_TouchSensor(SCA_EventManager* eventmgr,KX_GameObject* gameobj
:SCA_ISensor(gameobj,eventmgr),
m_touchedpropname(touchedpropname),
m_bFindMaterial(bFindMaterial),
-m_bTouchPulse(bTouchPulse)
+m_bTouchPulse(bTouchPulse),
+m_eventmgr(eventmgr)
/*m_sumoObj(sumoObj),*/
{
// KX_TouchEventManager* touchmgr = (KX_TouchEventManager*) eventmgr;
@@ -315,6 +316,16 @@ PyTypeObject KX_TouchSensor::Type = {
};
PyMethodDef KX_TouchSensor::Methods[] = {
+ //Deprecated ----->
+ {"setProperty",
+ (PyCFunction) KX_TouchSensor::sPySetProperty, METH_O, (const char *)SetProperty_doc},
+ {"getProperty",
+ (PyCFunction) KX_TouchSensor::sPyGetProperty, METH_NOARGS, (const char *)GetProperty_doc},
+ {"getHitObject",
+ (PyCFunction) KX_TouchSensor::sPyGetHitObject, METH_NOARGS, (const char *)GetHitObject_doc},
+ {"getHitObjectList",
+ (PyCFunction) KX_TouchSensor::sPyGetHitObjectList, METH_NOARGS, (const char *)GetHitObjectList_doc},
+ //<-----
{NULL,NULL} //Sentinel
};
@@ -329,6 +340,101 @@ PyAttributeDef KX_TouchSensor::Attributes[] = {
/* Python API */
+/* 1. setProperty */
+const char KX_TouchSensor::SetProperty_doc[] =
+"setProperty(name)\n"
+"\t- name: string\n"
+"\tSet the property or material to collide with. Use\n"
+"\tsetTouchMaterial() to switch between properties and\n"
+"\tmaterials.";
+PyObject* KX_TouchSensor::PySetProperty(PyObject* value)
+{
+ ShowDeprecationWarning("setProperty()", "the propName property");
+ char *nameArg= _PyUnicode_AsString(value);
+ if (nameArg==NULL) {
+ PyErr_SetString(PyExc_ValueError, "expected a ");
+ return NULL;
+ }
+
+ m_touchedpropname = nameArg;
+ Py_RETURN_NONE;
+}
+/* 2. getProperty */
+const char KX_TouchSensor::GetProperty_doc[] =
+"getProperty(name)\n"
+"\tReturns the property or material to collide with. Use\n"
+"\tgetTouchMaterial() to find out whether this sensor\n"
+"\tlooks for properties or materials.";
+PyObject* KX_TouchSensor::PyGetProperty() {
+ ShowDeprecationWarning("getProperty()", "the propName property");
+
+ return PyUnicode_FromString(m_touchedpropname);
+}
+
+const char KX_TouchSensor::GetHitObject_doc[] =
+"getHitObject()\n"
+;
+PyObject* KX_TouchSensor::PyGetHitObject()
+{
+ ShowDeprecationWarning("getHitObject()", "the hitObject property");
+ /* to do: do Py_IncRef if the object is already known in Python */
+ /* otherwise, this leaks memory */
+ if (m_hitObject)
+ {
+ return m_hitObject->GetProxy();
+ }
+ Py_RETURN_NONE;
+}
+
+const char KX_TouchSensor::GetHitObjectList_doc[] =
+"getHitObjectList()\n"
+"\tReturn a list of the objects this object collided with,\n"
+"\tbut only those matching the property/material condition.\n";
+PyObject* KX_TouchSensor::PyGetHitObjectList()
+{
+ ShowDeprecationWarning("getHitObjectList()", "the hitObjectList property");
+ /* to do: do Py_IncRef if the object is already known in Python */
+ /* otherwise, this leaks memory */ /* Edit, this seems ok and not to leak memory - Campbell */
+ return m_colliders->GetProxy();
+}
+
+/*getTouchMaterial and setTouchMaterial were never added to the api,
+they can probably be removed with out anyone noticing*/
+
+/* 5. getTouchMaterial */
+const char KX_TouchSensor::GetTouchMaterial_doc[] =
+"getTouchMaterial()\n"
+"\tReturns KX_TRUE if this sensor looks for a specific material,\n"
+"\tKX_FALSE if it looks for a specific property.\n" ;
+PyObject* KX_TouchSensor::PyGetTouchMaterial()
+{
+ ShowDeprecationWarning("getTouchMaterial()", "the useMaterial property");
+ return PyLong_FromSsize_t(m_bFindMaterial);
+}
+
+/* 6. setTouchMaterial */
+#if 0
+const char KX_TouchSensor::SetTouchMaterial_doc[] =
+"setTouchMaterial(flag)\n"
+"\t- flag: KX_TRUE or KX_FALSE.\n"
+"\tSet flag to KX_TRUE to switch on positive pulse mode,\n"
+"\tKX_FALSE to switch off positive pulse mode.\n" ;
+PyObject* KX_TouchSensor::PySetTouchMaterial(PyObject *value)
+{
+ ShowDeprecationWarning("setTouchMaterial()", "the useMaterial property");
+ int pulseArg = PyLong_AsSsize_t(value);
+
+ if(pulseArg ==-1 && PyErr_Occurred()) {
+ PyErr_SetString(PyExc_ValueError, "expected a bool");
+ return NULL;
+ }
+
+ m_bFindMaterial = pulseArg != 0;
+
+ Py_RETURN_NONE;
+}
+#endif
+
PyObject* KX_TouchSensor::pyattr_get_object_hit(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
KX_TouchSensor* self= static_cast<KX_TouchSensor*>(self_v);
diff --git a/source/gameengine/Ketsji/KX_TouchSensor.h b/source/gameengine/Ketsji/KX_TouchSensor.h
index ad1830e05c9..6cbf5b15e3b 100644
--- a/source/gameengine/Ketsji/KX_TouchSensor.h
+++ b/source/gameengine/Ketsji/KX_TouchSensor.h
@@ -58,6 +58,7 @@ protected:
STR_String m_touchedpropname;
bool m_bFindMaterial;
bool m_bTouchPulse; /* changes in the colliding objects trigger pulses */
+ class SCA_EventManager* m_eventmgr;
class PHY_IPhysicsController* m_physCtrl;
@@ -119,6 +120,23 @@ public:
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
+
+ //Deprecated ----->
+ /* 1. setProperty */
+ KX_PYMETHOD_DOC_O(KX_TouchSensor,SetProperty);
+ /* 2. getProperty */
+ KX_PYMETHOD_DOC_NOARGS(KX_TouchSensor,GetProperty);
+ /* 3. getHitObject */
+ KX_PYMETHOD_DOC_NOARGS(KX_TouchSensor,GetHitObject);
+ /* 4. getHitObject */
+ KX_PYMETHOD_DOC_NOARGS(KX_TouchSensor,GetHitObjectList);
+ /* 5. getTouchMaterial */
+ KX_PYMETHOD_DOC_NOARGS(KX_TouchSensor,GetTouchMaterial);
+#if 0
+ /* 6. setTouchMaterial */
+ KX_PYMETHOD_DOC_O(KX_TouchSensor,SetTouchMaterial);
+#endif
+ //<-----
static PyObject* pyattr_get_object_hit(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
static PyObject* pyattr_get_object_hit_list(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp
index e6c2f86bbce..b5b7e9de444 100644
--- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp
+++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp
@@ -453,6 +453,14 @@ PyTypeObject KX_TrackToActuator::Type = {
};
PyMethodDef KX_TrackToActuator::Methods[] = {
+ // ---> deprecated
+ {"setTime", (PyCFunction) KX_TrackToActuator::sPySetTime, METH_VARARGS, (const char *)SetTime_doc},
+ {"getTime", (PyCFunction) KX_TrackToActuator::sPyGetTime, METH_NOARGS, (const char *)GetTime_doc},
+ {"setUse3D", (PyCFunction) KX_TrackToActuator::sPySetUse3D, METH_VARARGS, (const char *)SetUse3D_doc},
+ {"getUse3D", (PyCFunction) KX_TrackToActuator::sPyGetUse3D, METH_NOARGS, (const char *)GetUse3D_doc},
+ {"setObject", (PyCFunction) KX_TrackToActuator::sPySetObject, METH_O, (const char *)SetObject_doc},
+ {"getObject", (PyCFunction) KX_TrackToActuator::sPyGetObject, METH_VARARGS, (const char *)GetObject_doc},
+
{NULL,NULL} //Sentinel
};
@@ -492,4 +500,123 @@ int KX_TrackToActuator::pyattr_set_object(void *self, const struct KX_PYATTRIBUT
return PY_SET_ATTR_SUCCESS;
}
+
+/* 1. setObject */
+const char KX_TrackToActuator::SetObject_doc[] =
+"setObject(object)\n"
+"\t- object: KX_GameObject, string or None\n"
+"\tSet the object to track with the parent of this actuator.\n";
+PyObject* KX_TrackToActuator::PySetObject(PyObject* value)
+{
+ KX_GameObject *gameobj;
+
+ ShowDeprecationWarning("setObject()", "the object property");
+
+ if (!ConvertPythonToGameObject(value, &gameobj, true, "actuator.setObject(value): KX_TrackToActuator"))
+ return NULL; // ConvertPythonToGameObject sets the error
+
+ if (m_object != NULL)
+ m_object->UnregisterActuator(this);
+
+ m_object = (SCA_IObject*)gameobj;
+ if (m_object)
+ m_object->RegisterActuator(this);
+
+ Py_RETURN_NONE;
+}
+
+
+
+/* 2. getObject */
+const char KX_TrackToActuator::GetObject_doc[] =
+"getObject(name_only = 1)\n"
+"name_only - optional arg, when true will return the KX_GameObject rather then its name\n"
+"\tReturns the object to track with the parent of this actuator\n";
+PyObject* KX_TrackToActuator::PyGetObject(PyObject* args)
+{
+ int ret_name_only = 1;
+
+ ShowDeprecationWarning("getObject()", "the object property");
+
+ if (!PyArg_ParseTuple(args, "|i:getObject", &ret_name_only))
+ return NULL;
+
+ if (!m_object)
+ Py_RETURN_NONE;
+
+ if (ret_name_only)
+ return PyUnicode_FromString(m_object->GetName());
+ else
+ return m_object->GetProxy();
+}
+
+
+
+/* 3. setTime */
+const char KX_TrackToActuator::SetTime_doc[] =
+"setTime(time)\n"
+"\t- time: integer\n"
+"\tSet the time in frames with which to delay the tracking motion.\n";
+PyObject* KX_TrackToActuator::PySetTime(PyObject* args)
+{
+ ShowDeprecationWarning("setTime()", "the timer property");
+ int timeArg;
+
+ if (!PyArg_ParseTuple(args, "i:setTime", &timeArg))
+ {
+ return NULL;
+ }
+
+ m_time= timeArg;
+
+ Py_RETURN_NONE;
+}
+
+
+
+/* 4.getTime */
+const char KX_TrackToActuator::GetTime_doc[] =
+"getTime()\n"
+"\t- time: integer\n"
+"\tReturn the time in frames with which the tracking motion is delayed.\n";
+PyObject* KX_TrackToActuator::PyGetTime()
+{
+ ShowDeprecationWarning("getTime()", "the timer property");
+ return PyLong_FromSsize_t(m_time);
+}
+
+
+
+/* 5. getUse3D */
+const char KX_TrackToActuator::GetUse3D_doc[] =
+"getUse3D()\n"
+"\tReturns 1 if the motion is allowed to extend in the z-direction.\n";
+PyObject* KX_TrackToActuator::PyGetUse3D()
+{
+ ShowDeprecationWarning("setTime()", "the use3D property");
+ return PyLong_FromSsize_t(!(m_allow3D == 0));
+}
+
+
+
+/* 6. setUse3D */
+const char KX_TrackToActuator::SetUse3D_doc[] =
+"setUse3D(value)\n"
+"\t- value: 0 or 1\n"
+"\tSet to 1 to allow the tracking motion to extend in the z-direction,\n"
+"\tset to 0 to lock the tracking motion to the x-y plane.\n";
+PyObject* KX_TrackToActuator::PySetUse3D(PyObject* args)
+{
+ ShowDeprecationWarning("setTime()", "the use3D property");
+ int boolArg;
+
+ if (!PyArg_ParseTuple(args, "i:setUse3D", &boolArg)) {
+ return NULL;
+ }
+
+ m_allow3D = !(boolArg == 0);
+
+ Py_RETURN_NONE;
+}
+
/* eof */
diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.h b/source/gameengine/Ketsji/KX_TrackToActuator.h
index bbfc1d17576..801e695bb9b 100644
--- a/source/gameengine/Ketsji/KX_TrackToActuator.h
+++ b/source/gameengine/Ketsji/KX_TrackToActuator.h
@@ -74,6 +74,19 @@ class KX_TrackToActuator : public SCA_IActuator
/* These are used to get and set m_ob */
static PyObject* pyattr_get_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+
+ /* 1. setObject */
+ KX_PYMETHOD_DOC_O(KX_TrackToActuator,SetObject);
+ /* 2. getObject */
+ KX_PYMETHOD_DOC_VARARGS(KX_TrackToActuator,GetObject);
+ /* 3. setTime */
+ KX_PYMETHOD_DOC_VARARGS(KX_TrackToActuator,SetTime);
+ /* 4. getTime */
+ KX_PYMETHOD_DOC_NOARGS(KX_TrackToActuator,GetTime);
+ /* 5. getUse3D */
+ KX_PYMETHOD_DOC_NOARGS(KX_TrackToActuator,GetUse3D);
+ /* 6. setUse3D */
+ KX_PYMETHOD_DOC_VARARGS(KX_TrackToActuator,SetUse3D);
}; /* end of class KX_TrackToActuator : public KX_EditObjectActuator */
diff --git a/source/gameengine/Ketsji/KX_VisibilityActuator.cpp b/source/gameengine/Ketsji/KX_VisibilityActuator.cpp
index 184e127209f..97c893c6caa 100644
--- a/source/gameengine/Ketsji/KX_VisibilityActuator.cpp
+++ b/source/gameengine/Ketsji/KX_VisibilityActuator.cpp
@@ -113,6 +113,10 @@ PyTypeObject KX_VisibilityActuator::Type = {
};
PyMethodDef KX_VisibilityActuator::Methods[] = {
+ // Deprecated ----->
+ {"set", (PyCFunction) KX_VisibilityActuator::sPySetVisible, METH_VARARGS,
+ (const char *) SetVisible_doc},
+ // <-----
{NULL,NULL} //Sentinel
};
@@ -122,3 +126,26 @@ PyAttributeDef KX_VisibilityActuator::Attributes[] = {
KX_PYATTRIBUTE_BOOL_RW("useRecursion", KX_VisibilityActuator, m_recursive),
{ NULL } //Sentinel
};
+
+/* set visibility ---------------------------------------------------------- */
+const char
+KX_VisibilityActuator::SetVisible_doc[] =
+"setVisible(visible?)\n"
+"\t - visible? : Make the object visible? (KX_TRUE, KX_FALSE)"
+"\tSet the properties of the actuator.\n";
+PyObject*
+
+KX_VisibilityActuator::PySetVisible(PyObject* args) {
+ int vis;
+ ShowDeprecationWarning("SetVisible()", "the visible property");
+
+ if(!PyArg_ParseTuple(args, "i:setVisible", &vis)) {
+ return NULL;
+ }
+
+ m_visible = PyArgToBool(vis);
+
+ Py_RETURN_NONE;
+}
+
+
diff --git a/source/gameengine/Ketsji/KX_VisibilityActuator.h b/source/gameengine/Ketsji/KX_VisibilityActuator.h
index e75551644a4..3ad50c6cea2 100644
--- a/source/gameengine/Ketsji/KX_VisibilityActuator.h
+++ b/source/gameengine/Ketsji/KX_VisibilityActuator.h
@@ -67,6 +67,11 @@ class KX_VisibilityActuator : public SCA_IActuator
/* Python interface ---------------------------------------------------- */
/* --------------------------------------------------------------------- */
+ // Deprecated ----->
+ KX_PYMETHOD_DOC_VARARGS(KX_VisibilityActuator,SetVisible);
+ // <-----
+
+
};
#endif
diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript
index 5f38020780b..d3b67cfdb11 100644
--- a/source/gameengine/Ketsji/SConscript
+++ b/source/gameengine/Ketsji/SConscript
@@ -29,8 +29,12 @@ if env['WITH_BF_SDL']:
else:
defs.append('DISABLE_SDL')
+cxxflags = []
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ cxxflags.append ('/GR')
+ cxxflags.append ('/O2')
+ cxxflags.append ('/EHsc')
if env['BF_DEBUG']:
defs.append('_DEBUG') # for Python
-env.BlenderLib ( 'bf_ketsji', sources, Split(incs), defs, libtype=['core','player'], priority=[320,45], cxx_compileflags=env['BGE_CXXFLAGS'])
+env.BlenderLib ( 'bf_ketsji', sources, Split(incs), defs, libtype=['core','player'], priority=[320, 60], cxx_compileflags = cxxflags )
diff --git a/source/gameengine/Network/CMakeLists.txt b/source/gameengine/Network/CMakeLists.txt
index 1e467a7d08d..933f0550d0b 100644
--- a/source/gameengine/Network/CMakeLists.txt
+++ b/source/gameengine/Network/CMakeLists.txt
@@ -27,10 +27,10 @@
FILE(GLOB SRC *.cpp)
SET(INC
- .
- ../../../source/kernel/gen_system
- ../../../intern/string
- ../../../intern/moto/include
+ .
+ ../../../source/kernel/gen_system
+ ../../../intern/string
+ ../../../intern/moto/include
)
BLENDERLIB(bf_ngnetwork "${SRC}" "${INC}")
diff --git a/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt b/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt
index 18e3d8ef496..0b958920dc5 100644
--- a/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt
+++ b/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt
@@ -27,10 +27,10 @@
SET(SRC NG_LoopBackNetworkDeviceInterface.cpp)
SET(INC
- .
- ../../../../source/kernel/gen_system
- ../../../../intern/string
- ../../../../source/gameengine/Network
+ .
+ ../../../../source/kernel/gen_system
+ ../../../../intern/string
+ ../../../../source/gameengine/Network
)
BLENDERLIB(bf_loopbacknetwork "${SRC}" "${INC}")
diff --git a/source/gameengine/Network/LoopBackNetwork/SConscript b/source/gameengine/Network/LoopBackNetwork/SConscript
index dd23e1327eb..be6545b4fd6 100644
--- a/source/gameengine/Network/LoopBackNetwork/SConscript
+++ b/source/gameengine/Network/LoopBackNetwork/SConscript
@@ -5,4 +5,4 @@ sources = 'NG_LoopBackNetworkDeviceInterface.cpp'
incs = '. #source/kernel/gen_system #intern/string #source/gameengine/Network'
-env.BlenderLib ( 'bf_loopbacknetwork', Split(sources), Split(incs), defines=[],libtype=['core','player'], priority=[400,135] )
+env.BlenderLib ( 'bf_loopbacknetwork', Split(sources), Split(incs), defines=[],libtype=['core', 'player'], priority=[400, 155] )
diff --git a/source/gameengine/Network/SConscript b/source/gameengine/Network/SConscript
index 3883dc71c9c..804851973af 100644
--- a/source/gameengine/Network/SConscript
+++ b/source/gameengine/Network/SConscript
@@ -5,4 +5,4 @@ sources = env.Glob('*.cpp') #'NG_NetworkMessage.cpp NG_NetworkObject.cpp NG_Netw
incs = '. #source/kernel/gen_system #intern/string #intern/moto/include'
-env.BlenderLib ( 'bf_ngnetwork', sources, Split(incs), [], libtype=['core','player'], priority=[400,130] )
+env.BlenderLib ( 'bf_ngnetwork', sources, Split(incs), [], libtype=['core', 'player'], priority=[400, 150] )
diff --git a/source/gameengine/Physics/Bullet/CMakeLists.txt b/source/gameengine/Physics/Bullet/CMakeLists.txt
index da885122a4f..7b7fb508ebd 100644
--- a/source/gameengine/Physics/Bullet/CMakeLists.txt
+++ b/source/gameengine/Physics/Bullet/CMakeLists.txt
@@ -27,23 +27,23 @@
SET(SRC CcdPhysicsEnvironment.cpp CcdPhysicsController.cpp CcdGraphicController.cpp)
SET(INC
- .
- ../common
- ../../../../extern/bullet2/src
- ../../../../extern/glew/include
- ../../../../intern/moto/include
- ../../../../intern/guardedalloc
- ../../../kernel/gen_system
- ../../../../intern/string
- ../../Rasterizer
- ../../Ketsji
- ../../Expressions
- ../../GameLogic
- ../../SceneGraph
- ../../../../source/blender/makesdna
- ../../../../source/blender/blenlib
- ../../../../source/blender/blenkernel
- ${PYTHON_INC}
+ .
+ ../common
+ ../../../../extern/bullet2/src
+ ../../../../extern/glew/include
+ ../../../../intern/moto/include
+ ../../../../intern/guardedalloc
+ ../../../kernel/gen_system
+ ../../../../intern/string
+ ../../Rasterizer
+ ../../Ketsji
+ ../../Expressions
+ ../../GameLogic
+ ../../SceneGraph
+ ../../../../source/blender/makesdna
+ ../../../../source/blender/blenlib
+ ../../../../source/blender/blenkernel
+ ${PYTHON_INC}
)
BLENDERLIB(bf_bullet "${SRC}" "${INC}")
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
index df8dc3560ac..20e830c9dc3 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
@@ -1073,7 +1073,7 @@ void CcdPhysicsController::ApplyTorque(float torqueX,float torqueY,float torque
//workaround for incompatibility between 'DYNAMIC' game object, and angular factor
//a DYNAMIC object has some inconsistency: it has no angular effect due to collisions, but still has torque
const btVector3& angFac = body->getAngularFactor();
- btVector3 tmpFac(1,1,1);
+ btVector3 tmpFac(0,0,1);
body->setAngularFactor(tmpFac);
body->applyTorque(torque);
body->setAngularFactor(angFac);
@@ -1829,6 +1829,8 @@ bool CcdShapeConstructionInfo::UpdateMesh(class KX_GameObject* gameobj, class RA
}
for(mf= mface, i=0; i < numpolys; mf++, i++) {
+ unsigned int *fv = &mf->v1;
+
if(mf->v4) {
fv_pt= quad_verts;
*poly_index_pt++ = *poly_index_pt++ = index[i];
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
index bf28802870a..bc7ccacc39b 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
@@ -327,6 +327,7 @@ CcdPhysicsEnvironment::CcdPhysicsEnvironment(bool useDbvtCulling,btDispatcher* d
:m_cullingCache(NULL),
m_cullingTree(NULL),
m_numIterations(10),
+m_scalingPropagated(false),
m_numTimeSubSteps(1),
m_ccdMode(0),
m_solverType(-1),
@@ -335,8 +336,7 @@ m_enableSatCollisionDetection(false),
m_solver(NULL),
m_ownPairCache(NULL),
m_filterCallback(NULL),
-m_ownDispatcher(NULL),
-m_scalingPropagated(false)
+m_ownDispatcher(NULL)
{
for (int i=0;i<PHY_NUM_RESPONSE;i++)
diff --git a/source/gameengine/Physics/Bullet/SConscript b/source/gameengine/Physics/Bullet/SConscript
index 49f2af1b001..44b75402630 100644
--- a/source/gameengine/Physics/Bullet/SConscript
+++ b/source/gameengine/Physics/Bullet/SConscript
@@ -21,4 +21,10 @@ incs += ' #intern/guardedalloc'
incs += ' ' + env['BF_BULLET_INC']
incs += ' ' + env['BF_PYTHON_INC']
-env.BlenderLib ( 'bf_bullet', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350,50], cxx_compileflags=env['BGE_CXXFLAGS'])
+cxxflags = []
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ cxxflags.append ('/GR')
+ cxxflags.append ('/O2')
+ cxxflags.append ('/EHsc')
+
+env.BlenderLib ( 'bf_bullet', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350,80], cxx_compileflags=cxxflags )
diff --git a/source/gameengine/Physics/Dummy/CMakeLists.txt b/source/gameengine/Physics/Dummy/CMakeLists.txt
index d613bf8fd14..4bd29e7779b 100644
--- a/source/gameengine/Physics/Dummy/CMakeLists.txt
+++ b/source/gameengine/Physics/Dummy/CMakeLists.txt
@@ -27,8 +27,8 @@
SET(SRC DummyPhysicsEnvironment.cpp)
SET(INC
- .
- ../common
+ .
+ ../common
)
BLENDERLIB(bf_dummy "${SRC}" "${INC}")
diff --git a/source/gameengine/Physics/Dummy/SConscript b/source/gameengine/Physics/Dummy/SConscript
index dc76e8046a0..93d6ac36446 100644
--- a/source/gameengine/Physics/Dummy/SConscript
+++ b/source/gameengine/Physics/Dummy/SConscript
@@ -5,4 +5,4 @@ sources = 'DummyPhysicsEnvironment.cpp'
incs = '. ../common'
-env.BlenderLib ( 'bf_dummy', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350,60] )
+env.BlenderLib ( 'bf_dummy', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350,95] )
diff --git a/source/gameengine/Physics/common/CMakeLists.txt b/source/gameengine/Physics/common/CMakeLists.txt
index a34bd19d400..41b2687fe38 100644
--- a/source/gameengine/Physics/common/CMakeLists.txt
+++ b/source/gameengine/Physics/common/CMakeLists.txt
@@ -27,9 +27,9 @@
SET(SRC PHY_IMotionState.cpp PHY_IController.cpp PHY_IPhysicsController.cpp PHY_IGraphicController.cpp PHY_IPhysicsEnvironment.cpp PHY_IVehicle.cpp)
SET(INC
- .
- ../Dummy
- ../../../intern/moto/include
+ .
+ ../Dummy
+ ../../../intern/moto/include
)
BLENDERLIB(bf_common "${SRC}" "${INC}")
diff --git a/source/gameengine/Physics/common/SConscript b/source/gameengine/Physics/common/SConscript
index 719c028ee8f..447b0ec1bbb 100644
--- a/source/gameengine/Physics/common/SConscript
+++ b/source/gameengine/Physics/common/SConscript
@@ -5,4 +5,10 @@ sources = 'PHY_IMotionState.cpp PHY_IController.cpp PHY_IPhysicsController.cpp P
incs = '. ../Dummy #intern/moto/include'
-env.BlenderLib ( 'bf_physics_common', Split(sources), Split(incs), [], libtype=['core','player'], priority=[360,55], cxx_compileflags=env['BGE_CXXFLAGS'])
+cxxflags = []
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ cxxflags.append ('/GR')
+ cxxflags.append ('/O2')
+ cxxflags.append ('/EHsc')
+
+env.BlenderLib ( 'bf_common', Split(sources), Split(incs), [], libtype=['core','player'], priority=[360, 90], cxx_compileflags = cxxflags )
diff --git a/source/gameengine/PyDoc/GameLogic.py b/source/gameengine/PyDoc/GameLogic.py
index d22b1690e74..72e2c3ed7f5 100644
--- a/source/gameengine/PyDoc/GameLogic.py
+++ b/source/gameengine/PyDoc/GameLogic.py
@@ -447,6 +447,14 @@ def setPhysicsTicRate(ticrate):
@type ticrate: float
"""
+def EvalExpression(text):
+ """
+ Evaluate the string as an expression, similar to the expression controller logic brick.
+ @param text: The expression to evaluate.
+ @type text: string
+ @return: The result of the expression. The type depends on the expression.
+ """
+
#{ Utility functions
def getAverageFrameRate():
"""
diff --git a/source/gameengine/PyDoc/GameTypes.py b/source/gameengine/PyDoc/GameTypes.py
index c391d0c3dec..054b2cb4daf 100644
--- a/source/gameengine/PyDoc/GameTypes.py
+++ b/source/gameengine/PyDoc/GameTypes.py
@@ -1023,6 +1023,12 @@ class CListValue(CPropValue):
Return the value matching key, or the default value if its not found.
@return: The key value or a default.
"""
+ def has_key(key):
+ """
+ Return True if the key is found.
+ @rtype: boolean
+ @return: The key value or a default.
+ """
def from_id(id):
"""
This is a funtion especially for the game engine to return a value with a spesific id.
@@ -1576,7 +1582,7 @@ class KX_GameObject(SCA_IObject):
@ivar childrenRecursive: all children of this object including childrens children, (read-only).
@type childrenRecursive: L{CListValue} of L{KX_GameObject}'s
@group Deprecated: getPosition, setPosition, setWorldPosition, getOrientation, setOrientation, getState, setState, getParent, getVisible, getMass, getMesh, getChildren, getChildrenRecursive
- @group Property Access: get, attrDict, getPropertyNames
+ @group Property Access: get, has_key, attrDict, getPropertyNames
"""
def endObject():
"""
@@ -2048,6 +2054,12 @@ class KX_GameObject(SCA_IObject):
Return the value matching key, or the default value if its not found.
@return: The key value or a default.
"""
+ def has_key(key):
+ """
+ Return True if the key is found.
+ @rtype: boolean
+ @return: The key value or a default.
+ """
class KX_IpoActuator(SCA_IActuator):
@@ -2407,8 +2419,6 @@ class KX_MouseFocusSensor(SCA_MouseSensor):
@type hitPosition: list (vector of 3 floats)
@ivar hitNormal: the worldspace normal from the face at point of intersection.
@type hitNormal: list (normalized vector of 3 floats)
- @ivar usePulseFocus: When enabled, moving the mouse over a different object generates a pulse. (only used when the 'Mouse Over Any' sensor option is set)
- @type usePulseFocus: bool
"""
#{ Deprecated
def getHitNormal():
@@ -2470,7 +2480,7 @@ class KX_TouchSensor(SCA_ISensor):
@ivar useMaterial: Determines if the sensor is looking for a property or material.
KX_True = Find material; KX_False = Find property
@type useMaterial: boolean
- @ivar usePulseCollision: When enabled, changes to the set of colliding objects generate a pulse.
+ @ivar usePulseCollision: The last collided object.
@type usePulseCollision: bool
@ivar hitObject: The last collided object. (read-only)
@type hitObject: L{KX_GameObject} or None
@@ -3856,12 +3866,6 @@ class KX_Scene(PyObjectPlus):
@rtype: L{KX_GameObject}
"""
-
- def get(key, default=None):
- """
- Return the value matching key, or the default value if its not found.
- @return: The key value or a default.
- """
class KX_SceneActuator(SCA_IActuator):
"""
@@ -5733,7 +5737,7 @@ for name, val in locals().items():
# Store the mappings to new attributes in a list (because there
# could be collisions).
- if attrName not in depAttrs:
+ if not depAttrs.has_key(attrName):
depAttrs[attrName] = {}
mapping = depAttrs[attrName]
@@ -5758,7 +5762,7 @@ for name, val in locals().items():
# Another mapping, from a conversion tuple to lists of class
# names.
conversion = (func, newAttrName)
- if conversion not in mapping:
+ if not mapping.has_key(conversion):
mapping[conversion] = []
mapping[conversion].append(name)
break
diff --git a/source/gameengine/Rasterizer/CMakeLists.txt b/source/gameengine/Rasterizer/CMakeLists.txt
index 51d1f5001dd..143209f5a54 100644
--- a/source/gameengine/Rasterizer/CMakeLists.txt
+++ b/source/gameengine/Rasterizer/CMakeLists.txt
@@ -27,15 +27,15 @@
FILE(GLOB SRC *.cpp)
SET(INC
- .
- ../../../source/kernel/gen_system
- ../../../source/blender/makesdna
- ../../../source/gameengine/SceneGraph
- ../../../intern/string
- ../../../intern/moto/include
- ../../../extern/glew/include
- ../Expressions
- ${PYTHON_INC}
+ .
+ ../../../source/kernel/gen_system
+ ../../../source/blender/makesdna
+ ../../../source/gameengine/SceneGraph
+ ../../../intern/string
+ ../../../intern/moto/include
+ ../../../extern/glew/include
+ ../Expressions
+ ${PYTHON_INC}
)
BLENDERLIB(bf_rasterizer "${SRC}" "${INC}")
diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
index 033daabc48f..cb5c5a12397 100644
--- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
+++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
@@ -70,6 +70,7 @@ void RAS_IPolyMaterial::Initialize(
RAS_IPolyMaterial::RAS_IPolyMaterial()
: m_texturename("__Dummy_Texture_Name__"),
m_materialname("__Dummy_Material_Name__"),
+ m_materialindex(0),
m_tile(0),
m_tilexrep(0),
m_tileyrep(0),
@@ -77,7 +78,6 @@ RAS_IPolyMaterial::RAS_IPolyMaterial()
m_transp(0),
m_alpha(false),
m_zsort(false),
- m_materialindex(0),
m_polymatid(0),
m_flag(0),
m_multimode(0)
@@ -100,6 +100,7 @@ RAS_IPolyMaterial::RAS_IPolyMaterial(const STR_String& texname,
bool zsort)
: m_texturename(texname),
m_materialname(matname),
+ m_materialindex(materialindex),
m_tile(tile),
m_tilexrep(tilexrep),
m_tileyrep(tileyrep),
@@ -107,7 +108,6 @@ RAS_IPolyMaterial::RAS_IPolyMaterial(const STR_String& texname,
m_transp(transp),
m_alpha(alpha),
m_zsort(zsort),
- m_materialindex(materialindex),
m_polymatid(m_newpolymatid++),
m_flag(0),
m_multimode(0)
diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.h b/source/gameengine/Rasterizer/RAS_MaterialBucket.h
index dc9abbfbddf..207763392b2 100644
--- a/source/gameengine/Rasterizer/RAS_MaterialBucket.h
+++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.h
@@ -79,11 +79,8 @@ class RAS_DisplayArray
public:
vector<RAS_TexVert> m_vertex;
vector<unsigned short> m_index;
- /* LINE currently isnt used */
enum { LINE = 2, TRIANGLE = 3, QUAD = 4 } m_type;
//RAS_MeshSlot *m_origSlot;
-
- /* Number of RAS_MeshSlot using this array */
int m_users;
enum { BUCKET_MAX_INDEX = 65535 };
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
index f2b97bedb2f..fe3d0f6aeea 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
@@ -27,18 +27,18 @@
FILE(GLOB SRC *.cpp)
SET(INC
- ../../../../source/kernel/gen_system
- ../../../../intern/string
- ../../../../intern/moto/include
- ../../../../source/gameengine/Rasterizer
- ../../../../source/gameengine/Ketsji
- ../../../../source/gameengine/SceneGraph
- ../../../../extern/glew/include
- ../../../../source/blender/gpu
- ../../../../source/blender/makesdna
- ../../../../source/blender/blenkernel
- ../../../../source/blender/blenlib
- ../../../../source/blender/blenloader
+ ../../../../source/kernel/gen_system
+ ../../../../intern/string
+ ../../../../intern/moto/include
+ ../../../../source/gameengine/Rasterizer
+ ../../../../source/gameengine/Ketsji
+ ../../../../source/gameengine/SceneGraph
+ ../../../../extern/glew/include
+ ../../../../source/blender/gpu
+ ../../../../source/blender/makesdna
+ ../../../../source/blender/blenkernel
+ ../../../../source/blender/blenlib
+ ../../../../source/blender/blenloader
)
BLENDERLIB(bf_oglrasterizer "${SRC}" "${INC}")
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
index fb4c685f8d3..e206c90ea25 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
@@ -8,4 +8,10 @@ incs += ' #source/blender/gpu #extern/glew/include ' + env['BF_OPENGL_INC']
incs += ' #source/blender/gameengine/Ketsji #source/gameengine/SceneGraph #source/blender/makesdna #source/blender/blenkernel'
incs += ' #intern/guardedalloc #source/blender/blenlib'
-env.BlenderLib ( 'bf_oglrasterizer', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350,75], cxx_compileflags=env['BGE_CXXFLAGS'])
+cxxflags = []
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ cxxflags.append ('/GR')
+ cxxflags.append ('/O2')
+ cxxflags.append ('/EHsc')
+
+env.BlenderLib ( 'bf_oglrasterizer', Split(sources), Split(incs), [], libtype=['core','player'], priority=[350, 115], cxx_compileflags = cxxflags )
diff --git a/source/gameengine/Rasterizer/RAS_Polygon.cpp b/source/gameengine/Rasterizer/RAS_Polygon.cpp
index 87c5118c5fb..eacc1285166 100644
--- a/source/gameengine/Rasterizer/RAS_Polygon.cpp
+++ b/source/gameengine/Rasterizer/RAS_Polygon.cpp
@@ -31,7 +31,6 @@
#endif
#include "RAS_Polygon.h"
-#include "RAS_MeshObject.h" /* only for GetVertexOffsetAbs */
RAS_Polygon::RAS_Polygon(RAS_MaterialBucket* bucket, RAS_DisplayArray *darray, int numvert)
{
@@ -64,20 +63,6 @@ int RAS_Polygon::GetVertexOffset(int i)
return m_offset[i];
}
-int RAS_Polygon::GetVertexOffsetAbs(RAS_MeshObject *mesh, int i)
-{
- /* hack that only works because there can only ever be 2 different
- * GetDisplayArray's per mesh. if this uses a different display array to the first
- * then its incices are offset.
- * if support for edges is added back this would need to be changed. */
- RAS_DisplayArray* darray= mesh->GetPolygon(0)->GetDisplayArray();
-
- if(m_darray != darray)
- return m_offset[i] + darray->m_vertex.size();
-
- return m_offset[i];
-}
-
/*
int RAS_Polygon::GetEdgeCode()
{
diff --git a/source/gameengine/Rasterizer/RAS_Polygon.h b/source/gameengine/Rasterizer/RAS_Polygon.h
index bd8cfe0be28..a5b77738026 100644
--- a/source/gameengine/Rasterizer/RAS_Polygon.h
+++ b/source/gameengine/Rasterizer/RAS_Polygon.h
@@ -72,7 +72,6 @@ public:
void SetVertexOffset(int i, unsigned short offset);
int GetVertexOffset(int i);
- int GetVertexOffsetAbs(RAS_MeshObject *mesh, int i); /* accounts for quad and tri arrays, slower, for python */
// each bit is for a visible edge, starting with bit 1 for the first edge, bit 2 for second etc.
// - Not used yet!
diff --git a/source/gameengine/Rasterizer/SConscript b/source/gameengine/Rasterizer/SConscript
index dbec2d92e31..255131f9a44 100644
--- a/source/gameengine/Rasterizer/SConscript
+++ b/source/gameengine/Rasterizer/SConscript
@@ -7,4 +7,10 @@ sources = env.Glob('*.cpp')
incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/BlenderRoutines #extern/glew/include #source/gameengine/Expressions #source/gameengine/SceneGraph #source/blender/blenkernel #source/blender/makesdna'
incs += ' ' + env['BF_PYTHON_INC']
-env.BlenderLib ( 'bf_rasterizer', sources, Split(incs), [], libtype=['core','player'], priority=[350,70], cxx_compileflags=env['BGE_CXXFLAGS'])
+cxxflags = []
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ cxxflags.append ('/GR')
+ cxxflags.append ('/O2')
+ cxxflags.append ('/EHsc')
+
+env.BlenderLib ( 'bf_rasterizer', sources, Split(incs), [], libtype=['core','player'], priority=[350,115], cxx_compileflags = cxxflags )
diff --git a/source/gameengine/SceneGraph/CMakeLists.txt b/source/gameengine/SceneGraph/CMakeLists.txt
index 2ac52be938e..0409b8c0ac4 100644
--- a/source/gameengine/SceneGraph/CMakeLists.txt
+++ b/source/gameengine/SceneGraph/CMakeLists.txt
@@ -27,8 +27,8 @@
FILE(GLOB SRC *.cpp)
SET(INC
- .
- ../../../intern/moto/include
+ .
+ ../../../intern/moto/include
)
BLENDERLIB(bf_scenegraph "${SRC}" "${INC}")
diff --git a/source/gameengine/SceneGraph/SConscript b/source/gameengine/SceneGraph/SConscript
index 2a33cd67b5e..b3db50117f1 100644
--- a/source/gameengine/SceneGraph/SConscript
+++ b/source/gameengine/SceneGraph/SConscript
@@ -6,4 +6,10 @@ sources = env.Glob('*.cpp')
incs = '. #intern/moto/include'
-env.BlenderLib ( 'bf_scenegraph', sources, Split(incs), [], libtype=['core','player'], priority=[325,85], cxx_compileflags=env['BGE_CXXFLAGS'])
+cxxflags = []
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ cxxflags.append ('/GR')
+ cxxflags.append ('/O2')
+ cxxflags.append ('/EHsc')
+
+env.BlenderLib ( 'bf_scenegraph', sources, Split(incs), [], libtype=['core','player'], priority=[325,125], cxx_compileflags = cxxflags )
diff --git a/source/gameengine/VideoTexture/CMakeLists.txt b/source/gameengine/VideoTexture/CMakeLists.txt
index 935c5a2c292..255d0907101 100644
--- a/source/gameengine/VideoTexture/CMakeLists.txt
+++ b/source/gameengine/VideoTexture/CMakeLists.txt
@@ -27,34 +27,34 @@
FILE(GLOB SRC *.cpp)
SET(INC
- .
- ../../../source/gameengine/Ketsji
- ../../../source/gameengine/Expressions
- ../../../source/gameengine/GameLogic
- ../../../source/gameengine/SceneGraph
- ../../../source/gameengine/Rasterizer
- ../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
- ../../../source/gameengine/BlenderRoutines
- ../../../source/blender/include
- ../../../source/blender/blenlib
- ../../../source/blender/blenkernel
- ../../../source/blender/makesdna
- ../../../source/blender/editors/include
- ../../../source/blender/imbuf
- ../../../source/blender/python
- ../../../source/blender/gpu
- ../../../source/kernel/gen_system
- ../../../intern/string
- ../../../intern/moto/include
- ../../../intern/guardedalloc
- ../../../extern/glew/include
- ${PYTHON_INC}
+ .
+ ../../../source/gameengine/Ketsji
+ ../../../source/gameengine/Expressions
+ ../../../source/gameengine/GameLogic
+ ../../../source/gameengine/SceneGraph
+ ../../../source/gameengine/Rasterizer
+ ../../../source/gameengine/Rasterizer/RAS_OpenGLRasterizer
+ ../../../source/gameengine/BlenderRoutines
+ ../../../source/blender/include
+ ../../../source/blender/blenlib
+ ../../../source/blender/blenkernel
+ ../../../source/blender/makesdna
+ ../../../source/blender/editors/include
+ ../../../source/blender/imbuf
+ ../../../source/blender/python
+ ../../../source/blender/gpu
+ ../../../source/kernel/gen_system
+ ../../../intern/string
+ ../../../intern/moto/include
+ ../../../intern/guardedalloc
+ ../../../extern/glew/include
+ ${PYTHON_INC}
)
IF(WITH_FFMPEG)
- SET(INC ${INC} ${FFMPEG_INC} ${PTHREADS_INC})
- ADD_DEFINITIONS(-DWITH_FFMPEG)
- ADD_DEFINITIONS(-D__STDC_CONSTANT_MACROS)
+ SET(INC ${INC} ${FFMPEG_INC} ${PTHREADS_INC})
+ ADD_DEFINITIONS(-DWITH_FFMPEG)
+ ADD_DEFINITIONS(-D__STDC_CONSTANT_MACROS)
ENDIF(WITH_FFMPEG)
BLENDERLIB(bf_videotex "${SRC}" "${INC}")
diff --git a/source/gameengine/VideoTexture/Exception.cpp b/source/gameengine/VideoTexture/Exception.cpp
index 35d335b5981..8704d49f2a7 100644
--- a/source/gameengine/VideoTexture/Exception.cpp
+++ b/source/gameengine/VideoTexture/Exception.cpp
@@ -21,7 +21,7 @@ http://www.gnu.org/copyleft/lesser.txt.
*/
-#include <sstream>
+#include <strstream>
#include <fstream>
#include <PyObjectPlus.h>
@@ -170,11 +170,11 @@ void Exception::setXptDesc (void)
// length of result code
const size_t rsltSize = 11;
// delimit description
- //const char delimRslt[] = ": ";
+ const char delimRslt[] = ": ";
// set text of description
char rsltTxt[rsltSize];
- std::ostringstream os;
- os << std::hex << m_hRslt << ": " << '\0';
+ std::ostrstream os(rsltTxt, rsltSize);
+ os << std::hex << m_hRslt << delimRslt << '\0';
// copy result to description
m_desc.insert(0, rsltTxt);
// copy exception description to last exception string
diff --git a/source/gameengine/VideoTexture/ImageBase.cpp b/source/gameengine/VideoTexture/ImageBase.cpp
index 0740afed2c6..5e2841271a6 100644
--- a/source/gameengine/VideoTexture/ImageBase.cpp
+++ b/source/gameengine/VideoTexture/ImageBase.cpp
@@ -219,17 +219,15 @@ bool ImageBase::checkSourceSizes (void)
// get size of current source
short * curSize = (*it)->getSize();
// if size is available and is not empty
- if (curSize[0] != 0 && curSize[1] != 0) {
+ if (curSize[0] != 0 && curSize[1] != 0)
// if reference size is not set
- if (refSize == NULL) {
+ if (refSize == NULL)
// set current size as reference
refSize = curSize;
// otherwise check with current size
- } else if (curSize[0] != refSize[0] || curSize[1] != refSize[1]) {
+ else if (curSize[0] != refSize[0] || curSize[1] != refSize[1])
// if they don't match, report it
return false;
- }
- }
}
// all sizes match
return true;
diff --git a/source/gameengine/VideoTexture/SConscript b/source/gameengine/VideoTexture/SConscript
index 119bd1c9954..d6b78f6d1a6 100644
--- a/source/gameengine/VideoTexture/SConscript
+++ b/source/gameengine/VideoTexture/SConscript
@@ -15,15 +15,21 @@ incs += ' #source/blender/gpu #source/kernel/gen_system #intern/string #intern/m
incs += ' #intern/guardedalloc #extern/glew/include'
defs = []
+cxxflags = []
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+ cxxflags.append ('/GR')
+ cxxflags.append ('/O2')
+ cxxflags.append ('/EHsc')
if env['BF_DEBUG']:
defs.append('_DEBUG')
+
incs += ' ' + env['BF_PYTHON_INC']
#incs += ' ' + env['BF_OPENGL_INC']
if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
incs += ' ' + env['BF_FFMPEG_INC'] + ' ' + env['BF_PTHREADS_INC']
+ defs.append('__STDC_CONSTANT_MACROS')
-env.BlenderLib ( 'bf_videotex', sources, Split(incs), defs, libtype=['core','player'], priority=[300,205], cxx_compileflags=env['BGE_CXXFLAGS'])
+env.BlenderLib ( 'bf_videotex', sources, Split(incs), defs, libtype=['core','player'], priority=[300, 72], cxx_compileflags = cxxflags )
diff --git a/source/icons/SConscript b/source/icons/SConscript
index c929729f05b..1471a06c09d 100644
--- a/source/icons/SConscript
+++ b/source/icons/SConscript
@@ -3,4 +3,4 @@ Import ('env')
source = 'winblender.rcscons'
-env.BlenderRes('winresource', source, ['core'], priority=[95])
+env.BlenderRes('winresource', source, ['core', 'player'], priority=[95 , 100]) \ No newline at end of file
diff --git a/source/kernel/CMakeLists.txt b/source/kernel/CMakeLists.txt
index 3aea2b9bcb0..ac759393326 100644
--- a/source/kernel/CMakeLists.txt
+++ b/source/kernel/CMakeLists.txt
@@ -27,11 +27,11 @@
SET(INC gen_messaging gen_system ../../intern/string ../../intern/moto/include ../../source/blender/blenloader )
FILE(GLOB SRC
- gen_messaging/intern/messaging.c
- gen_system/GEN_HashedPtr.cpp
- gen_system/GEN_Matrix4x4.cpp
- gen_system/SYS_SingletonSystem.cpp
- gen_system/SYS_System.cpp
+ gen_messaging/intern/messaging.c
+ gen_system/GEN_HashedPtr.cpp
+ gen_system/GEN_Matrix4x4.cpp
+ gen_system/SYS_SingletonSystem.cpp
+ gen_system/SYS_System.cpp
)
BLENDERLIB(bf_kernel "${SRC}" "${INC}")
diff --git a/source/kernel/SConscript b/source/kernel/SConscript
index 3110f46cfad..908e059ceab 100644
--- a/source/kernel/SConscript
+++ b/source/kernel/SConscript
@@ -7,4 +7,4 @@ sources += ' gen_system/SYS_System.cpp'
incs = 'gen_messaging gen_system #/intern/string #/intern/moto/include #/source/blender/blenloader '
-env.BlenderLib ( 'bf_kernel', Split(sources), Split(incs), [], libtype = ['core','player'], priority = [400,100] )
+env.BlenderLib ( 'bf_kernel', Split(sources), Split(incs), [], libtype = ['core', 'player'], priority = [400, 150] )
diff --git a/source/nan_definitions.mk b/source/nan_definitions.mk
index f8afc7f3fa6..b3f36dd3b5c 100644
--- a/source/nan_definitions.mk
+++ b/source/nan_definitions.mk
@@ -113,29 +113,7 @@ ifndef CONFIG_GUESS
export WITH_OPENEXR ?= true
export WITH_DDS ?= true
export WITH_OPENJPEG ?= true
- export WITH_LZO ?= true
- export WITH_LZMA ?= true
- export NAN_LZO ?= $(LCGDIR)/lzo
- export NAN_LZMA ?= $(LCGDIR)/lzma
- export WITH_OPENAL ?= false
- export WITH_JACK ?= false
- export WITH_SNDFILE ?= false
-
- ifeq ($(WITH_OPENAL), true)
- export NAN_OPENAL ?= /usr
- endif
- ifeq ($(WITH_JACK), true)
- export NAN_JACK ?= /usr
- export NAN_JACKCFLAGS ?= -I$(NAN_JACK)/include/jack
- export NAN_JACKLIBS ?= $(NAN_JACK)/lib/libjack.a
- endif
-
- ifeq ($(WITH_SNDFILE),true)
- export NAN_SNDFILE ?= /usr
- export NAN_SNDFILECFLAGS ?= -I$(NAN_SNDFILE)/include
- export NAN_SNDFILELIBS ?= $(NAN_SNDFILE)/lib/libsndfile.a $(NAN_SNDFILE)/lib/libFLAC.a $(NAN_SNDFILE)/lib/libogg.a
- endif
ifeq ($(NAN_USE_FFMPEG_CONFIG), true)
export NAN_FFMPEG ?= $(shell ffmpeg-config --prefix)
@@ -194,7 +172,7 @@ ifndef CONFIG_GUESS
export NAN_NO_KETSJI=false
ifeq ($(CPU), i386)
- export WITH_OPENAL=false
+ export NAN_NO_OPENAL=true
endif
# Location of MOZILLA/Netscape header files...
@@ -554,4 +532,5 @@ endif # CONFIG_GUESS
# Don't want to build the gameengine?
ifeq ($(NAN_NO_KETSJI), true)
export NAN_JUST_BLENDERDYNAMIC=true
+ export NAN_NO_OPENAL=true
endif
diff --git a/tools/Blender.py b/tools/Blender.py
index d0217e841ce..797900343ee 100644
--- a/tools/Blender.py
+++ b/tools/Blender.py
@@ -101,10 +101,7 @@ def create_blender_liblist(lenv = None, libtype = None):
sortlist.sort()
for sk in sortlist:
v = curlib[sk]
- if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
- target = os.path.abspath(os.getcwd() + os.sep + root_build_dir + 'lib' + os.sep +lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX'])
- else:
- target = os.path.abspath(root_build_dir + 'lib' + os.sep +lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX'])
+ target = os.path.abspath(os.getcwd() + os.sep + root_build_dir + 'lib' + os.sep +lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX'])
lst.append(target)
return lst
@@ -135,8 +132,6 @@ def setup_staticlibs(lenv):
libincs += Split(lenv['BF_FFMPEG_LIBPATH'])
if lenv['WITH_BF_JACK']:
libincs += Split(lenv['BF_JACK_LIBPATH'])
- if lenv['WITH_BF_SNDFILE']:
- libincs += Split(lenv['BF_SNDFILE_LIBPATH'])
if lenv['WITH_BF_OPENEXR']:
libincs += Split(lenv['BF_OPENEXR_LIBPATH'])
if lenv['WITH_BF_STATICOPENEXR']:
@@ -172,8 +167,8 @@ def setup_syslibs(lenv):
]
syslibs += Split(lenv['BF_FREETYPE_LIB'])
- # if lenv['BF_UNIT_TEST']:
- # syslibs.append(lenv['BF_CHECK_LIB'])
+ if lenv['WITH_BF_UNIT_TEST']:
+ syslibs.append(lenv['BF_CHECK_LIB'])
if lenv['WITH_BF_PYTHON'] and not lenv['WITH_BF_STATICPYTHON']:
if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
syslibs.append(lenv['BF_PYTHON_LIB']+'_d')
@@ -200,8 +195,6 @@ def setup_syslibs(lenv):
syslibs += Split(lenv['BF_OGG_LIB'])
if lenv['WITH_BF_JACK']:
syslibs += Split(lenv['BF_JACK_LIB'])
- if lenv['WITH_BF_SNDFILE']:
- syslibs += Split(lenv['BF_SNDFILE_LIB'])
if lenv['WITH_BF_FFTW3']:
syslibs += Split(lenv['BF_FFTW3_LIB'])
if lenv['WITH_BF_SDL']:
@@ -472,11 +465,7 @@ class BlenderEnvironment(SConsEnvironment):
print bc.HEADER+'Configuring resource '+bc.ENDC+bc.OKGREEN+libname+bc.ENDC
lenv = self.Clone()
- if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
- res = lenv.RES('#'+root_build_dir+'lib/'+libname, source)
- else:
- res = lenv.RES(root_build_dir+'lib/'+libname, source)
-
+ res = lenv.RES('#'+root_build_dir+'lib/'+libname, source)
SConsEnvironment.Default(self, res)
resources.append(res)
diff --git a/tools/btools.py b/tools/btools.py
index bb1c18b92c6..c910cfeac55 100755
--- a/tools/btools.py
+++ b/tools/btools.py
@@ -32,7 +32,6 @@ def validate_arguments(args, bc):
'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH',
'BF_LIBSAMPLERATE', 'BF_LIBSAMPLERATE_INC', 'BF_LIBSAMPLERATE_LIB', 'BF_LIBSAMPLERATE_LIBPATH',
'WITH_BF_JACK', 'BF_JACK', 'BF_JACK_INC', 'BF_JACK_LIB', 'BF_JACK_LIBPATH',
- 'WITH_BF_SNDFILE', 'BF_SNDFILE', 'BF_SNDFILE_INC', 'BF_SNDFILE_LIB', 'BF_SNDFILE_LIBPATH',
'BF_PTHREADS', 'BF_PTHREADS_INC', 'BF_PTHREADS_LIB', 'BF_PTHREADS_LIBPATH',
'WITH_BF_OPENEXR', 'BF_OPENEXR', 'BF_OPENEXR_INC', 'BF_OPENEXR_LIB', 'BF_OPENEXR_LIBPATH', 'WITH_BF_STATICOPENEXR', 'BF_OPENEXR_LIB_STATIC',
'WITH_BF_DDS',
@@ -70,7 +69,8 @@ def validate_arguments(args, bc):
'BF_NUMJOBS',
'BF_MSVS',
- # 'BF_CHECK_LIB',
+ 'WITH_BF_UNIT_TEST',
+ 'BF_CHECK_LIB',
]
# Have options here that scons expects to be lists
@@ -79,7 +79,6 @@ def validate_arguments(args, bc):
'BF_OPENGL_LINKFLAGS',
'CFLAGS', 'CCFLAGS', 'CXXFLAGS', 'CPPFLAGS',
'REL_CFLAGS', 'REL_CCFLAGS', 'REL_CXXFLAGS',
- 'BGE_CXXFLAGS',
'BF_PROFILE_CFLAGS', 'BF_PROFILE_CCFLAGS', 'BF_PROFILE_CXXFLAGS', 'BF_PROFILE_LINKFLAGS',
'BF_DEBUG_CFLAGS', 'BF_DEBUG_CCFLAGS', 'BF_DEBUG_CXXFLAGS',
'C_WARN', 'CC_WARN', 'CXX_WARN',
@@ -93,7 +92,7 @@ def validate_arguments(args, bc):
'BF_BSC', 'BF_CONFIG',
'BF_PRIORITYLIST', 'BF_BUILDINFO','CC', 'CXX', 'BF_QUICKDEBUG',
'BF_LISTDEBUG', 'LCGDIR', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG',
- 'BF_DOCDIR', 'BF_UNIT_TEST']
+ 'BF_DOCDIR']
okdict = {}
@@ -175,13 +174,13 @@ def read_opts(cfg, args):
(BoolVariable('WITH_BF_SDL', 'Use SDL if true', False)),
('BF_SDL', 'SDL base path', ''),
- ('BF_SDL_INC', 'SDL include path', ''),
- ('BF_SDL_LIB', 'SDL library', ''),
+ ('BF_SDL_INC', 'SDL include path', ''), #$(shell $(BF_SDL)/bin/sdl-config --cflags)
+ ('BF_SDL_LIB', 'SDL library', ''), #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
('BF_SDL_LIBPATH', 'SDL library path', ''),
('BF_LIBSAMPLERATE', 'libsamplerate aka SRC base path', ''),
- ('BF_LIBSAMPLERATE_INC', 'libsamplerate aka SRC include path', ''),
- ('BF_LIBSAMPLERATE_LIB', 'libsamplerate aka SRC library', ''),
+ ('BF_LIBSAMPLERATE_INC', 'libsamplerate aka SRC include path', ''), #$(shell $(BF_SDL)/bin/sdl-config --cflags)
+ ('BF_LIBSAMPLERATE_LIB', 'libsamplerate aka SRC library', ''), #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
('BF_LIBSAMPLERATE_LIBPATH', 'libsamplerate aka SRC library path', ''),
(BoolVariable('WITH_BF_JACK', 'Enable jack support if true', True)),
@@ -190,12 +189,6 @@ def read_opts(cfg, args):
('BF_JACK_LIB', 'jack library', ''),
('BF_JACK_LIBPATH', 'jack library path', ''),
- (BoolVariable('WITH_BF_SNDFILE', 'Enable sndfile support if true', True)),
- ('BF_SNDFILE', 'sndfile base path', ''),
- ('BF_SNDFILE_INC', 'sndfile include path', ''),
- ('BF_SNDFILE_LIB', 'sndfile library', ''),
- ('BF_SNDFILE_LIBPATH', 'sndfile library path', ''),
-
('BF_PTHREADS', 'Pthreads base path', ''),
('BF_PTHREADS_INC', 'Pthreads include path', ''),
('BF_PTHREADS_LIB', 'Pthreads library', ''),
@@ -336,7 +329,6 @@ def read_opts(cfg, args):
('CFLAGS', 'C only flags', ''),
('CCFLAGS', 'Generic C and C++ flags', ''),
('CXXFLAGS', 'C++ only flags', ''),
- ('BGE_CXXFLAGS', 'C++ only flags for BGE', ''),
('CPPFLAGS', 'Defines', ''),
('REL_CFLAGS', 'C only release flags', ''),
('REL_CCFLAGS', 'Generic C and C++ release flags', ''),
@@ -390,8 +382,8 @@ def read_opts(cfg, args):
('BF_NUMJOBS', 'Number of build processes to spawn', '1'),
('BF_MSVS', 'Generate MSVS project files and solution', False),
- (BoolVariable('BF_UNIT_TEST', 'Build with unit test support.', False)),
- # ('BF_CHECK_LIB', 'Check unit testing framework library', 'check')
+ (BoolVariable('WITH_BF_UNIT_TEST', 'Build unit tests', False)),
+ ('BF_CHECK_LIB', 'Check unit testing framework library', 'check'),
) # end of opts.AddOptions()